Stepping over longjmp presumably broken for glibc

Jim Blandy jimb@red-bean.com
Fri Jan 6 20:53:00 GMT 2006


On 1/6/06, Daniel Jacobowitz <drow@false.org> wrote:
> > The original topic of this thread was stepping through longjmp
> > instruction by instruction.  At some point, longjmp will inevitably
> > have disturbed the state of the processor enough that you can't unwind
> > back to longjmp's caller.  At that point, it makes more sense for the
> > 'calling' frame to be the setjmp than anything else.  Until that
> > point, you can have the CFI unwind to the longjmp if you prefer.
>
> But how can GDB reliably use this?  We don't know whether the unwind
> information returns to longjmp's call site or setjmp's.  And we might
> have to single step a bit to get to the point where it returns to the
> setjmp.  So as far as I'm concerned we might as well just single step
> until we're out of longjmp.

Sorry --- I'm losing track of the original goal here.  Forget I wrote
that.  I think stepping through longjmp is fine.

Independently, I'm excited about having groovy CFI for longjmp.



More information about the Gdb mailing list