1 /* Definitions to make GDB run on a Pyramidax under OSx 4.0 (4.2bsd).
2 Copyright 1988, 1989, 1992 Free Software Foundation, Inc.
4 This file is part of GDB.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
20 #define HOST_BYTE_ORDER BIG_ENDIAN
22 /* Define PYRAMID_CONTROL_FRAME_DEBUGGING to get copious messages
23 about reading the control stack on standard output. This
24 makes gdb unusable as a debugger. */
26 /* #define PYRAMID_CONTROL_FRAME_DEBUGGING */
28 /* Define PYRAMID_FRAME_DEBUGGING for ? */
30 /* use Pyramid's slightly strange ptrace */
31 #define PYRAMID_PTRACE
33 /* Traditional Unix virtual address spaces have thre regions: text,
34 data and stack. The text, initialised data, and uninitialised data
35 are represented in separate segments of the a.out file.
36 When a process dumps core, the data and stack regions are written
37 to a core file. This gives a debugger enough information to
38 reconstruct (and debug) the virtual address space at the time of
40 Pyramids have an distinct fourth region of the virtual address
41 space, in which the contents of the windowed registers are stacked
42 in fixed-size frames. Pyramid refer to this region as the control
43 stack. Each call (or trap) automatically allocates a new register
44 frame; each return deallocates the current frame and restores the
45 windowed registers to their values before the call.
47 When dumping core, the control stack is written to a core files as
48 a third segment. The core-handling functions need to know to deal
51 /* Tell dep.c what the extra segment is. */
54 #define NO_SIGINTERRUPT
56 #define HAVE_WAIT_STRUCT
58 /* Get rid of any system-imposed stack limit if possible. */
60 #define SET_STACK_LIMIT_HUGE
62 /* This is the amount to subtract from u.u_ar0
63 to get the offset in the core file of the register values. */
65 #define KERNEL_U_ADDR (0x80000000 - (UPAGES * NBPG))
67 /* Define offsets of registers in the core file (or maybe u area) */
68 #define REGISTER_U_ADDR(addr, blockend, regno) \
70 addr = blockend + (regno - 16 ) * 4; \
72 printf("\\geting reg 67\\"); \
73 addr = (int)(&__u.u_pcb.pcb_csp) - (int) &__u; \
74 } else if (regno == KSP_REGNUM) { \
75 printf("\\geting KSP (reg %d)\\", KSP_REGNUM); \
76 addr = (int)(&__u.u_pcb.pcb_ksp) - (int) &__u; \
77 } else if (regno == CSP_REGNUM) { \
78 printf("\\geting CSP (reg %d\\",CSP_REGNUM); \
79 addr = (int)(&__u.u_pcb.pcb_csp) - (int) &__u; \
80 } else if (regno == 64) { \
81 printf("\\geting reg 64\\"); \
82 addr = (int)(&__u.u_pcb.pcb_csp) - (int) &__u; \
83 } else if (regno == PS_REGNUM) \
84 addr = blockend - 4; \
85 else if (1 && ((16 > regno) && (regno > 11))) \
86 addr = last_frame_offset + (4 *(regno+32)); \
87 else if (0 && (12 > regno)) \
88 addr = global_reg_offset + (4 *regno); \
89 else if (16 > regno) \
90 addr = global_reg_offset + (4 *regno); \
92 addr = blockend + (regno - 16 ) * 4; \
95 /* Override copies of {fetch,store}_inferior_registers in infptrace.c. */
96 #define FETCH_INFERIOR_REGISTERS
This page took 0.031796 seconds and 4 git commands to generate.