This is the mail archive of the 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

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

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.

So, is it possible that this technique cannot be done for some
instructions? If so, a mechanism for emulating them or falling back to
all-stop mode for that specific breakpoint could be used (this is the
approach taken by Frysk, AFAIK).

I looked at the Power ISA document and it is similar to the i386 in that
only flow control insns are of concern. I'll try to confirm this with
someone more experienced than me, however.

> If anybody makes it this far, thank you very much.

Two or three times, even. It's not easy for this stuff to sink in. :-)

Thiago Jung Bauermann
Software Engineer
IBM Linux Technology Center

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