Fix problem where kgdb misses trap frames.

Reported by:	iedowse
This commit is contained in:
David E. O'Brien 2004-01-26 09:18:47 +00:00
parent 014256a1e7
commit bd064b9335
7 changed files with 24 additions and 22 deletions

View File

@ -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}

View File

@ -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) : \

View File

@ -3,4 +3,6 @@
#ifndef FBSD_KGDB_ARM_H
#define FBSD_KGDB_ARM_H
#include "fbsd-kgdb.h"
#endif /* FBSD_KGDB_ARM_H */

View File

@ -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 */

View File

@ -3,4 +3,6 @@
#ifndef FBSD_KGDB_IA64_H
#define FBSD_KGDB_IA64_H
#include "fbsd-kgdb.h"
#endif /* FBSD_KGDB_IA64_H */

View File

@ -3,4 +3,6 @@
#ifndef FBSD_KGDB_POWERPC_H
#define FBSD_KGDB_POWERPC_H
#include "fbsd-kgdb.h"
#endif /* FBSD_KGDB_POWERPC_H */

View File

@ -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 */