winedbg: Fix stepping over
Petr Tesarik
petr at tesarici.cz
Tue Mar 21 04:47:58 CST 2006
Hi,
this patch fixes a bug in winedbg, which caused it to continue
execution at a wrong address when stepping over a function call.
The trouble was that if there was no breakpoint found, the code at the
end of break_should_continue reversed the PC adjustment and later the
debugger resumed program execution AFTER the INT3 instruction, which
is clearly wrong.
ChangeLog:
Fix stepping over
-------------- next part --------------
Index: break.c
===================================================================
RCS file: /home/wine/wine/programs/winedbg/break.c,v
retrieving revision 1.17
diff -u -r1.17 break.c
--- break.c 27 Jan 2006 15:22:15 -0000 1.17
+++ break.c 21 Mar 2006 10:36:07 -0000
@@ -731,9 +731,13 @@
if (code == EXCEPTION_BREAKPOINT)
addr->Offset += be_cpu->adjust_pc_for_break(&dbg_context, TRUE);
+ dbg_curr_thread->stopped_xpoint = find_xpoint(addr, be_xpoint_break);
dbg_curr_process->bp[0].enabled = FALSE; /* disable the step-over breakpoint */
- dbg_curr_thread->stopped_xpoint = find_xpoint(addr, be_xpoint_break);
+ /* Unconditionally stop on the step-over breakpoint */
+ if (dbg_curr_thread->stopped_xpoint == 0)
+ return FALSE;
+
if (dbg_curr_thread->stopped_xpoint > 0)
{
if (!should_stop(dbg_curr_thread->stopped_xpoint)) return TRUE;
More information about the wine-patches
mailing list