import gdb-1999-12-21 snapshot
[external/binutils.git] / gdb / config / arm / xm-arm.h
1 /* OBSOLETE /* Definitions to make GDB run on an ARM under RISCiX (4.3bsd). */
2 /* OBSOLETE    Copyright (C) 1986, 1987, 1989 Free Software Foundation, Inc. */
3 /* OBSOLETE  */
4 /* OBSOLETE    This file is part of GDB. */
5 /* OBSOLETE  */
6 /* OBSOLETE    This program is free software; you can redistribute it and/or modify */
7 /* OBSOLETE    it under the terms of the GNU General Public License as published by */
8 /* OBSOLETE    the Free Software Foundation; either version 2 of the License, or */
9 /* OBSOLETE    (at your option) any later version. */
10 /* OBSOLETE  */
11 /* OBSOLETE    This program is distributed in the hope that it will be useful, */
12 /* OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of */
13 /* OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the */
14 /* OBSOLETE    GNU General Public License for more details. */
15 /* OBSOLETE  */
16 /* OBSOLETE    You should have received a copy of the GNU General Public License */
17 /* OBSOLETE    along with this program; if not, write to the Free Software */
18 /* OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330, */
19 /* OBSOLETE    Boston, MA 02111-1307, USA.  *x/ */
20 /* OBSOLETE  */
21 /* OBSOLETE #define HOST_BYTE_ORDER LITTLE_ENDIAN */
22 /* OBSOLETE \f */
23 /* OBSOLETE  */
24 /* OBSOLETE #if 0 */
25 /* OBSOLETE /* Interface definitions for kernel debugger KDB.  *x/ */
26 /* OBSOLETE  */
27 /* OBSOLETE /* Map machine fault codes into signal numbers. */
28 /* OBSOLETE    First subtract 0, divide by 4, then index in a table. */
29 /* OBSOLETE    Faults for which the entry in this table is 0 */
30 /* OBSOLETE    are not handled by KDB; the program's own trap handler */
31 /* OBSOLETE    gets to handle then.  *x/ */
32 /* OBSOLETE  */
33 /* OBSOLETE #define FAULT_CODE_ORIGIN 0 */
34 /* OBSOLETE #define FAULT_CODE_UNITS 4 */
35 /* OBSOLETE #define FAULT_TABLE    \ */
36 /* OBSOLETE { 0, SIGKILL, SIGSEGV, 0, 0, 0, 0, 0, \ */
37 /* OBSOLETE   0, 0, SIGTRAP, SIGTRAP, 0, 0, 0, 0, \ */
38 /* OBSOLETE   0, 0, 0, 0, 0, 0, 0, 0} */
39 /* OBSOLETE  */
40 /* OBSOLETE /* Start running with a stack stretching from BEG to END. */
41 /* OBSOLETE    BEG and END should be symbols meaningful to the assembler. */
42 /* OBSOLETE    This is used only for kdb.  *x/ */
43 /* OBSOLETE  */
44 /* OBSOLETE #define INIT_STACK(beg, end)  \ */
45 /* OBSOLETE { asm (".globl end");         \ */
46 /* OBSOLETE   asm ("movl $ end, sp");      \ */
47 /* OBSOLETE   asm ("clrl fp"); } */
48 /* OBSOLETE  */
49 /* OBSOLETE /* Push the frame pointer register on the stack.  *x/ */
50 /* OBSOLETE #define PUSH_FRAME_PTR        \ */
51 /* OBSOLETE   asm ("pushl fp"); */
52 /* OBSOLETE  */
53 /* OBSOLETE /* Copy the top-of-stack to the frame pointer register.  *x/ */
54 /* OBSOLETE #define POP_FRAME_PTR  \ */
55 /* OBSOLETE   asm ("movl (sp), fp"); */
56 /* OBSOLETE  */
57 /* OBSOLETE /* After KDB is entered by a fault, push all registers */
58 /* OBSOLETE    that GDB thinks about (all NUM_REGS of them), */
59 /* OBSOLETE    so that they appear in order of ascending GDB register number. */
60 /* OBSOLETE    The fault code will be on the stack beyond the last register.  *x/ */
61 /* OBSOLETE  */
62 /* OBSOLETE #define PUSH_REGISTERS        \ */
63 /* OBSOLETE { asm ("pushl 8(sp)");        \ */
64 /* OBSOLETE   asm ("pushl 8(sp)");        \ */
65 /* OBSOLETE   asm ("pushal 0x14(sp)");    \ */
66 /* OBSOLETE   asm ("pushr $037777"); } */
67 /* OBSOLETE  */
68 /* OBSOLETE /* Assuming the registers (including processor status) have been */
69 /* OBSOLETE    pushed on the stack in order of ascending GDB register number, */
70 /* OBSOLETE    restore them and return to the address in the saved PC register.  *x/ */
71 /* OBSOLETE  */
72 /* OBSOLETE #define POP_REGISTERS      \ */
73 /* OBSOLETE { asm ("popr $037777");    \ */
74 /* OBSOLETE   asm ("subl2 $8,(sp)");   \ */
75 /* OBSOLETE   asm ("movl (sp),sp");    \ */
76 /* OBSOLETE   asm ("rei"); } */
77 /* OBSOLETE #endif /* 0 *x/ */