Merge pull request #1568 from shygoo2/fix-js-breakhere
[Debugger] JS: Make debug.breakhere stable
This commit is contained in:
commit
25bd63cc9b
|
@ -289,8 +289,7 @@ const debug = {
|
||||||
},
|
},
|
||||||
breakhere: function()
|
breakhere: function()
|
||||||
{
|
{
|
||||||
debug.showcommands(gpr.pc)
|
_native.breakHere()
|
||||||
system.pause()
|
|
||||||
},
|
},
|
||||||
disasm: function()
|
disasm: function()
|
||||||
{
|
{
|
||||||
|
|
|
@ -1470,6 +1470,12 @@ duk_ret_t CScriptInstance::js_ConsoleClear(duk_context* ctx)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
duk_ret_t CScriptInstance::js_BreakHere(duk_context* /*ctx*/)
|
||||||
|
{
|
||||||
|
g_Settings->SaveBool(Debugger_SteppingOps, true);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
duk_ret_t CScriptInstance::js_Pause(duk_context* /*ctx*/)
|
duk_ret_t CScriptInstance::js_Pause(duk_context* /*ctx*/)
|
||||||
{
|
{
|
||||||
g_System->Pause();
|
g_System->Pause();
|
||||||
|
|
|
@ -170,6 +170,7 @@ private:
|
||||||
static duk_ret_t js_ConsolePrint(duk_context*);
|
static duk_ret_t js_ConsolePrint(duk_context*);
|
||||||
static duk_ret_t js_ConsoleClear(duk_context*);
|
static duk_ret_t js_ConsoleClear(duk_context*);
|
||||||
|
|
||||||
|
static duk_ret_t js_BreakHere(duk_context*);
|
||||||
static duk_ret_t js_Pause(duk_context*); // () ; pauses emulation
|
static duk_ret_t js_Pause(duk_context*); // () ; pauses emulation
|
||||||
static duk_ret_t js_ShowCommands(duk_context*); // ([address]) ; shows commands window
|
static duk_ret_t js_ShowCommands(duk_context*); // ([address]) ; shows commands window
|
||||||
|
|
||||||
|
@ -227,6 +228,8 @@ private:
|
||||||
{ "pause", js_Pause, DUK_VARARGS },
|
{ "pause", js_Pause, DUK_VARARGS },
|
||||||
{ "showCommands", js_ShowCommands, DUK_VARARGS },
|
{ "showCommands", js_ShowCommands, DUK_VARARGS },
|
||||||
|
|
||||||
|
{ "breakHere", js_BreakHere, DUK_VARARGS },
|
||||||
|
|
||||||
{ "screenPrint", js_ScreenPrint, DUK_VARARGS },
|
{ "screenPrint", js_ScreenPrint, DUK_VARARGS },
|
||||||
|
|
||||||
{ "fsOpen", js_FSOpen, DUK_VARARGS },
|
{ "fsOpen", js_FSOpen, DUK_VARARGS },
|
||||||
|
|
Loading…
Reference in New Issue