Debugger: Fix crash by breakpoint on message literal

This commit is contained in:
kichikuou
2021-08-15 18:19:37 +09:00
parent 3e46c54ce6
commit f8b7adf3d0
4 changed files with 7 additions and 4 deletions
+2 -2
View File
@@ -113,7 +113,7 @@ boolean dbg_delete_breakpoint(int no) {
return false;
}
int dbg_handle_breakpoint(int page, int addr) {
BYTE dbg_handle_breakpoint(int page, int addr) {
Breakpoint *bp = dbg_find_breakpoint(page, addr);
if (!bp)
SYSERROR("Illegal BREAKPOINT instruction");
@@ -121,7 +121,7 @@ int dbg_handle_breakpoint(int page, int addr) {
dbg_state = bp->no == INTERNAL_BREAKPOINT_NO ?
DBG_STOPPED_NEXT : DBG_STOPPED_BREAKPOINT;
char restore_op = bp->restore_op;
BYTE restore_op = bp->restore_op;
dbg_main(); // this may destroy bp
return restore_op;
}