aboutsummaryrefslogtreecommitdiff
path: root/gdb/config
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2001-07-13 18:27:21 +0000
committerMark Kettenis <kettenis@gnu.org>2001-07-13 18:27:21 +0000
commitb724791951f3af34758ac7ea521f5967b3f5e0d8 (patch)
treeb5921d0acb28b33f384c2620deba0d91e72d60c4 /gdb/config
parentd1bacddc243a8bfd9d0a70eeb7e8e5c86dc1e3ee (diff)
downloadgdb-b724791951f3af34758ac7ea521f5967b3f5e0d8.zip
gdb-b724791951f3af34758ac7ea521f5967b3f5e0d8.tar.gz
gdb-b724791951f3af34758ac7ea521f5967b3f5e0d8.tar.bz2
* i386bsd-nat.c: Include <signal.h>, <stddef.h> and
<sys/sysctl.h>. (store_inferior_registers): Wrap long line. (i386bsd_dr_get_status): Fix typo in comment. (_initialize_i386bsd_nat): New function. * i386bsd-tdep.c: New file. * config/i386/tm-fbsd.h (IN_SIGTRAMP): New define. (i386bsd_in_sigtramp): New prototype. (SIGTRAMP_START, SIGTRAMP_END): Redefine in terms... (i386bsd_sigtramp_start, i386bsd_sigtramp_end): ...these new (external) variables. (SIGCONTEXT_PC_OFFSET): Removed. (FRAME_SAVED_PC): New define. (i386bsd_frame_saved_pc): New function. * config/i386/fbsd.mt (TDEPFILES): Add i386bsd-tdep.o.
Diffstat (limited to 'gdb/config')
-rw-r--r--gdb/config/i386/fbsd.mt2
-rw-r--r--gdb/config/i386/tm-fbsd.h28
2 files changed, 20 insertions, 10 deletions
diff --git a/gdb/config/i386/fbsd.mt b/gdb/config/i386/fbsd.mt
index aff2a15..7a95e00 100644
--- a/gdb/config/i386/fbsd.mt
+++ b/gdb/config/i386/fbsd.mt
@@ -1,3 +1,3 @@
# Target: Intel 386 running FreeBSD
-TDEPFILES= i386-tdep.o i387-tdep.o
+TDEPFILES= i386-tdep.o i387-tdep.o i386bsd-tdep.o
TM_FILE= tm-fbsd.h
diff --git a/gdb/config/i386/tm-fbsd.h b/gdb/config/i386/tm-fbsd.h
index 35d7699..f8f4889 100644
--- a/gdb/config/i386/tm-fbsd.h
+++ b/gdb/config/i386/tm-fbsd.h
@@ -1,5 +1,5 @@
/* Target-dependent definitions for FreeBSD/i386.
- Copyright 1997, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of GDB.
@@ -40,21 +40,31 @@
/* Figure out where the longjmp will land. Store the address that
longjmp will jump to in *ADDR, and return non-zero if successful. */
-extern int get_longjmp_target (CORE_ADDR *addr);
#define GET_LONGJMP_TARGET(addr) get_longjmp_target (addr)
+extern int get_longjmp_target (CORE_ADDR *addr);
/* Support for signal handlers. */
-/* The sigtramp is above the user stack and immediately below
- the user area. Using constants here allows for cross debugging.
- These are tested for FreeBSD 3.4. */
+#define IN_SIGTRAMP(pc, name) i386bsd_in_sigtramp (pc, name)
+extern int i386bsd_in_sigtramp (CORE_ADDR pc, char *name);
+
+/* These defines allow the recognition of sigtramps as a function name
+ <sigtramp>.
+
+ FIXME: kettenis/2001-07-13: These should be added to the target
+ vector and turned into functions when we go "multi-arch". */
+
+#define SIGTRAMP_START(pc) i386bsd_sigtramp_start
+#define SIGTRAMP_END(pc) i386bsd_sigtramp_end
+extern CORE_ADDR i386bsd_sigtramp_start;
+extern CORE_ADDR i386bsd_sigtramp_end;
-#define SIGTRAMP_START(pc) 0xbfbfdf20
-#define SIGTRAMP_END(pc) 0xbfbfdff0
+/* Override FRAME_SAVED_PC to enable the recognition of signal handlers. */
-/* Offset to saved PC in sigcontext, from <sys/signal.h>. */
-#define SIGCONTEXT_PC_OFFSET 20
+#undef FRAME_SAVED_PC
+#define FRAME_SAVED_PC(frame) i386bsd_frame_saved_pc (frame)
+extern CORE_ADDR i386bsd_frame_saved_pc (struct frame_info *frame);
/* Shared library support. */