mirror of https://github.com/stella-emu/stella.git
refine 'break' command (using ff instead of -1, which indicates an invalid argument)
This commit is contained in:
parent
535779294f
commit
dd3fea5f96
|
@ -729,7 +729,7 @@ void DebuggerParser::executeBase()
|
||||||
void DebuggerParser::executeBreak()
|
void DebuggerParser::executeBreak()
|
||||||
{
|
{
|
||||||
uInt16 addr;
|
uInt16 addr;
|
||||||
Int8 bank;
|
uInt8 bank;
|
||||||
|
|
||||||
if(argCount == 0)
|
if(argCount == 0)
|
||||||
addr = debugger.cpuDebug().pc();
|
addr = debugger.cpuDebug().pc();
|
||||||
|
@ -741,13 +741,13 @@ void DebuggerParser::executeBreak()
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bank = args[1];
|
bank = args[1];
|
||||||
if(bank < -1 || bank >= debugger.cartDebug().bankCount())
|
if(bank >= debugger.cartDebug().bankCount() && bank != 0xff)
|
||||||
{
|
{
|
||||||
commandResult << red("invalid bank");
|
commandResult << red("invalid bank");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(bank > -1)
|
if(bank != 0xff)
|
||||||
{
|
{
|
||||||
bool set = debugger.toggleBreakPoint(addr, bank);
|
bool set = debugger.toggleBreakPoint(addr, bank);
|
||||||
|
|
||||||
|
@ -2309,9 +2309,9 @@ DebuggerParser::Command DebuggerParser::commands[NumCommands] = {
|
||||||
|
|
||||||
{
|
{
|
||||||
"break",
|
"break",
|
||||||
"Set/clear breakpoint at <address> and <bank>",
|
"Break [at address] [and bank]",
|
||||||
"Command is a toggle, default is current PC and bank\nValid address is 0 - ffff\n"
|
"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 f000 0",
|
"Example: break, break f000, break 7654 3\n break ff00 ff (= all banks)",
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
{ Parameters::ARG_WORD, Parameters::ARG_MULTI_BYTE },
|
{ Parameters::ARG_WORD, Parameters::ARG_MULTI_BYTE },
|
||||||
|
|
Loading…
Reference in New Issue