]>
Commit | Line | Data |
---|---|---|
dd3b648e RP |
1 | /* Copyright (C) 1986, 1987, 1988, 1989, 1990 Free Software Foundation, Inc. |
2 | ||
3 | This file is part of GDB. | |
4 | ||
99a7de40 | 5 | This program is free software; you can redistribute it and/or modify |
dd3b648e | 6 | it under the terms of the GNU General Public License as published by |
99a7de40 JG |
7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | |
dd3b648e | 9 | |
99a7de40 | 10 | This program is distributed in the hope that it will be useful, |
dd3b648e RP |
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. | |
14 | ||
15 | You should have received a copy of the GNU General Public License | |
99a7de40 JG |
16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | |
dd3b648e RP |
18 | |
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. */ | |
22 | ||
23 | #define HOST_BYTE_ORDER BIG_ENDIAN | |
24 | ||
8aa13b87 JK |
25 | #if !defined (USG) |
26 | #define USG 1 | |
27 | #endif | |
dd3b648e RP |
28 | /* DGUX has bcopy(), etc. */ |
29 | #define USG_UTILS 0 | |
30 | ||
31 | #include <sys/param.h> | |
32 | ||
33 | #define vfork() fork() | |
34 | #define index strchr | |
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))) | |
40 | #ifdef __GNUC__ | |
41 | #define memcpy __builtin_memcpy | |
8aa13b87 JK |
42 | /* gcc doesn't have this, at least not gcc 1.92. */ |
43 | /* #define memset __builtin_memset */ | |
dd3b648e RP |
44 | #define strcmp __builtin_strcmp |
45 | #endif | |
46 | ||
47 | #ifdef DGUX | |
48 | #define x_foff _x_x._x_offset | |
49 | #define x_fname _x_name | |
50 | #define USER ptrace_user | |
51 | #define _BSD_WAIT_FLAVOR | |
52 | #endif | |
53 | ||
54 | #define HAVE_TERMIO | |
55 | ||
56 | ||
57 | #define USIZE 2048 | |
58 | #define NBPG NBPC | |
59 | #define UPAGES USIZE | |
60 | ||
61 | #define HAVE_GETPAGESIZE | |
62 | ||
63 | /* Get rid of any system-imposed stack limit if possible. */ | |
64 | ||
65 | #define SET_STACK_LIMIT_HUGE | |
66 | ||
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. | |
70 | */ | |
71 | #define START_INFERIOR_TRAPS_EXPECTED 2 | |
72 | ||
73 | /* This is the amount to subtract from u.u_ar0 | |
74 | to get the offset in the core file of the register values. */ | |
75 | ||
76 | /* Since registers r0 through r31 are stored directly in the struct ptrace_user, | |
77 | (for m88k BCS) | |
78 | the ptrace_user offsets are sufficient and KERNEL_U_ADDRESS can be 0 */ | |
79 | ||
80 | #define KERNEL_U_ADDR 0 | |
81 | ||
82 | #define REGISTER_U_ADDR(addr, blockend, regno) \ | |
83 | (addr) = m88k_register_u_addr ((blockend),(regno)); | |
84 | ||
85 | #define HAVE_WAIT_STRUCT | |
86 | ||
87 | #define FETCH_INFERIOR_REGISTERS | |
88 | \f | |
89 | /* Interface definitions for kernel debugger KDB. */ | |
90 | ||
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. */ | |
96 | ||
97 | #define FAULT_CODE_ORIGIN 0 | |
98 | #define FAULT_CODE_UNITS 4 | |
99 | #define FAULT_TABLE \ | |
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} | |
103 | ||
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. */ | |
107 | ||
108 | #define INIT_STACK(beg, end) {} | |
109 | ||
110 | /* Push the frame pointer register on the stack. */ | |
111 | #define PUSH_FRAME_PTR {} | |
112 | ||
113 | /* Copy the top-of-stack to the frame pointer register. */ | |
114 | #define POP_FRAME_PTR {} | |
115 | ||
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. */ | |
120 | ||
121 | #define PUSH_REGISTERS {} | |
122 | ||
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. */ | |
126 | ||
127 | #define POP_REGISTERS {} |