Commit | Line | Data |
---|---|---|
6bfd168c JL |
1 | /* Parameters for execution on an HP PA-RISC machine running OSF1, for GDB. |
2 | Contributed by the Center for Software Science at the | |
3 | University of Utah (pa-gdb-bugs@cs.utah.edu). */ | |
4 | ||
70e43abe JL |
5 | /* For OSF1 (Should be close if not identical to BSD, but I haven't |
6 | tested it yet): | |
7 | ||
8 | The signal context structure pointer is always saved at the base | |
9 | of the frame + 0x4. | |
10 | ||
11 | We get the PC & SP directly from the sigcontext structure itself. | |
12 | For other registers we have to dive in a little deeper: | |
13 | ||
14 | The hardware save state pointer is at offset 0x10 within the | |
15 | signal context structure. | |
16 | ||
17 | Within the hardware save state, registers are found in the same order | |
18 | as the register numbers in GDB. */ | |
19 | ||
20 | #define FRAME_SAVED_PC_IN_SIGTRAMP(FRAME, TMP) \ | |
21 | { \ | |
22 | *(TMP) = read_memory_integer ((FRAME)->frame + 0x4, 4); \ | |
23 | *(TMP) = read_memory_integer (*(TMP) + 0x18, 4); \ | |
24 | } | |
25 | ||
26 | #define FRAME_BASE_BEFORE_SIGTRAMP(FRAME, TMP) \ | |
27 | { \ | |
28 | *(TMP) = read_memory_integer ((FRAME)->frame + 0x4, 4); \ | |
29 | *(TMP) = read_memory_integer (*(TMP) + 0x8, 4); \ | |
30 | } | |
31 | ||
32 | #define FRAME_FIND_SAVED_REGS_IN_SIGTRAMP(FRAME, FSR) \ | |
33 | { \ | |
34 | int i; \ | |
35 | CORE_ADDR TMP; \ | |
36 | TMP = read_memory_integer ((FRAME)->frame + 0x4, 4); \ | |
37 | TMP = read_memory_integer (TMP + 0x10, 4); \ | |
38 | for (i = 0; i < NUM_REGS; i++) \ | |
39 | { \ | |
40 | if (i == SP_REGNUM) \ | |
41 | (FSR)->regs[SP_REGNUM] = read_memory_integer (TMP + SP_REGNUM * 4, 4); \ | |
42 | else \ | |
43 | (FSR)->regs[i] = TMP + i * 4; \ | |
44 | } \ | |
45 | } | |
6bfd168c JL |
46 | |
47 | /* OSF1 needs an extra trap. I assume for the emulator startup (?!?) */ | |
48 | #define START_INFERIOR_TRAPS_EXPECTED 3 | |
70e43abe | 49 | |
0a64709e JL |
50 | /* OSF1 does not need the pc space queue restored. */ |
51 | #define NO_PC_SPACE_QUEUE_RESTORE | |
52 | ||
70e43abe JL |
53 | /* It's mostly just the common stuff. */ |
54 | #include "pa/tm-hppa.h" |