1 |
578 |
markom |
/* OBSOLETE /* Definitions to make GDB run on an ISI Optimum V (3.05) under 4.3bsd. */
|
2 |
|
|
/* OBSOLETE Copyright 1987, 1989, 1992 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. */ */
|
20 |
|
|
/* OBSOLETE */
|
21 |
|
|
/* OBSOLETE #define HOST_BYTE_ORDER BIG_ENDIAN */
|
22 |
|
|
/* OBSOLETE */
|
23 |
|
|
/* OBSOLETE /* This has not been tested on ISI's running BSD 4.2, but it will probably */
|
24 |
|
|
/* OBSOLETE work. */ */
|
25 |
|
|
/* OBSOLETE */
|
26 |
|
|
/* OBSOLETE /* This is the amount to subtract from u.u_ar0 */
|
27 |
|
|
/* OBSOLETE to get the offset in the core file of the register values. */ */
|
28 |
|
|
/* OBSOLETE */
|
29 |
|
|
/* OBSOLETE /*#define KERNEL_U_ADDR 0x10800000 */ */
|
30 |
|
|
/* OBSOLETE #define KERNEL_U_ADDR 0 */
|
31 |
|
|
/* OBSOLETE */
|
32 |
|
|
/* OBSOLETE /* expects blockend to be u.u_ar0 */ */
|
33 |
|
|
/* OBSOLETE extern int rloc[]; /* Defined in isi-dep.c */ */
|
34 |
|
|
/* OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno) \ */
|
35 |
|
|
/* OBSOLETE { blockend &= UPAGES*NBPG - 1; \ */
|
36 |
|
|
/* OBSOLETE if (regno < 18) addr = (int)blockend + rloc[regno]*4; \ */
|
37 |
|
|
/* OBSOLETE else if (regno < 26) addr = (int) &((struct user *)0)->u_68881_regs \ */
|
38 |
|
|
/* OBSOLETE + (regno - 18) * 12; \ */
|
39 |
|
|
/* OBSOLETE else if (regno < 29) addr = (int) &((struct user *)0)->u_68881_regs \ */
|
40 |
|
|
/* OBSOLETE + 8 * 12 + (regno - 26) * 4; \ */
|
41 |
|
|
/* OBSOLETE } */
|
42 |
|
|
/* OBSOLETE */
|
43 |
|
|
/* OBSOLETE /* Interface definitions for kernel debugger KDB. */ */
|
44 |
|
|
/* OBSOLETE */
|
45 |
|
|
/* OBSOLETE /* Map machine fault codes into signal numbers. */
|
46 |
|
|
/* OBSOLETE First subtract 0, divide by 4, then index in a table. */
|
47 |
|
|
/* OBSOLETE Faults for which the entry in this table is 0 */
|
48 |
|
|
/* OBSOLETE are not handled by KDB; the program's own trap handler */
|
49 |
|
|
/* OBSOLETE gets to handle then. */ */
|
50 |
|
|
/* OBSOLETE */
|
51 |
|
|
/* OBSOLETE #define FAULT_CODE_ORIGIN 0 */
|
52 |
|
|
/* OBSOLETE #define FAULT_CODE_UNITS 4 */
|
53 |
|
|
/* OBSOLETE #define FAULT_TABLE \ */
|
54 |
|
|
/* OBSOLETE { 0, 0, 0, 0, SIGTRAP, 0, 0, 0, \ */
|
55 |
|
|
/* OBSOLETE 0, SIGTRAP, 0, 0, 0, 0, 0, SIGKILL, \ */
|
56 |
|
|
/* OBSOLETE 0, 0, 0, 0, 0, 0, 0, 0, \ */
|
57 |
|
|
/* OBSOLETE SIGILL } */
|
58 |
|
|
/* OBSOLETE */
|
59 |
|
|
/* OBSOLETE /* Start running with a stack stretching from BEG to END. */
|
60 |
|
|
/* OBSOLETE BEG and END should be symbols meaningful to the assembler. */
|
61 |
|
|
/* OBSOLETE This is used only for kdb. */ */
|
62 |
|
|
/* OBSOLETE */
|
63 |
|
|
/* OBSOLETE #define INIT_STACK(beg, end) \ */
|
64 |
|
|
/* OBSOLETE { asm (".globl end"); \ */
|
65 |
|
|
/* OBSOLETE asm ("movl $ end, sp"); \ */
|
66 |
|
|
/* OBSOLETE asm ("clrl fp"); } */
|
67 |
|
|
/* OBSOLETE */
|
68 |
|
|
/* OBSOLETE /* Push the frame pointer register on the stack. */ */
|
69 |
|
|
/* OBSOLETE #define PUSH_FRAME_PTR \ */
|
70 |
|
|
/* OBSOLETE asm ("movel fp, -(sp)"); */
|
71 |
|
|
/* OBSOLETE */
|
72 |
|
|
/* OBSOLETE /* Copy the top-of-stack to the frame pointer register. */ */
|
73 |
|
|
/* OBSOLETE #define POP_FRAME_PTR \ */
|
74 |
|
|
/* OBSOLETE asm ("movl (sp), fp"); */
|
75 |
|
|
/* OBSOLETE */
|
76 |
|
|
/* OBSOLETE /* After KDB is entered by a fault, push all registers */
|
77 |
|
|
/* OBSOLETE that GDB thinks about (all NUM_REGS of them), */
|
78 |
|
|
/* OBSOLETE so that they appear in order of ascending GDB register number. */
|
79 |
|
|
/* OBSOLETE The fault code will be on the stack beyond the last register. */ */
|
80 |
|
|
/* OBSOLETE */
|
81 |
|
|
/* OBSOLETE #define PUSH_REGISTERS \ */
|
82 |
|
|
/* OBSOLETE { asm ("clrw -(sp)"); \ */
|
83 |
|
|
/* OBSOLETE asm ("pea 10(sp)"); \ */
|
84 |
|
|
/* OBSOLETE asm ("movem $ 0xfffe,-(sp)"); } */
|
85 |
|
|
/* OBSOLETE */
|
86 |
|
|
/* OBSOLETE /* Assuming the registers (including processor status) have been */
|
87 |
|
|
/* OBSOLETE pushed on the stack in order of ascending GDB register number, */
|
88 |
|
|
/* OBSOLETE restore them and return to the address in the saved PC register. */ */
|
89 |
|
|
/* OBSOLETE */
|
90 |
|
|
/* OBSOLETE #define POP_REGISTERS \ */
|
91 |
|
|
/* OBSOLETE { asm ("subil $8,28(sp)"); \ */
|
92 |
|
|
/* OBSOLETE asm ("movem (sp),$ 0xffff"); \ */
|
93 |
|
|
/* OBSOLETE asm ("rte"); } */
|