From d35aaa32521a6e567c6e11494bef9f6fc2ec04ff Mon Sep 17 00:00:00 2001 From: Thomas Jentzsch Date: Mon, 26 Aug 2019 09:44:30 +0200 Subject: [PATCH] refine 'break' command (using ff instead of -1, which indicates an invalid argument) --- src/debugger/DebuggerParser.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/debugger/DebuggerParser.cxx b/src/debugger/DebuggerParser.cxx index 1f4797a10..b2d97b036 100644 --- a/src/debugger/DebuggerParser.cxx +++ b/src/debugger/DebuggerParser.cxx @@ -729,7 +729,7 @@ void DebuggerParser::executeBase() void DebuggerParser::executeBreak() { uInt16 addr; - Int8 bank; + uInt8 bank; if(argCount == 0) addr = debugger.cpuDebug().pc(); @@ -741,13 +741,13 @@ void DebuggerParser::executeBreak() else { bank = args[1]; - if(bank < -1 || bank >= debugger.cartDebug().bankCount()) + if(bank >= debugger.cartDebug().bankCount() && bank != 0xff) { commandResult << red("invalid bank"); return; } } - if(bank > -1) + if(bank != 0xff) { bool set = debugger.toggleBreakPoint(addr, bank); @@ -2309,9 +2309,9 @@ DebuggerParser::Command DebuggerParser::commands[NumCommands] = { { "break", - "Set/clear breakpoint at
and ", - "Command is a toggle, default is current PC and bank\nValid address is 0 - ffff\n" - "Example: break, break f000, break f000 0", + "Break [at address] [and bank]", + "Set/clear breakpoint on address (and all mirrors) and bank\nDefault are current PC and bank, valid address is 0 - ffff\n" + "Example: break, break f000, break 7654 3\n break ff00 ff (= all banks)", false, true, { Parameters::ARG_WORD, Parameters::ARG_MULTI_BYTE },