This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Stepping over longjmp presumably broken for glibc
> Date: Thu, 29 Dec 2005 21:38:31 -0500
> From: Daniel Jacobowitz <drow@false.org>
>
> On Mon, Dec 26, 2005 at 08:24:30PM -0800, Jim Blandy wrote:
> > Here's my (non-qualifying because it relies on help from the runtime)
> > idea: can't we use Dwarf CFI here? That is, treat longjmp as a weird
> > function whose CFI indicates that it unwinds to the setjmp. The
> > DW_CFA_val_expression operator, new in the released Dwarf 3 spec,
> > allows CFI to use an arbitrary expression to compute the saved value
> > of the register; we can apply that to the return address column just
> > as well as anything else. In the case Daniel described, the
> > expression would use DW_OP_xor (probably the first use ever of that
> > opcode!).
>
> How would you distinguish a longjmp with CFI that returns to caller
> from a longjmp with CFI that returns to setjmp?
Huh? longjmp() always returns to a context saved by a setjmp().
Mark