m68k stub and DECR_PC_AFTER_BREAK

Todd Whitesel toddpw@wrs.com
Mon Oct 11 15:13:00 GMT 1999


> In fact, from time to time I've thought about what it would take to
> make GDB's iX86 embedded targets use DECR_PC_AFTER_BREAK == 0 even

Fixing the PC should occur at the lowest level possible.

On some arch's you get different offsetting depending on how the breakpoint
was triggered -- this can happen with hardware breakpoints and also with stubs
that do their own single-stepping by disassembling branch instructions (what
happens when that single step arrives at a user breakpoint?), although I think
GDB already knows how to do the right thing in that instance.

The current method for PC adjustment is probably a relic from the ptrace days
and has no real advantage. If anything, it clutters the target-independent
code.

-- 
Todd Whitesel
toddpw @ wrs.com


More information about the Gdb mailing list