1 /* Copyright (C) 1986, 1987, 1988, 1989, 1990 Free Software Foundation, Inc.
3 This file is part of GDB.
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
19 /* This is currently for a 88000 running DGUX. If other 88k ports are
20 done, OS-specific stuff should be moved (see tm-68k.h, for example). */
21 /* g++ support is not yet included. */
23 #define HOST_BYTE_ORDER BIG_ENDIAN
28 /* DGUX has bcopy(), etc. */
31 #include <sys/param.h>
33 #define vfork() fork()
35 #define rindex strrchr
36 #define getwd(BUF) getcwd(BUF,MAXPATHLEN);
37 #define bzero(ptr,count) (memset((ptr),0,(count)))
38 #define bcopy(src,dst,count) (memcpy((dst),(src),(count)))
39 #define bcmp(left,right,count) (memcmp((right),(left),(count)))
41 #define memcpy __builtin_memcpy
42 /* gcc doesn't have this, at least not gcc 1.92. */
43 /* #define memset __builtin_memset */
44 #define strcmp __builtin_strcmp
48 #define x_foff _x_x._x_offset
49 #define x_fname _x_name
50 #define USER ptrace_user
51 #define _BSD_WAIT_FLAVOR
61 #define HAVE_GETPAGESIZE
63 /* Get rid of any system-imposed stack limit if possible. */
65 #define SET_STACK_LIMIT_HUGE
67 /* number of traps that happen between exec'ing the shell
68 * to run an inferior, and when we finally get to
69 * the inferior code. This is 2 on most implementations.
71 #define START_INFERIOR_TRAPS_EXPECTED 2
73 /* This is the amount to subtract from u.u_ar0
74 to get the offset in the core file of the register values. */
76 /* Since registers r0 through r31 are stored directly in the struct ptrace_user,
78 the ptrace_user offsets are sufficient and KERNEL_U_ADDRESS can be 0 */
80 #define KERNEL_U_ADDR 0
82 #define REGISTER_U_ADDR(addr, blockend, regno) \
83 (addr) = m88k_register_u_addr ((blockend),(regno));
85 #define HAVE_WAIT_STRUCT
87 #define FETCH_INFERIOR_REGISTERS
89 /* Interface definitions for kernel debugger KDB. */
91 /* Map machine fault codes into signal numbers.
92 First subtract 0, divide by 4, then index in a table.
93 Faults for which the entry in this table is 0
94 are not handled by KDB; the program's own trap handler
95 gets to handle then. */
97 #define FAULT_CODE_ORIGIN 0
98 #define FAULT_CODE_UNITS 4
100 { 0, 0, 0, 0, 0, 0, 0, 0, \
101 0, 0, 0, 0, 0, 0, 0, 0, \
102 0, 0, 0, 0, 0, 0, 0, 0}
104 /* Start running with a stack stretching from BEG to END.
105 BEG and END should be symbols meaningful to the assembler.
106 This is used only for kdb. */
108 #define INIT_STACK(beg, end) {}
110 /* Push the frame pointer register on the stack. */
111 #define PUSH_FRAME_PTR {}
113 /* Copy the top-of-stack to the frame pointer register. */
114 #define POP_FRAME_PTR {}
116 /* After KDB is entered by a fault, push all registers
117 that GDB thinks about (all NUM_REGS of them),
118 so that they appear in order of ascending GDB register number.
119 The fault code will be on the stack beyond the last register. */
121 #define PUSH_REGISTERS {}
123 /* Assuming the registers (including processor status) have been
124 pushed on the stack in order of ascending GDB register number,
125 restore them and return to the address in the saved PC register. */
127 #define POP_REGISTERS {}