This is the mail archive of the gdb@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: m68k stub and DECR_PC_AFTER_BREAK


> 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]