diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2002-05-21 16:32:13 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2002-05-21 16:32:13 +0000 |
commit | 176c085a381e99c95845250e221e60744c3a1ec4 (patch) | |
tree | 7bcaa0bf6fc64b2cfbf652048a22f60177cdeed5 /gnu | |
parent | c381a6f4a50ec9730de45076f46455375486140e (diff) |
Support for kcore on alpha.
Based on a diff from Mattias Amnefelt <mattiasa at e.kth.se>, which was in
turn based on code in NetBSD, but I rewrote all the relevant pieces to have
less alignment errors and follow gdb code style.
fgs@ ok.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/usr.bin/binutils/gdb/alphaobsd-nat.c | 18 | ||||
-rw-r--r-- | gnu/usr.bin/binutils/gdb/config/alpha/nm-obsd.h | 3 | ||||
-rw-r--r-- | gnu/usr.bin/binutils/gdb/config/alpha/obsd.mh | 4 | ||||
-rw-r--r-- | gnu/usr.bin/binutils/gdb/config/alpha/tm-alpha.h | 1 |
4 files changed, 24 insertions, 2 deletions
diff --git a/gnu/usr.bin/binutils/gdb/alphaobsd-nat.c b/gnu/usr.bin/binutils/gdb/alphaobsd-nat.c index 734de850fa2..7136c0101f1 100644 --- a/gnu/usr.bin/binutils/gdb/alphaobsd-nat.c +++ b/gnu/usr.bin/binutils/gdb/alphaobsd-nat.c @@ -267,6 +267,24 @@ child_resume (pid, step, signal) perror_with_name ("ptrace"); } +#ifdef FETCH_KCORE_REGISTERS +void +fetch_kcore_registers (pcbp) + struct pcb *pcbp; +{ + int i; + + registers_changed (); + + supply_register (SP_REGNUM, &pcbp->pcb_hw.apcb_ksp); /* sp */ + supply_register (PC_REGNUM, &pcbp->pcb_context[7]); /* pc */ + + for (i = 0; i < 7; i++) /* s0 - s6 */ + supply_register (S0_REGNUM + i, &pcbp->pcb_context[i]); +} +#endif /* FETCH_KCORE_REGISTERS */ + + /* Register that we are able to handle alpha core file formats. */ static struct core_fns alpha_core_fns = diff --git a/gnu/usr.bin/binutils/gdb/config/alpha/nm-obsd.h b/gnu/usr.bin/binutils/gdb/config/alpha/nm-obsd.h index 0c31c103662..d5498bde3e0 100644 --- a/gnu/usr.bin/binutils/gdb/config/alpha/nm-obsd.h +++ b/gnu/usr.bin/binutils/gdb/config/alpha/nm-obsd.h @@ -43,3 +43,6 @@ get_longjmp_target PARAMS ((CORE_ADDR *)); #define FETCH_INFERIOR_REGISTERS #define CHILD_RESUME + +/* This enables functions needed by kcore-nbsd.c */ +#define FETCH_KCORE_REGISTERS diff --git a/gnu/usr.bin/binutils/gdb/config/alpha/obsd.mh b/gnu/usr.bin/binutils/gdb/config/alpha/obsd.mh index dd128776a21..7e6923e96b4 100644 --- a/gnu/usr.bin/binutils/gdb/config/alpha/obsd.mh +++ b/gnu/usr.bin/binutils/gdb/config/alpha/obsd.mh @@ -2,7 +2,7 @@ XDEPFILES= XM_FILE= xm-alphaobsd.h NAT_FILE= nm-obsd.h -NATDEPFILES= infptrace.o inftarg.o corelow.o alphaobsd-nat.o fork-child.o - +NATDEPFILES= infptrace.o inftarg.o corelow.o kcore-nbsd.o alphaobsd-nat.o fork-child.o +NAT_CLIBS= -lkvm MMALLOC = MMALLOC_CFLAGS = -DNO_MMALLOC diff --git a/gnu/usr.bin/binutils/gdb/config/alpha/tm-alpha.h b/gnu/usr.bin/binutils/gdb/config/alpha/tm-alpha.h index a8dcde4358a..c59e3d851b4 100644 --- a/gnu/usr.bin/binutils/gdb/config/alpha/tm-alpha.h +++ b/gnu/usr.bin/binutils/gdb/config/alpha/tm-alpha.h @@ -128,6 +128,7 @@ alpha_saved_pc_after_call PARAMS ((struct frame_info *)); #define V0_REGNUM 0 /* Function integer return value */ #define T7_REGNUM 8 /* Return address register for OSF/1 __add* */ +#define S0_REGNUM 9 /* First callee-saved register */ #define GCC_FP_REGNUM 15 /* Used by gcc as frame register */ #define A0_REGNUM 16 /* Loc of first arg during a subr call */ #define T9_REGNUM 23 /* Return address register for OSF/1 __div* */ |