This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Re: longjmp handling vs. glibc LD_POINTER_GUARD problems
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: pedro at codesourcery dot com (Pedro Alves)
- Cc: gdb-patches at sourceware dot org, dan at codesourcery dot com (Daniel Jacobowitz)
- Date: Thu, 22 May 2008 02:14:25 +0200 (CEST)
- Subject: Re: [patch] Re: longjmp handling vs. glibc LD_POINTER_GUARD problems
Pedro Alves wrote:
> Seeing this, I was thinking of:
> - recording the longjmp frame when the longjmp breakpoint is hit
> - single-step until the longjmp frame is gone (going to return to setjmp --
> SP/FP changing)
> - single-step until this new current frame is gone.
During the time longjmp reloads the registers, I now don't think
we can trust the frame at all; this is even worse that during
regular function epilogues.
I think one heuristics might be that as soon as we notice odd
things to happen to the frame, we step until we reach the end
of the current *function* (i.e. look only at the PC).
> But, x86 doesn't show any promise on that... The first time
> we stop seeing the longjmp frame on the frame stack is much
> earlier than the exit of longjmp:
>
> #0 0xf7e201d8 in ?? () from /lib32/libc.so.6
> #1 0x00000001 in ?? ()
So what's happening there? Is this some unrelated unwinder
failure?
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com