Firmware: add optional address to next command

Change-Id: I5378e5bb8ec767f6504823d190b774c8f523c879
This commit is contained in:
David Banks 2020-06-09 19:00:38 +01:00
parent 2de5c382a7
commit b07b86195c
1 changed files with 7 additions and 2 deletions

View File

@ -190,7 +190,7 @@ static const uint8_t helpMeta[] PROGMEM = {
#endif
17, 15, // help
9, 8, // continue
24, 7, // next
24, 1, // next
32, 6, // step
27, 7, // regs
12, 10, // dis
@ -2113,8 +2113,13 @@ void doCmdNext(char *params) {
logTooManyBreakpoints();
return;
}
addr_t addr = 0xFFFF;
params = parsehex4(params, &addr);
if (addr == 0xFFFF) {
addr = nextAddr;
}
numbkpts++;
setBreakpoint(numbkpts - 1, nextAddr, 0xffff, (1 << BRKPT_EXEC) | (1 << TRANSIENT), TRIGGER_ALWAYS);
setBreakpoint(numbkpts - 1, addr, 0xffff, (1 << BRKPT_EXEC) | (1 << TRANSIENT), TRIGGER_ALWAYS);
doCmdContinue(params);
}