This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
Re: backtrace/1545: can't backtrace through signal handler
- From: Mark Kettenis <kettenis at chello dot nl>
- To: nobody at sources dot redhat dot com
- Cc: gdb-prs at sources dot redhat dot com,
- Date: 6 Feb 2004 19:58:00 -0000
- Subject: Re: backtrace/1545: can't backtrace through signal handler
- Reply-to: Mark Kettenis <kettenis at chello dot nl>
The following reply was made to PR backtrace/1545; it has been noted by GNATS.
From: Mark Kettenis <kettenis@chello.nl>
To: gdb-gnats@sources.redhat.com
Cc: carlton@kealia.com
Subject: Re: backtrace/1545: can't backtrace through signal handler
Date: Fri, 6 Feb 2004 20:53:12 +0100 (CET)
Hi David,
It looks like I introduced a bug when I converted the i386 target to
use the new frame stuff. Adding an offset of 20 twice seems very
suspicious. Can you test the attached patch?
This code path is only taken if you set the SA_SIGINFO flag is set,
which isn't tested by our current testsuite.
Mark
Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* i386-linux-tdep.c (i386_linux_sigcontext_addr): Fix calculation
of UCONTEXT_ADDR.
Index: i386-linux-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/i386-linux-tdep.c,v
retrieving revision 1.34
diff -u -p -r1.34 i386-linux-tdep.c
--- i386-linux-tdep.c 15 Nov 2003 14:02:57 -0000 1.34
+++ i386-linux-tdep.c 6 Feb 2004 19:44:52 -0000
@@ -274,7 +274,7 @@ i386_linux_sigcontext_addr (struct frame
pointer to the user context is passed as the third argument
to the signal handler. */
read_memory (sp + 8, buf, 4);
- ucontext_addr = extract_unsigned_integer (buf, 4) + 20;
+ ucontext_addr = extract_unsigned_integer (buf, 4);
return ucontext_addr + I386_LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
}