This is the mail archive of the
gdb@sourceware.cygnus.com
mailing list for the GDB project.
Re: m68k stub and DECR_PC_AFTER_BREAK
- To: jtc at redback dot com
- Subject: Re: m68k stub and DECR_PC_AFTER_BREAK
- From: Todd Whitesel <toddpw at wrs dot com>
- Date: Mon, 11 Oct 1999 15:13:15 -0700 (PDT)
- Cc: gdb at sourceware dot cygnus dot com (GDB Developers)
> 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