Skip to content

Commit

Permalink
Fix debug breakpoint handling to pay attention to inhibit flag, so th…
Browse files Browse the repository at this point in the history
…at RUN and F5 can step one instruction from INT3 even if those are breakpoints
  • Loading branch information
joncampbell123 committed Sep 29, 2023
1 parent 5e514ae commit 63c2122
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/debug/debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -894,6 +894,7 @@ void CBreakpoint::ShowList(void)

bool DEBUG_Breakpoint(void)
{
if (inhibit_int_breakpoint) return false; /* or else stepping over INT 21h when BPINT 21h does nothing */
/* First get the physical address and check for a set Breakpoint */
if (!CBreakpoint::CheckBreakpoint(SegValue(cs),reg_eip)) return false;
// Found. Breakpoint is valid
Expand All @@ -904,7 +905,7 @@ bool DEBUG_Breakpoint(void)

bool DEBUG_IntBreakpoint(uint8_t intNum)
{
if (inhibit_int_breakpoint) return false; /* or else stepping over INT 21h when BPINT 21h does nothing */
if (inhibit_int_breakpoint) return false; /* or else stepping over INT 21h when BPINT 21h does nothing */
/* First get the physical address and check for a set Breakpoint */
PhysPt where=(PhysPt)GetAddress(SegValue(cs),reg_eip);
if (!CBreakpoint::CheckIntBreakpoint(where,intNum,reg_ah,reg_al)) return false;
Expand Down

0 comments on commit 63c2122

Please sign in to comment.