]> Git Repo - binutils.git/blame - gdb/xm-m88k.h
(osys_read_record): If record->header.lenth <= sizeof (record->header),
[binutils.git] / gdb / xm-m88k.h
CommitLineData
dd3b648e
RP
1/* Copyright (C) 1986, 1987, 1988, 1989, 1990 Free Software Foundation, Inc.
2
3This file is part of GDB.
4
5GDB is free software; you can redistribute it and/or modify
6it under the terms of the GNU General Public License as published by
7the Free Software Foundation; either version 1, or (at your option)
8any later version.
9
10GDB is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with GDB; see the file COPYING. If not, write to
17the Free Software Foundation, 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#define USG
26/* DGUX has bcopy(), etc. */
27#define USG_UTILS 0
28
29#include <sys/param.h>
30
31#define vfork() fork()
32#define index strchr
33#define rindex strrchr
34#define getwd(BUF) getcwd(BUF,MAXPATHLEN);
35#define bzero(ptr,count) (memset((ptr),0,(count)))
36#define bcopy(src,dst,count) (memcpy((dst),(src),(count)))
37#define bcmp(left,right,count) (memcmp((right),(left),(count)))
38#ifdef __GNUC__
39#define memcpy __builtin_memcpy
40#define memset __builtin_memset
41#define strcmp __builtin_strcmp
42#endif
43
44#ifdef DGUX
45#define x_foff _x_x._x_offset
46#define x_fname _x_name
47#define USER ptrace_user
48#define _BSD_WAIT_FLAVOR
49#endif
50
51#define HAVE_TERMIO
52
53
54#define USIZE 2048
55#define NBPG NBPC
56#define UPAGES USIZE
57
58#define HAVE_GETPAGESIZE
59
60/* Get rid of any system-imposed stack limit if possible. */
61
62#define SET_STACK_LIMIT_HUGE
63
64/* number of traps that happen between exec'ing the shell
65 * to run an inferior, and when we finally get to
66 * the inferior code. This is 2 on most implementations.
67 */
68#define START_INFERIOR_TRAPS_EXPECTED 2
69
70/* This is the amount to subtract from u.u_ar0
71 to get the offset in the core file of the register values. */
72
73/* Since registers r0 through r31 are stored directly in the struct ptrace_user,
74 (for m88k BCS)
75 the ptrace_user offsets are sufficient and KERNEL_U_ADDRESS can be 0 */
76
77#define KERNEL_U_ADDR 0
78
79#define REGISTER_U_ADDR(addr, blockend, regno) \
80 (addr) = m88k_register_u_addr ((blockend),(regno));
81
82#define HAVE_WAIT_STRUCT
83
84#define FETCH_INFERIOR_REGISTERS
85\f
86/* Interface definitions for kernel debugger KDB. */
87
88/* Map machine fault codes into signal numbers.
89 First subtract 0, divide by 4, then index in a table.
90 Faults for which the entry in this table is 0
91 are not handled by KDB; the program's own trap handler
92 gets to handle then. */
93
94#define FAULT_CODE_ORIGIN 0
95#define FAULT_CODE_UNITS 4
96#define FAULT_TABLE \
97{ 0, 0, 0, 0, 0, 0, 0, 0, \
98 0, 0, 0, 0, 0, 0, 0, 0, \
99 0, 0, 0, 0, 0, 0, 0, 0}
100
101/* Start running with a stack stretching from BEG to END.
102 BEG and END should be symbols meaningful to the assembler.
103 This is used only for kdb. */
104
105#define INIT_STACK(beg, end) {}
106
107/* Push the frame pointer register on the stack. */
108#define PUSH_FRAME_PTR {}
109
110/* Copy the top-of-stack to the frame pointer register. */
111#define POP_FRAME_PTR {}
112
113/* After KDB is entered by a fault, push all registers
114 that GDB thinks about (all NUM_REGS of them),
115 so that they appear in order of ascending GDB register number.
116 The fault code will be on the stack beyond the last register. */
117
118#define PUSH_REGISTERS {}
119
120/* Assuming the registers (including processor status) have been
121 pushed on the stack in order of ascending GDB register number,
122 restore them and return to the address in the saved PC register. */
123
124#define POP_REGISTERS {}
This page took 0.049975 seconds and 4 git commands to generate.