]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/config/arm/xm-arm.h
import gdb-1999-07-07 post reformat
[thirdparty/binutils-gdb.git] / gdb / config / arm / xm-arm.h
CommitLineData
c906108c
SS
1/* Definitions to make GDB run on an ARM under RISCiX (4.3bsd).
2 Copyright (C) 1986, 1987, 1989 Free Software Foundation, Inc.
3
c5aa993b 4 This file is part of GDB.
c906108c 5
c5aa993b
JM
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.
c906108c 10
c5aa993b
JM
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.
c906108c 15
c5aa993b
JM
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., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
c906108c
SS
20
21#define HOST_BYTE_ORDER LITTLE_ENDIAN
c906108c 22\f
c5aa993b 23
c906108c
SS
24#if 0
25/* Interface definitions for kernel debugger KDB. */
26
27/* Map machine fault codes into signal numbers.
28 First subtract 0, divide by 4, then index in a table.
29 Faults for which the entry in this table is 0
30 are not handled by KDB; the program's own trap handler
31 gets to handle then. */
32
33#define FAULT_CODE_ORIGIN 0
34#define FAULT_CODE_UNITS 4
35#define FAULT_TABLE \
36{ 0, SIGKILL, SIGSEGV, 0, 0, 0, 0, 0, \
37 0, 0, SIGTRAP, SIGTRAP, 0, 0, 0, 0, \
38 0, 0, 0, 0, 0, 0, 0, 0}
39
40/* Start running with a stack stretching from BEG to END.
41 BEG and END should be symbols meaningful to the assembler.
42 This is used only for kdb. */
43
44#define INIT_STACK(beg, end) \
45{ asm (".globl end"); \
46 asm ("movl $ end, sp"); \
47 asm ("clrl fp"); }
48
49/* Push the frame pointer register on the stack. */
50#define PUSH_FRAME_PTR \
51 asm ("pushl fp");
52
53/* Copy the top-of-stack to the frame pointer register. */
54#define POP_FRAME_PTR \
55 asm ("movl (sp), fp");
56
57/* After KDB is entered by a fault, push all registers
58 that GDB thinks about (all NUM_REGS of them),
59 so that they appear in order of ascending GDB register number.
60 The fault code will be on the stack beyond the last register. */
61
62#define PUSH_REGISTERS \
63{ asm ("pushl 8(sp)"); \
64 asm ("pushl 8(sp)"); \
65 asm ("pushal 0x14(sp)"); \
66 asm ("pushr $037777"); }
67
68/* Assuming the registers (including processor status) have been
69 pushed on the stack in order of ascending GDB register number,
70 restore them and return to the address in the saved PC register. */
71
72#define POP_REGISTERS \
73{ asm ("popr $037777"); \
74 asm ("subl2 $8,(sp)"); \
75 asm ("movl (sp),sp"); \
76 asm ("rei"); }
77#endif /* 0 */