This is the mail archive of the gdb@sourceware.org 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]
Other format: [Raw text]

Re: Stepping off breakpoints in non-stop debugging mode


Thiago Jung Bauermann <bauerman at br.ibm.com> writes:
> On Sat, 2007-12-08 at 01:23 -0800, Jim Blandy wrote:
>> For CodeSourcery's contract with Ericsson, I've implemented the
>> kprobes strategy for stepping off breakpoints in GDB for the i386; the
>> full patch is at the bottom of this message.  It introduces no
>> regressions on i386, using displaced stepping for stepping off all
>> breakpoints.  Combined with Vlad's work to leave breakpoints inserted
>> at all times, this gives us breakpoint behavior suitable for non-stop
>> debugging.
>> 
>> As far as the public GDB project is concerned, what do folks think
>> about the kprobes approach?
>
> Apologies if if you've already thought these through...
>
> Did you give any thoughts to the x86_64 instructions? I don't actually
> know much about them, but in this e-mail
>
> http://sourceware.org/ml/systemtap/2007-q1/msg00571.html
>
> Roland McGrath mentions some complexities involved in pc-relative
> addressing there, which don't exist in the i386 case. Also, he is
> concerned that instruction parsing would need to be carefully done.

This is a great find --- thanks very much.  I was aware of the
PC-relative addressing on the x86_64, but figured we'd cross that
bridge when we came to it.  From what Roland has written, it seems
that will be quite involved.

The interface I posted does allow the 'copy_insn' gdbarch method to
simply say, "I've taken care of emulating this instruction for you".
I don't know yet if that's practical in all the cases we care about.


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