Just testing checkins.
[deliverable/binutils-gdb.git] / gdb / xm-hp300bsd.h
CommitLineData
9fa28378 1/* Parameters for hosting on a Hewlett-Packard 9000/300, running bsd.
be220da1 2 Copyright 1986, 1987, 1989, 1991, 1992, 1993 Free Software Foundation, Inc.
dd3b648e
RP
3
4This file is part of GDB.
5
99a7de40 6This program is free software; you can redistribute it and/or modify
dd3b648e 7it under the terms of the GNU General Public License as published by
99a7de40
JG
8the Free Software Foundation; either version 2 of the License, or
9(at your option) any later version.
dd3b648e 10
99a7de40 11This program is distributed in the hope that it will be useful,
dd3b648e
RP
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
99a7de40
JG
17along with this program; if not, write to the Free Software
18Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
dd3b648e
RP
19
20/*
21 * Configuration file for HP9000/300 series machine running
be220da1 22 * University of Utah's 4.3bsd (or 4.4BSD) port. This is NOT for HP-UX.
dd3b648e
RP
23 * Problems to hpbsd-bugs@cs.utah.edu
24 */
25
9fa28378
JG
26#define HOST_BYTE_ORDER BIG_ENDIAN
27
5e3d0ab0
JG
28/* Avoid "INT_MIN redefined" preprocessor warnings -- by defining them here,
29 exactly the same as in the system <limits.h> file. */
30#define UINT_MAX 4294967295 /* max value for an unsigned int */
31#define INT_MAX 2147483647 /* max value for an int */
32#define INT_MIN (-2147483647-1) /* min value for an int */
33#define LONG_MAX 2147483647 /* max value for a long */
dd3b648e
RP
34
35/* Get rid of any system-imposed stack limit if possible. */
36
37#define SET_STACK_LIMIT_HUGE
38
39/* Get kernel u area address at run-time using BSD style nlist (). */
40#define KERNEL_U_ADDR_BSD
41
62853f80
JG
42/* Kernel is a bit tenacious about sharing text segments, disallowing bpts. */
43#define ONE_PROCESS_WRITETEXT
be220da1
JG
44
45/* psignal's definition in 4.4BSD conflicts with the one in defs.h.
46 But there *is* no psignal definition in 4.3BSD. So we avoid the defs.h
47 version here, and supply our own (matching) one. */
48#define PSIGNAL_IN_SIGNAL_H
49void psignal PARAMS ((unsigned int, const char *));
50
51extern char *strdup PARAMS ((const char *));
dd3b648e
RP
52\f
53/* Interface definitions for kernel debugger KDB. */
54
55/* Map machine fault codes into signal numbers.
56 First subtract 0, divide by 4, then index in a table.
57 Faults for which the entry in this table is 0
58 are not handled by KDB; the program's own trap handler
59 gets to handle then. */
60
61#define FAULT_CODE_ORIGIN 0
62#define FAULT_CODE_UNITS 4
63#define FAULT_TABLE \
64{ 0, 0, 0, 0, SIGTRAP, 0, 0, 0, \
65 0, SIGTRAP, 0, 0, 0, 0, 0, SIGKILL, \
66 0, 0, 0, 0, 0, 0, 0, 0, \
67 SIGILL }
68
69/* Start running with a stack stretching from BEG to END.
70 BEG and END should be symbols meaningful to the assembler.
71 This is used only for kdb. */
72
73#define INIT_STACK(beg, end) \
74{ asm (".globl end"); \
75 asm ("movel #end, sp"); \
76 asm ("movel #0,a6"); }
77
78/* Push the frame pointer register on the stack. */
79#define PUSH_FRAME_PTR \
80 asm ("movel a6,sp@-");
81
82/* Copy the top-of-stack to the frame pointer register. */
83#define POP_FRAME_PTR \
84 asm ("movl sp@,a6");
85
86/* After KDB is entered by a fault, push all registers
87 that GDB thinks about (all NUM_REGS of them),
88 so that they appear in order of ascending GDB register number.
89 The fault code will be on the stack beyond the last register. */
90
91#define PUSH_REGISTERS \
92{ asm ("clrw -(sp)"); \
93 asm ("pea sp@(10)"); \
94 asm ("movem #0xfffe,sp@-"); }
95
96/* Assuming the registers (including processor status) have been
97 pushed on the stack in order of ascending GDB register number,
98 restore them and return to the address in the saved PC register. */
99
100#define POP_REGISTERS \
101{ asm ("subil #8,sp@(28)"); \
102 asm ("movem sp@,#0xffff"); \
103 asm ("rte"); }
This page took 0.097695 seconds and 4 git commands to generate.