summaryrefslogtreecommitdiffstats
path: root/gnu
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2002-07-10 07:48:45 +0000
committerobrien <obrien@FreeBSD.org>2002-07-10 07:48:45 +0000
commitce3a73d11ca12064c522b8e10bfd778249556df9 (patch)
treeba900fbdc64694b7036d3b13064116ec7a8003ea /gnu
parentd760a3490fc1b670b97637f7331c337e02402555 (diff)
downloadFreeBSD-src-ce3a73d11ca12064c522b8e10bfd778249556df9.zip
FreeBSD-src-ce3a73d11ca12064c522b8e10bfd778249556df9.tar.gz
Make our i386 hacks in a less vendor file disturbing manner.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/binutils/gdb/fbsd-kgdb-i386.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/gnu/usr.bin/binutils/gdb/fbsd-kgdb-i386.h b/gnu/usr.bin/binutils/gdb/fbsd-kgdb-i386.h
index 45fae7d..044b71f 100644
--- a/gnu/usr.bin/binutils/gdb/fbsd-kgdb-i386.h
+++ b/gnu/usr.bin/binutils/gdb/fbsd-kgdb-i386.h
@@ -3,4 +3,29 @@
#ifndef FBSD_KGDB_I386_H
#define FBSD_KGDB_I386_H
+/* On FreeBSD, sigtramp has size 0x18 and is immediately below the
+ ps_strings struct which has size 0x10 and is at the top of the
+ user stack. */
+
+#undef SIGTRAMP_START
+#define SIGTRAMP_START(pc) 0xbfbfdfd8
+#undef SIGTRAMP_END
+#define SIGTRAMP_END(pc) 0xbfbfdff0
+
+
+/* Override FRAME_SAVED_PC to enable the recognition of signal handlers. */
+
+extern CORE_ADDR fbsd_kern_frame_saved_pc(struct frame_info *fr);
+
+#undef FRAME_SAVED_PC
+#define FRAME_SAVED_PC(FRAME) \
+ (kernel_debugging \
+ ? fbsd_kern_frame_saved_pc(FRAME) : \
+ (FRAME)->signal_handler_caller \
+ ? sigtramp_saved_pc (FRAME) \
+ : read_memory_integer ((FRAME)->frame + 4, 4))
+
+/* Offset to saved PC in sigcontext, from <sys/signal.h>. */
+#define SIGCONTEXT_PC_OFFSET 20
+
#endif /* FBSD_KGDB_I386_H */
OpenPOWER on IntegriCloud