1 /* Definitions to make GDB run on a Sequent Symmetry under
2 dynix 3.1 and ptx 1.3, with Weitek 1167 and i387 support.
3 Copyright 1986, 1987, 1989, 1992, 1993 Free Software Foundation, Inc.
5 This file is part of GDB.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
21 /* Symmetry version by Jay Vosburgh (fubar@sequent.com) */
23 /* This machine doesn't have the siginterrupt call. */
24 #define NO_SIGINTERRUPT
26 #define HAVE_WAIT_STRUCT
35 /* Get rid of any system-imposed stack limit if possible. */
37 #define SET_STACK_LIMIT_HUGE
41 /* XPT_DEBUG doesn't work yet under Dynix 3.0.12, but UNDEBUG does... */
42 /* #define PTRACE_ATTACH XPT_DEBUG
43 #define PTRACE_DETACH XPT_UNDEBUG
44 #define ATTACH_DETACH */
46 #define HOST_BYTE_ORDER LITTLE_ENDIAN
48 /* We must fetch all the regs before storing, since we store all at once. */
50 #define CHILD_PREPARE_TO_STORE() read_register_bytes (0, NULL, REGISTER_BYTES)
52 /* Interface definitions for kernel debugger KDB. */
53 /* This doesn't work... */
54 /* Map machine fault codes into signal numbers.
55 First subtract 0, divide by 4, then index in a table.
56 Faults for which the entry in this table is 0
57 are not handled by KDB; the program's own trap handler
58 gets to handle then. */
60 #define FAULT_CODE_ORIGIN 0
61 #define FAULT_CODE_UNITS 4
63 { 0, SIGKILL, SIGSEGV, 0, 0, 0, 0, 0, \
64 0, 0, SIGTRAP, SIGTRAP, 0, 0, 0, 0, \
65 0, 0, 0, 0, 0, 0, 0, 0}
67 /* Start running with a stack stretching from BEG to END.
68 BEG and END should be symbols meaningful to the assembler.
69 This is used only for kdb. */
71 #define INIT_STACK(beg, end) \
72 { asm (".globl end"); \
73 asm ("movl $ end, %esp"); \
74 asm ("movl %ebp, $0"); }
76 /* Push the frame pointer register on the stack. */
77 #define PUSH_FRAME_PTR \
80 /* Copy the top-of-stack to the frame pointer register. */
81 #define POP_FRAME_PTR \
82 asm ("movl (%esp), %ebp");
84 /* After KDB is entered by a fault, push all registers
85 that GDB thinks about (all NUM_REGS of them),
86 so that they appear in order of ascending GDB register number.
87 The fault code will be on the stack beyond the last register. */
89 #define PUSH_REGISTERS \
92 { asm("pushl %eax"); \
95 asm("pushl %st(0)"); \
96 asm("pushl %st(1)"); \
100 asm("pushl %st(2)"); \
101 asm("pushl %st(3)"); \
102 asm("pushl %st(4)"); \
103 asm("pushl %st(5)"); \
104 asm("pushl %st(6)"); \
105 asm("pushl %st(7)"); \
109 asm("pushl %eflags"); \
119 asm("pushl %fp10"); \
120 asm("pushl %fp11"); \
121 asm("pushl %fp12"); \
122 asm("pushl %fp13"); \
123 asm("pushl %fp14"); \
124 asm("pushl %fp15"); \
125 asm("pushl %fp16"); \
126 asm("pushl %fp17"); \
127 asm("pushl %fp18"); \
128 asm("pushl %fp19"); \
129 asm("pushl %fp20"); \
130 asm("pushl %fp21"); \
131 asm("pushl %fp22"); \
132 asm("pushl %fp23"); \
133 asm("pushl %fp24"); \
134 asm("pushl %fp25"); \
135 asm("pushl %fp26"); \
136 asm("pushl %fp27"); \
137 asm("pushl %fp28"); \
138 asm("pushl %fp29"); \
139 asm("pushl %fp30"); \
140 asm("pushl %fp31"); \
143 /* Assuming the registers (including processor status) have been
144 pushed on the stack in order of ascending GDB register number,
145 restore them and return to the address in the saved PC register. */
147 #define POP_REGISTERS \