* am29k-tdep.c (initialize_29k): Fix call_scratch_address doc.
[deliverable/binutils-gdb.git] / gdb / xm-isi.h
CommitLineData
dd3b648e 1/* Definitions to make GDB run on an ISI Optimum V (3.05) under 4.3bsd.
3818ed33 2 Copyright 1987, 1989, 1992 Free Software Foundation, Inc.
dd3b648e
RP
3
4This file is part of GDB.
5
99a7de40 6This program is free software; you can redistribute it and/or modify
dd3b648e 7it under the terms of the GNU General Public License as published by
99a7de40
JG
8the Free Software Foundation; either version 2 of the License, or
9(at your option) any later version.
dd3b648e 10
99a7de40 11This program is distributed in the hope that it will be useful,
dd3b648e
RP
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
99a7de40
JG
17along with this program; if not, write to the Free Software
18Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
dd3b648e
RP
19
20#define HOST_BYTE_ORDER BIG_ENDIAN
21
22/* This has not been tested on ISI's running BSD 4.2, but it will probably
23 work. */
24
25/* This is the amount to subtract from u.u_ar0
26 to get the offset in the core file of the register values. */
27
28/*#define KERNEL_U_ADDR 0x10800000*/
29#define KERNEL_U_ADDR 0
30
31/* expects blockend to be u.u_ar0 */
32extern int rloc[]; /* Defined in isi-dep.c */
33#define REGISTER_U_ADDR(addr, blockend, regno) \
34{ blockend &= UPAGES*NBPG - 1; \
35 if (regno < 18) addr = (int)blockend + rloc[regno]*4; \
36 else if (regno < 26) addr = (int) &((struct user *)0)->u_68881_regs \
37 + (regno - 18) * 12; \
38 else if (regno < 29) addr = (int) &((struct user *)0)->u_68881_regs \
39 + 8 * 12 + (regno - 26) * 4; \
40}
dd3b648e
RP
41\f
42/* Interface definitions for kernel debugger KDB. */
43
44/* Map machine fault codes into signal numbers.
45 First subtract 0, divide by 4, then index in a table.
46 Faults for which the entry in this table is 0
47 are not handled by KDB; the program's own trap handler
48 gets to handle then. */
49
50#define FAULT_CODE_ORIGIN 0
51#define FAULT_CODE_UNITS 4
52#define FAULT_TABLE \
53{ 0, 0, 0, 0, SIGTRAP, 0, 0, 0, \
54 0, SIGTRAP, 0, 0, 0, 0, 0, SIGKILL, \
55 0, 0, 0, 0, 0, 0, 0, 0, \
56 SIGILL }
57
58/* Start running with a stack stretching from BEG to END.
59 BEG and END should be symbols meaningful to the assembler.
60 This is used only for kdb. */
61
62#define INIT_STACK(beg, end) \
63{ asm (".globl end"); \
64 asm ("movl $ end, sp"); \
65 asm ("clrl fp"); }
66
67/* Push the frame pointer register on the stack. */
68#define PUSH_FRAME_PTR \
69 asm ("movel fp, -(sp)");
70
71/* Copy the top-of-stack to the frame pointer register. */
72#define POP_FRAME_PTR \
73 asm ("movl (sp), fp");
74
75/* After KDB is entered by a fault, push all registers
76 that GDB thinks about (all NUM_REGS of them),
77 so that they appear in order of ascending GDB register number.
78 The fault code will be on the stack beyond the last register. */
79
80#define PUSH_REGISTERS \
81{ asm ("clrw -(sp)"); \
82 asm ("pea 10(sp)"); \
83 asm ("movem $ 0xfffe,-(sp)"); }
84
85/* Assuming the registers (including processor status) have been
86 pushed on the stack in order of ascending GDB register number,
87 restore them and return to the address in the saved PC register. */
88
89#define POP_REGISTERS \
90{ asm ("subil $8,28(sp)"); \
91 asm ("movem (sp),$ 0xffff"); \
92 asm ("rte"); }
This page took 0.098883 seconds and 4 git commands to generate.