1 /* Definitions to make GDB run on an ARM under RISCiX (4.3bsd).
2 Copyright (C) 1986, 1987, 1989 Free Software Foundation, Inc.
4 This file is part of GDB.
6 GDB 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 1, or (at your option)
11 GDB 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.
16 You should have received a copy of the GNU General Public License
17 along with GDB; see the file COPYING. If not, write to
18 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
20 #define HOST_BYTE_ORDER LITTLE_ENDIAN
22 /* Get rid of any system-imposed stack limit if possible. */
24 #define SET_STACK_LIMIT_HUGE
26 /* This is the amount to subtract from u.u_ar0
27 to get the offset in the core file of the register values. */
29 #define KERNEL_U_ADDR (0x01000000 - (UPAGES * NBPG))
31 /* Override copies of {fetch,store}_inferior_registers in infptrace.c. */
32 #define FETCH_INFERIOR_REGISTERS
36 /* Interface definitions for kernel debugger KDB. */
38 /* Map machine fault codes into signal numbers.
39 First subtract 0, divide by 4, then index in a table.
40 Faults for which the entry in this table is 0
41 are not handled by KDB; the program's own trap handler
42 gets to handle then. */
44 #define FAULT_CODE_ORIGIN 0
45 #define FAULT_CODE_UNITS 4
47 { 0, SIGKILL, SIGSEGV, 0, 0, 0, 0, 0, \
48 0, 0, SIGTRAP, SIGTRAP, 0, 0, 0, 0, \
49 0, 0, 0, 0, 0, 0, 0, 0}
51 /* Start running with a stack stretching from BEG to END.
52 BEG and END should be symbols meaningful to the assembler.
53 This is used only for kdb. */
55 #define INIT_STACK(beg, end) \
56 { asm (".globl end"); \
57 asm ("movl $ end, sp"); \
60 /* Push the frame pointer register on the stack. */
61 #define PUSH_FRAME_PTR \
64 /* Copy the top-of-stack to the frame pointer register. */
65 #define POP_FRAME_PTR \
66 asm ("movl (sp), fp");
68 /* After KDB is entered by a fault, push all registers
69 that GDB thinks about (all NUM_REGS of them),
70 so that they appear in order of ascending GDB register number.
71 The fault code will be on the stack beyond the last register. */
73 #define PUSH_REGISTERS \
74 { asm ("pushl 8(sp)"); \
75 asm ("pushl 8(sp)"); \
76 asm ("pushal 0x14(sp)"); \
77 asm ("pushr $037777"); }
79 /* Assuming the registers (including processor status) have been
80 pushed on the stack in order of ascending GDB register number,
81 restore them and return to the address in the saved PC register. */
83 #define POP_REGISTERS \
84 { asm ("popr $037777"); \
85 asm ("subl2 $8,(sp)"); \
86 asm ("movl (sp),sp"); \
This page took 0.032507 seconds and 5 git commands to generate.