aboutsummaryrefslogtreecommitdiff
path: root/gdb/config
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2000-03-04 23:37:33 +0000
committerMark Kettenis <kettenis@gnu.org>2000-03-04 23:37:33 +0000
commit45a816d93ec86fb4aec161713ec6b3deaac68872 (patch)
tree84a798d968969f459c8976cc4e8cb3f349888119 /gdb/config
parent8ae7f924f36810814ec82c523bfc938c26b78c00 (diff)
downloadgdb-45a816d93ec86fb4aec161713ec6b3deaac68872.zip
gdb-45a816d93ec86fb4aec161713ec6b3deaac68872.tar.gz
gdb-45a816d93ec86fb4aec161713ec6b3deaac68872.tar.bz2
2000-03-04 Mark Kettenis <kettenis@gnu.org>
Fix support for Linux/i386 signal trampolines. The old approach didn't work for Linux 2.2 and beyond, and didn't work with recent versions of the GNU C library. * i386-tdep.c (LINUX_RT_SIGTRAMP_INSN0, LINUX_RT_SIGTRAMP_OFFSET0, LINUX_RT_SIGTRAMP_INSN1, LINUX_RT_SIGTRAMP_OFFSET1): New defines. (linux_rt_sigtramp_code): New variable. (LINUX_RT_SIGTRAMP_LEN): New define. (i386_linux_rt_sigtramp_start): New function. Detect start of signal trampolines for RT signals. (i386_linux_sigtramp): Removed. (i386_linux_in_sigtramp): New function. (i386_linux_sigcontext_addr): New function. Recognize the names of the signal tranmpolines used by recent versions of the GNU C library, and add support for RT signals. (LINUX_SIGCONTEXT_PC_OFFSET, LINUX_SIGCONTEXT_SP_OFFSET): New defines. Moved here from config/i386/tm-linux.h. (i386_linux_sigtramp_saved_pc, i386_linux_sigtramp_saved_sp): Reimplement in terms of i386_linux_sigcontext_addr. * config/i386/tm-linux.h (LINUX_SIGCONTEXT_SIZE): Removed. (LINUX_SIGCONTEXT_PC_OFFSET, LINUX_SIGCONTEXT_SP_OFFSET): Moved to i386-tdep.c. (IN_SIGTRAMP): Redefine to call i386_linux_in_sigtramp.
Diffstat (limited to 'gdb/config')
-rw-r--r--gdb/config/i386/tm-linux.h18
1 files changed, 4 insertions, 14 deletions
diff --git a/gdb/config/i386/tm-linux.h b/gdb/config/i386/tm-linux.h
index a043489..391d5c0 100644
--- a/gdb/config/i386/tm-linux.h
+++ b/gdb/config/i386/tm-linux.h
@@ -30,15 +30,6 @@
#include "i386/tm-i386.h"
#include "tm-linux.h"
-/* Size of sigcontext, from <asm/sigcontext.h>. */
-#define LINUX_SIGCONTEXT_SIZE (88)
-
-/* Offset to saved PC in sigcontext, from <asm/sigcontext.h>. */
-#define LINUX_SIGCONTEXT_PC_OFFSET (56)
-
-/* Offset to saved SP in sigcontext, from <asm/sigcontext.h>. */
-#define LINUX_SIGCONTEXT_SP_OFFSET (28)
-
#define LOW_RETURN_REGNUM 0 /* holds low four bytes of result */
#define HIGH_RETURN_REGNUM 2 /* holds high four bytes of result */
@@ -108,15 +99,14 @@ extern int i387_store_floating (PTR addr, int len, long double val);
order to support backtracing through calls to signal handlers. */
#define I386_LINUX_SIGTRAMP
-#define IN_SIGTRAMP(pc, name) ((name) == NULL && i386_linux_sigtramp (pc))
-
-extern int i386_linux_sigtramp PARAMS ((CORE_ADDR));
+#define IN_SIGTRAMP(pc, name) i386_linux_in_sigtramp (pc, name)
+extern int i386_linux_in_sigtramp (CORE_ADDR, char *);
/* We need our own version of sigtramp_saved_pc to get the saved PC in
a sigtramp routine. */
#define sigtramp_saved_pc i386_linux_sigtramp_saved_pc
-extern CORE_ADDR i386_linux_sigtramp_saved_pc PARAMS ((struct frame_info *));
+extern CORE_ADDR i386_linux_sigtramp_saved_pc (struct frame_info *);
/* Signal trampolines don't have a meaningful frame. As in tm-i386.h,
the frame pointer value we use is actually the frame pointer of the
@@ -162,7 +152,7 @@ extern CORE_ADDR i386_linux_sigtramp_saved_pc PARAMS ((struct frame_info *));
? read_memory_integer (i386_linux_sigtramp_saved_sp ((FRAME)->next), 4) \
: read_memory_integer ((FRAME)->frame + 4, 4)))
-extern CORE_ADDR i386_linux_sigtramp_saved_sp PARAMS ((struct frame_info *));
+extern CORE_ADDR i386_linux_sigtramp_saved_sp (struct frame_info *);
/* When we call a function in a shared library, and the PLT sends us
into the dynamic linker to find the function's real address, we