]>
Commit | Line | Data |
---|---|---|
dc129d82 JT |
1 | /* Common target dependent code for GDB on Alpha systems. |
2 | Copyright 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2002 Free | |
3 | Software Foundation, Inc. | |
4 | ||
5 | This file is part of GDB. | |
6 | ||
7 | This program is free software; you can redistribute it and/or modify | |
8 | it under the terms of the GNU General Public License as published by | |
9 | the Free Software Foundation; either version 2 of the License, or | |
10 | (at your option) any later version. | |
11 | ||
12 | This program is distributed in the hope that it will be useful, | |
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | GNU General Public License for more details. | |
16 | ||
17 | You should have received a copy of the GNU General Public License | |
18 | along with this program; if not, write to the Free Software | |
19 | Foundation, Inc., 59 Temple Place - Suite 330, | |
20 | Boston, MA 02111-1307, USA. */ | |
21 | ||
22 | #ifndef ALPHA_TDEP_H | |
23 | #define ALPHA_TDEP_H | |
24 | ||
70f80edf JT |
25 | #include "osabi.h" |
26 | ||
dc129d82 JT |
27 | /* Say how long (ordinary) registers are. This is a piece of bogosity |
28 | used in push_word and a few other places; REGISTER_RAW_SIZE is the | |
29 | real way to know how big a register is. */ | |
30 | #define ALPHA_REGISTER_SIZE 8 | |
31 | ||
32 | /* Number of machine registers. */ | |
33 | #define ALPHA_NUM_REGS 66 | |
34 | ||
35 | /* Total amount of space needed to store our copies of the machine's | |
36 | register state. */ | |
37 | #define ALPHA_REGISTER_BYTES (ALPHA_NUM_REGS * 8) | |
38 | ||
39 | /* Largest value REGISTER_RAW_SIZE can have. */ | |
40 | #define ALPHA_MAX_REGISTER_RAW_SIZE 8 | |
41 | ||
42 | /* Largest value REGISTER_VIRTUAL_SIZE can have. */ | |
43 | #define ALPHA_MAX_REGISTER_VIRTUAL_SIZE 8 | |
44 | ||
45 | /* Register numbers of various important registers. | |
46 | Note that most of these values are "real" register numbers, | |
47 | and correspond to the general registers of the machine, | |
48 | and FP_REGNUM is a "phony" register number which is too large | |
49 | to be an actual register number as far as the user is concerned | |
50 | but serves to get the desired value when passed to read_register. */ | |
51 | ||
52 | #define ALPHA_V0_REGNUM 0 /* Function integer return value */ | |
53 | #define ALPHA_T7_REGNUM 8 /* Return address register for OSF/1 __add* */ | |
54 | #define ALPHA_GCC_FP_REGNUM 15 /* Used by gcc as frame register */ | |
55 | #define ALPHA_A0_REGNUM 16 /* Loc of first arg during a subr call */ | |
56 | #define ALPHA_T9_REGNUM 23 /* Return address register for OSF/1 __div* */ | |
57 | #define ALPHA_T12_REGNUM 27 /* Contains start addr of current proc */ | |
58 | #define ALPHA_SP_REGNUM 30 /* Contains address of top of stack */ | |
59 | #define ALPHA_RA_REGNUM 26 /* Contains return address value */ | |
60 | #define ALPHA_ZERO_REGNUM 31 /* Read-only register, always 0 */ | |
61 | #define ALPHA_FP0_REGNUM 32 /* Floating point register 0 */ | |
62 | #define ALPHA_FPA0_REGNUM 48 /* First float arg during a subr call */ | |
63 | #define ALPHA_FPCR_REGNUM 63 /* Floating point control register */ | |
64 | #define ALPHA_PC_REGNUM 64 /* Contains program counter */ | |
65 | #define ALPHA_FP_REGNUM 65 /* Virtual frame pointer */ | |
66 | ||
67 | /* The alpha has two different virtual pointers for arguments and locals. | |
68 | ||
69 | The virtual argument pointer is pointing to the bottom of the argument | |
70 | transfer area, which is located immediately below the virtual frame | |
71 | pointer. Its size is fixed for the native compiler, it is either zero | |
72 | (for the no arguments case) or large enough to hold all argument registers. | |
73 | gcc uses a variable sized argument transfer area. As it has | |
74 | to stay compatible with the native debugging tools it has to use the same | |
75 | virtual argument pointer and adjust the argument offsets accordingly. | |
76 | ||
77 | The virtual local pointer is localoff bytes below the virtual frame | |
78 | pointer, the value of localoff is obtained from the PDR. */ | |
79 | #define ALPHA_NUM_ARG_REGS 6 | |
80 | ||
dc129d82 JT |
81 | /* Target-dependent structure in gdbarch. */ |
82 | struct gdbarch_tdep | |
83 | { | |
70f80edf | 84 | enum gdb_osabi osabi; /* OS/ABI of inferior. */ |
d9b023cc JT |
85 | |
86 | CORE_ADDR vm_min_address; /* used by heuristic_proc_start */ | |
36a6271d JT |
87 | |
88 | /* If PC is inside a dynamically-generated signal trampoline function | |
89 | (i.e. one copied onto the user stack at run-time), return how many | |
90 | bytes PC is beyond the start of that function. Otherwise, return -1. */ | |
91 | LONGEST (*dynamic_sigtramp_offset) (CORE_ADDR); | |
92 | ||
93 | /* If FRAME refers to a sigtramp frame, return the address of the next | |
94 | frame. */ | |
95 | CORE_ADDR (*skip_sigtramp_frame) (struct frame_info *, CORE_ADDR); | |
accc6d1f | 96 | |
5868c862 JT |
97 | /* Translate a signal handler frame into the address of the sigcontext |
98 | structure for that signal handler. */ | |
99 | CORE_ADDR (*sigcontext_addr) (struct frame_info *); | |
100 | ||
accc6d1f JT |
101 | int jb_pc; /* Offset to PC value in jump buffer. |
102 | If htis is negative, longjmp support | |
103 | will be disabled. */ | |
104 | size_t jb_elt_size; /* And the size of each entry in the buf. */ | |
dc129d82 JT |
105 | }; |
106 | ||
4bcbd6cb JT |
107 | void alpha_software_single_step (enum target_signal, int); |
108 | ||
dc129d82 | 109 | #endif /* ALPHA_TDEP_H */ |