Now handles multiple hosts and targets.
[deliverable/binutils-gdb.git] / gdb / xm-np1.h
CommitLineData
dd3b648e
RP
1/* Parameters for execution on a Gould NP1, for GDB, the GNU debugger.
2 Copyright (C) 1986, 1987, 1989 Free Software Foundation, Inc.
3
4This file is part of GDB.
5
6GDB is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 1, or (at your option)
9any later version.
10
11GDB is distributed in the hope that it will be useful,
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
17along with GDB; see the file COPYING. If not, write to
18the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
19
20#define HOST_BYTE_ORDER BIG_ENDIAN
21
22/* Get rid of any system-imposed stack limit if possible. */
23#define SET_STACK_LIMIT_HUGE
24
25/* Address of U in kernel space */
26#define KERNEL_U_ADDR 0x7fffc000
27
28/* This is a piece of magic that is given a register number REGNO
29 and as BLOCKEND the address in the system of the end of the user structure
30 and stores in ADDR the address in the kernel or core dump
31 of that register. */
32#define REGISTER_U_ADDR(addr, blockend, regno) { \
33 addr = blockend + regno * 4; \
34 if (regno == VE_REGNUM) addr = blockend - 9 * 4; \
35 if (regno == PC_REGNUM) addr = blockend - 8 * 4; \
36 if (regno == PS_REGNUM) addr = blockend - 7 * 4; \
37 if (regno == FP_REGNUM) addr = blockend - 6 * 4; \
38 if (regno >= V1_REGNUM) \
39 addr = blockend + 16 * 4 + (regno - V1_REGNUM) * VR_SIZE; \
40}
41
42/* Don't try to write the frame pointer. */
43#define CANNOT_STORE_REGISTER(regno) ((regno) == FP_REGNUM)
44
45#define MISSING_VPRINTF
46\f
47/*
48 * No KDB support, Yet! */
49/* Interface definitions for kernel debugger KDB. */
50
51/* Map machine fault codes into signal numbers.
52 First subtract 0, divide by 4, then index in a table.
53 Faults for which the entry in this table is 0
54 are not handled by KDB; the program's own trap handler
55 gets to handle then. */
56
57#define FAULT_CODE_ORIGIN 0
58#define FAULT_CODE_UNITS 4
59#define FAULT_TABLE \
60{ 0, 0, 0, 0, SIGTRAP, 0, 0, 0, \
61 0, SIGTRAP, 0, 0, 0, 0, 0, SIGKILL, \
62 0, 0, 0, 0, 0, 0, 0, 0, \
63 SIGILL }
64
65/* Start running with a stack stretching from BEG to END.
66 BEG and END should be symbols meaningful to the assembler.
67 This is used only for kdb. */
68
69#define INIT_STACK(beg, end) \
70{ asm (".globl end"); \
71 asm ("movel $ end, sp"); \
72 asm ("clrl fp"); }
73
74/* Push the frame pointer register on the stack. */
75#define PUSH_FRAME_PTR \
76 asm ("movel fp, -(sp)");
77
78/* Copy the top-of-stack to the frame pointer register. */
79#define POP_FRAME_PTR \
80 asm ("movl (sp), fp");
81
82/* After KDB is entered by a fault, push all registers
83 that GDB thinks about (all NUM_REGS of them),
84 so that they appear in order of ascending GDB register number.
85 The fault code will be on the stack beyond the last register. */
86
87#define PUSH_REGISTERS \
88{ asm ("clrw -(sp)"); \
89 asm ("pea 10(sp)"); \
90 asm ("movem $ 0xfffe,-(sp)"); }
91
92/* Assuming the registers (including processor status) have been
93 pushed on the stack in order of ascending GDB register number,
94 restore them and return to the address in the saved PC register. */
95
96#define POP_REGISTERS \
97{ asm ("subil $8,28(sp)"); \
98 asm ("movem (sp),$ 0xffff"); \
99 asm ("rte"); }
This page took 0.026826 seconds and 4 git commands to generate.