diff options
author | Jeff Law <law@redhat.com> | 1994-03-04 17:54:41 +0000 |
---|---|---|
committer | Jeff Law <law@redhat.com> | 1994-03-04 17:54:41 +0000 |
commit | 70e43abe7c41fcf6b7682aab3c6fd9716c255dc2 (patch) | |
tree | 78c6175e7726575856ce9ab20d66ec874c58d389 /gdb/config | |
parent | 7b5f6e48f11614a3937aa3d327c945cd677976f4 (diff) | |
download | gdb-70e43abe7c41fcf6b7682aab3c6fd9716c255dc2.zip gdb-70e43abe7c41fcf6b7682aab3c6fd9716c255dc2.tar.gz gdb-70e43abe7c41fcf6b7682aab3c6fd9716c255dc2.tar.bz2 |
* hppa-tdep.c (pc_in_linker_stub): Move decl to beginning of file.
(pc_in_interrupt_handler): New function. Also add PARAM decl.
(find_proc_framesize): Deal with HPUX setting SAVE_SP bit for
signal trampoline and interrupt routines.
(frame_saved_pc): Handle signal trampolines and interrupt routines.
(frame_chain, frame_chain_valid): Likewise.
(hppa_frame_find_saved_regs): Likewise. Also deal with special
saved regs convention for SP.
* tm-hppa[bho].h: FRAME_FIND_SAVED_PC_IN_SIGTRAMP): Define.
(FRAME_BASE_BEFORE_SIGTRAMP): Define.
(FRAME_FIND_SAVED_REGS_IN_SIGTRAMP): Define.
* tm-hppah.h (IN_SIGTRAMP): Define.
Diffstat (limited to 'gdb/config')
-rw-r--r-- | gdb/config/pa/tm-hppab.h | 43 | ||||
-rw-r--r-- | gdb/config/pa/tm-hppao.h | 46 |
2 files changed, 86 insertions, 3 deletions
diff --git a/gdb/config/pa/tm-hppab.h b/gdb/config/pa/tm-hppab.h index 73ff419..1cd438d 100644 --- a/gdb/config/pa/tm-hppab.h +++ b/gdb/config/pa/tm-hppab.h @@ -2,5 +2,46 @@ Contributed by the Center for Software Science at the University of Utah (pa-gdb-bugs@cs.utah.edu). */ -/* It's all just the common stuff. */ +/* 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" diff --git a/gdb/config/pa/tm-hppao.h b/gdb/config/pa/tm-hppao.h index 9697a2c..fd0d25c 100644 --- a/gdb/config/pa/tm-hppao.h +++ b/gdb/config/pa/tm-hppao.h @@ -2,8 +2,50 @@ Contributed by the Center for Software Science at the University of Utah (pa-gdb-bugs@cs.utah.edu). */ -/* It's all just the common stuff. */ -#include "pa/tm-hppa.h" +/* For OSF1 (Should be close if not identical to BSD, but I haven't + tested it yet): + + 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; \ + } \ +} /* OSF1 needs an extra trap. I assume for the emulator startup (?!?) */ #define START_INFERIOR_TRAPS_EXPECTED 3 + +/* It's mostly just the common stuff. */ +#include "pa/tm-hppa.h" |