This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH] Fix PR backtrace/1545
- From: Mark Kettenis <kettenis at chello dot nl>
- To: gdb-patches at sources dot redhat dot com
- Date: Fri, 6 Feb 2004 21:25:04 +0100 (CET)
- Subject: [PATCH] Fix PR backtrace/1545
Thanks to David for discovering this bug and testing the fix.
Committed,
Mark
Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* i386-linux-tdep.c (i386_linux_sigcontext_addr): Fix calculation
of UCONTEXT_ADDR. Fixes PR backtrace/1545.
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 20:24:08 -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;
}