]>
Commit | Line | Data |
---|---|---|
ecb1b520 SC |
1 | /* Copyright (C) 1986, 1987, 1988, 1989, 1990 Free Software Foundation, Inc. |
2 | ||
3 | This file is part of GDB. | |
4 | ||
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. | |
9 | ||
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. | |
14 | ||
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. */ | |
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 | ||
25 | #if !defined (USG) | |
26 | #define USG 1 | |
27 | #endif | |
28 | ||
29 | #define MAXPATHLEN 1024 | |
30 | /* delta 88 doesn't have bcopy(), etc. */ | |
31 | #define USG_UTILS 1 | |
32 | ||
33 | #include <sys/param.h> | |
34 | #include <sys/time.h> | |
35 | ||
36 | #define vfork() fork() | |
37 | #define index strchr | |
38 | #define rindex strrchr | |
39 | #define getwd(BUF) getcwd(BUF,MAXPATHLEN); | |
40 | #define bzero(ptr,count) (memset((ptr),0,(count))) | |
41 | #define bcopy(src,dst,count) (memcpy((dst),(src),(count))) | |
42 | #define bcmp(left,right,count) (memcmp((right),(left),(count))) | |
43 | #if 0 | |
44 | #ifdef __GNUC__ | |
45 | #define memcpy __builtin_memcpy | |
46 | /* gcc doesn't have this, at least not gcc 1.92. */ | |
47 | /* #define memset __builtin_memset */ | |
48 | #define strcmp __builtin_strcmp | |
49 | #endif | |
50 | #endif | |
51 | ||
52 | #define HAVE_TERMIO | |
53 | ||
54 | ||
55 | /*#define USIZE 2048*/ | |
56 | #define NBPG NBPC | |
57 | #define UPAGES USIZE | |
58 | ||
59 | #define HAVE_GETPAGESIZE | |
60 | ||
61 | /* Get rid of any system-imposed stack limit if possible. */ | |
62 | ||
63 | /*#define SET_STACK_LIMIT_HUGE*/ | |
64 | ||
65 | /* number of traps that happen between exec'ing the shell | |
66 | * to run an inferior, and when we finally get to | |
67 | * the inferior code. This is 2 on most implementations. | |
68 | */ | |
69 | #define START_INFERIOR_TRAPS_EXPECTED 2 | |
70 | ||
71 | /* This is the amount to subtract from u.u_ar0 | |
72 | to get the offset in the core file of the register values. */ | |
73 | ||
74 | /* Since registers r0 through r31 are stored directly in the struct ptrace_user, | |
75 | (for m88k BCS) | |
76 | the ptrace_user offsets are sufficient and KERNEL_U_ADDRESS can be 0 */ | |
77 | ||
78 | #define KERNEL_U_ADDR 0 | |
79 | ||
80 | #define REGISTER_U_ADDR(addr, blockend, regno) \ | |
81 | (addr) = m88k_register_u_addr ((blockend),(regno)); | |
82 | ||
83 | #define HAVE_WAIT_STRUCT | |
84 | ||
85 | #define FETCH_INFERIOR_REGISTERS | |
86 | \f | |
87 | /* Interface definitions for kernel debugger KDB. */ | |
88 | ||
89 | /* Map machine fault codes into signal numbers. | |
90 | First subtract 0, divide by 4, then index in a table. | |
91 | Faults for which the entry in this table is 0 | |
92 | are not handled by KDB; the program's own trap handler | |
93 | gets to handle then. */ | |
94 | ||
95 | #define FAULT_CODE_ORIGIN 0 | |
96 | #define FAULT_CODE_UNITS 4 | |
97 | #define FAULT_TABLE \ | |
98 | { 0, 0, 0, 0, 0, 0, 0, 0, \ | |
99 | 0, 0, 0, 0, 0, 0, 0, 0, \ | |
100 | 0, 0, 0, 0, 0, 0, 0, 0} | |
101 | ||
102 | /* Start running with a stack stretching from BEG to END. | |
103 | BEG and END should be symbols meaningful to the assembler. | |
104 | This is used only for kdb. */ | |
105 | ||
106 | #define INIT_STACK(beg, end) {} | |
107 | ||
108 | /* Push the frame pointer register on the stack. */ | |
109 | #define PUSH_FRAME_PTR {} | |
110 | ||
111 | /* Copy the top-of-stack to the frame pointer register. */ | |
112 | #define POP_FRAME_PTR {} | |
113 | ||
114 | /* After KDB is entered by a fault, push all registers | |
115 | that GDB thinks about (all NUM_REGS of them), | |
116 | so that they appear in order of ascending GDB register number. | |
117 | The fault code will be on the stack beyond the last register. */ | |
118 | ||
119 | #define PUSH_REGISTERS {} | |
120 | ||
121 | /* Assuming the registers (including processor status) have been | |
122 | pushed on the stack in order of ascending GDB register number, | |
123 | restore them and return to the address in the saved PC register. */ | |
124 | ||
125 | #define POP_REGISTERS {} |