diff options
author | obrien <obrien@FreeBSD.org> | 2004-01-26 09:18:47 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2004-01-26 09:18:47 +0000 |
commit | 0cf462d04bb54357751313450981eadc91af238e (patch) | |
tree | 30c99ae838d4e6cd6f915e9aa7cced2b02a717a1 /gnu | |
parent | 5ce55a17ee0752369a349135854f1d8ad77f93e1 (diff) | |
download | FreeBSD-src-0cf462d04bb54357751313450981eadc91af238e.zip FreeBSD-src-0cf462d04bb54357751313450981eadc91af238e.tar.gz |
Fix problem where kgdb misses trap frames.
Reported by: iedowse
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/usr.bin/binutils/gdb/Makefile | 12 | ||||
-rw-r--r-- | gnu/usr.bin/binutils/gdb/fbsd-kgdb-alpha.h | 3 | ||||
-rw-r--r-- | gnu/usr.bin/binutils/gdb/fbsd-kgdb-arm.h | 2 | ||||
-rw-r--r-- | gnu/usr.bin/binutils/gdb/fbsd-kgdb-i386.h | 22 | ||||
-rw-r--r-- | gnu/usr.bin/binutils/gdb/fbsd-kgdb-ia64.h | 2 | ||||
-rw-r--r-- | gnu/usr.bin/binutils/gdb/fbsd-kgdb-powerpc.h | 2 | ||||
-rw-r--r-- | gnu/usr.bin/binutils/gdb/fbsd-kgdb-sparc64.h | 3 |
7 files changed, 24 insertions, 22 deletions
diff --git a/gnu/usr.bin/binutils/gdb/Makefile b/gnu/usr.bin/binutils/gdb/Makefile index 20d3c09..a7e0878 100644 --- a/gnu/usr.bin/binutils/gdb/Makefile +++ b/gnu/usr.bin/binutils/gdb/Makefile @@ -7,6 +7,7 @@ GDBDIR= ${.CURDIR}/../../../../contrib/gdb .PATH: ${GDBDIR}/gdb ${GDBDIR}/gdb/cli ${GDBDIR}/gdb/mi .PATH: ${SRCDIR}/opcodes ${SRCDIR}/binutils +# For FSF GDB files, use their CPU (arch) name; for our files use ours. .if ${TARGET_ARCH} == "sparc64" GDB_CPU= sparc .elif ${TARGET_ARCH} == "amd64" @@ -118,19 +119,18 @@ init.c: ${XSRCS} .PRECIOUS: init.c -nm.h: - echo '#include "${GDB_CPU}/nm-fbsd.h"' >${.TARGET} - echo '#include "fbsd-kgdb.h"' >>${.TARGET} +tm.h: + ln -sf ${.CURDIR}/fbsd-kgdb-${TARGET_ARCH}.h ${.TARGET} -.for H in tm-fbsd xm-${GDB_CPU} +.for H in nm-fbsd xm-${GDB_CPU} ${H:C/-.*$//}.h: ln -sf \ - ${.CURDIR}/../../../../contrib/gdb/gdb/config/${GDB_CPU}/${H}.h \ + ${GDBDIR}/gdb/config/${GDB_CPU}/${H}.h \ ${.TARGET} .endfor GDB_VERSION= "5.2.1 (FreeBSD)" -gdbversion.c: +gdbversion.c: Makefile @echo '#include "version.h"' > ${.TARGET} @echo 'const char version[] = ${GDB_VERSION};' >>${.TARGET} @echo 'const char host_name[] = "${MACHINE_ARCH}-undermydesk-freebsd";' >>${.TARGET} diff --git a/gnu/usr.bin/binutils/gdb/fbsd-kgdb-alpha.h b/gnu/usr.bin/binutils/gdb/fbsd-kgdb-alpha.h index 90dbc14..6b5cf20 100644 --- a/gnu/usr.bin/binutils/gdb/fbsd-kgdb-alpha.h +++ b/gnu/usr.bin/binutils/gdb/fbsd-kgdb-alpha.h @@ -3,6 +3,9 @@ #ifndef FBSD_KGDB_ALPHA_H #define FBSD_KGDB_ALPHA_H +#include "alpha/tm-fbsd.h" +#include "fbsd-kgdb.h" + #undef FRAME_SAVED_PC #define FRAME_SAVED_PC(FRAME) \ (kernel_debugging ? fbsd_kern_frame_saved_pc(FRAME) : \ diff --git a/gnu/usr.bin/binutils/gdb/fbsd-kgdb-arm.h b/gnu/usr.bin/binutils/gdb/fbsd-kgdb-arm.h index 1d7afed..5896125 100644 --- a/gnu/usr.bin/binutils/gdb/fbsd-kgdb-arm.h +++ b/gnu/usr.bin/binutils/gdb/fbsd-kgdb-arm.h @@ -3,4 +3,6 @@ #ifndef FBSD_KGDB_ARM_H #define FBSD_KGDB_ARM_H +#include "fbsd-kgdb.h" + #endif /* FBSD_KGDB_ARM_H */ diff --git a/gnu/usr.bin/binutils/gdb/fbsd-kgdb-i386.h b/gnu/usr.bin/binutils/gdb/fbsd-kgdb-i386.h index a2d655d..3196316 100644 --- a/gnu/usr.bin/binutils/gdb/fbsd-kgdb-i386.h +++ b/gnu/usr.bin/binutils/gdb/fbsd-kgdb-i386.h @@ -3,29 +3,19 @@ #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. */ +#include "i386/tm-fbsd.h" +#include "fbsd-kgdb.h" -#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)) + ? fbsd_kern_frame_saved_pc (FRAME) \ + : i386bsd_frame_saved_pc (FRAME)) +extern CORE_ADDR fbsd_kern_frame_saved_pc(struct frame_info *fr); /* Offset to saved PC in sigcontext, from <sys/signal.h>. */ +/* DEO:XXX where is this really from??? */ #define SIGCONTEXT_PC_OFFSET 20 #endif /* FBSD_KGDB_I386_H */ diff --git a/gnu/usr.bin/binutils/gdb/fbsd-kgdb-ia64.h b/gnu/usr.bin/binutils/gdb/fbsd-kgdb-ia64.h index 3a79575..8f198fd 100644 --- a/gnu/usr.bin/binutils/gdb/fbsd-kgdb-ia64.h +++ b/gnu/usr.bin/binutils/gdb/fbsd-kgdb-ia64.h @@ -3,4 +3,6 @@ #ifndef FBSD_KGDB_IA64_H #define FBSD_KGDB_IA64_H +#include "fbsd-kgdb.h" + #endif /* FBSD_KGDB_IA64_H */ diff --git a/gnu/usr.bin/binutils/gdb/fbsd-kgdb-powerpc.h b/gnu/usr.bin/binutils/gdb/fbsd-kgdb-powerpc.h index 64b2bc7..c6821e1 100644 --- a/gnu/usr.bin/binutils/gdb/fbsd-kgdb-powerpc.h +++ b/gnu/usr.bin/binutils/gdb/fbsd-kgdb-powerpc.h @@ -3,4 +3,6 @@ #ifndef FBSD_KGDB_POWERPC_H #define FBSD_KGDB_POWERPC_H +#include "fbsd-kgdb.h" + #endif /* FBSD_KGDB_POWERPC_H */ diff --git a/gnu/usr.bin/binutils/gdb/fbsd-kgdb-sparc64.h b/gnu/usr.bin/binutils/gdb/fbsd-kgdb-sparc64.h index 4b37697..56fd480 100644 --- a/gnu/usr.bin/binutils/gdb/fbsd-kgdb-sparc64.h +++ b/gnu/usr.bin/binutils/gdb/fbsd-kgdb-sparc64.h @@ -3,4 +3,7 @@ #ifndef FBSD_KGDB_SPARC64_H #define FBSD_KGDB_SPARC64_H +#include "sparc/tm-fbsd.h" +#include "fbsd-kgdb.h" + #endif /* FBSD_KGDB_SPARC64_H */ |