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


>>>>> "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

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