Add __FILE__ and __LINE__ parameter to internal_error() /
[binutils-gdb.git] / gdb / config / tahoe / xm-tahoe.h
1 /* OBSOLETE /* Definitions to make GDB hosted on a tahoe running 4.3-Reno */
2 /* OBSOLETE Copyright 1986, 1987, 1989, 1991, 1992 Free Software Foundation, Inc. */
3 /* OBSOLETE Contributed by the State University of New York at Buffalo, by the */
4 /* OBSOLETE Distributed Computer Systems Lab, Department of Computer Science, 1991. */
5 /* OBSOLETE */
6 /* OBSOLETE This file is part of GDB. */
7 /* OBSOLETE */
8 /* OBSOLETE This program is free software; you can redistribute it and/or modify */
9 /* OBSOLETE it under the terms of the GNU General Public License as published by */
10 /* OBSOLETE the Free Software Foundation; either version 2 of the License, or */
11 /* OBSOLETE (at your option) any later version. */
12 /* OBSOLETE */
13 /* OBSOLETE This program is distributed in the hope that it will be useful, */
14 /* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */
15 /* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
16 /* OBSOLETE GNU General Public License for more details. */
17 /* OBSOLETE */
18 /* OBSOLETE You should have received a copy of the GNU General Public License */
19 /* OBSOLETE along with this program; if not, write to the Free Software */
20 /* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, */
21 /* OBSOLETE Boston, MA 02111-1307, USA. *x/ */
22 /* OBSOLETE */
23 /* OBSOLETE /* Make sure the system include files define BIG_ENDIAN, UINT_MAX, const, */
24 /* OBSOLETE etc, rather than GDB's files. *x/ */
25 /* OBSOLETE #include <stdio.h> */
26 /* OBSOLETE #include <sys/param.h> */
27 /* OBSOLETE */
28 /* OBSOLETE /* Host is big-endian *x/ */
29 /* OBSOLETE */
30 /* OBSOLETE #define HOST_BYTE_ORDER BIG_ENDIAN */
31 /* OBSOLETE */
32 /* OBSOLETE /* This is the amount to subtract from u.u_ar0 */
33 /* OBSOLETE to get the offset in the core file of the register values. *x/ */
34 /* OBSOLETE */
35 /* OBSOLETE #define KERNEL_U_ADDR (0xc0000000 - (TARGET_UPAGES * TARGET_NBPG)) */
36 /* OBSOLETE */
37 /* OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno) \ */
38 /* OBSOLETE { addr = blockend - 100 + regno * 4; \ */
39 /* OBSOLETE if (regno == PC_REGNUM) addr = blockend - 8; \ */
40 /* OBSOLETE if (regno == PS_REGNUM) addr = blockend - 4; \ */
41 /* OBSOLETE if (regno == FP_REGNUM) addr = blockend - 40; \ */
42 /* OBSOLETE if (regno == SP_REGNUM) addr = blockend - 36; \ */
43 /* OBSOLETE if (regno == AL_REGNUM) addr = blockend - 20; \ */
44 /* OBSOLETE if (regno == AH_REGNUM) addr = blockend - 24;} */
45 /* OBSOLETE */
46 /* OBSOLETE /* Interface definitions for kernel debugger KDB. *x/ */
47 /* OBSOLETE */
48 /* OBSOLETE /* Map machine fault codes into signal numbers. */
49 /* OBSOLETE First subtract 0, divide by 4, then index in a table. */
50 /* OBSOLETE Faults for which the entry in this table is 0 */
51 /* OBSOLETE are not handled by KDB; the program's own trap handler */
52 /* OBSOLETE gets to handle then. *x/ */
53 /* OBSOLETE */
54 /* OBSOLETE #define FAULT_CODE_ORIGIN 0 */
55 /* OBSOLETE #define FAULT_CODE_UNITS 4 */
56 /* OBSOLETE #define FAULT_TABLE \ */
57 /* OBSOLETE { 0, SIGKILL, SIGSEGV, 0, 0, 0, 0, 0, \ */
58 /* OBSOLETE 0, 0, SIGTRAP, SIGTRAP, 0, 0, 0, 0, \ */
59 /* OBSOLETE 0, 0, 0, 0, 0, 0, 0, 0} */
60 /* OBSOLETE */
61 /* OBSOLETE /* Start running with a stack stretching from BEG to END. */
62 /* OBSOLETE BEG and END should be symbols meaningful to the assembler. */
63 /* OBSOLETE This is used only for kdb. *x/ */
64 /* OBSOLETE */
65 /* OBSOLETE #define INIT_STACK(beg, end) \ */
66 /* OBSOLETE { asm (".globl end"); \ */
67 /* OBSOLETE asm ("movl $ end, sp"); \ */
68 /* OBSOLETE asm ("clrl fp"); } */
69 /* OBSOLETE */
70 /* OBSOLETE /* Push the frame pointer register on the stack. *x/ */
71 /* OBSOLETE */
72 /* OBSOLETE #define PUSH_FRAME_PTR \ */
73 /* OBSOLETE asm ("pushl fp"); */
74 /* OBSOLETE */
75 /* OBSOLETE /* Copy the top-of-stack to the frame pointer register. *x/ */
76 /* OBSOLETE */
77 /* OBSOLETE #define POP_FRAME_PTR \ */
78 /* OBSOLETE asm ("movl (sp), fp"); */
79 /* OBSOLETE */
80 /* OBSOLETE /* After KDB is entered by a fault, push all registers */
81 /* OBSOLETE that GDB thinks about (all NUM_REGS of them), */
82 /* OBSOLETE so that they appear in order of ascending GDB register number. */
83 /* OBSOLETE The fault code will be on the stack beyond the last register. *x/ */
84 /* OBSOLETE */
85 /* OBSOLETE #define PUSH_REGISTERS \ */
86 /* OBSOLETE { asm ("pushl 8(sp)"); \ */
87 /* OBSOLETE asm ("pushl 8(sp)"); \ */
88 /* OBSOLETE asm ("pushal 0x41(sp)"); \ */
89 /* OBSOLETE asm ("pushl r0" ); \ */
90 /* OBSOLETE asm ("pushl r1" ); \ */
91 /* OBSOLETE asm ("pushl r2" ); \ */
92 /* OBSOLETE asm ("pushl r3" ); \ */
93 /* OBSOLETE asm ("pushl r4" ); \ */
94 /* OBSOLETE asm ("pushl r5" ); \ */
95 /* OBSOLETE asm ("pushl r6" ); \ */
96 /* OBSOLETE asm ("pushl r7" ); \ */
97 /* OBSOLETE asm ("pushl r8" ); \ */
98 /* OBSOLETE asm ("pushl r9" ); \ */
99 /* OBSOLETE asm ("pushl r10" ); \ */
100 /* OBSOLETE asm ("pushl r11" ); \ */
101 /* OBSOLETE asm ("pushl r12" ); \ */
102 /* OBSOLETE asm ("pushl fp" ); \ */
103 /* OBSOLETE asm ("pushl sp" ); \ */
104 /* OBSOLETE asm ("pushl pc" ); \ */
105 /* OBSOLETE asm ("pushl ps" ); \ */
106 /* OBSOLETE asm ("pushl aclo" ); \ */
107 /* OBSOLETE asm ("pushl achi" ); \ */
108 /* OBSOLETE } */
109 /* OBSOLETE */
110 /* OBSOLETE /* Assuming the registers (including processor status) have been */
111 /* OBSOLETE pushed on the stack in order of ascending GDB register number, */
112 /* OBSOLETE restore them and return to the address in the saved PC register. *x/ */
113 /* OBSOLETE */
114 /* OBSOLETE #define POP_REGISTERS \ */
115 /* OBSOLETE { \ */
116 /* OBSOLETE asm ("movl (sp)+, achi"); \ */
117 /* OBSOLETE asm ("movl (sp)+, aclo"); \ */
118 /* OBSOLETE asm ("movl (sp)+, ps"); \ */
119 /* OBSOLETE asm ("movl (sp)+, pc"); \ */
120 /* OBSOLETE asm ("movl (sp)+, sp"); \ */
121 /* OBSOLETE asm ("movl (sp)+, fp"); \ */
122 /* OBSOLETE asm ("movl (sp)+, r12"); \ */
123 /* OBSOLETE asm ("movl (sp)+, r11"); \ */
124 /* OBSOLETE asm ("movl (sp)+, r10"); \ */
125 /* OBSOLETE asm ("movl (sp)+, r9"); \ */
126 /* OBSOLETE asm ("movl (sp)+, r8"); \ */
127 /* OBSOLETE asm ("movl (sp)+, r7"); \ */
128 /* OBSOLETE asm ("movl (sp)+, r6"); \ */
129 /* OBSOLETE asm ("movl (sp)+, r5"); \ */
130 /* OBSOLETE asm ("movl (sp)+, r4"); \ */
131 /* OBSOLETE asm ("movl (sp)+, r3"); \ */
132 /* OBSOLETE asm ("movl (sp)+, r2"); \ */
133 /* OBSOLETE asm ("movl (sp)+, r1"); \ */
134 /* OBSOLETE asm ("movl (sp)+, r0"); \ */
135 /* OBSOLETE asm ("subl2 $8,(sp)"); \ */
136 /* OBSOLETE asm ("movl (sp),sp"); \ */
137 /* OBSOLETE asm ("rei"); } */