Debugger: Fix some minor GB debugger issues

This commit is contained in:
Jeffrey Pfau 2016-08-16 22:15:25 -07:00
parent 071406b3a1
commit c6dd9b6e64
2 changed files with 2 additions and 2 deletions

View File

@ -73,7 +73,7 @@ static uint32_t _lookupPlatformIdentifier(struct CLIDebuggerSystem* debugger, co
return cpu->pc;
}
if (strcmp(name, "sp") == 0) {
return cpu->pc;
return cpu->sp;
}
if (strcmp(name, "f") == 0) {
return cpu->f.packed;

View File

@ -23,7 +23,7 @@ static struct LR35902DebugBreakpoint* _lookupBreakpoint(struct LR35902DebugBreak
static void LR35902DebuggerCheckBreakpoints(struct mDebuggerPlatform* d) {
struct LR35902Debugger* debugger = (struct LR35902Debugger*) d;
struct LR35902DebugBreakpoint* breakpoint = _lookupBreakpoint(&debugger->breakpoints, debugger->cpu->pc - 1);
struct LR35902DebugBreakpoint* breakpoint = _lookupBreakpoint(&debugger->breakpoints, debugger->cpu->pc);
if (!breakpoint) {
return;
}