Commit | Line | Data |
---|---|---|
59233f88 AC |
1 | /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */ |
2 | ||
adf40b2e | 3 | /* Dynamic architecture support for GDB, the GNU debugger. |
79d45cd4 AC |
4 | |
5 | Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free | |
6 | Software Foundation, Inc. | |
c906108c | 7 | |
c5aa993b | 8 | This file is part of GDB. |
c906108c | 9 | |
c5aa993b JM |
10 | This program is free software; you can redistribute it and/or modify |
11 | it under the terms of the GNU General Public License as published by | |
12 | the Free Software Foundation; either version 2 of the License, or | |
13 | (at your option) any later version. | |
c906108c | 14 | |
c5aa993b JM |
15 | This program is distributed in the hope that it will be useful, |
16 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 | GNU General Public License for more details. | |
c906108c | 19 | |
c5aa993b JM |
20 | You should have received a copy of the GNU General Public License |
21 | along with this program; if not, write to the Free Software | |
22 | Foundation, Inc., 59 Temple Place - Suite 330, | |
23 | Boston, MA 02111-1307, USA. */ | |
c906108c | 24 | |
104c1213 JM |
25 | /* This file was created with the aid of ``gdbarch.sh''. |
26 | ||
52204a0b | 27 | The Bourne shell script ``gdbarch.sh'' creates the files |
104c1213 JM |
28 | ``new-gdbarch.c'' and ``new-gdbarch.h and then compares them |
29 | against the existing ``gdbarch.[hc]''. Any differences found | |
30 | being reported. | |
31 | ||
32 | If editing this file, please also run gdbarch.sh and merge any | |
52204a0b | 33 | changes into that script. Conversely, when making sweeping changes |
104c1213 JM |
34 | to this file, modifying gdbarch.sh and using its output may prove |
35 | easier. */ | |
adf40b2e | 36 | |
c906108c SS |
37 | #ifndef GDBARCH_H |
38 | #define GDBARCH_H | |
39 | ||
da3331ec AC |
40 | struct floatformat; |
41 | struct ui_file; | |
cce74817 JM |
42 | struct frame_info; |
43 | struct value; | |
b6af0555 | 44 | struct objfile; |
a2cf933a | 45 | struct minimal_symbol; |
049ee0e4 | 46 | struct regcache; |
b59ff9d5 | 47 | struct reggroup; |
6ce6d90f | 48 | struct regset; |
a89aa300 | 49 | struct disassemble_info; |
e2d0e7eb | 50 | struct target_ops; |
030f20e1 | 51 | struct obstack; |
0f71a2f6 | 52 | |
0f71a2f6 JM |
53 | extern struct gdbarch *current_gdbarch; |
54 | ||
55 | ||
0f71a2f6 JM |
56 | /* If any of the following are defined, the target wasn't correctly |
57 | converted. */ | |
58 | ||
83905903 AC |
59 | #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PURE) && defined (GDB_TM_FILE) |
60 | #error "GDB_TM_FILE: Pure multi-arch targets do not have a tm.h file." | |
61 | #endif | |
62 | ||
0f71a2f6 JM |
63 | |
64 | /* The following are pre-initialized by GDBARCH. */ | |
65 | ||
104c1213 | 66 | extern const struct bfd_arch_info * gdbarch_bfd_arch_info (struct gdbarch *gdbarch); |
0f71a2f6 | 67 | /* set_gdbarch_bfd_arch_info() - not applicable - pre-initialized. */ |
83905903 AC |
68 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_ARCHITECTURE) |
69 | #error "Non multi-arch definition of TARGET_ARCHITECTURE" | |
70 | #endif | |
c25083af | 71 | #if !defined (TARGET_ARCHITECTURE) |
0f71a2f6 JM |
72 | #define TARGET_ARCHITECTURE (gdbarch_bfd_arch_info (current_gdbarch)) |
73 | #endif | |
0f71a2f6 | 74 | |
104c1213 | 75 | extern int gdbarch_byte_order (struct gdbarch *gdbarch); |
0f71a2f6 | 76 | /* set_gdbarch_byte_order() - not applicable - pre-initialized. */ |
83905903 AC |
77 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_BYTE_ORDER) |
78 | #error "Non multi-arch definition of TARGET_BYTE_ORDER" | |
79 | #endif | |
c25083af | 80 | #if !defined (TARGET_BYTE_ORDER) |
0f71a2f6 JM |
81 | #define TARGET_BYTE_ORDER (gdbarch_byte_order (current_gdbarch)) |
82 | #endif | |
0f71a2f6 | 83 | |
4be87837 DJ |
84 | extern enum gdb_osabi gdbarch_osabi (struct gdbarch *gdbarch); |
85 | /* set_gdbarch_osabi() - not applicable - pre-initialized. */ | |
86 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_OSABI) | |
87 | #error "Non multi-arch definition of TARGET_OSABI" | |
88 | #endif | |
c25083af | 89 | #if !defined (TARGET_OSABI) |
4be87837 DJ |
90 | #define TARGET_OSABI (gdbarch_osabi (current_gdbarch)) |
91 | #endif | |
4be87837 | 92 | |
0f71a2f6 | 93 | |
99e7bb18 | 94 | /* The following are initialized by the target dependent code. */ |
0f71a2f6 | 95 | |
66b43ecb AC |
96 | /* Number of bits in a char or unsigned char for the target machine. |
97 | Just like CHAR_BIT in <limits.h> but describes the target machine. | |
e669114a | 98 | v:2:TARGET_CHAR_BIT:int:char_bit::::8 * sizeof (char):8::0: |
66b43ecb AC |
99 | |
100 | Number of bits in a short or unsigned short for the target machine. */ | |
c4093a6a | 101 | |
104c1213 JM |
102 | extern int gdbarch_short_bit (struct gdbarch *gdbarch); |
103 | extern void set_gdbarch_short_bit (struct gdbarch *gdbarch, int short_bit); | |
83905903 AC |
104 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_SHORT_BIT) |
105 | #error "Non multi-arch definition of TARGET_SHORT_BIT" | |
106 | #endif | |
c25083af | 107 | #if !defined (TARGET_SHORT_BIT) |
0f71a2f6 JM |
108 | #define TARGET_SHORT_BIT (gdbarch_short_bit (current_gdbarch)) |
109 | #endif | |
0f71a2f6 | 110 | |
66b43ecb AC |
111 | /* Number of bits in an int or unsigned int for the target machine. */ |
112 | ||
104c1213 JM |
113 | extern int gdbarch_int_bit (struct gdbarch *gdbarch); |
114 | extern void set_gdbarch_int_bit (struct gdbarch *gdbarch, int int_bit); | |
83905903 AC |
115 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_INT_BIT) |
116 | #error "Non multi-arch definition of TARGET_INT_BIT" | |
117 | #endif | |
c25083af | 118 | #if !defined (TARGET_INT_BIT) |
0f71a2f6 JM |
119 | #define TARGET_INT_BIT (gdbarch_int_bit (current_gdbarch)) |
120 | #endif | |
0f71a2f6 | 121 | |
66b43ecb AC |
122 | /* Number of bits in a long or unsigned long for the target machine. */ |
123 | ||
104c1213 JM |
124 | extern int gdbarch_long_bit (struct gdbarch *gdbarch); |
125 | extern void set_gdbarch_long_bit (struct gdbarch *gdbarch, int long_bit); | |
83905903 AC |
126 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_BIT) |
127 | #error "Non multi-arch definition of TARGET_LONG_BIT" | |
128 | #endif | |
c25083af | 129 | #if !defined (TARGET_LONG_BIT) |
0f71a2f6 JM |
130 | #define TARGET_LONG_BIT (gdbarch_long_bit (current_gdbarch)) |
131 | #endif | |
0f71a2f6 | 132 | |
66b43ecb AC |
133 | /* Number of bits in a long long or unsigned long long for the target |
134 | machine. */ | |
135 | ||
104c1213 JM |
136 | extern int gdbarch_long_long_bit (struct gdbarch *gdbarch); |
137 | extern void set_gdbarch_long_long_bit (struct gdbarch *gdbarch, int long_long_bit); | |
83905903 AC |
138 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_LONG_BIT) |
139 | #error "Non multi-arch definition of TARGET_LONG_LONG_BIT" | |
140 | #endif | |
c25083af | 141 | #if !defined (TARGET_LONG_LONG_BIT) |
0f71a2f6 JM |
142 | #define TARGET_LONG_LONG_BIT (gdbarch_long_long_bit (current_gdbarch)) |
143 | #endif | |
0f71a2f6 | 144 | |
66b43ecb AC |
145 | /* Number of bits in a float for the target machine. */ |
146 | ||
104c1213 JM |
147 | extern int gdbarch_float_bit (struct gdbarch *gdbarch); |
148 | extern void set_gdbarch_float_bit (struct gdbarch *gdbarch, int float_bit); | |
83905903 AC |
149 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_FLOAT_BIT) |
150 | #error "Non multi-arch definition of TARGET_FLOAT_BIT" | |
151 | #endif | |
c25083af | 152 | #if !defined (TARGET_FLOAT_BIT) |
0f71a2f6 JM |
153 | #define TARGET_FLOAT_BIT (gdbarch_float_bit (current_gdbarch)) |
154 | #endif | |
0f71a2f6 | 155 | |
66b43ecb AC |
156 | /* Number of bits in a double for the target machine. */ |
157 | ||
104c1213 JM |
158 | extern int gdbarch_double_bit (struct gdbarch *gdbarch); |
159 | extern void set_gdbarch_double_bit (struct gdbarch *gdbarch, int double_bit); | |
83905903 AC |
160 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_DOUBLE_BIT) |
161 | #error "Non multi-arch definition of TARGET_DOUBLE_BIT" | |
162 | #endif | |
c25083af | 163 | #if !defined (TARGET_DOUBLE_BIT) |
0f71a2f6 JM |
164 | #define TARGET_DOUBLE_BIT (gdbarch_double_bit (current_gdbarch)) |
165 | #endif | |
0f71a2f6 | 166 | |
66b43ecb AC |
167 | /* Number of bits in a long double for the target machine. */ |
168 | ||
104c1213 JM |
169 | extern int gdbarch_long_double_bit (struct gdbarch *gdbarch); |
170 | extern void set_gdbarch_long_double_bit (struct gdbarch *gdbarch, int long_double_bit); | |
83905903 AC |
171 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_DOUBLE_BIT) |
172 | #error "Non multi-arch definition of TARGET_LONG_DOUBLE_BIT" | |
173 | #endif | |
c25083af | 174 | #if !defined (TARGET_LONG_DOUBLE_BIT) |
0f71a2f6 JM |
175 | #define TARGET_LONG_DOUBLE_BIT (gdbarch_long_double_bit (current_gdbarch)) |
176 | #endif | |
0f71a2f6 | 177 | |
52204a0b DT |
178 | /* For most targets, a pointer on the target and its representation as an |
179 | address in GDB have the same size and "look the same". For such a | |
180 | target, you need only set TARGET_PTR_BIT / ptr_bit and TARGET_ADDR_BIT | |
181 | / addr_bit will be set from it. | |
182 | ||
183 | If TARGET_PTR_BIT and TARGET_ADDR_BIT are different, you'll probably | |
184 | also need to set POINTER_TO_ADDRESS and ADDRESS_TO_POINTER as well. | |
185 | ||
186 | ptr_bit is the size of a pointer on the target */ | |
66b43ecb | 187 | |
66b43ecb AC |
188 | extern int gdbarch_ptr_bit (struct gdbarch *gdbarch); |
189 | extern void set_gdbarch_ptr_bit (struct gdbarch *gdbarch, int ptr_bit); | |
83905903 AC |
190 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_PTR_BIT) |
191 | #error "Non multi-arch definition of TARGET_PTR_BIT" | |
192 | #endif | |
c25083af | 193 | #if !defined (TARGET_PTR_BIT) |
66b43ecb AC |
194 | #define TARGET_PTR_BIT (gdbarch_ptr_bit (current_gdbarch)) |
195 | #endif | |
66b43ecb | 196 | |
52204a0b DT |
197 | /* addr_bit is the size of a target address as represented in gdb */ |
198 | ||
52204a0b DT |
199 | extern int gdbarch_addr_bit (struct gdbarch *gdbarch); |
200 | extern void set_gdbarch_addr_bit (struct gdbarch *gdbarch, int addr_bit); | |
83905903 AC |
201 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_ADDR_BIT) |
202 | #error "Non multi-arch definition of TARGET_ADDR_BIT" | |
203 | #endif | |
c25083af | 204 | #if !defined (TARGET_ADDR_BIT) |
52204a0b DT |
205 | #define TARGET_ADDR_BIT (gdbarch_addr_bit (current_gdbarch)) |
206 | #endif | |
52204a0b | 207 | |
66b43ecb AC |
208 | /* Number of bits in a BFD_VMA for the target object file format. */ |
209 | ||
66b43ecb AC |
210 | extern int gdbarch_bfd_vma_bit (struct gdbarch *gdbarch); |
211 | extern void set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch, int bfd_vma_bit); | |
83905903 AC |
212 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_BFD_VMA_BIT) |
213 | #error "Non multi-arch definition of TARGET_BFD_VMA_BIT" | |
214 | #endif | |
c25083af | 215 | #if !defined (TARGET_BFD_VMA_BIT) |
66b43ecb AC |
216 | #define TARGET_BFD_VMA_BIT (gdbarch_bfd_vma_bit (current_gdbarch)) |
217 | #endif | |
66b43ecb | 218 | |
4e409299 JB |
219 | /* One if `char' acts like `signed char', zero if `unsigned char'. */ |
220 | ||
4e409299 JB |
221 | extern int gdbarch_char_signed (struct gdbarch *gdbarch); |
222 | extern void set_gdbarch_char_signed (struct gdbarch *gdbarch, int char_signed); | |
223 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_CHAR_SIGNED) | |
224 | #error "Non multi-arch definition of TARGET_CHAR_SIGNED" | |
225 | #endif | |
c25083af | 226 | #if !defined (TARGET_CHAR_SIGNED) |
4e409299 JB |
227 | #define TARGET_CHAR_SIGNED (gdbarch_char_signed (current_gdbarch)) |
228 | #endif | |
4e409299 | 229 | |
cde9ea48 AC |
230 | #if defined (TARGET_READ_PC) |
231 | /* Legacy for systems yet to multi-arch TARGET_READ_PC */ | |
232 | #if !defined (TARGET_READ_PC_P) | |
233 | #define TARGET_READ_PC_P() (1) | |
234 | #endif | |
235 | #endif | |
236 | ||
cde9ea48 AC |
237 | extern int gdbarch_read_pc_p (struct gdbarch *gdbarch); |
238 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_READ_PC_P) | |
239 | #error "Non multi-arch definition of TARGET_READ_PC" | |
240 | #endif | |
241 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_READ_PC_P) | |
242 | #define TARGET_READ_PC_P() (gdbarch_read_pc_p (current_gdbarch)) | |
243 | #endif | |
244 | ||
39f77062 KB |
245 | typedef CORE_ADDR (gdbarch_read_pc_ftype) (ptid_t ptid); |
246 | extern CORE_ADDR gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid); | |
104c1213 | 247 | extern void set_gdbarch_read_pc (struct gdbarch *gdbarch, gdbarch_read_pc_ftype *read_pc); |
83905903 AC |
248 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_READ_PC) |
249 | #error "Non multi-arch definition of TARGET_READ_PC" | |
250 | #endif | |
c25083af | 251 | #if !defined (TARGET_READ_PC) |
39f77062 | 252 | #define TARGET_READ_PC(ptid) (gdbarch_read_pc (current_gdbarch, ptid)) |
0f71a2f6 | 253 | #endif |
0f71a2f6 | 254 | |
39f77062 KB |
255 | typedef void (gdbarch_write_pc_ftype) (CORE_ADDR val, ptid_t ptid); |
256 | extern void gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid); | |
104c1213 | 257 | extern void set_gdbarch_write_pc (struct gdbarch *gdbarch, gdbarch_write_pc_ftype *write_pc); |
83905903 AC |
258 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_WRITE_PC) |
259 | #error "Non multi-arch definition of TARGET_WRITE_PC" | |
260 | #endif | |
c25083af | 261 | #if !defined (TARGET_WRITE_PC) |
39f77062 | 262 | #define TARGET_WRITE_PC(val, ptid) (gdbarch_write_pc (current_gdbarch, val, ptid)) |
0f71a2f6 | 263 | #endif |
0f71a2f6 | 264 | |
a9e5fdc2 AC |
265 | /* UNWIND_SP is a direct replacement for TARGET_READ_SP. */ |
266 | ||
bd1ce8ba AC |
267 | #if defined (TARGET_READ_SP) |
268 | /* Legacy for systems yet to multi-arch TARGET_READ_SP */ | |
269 | #if !defined (TARGET_READ_SP_P) | |
270 | #define TARGET_READ_SP_P() (1) | |
271 | #endif | |
272 | #endif | |
273 | ||
bd1ce8ba AC |
274 | extern int gdbarch_read_sp_p (struct gdbarch *gdbarch); |
275 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_READ_SP_P) | |
276 | #error "Non multi-arch definition of TARGET_READ_SP" | |
277 | #endif | |
278 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_READ_SP_P) | |
279 | #define TARGET_READ_SP_P() (gdbarch_read_sp_p (current_gdbarch)) | |
280 | #endif | |
281 | ||
104c1213 JM |
282 | typedef CORE_ADDR (gdbarch_read_sp_ftype) (void); |
283 | extern CORE_ADDR gdbarch_read_sp (struct gdbarch *gdbarch); | |
284 | extern void set_gdbarch_read_sp (struct gdbarch *gdbarch, gdbarch_read_sp_ftype *read_sp); | |
83905903 AC |
285 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_READ_SP) |
286 | #error "Non multi-arch definition of TARGET_READ_SP" | |
287 | #endif | |
c25083af | 288 | #if !defined (TARGET_READ_SP) |
0f71a2f6 JM |
289 | #define TARGET_READ_SP() (gdbarch_read_sp (current_gdbarch)) |
290 | #endif | |
0f71a2f6 | 291 | |
39d4ef09 AC |
292 | /* Function for getting target's idea of a frame pointer. FIXME: GDB's |
293 | whole scheme for dealing with "frames" and "frame pointers" needs a | |
294 | serious shakedown. */ | |
295 | ||
39d4ef09 AC |
296 | typedef void (gdbarch_virtual_frame_pointer_ftype) (CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset); |
297 | extern void gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset); | |
298 | extern void set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer); | |
299 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_VIRTUAL_FRAME_POINTER) | |
300 | #error "Non multi-arch definition of TARGET_VIRTUAL_FRAME_POINTER" | |
301 | #endif | |
c25083af | 302 | #if !defined (TARGET_VIRTUAL_FRAME_POINTER) |
39d4ef09 AC |
303 | #define TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset) (gdbarch_virtual_frame_pointer (current_gdbarch, pc, frame_regnum, frame_offset)) |
304 | #endif | |
39d4ef09 | 305 | |
d8124050 | 306 | extern int gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch); |
61a0eb5b | 307 | |
d8124050 AC |
308 | typedef void (gdbarch_pseudo_register_read_ftype) (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf); |
309 | extern void gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf); | |
310 | extern void set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch, gdbarch_pseudo_register_read_ftype *pseudo_register_read); | |
61a0eb5b | 311 | |
d8124050 | 312 | extern int gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch); |
61a0eb5b | 313 | |
d8124050 AC |
314 | typedef void (gdbarch_pseudo_register_write_ftype) (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf); |
315 | extern void gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf); | |
316 | extern void set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch, gdbarch_pseudo_register_write_ftype *pseudo_register_write); | |
61a0eb5b | 317 | |
104c1213 JM |
318 | extern int gdbarch_num_regs (struct gdbarch *gdbarch); |
319 | extern void set_gdbarch_num_regs (struct gdbarch *gdbarch, int num_regs); | |
83905903 AC |
320 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NUM_REGS) |
321 | #error "Non multi-arch definition of NUM_REGS" | |
322 | #endif | |
c25083af | 323 | #if !defined (NUM_REGS) |
0f71a2f6 JM |
324 | #define NUM_REGS (gdbarch_num_regs (current_gdbarch)) |
325 | #endif | |
0f71a2f6 | 326 | |
34620563 AC |
327 | /* This macro gives the number of pseudo-registers that live in the |
328 | register namespace but do not get fetched or stored on the target. | |
329 | These pseudo-registers may be aliases for other registers, | |
330 | combinations of other registers, or they may be computed by GDB. */ | |
331 | ||
0aba1244 EZ |
332 | extern int gdbarch_num_pseudo_regs (struct gdbarch *gdbarch); |
333 | extern void set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch, int num_pseudo_regs); | |
83905903 AC |
334 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NUM_PSEUDO_REGS) |
335 | #error "Non multi-arch definition of NUM_PSEUDO_REGS" | |
336 | #endif | |
c25083af | 337 | #if !defined (NUM_PSEUDO_REGS) |
0aba1244 EZ |
338 | #define NUM_PSEUDO_REGS (gdbarch_num_pseudo_regs (current_gdbarch)) |
339 | #endif | |
0aba1244 | 340 | |
c2169756 AC |
341 | /* GDB's standard (or well known) register numbers. These can map onto |
342 | a real register or a pseudo (computed) register or not be defined at | |
a9e5fdc2 AC |
343 | all (-1). |
344 | SP_REGNUM will hopefully be replaced by UNWIND_SP. */ | |
1200cd6e | 345 | |
104c1213 JM |
346 | extern int gdbarch_sp_regnum (struct gdbarch *gdbarch); |
347 | extern void set_gdbarch_sp_regnum (struct gdbarch *gdbarch, int sp_regnum); | |
83905903 AC |
348 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SP_REGNUM) |
349 | #error "Non multi-arch definition of SP_REGNUM" | |
350 | #endif | |
c25083af | 351 | #if !defined (SP_REGNUM) |
0f71a2f6 JM |
352 | #define SP_REGNUM (gdbarch_sp_regnum (current_gdbarch)) |
353 | #endif | |
0f71a2f6 | 354 | |
104c1213 JM |
355 | extern int gdbarch_pc_regnum (struct gdbarch *gdbarch); |
356 | extern void set_gdbarch_pc_regnum (struct gdbarch *gdbarch, int pc_regnum); | |
83905903 AC |
357 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PC_REGNUM) |
358 | #error "Non multi-arch definition of PC_REGNUM" | |
359 | #endif | |
c25083af | 360 | #if !defined (PC_REGNUM) |
0f71a2f6 JM |
361 | #define PC_REGNUM (gdbarch_pc_regnum (current_gdbarch)) |
362 | #endif | |
0f71a2f6 | 363 | |
c2169756 AC |
364 | extern int gdbarch_ps_regnum (struct gdbarch *gdbarch); |
365 | extern void set_gdbarch_ps_regnum (struct gdbarch *gdbarch, int ps_regnum); | |
366 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PS_REGNUM) | |
367 | #error "Non multi-arch definition of PS_REGNUM" | |
368 | #endif | |
c25083af | 369 | #if !defined (PS_REGNUM) |
c2169756 AC |
370 | #define PS_REGNUM (gdbarch_ps_regnum (current_gdbarch)) |
371 | #endif | |
c2169756 | 372 | |
60054393 MS |
373 | extern int gdbarch_fp0_regnum (struct gdbarch *gdbarch); |
374 | extern void set_gdbarch_fp0_regnum (struct gdbarch *gdbarch, int fp0_regnum); | |
83905903 AC |
375 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FP0_REGNUM) |
376 | #error "Non multi-arch definition of FP0_REGNUM" | |
377 | #endif | |
c25083af | 378 | #if !defined (FP0_REGNUM) |
60054393 MS |
379 | #define FP0_REGNUM (gdbarch_fp0_regnum (current_gdbarch)) |
380 | #endif | |
60054393 | 381 | |
88c72b7d AC |
382 | /* Convert stab register number (from `r' declaration) to a gdb REGNUM. */ |
383 | ||
88c72b7d AC |
384 | typedef int (gdbarch_stab_reg_to_regnum_ftype) (int stab_regnr); |
385 | extern int gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr); | |
386 | extern void set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum); | |
83905903 AC |
387 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STAB_REG_TO_REGNUM) |
388 | #error "Non multi-arch definition of STAB_REG_TO_REGNUM" | |
389 | #endif | |
c25083af | 390 | #if !defined (STAB_REG_TO_REGNUM) |
88c72b7d AC |
391 | #define STAB_REG_TO_REGNUM(stab_regnr) (gdbarch_stab_reg_to_regnum (current_gdbarch, stab_regnr)) |
392 | #endif | |
88c72b7d AC |
393 | |
394 | /* Provide a default mapping from a ecoff register number to a gdb REGNUM. */ | |
395 | ||
88c72b7d AC |
396 | typedef int (gdbarch_ecoff_reg_to_regnum_ftype) (int ecoff_regnr); |
397 | extern int gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr); | |
398 | extern void set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum); | |
83905903 AC |
399 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ECOFF_REG_TO_REGNUM) |
400 | #error "Non multi-arch definition of ECOFF_REG_TO_REGNUM" | |
401 | #endif | |
c25083af | 402 | #if !defined (ECOFF_REG_TO_REGNUM) |
88c72b7d AC |
403 | #define ECOFF_REG_TO_REGNUM(ecoff_regnr) (gdbarch_ecoff_reg_to_regnum (current_gdbarch, ecoff_regnr)) |
404 | #endif | |
88c72b7d AC |
405 | |
406 | /* Provide a default mapping from a DWARF register number to a gdb REGNUM. */ | |
407 | ||
88c72b7d AC |
408 | typedef int (gdbarch_dwarf_reg_to_regnum_ftype) (int dwarf_regnr); |
409 | extern int gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr); | |
410 | extern void set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_dwarf_reg_to_regnum_ftype *dwarf_reg_to_regnum); | |
83905903 AC |
411 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF_REG_TO_REGNUM) |
412 | #error "Non multi-arch definition of DWARF_REG_TO_REGNUM" | |
413 | #endif | |
c25083af | 414 | #if !defined (DWARF_REG_TO_REGNUM) |
88c72b7d AC |
415 | #define DWARF_REG_TO_REGNUM(dwarf_regnr) (gdbarch_dwarf_reg_to_regnum (current_gdbarch, dwarf_regnr)) |
416 | #endif | |
88c72b7d | 417 | |
77949794 | 418 | /* Convert from an sdb register number to an internal gdb register number. */ |
88c72b7d | 419 | |
88c72b7d AC |
420 | typedef int (gdbarch_sdb_reg_to_regnum_ftype) (int sdb_regnr); |
421 | extern int gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr); | |
422 | extern void set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum); | |
83905903 AC |
423 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SDB_REG_TO_REGNUM) |
424 | #error "Non multi-arch definition of SDB_REG_TO_REGNUM" | |
425 | #endif | |
c25083af | 426 | #if !defined (SDB_REG_TO_REGNUM) |
88c72b7d AC |
427 | #define SDB_REG_TO_REGNUM(sdb_regnr) (gdbarch_sdb_reg_to_regnum (current_gdbarch, sdb_regnr)) |
428 | #endif | |
88c72b7d | 429 | |
88c72b7d AC |
430 | typedef int (gdbarch_dwarf2_reg_to_regnum_ftype) (int dwarf2_regnr); |
431 | extern int gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr); | |
432 | extern void set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum); | |
83905903 AC |
433 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF2_REG_TO_REGNUM) |
434 | #error "Non multi-arch definition of DWARF2_REG_TO_REGNUM" | |
435 | #endif | |
c25083af | 436 | #if !defined (DWARF2_REG_TO_REGNUM) |
88c72b7d AC |
437 | #define DWARF2_REG_TO_REGNUM(dwarf2_regnr) (gdbarch_dwarf2_reg_to_regnum (current_gdbarch, dwarf2_regnr)) |
438 | #endif | |
88c72b7d | 439 | |
fa88f677 AC |
440 | typedef const char * (gdbarch_register_name_ftype) (int regnr); |
441 | extern const char * gdbarch_register_name (struct gdbarch *gdbarch, int regnr); | |
104c1213 | 442 | extern void set_gdbarch_register_name (struct gdbarch *gdbarch, gdbarch_register_name_ftype *register_name); |
83905903 AC |
443 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_NAME) |
444 | #error "Non multi-arch definition of REGISTER_NAME" | |
445 | #endif | |
c25083af | 446 | #if !defined (REGISTER_NAME) |
0f71a2f6 JM |
447 | #define REGISTER_NAME(regnr) (gdbarch_register_name (current_gdbarch, regnr)) |
448 | #endif | |
0f71a2f6 | 449 | |
2e092625 | 450 | /* REGISTER_TYPE is a direct replacement for DEPRECATED_REGISTER_VIRTUAL_TYPE. */ |
9c04cab7 AC |
451 | |
452 | extern int gdbarch_register_type_p (struct gdbarch *gdbarch); | |
453 | ||
454 | typedef struct type * (gdbarch_register_type_ftype) (struct gdbarch *gdbarch, int reg_nr); | |
455 | extern struct type * gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr); | |
456 | extern void set_gdbarch_register_type (struct gdbarch *gdbarch, gdbarch_register_type_ftype *register_type); | |
457 | ||
2e092625 | 458 | /* REGISTER_TYPE is a direct replacement for DEPRECATED_REGISTER_VIRTUAL_TYPE. */ |
9c04cab7 | 459 | |
2e092625 AC |
460 | #if defined (DEPRECATED_REGISTER_VIRTUAL_TYPE) |
461 | /* Legacy for systems yet to multi-arch DEPRECATED_REGISTER_VIRTUAL_TYPE */ | |
462 | #if !defined (DEPRECATED_REGISTER_VIRTUAL_TYPE_P) | |
463 | #define DEPRECATED_REGISTER_VIRTUAL_TYPE_P() (1) | |
9c04cab7 AC |
464 | #endif |
465 | #endif | |
466 | ||
9c04cab7 | 467 | extern int gdbarch_deprecated_register_virtual_type_p (struct gdbarch *gdbarch); |
2e092625 AC |
468 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_VIRTUAL_TYPE_P) |
469 | #error "Non multi-arch definition of DEPRECATED_REGISTER_VIRTUAL_TYPE" | |
9c04cab7 | 470 | #endif |
2e092625 AC |
471 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_REGISTER_VIRTUAL_TYPE_P) |
472 | #define DEPRECATED_REGISTER_VIRTUAL_TYPE_P() (gdbarch_deprecated_register_virtual_type_p (current_gdbarch)) | |
9c04cab7 AC |
473 | #endif |
474 | ||
9c04cab7 AC |
475 | typedef struct type * (gdbarch_deprecated_register_virtual_type_ftype) (int reg_nr); |
476 | extern struct type * gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch, int reg_nr); | |
477 | extern void set_gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch, gdbarch_deprecated_register_virtual_type_ftype *deprecated_register_virtual_type); | |
2e092625 AC |
478 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_VIRTUAL_TYPE) |
479 | #error "Non multi-arch definition of DEPRECATED_REGISTER_VIRTUAL_TYPE" | |
9c04cab7 | 480 | #endif |
2e092625 AC |
481 | #if !defined (DEPRECATED_REGISTER_VIRTUAL_TYPE) |
482 | #define DEPRECATED_REGISTER_VIRTUAL_TYPE(reg_nr) (gdbarch_deprecated_register_virtual_type (current_gdbarch, reg_nr)) | |
9c04cab7 AC |
483 | #endif |
484 | ||
485 | /* DEPRECATED_REGISTER_BYTES can be deleted. The value is computed | |
486 | from REGISTER_TYPE. */ | |
487 | ||
b8b527c5 AC |
488 | extern int gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch); |
489 | extern void set_gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch, int deprecated_register_bytes); | |
490 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_BYTES) | |
491 | #error "Non multi-arch definition of DEPRECATED_REGISTER_BYTES" | |
83905903 | 492 | #endif |
b8b527c5 AC |
493 | #if !defined (DEPRECATED_REGISTER_BYTES) |
494 | #define DEPRECATED_REGISTER_BYTES (gdbarch_deprecated_register_bytes (current_gdbarch)) | |
0f71a2f6 | 495 | #endif |
0f71a2f6 | 496 | |
f3be58bc AC |
497 | /* If the value returned by DEPRECATED_REGISTER_BYTE agrees with the |
498 | register offsets computed using just REGISTER_TYPE, this can be | |
499 | deleted. See: maint print registers. NOTE: cagney/2002-05-02: This | |
500 | function with predicate has a valid (callable) initial value. As a | |
501 | consequence, even when the predicate is false, the corresponding | |
502 | function works. This simplifies the migration process - old code, | |
503 | calling DEPRECATED_REGISTER_BYTE, doesn't need to be modified. */ | |
46654a5b | 504 | |
62700349 AC |
505 | #if defined (DEPRECATED_REGISTER_BYTE) |
506 | /* Legacy for systems yet to multi-arch DEPRECATED_REGISTER_BYTE */ | |
507 | #if !defined (DEPRECATED_REGISTER_BYTE_P) | |
508 | #define DEPRECATED_REGISTER_BYTE_P() (1) | |
46654a5b AC |
509 | #endif |
510 | #endif | |
511 | ||
9c04cab7 | 512 | extern int gdbarch_deprecated_register_byte_p (struct gdbarch *gdbarch); |
62700349 AC |
513 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_BYTE_P) |
514 | #error "Non multi-arch definition of DEPRECATED_REGISTER_BYTE" | |
46654a5b | 515 | #endif |
62700349 AC |
516 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_REGISTER_BYTE_P) |
517 | #define DEPRECATED_REGISTER_BYTE_P() (gdbarch_deprecated_register_byte_p (current_gdbarch)) | |
46654a5b AC |
518 | #endif |
519 | ||
9c04cab7 AC |
520 | typedef int (gdbarch_deprecated_register_byte_ftype) (int reg_nr); |
521 | extern int gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, int reg_nr); | |
522 | extern void set_gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, gdbarch_deprecated_register_byte_ftype *deprecated_register_byte); | |
62700349 AC |
523 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_BYTE) |
524 | #error "Non multi-arch definition of DEPRECATED_REGISTER_BYTE" | |
83905903 | 525 | #endif |
62700349 AC |
526 | #if !defined (DEPRECATED_REGISTER_BYTE) |
527 | #define DEPRECATED_REGISTER_BYTE(reg_nr) (gdbarch_deprecated_register_byte (current_gdbarch, reg_nr)) | |
0f71a2f6 | 528 | #endif |
0f71a2f6 | 529 | |
f3be58bc AC |
530 | /* If all registers have identical raw and virtual sizes and those |
531 | sizes agree with the value computed from REGISTER_TYPE, | |
532 | DEPRECATED_REGISTER_RAW_SIZE can be deleted. See: maint print | |
533 | registers. */ | |
35cac7cf | 534 | |
12c266ea AC |
535 | #if defined (DEPRECATED_REGISTER_RAW_SIZE) |
536 | /* Legacy for systems yet to multi-arch DEPRECATED_REGISTER_RAW_SIZE */ | |
537 | #if !defined (DEPRECATED_REGISTER_RAW_SIZE_P) | |
538 | #define DEPRECATED_REGISTER_RAW_SIZE_P() (1) | |
dadd712e AC |
539 | #endif |
540 | #endif | |
541 | ||
dadd712e | 542 | extern int gdbarch_deprecated_register_raw_size_p (struct gdbarch *gdbarch); |
12c266ea AC |
543 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_RAW_SIZE_P) |
544 | #error "Non multi-arch definition of DEPRECATED_REGISTER_RAW_SIZE" | |
dadd712e | 545 | #endif |
12c266ea AC |
546 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_REGISTER_RAW_SIZE_P) |
547 | #define DEPRECATED_REGISTER_RAW_SIZE_P() (gdbarch_deprecated_register_raw_size_p (current_gdbarch)) | |
dadd712e AC |
548 | #endif |
549 | ||
9c04cab7 AC |
550 | typedef int (gdbarch_deprecated_register_raw_size_ftype) (int reg_nr); |
551 | extern int gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, int reg_nr); | |
552 | extern void set_gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, gdbarch_deprecated_register_raw_size_ftype *deprecated_register_raw_size); | |
12c266ea AC |
553 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_RAW_SIZE) |
554 | #error "Non multi-arch definition of DEPRECATED_REGISTER_RAW_SIZE" | |
83905903 | 555 | #endif |
12c266ea AC |
556 | #if !defined (DEPRECATED_REGISTER_RAW_SIZE) |
557 | #define DEPRECATED_REGISTER_RAW_SIZE(reg_nr) (gdbarch_deprecated_register_raw_size (current_gdbarch, reg_nr)) | |
9c04cab7 AC |
558 | #endif |
559 | ||
f3be58bc AC |
560 | /* If all registers have identical raw and virtual sizes and those |
561 | sizes agree with the value computed from REGISTER_TYPE, | |
562 | DEPRECATED_REGISTER_VIRTUAL_SIZE can be deleted. See: maint print | |
563 | registers. */ | |
9c04cab7 | 564 | |
f30992d4 AC |
565 | #if defined (DEPRECATED_REGISTER_VIRTUAL_SIZE) |
566 | /* Legacy for systems yet to multi-arch DEPRECATED_REGISTER_VIRTUAL_SIZE */ | |
567 | #if !defined (DEPRECATED_REGISTER_VIRTUAL_SIZE_P) | |
568 | #define DEPRECATED_REGISTER_VIRTUAL_SIZE_P() (1) | |
dadd712e AC |
569 | #endif |
570 | #endif | |
571 | ||
dadd712e | 572 | extern int gdbarch_deprecated_register_virtual_size_p (struct gdbarch *gdbarch); |
f30992d4 AC |
573 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_VIRTUAL_SIZE_P) |
574 | #error "Non multi-arch definition of DEPRECATED_REGISTER_VIRTUAL_SIZE" | |
dadd712e | 575 | #endif |
f30992d4 AC |
576 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_REGISTER_VIRTUAL_SIZE_P) |
577 | #define DEPRECATED_REGISTER_VIRTUAL_SIZE_P() (gdbarch_deprecated_register_virtual_size_p (current_gdbarch)) | |
dadd712e AC |
578 | #endif |
579 | ||
9c04cab7 AC |
580 | typedef int (gdbarch_deprecated_register_virtual_size_ftype) (int reg_nr); |
581 | extern int gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, int reg_nr); | |
582 | extern void set_gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, gdbarch_deprecated_register_virtual_size_ftype *deprecated_register_virtual_size); | |
f30992d4 AC |
583 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_VIRTUAL_SIZE) |
584 | #error "Non multi-arch definition of DEPRECATED_REGISTER_VIRTUAL_SIZE" | |
9c04cab7 | 585 | #endif |
f30992d4 AC |
586 | #if !defined (DEPRECATED_REGISTER_VIRTUAL_SIZE) |
587 | #define DEPRECATED_REGISTER_VIRTUAL_SIZE(reg_nr) (gdbarch_deprecated_register_virtual_size (current_gdbarch, reg_nr)) | |
9c04cab7 AC |
588 | #endif |
589 | ||
590 | /* DEPRECATED_MAX_REGISTER_RAW_SIZE can be deleted. It has been | |
591 | replaced by the constant MAX_REGISTER_SIZE. */ | |
35cac7cf | 592 | |
a0ed5532 AC |
593 | #if defined (DEPRECATED_MAX_REGISTER_RAW_SIZE) |
594 | /* Legacy for systems yet to multi-arch DEPRECATED_MAX_REGISTER_RAW_SIZE */ | |
595 | #if !defined (DEPRECATED_MAX_REGISTER_RAW_SIZE_P) | |
596 | #define DEPRECATED_MAX_REGISTER_RAW_SIZE_P() (1) | |
597 | #endif | |
598 | #endif | |
599 | ||
a0ed5532 AC |
600 | extern int gdbarch_deprecated_max_register_raw_size_p (struct gdbarch *gdbarch); |
601 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_MAX_REGISTER_RAW_SIZE_P) | |
602 | #error "Non multi-arch definition of DEPRECATED_MAX_REGISTER_RAW_SIZE" | |
603 | #endif | |
604 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_MAX_REGISTER_RAW_SIZE_P) | |
605 | #define DEPRECATED_MAX_REGISTER_RAW_SIZE_P() (gdbarch_deprecated_max_register_raw_size_p (current_gdbarch)) | |
606 | #endif | |
607 | ||
a0ed5532 AC |
608 | extern int gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch); |
609 | extern void set_gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch, int deprecated_max_register_raw_size); | |
610 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_MAX_REGISTER_RAW_SIZE) | |
611 | #error "Non multi-arch definition of DEPRECATED_MAX_REGISTER_RAW_SIZE" | |
83905903 | 612 | #endif |
c25083af | 613 | #if !defined (DEPRECATED_MAX_REGISTER_RAW_SIZE) |
a0ed5532 | 614 | #define DEPRECATED_MAX_REGISTER_RAW_SIZE (gdbarch_deprecated_max_register_raw_size (current_gdbarch)) |
0f71a2f6 | 615 | #endif |
0f71a2f6 | 616 | |
9c04cab7 AC |
617 | /* DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE can be deleted. It has been |
618 | replaced by the constant MAX_REGISTER_SIZE. */ | |
35cac7cf | 619 | |
a0ed5532 AC |
620 | #if defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE) |
621 | /* Legacy for systems yet to multi-arch DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE */ | |
622 | #if !defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P) | |
623 | #define DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() (1) | |
624 | #endif | |
625 | #endif | |
626 | ||
a0ed5532 AC |
627 | extern int gdbarch_deprecated_max_register_virtual_size_p (struct gdbarch *gdbarch); |
628 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P) | |
629 | #error "Non multi-arch definition of DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE" | |
630 | #endif | |
631 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P) | |
632 | #define DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() (gdbarch_deprecated_max_register_virtual_size_p (current_gdbarch)) | |
633 | #endif | |
634 | ||
a0ed5532 AC |
635 | extern int gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch); |
636 | extern void set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch, int deprecated_max_register_virtual_size); | |
637 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE) | |
638 | #error "Non multi-arch definition of DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE" | |
83905903 | 639 | #endif |
c25083af | 640 | #if !defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE) |
a0ed5532 | 641 | #define DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE (gdbarch_deprecated_max_register_virtual_size (current_gdbarch)) |
0f71a2f6 | 642 | #endif |
0f71a2f6 | 643 | |
f3be58bc AC |
644 | /* See gdbint.texinfo, and PUSH_DUMMY_CALL. */ |
645 | ||
646 | extern int gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch); | |
647 | ||
648 | typedef struct frame_id (gdbarch_unwind_dummy_id_ftype) (struct gdbarch *gdbarch, struct frame_info *info); | |
649 | extern struct frame_id gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *info); | |
650 | extern void set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, gdbarch_unwind_dummy_id_ftype *unwind_dummy_id); | |
651 | ||
652 | /* Implement UNWIND_DUMMY_ID and PUSH_DUMMY_CALL, then delete | |
653 | SAVE_DUMMY_FRAME_TOS. */ | |
654 | ||
a59fe496 AC |
655 | #if defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS) |
656 | /* Legacy for systems yet to multi-arch DEPRECATED_SAVE_DUMMY_FRAME_TOS */ | |
657 | #if !defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P) | |
658 | #define DEPRECATED_SAVE_DUMMY_FRAME_TOS_P() (1) | |
f3be58bc AC |
659 | #endif |
660 | #endif | |
661 | ||
a59fe496 AC |
662 | extern int gdbarch_deprecated_save_dummy_frame_tos_p (struct gdbarch *gdbarch); |
663 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P) | |
664 | #error "Non multi-arch definition of DEPRECATED_SAVE_DUMMY_FRAME_TOS" | |
f3be58bc | 665 | #endif |
a59fe496 AC |
666 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P) |
667 | #define DEPRECATED_SAVE_DUMMY_FRAME_TOS_P() (gdbarch_deprecated_save_dummy_frame_tos_p (current_gdbarch)) | |
f3be58bc AC |
668 | #endif |
669 | ||
a59fe496 AC |
670 | typedef void (gdbarch_deprecated_save_dummy_frame_tos_ftype) (CORE_ADDR sp); |
671 | extern void gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp); | |
672 | extern void set_gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch, gdbarch_deprecated_save_dummy_frame_tos_ftype *deprecated_save_dummy_frame_tos); | |
673 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS) | |
674 | #error "Non multi-arch definition of DEPRECATED_SAVE_DUMMY_FRAME_TOS" | |
f3be58bc | 675 | #endif |
a59fe496 AC |
676 | #if !defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS) |
677 | #define DEPRECATED_SAVE_DUMMY_FRAME_TOS(sp) (gdbarch_deprecated_save_dummy_frame_tos (current_gdbarch, sp)) | |
f3be58bc AC |
678 | #endif |
679 | ||
680 | /* Implement UNWIND_DUMMY_ID and PUSH_DUMMY_CALL, then delete | |
681 | DEPRECATED_FP_REGNUM. */ | |
682 | ||
f3be58bc AC |
683 | extern int gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch); |
684 | extern void set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch, int deprecated_fp_regnum); | |
685 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FP_REGNUM) | |
686 | #error "Non multi-arch definition of DEPRECATED_FP_REGNUM" | |
687 | #endif | |
688 | #if !defined (DEPRECATED_FP_REGNUM) | |
689 | #define DEPRECATED_FP_REGNUM (gdbarch_deprecated_fp_regnum (current_gdbarch)) | |
690 | #endif | |
691 | ||
692 | /* Implement UNWIND_DUMMY_ID and PUSH_DUMMY_CALL, then delete | |
693 | DEPRECATED_TARGET_READ_FP. */ | |
694 | ||
695 | #if defined (DEPRECATED_TARGET_READ_FP) | |
696 | /* Legacy for systems yet to multi-arch DEPRECATED_TARGET_READ_FP */ | |
697 | #if !defined (DEPRECATED_TARGET_READ_FP_P) | |
698 | #define DEPRECATED_TARGET_READ_FP_P() (1) | |
699 | #endif | |
700 | #endif | |
701 | ||
f3be58bc AC |
702 | extern int gdbarch_deprecated_target_read_fp_p (struct gdbarch *gdbarch); |
703 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_TARGET_READ_FP_P) | |
704 | #error "Non multi-arch definition of DEPRECATED_TARGET_READ_FP" | |
705 | #endif | |
706 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_TARGET_READ_FP_P) | |
707 | #define DEPRECATED_TARGET_READ_FP_P() (gdbarch_deprecated_target_read_fp_p (current_gdbarch)) | |
708 | #endif | |
709 | ||
f3be58bc AC |
710 | typedef CORE_ADDR (gdbarch_deprecated_target_read_fp_ftype) (void); |
711 | extern CORE_ADDR gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch); | |
712 | extern void set_gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch, gdbarch_deprecated_target_read_fp_ftype *deprecated_target_read_fp); | |
713 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_TARGET_READ_FP) | |
714 | #error "Non multi-arch definition of DEPRECATED_TARGET_READ_FP" | |
715 | #endif | |
716 | #if !defined (DEPRECATED_TARGET_READ_FP) | |
717 | #define DEPRECATED_TARGET_READ_FP() (gdbarch_deprecated_target_read_fp (current_gdbarch)) | |
718 | #endif | |
719 | ||
b8de8283 AC |
720 | /* See gdbint.texinfo. See infcall.c. New, all singing all dancing, |
721 | replacement for DEPRECATED_PUSH_ARGUMENTS. */ | |
722 | ||
723 | extern int gdbarch_push_dummy_call_p (struct gdbarch *gdbarch); | |
724 | ||
725 | typedef CORE_ADDR (gdbarch_push_dummy_call_ftype) (struct gdbarch *gdbarch, CORE_ADDR func_addr, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr); | |
726 | extern CORE_ADDR gdbarch_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr); | |
727 | extern void set_gdbarch_push_dummy_call (struct gdbarch *gdbarch, gdbarch_push_dummy_call_ftype *push_dummy_call); | |
728 | ||
729 | /* PUSH_DUMMY_CALL is a direct replacement for DEPRECATED_PUSH_ARGUMENTS. */ | |
730 | ||
731 | #if defined (DEPRECATED_PUSH_ARGUMENTS) | |
732 | /* Legacy for systems yet to multi-arch DEPRECATED_PUSH_ARGUMENTS */ | |
733 | #if !defined (DEPRECATED_PUSH_ARGUMENTS_P) | |
734 | #define DEPRECATED_PUSH_ARGUMENTS_P() (1) | |
735 | #endif | |
736 | #endif | |
737 | ||
b8de8283 AC |
738 | extern int gdbarch_deprecated_push_arguments_p (struct gdbarch *gdbarch); |
739 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_ARGUMENTS_P) | |
740 | #error "Non multi-arch definition of DEPRECATED_PUSH_ARGUMENTS" | |
741 | #endif | |
742 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PUSH_ARGUMENTS_P) | |
743 | #define DEPRECATED_PUSH_ARGUMENTS_P() (gdbarch_deprecated_push_arguments_p (current_gdbarch)) | |
744 | #endif | |
745 | ||
b8de8283 AC |
746 | typedef CORE_ADDR (gdbarch_deprecated_push_arguments_ftype) (int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr); |
747 | extern CORE_ADDR gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr); | |
748 | extern void set_gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, gdbarch_deprecated_push_arguments_ftype *deprecated_push_arguments); | |
749 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_ARGUMENTS) | |
750 | #error "Non multi-arch definition of DEPRECATED_PUSH_ARGUMENTS" | |
751 | #endif | |
752 | #if !defined (DEPRECATED_PUSH_ARGUMENTS) | |
753 | #define DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) (gdbarch_deprecated_push_arguments (current_gdbarch, nargs, args, sp, struct_return, struct_addr)) | |
754 | #endif | |
755 | ||
756 | /* DEPRECATED_USE_GENERIC_DUMMY_FRAMES can be deleted. Always true. */ | |
757 | ||
b8de8283 AC |
758 | extern int gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch); |
759 | extern void set_gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch, int deprecated_use_generic_dummy_frames); | |
760 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_USE_GENERIC_DUMMY_FRAMES) | |
761 | #error "Non multi-arch definition of DEPRECATED_USE_GENERIC_DUMMY_FRAMES" | |
762 | #endif | |
763 | #if !defined (DEPRECATED_USE_GENERIC_DUMMY_FRAMES) | |
764 | #define DEPRECATED_USE_GENERIC_DUMMY_FRAMES (gdbarch_deprecated_use_generic_dummy_frames (current_gdbarch)) | |
765 | #endif | |
766 | ||
767 | /* Implement PUSH_RETURN_ADDRESS, and then merge in | |
768 | DEPRECATED_PUSH_RETURN_ADDRESS. */ | |
769 | ||
770 | #if defined (DEPRECATED_PUSH_RETURN_ADDRESS) | |
771 | /* Legacy for systems yet to multi-arch DEPRECATED_PUSH_RETURN_ADDRESS */ | |
772 | #if !defined (DEPRECATED_PUSH_RETURN_ADDRESS_P) | |
773 | #define DEPRECATED_PUSH_RETURN_ADDRESS_P() (1) | |
774 | #endif | |
775 | #endif | |
776 | ||
b8de8283 AC |
777 | extern int gdbarch_deprecated_push_return_address_p (struct gdbarch *gdbarch); |
778 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_RETURN_ADDRESS_P) | |
779 | #error "Non multi-arch definition of DEPRECATED_PUSH_RETURN_ADDRESS" | |
780 | #endif | |
781 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PUSH_RETURN_ADDRESS_P) | |
782 | #define DEPRECATED_PUSH_RETURN_ADDRESS_P() (gdbarch_deprecated_push_return_address_p (current_gdbarch)) | |
783 | #endif | |
784 | ||
b8de8283 AC |
785 | typedef CORE_ADDR (gdbarch_deprecated_push_return_address_ftype) (CORE_ADDR pc, CORE_ADDR sp); |
786 | extern CORE_ADDR gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp); | |
787 | extern void set_gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, gdbarch_deprecated_push_return_address_ftype *deprecated_push_return_address); | |
788 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_RETURN_ADDRESS) | |
789 | #error "Non multi-arch definition of DEPRECATED_PUSH_RETURN_ADDRESS" | |
790 | #endif | |
791 | #if !defined (DEPRECATED_PUSH_RETURN_ADDRESS) | |
792 | #define DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp) (gdbarch_deprecated_push_return_address (current_gdbarch, pc, sp)) | |
793 | #endif | |
794 | ||
795 | /* Implement PUSH_DUMMY_CALL, then merge in DEPRECATED_DUMMY_WRITE_SP. */ | |
796 | ||
797 | #if defined (DEPRECATED_DUMMY_WRITE_SP) | |
798 | /* Legacy for systems yet to multi-arch DEPRECATED_DUMMY_WRITE_SP */ | |
799 | #if !defined (DEPRECATED_DUMMY_WRITE_SP_P) | |
800 | #define DEPRECATED_DUMMY_WRITE_SP_P() (1) | |
801 | #endif | |
802 | #endif | |
803 | ||
b8de8283 AC |
804 | extern int gdbarch_deprecated_dummy_write_sp_p (struct gdbarch *gdbarch); |
805 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_DUMMY_WRITE_SP_P) | |
806 | #error "Non multi-arch definition of DEPRECATED_DUMMY_WRITE_SP" | |
807 | #endif | |
808 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_DUMMY_WRITE_SP_P) | |
809 | #define DEPRECATED_DUMMY_WRITE_SP_P() (gdbarch_deprecated_dummy_write_sp_p (current_gdbarch)) | |
810 | #endif | |
811 | ||
b8de8283 AC |
812 | typedef void (gdbarch_deprecated_dummy_write_sp_ftype) (CORE_ADDR val); |
813 | extern void gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, CORE_ADDR val); | |
814 | extern void set_gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, gdbarch_deprecated_dummy_write_sp_ftype *deprecated_dummy_write_sp); | |
815 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_DUMMY_WRITE_SP) | |
816 | #error "Non multi-arch definition of DEPRECATED_DUMMY_WRITE_SP" | |
817 | #endif | |
818 | #if !defined (DEPRECATED_DUMMY_WRITE_SP) | |
819 | #define DEPRECATED_DUMMY_WRITE_SP(val) (gdbarch_deprecated_dummy_write_sp (current_gdbarch, val)) | |
820 | #endif | |
821 | ||
822 | /* DEPRECATED_REGISTER_SIZE can be deleted. */ | |
823 | ||
824 | extern int gdbarch_deprecated_register_size (struct gdbarch *gdbarch); | |
825 | extern void set_gdbarch_deprecated_register_size (struct gdbarch *gdbarch, int deprecated_register_size); | |
826 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_SIZE) | |
827 | #error "Non multi-arch definition of DEPRECATED_REGISTER_SIZE" | |
828 | #endif | |
829 | #if !defined (DEPRECATED_REGISTER_SIZE) | |
830 | #define DEPRECATED_REGISTER_SIZE (gdbarch_deprecated_register_size (current_gdbarch)) | |
831 | #endif | |
832 | ||
b8de8283 AC |
833 | extern int gdbarch_call_dummy_location (struct gdbarch *gdbarch); |
834 | extern void set_gdbarch_call_dummy_location (struct gdbarch *gdbarch, int call_dummy_location); | |
835 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_LOCATION) | |
836 | #error "Non multi-arch definition of CALL_DUMMY_LOCATION" | |
837 | #endif | |
838 | #if !defined (CALL_DUMMY_LOCATION) | |
839 | #define CALL_DUMMY_LOCATION (gdbarch_call_dummy_location (current_gdbarch)) | |
840 | #endif | |
841 | ||
b8de8283 AC |
842 | /* DEPRECATED_CALL_DUMMY_START_OFFSET can be deleted. */ |
843 | ||
844 | extern CORE_ADDR gdbarch_deprecated_call_dummy_start_offset (struct gdbarch *gdbarch); | |
845 | extern void set_gdbarch_deprecated_call_dummy_start_offset (struct gdbarch *gdbarch, CORE_ADDR deprecated_call_dummy_start_offset); | |
846 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_START_OFFSET) | |
847 | #error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_START_OFFSET" | |
848 | #endif | |
849 | #if !defined (DEPRECATED_CALL_DUMMY_START_OFFSET) | |
850 | #define DEPRECATED_CALL_DUMMY_START_OFFSET (gdbarch_deprecated_call_dummy_start_offset (current_gdbarch)) | |
851 | #endif | |
852 | ||
853 | /* DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET can be deleted. */ | |
854 | ||
855 | extern CORE_ADDR gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch *gdbarch); | |
856 | extern void set_gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch *gdbarch, CORE_ADDR deprecated_call_dummy_breakpoint_offset); | |
857 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET) | |
858 | #error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET" | |
859 | #endif | |
860 | #if !defined (DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET) | |
861 | #define DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET (gdbarch_deprecated_call_dummy_breakpoint_offset (current_gdbarch)) | |
862 | #endif | |
863 | ||
864 | /* DEPRECATED_CALL_DUMMY_LENGTH can be deleted. */ | |
865 | ||
866 | extern int gdbarch_deprecated_call_dummy_length (struct gdbarch *gdbarch); | |
867 | extern void set_gdbarch_deprecated_call_dummy_length (struct gdbarch *gdbarch, int deprecated_call_dummy_length); | |
868 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_LENGTH) | |
869 | #error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_LENGTH" | |
870 | #endif | |
871 | #if !defined (DEPRECATED_CALL_DUMMY_LENGTH) | |
872 | #define DEPRECATED_CALL_DUMMY_LENGTH (gdbarch_deprecated_call_dummy_length (current_gdbarch)) | |
873 | #endif | |
874 | ||
875 | /* DEPRECATED_CALL_DUMMY_WORDS can be deleted. */ | |
876 | ||
b8de8283 AC |
877 | extern LONGEST * gdbarch_deprecated_call_dummy_words (struct gdbarch *gdbarch); |
878 | extern void set_gdbarch_deprecated_call_dummy_words (struct gdbarch *gdbarch, LONGEST * deprecated_call_dummy_words); | |
879 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_WORDS) | |
880 | #error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_WORDS" | |
881 | #endif | |
882 | #if !defined (DEPRECATED_CALL_DUMMY_WORDS) | |
883 | #define DEPRECATED_CALL_DUMMY_WORDS (gdbarch_deprecated_call_dummy_words (current_gdbarch)) | |
884 | #endif | |
885 | ||
886 | /* Implement PUSH_DUMMY_CALL, then delete DEPRECATED_SIZEOF_CALL_DUMMY_WORDS. */ | |
887 | ||
b8de8283 AC |
888 | extern int gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch *gdbarch); |
889 | extern void set_gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch *gdbarch, int deprecated_sizeof_call_dummy_words); | |
890 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SIZEOF_CALL_DUMMY_WORDS) | |
891 | #error "Non multi-arch definition of DEPRECATED_SIZEOF_CALL_DUMMY_WORDS" | |
892 | #endif | |
893 | #if !defined (DEPRECATED_SIZEOF_CALL_DUMMY_WORDS) | |
894 | #define DEPRECATED_SIZEOF_CALL_DUMMY_WORDS (gdbarch_deprecated_sizeof_call_dummy_words (current_gdbarch)) | |
895 | #endif | |
896 | ||
b8de8283 AC |
897 | /* DEPRECATED_FIX_CALL_DUMMY can be deleted. For the SPARC, implement |
898 | PUSH_DUMMY_CODE and set CALL_DUMMY_LOCATION to ON_STACK. */ | |
899 | ||
900 | #if defined (DEPRECATED_FIX_CALL_DUMMY) | |
901 | /* Legacy for systems yet to multi-arch DEPRECATED_FIX_CALL_DUMMY */ | |
902 | #if !defined (DEPRECATED_FIX_CALL_DUMMY_P) | |
903 | #define DEPRECATED_FIX_CALL_DUMMY_P() (1) | |
904 | #endif | |
905 | #endif | |
906 | ||
b8de8283 AC |
907 | extern int gdbarch_deprecated_fix_call_dummy_p (struct gdbarch *gdbarch); |
908 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FIX_CALL_DUMMY_P) | |
909 | #error "Non multi-arch definition of DEPRECATED_FIX_CALL_DUMMY" | |
910 | #endif | |
911 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FIX_CALL_DUMMY_P) | |
912 | #define DEPRECATED_FIX_CALL_DUMMY_P() (gdbarch_deprecated_fix_call_dummy_p (current_gdbarch)) | |
913 | #endif | |
914 | ||
b8de8283 AC |
915 | typedef void (gdbarch_deprecated_fix_call_dummy_ftype) (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p); |
916 | extern void gdbarch_deprecated_fix_call_dummy (struct gdbarch *gdbarch, char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p); | |
917 | extern void set_gdbarch_deprecated_fix_call_dummy (struct gdbarch *gdbarch, gdbarch_deprecated_fix_call_dummy_ftype *deprecated_fix_call_dummy); | |
918 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FIX_CALL_DUMMY) | |
919 | #error "Non multi-arch definition of DEPRECATED_FIX_CALL_DUMMY" | |
920 | #endif | |
921 | #if !defined (DEPRECATED_FIX_CALL_DUMMY) | |
922 | #define DEPRECATED_FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p) (gdbarch_deprecated_fix_call_dummy (current_gdbarch, dummy, pc, fun, nargs, args, type, gcc_p)) | |
923 | #endif | |
924 | ||
925 | /* This is a replacement for DEPRECATED_FIX_CALL_DUMMY et.al. */ | |
926 | ||
927 | extern int gdbarch_push_dummy_code_p (struct gdbarch *gdbarch); | |
928 | ||
929 | typedef CORE_ADDR (gdbarch_push_dummy_code_ftype) (struct gdbarch *gdbarch, CORE_ADDR sp, CORE_ADDR funaddr, int using_gcc, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr); | |
930 | extern CORE_ADDR gdbarch_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp, CORE_ADDR funaddr, int using_gcc, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr); | |
931 | extern void set_gdbarch_push_dummy_code (struct gdbarch *gdbarch, gdbarch_push_dummy_code_ftype *push_dummy_code); | |
932 | ||
933 | /* Implement PUSH_DUMMY_CALL, then delete DEPRECATED_PUSH_DUMMY_FRAME. */ | |
934 | ||
935 | #if defined (DEPRECATED_PUSH_DUMMY_FRAME) | |
936 | /* Legacy for systems yet to multi-arch DEPRECATED_PUSH_DUMMY_FRAME */ | |
937 | #if !defined (DEPRECATED_PUSH_DUMMY_FRAME_P) | |
938 | #define DEPRECATED_PUSH_DUMMY_FRAME_P() (1) | |
939 | #endif | |
940 | #endif | |
941 | ||
b8de8283 AC |
942 | extern int gdbarch_deprecated_push_dummy_frame_p (struct gdbarch *gdbarch); |
943 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_DUMMY_FRAME_P) | |
944 | #error "Non multi-arch definition of DEPRECATED_PUSH_DUMMY_FRAME" | |
945 | #endif | |
946 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PUSH_DUMMY_FRAME_P) | |
947 | #define DEPRECATED_PUSH_DUMMY_FRAME_P() (gdbarch_deprecated_push_dummy_frame_p (current_gdbarch)) | |
948 | #endif | |
949 | ||
b8de8283 AC |
950 | typedef void (gdbarch_deprecated_push_dummy_frame_ftype) (void); |
951 | extern void gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch); | |
952 | extern void set_gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch, gdbarch_deprecated_push_dummy_frame_ftype *deprecated_push_dummy_frame); | |
953 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_DUMMY_FRAME) | |
954 | #error "Non multi-arch definition of DEPRECATED_PUSH_DUMMY_FRAME" | |
955 | #endif | |
956 | #if !defined (DEPRECATED_PUSH_DUMMY_FRAME) | |
957 | #define DEPRECATED_PUSH_DUMMY_FRAME (gdbarch_deprecated_push_dummy_frame (current_gdbarch)) | |
958 | #endif | |
959 | ||
903ad3a6 AC |
960 | #if defined (DEPRECATED_DO_REGISTERS_INFO) |
961 | /* Legacy for systems yet to multi-arch DEPRECATED_DO_REGISTERS_INFO */ | |
962 | #if !defined (DEPRECATED_DO_REGISTERS_INFO_P) | |
963 | #define DEPRECATED_DO_REGISTERS_INFO_P() (1) | |
0ab7a791 AC |
964 | #endif |
965 | #endif | |
966 | ||
903ad3a6 AC |
967 | extern int gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch); |
968 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_DO_REGISTERS_INFO_P) | |
969 | #error "Non multi-arch definition of DEPRECATED_DO_REGISTERS_INFO" | |
0ab7a791 | 970 | #endif |
903ad3a6 AC |
971 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_DO_REGISTERS_INFO_P) |
972 | #define DEPRECATED_DO_REGISTERS_INFO_P() (gdbarch_deprecated_do_registers_info_p (current_gdbarch)) | |
0ab7a791 AC |
973 | #endif |
974 | ||
903ad3a6 AC |
975 | typedef void (gdbarch_deprecated_do_registers_info_ftype) (int reg_nr, int fpregs); |
976 | extern void gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs); | |
977 | extern void set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, gdbarch_deprecated_do_registers_info_ftype *deprecated_do_registers_info); | |
978 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_DO_REGISTERS_INFO) | |
979 | #error "Non multi-arch definition of DEPRECATED_DO_REGISTERS_INFO" | |
83905903 | 980 | #endif |
c25083af | 981 | #if !defined (DEPRECATED_DO_REGISTERS_INFO) |
903ad3a6 | 982 | #define DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs) (gdbarch_deprecated_do_registers_info (current_gdbarch, reg_nr, fpregs)) |
666e11c5 | 983 | #endif |
666e11c5 | 984 | |
0ab7a791 AC |
985 | typedef void (gdbarch_print_registers_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all); |
986 | extern void gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all); | |
987 | extern void set_gdbarch_print_registers_info (struct gdbarch *gdbarch, gdbarch_print_registers_info_ftype *print_registers_info); | |
988 | ||
23e3a7ac AC |
989 | extern int gdbarch_print_float_info_p (struct gdbarch *gdbarch); |
990 | ||
991 | typedef void (gdbarch_print_float_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args); | |
992 | extern void gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args); | |
5e74b15c | 993 | extern void set_gdbarch_print_float_info (struct gdbarch *gdbarch, gdbarch_print_float_info_ftype *print_float_info); |
5e74b15c | 994 | |
e76f1f2e AC |
995 | extern int gdbarch_print_vector_info_p (struct gdbarch *gdbarch); |
996 | ||
997 | typedef void (gdbarch_print_vector_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args); | |
998 | extern void gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args); | |
999 | extern void set_gdbarch_print_vector_info (struct gdbarch *gdbarch, gdbarch_print_vector_info_ftype *print_vector_info); | |
1000 | ||
7c7651b2 AC |
1001 | /* MAP a GDB RAW register number onto a simulator register number. See |
1002 | also include/...-sim.h. */ | |
1003 | ||
7c7651b2 AC |
1004 | typedef int (gdbarch_register_sim_regno_ftype) (int reg_nr); |
1005 | extern int gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr); | |
1006 | extern void set_gdbarch_register_sim_regno (struct gdbarch *gdbarch, gdbarch_register_sim_regno_ftype *register_sim_regno); | |
83905903 AC |
1007 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_SIM_REGNO) |
1008 | #error "Non multi-arch definition of REGISTER_SIM_REGNO" | |
1009 | #endif | |
c25083af | 1010 | #if !defined (REGISTER_SIM_REGNO) |
7c7651b2 AC |
1011 | #define REGISTER_SIM_REGNO(reg_nr) (gdbarch_register_sim_regno (current_gdbarch, reg_nr)) |
1012 | #endif | |
7c7651b2 | 1013 | |
2649061d AC |
1014 | #if defined (REGISTER_BYTES_OK) |
1015 | /* Legacy for systems yet to multi-arch REGISTER_BYTES_OK */ | |
eee30e78 | 1016 | #if !defined (REGISTER_BYTES_OK_P) |
2649061d AC |
1017 | #define REGISTER_BYTES_OK_P() (1) |
1018 | #endif | |
eee30e78 | 1019 | #endif |
2649061d | 1020 | |
2649061d | 1021 | extern int gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch); |
83905903 AC |
1022 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTES_OK_P) |
1023 | #error "Non multi-arch definition of REGISTER_BYTES_OK" | |
1024 | #endif | |
2649061d AC |
1025 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_BYTES_OK_P) |
1026 | #define REGISTER_BYTES_OK_P() (gdbarch_register_bytes_ok_p (current_gdbarch)) | |
1027 | #endif | |
1028 | ||
2649061d AC |
1029 | typedef int (gdbarch_register_bytes_ok_ftype) (long nr_bytes); |
1030 | extern int gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes); | |
1031 | extern void set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch, gdbarch_register_bytes_ok_ftype *register_bytes_ok); | |
83905903 AC |
1032 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTES_OK) |
1033 | #error "Non multi-arch definition of REGISTER_BYTES_OK" | |
1034 | #endif | |
c25083af | 1035 | #if !defined (REGISTER_BYTES_OK) |
2649061d AC |
1036 | #define REGISTER_BYTES_OK(nr_bytes) (gdbarch_register_bytes_ok (current_gdbarch, nr_bytes)) |
1037 | #endif | |
2649061d | 1038 | |
01fb7433 AC |
1039 | typedef int (gdbarch_cannot_fetch_register_ftype) (int regnum); |
1040 | extern int gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum); | |
1041 | extern void set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, gdbarch_cannot_fetch_register_ftype *cannot_fetch_register); | |
83905903 AC |
1042 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CANNOT_FETCH_REGISTER) |
1043 | #error "Non multi-arch definition of CANNOT_FETCH_REGISTER" | |
1044 | #endif | |
c25083af | 1045 | #if !defined (CANNOT_FETCH_REGISTER) |
01fb7433 AC |
1046 | #define CANNOT_FETCH_REGISTER(regnum) (gdbarch_cannot_fetch_register (current_gdbarch, regnum)) |
1047 | #endif | |
01fb7433 | 1048 | |
01fb7433 AC |
1049 | typedef int (gdbarch_cannot_store_register_ftype) (int regnum); |
1050 | extern int gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum); | |
1051 | extern void set_gdbarch_cannot_store_register (struct gdbarch *gdbarch, gdbarch_cannot_store_register_ftype *cannot_store_register); | |
83905903 AC |
1052 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CANNOT_STORE_REGISTER) |
1053 | #error "Non multi-arch definition of CANNOT_STORE_REGISTER" | |
1054 | #endif | |
c25083af | 1055 | #if !defined (CANNOT_STORE_REGISTER) |
01fb7433 AC |
1056 | #define CANNOT_STORE_REGISTER(regnum) (gdbarch_cannot_store_register (current_gdbarch, regnum)) |
1057 | #endif | |
01fb7433 | 1058 | |
9df628e0 RE |
1059 | /* setjmp/longjmp support. */ |
1060 | ||
1061 | #if defined (GET_LONGJMP_TARGET) | |
1062 | /* Legacy for systems yet to multi-arch GET_LONGJMP_TARGET */ | |
1063 | #if !defined (GET_LONGJMP_TARGET_P) | |
1064 | #define GET_LONGJMP_TARGET_P() (1) | |
1065 | #endif | |
1066 | #endif | |
1067 | ||
9df628e0 RE |
1068 | extern int gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch); |
1069 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (GET_LONGJMP_TARGET_P) | |
1070 | #error "Non multi-arch definition of GET_LONGJMP_TARGET" | |
1071 | #endif | |
b8de8283 AC |
1072 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (GET_LONGJMP_TARGET_P) |
1073 | #define GET_LONGJMP_TARGET_P() (gdbarch_get_longjmp_target_p (current_gdbarch)) | |
0f71a2f6 | 1074 | #endif |
0f71a2f6 | 1075 | |
b8de8283 AC |
1076 | typedef int (gdbarch_get_longjmp_target_ftype) (CORE_ADDR *pc); |
1077 | extern int gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc); | |
1078 | extern void set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch, gdbarch_get_longjmp_target_ftype *get_longjmp_target); | |
1079 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (GET_LONGJMP_TARGET) | |
1080 | #error "Non multi-arch definition of GET_LONGJMP_TARGET" | |
83905903 | 1081 | #endif |
b8de8283 AC |
1082 | #if !defined (GET_LONGJMP_TARGET) |
1083 | #define GET_LONGJMP_TARGET(pc) (gdbarch_get_longjmp_target (current_gdbarch, pc)) | |
0f71a2f6 | 1084 | #endif |
0f71a2f6 | 1085 | |
ae45cd16 AC |
1086 | /* NOTE: cagney/2002-11-24: This function with predicate has a valid |
1087 | (callable) initial value. As a consequence, even when the predicate | |
1088 | is false, the corresponding function works. This simplifies the | |
1089 | migration process - old code, calling DEPRECATED_PC_IN_CALL_DUMMY(), | |
1090 | doesn't need to be modified. */ | |
1091 | ||
1092 | #if defined (DEPRECATED_PC_IN_CALL_DUMMY) | |
1093 | /* Legacy for systems yet to multi-arch DEPRECATED_PC_IN_CALL_DUMMY */ | |
1094 | #if !defined (DEPRECATED_PC_IN_CALL_DUMMY_P) | |
1095 | #define DEPRECATED_PC_IN_CALL_DUMMY_P() (1) | |
1096 | #endif | |
1097 | #endif | |
1098 | ||
ae45cd16 | 1099 | extern int gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch *gdbarch); |
55e1d7e7 | 1100 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PC_IN_CALL_DUMMY_P) |
ae45cd16 AC |
1101 | #error "Non multi-arch definition of DEPRECATED_PC_IN_CALL_DUMMY" |
1102 | #endif | |
55e1d7e7 | 1103 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PC_IN_CALL_DUMMY_P) |
ae45cd16 AC |
1104 | #define DEPRECATED_PC_IN_CALL_DUMMY_P() (gdbarch_deprecated_pc_in_call_dummy_p (current_gdbarch)) |
1105 | #endif | |
1106 | ||
ae45cd16 AC |
1107 | typedef int (gdbarch_deprecated_pc_in_call_dummy_ftype) (CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address); |
1108 | extern int gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address); | |
1109 | extern void set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, gdbarch_deprecated_pc_in_call_dummy_ftype *deprecated_pc_in_call_dummy); | |
55e1d7e7 | 1110 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PC_IN_CALL_DUMMY) |
ae45cd16 | 1111 | #error "Non multi-arch definition of DEPRECATED_PC_IN_CALL_DUMMY" |
83905903 | 1112 | #endif |
c25083af | 1113 | #if !defined (DEPRECATED_PC_IN_CALL_DUMMY) |
ae45cd16 | 1114 | #define DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address) (gdbarch_deprecated_pc_in_call_dummy (current_gdbarch, pc, sp, frame_address)) |
0f71a2f6 | 1115 | #endif |
0f71a2f6 | 1116 | |
2ca6c561 AC |
1117 | #if defined (DEPRECATED_INIT_FRAME_PC_FIRST) |
1118 | /* Legacy for systems yet to multi-arch DEPRECATED_INIT_FRAME_PC_FIRST */ | |
1119 | #if !defined (DEPRECATED_INIT_FRAME_PC_FIRST_P) | |
1120 | #define DEPRECATED_INIT_FRAME_PC_FIRST_P() (1) | |
1121 | #endif | |
1122 | #endif | |
1123 | ||
2ca6c561 AC |
1124 | extern int gdbarch_deprecated_init_frame_pc_first_p (struct gdbarch *gdbarch); |
1125 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_FRAME_PC_FIRST_P) | |
1126 | #error "Non multi-arch definition of DEPRECATED_INIT_FRAME_PC_FIRST" | |
1127 | #endif | |
1128 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_INIT_FRAME_PC_FIRST_P) | |
1129 | #define DEPRECATED_INIT_FRAME_PC_FIRST_P() (gdbarch_deprecated_init_frame_pc_first_p (current_gdbarch)) | |
1130 | #endif | |
1131 | ||
97f46953 AC |
1132 | typedef CORE_ADDR (gdbarch_deprecated_init_frame_pc_first_ftype) (int fromleaf, struct frame_info *prev); |
1133 | extern CORE_ADDR gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev); | |
2ca6c561 AC |
1134 | extern void set_gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch, gdbarch_deprecated_init_frame_pc_first_ftype *deprecated_init_frame_pc_first); |
1135 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_FRAME_PC_FIRST) | |
1136 | #error "Non multi-arch definition of DEPRECATED_INIT_FRAME_PC_FIRST" | |
83905903 | 1137 | #endif |
c25083af | 1138 | #if !defined (DEPRECATED_INIT_FRAME_PC_FIRST) |
2ca6c561 | 1139 | #define DEPRECATED_INIT_FRAME_PC_FIRST(fromleaf, prev) (gdbarch_deprecated_init_frame_pc_first (current_gdbarch, fromleaf, prev)) |
10312cc4 | 1140 | #endif |
10312cc4 | 1141 | |
a5afb99f AC |
1142 | #if defined (DEPRECATED_INIT_FRAME_PC) |
1143 | /* Legacy for systems yet to multi-arch DEPRECATED_INIT_FRAME_PC */ | |
1144 | #if !defined (DEPRECATED_INIT_FRAME_PC_P) | |
1145 | #define DEPRECATED_INIT_FRAME_PC_P() (1) | |
1146 | #endif | |
1147 | #endif | |
1148 | ||
a5afb99f AC |
1149 | extern int gdbarch_deprecated_init_frame_pc_p (struct gdbarch *gdbarch); |
1150 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_FRAME_PC_P) | |
1151 | #error "Non multi-arch definition of DEPRECATED_INIT_FRAME_PC" | |
1152 | #endif | |
1153 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_INIT_FRAME_PC_P) | |
1154 | #define DEPRECATED_INIT_FRAME_PC_P() (gdbarch_deprecated_init_frame_pc_p (current_gdbarch)) | |
1155 | #endif | |
1156 | ||
a5afb99f AC |
1157 | typedef CORE_ADDR (gdbarch_deprecated_init_frame_pc_ftype) (int fromleaf, struct frame_info *prev); |
1158 | extern CORE_ADDR gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev); | |
1159 | extern void set_gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, gdbarch_deprecated_init_frame_pc_ftype *deprecated_init_frame_pc); | |
1160 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_FRAME_PC) | |
1161 | #error "Non multi-arch definition of DEPRECATED_INIT_FRAME_PC" | |
83905903 | 1162 | #endif |
c25083af | 1163 | #if !defined (DEPRECATED_INIT_FRAME_PC) |
a5afb99f | 1164 | #define DEPRECATED_INIT_FRAME_PC(fromleaf, prev) (gdbarch_deprecated_init_frame_pc (current_gdbarch, fromleaf, prev)) |
10312cc4 | 1165 | #endif |
10312cc4 | 1166 | |
104c1213 JM |
1167 | extern int gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch); |
1168 | extern void set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch, int believe_pcc_promotion); | |
83905903 AC |
1169 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (BELIEVE_PCC_PROMOTION) |
1170 | #error "Non multi-arch definition of BELIEVE_PCC_PROMOTION" | |
1171 | #endif | |
c25083af | 1172 | #if !defined (BELIEVE_PCC_PROMOTION) |
0f71a2f6 JM |
1173 | #define BELIEVE_PCC_PROMOTION (gdbarch_believe_pcc_promotion (current_gdbarch)) |
1174 | #endif | |
0f71a2f6 | 1175 | |
104c1213 JM |
1176 | extern int gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch); |
1177 | extern void set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch, int believe_pcc_promotion_type); | |
83905903 AC |
1178 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (BELIEVE_PCC_PROMOTION_TYPE) |
1179 | #error "Non multi-arch definition of BELIEVE_PCC_PROMOTION_TYPE" | |
1180 | #endif | |
e669114a | 1181 | #if !defined (BELIEVE_PCC_PROMOTION_TYPE) |
0f71a2f6 JM |
1182 | #define BELIEVE_PCC_PROMOTION_TYPE (gdbarch_believe_pcc_promotion_type (current_gdbarch)) |
1183 | #endif | |
0f71a2f6 | 1184 | |
129c1cd6 AC |
1185 | #if defined (DEPRECATED_GET_SAVED_REGISTER) |
1186 | /* Legacy for systems yet to multi-arch DEPRECATED_GET_SAVED_REGISTER */ | |
1187 | #if !defined (DEPRECATED_GET_SAVED_REGISTER_P) | |
1188 | #define DEPRECATED_GET_SAVED_REGISTER_P() (1) | |
a216a322 AC |
1189 | #endif |
1190 | #endif | |
1191 | ||
129c1cd6 AC |
1192 | extern int gdbarch_deprecated_get_saved_register_p (struct gdbarch *gdbarch); |
1193 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_GET_SAVED_REGISTER_P) | |
1194 | #error "Non multi-arch definition of DEPRECATED_GET_SAVED_REGISTER" | |
a216a322 | 1195 | #endif |
129c1cd6 AC |
1196 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_GET_SAVED_REGISTER_P) |
1197 | #define DEPRECATED_GET_SAVED_REGISTER_P() (gdbarch_deprecated_get_saved_register_p (current_gdbarch)) | |
a216a322 AC |
1198 | #endif |
1199 | ||
129c1cd6 AC |
1200 | typedef void (gdbarch_deprecated_get_saved_register_ftype) (char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval); |
1201 | extern void gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch, char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval); | |
1202 | extern void set_gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch, gdbarch_deprecated_get_saved_register_ftype *deprecated_get_saved_register); | |
1203 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_GET_SAVED_REGISTER) | |
1204 | #error "Non multi-arch definition of DEPRECATED_GET_SAVED_REGISTER" | |
83905903 | 1205 | #endif |
c25083af | 1206 | #if !defined (DEPRECATED_GET_SAVED_REGISTER) |
129c1cd6 | 1207 | #define DEPRECATED_GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) (gdbarch_deprecated_get_saved_register (current_gdbarch, raw_buffer, optimized, addrp, frame, regnum, lval)) |
0f71a2f6 | 1208 | #endif |
0f71a2f6 | 1209 | |
781a750d AC |
1210 | /* For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al. |
1211 | For raw <-> cooked register conversions, replaced by pseudo registers. */ | |
1212 | ||
cd0bfa36 AC |
1213 | #if defined (DEPRECATED_REGISTER_CONVERTIBLE) |
1214 | /* Legacy for systems yet to multi-arch DEPRECATED_REGISTER_CONVERTIBLE */ | |
1215 | #if !defined (DEPRECATED_REGISTER_CONVERTIBLE_P) | |
1216 | #define DEPRECATED_REGISTER_CONVERTIBLE_P() (1) | |
1217 | #endif | |
1218 | #endif | |
1219 | ||
1220 | extern int gdbarch_deprecated_register_convertible_p (struct gdbarch *gdbarch); | |
1221 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_CONVERTIBLE_P) | |
1222 | #error "Non multi-arch definition of DEPRECATED_REGISTER_CONVERTIBLE" | |
1223 | #endif | |
1224 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_REGISTER_CONVERTIBLE_P) | |
1225 | #define DEPRECATED_REGISTER_CONVERTIBLE_P() (gdbarch_deprecated_register_convertible_p (current_gdbarch)) | |
1226 | #endif | |
1227 | ||
781a750d AC |
1228 | typedef int (gdbarch_deprecated_register_convertible_ftype) (int nr); |
1229 | extern int gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch, int nr); | |
1230 | extern void set_gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch, gdbarch_deprecated_register_convertible_ftype *deprecated_register_convertible); | |
1231 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_CONVERTIBLE) | |
1232 | #error "Non multi-arch definition of DEPRECATED_REGISTER_CONVERTIBLE" | |
83905903 | 1233 | #endif |
781a750d AC |
1234 | #if !defined (DEPRECATED_REGISTER_CONVERTIBLE) |
1235 | #define DEPRECATED_REGISTER_CONVERTIBLE(nr) (gdbarch_deprecated_register_convertible (current_gdbarch, nr)) | |
0f71a2f6 | 1236 | #endif |
33489c5b | 1237 | |
781a750d AC |
1238 | /* For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al. |
1239 | For raw <-> cooked register conversions, replaced by pseudo registers. */ | |
1240 | ||
781a750d AC |
1241 | typedef void (gdbarch_deprecated_register_convert_to_virtual_ftype) (int regnum, struct type *type, char *from, char *to); |
1242 | extern void gdbarch_deprecated_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to); | |
1243 | extern void set_gdbarch_deprecated_register_convert_to_virtual (struct gdbarch *gdbarch, gdbarch_deprecated_register_convert_to_virtual_ftype *deprecated_register_convert_to_virtual); | |
1244 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL) | |
1245 | #error "Non multi-arch definition of DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL" | |
83905903 | 1246 | #endif |
781a750d AC |
1247 | #if !defined (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL) |
1248 | #define DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to) (gdbarch_deprecated_register_convert_to_virtual (current_gdbarch, regnum, type, from, to)) | |
0f71a2f6 | 1249 | #endif |
33489c5b | 1250 | |
781a750d AC |
1251 | /* For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al. |
1252 | For raw <-> cooked register conversions, replaced by pseudo registers. */ | |
1253 | ||
781a750d AC |
1254 | typedef void (gdbarch_deprecated_register_convert_to_raw_ftype) (struct type *type, int regnum, const char *from, char *to); |
1255 | extern void gdbarch_deprecated_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, const char *from, char *to); | |
1256 | extern void set_gdbarch_deprecated_register_convert_to_raw (struct gdbarch *gdbarch, gdbarch_deprecated_register_convert_to_raw_ftype *deprecated_register_convert_to_raw); | |
1257 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_CONVERT_TO_RAW) | |
1258 | #error "Non multi-arch definition of DEPRECATED_REGISTER_CONVERT_TO_RAW" | |
83905903 | 1259 | #endif |
781a750d AC |
1260 | #if !defined (DEPRECATED_REGISTER_CONVERT_TO_RAW) |
1261 | #define DEPRECATED_REGISTER_CONVERT_TO_RAW(type, regnum, from, to) (gdbarch_deprecated_register_convert_to_raw (current_gdbarch, type, regnum, from, to)) | |
0f71a2f6 | 1262 | #endif |
33489c5b | 1263 | |
ff2e87ac AC |
1264 | typedef int (gdbarch_convert_register_p_ftype) (int regnum, struct type *type); |
1265 | extern int gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type); | |
13d01224 AC |
1266 | extern void set_gdbarch_convert_register_p (struct gdbarch *gdbarch, gdbarch_convert_register_p_ftype *convert_register_p); |
1267 | #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (CONVERT_REGISTER_P) | |
1268 | #error "Non multi-arch definition of CONVERT_REGISTER_P" | |
1269 | #endif | |
c25083af | 1270 | #if !defined (CONVERT_REGISTER_P) |
ff2e87ac | 1271 | #define CONVERT_REGISTER_P(regnum, type) (gdbarch_convert_register_p (current_gdbarch, regnum, type)) |
13d01224 | 1272 | #endif |
13d01224 | 1273 | |
ff2e87ac AC |
1274 | typedef void (gdbarch_register_to_value_ftype) (struct frame_info *frame, int regnum, struct type *type, void *buf); |
1275 | extern void gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, void *buf); | |
13d01224 AC |
1276 | extern void set_gdbarch_register_to_value (struct gdbarch *gdbarch, gdbarch_register_to_value_ftype *register_to_value); |
1277 | #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_TO_VALUE) | |
1278 | #error "Non multi-arch definition of REGISTER_TO_VALUE" | |
1279 | #endif | |
c25083af | 1280 | #if !defined (REGISTER_TO_VALUE) |
ff2e87ac | 1281 | #define REGISTER_TO_VALUE(frame, regnum, type, buf) (gdbarch_register_to_value (current_gdbarch, frame, regnum, type, buf)) |
13d01224 | 1282 | #endif |
13d01224 | 1283 | |
ff2e87ac AC |
1284 | typedef void (gdbarch_value_to_register_ftype) (struct frame_info *frame, int regnum, struct type *type, const void *buf); |
1285 | extern void gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const void *buf); | |
13d01224 AC |
1286 | extern void set_gdbarch_value_to_register (struct gdbarch *gdbarch, gdbarch_value_to_register_ftype *value_to_register); |
1287 | #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (VALUE_TO_REGISTER) | |
1288 | #error "Non multi-arch definition of VALUE_TO_REGISTER" | |
1289 | #endif | |
c25083af | 1290 | #if !defined (VALUE_TO_REGISTER) |
ff2e87ac | 1291 | #define VALUE_TO_REGISTER(frame, regnum, type, buf) (gdbarch_value_to_register (current_gdbarch, frame, regnum, type, buf)) |
13d01224 | 1292 | #endif |
13d01224 | 1293 | |
66140c26 AC |
1294 | typedef CORE_ADDR (gdbarch_pointer_to_address_ftype) (struct type *type, const void *buf); |
1295 | extern CORE_ADDR gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const void *buf); | |
4478b372 | 1296 | extern void set_gdbarch_pointer_to_address (struct gdbarch *gdbarch, gdbarch_pointer_to_address_ftype *pointer_to_address); |
83905903 AC |
1297 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (POINTER_TO_ADDRESS) |
1298 | #error "Non multi-arch definition of POINTER_TO_ADDRESS" | |
1299 | #endif | |
c25083af | 1300 | #if !defined (POINTER_TO_ADDRESS) |
4478b372 JB |
1301 | #define POINTER_TO_ADDRESS(type, buf) (gdbarch_pointer_to_address (current_gdbarch, type, buf)) |
1302 | #endif | |
33489c5b | 1303 | |
ac2e2ef7 AC |
1304 | typedef void (gdbarch_address_to_pointer_ftype) (struct type *type, void *buf, CORE_ADDR addr); |
1305 | extern void gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr); | |
4478b372 | 1306 | extern void set_gdbarch_address_to_pointer (struct gdbarch *gdbarch, gdbarch_address_to_pointer_ftype *address_to_pointer); |
83905903 AC |
1307 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDRESS_TO_POINTER) |
1308 | #error "Non multi-arch definition of ADDRESS_TO_POINTER" | |
1309 | #endif | |
c25083af | 1310 | #if !defined (ADDRESS_TO_POINTER) |
4478b372 JB |
1311 | #define ADDRESS_TO_POINTER(type, buf, addr) (gdbarch_address_to_pointer (current_gdbarch, type, buf, addr)) |
1312 | #endif | |
33489c5b | 1313 | |
fc0c74b1 AC |
1314 | #if defined (INTEGER_TO_ADDRESS) |
1315 | /* Legacy for systems yet to multi-arch INTEGER_TO_ADDRESS */ | |
1316 | #if !defined (INTEGER_TO_ADDRESS_P) | |
1317 | #define INTEGER_TO_ADDRESS_P() (1) | |
1318 | #endif | |
1319 | #endif | |
1320 | ||
fc0c74b1 AC |
1321 | extern int gdbarch_integer_to_address_p (struct gdbarch *gdbarch); |
1322 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INTEGER_TO_ADDRESS_P) | |
1323 | #error "Non multi-arch definition of INTEGER_TO_ADDRESS" | |
1324 | #endif | |
1325 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (INTEGER_TO_ADDRESS_P) | |
1326 | #define INTEGER_TO_ADDRESS_P() (gdbarch_integer_to_address_p (current_gdbarch)) | |
1327 | #endif | |
1328 | ||
fc0c74b1 AC |
1329 | typedef CORE_ADDR (gdbarch_integer_to_address_ftype) (struct type *type, void *buf); |
1330 | extern CORE_ADDR gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf); | |
1331 | extern void set_gdbarch_integer_to_address (struct gdbarch *gdbarch, gdbarch_integer_to_address_ftype *integer_to_address); | |
1332 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INTEGER_TO_ADDRESS) | |
1333 | #error "Non multi-arch definition of INTEGER_TO_ADDRESS" | |
1334 | #endif | |
c25083af | 1335 | #if !defined (INTEGER_TO_ADDRESS) |
fc0c74b1 AC |
1336 | #define INTEGER_TO_ADDRESS(type, buf) (gdbarch_integer_to_address (current_gdbarch, type, buf)) |
1337 | #endif | |
fc0c74b1 | 1338 | |
749b82f6 AC |
1339 | #if defined (DEPRECATED_POP_FRAME) |
1340 | /* Legacy for systems yet to multi-arch DEPRECATED_POP_FRAME */ | |
1341 | #if !defined (DEPRECATED_POP_FRAME_P) | |
1342 | #define DEPRECATED_POP_FRAME_P() (1) | |
dedc2a2b AC |
1343 | #endif |
1344 | #endif | |
1345 | ||
749b82f6 AC |
1346 | extern int gdbarch_deprecated_pop_frame_p (struct gdbarch *gdbarch); |
1347 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_POP_FRAME_P) | |
1348 | #error "Non multi-arch definition of DEPRECATED_POP_FRAME" | |
dedc2a2b | 1349 | #endif |
749b82f6 AC |
1350 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_POP_FRAME_P) |
1351 | #define DEPRECATED_POP_FRAME_P() (gdbarch_deprecated_pop_frame_p (current_gdbarch)) | |
dedc2a2b AC |
1352 | #endif |
1353 | ||
749b82f6 AC |
1354 | typedef void (gdbarch_deprecated_pop_frame_ftype) (void); |
1355 | extern void gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch); | |
1356 | extern void set_gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch, gdbarch_deprecated_pop_frame_ftype *deprecated_pop_frame); | |
1357 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_POP_FRAME) | |
1358 | #error "Non multi-arch definition of DEPRECATED_POP_FRAME" | |
83905903 | 1359 | #endif |
c25083af | 1360 | #if !defined (DEPRECATED_POP_FRAME) |
749b82f6 | 1361 | #define DEPRECATED_POP_FRAME (gdbarch_deprecated_pop_frame (current_gdbarch)) |
0f71a2f6 | 1362 | #endif |
0f71a2f6 | 1363 | |
4183d812 AC |
1364 | /* NOTE: cagney/2003-03-24: Replaced by PUSH_ARGUMENTS. */ |
1365 | ||
1366 | #if defined (DEPRECATED_STORE_STRUCT_RETURN) | |
1367 | /* Legacy for systems yet to multi-arch DEPRECATED_STORE_STRUCT_RETURN */ | |
1368 | #if !defined (DEPRECATED_STORE_STRUCT_RETURN_P) | |
1369 | #define DEPRECATED_STORE_STRUCT_RETURN_P() (1) | |
1370 | #endif | |
1371 | #endif | |
1372 | ||
4183d812 AC |
1373 | extern int gdbarch_deprecated_store_struct_return_p (struct gdbarch *gdbarch); |
1374 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_STORE_STRUCT_RETURN_P) | |
1375 | #error "Non multi-arch definition of DEPRECATED_STORE_STRUCT_RETURN" | |
1376 | #endif | |
1377 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_STORE_STRUCT_RETURN_P) | |
1378 | #define DEPRECATED_STORE_STRUCT_RETURN_P() (gdbarch_deprecated_store_struct_return_p (current_gdbarch)) | |
1379 | #endif | |
1380 | ||
4183d812 AC |
1381 | typedef void (gdbarch_deprecated_store_struct_return_ftype) (CORE_ADDR addr, CORE_ADDR sp); |
1382 | extern void gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp); | |
1383 | extern void set_gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, gdbarch_deprecated_store_struct_return_ftype *deprecated_store_struct_return); | |
1384 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_STORE_STRUCT_RETURN) | |
1385 | #error "Non multi-arch definition of DEPRECATED_STORE_STRUCT_RETURN" | |
83905903 | 1386 | #endif |
c25083af | 1387 | #if !defined (DEPRECATED_STORE_STRUCT_RETURN) |
4183d812 | 1388 | #define DEPRECATED_STORE_STRUCT_RETURN(addr, sp) (gdbarch_deprecated_store_struct_return (current_gdbarch, addr, sp)) |
0f71a2f6 | 1389 | #endif |
0f71a2f6 | 1390 | |
92ad9cd9 AC |
1391 | /* It has been suggested that this, well actually its predecessor, |
1392 | should take the type/value of the function to be called and not the | |
1393 | return type. This is left as an exercise for the reader. */ | |
1394 | ||
1395 | extern int gdbarch_return_value_p (struct gdbarch *gdbarch); | |
1396 | ||
963e2bb7 AC |
1397 | typedef enum return_value_convention (gdbarch_return_value_ftype) (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, void *readbuf, const void *writebuf); |
1398 | extern enum return_value_convention gdbarch_return_value (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, void *readbuf, const void *writebuf); | |
92ad9cd9 AC |
1399 | extern void set_gdbarch_return_value (struct gdbarch *gdbarch, gdbarch_return_value_ftype *return_value); |
1400 | ||
1401 | /* The deprecated methods RETURN_VALUE_ON_STACK, EXTRACT_RETURN_VALUE, | |
1402 | STORE_RETURN_VALUE and USE_STRUCT_CONVENTION have all been folded | |
74055713 | 1403 | into RETURN_VALUE. */ |
92ad9cd9 AC |
1404 | |
1405 | typedef int (gdbarch_return_value_on_stack_ftype) (struct type *type); | |
1406 | extern int gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type); | |
1407 | extern void set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch, gdbarch_return_value_on_stack_ftype *return_value_on_stack); | |
1408 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (RETURN_VALUE_ON_STACK) | |
1409 | #error "Non multi-arch definition of RETURN_VALUE_ON_STACK" | |
1410 | #endif | |
1411 | #if !defined (RETURN_VALUE_ON_STACK) | |
1412 | #define RETURN_VALUE_ON_STACK(type) (gdbarch_return_value_on_stack (current_gdbarch, type)) | |
1413 | #endif | |
1414 | ||
ebba8386 AC |
1415 | typedef void (gdbarch_extract_return_value_ftype) (struct type *type, struct regcache *regcache, void *valbuf); |
1416 | extern void gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf); | |
1417 | extern void set_gdbarch_extract_return_value (struct gdbarch *gdbarch, gdbarch_extract_return_value_ftype *extract_return_value); | |
1418 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_RETURN_VALUE) | |
1419 | #error "Non multi-arch definition of EXTRACT_RETURN_VALUE" | |
1420 | #endif | |
c25083af | 1421 | #if !defined (EXTRACT_RETURN_VALUE) |
ebba8386 AC |
1422 | #define EXTRACT_RETURN_VALUE(type, regcache, valbuf) (gdbarch_extract_return_value (current_gdbarch, type, regcache, valbuf)) |
1423 | #endif | |
ebba8386 | 1424 | |
ebba8386 AC |
1425 | typedef void (gdbarch_store_return_value_ftype) (struct type *type, struct regcache *regcache, const void *valbuf); |
1426 | extern void gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const void *valbuf); | |
104c1213 | 1427 | extern void set_gdbarch_store_return_value (struct gdbarch *gdbarch, gdbarch_store_return_value_ftype *store_return_value); |
83905903 AC |
1428 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STORE_RETURN_VALUE) |
1429 | #error "Non multi-arch definition of STORE_RETURN_VALUE" | |
1430 | #endif | |
c25083af | 1431 | #if !defined (STORE_RETURN_VALUE) |
ebba8386 AC |
1432 | #define STORE_RETURN_VALUE(type, regcache, valbuf) (gdbarch_store_return_value (current_gdbarch, type, regcache, valbuf)) |
1433 | #endif | |
ebba8386 AC |
1434 | |
1435 | typedef void (gdbarch_deprecated_extract_return_value_ftype) (struct type *type, char *regbuf, char *valbuf); | |
1436 | extern void gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf); | |
1437 | extern void set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value); | |
1438 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRACT_RETURN_VALUE) | |
1439 | #error "Non multi-arch definition of DEPRECATED_EXTRACT_RETURN_VALUE" | |
1440 | #endif | |
c25083af | 1441 | #if !defined (DEPRECATED_EXTRACT_RETURN_VALUE) |
ebba8386 AC |
1442 | #define DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf) (gdbarch_deprecated_extract_return_value (current_gdbarch, type, regbuf, valbuf)) |
1443 | #endif | |
ebba8386 AC |
1444 | |
1445 | typedef void (gdbarch_deprecated_store_return_value_ftype) (struct type *type, char *valbuf); | |
1446 | extern void gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf); | |
1447 | extern void set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, gdbarch_deprecated_store_return_value_ftype *deprecated_store_return_value); | |
1448 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_STORE_RETURN_VALUE) | |
1449 | #error "Non multi-arch definition of DEPRECATED_STORE_RETURN_VALUE" | |
1450 | #endif | |
c25083af | 1451 | #if !defined (DEPRECATED_STORE_RETURN_VALUE) |
ebba8386 | 1452 | #define DEPRECATED_STORE_RETURN_VALUE(type, valbuf) (gdbarch_deprecated_store_return_value (current_gdbarch, type, valbuf)) |
0f71a2f6 | 1453 | #endif |
0f71a2f6 | 1454 | |
92ad9cd9 AC |
1455 | typedef int (gdbarch_use_struct_convention_ftype) (int gcc_p, struct type *value_type); |
1456 | extern int gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type); | |
1457 | extern void set_gdbarch_use_struct_convention (struct gdbarch *gdbarch, gdbarch_use_struct_convention_ftype *use_struct_convention); | |
1458 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (USE_STRUCT_CONVENTION) | |
1459 | #error "Non multi-arch definition of USE_STRUCT_CONVENTION" | |
1460 | #endif | |
1461 | #if !defined (USE_STRUCT_CONVENTION) | |
1462 | #define USE_STRUCT_CONVENTION(gcc_p, value_type) (gdbarch_use_struct_convention (current_gdbarch, gcc_p, value_type)) | |
1463 | #endif | |
1464 | ||
74055713 AC |
1465 | /* As of 2004-01-17 only the 32-bit SPARC ABI has been identified as an |
1466 | ABI suitable for the implementation of a robust extract | |
1467 | struct-convention return-value address method (the sparc saves the | |
1468 | address in the callers frame). All the other cases so far examined, | |
1469 | the DEPRECATED_EXTRACT_STRUCT_VALUE implementation has been | |
1470 | erreneous - the code was incorrectly assuming that the return-value | |
1471 | address, stored in a register, was preserved across the entire | |
1472 | function call. | |
1473 | For the moment retain DEPRECATED_EXTRACT_STRUCT_VALUE as a marker of | |
1474 | the ABIs that are still to be analyzed - perhaps this should simply | |
1475 | be deleted. The commented out extract_returned_value_address method | |
1476 | is provided as a starting point for the 32-bit SPARC. It, or | |
1477 | something like it, along with changes to both infcmd.c and stack.c | |
1478 | will be needed for that case to work. NB: It is passed the callers | |
1479 | frame since it is only after the callee has returned that this | |
1480 | function is used. | |
1481 | M:::CORE_ADDR:extract_returned_value_address:struct frame_info *caller_frame:caller_frame */ | |
1482 | ||
1483 | #if defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS) | |
1484 | /* Legacy for systems yet to multi-arch DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS */ | |
1485 | #if !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P) | |
1486 | #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() (1) | |
049ee0e4 AC |
1487 | #endif |
1488 | #endif | |
1489 | ||
74055713 AC |
1490 | extern int gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch); |
1491 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P) | |
1492 | #error "Non multi-arch definition of DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS" | |
049ee0e4 | 1493 | #endif |
74055713 AC |
1494 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P) |
1495 | #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() (gdbarch_deprecated_extract_struct_value_address_p (current_gdbarch)) | |
049ee0e4 AC |
1496 | #endif |
1497 | ||
74055713 AC |
1498 | typedef CORE_ADDR (gdbarch_deprecated_extract_struct_value_address_ftype) (struct regcache *regcache); |
1499 | extern CORE_ADDR gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache); | |
1500 | extern void set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address); | |
1501 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS) | |
1502 | #error "Non multi-arch definition of DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS" | |
049ee0e4 | 1503 | #endif |
74055713 AC |
1504 | #if !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS) |
1505 | #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regcache) (gdbarch_deprecated_extract_struct_value_address (current_gdbarch, regcache)) | |
049ee0e4 | 1506 | #endif |
049ee0e4 | 1507 | |
f30ee0bc AC |
1508 | #if defined (DEPRECATED_FRAME_INIT_SAVED_REGS) |
1509 | /* Legacy for systems yet to multi-arch DEPRECATED_FRAME_INIT_SAVED_REGS */ | |
1510 | #if !defined (DEPRECATED_FRAME_INIT_SAVED_REGS_P) | |
1511 | #define DEPRECATED_FRAME_INIT_SAVED_REGS_P() (1) | |
8f871025 AC |
1512 | #endif |
1513 | #endif | |
1514 | ||
f30ee0bc AC |
1515 | extern int gdbarch_deprecated_frame_init_saved_regs_p (struct gdbarch *gdbarch); |
1516 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_INIT_SAVED_REGS_P) | |
1517 | #error "Non multi-arch definition of DEPRECATED_FRAME_INIT_SAVED_REGS" | |
8f871025 | 1518 | #endif |
f30ee0bc AC |
1519 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_INIT_SAVED_REGS_P) |
1520 | #define DEPRECATED_FRAME_INIT_SAVED_REGS_P() (gdbarch_deprecated_frame_init_saved_regs_p (current_gdbarch)) | |
8f871025 AC |
1521 | #endif |
1522 | ||
f30ee0bc AC |
1523 | typedef void (gdbarch_deprecated_frame_init_saved_regs_ftype) (struct frame_info *frame); |
1524 | extern void gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame); | |
1525 | extern void set_gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch, gdbarch_deprecated_frame_init_saved_regs_ftype *deprecated_frame_init_saved_regs); | |
1526 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_INIT_SAVED_REGS) | |
1527 | #error "Non multi-arch definition of DEPRECATED_FRAME_INIT_SAVED_REGS" | |
83905903 | 1528 | #endif |
c25083af | 1529 | #if !defined (DEPRECATED_FRAME_INIT_SAVED_REGS) |
f30ee0bc | 1530 | #define DEPRECATED_FRAME_INIT_SAVED_REGS(frame) (gdbarch_deprecated_frame_init_saved_regs (current_gdbarch, frame)) |
0f71a2f6 | 1531 | #endif |
0f71a2f6 | 1532 | |
e9582e71 AC |
1533 | #if defined (DEPRECATED_INIT_EXTRA_FRAME_INFO) |
1534 | /* Legacy for systems yet to multi-arch DEPRECATED_INIT_EXTRA_FRAME_INFO */ | |
1535 | #if !defined (DEPRECATED_INIT_EXTRA_FRAME_INFO_P) | |
1536 | #define DEPRECATED_INIT_EXTRA_FRAME_INFO_P() (1) | |
5fdff426 AC |
1537 | #endif |
1538 | #endif | |
1539 | ||
e9582e71 AC |
1540 | extern int gdbarch_deprecated_init_extra_frame_info_p (struct gdbarch *gdbarch); |
1541 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_EXTRA_FRAME_INFO_P) | |
1542 | #error "Non multi-arch definition of DEPRECATED_INIT_EXTRA_FRAME_INFO" | |
5fdff426 | 1543 | #endif |
e9582e71 AC |
1544 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_INIT_EXTRA_FRAME_INFO_P) |
1545 | #define DEPRECATED_INIT_EXTRA_FRAME_INFO_P() (gdbarch_deprecated_init_extra_frame_info_p (current_gdbarch)) | |
5fdff426 AC |
1546 | #endif |
1547 | ||
e9582e71 AC |
1548 | typedef void (gdbarch_deprecated_init_extra_frame_info_ftype) (int fromleaf, struct frame_info *frame); |
1549 | extern void gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame); | |
1550 | extern void set_gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch, gdbarch_deprecated_init_extra_frame_info_ftype *deprecated_init_extra_frame_info); | |
1551 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_EXTRA_FRAME_INFO) | |
1552 | #error "Non multi-arch definition of DEPRECATED_INIT_EXTRA_FRAME_INFO" | |
83905903 | 1553 | #endif |
c25083af | 1554 | #if !defined (DEPRECATED_INIT_EXTRA_FRAME_INFO) |
e9582e71 | 1555 | #define DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame) (gdbarch_deprecated_init_extra_frame_info (current_gdbarch, fromleaf, frame)) |
0f71a2f6 | 1556 | #endif |
0f71a2f6 | 1557 | |
104c1213 JM |
1558 | typedef CORE_ADDR (gdbarch_skip_prologue_ftype) (CORE_ADDR ip); |
1559 | extern CORE_ADDR gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip); | |
1560 | extern void set_gdbarch_skip_prologue (struct gdbarch *gdbarch, gdbarch_skip_prologue_ftype *skip_prologue); | |
83905903 AC |
1561 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SKIP_PROLOGUE) |
1562 | #error "Non multi-arch definition of SKIP_PROLOGUE" | |
1563 | #endif | |
c25083af | 1564 | #if !defined (SKIP_PROLOGUE) |
0f71a2f6 JM |
1565 | #define SKIP_PROLOGUE(ip) (gdbarch_skip_prologue (current_gdbarch, ip)) |
1566 | #endif | |
0f71a2f6 | 1567 | |
104c1213 JM |
1568 | typedef int (gdbarch_inner_than_ftype) (CORE_ADDR lhs, CORE_ADDR rhs); |
1569 | extern int gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs); | |
1570 | extern void set_gdbarch_inner_than (struct gdbarch *gdbarch, gdbarch_inner_than_ftype *inner_than); | |
83905903 AC |
1571 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INNER_THAN) |
1572 | #error "Non multi-arch definition of INNER_THAN" | |
1573 | #endif | |
c25083af | 1574 | #if !defined (INNER_THAN) |
0f71a2f6 JM |
1575 | #define INNER_THAN(lhs, rhs) (gdbarch_inner_than (current_gdbarch, lhs, rhs)) |
1576 | #endif | |
0f71a2f6 | 1577 | |
f4f9705a AC |
1578 | typedef const unsigned char * (gdbarch_breakpoint_from_pc_ftype) (CORE_ADDR *pcptr, int *lenptr); |
1579 | extern const unsigned char * gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr); | |
104c1213 | 1580 | extern void set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc); |
83905903 AC |
1581 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (BREAKPOINT_FROM_PC) |
1582 | #error "Non multi-arch definition of BREAKPOINT_FROM_PC" | |
1583 | #endif | |
c25083af | 1584 | #if !defined (BREAKPOINT_FROM_PC) |
0f71a2f6 JM |
1585 | #define BREAKPOINT_FROM_PC(pcptr, lenptr) (gdbarch_breakpoint_from_pc (current_gdbarch, pcptr, lenptr)) |
1586 | #endif | |
33489c5b | 1587 | |
a1131521 KB |
1588 | extern int gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch); |
1589 | ||
1590 | typedef CORE_ADDR (gdbarch_adjust_breakpoint_address_ftype) (struct gdbarch *gdbarch, CORE_ADDR bpaddr); | |
1591 | extern CORE_ADDR gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr); | |
1592 | extern void set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, gdbarch_adjust_breakpoint_address_ftype *adjust_breakpoint_address); | |
1593 | ||
917317f4 JM |
1594 | typedef int (gdbarch_memory_insert_breakpoint_ftype) (CORE_ADDR addr, char *contents_cache); |
1595 | extern int gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache); | |
1596 | extern void set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint); | |
83905903 AC |
1597 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (MEMORY_INSERT_BREAKPOINT) |
1598 | #error "Non multi-arch definition of MEMORY_INSERT_BREAKPOINT" | |
1599 | #endif | |
c25083af | 1600 | #if !defined (MEMORY_INSERT_BREAKPOINT) |
917317f4 JM |
1601 | #define MEMORY_INSERT_BREAKPOINT(addr, contents_cache) (gdbarch_memory_insert_breakpoint (current_gdbarch, addr, contents_cache)) |
1602 | #endif | |
33489c5b | 1603 | |
917317f4 JM |
1604 | typedef int (gdbarch_memory_remove_breakpoint_ftype) (CORE_ADDR addr, char *contents_cache); |
1605 | extern int gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache); | |
1606 | extern void set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint); | |
83905903 AC |
1607 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (MEMORY_REMOVE_BREAKPOINT) |
1608 | #error "Non multi-arch definition of MEMORY_REMOVE_BREAKPOINT" | |
1609 | #endif | |
c25083af | 1610 | #if !defined (MEMORY_REMOVE_BREAKPOINT) |
917317f4 JM |
1611 | #define MEMORY_REMOVE_BREAKPOINT(addr, contents_cache) (gdbarch_memory_remove_breakpoint (current_gdbarch, addr, contents_cache)) |
1612 | #endif | |
917317f4 | 1613 | |
104c1213 JM |
1614 | extern CORE_ADDR gdbarch_decr_pc_after_break (struct gdbarch *gdbarch); |
1615 | extern void set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch, CORE_ADDR decr_pc_after_break); | |
83905903 AC |
1616 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DECR_PC_AFTER_BREAK) |
1617 | #error "Non multi-arch definition of DECR_PC_AFTER_BREAK" | |
1618 | #endif | |
c25083af | 1619 | #if !defined (DECR_PC_AFTER_BREAK) |
0f71a2f6 JM |
1620 | #define DECR_PC_AFTER_BREAK (gdbarch_decr_pc_after_break (current_gdbarch)) |
1621 | #endif | |
0f71a2f6 | 1622 | |
104c1213 JM |
1623 | extern CORE_ADDR gdbarch_function_start_offset (struct gdbarch *gdbarch); |
1624 | extern void set_gdbarch_function_start_offset (struct gdbarch *gdbarch, CORE_ADDR function_start_offset); | |
83905903 AC |
1625 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FUNCTION_START_OFFSET) |
1626 | #error "Non multi-arch definition of FUNCTION_START_OFFSET" | |
1627 | #endif | |
c25083af | 1628 | #if !defined (FUNCTION_START_OFFSET) |
0f71a2f6 JM |
1629 | #define FUNCTION_START_OFFSET (gdbarch_function_start_offset (current_gdbarch)) |
1630 | #endif | |
0f71a2f6 | 1631 | |
f6684c31 AC |
1632 | typedef void (gdbarch_remote_translate_xfer_address_ftype) (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len); |
1633 | extern void gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len); | |
104c1213 | 1634 | extern void set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address); |
0f71a2f6 | 1635 | |
104c1213 JM |
1636 | extern CORE_ADDR gdbarch_frame_args_skip (struct gdbarch *gdbarch); |
1637 | extern void set_gdbarch_frame_args_skip (struct gdbarch *gdbarch, CORE_ADDR frame_args_skip); | |
83905903 AC |
1638 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_ARGS_SKIP) |
1639 | #error "Non multi-arch definition of FRAME_ARGS_SKIP" | |
1640 | #endif | |
c25083af | 1641 | #if !defined (FRAME_ARGS_SKIP) |
0f71a2f6 JM |
1642 | #define FRAME_ARGS_SKIP (gdbarch_frame_args_skip (current_gdbarch)) |
1643 | #endif | |
0f71a2f6 | 1644 | |
19772a2c AC |
1645 | /* DEPRECATED_FRAMELESS_FUNCTION_INVOCATION is not needed. The new |
1646 | frame code works regardless of the type of frame - frameless, | |
1647 | stackless, or normal. */ | |
1648 | ||
1649 | #if defined (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION) | |
1650 | /* Legacy for systems yet to multi-arch DEPRECATED_FRAMELESS_FUNCTION_INVOCATION */ | |
1651 | #if !defined (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P) | |
1652 | #define DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P() (1) | |
1653 | #endif | |
1654 | #endif | |
1655 | ||
1656 | extern int gdbarch_deprecated_frameless_function_invocation_p (struct gdbarch *gdbarch); | |
1657 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P) | |
1658 | #error "Non multi-arch definition of DEPRECATED_FRAMELESS_FUNCTION_INVOCATION" | |
1659 | #endif | |
1660 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P) | |
1661 | #define DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P() (gdbarch_deprecated_frameless_function_invocation_p (current_gdbarch)) | |
1662 | #endif | |
1663 | ||
1664 | typedef int (gdbarch_deprecated_frameless_function_invocation_ftype) (struct frame_info *fi); | |
1665 | extern int gdbarch_deprecated_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi); | |
1666 | extern void set_gdbarch_deprecated_frameless_function_invocation (struct gdbarch *gdbarch, gdbarch_deprecated_frameless_function_invocation_ftype *deprecated_frameless_function_invocation); | |
1667 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION) | |
1668 | #error "Non multi-arch definition of DEPRECATED_FRAMELESS_FUNCTION_INVOCATION" | |
1669 | #endif | |
1670 | #if !defined (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION) | |
1671 | #define DEPRECATED_FRAMELESS_FUNCTION_INVOCATION(fi) (gdbarch_deprecated_frameless_function_invocation (current_gdbarch, fi)) | |
0f71a2f6 | 1672 | #endif |
0f71a2f6 | 1673 | |
618ce49f AC |
1674 | #if defined (DEPRECATED_FRAME_CHAIN) |
1675 | /* Legacy for systems yet to multi-arch DEPRECATED_FRAME_CHAIN */ | |
1676 | #if !defined (DEPRECATED_FRAME_CHAIN_P) | |
1677 | #define DEPRECATED_FRAME_CHAIN_P() (1) | |
d62d1979 AC |
1678 | #endif |
1679 | #endif | |
1680 | ||
618ce49f AC |
1681 | extern int gdbarch_deprecated_frame_chain_p (struct gdbarch *gdbarch); |
1682 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_CHAIN_P) | |
1683 | #error "Non multi-arch definition of DEPRECATED_FRAME_CHAIN" | |
d62d1979 | 1684 | #endif |
618ce49f AC |
1685 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_CHAIN_P) |
1686 | #define DEPRECATED_FRAME_CHAIN_P() (gdbarch_deprecated_frame_chain_p (current_gdbarch)) | |
d62d1979 AC |
1687 | #endif |
1688 | ||
618ce49f AC |
1689 | typedef CORE_ADDR (gdbarch_deprecated_frame_chain_ftype) (struct frame_info *frame); |
1690 | extern CORE_ADDR gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame); | |
1691 | extern void set_gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch, gdbarch_deprecated_frame_chain_ftype *deprecated_frame_chain); | |
1692 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_CHAIN) | |
1693 | #error "Non multi-arch definition of DEPRECATED_FRAME_CHAIN" | |
83905903 | 1694 | #endif |
c25083af | 1695 | #if !defined (DEPRECATED_FRAME_CHAIN) |
618ce49f | 1696 | #define DEPRECATED_FRAME_CHAIN(frame) (gdbarch_deprecated_frame_chain (current_gdbarch, frame)) |
0f71a2f6 | 1697 | #endif |
0f71a2f6 | 1698 | |
618ce49f AC |
1699 | #if defined (DEPRECATED_FRAME_CHAIN_VALID) |
1700 | /* Legacy for systems yet to multi-arch DEPRECATED_FRAME_CHAIN_VALID */ | |
1701 | #if !defined (DEPRECATED_FRAME_CHAIN_VALID_P) | |
1702 | #define DEPRECATED_FRAME_CHAIN_VALID_P() (1) | |
51603483 DJ |
1703 | #endif |
1704 | #endif | |
1705 | ||
618ce49f AC |
1706 | extern int gdbarch_deprecated_frame_chain_valid_p (struct gdbarch *gdbarch); |
1707 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_CHAIN_VALID_P) | |
1708 | #error "Non multi-arch definition of DEPRECATED_FRAME_CHAIN_VALID" | |
51603483 | 1709 | #endif |
618ce49f AC |
1710 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_CHAIN_VALID_P) |
1711 | #define DEPRECATED_FRAME_CHAIN_VALID_P() (gdbarch_deprecated_frame_chain_valid_p (current_gdbarch)) | |
51603483 | 1712 | #endif |
7f55af32 | 1713 | |
618ce49f AC |
1714 | typedef int (gdbarch_deprecated_frame_chain_valid_ftype) (CORE_ADDR chain, struct frame_info *thisframe); |
1715 | extern int gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe); | |
1716 | extern void set_gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch, gdbarch_deprecated_frame_chain_valid_ftype *deprecated_frame_chain_valid); | |
1717 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_CHAIN_VALID) | |
1718 | #error "Non multi-arch definition of DEPRECATED_FRAME_CHAIN_VALID" | |
83905903 | 1719 | #endif |
c25083af | 1720 | #if !defined (DEPRECATED_FRAME_CHAIN_VALID) |
618ce49f | 1721 | #define DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe) (gdbarch_deprecated_frame_chain_valid (current_gdbarch, chain, thisframe)) |
0f71a2f6 | 1722 | #endif |
0f71a2f6 | 1723 | |
8bedc050 AC |
1724 | /* DEPRECATED_FRAME_SAVED_PC has been replaced by UNWIND_PC. Please |
1725 | note, per UNWIND_PC's doco, that while the two have similar | |
1726 | interfaces they have very different underlying implementations. */ | |
12cc2063 | 1727 | |
8bedc050 AC |
1728 | #if defined (DEPRECATED_FRAME_SAVED_PC) |
1729 | /* Legacy for systems yet to multi-arch DEPRECATED_FRAME_SAVED_PC */ | |
1730 | #if !defined (DEPRECATED_FRAME_SAVED_PC_P) | |
1731 | #define DEPRECATED_FRAME_SAVED_PC_P() (1) | |
d62d1979 AC |
1732 | #endif |
1733 | #endif | |
1734 | ||
8bedc050 AC |
1735 | extern int gdbarch_deprecated_frame_saved_pc_p (struct gdbarch *gdbarch); |
1736 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_SAVED_PC_P) | |
1737 | #error "Non multi-arch definition of DEPRECATED_FRAME_SAVED_PC" | |
d62d1979 | 1738 | #endif |
8bedc050 AC |
1739 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_SAVED_PC_P) |
1740 | #define DEPRECATED_FRAME_SAVED_PC_P() (gdbarch_deprecated_frame_saved_pc_p (current_gdbarch)) | |
d62d1979 AC |
1741 | #endif |
1742 | ||
8bedc050 AC |
1743 | typedef CORE_ADDR (gdbarch_deprecated_frame_saved_pc_ftype) (struct frame_info *fi); |
1744 | extern CORE_ADDR gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi); | |
1745 | extern void set_gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch, gdbarch_deprecated_frame_saved_pc_ftype *deprecated_frame_saved_pc); | |
1746 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_SAVED_PC) | |
1747 | #error "Non multi-arch definition of DEPRECATED_FRAME_SAVED_PC" | |
83905903 | 1748 | #endif |
c25083af | 1749 | #if !defined (DEPRECATED_FRAME_SAVED_PC) |
8bedc050 | 1750 | #define DEPRECATED_FRAME_SAVED_PC(fi) (gdbarch_deprecated_frame_saved_pc (current_gdbarch, fi)) |
0f71a2f6 | 1751 | #endif |
0f71a2f6 | 1752 | |
12cc2063 AC |
1753 | extern int gdbarch_unwind_pc_p (struct gdbarch *gdbarch); |
1754 | ||
1755 | typedef CORE_ADDR (gdbarch_unwind_pc_ftype) (struct gdbarch *gdbarch, struct frame_info *next_frame); | |
1756 | extern CORE_ADDR gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame); | |
1757 | extern void set_gdbarch_unwind_pc (struct gdbarch *gdbarch, gdbarch_unwind_pc_ftype *unwind_pc); | |
1758 | ||
a9e5fdc2 AC |
1759 | extern int gdbarch_unwind_sp_p (struct gdbarch *gdbarch); |
1760 | ||
1761 | typedef CORE_ADDR (gdbarch_unwind_sp_ftype) (struct gdbarch *gdbarch, struct frame_info *next_frame); | |
1762 | extern CORE_ADDR gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame); | |
1763 | extern void set_gdbarch_unwind_sp (struct gdbarch *gdbarch, gdbarch_unwind_sp_ftype *unwind_sp); | |
1764 | ||
42efa47a AC |
1765 | /* DEPRECATED_FRAME_ARGS_ADDRESS as been replaced by the per-frame |
1766 | frame-base. Enable frame-base before frame-unwind. */ | |
1767 | ||
1768 | #if defined (DEPRECATED_FRAME_ARGS_ADDRESS) | |
1769 | /* Legacy for systems yet to multi-arch DEPRECATED_FRAME_ARGS_ADDRESS */ | |
1770 | #if !defined (DEPRECATED_FRAME_ARGS_ADDRESS_P) | |
1771 | #define DEPRECATED_FRAME_ARGS_ADDRESS_P() (1) | |
1772 | #endif | |
1773 | #endif | |
1774 | ||
42efa47a AC |
1775 | extern int gdbarch_deprecated_frame_args_address_p (struct gdbarch *gdbarch); |
1776 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_ARGS_ADDRESS_P) | |
1777 | #error "Non multi-arch definition of DEPRECATED_FRAME_ARGS_ADDRESS" | |
1778 | #endif | |
1779 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_ARGS_ADDRESS_P) | |
1780 | #define DEPRECATED_FRAME_ARGS_ADDRESS_P() (gdbarch_deprecated_frame_args_address_p (current_gdbarch)) | |
1781 | #endif | |
1782 | ||
42efa47a AC |
1783 | typedef CORE_ADDR (gdbarch_deprecated_frame_args_address_ftype) (struct frame_info *fi); |
1784 | extern CORE_ADDR gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi); | |
1785 | extern void set_gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch, gdbarch_deprecated_frame_args_address_ftype *deprecated_frame_args_address); | |
1786 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_ARGS_ADDRESS) | |
1787 | #error "Non multi-arch definition of DEPRECATED_FRAME_ARGS_ADDRESS" | |
1788 | #endif | |
1789 | #if !defined (DEPRECATED_FRAME_ARGS_ADDRESS) | |
1790 | #define DEPRECATED_FRAME_ARGS_ADDRESS(fi) (gdbarch_deprecated_frame_args_address (current_gdbarch, fi)) | |
1791 | #endif | |
1792 | ||
1793 | /* DEPRECATED_FRAME_LOCALS_ADDRESS as been replaced by the per-frame | |
1794 | frame-base. Enable frame-base before frame-unwind. */ | |
1795 | ||
1796 | #if defined (DEPRECATED_FRAME_LOCALS_ADDRESS) | |
1797 | /* Legacy for systems yet to multi-arch DEPRECATED_FRAME_LOCALS_ADDRESS */ | |
1798 | #if !defined (DEPRECATED_FRAME_LOCALS_ADDRESS_P) | |
1799 | #define DEPRECATED_FRAME_LOCALS_ADDRESS_P() (1) | |
1800 | #endif | |
1801 | #endif | |
1802 | ||
42efa47a AC |
1803 | extern int gdbarch_deprecated_frame_locals_address_p (struct gdbarch *gdbarch); |
1804 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_LOCALS_ADDRESS_P) | |
1805 | #error "Non multi-arch definition of DEPRECATED_FRAME_LOCALS_ADDRESS" | |
83905903 | 1806 | #endif |
42efa47a AC |
1807 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_LOCALS_ADDRESS_P) |
1808 | #define DEPRECATED_FRAME_LOCALS_ADDRESS_P() (gdbarch_deprecated_frame_locals_address_p (current_gdbarch)) | |
0f71a2f6 | 1809 | #endif |
0f71a2f6 | 1810 | |
42efa47a AC |
1811 | typedef CORE_ADDR (gdbarch_deprecated_frame_locals_address_ftype) (struct frame_info *fi); |
1812 | extern CORE_ADDR gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi); | |
1813 | extern void set_gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch, gdbarch_deprecated_frame_locals_address_ftype *deprecated_frame_locals_address); | |
1814 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_LOCALS_ADDRESS) | |
1815 | #error "Non multi-arch definition of DEPRECATED_FRAME_LOCALS_ADDRESS" | |
83905903 | 1816 | #endif |
42efa47a AC |
1817 | #if !defined (DEPRECATED_FRAME_LOCALS_ADDRESS) |
1818 | #define DEPRECATED_FRAME_LOCALS_ADDRESS(fi) (gdbarch_deprecated_frame_locals_address (current_gdbarch, fi)) | |
0f71a2f6 | 1819 | #endif |
0f71a2f6 | 1820 | |
6913c89a AC |
1821 | #if defined (DEPRECATED_SAVED_PC_AFTER_CALL) |
1822 | /* Legacy for systems yet to multi-arch DEPRECATED_SAVED_PC_AFTER_CALL */ | |
1823 | #if !defined (DEPRECATED_SAVED_PC_AFTER_CALL_P) | |
1824 | #define DEPRECATED_SAVED_PC_AFTER_CALL_P() (1) | |
4443bd83 AC |
1825 | #endif |
1826 | #endif | |
1827 | ||
6913c89a AC |
1828 | extern int gdbarch_deprecated_saved_pc_after_call_p (struct gdbarch *gdbarch); |
1829 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SAVED_PC_AFTER_CALL_P) | |
1830 | #error "Non multi-arch definition of DEPRECATED_SAVED_PC_AFTER_CALL" | |
4443bd83 | 1831 | #endif |
6913c89a AC |
1832 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_SAVED_PC_AFTER_CALL_P) |
1833 | #define DEPRECATED_SAVED_PC_AFTER_CALL_P() (gdbarch_deprecated_saved_pc_after_call_p (current_gdbarch)) | |
4443bd83 AC |
1834 | #endif |
1835 | ||
6913c89a AC |
1836 | typedef CORE_ADDR (gdbarch_deprecated_saved_pc_after_call_ftype) (struct frame_info *frame); |
1837 | extern CORE_ADDR gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame); | |
1838 | extern void set_gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch, gdbarch_deprecated_saved_pc_after_call_ftype *deprecated_saved_pc_after_call); | |
1839 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SAVED_PC_AFTER_CALL) | |
1840 | #error "Non multi-arch definition of DEPRECATED_SAVED_PC_AFTER_CALL" | |
83905903 | 1841 | #endif |
c25083af | 1842 | #if !defined (DEPRECATED_SAVED_PC_AFTER_CALL) |
6913c89a | 1843 | #define DEPRECATED_SAVED_PC_AFTER_CALL(frame) (gdbarch_deprecated_saved_pc_after_call (current_gdbarch, frame)) |
0f71a2f6 | 1844 | #endif |
0f71a2f6 | 1845 | |
983a287a AC |
1846 | #if defined (FRAME_NUM_ARGS) |
1847 | /* Legacy for systems yet to multi-arch FRAME_NUM_ARGS */ | |
1848 | #if !defined (FRAME_NUM_ARGS_P) | |
1849 | #define FRAME_NUM_ARGS_P() (1) | |
1850 | #endif | |
1851 | #endif | |
1852 | ||
983a287a AC |
1853 | extern int gdbarch_frame_num_args_p (struct gdbarch *gdbarch); |
1854 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_NUM_ARGS_P) | |
1855 | #error "Non multi-arch definition of FRAME_NUM_ARGS" | |
1856 | #endif | |
1857 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_NUM_ARGS_P) | |
1858 | #define FRAME_NUM_ARGS_P() (gdbarch_frame_num_args_p (current_gdbarch)) | |
1859 | #endif | |
1860 | ||
104c1213 JM |
1861 | typedef int (gdbarch_frame_num_args_ftype) (struct frame_info *frame); |
1862 | extern int gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame); | |
1863 | extern void set_gdbarch_frame_num_args (struct gdbarch *gdbarch, gdbarch_frame_num_args_ftype *frame_num_args); | |
83905903 AC |
1864 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_NUM_ARGS) |
1865 | #error "Non multi-arch definition of FRAME_NUM_ARGS" | |
1866 | #endif | |
c25083af | 1867 | #if !defined (FRAME_NUM_ARGS) |
0f71a2f6 JM |
1868 | #define FRAME_NUM_ARGS(frame) (gdbarch_frame_num_args (current_gdbarch, frame)) |
1869 | #endif | |
0f71a2f6 | 1870 | |
f27dd7fd AC |
1871 | /* DEPRECATED_STACK_ALIGN has been replaced by an initial aligning call |
1872 | to frame_align and the requirement that methods such as | |
1873 | push_dummy_call and frame_red_zone_size maintain correct stack/frame | |
1874 | alignment. */ | |
1875 | ||
1876 | #if defined (DEPRECATED_STACK_ALIGN) | |
1877 | /* Legacy for systems yet to multi-arch DEPRECATED_STACK_ALIGN */ | |
1878 | #if !defined (DEPRECATED_STACK_ALIGN_P) | |
1879 | #define DEPRECATED_STACK_ALIGN_P() (1) | |
2ada493a | 1880 | #endif |
eee30e78 | 1881 | #endif |
2ada493a | 1882 | |
f27dd7fd AC |
1883 | extern int gdbarch_deprecated_stack_align_p (struct gdbarch *gdbarch); |
1884 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_STACK_ALIGN_P) | |
1885 | #error "Non multi-arch definition of DEPRECATED_STACK_ALIGN" | |
83905903 | 1886 | #endif |
f27dd7fd AC |
1887 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_STACK_ALIGN_P) |
1888 | #define DEPRECATED_STACK_ALIGN_P() (gdbarch_deprecated_stack_align_p (current_gdbarch)) | |
2ada493a AC |
1889 | #endif |
1890 | ||
f27dd7fd AC |
1891 | typedef CORE_ADDR (gdbarch_deprecated_stack_align_ftype) (CORE_ADDR sp); |
1892 | extern CORE_ADDR gdbarch_deprecated_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp); | |
1893 | extern void set_gdbarch_deprecated_stack_align (struct gdbarch *gdbarch, gdbarch_deprecated_stack_align_ftype *deprecated_stack_align); | |
1894 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_STACK_ALIGN) | |
1895 | #error "Non multi-arch definition of DEPRECATED_STACK_ALIGN" | |
83905903 | 1896 | #endif |
f27dd7fd AC |
1897 | #if !defined (DEPRECATED_STACK_ALIGN) |
1898 | #define DEPRECATED_STACK_ALIGN(sp) (gdbarch_deprecated_stack_align (current_gdbarch, sp)) | |
2ada493a AC |
1899 | #endif |
1900 | ||
dc604539 AC |
1901 | extern int gdbarch_frame_align_p (struct gdbarch *gdbarch); |
1902 | ||
1903 | typedef CORE_ADDR (gdbarch_frame_align_ftype) (struct gdbarch *gdbarch, CORE_ADDR address); | |
1904 | extern CORE_ADDR gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address); | |
1905 | extern void set_gdbarch_frame_align (struct gdbarch *gdbarch, gdbarch_frame_align_ftype *frame_align); | |
1906 | ||
192cb3d4 MK |
1907 | /* DEPRECATED_REG_STRUCT_HAS_ADDR has been replaced by |
1908 | stabs_argument_has_addr. */ | |
1909 | ||
88d89dbb MK |
1910 | #if defined (DEPRECATED_REG_STRUCT_HAS_ADDR) |
1911 | /* Legacy for systems yet to multi-arch DEPRECATED_REG_STRUCT_HAS_ADDR */ | |
1912 | #if !defined (DEPRECATED_REG_STRUCT_HAS_ADDR_P) | |
1913 | #define DEPRECATED_REG_STRUCT_HAS_ADDR_P() (1) | |
d03e67c9 | 1914 | #endif |
eee30e78 | 1915 | #endif |
d03e67c9 | 1916 | |
88d89dbb MK |
1917 | extern int gdbarch_deprecated_reg_struct_has_addr_p (struct gdbarch *gdbarch); |
1918 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REG_STRUCT_HAS_ADDR_P) | |
1919 | #error "Non multi-arch definition of DEPRECATED_REG_STRUCT_HAS_ADDR" | |
83905903 | 1920 | #endif |
88d89dbb MK |
1921 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_REG_STRUCT_HAS_ADDR_P) |
1922 | #define DEPRECATED_REG_STRUCT_HAS_ADDR_P() (gdbarch_deprecated_reg_struct_has_addr_p (current_gdbarch)) | |
d03e67c9 AC |
1923 | #endif |
1924 | ||
88d89dbb MK |
1925 | typedef int (gdbarch_deprecated_reg_struct_has_addr_ftype) (int gcc_p, struct type *type); |
1926 | extern int gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type); | |
1927 | extern void set_gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch, gdbarch_deprecated_reg_struct_has_addr_ftype *deprecated_reg_struct_has_addr); | |
1928 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REG_STRUCT_HAS_ADDR) | |
1929 | #error "Non multi-arch definition of DEPRECATED_REG_STRUCT_HAS_ADDR" | |
83905903 | 1930 | #endif |
88d89dbb MK |
1931 | #if !defined (DEPRECATED_REG_STRUCT_HAS_ADDR) |
1932 | #define DEPRECATED_REG_STRUCT_HAS_ADDR(gcc_p, type) (gdbarch_deprecated_reg_struct_has_addr (current_gdbarch, gcc_p, type)) | |
d03e67c9 AC |
1933 | #endif |
1934 | ||
192cb3d4 MK |
1935 | typedef int (gdbarch_stabs_argument_has_addr_ftype) (struct gdbarch *gdbarch, struct type *type); |
1936 | extern int gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type); | |
1937 | extern void set_gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, gdbarch_stabs_argument_has_addr_ftype *stabs_argument_has_addr); | |
1938 | ||
8b148df9 AC |
1939 | extern int gdbarch_frame_red_zone_size (struct gdbarch *gdbarch); |
1940 | extern void set_gdbarch_frame_red_zone_size (struct gdbarch *gdbarch, int frame_red_zone_size); | |
1941 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_RED_ZONE_SIZE) | |
1942 | #error "Non multi-arch definition of FRAME_RED_ZONE_SIZE" | |
1943 | #endif | |
1944 | #if !defined (FRAME_RED_ZONE_SIZE) | |
1945 | #define FRAME_RED_ZONE_SIZE (gdbarch_frame_red_zone_size (current_gdbarch)) | |
1946 | #endif | |
1947 | ||
58d5518e ND |
1948 | extern int gdbarch_parm_boundary (struct gdbarch *gdbarch); |
1949 | extern void set_gdbarch_parm_boundary (struct gdbarch *gdbarch, int parm_boundary); | |
83905903 AC |
1950 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PARM_BOUNDARY) |
1951 | #error "Non multi-arch definition of PARM_BOUNDARY" | |
1952 | #endif | |
c25083af | 1953 | #if !defined (PARM_BOUNDARY) |
58d5518e ND |
1954 | #define PARM_BOUNDARY (gdbarch_parm_boundary (current_gdbarch)) |
1955 | #endif | |
58d5518e | 1956 | |
f0d4cc9e AC |
1957 | extern const struct floatformat * gdbarch_float_format (struct gdbarch *gdbarch); |
1958 | extern void set_gdbarch_float_format (struct gdbarch *gdbarch, const struct floatformat * float_format); | |
83905903 AC |
1959 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_FLOAT_FORMAT) |
1960 | #error "Non multi-arch definition of TARGET_FLOAT_FORMAT" | |
1961 | #endif | |
c25083af | 1962 | #if !defined (TARGET_FLOAT_FORMAT) |
f0d4cc9e AC |
1963 | #define TARGET_FLOAT_FORMAT (gdbarch_float_format (current_gdbarch)) |
1964 | #endif | |
f0d4cc9e | 1965 | |
f0d4cc9e AC |
1966 | extern const struct floatformat * gdbarch_double_format (struct gdbarch *gdbarch); |
1967 | extern void set_gdbarch_double_format (struct gdbarch *gdbarch, const struct floatformat * double_format); | |
83905903 AC |
1968 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_DOUBLE_FORMAT) |
1969 | #error "Non multi-arch definition of TARGET_DOUBLE_FORMAT" | |
1970 | #endif | |
c25083af | 1971 | #if !defined (TARGET_DOUBLE_FORMAT) |
f0d4cc9e AC |
1972 | #define TARGET_DOUBLE_FORMAT (gdbarch_double_format (current_gdbarch)) |
1973 | #endif | |
f0d4cc9e | 1974 | |
f0d4cc9e AC |
1975 | extern const struct floatformat * gdbarch_long_double_format (struct gdbarch *gdbarch); |
1976 | extern void set_gdbarch_long_double_format (struct gdbarch *gdbarch, const struct floatformat * long_double_format); | |
83905903 AC |
1977 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_DOUBLE_FORMAT) |
1978 | #error "Non multi-arch definition of TARGET_LONG_DOUBLE_FORMAT" | |
1979 | #endif | |
c25083af | 1980 | #if !defined (TARGET_LONG_DOUBLE_FORMAT) |
f0d4cc9e AC |
1981 | #define TARGET_LONG_DOUBLE_FORMAT (gdbarch_long_double_format (current_gdbarch)) |
1982 | #endif | |
f0d4cc9e | 1983 | |
e2d0e7eb AC |
1984 | typedef CORE_ADDR (gdbarch_convert_from_func_ptr_addr_ftype) (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ); |
1985 | extern CORE_ADDR gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ); | |
f517ea4e | 1986 | extern void set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr); |
f517ea4e | 1987 | |
875e1767 AC |
1988 | /* On some machines there are bits in addresses which are not really |
1989 | part of the address, but are used by the kernel, the hardware, etc. | |
1990 | for special purposes. ADDR_BITS_REMOVE takes out any such bits so | |
1991 | we get a "real" address such as one would find in a symbol table. | |
1992 | This is used only for addresses of instructions, and even then I'm | |
1993 | not sure it's used in all contexts. It exists to deal with there | |
1994 | being a few stray bits in the PC which would mislead us, not as some | |
1995 | sort of generic thing to handle alignment or segmentation (it's | |
1996 | possible it should be in TARGET_READ_PC instead). */ | |
1997 | ||
875e1767 AC |
1998 | typedef CORE_ADDR (gdbarch_addr_bits_remove_ftype) (CORE_ADDR addr); |
1999 | extern CORE_ADDR gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr); | |
2000 | extern void set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch, gdbarch_addr_bits_remove_ftype *addr_bits_remove); | |
83905903 AC |
2001 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDR_BITS_REMOVE) |
2002 | #error "Non multi-arch definition of ADDR_BITS_REMOVE" | |
2003 | #endif | |
c25083af | 2004 | #if !defined (ADDR_BITS_REMOVE) |
875e1767 AC |
2005 | #define ADDR_BITS_REMOVE(addr) (gdbarch_addr_bits_remove (current_gdbarch, addr)) |
2006 | #endif | |
875e1767 | 2007 | |
2e092625 | 2008 | /* It is not at all clear why SMASH_TEXT_ADDRESS is not folded into |
181c1381 RE |
2009 | ADDR_BITS_REMOVE. */ |
2010 | ||
181c1381 RE |
2011 | typedef CORE_ADDR (gdbarch_smash_text_address_ftype) (CORE_ADDR addr); |
2012 | extern CORE_ADDR gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr); | |
2013 | extern void set_gdbarch_smash_text_address (struct gdbarch *gdbarch, gdbarch_smash_text_address_ftype *smash_text_address); | |
2014 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SMASH_TEXT_ADDRESS) | |
2015 | #error "Non multi-arch definition of SMASH_TEXT_ADDRESS" | |
2016 | #endif | |
c25083af | 2017 | #if !defined (SMASH_TEXT_ADDRESS) |
181c1381 RE |
2018 | #define SMASH_TEXT_ADDRESS(addr) (gdbarch_smash_text_address (current_gdbarch, addr)) |
2019 | #endif | |
181c1381 | 2020 | |
64c4637f AC |
2021 | /* FIXME/cagney/2001-01-18: This should be split in two. A target method that indicates if |
2022 | the target needs software single step. An ISA method to implement it. | |
2023 | ||
2024 | FIXME/cagney/2001-01-18: This should be replaced with something that inserts breakpoints | |
2025 | using the breakpoint system instead of blatting memory directly (as with rs6000). | |
2026 | ||
2027 | FIXME/cagney/2001-01-18: The logic is backwards. It should be asking if the target can | |
2028 | single step. If not, then implement single step using breakpoints. */ | |
2029 | ||
2030 | #if defined (SOFTWARE_SINGLE_STEP) | |
2031 | /* Legacy for systems yet to multi-arch SOFTWARE_SINGLE_STEP */ | |
2032 | #if !defined (SOFTWARE_SINGLE_STEP_P) | |
2033 | #define SOFTWARE_SINGLE_STEP_P() (1) | |
2034 | #endif | |
2035 | #endif | |
2036 | ||
64c4637f | 2037 | extern int gdbarch_software_single_step_p (struct gdbarch *gdbarch); |
83905903 AC |
2038 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SOFTWARE_SINGLE_STEP_P) |
2039 | #error "Non multi-arch definition of SOFTWARE_SINGLE_STEP" | |
2040 | #endif | |
64c4637f AC |
2041 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SOFTWARE_SINGLE_STEP_P) |
2042 | #define SOFTWARE_SINGLE_STEP_P() (gdbarch_software_single_step_p (current_gdbarch)) | |
2043 | #endif | |
2044 | ||
64c4637f AC |
2045 | typedef void (gdbarch_software_single_step_ftype) (enum target_signal sig, int insert_breakpoints_p); |
2046 | extern void gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p); | |
2047 | extern void set_gdbarch_software_single_step (struct gdbarch *gdbarch, gdbarch_software_single_step_ftype *software_single_step); | |
83905903 AC |
2048 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SOFTWARE_SINGLE_STEP) |
2049 | #error "Non multi-arch definition of SOFTWARE_SINGLE_STEP" | |
2050 | #endif | |
c25083af | 2051 | #if !defined (SOFTWARE_SINGLE_STEP) |
64c4637f AC |
2052 | #define SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p) (gdbarch_software_single_step (current_gdbarch, sig, insert_breakpoints_p)) |
2053 | #endif | |
64c4637f | 2054 | |
f6c40618 AC |
2055 | /* FIXME: cagney/2003-08-28: Need to find a better way of selecting the |
2056 | disassembler. Perhaphs objdump can handle it? */ | |
2057 | ||
a89aa300 AC |
2058 | typedef int (gdbarch_print_insn_ftype) (bfd_vma vma, struct disassemble_info *info); |
2059 | extern int gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info); | |
2bf0cb65 EZ |
2060 | extern void set_gdbarch_print_insn (struct gdbarch *gdbarch, gdbarch_print_insn_ftype *print_insn); |
2061 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_PRINT_INSN) | |
2062 | #error "Non multi-arch definition of TARGET_PRINT_INSN" | |
2063 | #endif | |
c25083af | 2064 | #if !defined (TARGET_PRINT_INSN) |
2bf0cb65 EZ |
2065 | #define TARGET_PRINT_INSN(vma, info) (gdbarch_print_insn (current_gdbarch, vma, info)) |
2066 | #endif | |
2bf0cb65 | 2067 | |
bdcd319a CV |
2068 | typedef CORE_ADDR (gdbarch_skip_trampoline_code_ftype) (CORE_ADDR pc); |
2069 | extern CORE_ADDR gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc); | |
2070 | extern void set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, gdbarch_skip_trampoline_code_ftype *skip_trampoline_code); | |
2071 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SKIP_TRAMPOLINE_CODE) | |
2072 | #error "Non multi-arch definition of SKIP_TRAMPOLINE_CODE" | |
2073 | #endif | |
c25083af | 2074 | #if !defined (SKIP_TRAMPOLINE_CODE) |
bdcd319a CV |
2075 | #define SKIP_TRAMPOLINE_CODE(pc) (gdbarch_skip_trampoline_code (current_gdbarch, pc)) |
2076 | #endif | |
bdcd319a | 2077 | |
dea0c52f MK |
2078 | /* If IN_SOLIB_DYNSYM_RESOLVE_CODE returns true, and SKIP_SOLIB_RESOLVER |
2079 | evaluates non-zero, this is the address where the debugger will place | |
2080 | a step-resume breakpoint to get us past the dynamic linker. */ | |
2081 | ||
4c8c40e6 | 2082 | typedef CORE_ADDR (gdbarch_skip_solib_resolver_ftype) (struct gdbarch *gdbarch, CORE_ADDR pc); |
dea0c52f MK |
2083 | extern CORE_ADDR gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc); |
2084 | extern void set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, gdbarch_skip_solib_resolver_ftype *skip_solib_resolver); | |
dea0c52f | 2085 | |
68e9cc94 CV |
2086 | /* For SVR4 shared libraries, each call goes through a small piece of |
2087 | trampoline code in the ".plt" section. IN_SOLIB_CALL_TRAMPOLINE evaluates | |
d50355b6 | 2088 | to nonzero if we are currently stopped in one of these. */ |
68e9cc94 | 2089 | |
68e9cc94 CV |
2090 | typedef int (gdbarch_in_solib_call_trampoline_ftype) (CORE_ADDR pc, char *name); |
2091 | extern int gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name); | |
2092 | extern void set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline); | |
2093 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (IN_SOLIB_CALL_TRAMPOLINE) | |
2094 | #error "Non multi-arch definition of IN_SOLIB_CALL_TRAMPOLINE" | |
2095 | #endif | |
c25083af | 2096 | #if !defined (IN_SOLIB_CALL_TRAMPOLINE) |
68e9cc94 CV |
2097 | #define IN_SOLIB_CALL_TRAMPOLINE(pc, name) (gdbarch_in_solib_call_trampoline (current_gdbarch, pc, name)) |
2098 | #endif | |
68e9cc94 | 2099 | |
d50355b6 MS |
2100 | /* Some systems also have trampoline code for returning from shared libs. */ |
2101 | ||
d50355b6 MS |
2102 | typedef int (gdbarch_in_solib_return_trampoline_ftype) (CORE_ADDR pc, char *name); |
2103 | extern int gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name); | |
2104 | extern void set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline); | |
2105 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (IN_SOLIB_RETURN_TRAMPOLINE) | |
2106 | #error "Non multi-arch definition of IN_SOLIB_RETURN_TRAMPOLINE" | |
2107 | #endif | |
c25083af | 2108 | #if !defined (IN_SOLIB_RETURN_TRAMPOLINE) |
d50355b6 MS |
2109 | #define IN_SOLIB_RETURN_TRAMPOLINE(pc, name) (gdbarch_in_solib_return_trampoline (current_gdbarch, pc, name)) |
2110 | #endif | |
d50355b6 | 2111 | |
aa2a3f87 AC |
2112 | /* NOTE: cagney/2004-03-23: DEPRECATED_SIGTRAMP_START, |
2113 | DEPRECATED_SIGTRAMP_END, and DEPRECATED_PC_IN_SIGTRAMP have all been | |
2114 | superseeded by signal trampoline frame sniffers. */ | |
f561f026 AC |
2115 | |
2116 | #if defined (DEPRECATED_PC_IN_SIGTRAMP) | |
2117 | /* Legacy for systems yet to multi-arch DEPRECATED_PC_IN_SIGTRAMP */ | |
2118 | #if !defined (DEPRECATED_PC_IN_SIGTRAMP_P) | |
2119 | #define DEPRECATED_PC_IN_SIGTRAMP_P() (1) | |
2120 | #endif | |
2121 | #endif | |
2122 | ||
2123 | extern int gdbarch_deprecated_pc_in_sigtramp_p (struct gdbarch *gdbarch); | |
2124 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PC_IN_SIGTRAMP_P) | |
2125 | #error "Non multi-arch definition of DEPRECATED_PC_IN_SIGTRAMP" | |
2126 | #endif | |
2127 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PC_IN_SIGTRAMP_P) | |
2128 | #define DEPRECATED_PC_IN_SIGTRAMP_P() (gdbarch_deprecated_pc_in_sigtramp_p (current_gdbarch)) | |
2129 | #endif | |
2130 | ||
2131 | typedef int (gdbarch_deprecated_pc_in_sigtramp_ftype) (CORE_ADDR pc, char *name); | |
2132 | extern int gdbarch_deprecated_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc, char *name); | |
2133 | extern void set_gdbarch_deprecated_pc_in_sigtramp (struct gdbarch *gdbarch, gdbarch_deprecated_pc_in_sigtramp_ftype *deprecated_pc_in_sigtramp); | |
2134 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PC_IN_SIGTRAMP) | |
2135 | #error "Non multi-arch definition of DEPRECATED_PC_IN_SIGTRAMP" | |
2136 | #endif | |
2137 | #if !defined (DEPRECATED_PC_IN_SIGTRAMP) | |
2138 | #define DEPRECATED_PC_IN_SIGTRAMP(pc, name) (gdbarch_deprecated_pc_in_sigtramp (current_gdbarch, pc, name)) | |
d7bd68ca | 2139 | #endif |
d7bd68ca | 2140 | |
aa2a3f87 AC |
2141 | #if defined (DEPRECATED_SIGTRAMP_START) |
2142 | /* Legacy for systems yet to multi-arch DEPRECATED_SIGTRAMP_START */ | |
2143 | #if !defined (DEPRECATED_SIGTRAMP_START_P) | |
2144 | #define DEPRECATED_SIGTRAMP_START_P() (1) | |
43156d82 MK |
2145 | #endif |
2146 | #endif | |
2147 | ||
aa2a3f87 AC |
2148 | extern int gdbarch_deprecated_sigtramp_start_p (struct gdbarch *gdbarch); |
2149 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SIGTRAMP_START_P) | |
2150 | #error "Non multi-arch definition of DEPRECATED_SIGTRAMP_START" | |
43156d82 | 2151 | #endif |
aa2a3f87 AC |
2152 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_SIGTRAMP_START_P) |
2153 | #define DEPRECATED_SIGTRAMP_START_P() (gdbarch_deprecated_sigtramp_start_p (current_gdbarch)) | |
43156d82 MK |
2154 | #endif |
2155 | ||
aa2a3f87 AC |
2156 | typedef CORE_ADDR (gdbarch_deprecated_sigtramp_start_ftype) (CORE_ADDR pc); |
2157 | extern CORE_ADDR gdbarch_deprecated_sigtramp_start (struct gdbarch *gdbarch, CORE_ADDR pc); | |
2158 | extern void set_gdbarch_deprecated_sigtramp_start (struct gdbarch *gdbarch, gdbarch_deprecated_sigtramp_start_ftype *deprecated_sigtramp_start); | |
2159 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SIGTRAMP_START) | |
2160 | #error "Non multi-arch definition of DEPRECATED_SIGTRAMP_START" | |
43156d82 | 2161 | #endif |
aa2a3f87 AC |
2162 | #if !defined (DEPRECATED_SIGTRAMP_START) |
2163 | #define DEPRECATED_SIGTRAMP_START(pc) (gdbarch_deprecated_sigtramp_start (current_gdbarch, pc)) | |
43156d82 | 2164 | #endif |
43156d82 | 2165 | |
aa2a3f87 AC |
2166 | #if defined (DEPRECATED_SIGTRAMP_END) |
2167 | /* Legacy for systems yet to multi-arch DEPRECATED_SIGTRAMP_END */ | |
2168 | #if !defined (DEPRECATED_SIGTRAMP_END_P) | |
2169 | #define DEPRECATED_SIGTRAMP_END_P() (1) | |
e76cff22 AC |
2170 | #endif |
2171 | #endif | |
2172 | ||
aa2a3f87 AC |
2173 | extern int gdbarch_deprecated_sigtramp_end_p (struct gdbarch *gdbarch); |
2174 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SIGTRAMP_END_P) | |
2175 | #error "Non multi-arch definition of DEPRECATED_SIGTRAMP_END" | |
e76cff22 | 2176 | #endif |
aa2a3f87 AC |
2177 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_SIGTRAMP_END_P) |
2178 | #define DEPRECATED_SIGTRAMP_END_P() (gdbarch_deprecated_sigtramp_end_p (current_gdbarch)) | |
e76cff22 AC |
2179 | #endif |
2180 | ||
aa2a3f87 AC |
2181 | typedef CORE_ADDR (gdbarch_deprecated_sigtramp_end_ftype) (CORE_ADDR pc); |
2182 | extern CORE_ADDR gdbarch_deprecated_sigtramp_end (struct gdbarch *gdbarch, CORE_ADDR pc); | |
2183 | extern void set_gdbarch_deprecated_sigtramp_end (struct gdbarch *gdbarch, gdbarch_deprecated_sigtramp_end_ftype *deprecated_sigtramp_end); | |
2184 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SIGTRAMP_END) | |
2185 | #error "Non multi-arch definition of DEPRECATED_SIGTRAMP_END" | |
43156d82 | 2186 | #endif |
aa2a3f87 AC |
2187 | #if !defined (DEPRECATED_SIGTRAMP_END) |
2188 | #define DEPRECATED_SIGTRAMP_END(pc) (gdbarch_deprecated_sigtramp_end (current_gdbarch, pc)) | |
43156d82 | 2189 | #endif |
43156d82 | 2190 | |
c12260ac CV |
2191 | /* A target might have problems with watchpoints as soon as the stack |
2192 | frame of the current function has been destroyed. This mostly happens | |
2193 | as the first action in a funtion's epilogue. in_function_epilogue_p() | |
2194 | is defined to return a non-zero value if either the given addr is one | |
2195 | instruction after the stack destroying instruction up to the trailing | |
2196 | return instruction or if we can figure out that the stack frame has | |
2197 | already been invalidated regardless of the value of addr. Targets | |
2198 | which don't suffer from that problem could just let this functionality | |
2199 | untouched. */ | |
2200 | ||
2201 | typedef int (gdbarch_in_function_epilogue_p_ftype) (struct gdbarch *gdbarch, CORE_ADDR addr); | |
2202 | extern int gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr); | |
2203 | extern void set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p); | |
2204 | ||
552c04a7 TT |
2205 | /* Given a vector of command-line arguments, return a newly allocated |
2206 | string which, when passed to the create_inferior function, will be | |
2207 | parsed (on Unix systems, by the shell) to yield the same vector. | |
2208 | This function should call error() if the argument vector is not | |
2209 | representable for this target or if this target does not support | |
2210 | command-line arguments. | |
2211 | ARGC is the number of elements in the vector. | |
2212 | ARGV is an array of strings, one per argument. */ | |
2213 | ||
2214 | typedef char * (gdbarch_construct_inferior_arguments_ftype) (struct gdbarch *gdbarch, int argc, char **argv); | |
2215 | extern char * gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv); | |
2216 | extern void set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments); | |
2217 | ||
a2cf933a EZ |
2218 | typedef void (gdbarch_elf_make_msymbol_special_ftype) (asymbol *sym, struct minimal_symbol *msym); |
2219 | extern void gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym); | |
2220 | extern void set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special); | |
2221 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ELF_MAKE_MSYMBOL_SPECIAL) | |
2222 | #error "Non multi-arch definition of ELF_MAKE_MSYMBOL_SPECIAL" | |
2223 | #endif | |
c25083af | 2224 | #if !defined (ELF_MAKE_MSYMBOL_SPECIAL) |
a2cf933a EZ |
2225 | #define ELF_MAKE_MSYMBOL_SPECIAL(sym, msym) (gdbarch_elf_make_msymbol_special (current_gdbarch, sym, msym)) |
2226 | #endif | |
a2cf933a | 2227 | |
a2cf933a EZ |
2228 | typedef void (gdbarch_coff_make_msymbol_special_ftype) (int val, struct minimal_symbol *msym); |
2229 | extern void gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym); | |
2230 | extern void set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special); | |
2231 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (COFF_MAKE_MSYMBOL_SPECIAL) | |
2232 | #error "Non multi-arch definition of COFF_MAKE_MSYMBOL_SPECIAL" | |
2233 | #endif | |
c25083af | 2234 | #if !defined (COFF_MAKE_MSYMBOL_SPECIAL) |
a2cf933a EZ |
2235 | #define COFF_MAKE_MSYMBOL_SPECIAL(val, msym) (gdbarch_coff_make_msymbol_special (current_gdbarch, val, msym)) |
2236 | #endif | |
a2cf933a | 2237 | |
5720643c JB |
2238 | extern const char * gdbarch_name_of_malloc (struct gdbarch *gdbarch); |
2239 | extern void set_gdbarch_name_of_malloc (struct gdbarch *gdbarch, const char * name_of_malloc); | |
2240 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NAME_OF_MALLOC) | |
2241 | #error "Non multi-arch definition of NAME_OF_MALLOC" | |
2242 | #endif | |
c25083af | 2243 | #if !defined (NAME_OF_MALLOC) |
5720643c JB |
2244 | #define NAME_OF_MALLOC (gdbarch_name_of_malloc (current_gdbarch)) |
2245 | #endif | |
5720643c | 2246 | |
c4ed33b9 AC |
2247 | extern int gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch); |
2248 | extern void set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch, int cannot_step_breakpoint); | |
2249 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CANNOT_STEP_BREAKPOINT) | |
2250 | #error "Non multi-arch definition of CANNOT_STEP_BREAKPOINT" | |
2251 | #endif | |
c25083af | 2252 | #if !defined (CANNOT_STEP_BREAKPOINT) |
c4ed33b9 AC |
2253 | #define CANNOT_STEP_BREAKPOINT (gdbarch_cannot_step_breakpoint (current_gdbarch)) |
2254 | #endif | |
c4ed33b9 | 2255 | |
f74fa174 MM |
2256 | extern int gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch); |
2257 | extern void set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch, int have_nonsteppable_watchpoint); | |
2258 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (HAVE_NONSTEPPABLE_WATCHPOINT) | |
2259 | #error "Non multi-arch definition of HAVE_NONSTEPPABLE_WATCHPOINT" | |
2260 | #endif | |
c25083af | 2261 | #if !defined (HAVE_NONSTEPPABLE_WATCHPOINT) |
f74fa174 MM |
2262 | #define HAVE_NONSTEPPABLE_WATCHPOINT (gdbarch_have_nonsteppable_watchpoint (current_gdbarch)) |
2263 | #endif | |
f74fa174 | 2264 | |
8b2dbe47 KB |
2265 | #if defined (ADDRESS_CLASS_TYPE_FLAGS) |
2266 | /* Legacy for systems yet to multi-arch ADDRESS_CLASS_TYPE_FLAGS */ | |
2267 | #if !defined (ADDRESS_CLASS_TYPE_FLAGS_P) | |
2268 | #define ADDRESS_CLASS_TYPE_FLAGS_P() (1) | |
2269 | #endif | |
2270 | #endif | |
2271 | ||
8b2dbe47 KB |
2272 | extern int gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch); |
2273 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDRESS_CLASS_TYPE_FLAGS_P) | |
2274 | #error "Non multi-arch definition of ADDRESS_CLASS_TYPE_FLAGS" | |
2275 | #endif | |
2276 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ADDRESS_CLASS_TYPE_FLAGS_P) | |
2277 | #define ADDRESS_CLASS_TYPE_FLAGS_P() (gdbarch_address_class_type_flags_p (current_gdbarch)) | |
2278 | #endif | |
2279 | ||
8b2dbe47 KB |
2280 | typedef int (gdbarch_address_class_type_flags_ftype) (int byte_size, int dwarf2_addr_class); |
2281 | extern int gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class); | |
2282 | extern void set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch, gdbarch_address_class_type_flags_ftype *address_class_type_flags); | |
2283 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDRESS_CLASS_TYPE_FLAGS) | |
2284 | #error "Non multi-arch definition of ADDRESS_CLASS_TYPE_FLAGS" | |
2285 | #endif | |
c25083af | 2286 | #if !defined (ADDRESS_CLASS_TYPE_FLAGS) |
8b2dbe47 KB |
2287 | #define ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class) (gdbarch_address_class_type_flags (current_gdbarch, byte_size, dwarf2_addr_class)) |
2288 | #endif | |
8b2dbe47 | 2289 | |
8b2dbe47 | 2290 | extern int gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch); |
8b2dbe47 | 2291 | |
321432c0 KB |
2292 | typedef const char * (gdbarch_address_class_type_flags_to_name_ftype) (struct gdbarch *gdbarch, int type_flags); |
2293 | extern const char * gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags); | |
8b2dbe47 | 2294 | extern void set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name); |
8b2dbe47 KB |
2295 | |
2296 | extern int gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch); | |
8b2dbe47 | 2297 | |
321432c0 KB |
2298 | typedef int (gdbarch_address_class_name_to_type_flags_ftype) (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr); |
2299 | extern int gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr); | |
8b2dbe47 | 2300 | extern void set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags); |
8b2dbe47 | 2301 | |
b59ff9d5 AC |
2302 | /* Is a register in a group */ |
2303 | ||
2304 | typedef int (gdbarch_register_reggroup_p_ftype) (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup); | |
2305 | extern int gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup); | |
2306 | extern void set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch, gdbarch_register_reggroup_p_ftype *register_reggroup_p); | |
2307 | ||
2e092625 | 2308 | /* Fetch the pointer to the ith function argument. */ |
143985b7 AF |
2309 | |
2310 | #if defined (FETCH_POINTER_ARGUMENT) | |
2311 | /* Legacy for systems yet to multi-arch FETCH_POINTER_ARGUMENT */ | |
2312 | #if !defined (FETCH_POINTER_ARGUMENT_P) | |
2313 | #define FETCH_POINTER_ARGUMENT_P() (1) | |
2314 | #endif | |
2315 | #endif | |
2316 | ||
143985b7 AF |
2317 | extern int gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch); |
2318 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FETCH_POINTER_ARGUMENT_P) | |
2319 | #error "Non multi-arch definition of FETCH_POINTER_ARGUMENT" | |
2320 | #endif | |
2321 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FETCH_POINTER_ARGUMENT_P) | |
2322 | #define FETCH_POINTER_ARGUMENT_P() (gdbarch_fetch_pointer_argument_p (current_gdbarch)) | |
2323 | #endif | |
2324 | ||
143985b7 AF |
2325 | typedef CORE_ADDR (gdbarch_fetch_pointer_argument_ftype) (struct frame_info *frame, int argi, struct type *type); |
2326 | extern CORE_ADDR gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type); | |
2327 | extern void set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument); | |
2328 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FETCH_POINTER_ARGUMENT) | |
2329 | #error "Non multi-arch definition of FETCH_POINTER_ARGUMENT" | |
2330 | #endif | |
2331 | #if !defined (FETCH_POINTER_ARGUMENT) | |
2332 | #define FETCH_POINTER_ARGUMENT(frame, argi, type) (gdbarch_fetch_pointer_argument (current_gdbarch, frame, argi, type)) | |
2333 | #endif | |
2334 | ||
6ce6d90f MK |
2335 | /* Return the appropriate register set for a core file section with |
2336 | name SECT_NAME and size SECT_SIZE. */ | |
2337 | ||
2338 | extern int gdbarch_regset_from_core_section_p (struct gdbarch *gdbarch); | |
2339 | ||
2340 | typedef const struct regset * (gdbarch_regset_from_core_section_ftype) (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size); | |
2341 | extern const struct regset * gdbarch_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size); | |
2342 | extern void set_gdbarch_regset_from_core_section (struct gdbarch *gdbarch, gdbarch_regset_from_core_section_ftype *regset_from_core_section); | |
2343 | ||
104c1213 | 2344 | extern struct gdbarch_tdep *gdbarch_tdep (struct gdbarch *gdbarch); |
0f71a2f6 JM |
2345 | |
2346 | ||
2347 | /* Mechanism for co-ordinating the selection of a specific | |
2348 | architecture. | |
2349 | ||
2350 | GDB targets (*-tdep.c) can register an interest in a specific | |
2351 | architecture. Other GDB components can register a need to maintain | |
2352 | per-architecture data. | |
2353 | ||
2354 | The mechanisms below ensures that there is only a loose connection | |
2355 | between the set-architecture command and the various GDB | |
99e7bb18 | 2356 | components. Each component can independently register their need |
0f71a2f6 JM |
2357 | to maintain architecture specific data with gdbarch. |
2358 | ||
2359 | Pragmatics: | |
2360 | ||
2361 | Previously, a single TARGET_ARCHITECTURE_HOOK was provided. It | |
2362 | didn't scale. | |
2363 | ||
2364 | The more traditional mega-struct containing architecture specific | |
2365 | data for all the various GDB components was also considered. Since | |
99e7bb18 | 2366 | GDB is built from a variable number of (fairly independent) |
0f71a2f6 JM |
2367 | components it was determined that the global aproach was not |
2368 | applicable. */ | |
2369 | ||
2370 | ||
2371 | /* Register a new architectural family with GDB. | |
2372 | ||
2373 | Register support for the specified ARCHITECTURE with GDB. When | |
2374 | gdbarch determines that the specified architecture has been | |
2375 | selected, the corresponding INIT function is called. | |
2376 | ||
2377 | -- | |
2378 | ||
2379 | The INIT function takes two parameters: INFO which contains the | |
2380 | information available to gdbarch about the (possibly new) | |
2381 | architecture; ARCHES which is a list of the previously created | |
2382 | ``struct gdbarch'' for this architecture. | |
2383 | ||
0f79675b AC |
2384 | The INFO parameter is, as far as possible, be pre-initialized with |
2385 | information obtained from INFO.ABFD or the previously selected | |
2386 | architecture. | |
2387 | ||
2388 | The ARCHES parameter is a linked list (sorted most recently used) | |
2389 | of all the previously created architures for this architecture | |
2390 | family. The (possibly NULL) ARCHES->gdbarch can used to access | |
2391 | values from the previously selected architecture for this | |
2392 | architecture family. The global ``current_gdbarch'' shall not be | |
2393 | used. | |
0f71a2f6 JM |
2394 | |
2395 | The INIT function shall return any of: NULL - indicating that it | |
ec3d358c | 2396 | doesn't recognize the selected architecture; an existing ``struct |
0f71a2f6 JM |
2397 | gdbarch'' from the ARCHES list - indicating that the new |
2398 | architecture is just a synonym for an earlier architecture (see | |
2399 | gdbarch_list_lookup_by_info()); a newly created ``struct gdbarch'' | |
4b9b3959 AC |
2400 | - that describes the selected architecture (see gdbarch_alloc()). |
2401 | ||
2402 | The DUMP_TDEP function shall print out all target specific values. | |
2403 | Care should be taken to ensure that the function works in both the | |
2404 | multi-arch and non- multi-arch cases. */ | |
0f71a2f6 | 2405 | |
adf40b2e JM |
2406 | struct gdbarch_list |
2407 | { | |
2408 | struct gdbarch *gdbarch; | |
2409 | struct gdbarch_list *next; | |
2410 | }; | |
0f71a2f6 | 2411 | |
adf40b2e JM |
2412 | struct gdbarch_info |
2413 | { | |
adf40b2e JM |
2414 | /* Use default: NULL (ZERO). */ |
2415 | const struct bfd_arch_info *bfd_arch_info; | |
0f71a2f6 | 2416 | |
428721aa | 2417 | /* Use default: BFD_ENDIAN_UNKNOWN (NB: is not ZERO). */ |
adf40b2e | 2418 | int byte_order; |
0f71a2f6 | 2419 | |
adf40b2e JM |
2420 | /* Use default: NULL (ZERO). */ |
2421 | bfd *abfd; | |
0f71a2f6 | 2422 | |
adf40b2e JM |
2423 | /* Use default: NULL (ZERO). */ |
2424 | struct gdbarch_tdep_info *tdep_info; | |
4be87837 DJ |
2425 | |
2426 | /* Use default: GDB_OSABI_UNINITIALIZED (-1). */ | |
2427 | enum gdb_osabi osabi; | |
adf40b2e | 2428 | }; |
0f71a2f6 | 2429 | |
104c1213 | 2430 | typedef struct gdbarch *(gdbarch_init_ftype) (struct gdbarch_info info, struct gdbarch_list *arches); |
4b9b3959 | 2431 | typedef void (gdbarch_dump_tdep_ftype) (struct gdbarch *gdbarch, struct ui_file *file); |
0f71a2f6 | 2432 | |
4b9b3959 | 2433 | /* DEPRECATED - use gdbarch_register() */ |
104c1213 | 2434 | extern void register_gdbarch_init (enum bfd_architecture architecture, gdbarch_init_ftype *); |
0f71a2f6 | 2435 | |
4b9b3959 AC |
2436 | extern void gdbarch_register (enum bfd_architecture architecture, |
2437 | gdbarch_init_ftype *, | |
2438 | gdbarch_dump_tdep_ftype *); | |
2439 | ||
0f71a2f6 | 2440 | |
b4a20239 AC |
2441 | /* Return a freshly allocated, NULL terminated, array of the valid |
2442 | architecture names. Since architectures are registered during the | |
2443 | _initialize phase this function only returns useful information | |
2444 | once initialization has been completed. */ | |
2445 | ||
2446 | extern const char **gdbarch_printable_names (void); | |
2447 | ||
2448 | ||
0f71a2f6 JM |
2449 | /* Helper function. Search the list of ARCHES for a GDBARCH that |
2450 | matches the information provided by INFO. */ | |
2451 | ||
104c1213 | 2452 | extern struct gdbarch_list *gdbarch_list_lookup_by_info (struct gdbarch_list *arches, const struct gdbarch_info *info); |
0f71a2f6 JM |
2453 | |
2454 | ||
2455 | /* Helper function. Create a preliminary ``struct gdbarch''. Perform | |
2456 | basic initialization using values obtained from the INFO andTDEP | |
2457 | parameters. set_gdbarch_*() functions are called to complete the | |
2458 | initialization of the object. */ | |
2459 | ||
104c1213 | 2460 | extern struct gdbarch *gdbarch_alloc (const struct gdbarch_info *info, struct gdbarch_tdep *tdep); |
0f71a2f6 JM |
2461 | |
2462 | ||
4b9b3959 AC |
2463 | /* Helper function. Free a partially-constructed ``struct gdbarch''. |
2464 | It is assumed that the caller freeds the ``struct | |
2465 | gdbarch_tdep''. */ | |
2466 | ||
058f20d5 JB |
2467 | extern void gdbarch_free (struct gdbarch *); |
2468 | ||
2469 | ||
aebd7893 AC |
2470 | /* Helper function. Allocate memory from the ``struct gdbarch'' |
2471 | obstack. The memory is freed when the corresponding architecture | |
2472 | is also freed. */ | |
2473 | ||
2474 | extern void *gdbarch_obstack_zalloc (struct gdbarch *gdbarch, long size); | |
2475 | #define GDBARCH_OBSTACK_CALLOC(GDBARCH, NR, TYPE) ((TYPE *) gdbarch_obstack_zalloc ((GDBARCH), (NR) * sizeof (TYPE))) | |
2476 | #define GDBARCH_OBSTACK_ZALLOC(GDBARCH, TYPE) ((TYPE *) gdbarch_obstack_zalloc ((GDBARCH), sizeof (TYPE))) | |
2477 | ||
2478 | ||
b732d07d | 2479 | /* Helper function. Force an update of the current architecture. |
0f71a2f6 | 2480 | |
b732d07d AC |
2481 | The actual architecture selected is determined by INFO, ``(gdb) set |
2482 | architecture'' et.al., the existing architecture and BFD's default | |
2483 | architecture. INFO should be initialized to zero and then selected | |
2484 | fields should be updated. | |
0f71a2f6 | 2485 | |
16f33e29 AC |
2486 | Returns non-zero if the update succeeds */ |
2487 | ||
2488 | extern int gdbarch_update_p (struct gdbarch_info info); | |
0f71a2f6 JM |
2489 | |
2490 | ||
ebdba546 AC |
2491 | /* Helper function. Find an architecture matching info. |
2492 | ||
2493 | INFO should be initialized using gdbarch_info_init, relevant fields | |
2494 | set, and then finished using gdbarch_info_fill. | |
2495 | ||
2496 | Returns the corresponding architecture, or NULL if no matching | |
2497 | architecture was found. "current_gdbarch" is not updated. */ | |
2498 | ||
2499 | extern struct gdbarch *gdbarch_find_by_info (struct gdbarch_info info); | |
2500 | ||
2501 | ||
2502 | /* Helper function. Set the global "current_gdbarch" to "gdbarch". | |
2503 | ||
2504 | FIXME: kettenis/20031124: Of the functions that follow, only | |
2505 | gdbarch_from_bfd is supposed to survive. The others will | |
2506 | dissappear since in the future GDB will (hopefully) be truly | |
2507 | multi-arch. However, for now we're still stuck with the concept of | |
2508 | a single active architecture. */ | |
2509 | ||
2510 | extern void deprecated_current_gdbarch_select_hack (struct gdbarch *gdbarch); | |
2511 | ||
0f71a2f6 JM |
2512 | |
2513 | /* Register per-architecture data-pointer. | |
2514 | ||
2515 | Reserve space for a per-architecture data-pointer. An identifier | |
2516 | for the reserved data-pointer is returned. That identifer should | |
95160752 | 2517 | be saved in a local static variable. |
0f71a2f6 | 2518 | |
fcc1c85c AC |
2519 | Memory for the per-architecture data shall be allocated using |
2520 | gdbarch_obstack_zalloc. That memory will be deleted when the | |
2521 | corresponding architecture object is deleted. | |
0f71a2f6 | 2522 | |
95160752 AC |
2523 | When a previously created architecture is re-selected, the |
2524 | per-architecture data-pointer for that previous architecture is | |
76860b5f | 2525 | restored. INIT() is not re-called. |
0f71a2f6 JM |
2526 | |
2527 | Multiple registrarants for any architecture are allowed (and | |
2528 | strongly encouraged). */ | |
2529 | ||
95160752 | 2530 | struct gdbarch_data; |
0f71a2f6 | 2531 | |
030f20e1 AC |
2532 | typedef void *(gdbarch_data_pre_init_ftype) (struct obstack *obstack); |
2533 | extern struct gdbarch_data *gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype *init); | |
2534 | typedef void *(gdbarch_data_post_init_ftype) (struct gdbarch *gdbarch); | |
2535 | extern struct gdbarch_data *gdbarch_data_register_post_init (gdbarch_data_post_init_ftype *init); | |
2536 | extern void deprecated_set_gdbarch_data (struct gdbarch *gdbarch, | |
2537 | struct gdbarch_data *data, | |
2538 | void *pointer); | |
0f71a2f6 | 2539 | |
451fbdda | 2540 | extern void *gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *); |
0f71a2f6 JM |
2541 | |
2542 | ||
a8cf2722 | 2543 | |
0f71a2f6 JM |
2544 | /* Register per-architecture memory region. |
2545 | ||
2546 | Provide a memory-region swap mechanism. Per-architecture memory | |
2547 | region are created. These memory regions are swapped whenever the | |
2548 | architecture is changed. For a new architecture, the memory region | |
2549 | is initialized with zero (0) and the INIT function is called. | |
2550 | ||
2551 | Memory regions are swapped / initialized in the order that they are | |
2552 | registered. NULL DATA and/or INIT values can be specified. | |
2553 | ||
030f20e1 | 2554 | New code should use gdbarch_data_register_*(). */ |
0f71a2f6 | 2555 | |
104c1213 | 2556 | typedef void (gdbarch_swap_ftype) (void); |
046a4708 AC |
2557 | extern void deprecated_register_gdbarch_swap (void *data, unsigned long size, gdbarch_swap_ftype *init); |
2558 | #define DEPRECATED_REGISTER_GDBARCH_SWAP(VAR) deprecated_register_gdbarch_swap (&(VAR), sizeof ((VAR)), NULL) | |
0f71a2f6 JM |
2559 | |
2560 | ||
2561 | ||
99e7bb18 | 2562 | /* Set the dynamic target-system-dependent parameters (architecture, |
c906108c SS |
2563 | byte-order, ...) using information found in the BFD */ |
2564 | ||
104c1213 | 2565 | extern void set_gdbarch_from_file (bfd *); |
c906108c SS |
2566 | |
2567 | ||
e514a9d6 JM |
2568 | /* Initialize the current architecture to the "first" one we find on |
2569 | our list. */ | |
2570 | ||
2571 | extern void initialize_current_architecture (void); | |
2572 | ||
c906108c | 2573 | /* gdbarch trace variable */ |
adf40b2e | 2574 | extern int gdbarch_debug; |
c906108c | 2575 | |
4b9b3959 | 2576 | extern void gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file); |
0f71a2f6 | 2577 | |
c906108c | 2578 | #endif |