]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/config/gould/xm-pn.h
import gdb-1999-07-07 post reformat
[thirdparty/binutils-gdb.git] / gdb / config / gould / xm-pn.h
1 /* OBSOLETE /* Parameters for execution on a Gould PN, for GDB, the GNU debugger. */
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, Boston, MA 02111-1307, USA. *x/ */
19 /* OBSOLETE */
20 /* OBSOLETE #define HOST_BYTE_ORDER BIG_ENDIAN */
21 /* OBSOLETE */
22 /* OBSOLETE /* Address of U in kernel space *x/ */
23 /* OBSOLETE #define KERNEL_U_ADDR 0x3fc000 */
24 /* OBSOLETE */
25 /* OBSOLETE /* This is a piece of magic that is given a register number REGNO */
26 /* OBSOLETE and as BLOCKEND the address in the system of the end of the user structure */
27 /* OBSOLETE and stores in ADDR the address in the kernel or core dump */
28 /* OBSOLETE of that register. *x/ */
29 /* OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno) { \ */
30 /* OBSOLETE addr = blockend + regno * 4; \ */
31 /* OBSOLETE if (regno == PC_REGNUM) addr = blockend - 8 * 4; \ */
32 /* OBSOLETE if (regno == PS_REGNUM) addr = blockend - 7 * 4; \ */
33 /* OBSOLETE if (regno == SP_REGNUM) addr = blockend - 6 * 4; \ */
34 /* OBSOLETE } */
35 /* OBSOLETE \f */
36 /* OBSOLETE /* No KDB support, Yet! *x/ */
37 /* OBSOLETE /* Interface definitions for kernel debugger KDB. *x/ */
38 /* OBSOLETE */
39 /* OBSOLETE /* Map machine fault codes into signal numbers. */
40 /* OBSOLETE First subtract 0, divide by 4, then index in a table. */
41 /* OBSOLETE Faults for which the entry in this table is 0 */
42 /* OBSOLETE are not handled by KDB; the program's own trap handler */
43 /* OBSOLETE gets to handle then. *x/ */
44 /* OBSOLETE */
45 /* OBSOLETE #define FAULT_CODE_ORIGIN 0 */
46 /* OBSOLETE #define FAULT_CODE_UNITS 4 */
47 /* OBSOLETE #define FAULT_TABLE \ */
48 /* OBSOLETE { 0, 0, 0, 0, SIGTRAP, 0, 0, 0, \ */
49 /* OBSOLETE 0, SIGTRAP, 0, 0, 0, 0, 0, SIGKILL, \ */
50 /* OBSOLETE 0, 0, 0, 0, 0, 0, 0, 0, \ */
51 /* OBSOLETE SIGILL } */
52 /* OBSOLETE */
53 /* OBSOLETE /* Start running with a stack stretching from BEG to END. */
54 /* OBSOLETE BEG and END should be symbols meaningful to the assembler. */
55 /* OBSOLETE This is used only for kdb. *x/ */
56 /* OBSOLETE */
57 /* OBSOLETE #define INIT_STACK(beg, end) \ */
58 /* OBSOLETE { asm (".globl end"); \ */
59 /* OBSOLETE asm ("movel $ end, sp"); \ */
60 /* OBSOLETE asm ("clrl fp"); } */
61 /* OBSOLETE */
62 /* OBSOLETE /* Push the frame pointer register on the stack. *x/ */
63 /* OBSOLETE #define PUSH_FRAME_PTR \ */
64 /* OBSOLETE asm ("movel fp, -(sp)"); */
65 /* OBSOLETE */
66 /* OBSOLETE /* Copy the top-of-stack to the frame pointer register. *x/ */
67 /* OBSOLETE #define POP_FRAME_PTR \ */
68 /* OBSOLETE asm ("movl (sp), fp"); */
69 /* OBSOLETE */
70 /* OBSOLETE /* After KDB is entered by a fault, push all registers */
71 /* OBSOLETE that GDB thinks about (all NUM_REGS of them), */
72 /* OBSOLETE so that they appear in order of ascending GDB register number. */
73 /* OBSOLETE The fault code will be on the stack beyond the last register. *x/ */
74 /* OBSOLETE */
75 /* OBSOLETE #define PUSH_REGISTERS \ */
76 /* OBSOLETE { asm ("clrw -(sp)"); \ */
77 /* OBSOLETE asm ("pea 10(sp)"); \ */
78 /* OBSOLETE asm ("movem $ 0xfffe,-(sp)"); } */
79 /* OBSOLETE */
80 /* OBSOLETE /* Assuming the registers (including processor status) have been */
81 /* OBSOLETE pushed on the stack in order of ascending GDB register number, */
82 /* OBSOLETE restore them and return to the address in the saved PC register. *x/ */
83 /* OBSOLETE */
84 /* OBSOLETE #define POP_REGISTERS \ */
85 /* OBSOLETE { asm ("subil $8,28(sp)"); \ */
86 /* OBSOLETE asm ("movem (sp),$ 0xffff"); \ */
87 /* OBSOLETE asm ("rte"); } */