Commit | Line | Data |
---|---|---|
b1de302a | 1 | /* Parameters for Hewlett-Packard 9000/300 native support under bsd. |
aea94564 | 2 | Copyright 1986, 1987, 1989, 1991, 1992, 1993 Free Software Foundation, Inc. |
b1de302a RP |
3 | |
4 | This file is part of GDB. | |
5 | ||
6 | This program is free software; you can redistribute it and/or modify | |
7 | it under the terms of the GNU General Public License as published by | |
8 | the Free Software Foundation; either version 2 of the License, or | |
9 | (at your option) any later version. | |
10 | ||
11 | This program is distributed in the hope that it will be useful, | |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | GNU General Public License for more details. | |
15 | ||
16 | You should have received a copy of the GNU General Public License | |
17 | along with this program; if not, write to the Free Software | |
18 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | |
19 | ||
20 | /* This is a piece of magic that is given a register number REGNO | |
21 | and as BLOCKEND the address in the system of the end of the user structure | |
22 | and stores in ADDR the address in the kernel or core dump | |
23 | of that register. */ | |
24 | ||
25 | #define REGISTER_U_ADDR(addr, blockend, regno) \ | |
26 | { \ | |
27 | if (regno < PS_REGNUM) \ | |
28 | addr = (int) &((struct frame *)(blockend))->f_regs[regno]; \ | |
29 | else if (regno == PS_REGNUM) \ | |
30 | addr = (int) &((struct frame *)(blockend))->f_stackadj; \ | |
31 | else if (regno == PC_REGNUM) \ | |
32 | addr = (int) &((struct frame *)(blockend))->f_pc; \ | |
33 | else if (regno < FPC_REGNUM) \ | |
34 | addr = (int) \ | |
35 | &((struct user *)0)->u_pcb.pcb_fpregs.fpf_regs[((regno)-FP0_REGNUM)*3];\ | |
36 | else if (regno == FPC_REGNUM) \ | |
37 | addr = (int) &((struct user *)0)->u_pcb.pcb_fpregs.fpf_fpcr; \ | |
38 | else if (regno == FPS_REGNUM) \ | |
39 | addr = (int) &((struct user *)0)->u_pcb.pcb_fpregs.fpf_fpsr; \ | |
40 | else \ | |
41 | addr = (int) &((struct user *)0)->u_pcb.pcb_fpregs.fpf_fpiar; \ | |
42 | } | |
43 | ||
aea94564 JG |
44 | /* We can attach to processes using ptrace. */ |
45 | ||
46 | #define ATTACH_DETACH | |
47 | #define PTRACE_ATTACH 10 | |
48 | #define PTRACE_DETACH 11 | |
49 | ||
50 | /* The third argument of ptrace is declared as this type. */ | |
51 | ||
52 | #define PTRACE_ARG3_TYPE caddr_t |