m68k stub and DECR_PC_AFTER_BREAK
J.T. Conklin
jtc@redback.com
Mon Oct 11 16:17:00 GMT 1999
>>>>> "Todd" == Todd Whitesel <toddpw@wrs.com> writes:
>> 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
Todd> Fixing the PC should occur at the lowest level possible.
I agree. It's a bit complicated by the fact that some established
(GDB) targets don't fix the PC at the lowest level. If we "fix" GDB,
doubtless some target systems will be broken unless we're not careful
to provide some mechanism for backwards compatibility. As I said in
my earlier message, I'm not sure if the best way to do this. I'd be
interested in any opinions folks might have.
Todd> On some arch's you get different offsetting depending on how the
Todd> breakpoint was triggered -- this can happen with hardware
Todd> breakpoints and also with stubs that do their own
Todd> single-stepping by disassembling branch instructions (what
Todd> happens when that single step arrives at a user breakpoint?),
Todd> although I think GDB already knows how to do the right thing in
Todd> that instance.
One tricky spot would be single stepping through a jump instruction to
an address DECR_PC_AFTER_BREAK bytes after a breakpoint. I don't know
if/how GDB handles this case.
--jtc
--
J.T. Conklin
RedBack Networks
More information about the Gdb
mailing list