From be84cfdb59c6c2a5ac7258f78f098e9bced29cb0 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Fri, 26 May 2017 18:40:43 +0200 Subject: SCI: Add inspect, none breakpoint actions --- engines/sci/console.cpp | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) (limited to 'engines/sci/console.cpp') diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp index 6efe6849bb..eccd94e30e 100644 --- a/engines/sci/console.cpp +++ b/engines/sci/console.cpp @@ -3741,6 +3741,12 @@ bool Console::cmdBreakpointList(int argc, const char **argv) { case BREAK_BACKTRACE: bpaction = " (action: show backtrace)"; break; + case BREAK_INSPECT: + bpaction = " (action: show object)"; + break; + case BREAK_NONE: + bpaction = " (action: ignore)"; + break; default: bpaction = ""; } @@ -3802,13 +3808,7 @@ bool Console::cmdBreakpointDelete(int argc, const char **argv) { // Delete it _debugState._breakpoints.erase(bp); - // Update EngineState::_activeBreakpointTypes. - int type = 0; - for (bp = _debugState._breakpoints.begin(); bp != end; ++bp) { - type |= bp->_type; - } - - _debugState._activeBreakpointTypes = type; + _debugState.updateActiveBreakpointTypes(); return true; } @@ -3831,13 +3831,22 @@ bool Console::cmdBreakpointAction(int argc, const char **argv) { bpaction = BREAK_LOG; else if (arg == "bt") bpaction = BREAK_BACKTRACE; + else if (arg == "inspect") + bpaction = BREAK_INSPECT; + else if (arg == "none") + bpaction = BREAK_NONE; else usage = true; if (usage) { debugPrintf("Change the action for the breakpoint with the specified index.\n"); - debugPrintf("Usage: %s break|log|bt\n", argv[0]); + debugPrintf("Usage: %s break|log|bt|inspect|none\n", argv[0]); debugPrintf(" * will process all breakpoints\n"); + debugPrintf("Actions: break : break into debugger\n"); + debugPrintf(" log : log without breaking\n"); + debugPrintf(" bt : show backtrace without breaking\n"); + debugPrintf(" inspect: show object (only for bpx/bpr/bpw)\n"); + debugPrintf(" none : ignore breakpoint\n"); return true; } @@ -3846,6 +3855,7 @@ bool Console::cmdBreakpointAction(int argc, const char **argv) { if (strcmp(argv[1], "*") == 0) { for (; bp != end; ++bp) bp->_action = bpaction; + _debugState.updateActiveBreakpointTypes(); return true; } @@ -3862,6 +3872,9 @@ bool Console::cmdBreakpointAction(int argc, const char **argv) { } bp->_action = bpaction; + + _debugState.updateActiveBreakpointTypes(); + return true; } -- cgit v1.2.3