Johns release
[deliverable/binutils-gdb.git] / gdb / xm-symmetry.h
1 /* Definitions to make GDB run on a Sequent Symmetry under dynix 3.0,
2 with Weitek 1167 and i387 support.
3 Copyright (C) 1986, 1987, 1989 Free Software Foundation, Inc.
4
5 This file is part of GDB.
6
7 GDB 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 1, or (at your option)
10 any later version.
11
12 GDB 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.
16
17 You should have received a copy of the GNU General Public License
18 along with GDB; see the file COPYING. If not, write to
19 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
20
21 /* Symmetry version by Jay Vosburgh (uunet!sequent!fubar) */
22
23 /* This machine doesn't have the siginterrupt call. */
24 #define NO_SIGINTERRUPT
25
26 #define HAVE_WAIT_STRUCT
27
28 /* XPT_DEBUG doesn't work yet under Dynix 3.0.12, but UNDEBUG does... */
29 /* #define PTRACE_ATTACH XPT_DEBUG
30 #define PTRACE_DETACH XPT_UNDEBUG
31 #define ATTACH_DETACH */
32
33 #define HOST_BYTE_ORDER LITTLE_ENDIAN
34
35 /* Get rid of any system-imposed stack limit if possible. */
36
37 #define SET_STACK_LIMIT_HUGE
38
39 /* This is the amount to subtract from u.u_ar0
40 to get the offset in the core file of the register values. */
41
42 #define KERNEL_U_ADDR (0x80000000 - (UPAGES * NBPG))
43
44 /* Compensate for lack of `vprintf' function. */
45
46 #define MISSING_VPRINTF
47
48 /* Override copies of {fetch,store}_inferior_registers in infptrace.c. */
49
50 #define FETCH_INFERIOR_REGISTERS
51
52 /* We must fetch all the regs before storing, since we store all at once. */
53
54 #define CHILD_PREPARE_TO_STORE() read_register_bytes (0, NULL, REGISTER_BYTES)
55 \f
56 /* Interface definitions for kernel debugger KDB. */
57 /* This doesn't work... */
58 /* Map machine fault codes into signal numbers.
59 First subtract 0, divide by 4, then index in a table.
60 Faults for which the entry in this table is 0
61 are not handled by KDB; the program's own trap handler
62 gets to handle then. */
63
64 #define FAULT_CODE_ORIGIN 0
65 #define FAULT_CODE_UNITS 4
66 #define FAULT_TABLE \
67 { 0, SIGKILL, SIGSEGV, 0, 0, 0, 0, 0, \
68 0, 0, SIGTRAP, SIGTRAP, 0, 0, 0, 0, \
69 0, 0, 0, 0, 0, 0, 0, 0}
70
71 /* Start running with a stack stretching from BEG to END.
72 BEG and END should be symbols meaningful to the assembler.
73 This is used only for kdb. */
74
75 #define INIT_STACK(beg, end) \
76 { asm (".globl end"); \
77 asm ("movl $ end, %esp"); \
78 asm ("movl %ebp, $0"); }
79
80 /* Push the frame pointer register on the stack. */
81 #define PUSH_FRAME_PTR \
82 asm ("pushl %ebp");
83
84 /* Copy the top-of-stack to the frame pointer register. */
85 #define POP_FRAME_PTR \
86 asm ("movl (%esp), %ebp");
87
88 /* After KDB is entered by a fault, push all registers
89 that GDB thinks about (all NUM_REGS of them),
90 so that they appear in order of ascending GDB register number.
91 The fault code will be on the stack beyond the last register. */
92
93 #define PUSH_REGISTERS \
94 { asm("pushad"); }
95 /*
96 { asm("pushl %eax"); \
97 asm("pushl %edx"); \
98 asm("pushl %ecx"); \
99 asm("pushl %st(0)"); \
100 asm("pushl %st(1)"); \
101 asm("pushl %ebx"); \
102 asm("pushl %esi"); \
103 asm("pushl %edi"); \
104 asm("pushl %st(2)"); \
105 asm("pushl %st(3)"); \
106 asm("pushl %st(4)"); \
107 asm("pushl %st(5)"); \
108 asm("pushl %st(6)"); \
109 asm("pushl %st(7)"); \
110 asm("pushl %esp"); \
111 asm("pushl %ebp"); \
112 asm("pushl %eip"); \
113 asm("pushl %eflags"); \
114 asm("pushl %fp1"); \
115 asm("pushl %fp2"); \
116 asm("pushl %fp3"); \
117 asm("pushl %fp4"); \
118 asm("pushl %fp5"); \
119 asm("pushl %fp6"); \
120 asm("pushl %fp7"); \
121 asm("pushl %fp8"); \
122 asm("pushl %fp9"); \
123 asm("pushl %fp10"); \
124 asm("pushl %fp11"); \
125 asm("pushl %fp12"); \
126 asm("pushl %fp13"); \
127 asm("pushl %fp14"); \
128 asm("pushl %fp15"); \
129 asm("pushl %fp16"); \
130 asm("pushl %fp17"); \
131 asm("pushl %fp18"); \
132 asm("pushl %fp19"); \
133 asm("pushl %fp20"); \
134 asm("pushl %fp21"); \
135 asm("pushl %fp22"); \
136 asm("pushl %fp23"); \
137 asm("pushl %fp24"); \
138 asm("pushl %fp25"); \
139 asm("pushl %fp26"); \
140 asm("pushl %fp27"); \
141 asm("pushl %fp28"); \
142 asm("pushl %fp29"); \
143 asm("pushl %fp30"); \
144 asm("pushl %fp31"); \
145 }
146 */
147 /* Assuming the registers (including processor status) have been
148 pushed on the stack in order of ascending GDB register number,
149 restore them and return to the address in the saved PC register. */
150
151 #define POP_REGISTERS \
152 { asm ("popad"); }
This page took 0.032058 seconds and 4 git commands to generate.