From 0cfa9be02807f28ae2e76743cc387bb302695431 Mon Sep 17 00:00:00 2001 From: Rob Savoye Date: Wed, 7 Dec 1994 21:47:22 +0000 Subject: [PATCH] * hppa-tdep.c: Use GDB_TARGET_IS_PA_ELF so SOM target support will stop being linked in. * config/pa/tm-hppap.h: New file. Set GDB_TARGET_IS_PA_ELF, otherwise it looks like BSD-ELF. --- gdb/config/pa/hppapro.mt | 7 ++----- gdb/config/pa/tm-hppap.h | 50 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 5 deletions(-) create mode 100644 gdb/config/pa/tm-hppap.h diff --git a/gdb/config/pa/hppapro.mt b/gdb/config/pa/hppapro.mt index 6216a19..4f012e4 100644 --- a/gdb/config/pa/hppapro.mt +++ b/gdb/config/pa/hppapro.mt @@ -1,10 +1,7 @@ -# Target: Motorola rom68k boot monitor (from Integrated Systems) -# Target: Motorola bug monitor. -# These defines should give you a gdb running on anything that will be able to -# communicate with a m68k based debug monitor. Communications +# Communicate with a PA based debug monitor. Communications # is facilitated via either a serial line, or a TCP or TELNET connection to # a serial line on a terminal multiplexor. TDEPFILES= hppa-pinsn.o hppa-tdep.o REMOTE_O=dcache.o remote.o remote-utils.o op50-rom.o w89k-rom.o monitor.o XDEPFILES= ser-tcp.o -TM_FILE= tm-hppab.h +TM_FILE= tm-hppap.h diff --git a/gdb/config/pa/tm-hppap.h b/gdb/config/pa/tm-hppap.h new file mode 100644 index 0000000..97fb94a --- /dev/null +++ b/gdb/config/pa/tm-hppap.h @@ -0,0 +1,50 @@ +/* Parameters for execution on an HP PA-RISC machine running a ROM monitor, + for GDB. This is based on tm-hppab.h. + Contributed by the Center for Software Science at the + University of Utah (pa-gdb-bugs@cs.utah.edu). */ + +/* For BSD: + + The signal context structure pointer is always saved at the base + of the frame + 0x4. + + We get the PC & SP directly from the sigcontext structure itself. + For other registers we have to dive in a little deeper: + + The hardware save state pointer is at offset 0x10 within the + signal context structure. + + Within the hardware save state, registers are found in the same order + as the register numbers in GDB. */ + +#define FRAME_SAVED_PC_IN_SIGTRAMP(FRAME, TMP) \ +{ \ + *(TMP) = read_memory_integer ((FRAME)->frame + 0x4, 4); \ + *(TMP) = read_memory_integer (*(TMP) + 0x18, 4); \ +} + +#define FRAME_BASE_BEFORE_SIGTRAMP(FRAME, TMP) \ +{ \ + *(TMP) = read_memory_integer ((FRAME)->frame + 0x4, 4); \ + *(TMP) = read_memory_integer (*(TMP) + 0x8, 4); \ +} + +#define FRAME_FIND_SAVED_REGS_IN_SIGTRAMP(FRAME, FSR) \ +{ \ + int i; \ + CORE_ADDR TMP; \ + TMP = read_memory_integer ((FRAME)->frame + 0x4, 4); \ + TMP = read_memory_integer (TMP + 0x10, 4); \ + for (i = 0; i < NUM_REGS; i++) \ + { \ + if (i == SP_REGNUM) \ + (FSR)->regs[SP_REGNUM] = read_memory_integer (TMP + SP_REGNUM * 4, 4); \ + else \ + (FSR)->regs[i] = TMP + i * 4; \ + } \ +} + +/* It's mostly just the common stuff. */ +#include "pa/tm-hppa.h" + +#define GDB_TARGET_IS_PA_ELF -- 2.7.4