From b724791951f3af34758ac7ea521f5967b3f5e0d8 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Fri, 13 Jul 2001 18:27:21 +0000 Subject: * i386bsd-nat.c: Include , and . (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. --- gdb/config/i386/fbsd.mt | 2 +- gdb/config/i386/tm-fbsd.h | 28 +++++++++++++++++++--------- 2 files changed, 20 insertions(+), 10 deletions(-) (limited to 'gdb/config/i386') 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 + . + + 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 . */ -#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. */ -- cgit v1.1