diff options
author | Willem Jan Palenstijn | 2009-07-18 22:46:07 +0000 |
---|---|---|
committer | Willem Jan Palenstijn | 2009-07-18 22:46:07 +0000 |
commit | 8cb1cbfa7ab261054815bf768f34b62ebbf3bd8a (patch) | |
tree | ef7affc7a1f6c35b04f0d823c13629d14f3a0fc2 | |
parent | 57504cb699c98d3257d5cb39aa6971b6aacf211c (diff) | |
download | scummvm-rg350-8cb1cbfa7ab261054815bf768f34b62ebbf3bd8a.tar.gz scummvm-rg350-8cb1cbfa7ab261054815bf768f34b62ebbf3bd8a.tar.bz2 scummvm-rg350-8cb1cbfa7ab261054815bf768f34b62ebbf3bd8a.zip |
SCI: Fix breakpoints
svn-id: r42599
-rw-r--r-- | engines/sci/engine/vm.cpp | 2 | ||||
-rw-r--r-- | engines/sci/engine/vm.h | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp index e3535d895b..14b980d0ed 100644 --- a/engines/sci/engine/vm.cpp +++ b/engines/sci/engine/vm.cpp @@ -258,6 +258,7 @@ ExecStack *execute_method(EngineState *s, uint16 script, uint16 pubfunct, StackP if (bp->type == BREAK_EXPORT && bp->data.address == bpaddress) { Console *con = ((SciEngine *)g_engine)->getSciDebugger(); con->DebugPrintf("Break on script %d, export %d\n", script, pubfunct); + scriptState.debugging = true; breakpointFlag = true; break; } @@ -325,6 +326,7 @@ ExecStack *send_selector(EngineState *s, reg_t send_obj, reg_t work_obj, StackPt con->DebugPrintf("Break on %s (in [%04x:%04x])\n", method_name, PRINT_REG(send_obj)); print_send_action = 1; breakpointFlag = true; + scriptState.debugging = true; break; } bp = bp->next; diff --git a/engines/sci/engine/vm.h b/engines/sci/engine/vm.h index f711570d11..ba225a9c00 100644 --- a/engines/sci/engine/vm.h +++ b/engines/sci/engine/vm.h @@ -266,18 +266,19 @@ struct ExecStack { }; +// These types are used both as identifiers and as elements of bitfields enum BreakpointType { /** * Break when selector is executed. data contains (char *) selector name * (in the format Object::Method) */ - BREAK_SELECTOR, + BREAK_SELECTOR = 1, /** * Break when an exported function is called. data contains * script_no << 16 | export_no. */ - BREAK_EXPORT + BREAK_EXPORT = 2 }; struct Breakpoint { |