Commit | Line | Data |
---|---|---|
59233f88 AC |
1 | /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */ |
2 | ||
adf40b2e | 3 | /* Dynamic architecture support for GDB, the GNU debugger. |
1e698235 | 4 | Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. |
c906108c | 5 | |
c5aa993b | 6 | This file is part of GDB. |
c906108c | 7 | |
c5aa993b JM |
8 | This program is free software; you can redistribute it and/or modify |
9 | it under the terms of the GNU General Public License as published by | |
10 | the Free Software Foundation; either version 2 of the License, or | |
11 | (at your option) any later version. | |
c906108c | 12 | |
c5aa993b JM |
13 | This program is distributed in the hope that it will be useful, |
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | GNU General Public License for more details. | |
c906108c | 17 | |
c5aa993b JM |
18 | You should have received a copy of the GNU General Public License |
19 | along with this program; if not, write to the Free Software | |
20 | Foundation, Inc., 59 Temple Place - Suite 330, | |
21 | Boston, MA 02111-1307, USA. */ | |
c906108c | 22 | |
104c1213 JM |
23 | /* This file was created with the aid of ``gdbarch.sh''. |
24 | ||
52204a0b | 25 | The Bourne shell script ``gdbarch.sh'' creates the files |
104c1213 JM |
26 | ``new-gdbarch.c'' and ``new-gdbarch.h and then compares them |
27 | against the existing ``gdbarch.[hc]''. Any differences found | |
28 | being reported. | |
29 | ||
30 | If editing this file, please also run gdbarch.sh and merge any | |
52204a0b | 31 | changes into that script. Conversely, when making sweeping changes |
104c1213 JM |
32 | to this file, modifying gdbarch.sh and using its output may prove |
33 | easier. */ | |
adf40b2e | 34 | |
c906108c SS |
35 | #ifndef GDBARCH_H |
36 | #define GDBARCH_H | |
37 | ||
2bf0cb65 | 38 | #include "dis-asm.h" /* Get defs for disassemble_info, which unfortunately is a typedef. */ |
fd0407d6 | 39 | #if !GDB_MULTI_ARCH |
67a2b77e | 40 | /* Pull in function declarations refered to, indirectly, via macros. */ |
67a2b77e | 41 | #include "inferior.h" /* For unsigned_address_to_pointer(). */ |
e9a2674e | 42 | #include "symfile.h" /* For entry_point_address(). */ |
fd0407d6 | 43 | #endif |
2bf0cb65 | 44 | |
da3331ec AC |
45 | struct floatformat; |
46 | struct ui_file; | |
cce74817 JM |
47 | struct frame_info; |
48 | struct value; | |
b6af0555 | 49 | struct objfile; |
a2cf933a | 50 | struct minimal_symbol; |
049ee0e4 | 51 | struct regcache; |
b59ff9d5 | 52 | struct reggroup; |
0f71a2f6 | 53 | |
0f71a2f6 JM |
54 | extern struct gdbarch *current_gdbarch; |
55 | ||
56 | ||
0f71a2f6 JM |
57 | /* If any of the following are defined, the target wasn't correctly |
58 | converted. */ | |
59 | ||
83905903 AC |
60 | #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PURE) && defined (GDB_TM_FILE) |
61 | #error "GDB_TM_FILE: Pure multi-arch targets do not have a tm.h file." | |
62 | #endif | |
63 | ||
0f71a2f6 JM |
64 | |
65 | /* The following are pre-initialized by GDBARCH. */ | |
66 | ||
104c1213 | 67 | extern const struct bfd_arch_info * gdbarch_bfd_arch_info (struct gdbarch *gdbarch); |
0f71a2f6 | 68 | /* set_gdbarch_bfd_arch_info() - not applicable - pre-initialized. */ |
83905903 AC |
69 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_ARCHITECTURE) |
70 | #error "Non multi-arch definition of TARGET_ARCHITECTURE" | |
71 | #endif | |
c25083af | 72 | #if !defined (TARGET_ARCHITECTURE) |
0f71a2f6 JM |
73 | #define TARGET_ARCHITECTURE (gdbarch_bfd_arch_info (current_gdbarch)) |
74 | #endif | |
0f71a2f6 | 75 | |
104c1213 | 76 | extern int gdbarch_byte_order (struct gdbarch *gdbarch); |
0f71a2f6 | 77 | /* set_gdbarch_byte_order() - not applicable - pre-initialized. */ |
83905903 AC |
78 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_BYTE_ORDER) |
79 | #error "Non multi-arch definition of TARGET_BYTE_ORDER" | |
80 | #endif | |
c25083af | 81 | #if !defined (TARGET_BYTE_ORDER) |
0f71a2f6 JM |
82 | #define TARGET_BYTE_ORDER (gdbarch_byte_order (current_gdbarch)) |
83 | #endif | |
0f71a2f6 | 84 | |
4be87837 DJ |
85 | extern enum gdb_osabi gdbarch_osabi (struct gdbarch *gdbarch); |
86 | /* set_gdbarch_osabi() - not applicable - pre-initialized. */ | |
87 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_OSABI) | |
88 | #error "Non multi-arch definition of TARGET_OSABI" | |
89 | #endif | |
c25083af | 90 | #if !defined (TARGET_OSABI) |
4be87837 DJ |
91 | #define TARGET_OSABI (gdbarch_osabi (current_gdbarch)) |
92 | #endif | |
4be87837 | 93 | |
0f71a2f6 | 94 | |
99e7bb18 | 95 | /* The following are initialized by the target dependent code. */ |
0f71a2f6 | 96 | |
66b43ecb AC |
97 | /* Number of bits in a char or unsigned char for the target machine. |
98 | Just like CHAR_BIT in <limits.h> but describes the target machine. | |
e669114a | 99 | v:2:TARGET_CHAR_BIT:int:char_bit::::8 * sizeof (char):8::0: |
66b43ecb AC |
100 | |
101 | Number of bits in a short or unsigned short for the target machine. */ | |
c4093a6a | 102 | |
66b43ecb AC |
103 | /* Default (value) for non- multi-arch platforms. */ |
104 | #if (!GDB_MULTI_ARCH) && !defined (TARGET_SHORT_BIT) | |
105 | #define TARGET_SHORT_BIT (2*TARGET_CHAR_BIT) | |
0f71a2f6 JM |
106 | #endif |
107 | ||
104c1213 JM |
108 | extern int gdbarch_short_bit (struct gdbarch *gdbarch); |
109 | extern void set_gdbarch_short_bit (struct gdbarch *gdbarch, int short_bit); | |
83905903 AC |
110 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_SHORT_BIT) |
111 | #error "Non multi-arch definition of TARGET_SHORT_BIT" | |
112 | #endif | |
c25083af | 113 | #if !defined (TARGET_SHORT_BIT) |
0f71a2f6 JM |
114 | #define TARGET_SHORT_BIT (gdbarch_short_bit (current_gdbarch)) |
115 | #endif | |
0f71a2f6 | 116 | |
66b43ecb AC |
117 | /* Number of bits in an int or unsigned int for the target machine. */ |
118 | ||
119 | /* Default (value) for non- multi-arch platforms. */ | |
120 | #if (!GDB_MULTI_ARCH) && !defined (TARGET_INT_BIT) | |
121 | #define TARGET_INT_BIT (4*TARGET_CHAR_BIT) | |
122 | #endif | |
123 | ||
104c1213 JM |
124 | extern int gdbarch_int_bit (struct gdbarch *gdbarch); |
125 | extern void set_gdbarch_int_bit (struct gdbarch *gdbarch, int int_bit); | |
83905903 AC |
126 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_INT_BIT) |
127 | #error "Non multi-arch definition of TARGET_INT_BIT" | |
128 | #endif | |
c25083af | 129 | #if !defined (TARGET_INT_BIT) |
0f71a2f6 JM |
130 | #define TARGET_INT_BIT (gdbarch_int_bit (current_gdbarch)) |
131 | #endif | |
0f71a2f6 | 132 | |
66b43ecb AC |
133 | /* Number of bits in a long or unsigned long for the target machine. */ |
134 | ||
135 | /* Default (value) for non- multi-arch platforms. */ | |
136 | #if (!GDB_MULTI_ARCH) && !defined (TARGET_LONG_BIT) | |
137 | #define TARGET_LONG_BIT (4*TARGET_CHAR_BIT) | |
138 | #endif | |
139 | ||
104c1213 JM |
140 | extern int gdbarch_long_bit (struct gdbarch *gdbarch); |
141 | extern void set_gdbarch_long_bit (struct gdbarch *gdbarch, int long_bit); | |
83905903 AC |
142 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_BIT) |
143 | #error "Non multi-arch definition of TARGET_LONG_BIT" | |
144 | #endif | |
c25083af | 145 | #if !defined (TARGET_LONG_BIT) |
0f71a2f6 JM |
146 | #define TARGET_LONG_BIT (gdbarch_long_bit (current_gdbarch)) |
147 | #endif | |
0f71a2f6 | 148 | |
66b43ecb AC |
149 | /* Number of bits in a long long or unsigned long long for the target |
150 | machine. */ | |
151 | ||
152 | /* Default (value) for non- multi-arch platforms. */ | |
153 | #if (!GDB_MULTI_ARCH) && !defined (TARGET_LONG_LONG_BIT) | |
154 | #define TARGET_LONG_LONG_BIT (2*TARGET_LONG_BIT) | |
155 | #endif | |
156 | ||
104c1213 JM |
157 | extern int gdbarch_long_long_bit (struct gdbarch *gdbarch); |
158 | extern void set_gdbarch_long_long_bit (struct gdbarch *gdbarch, int long_long_bit); | |
83905903 AC |
159 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_LONG_BIT) |
160 | #error "Non multi-arch definition of TARGET_LONG_LONG_BIT" | |
161 | #endif | |
c25083af | 162 | #if !defined (TARGET_LONG_LONG_BIT) |
0f71a2f6 JM |
163 | #define TARGET_LONG_LONG_BIT (gdbarch_long_long_bit (current_gdbarch)) |
164 | #endif | |
0f71a2f6 | 165 | |
66b43ecb AC |
166 | /* Number of bits in a float for the target machine. */ |
167 | ||
168 | /* Default (value) for non- multi-arch platforms. */ | |
169 | #if (!GDB_MULTI_ARCH) && !defined (TARGET_FLOAT_BIT) | |
170 | #define TARGET_FLOAT_BIT (4*TARGET_CHAR_BIT) | |
171 | #endif | |
172 | ||
104c1213 JM |
173 | extern int gdbarch_float_bit (struct gdbarch *gdbarch); |
174 | extern void set_gdbarch_float_bit (struct gdbarch *gdbarch, int float_bit); | |
83905903 AC |
175 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_FLOAT_BIT) |
176 | #error "Non multi-arch definition of TARGET_FLOAT_BIT" | |
177 | #endif | |
c25083af | 178 | #if !defined (TARGET_FLOAT_BIT) |
0f71a2f6 JM |
179 | #define TARGET_FLOAT_BIT (gdbarch_float_bit (current_gdbarch)) |
180 | #endif | |
0f71a2f6 | 181 | |
66b43ecb AC |
182 | /* Number of bits in a double for the target machine. */ |
183 | ||
184 | /* Default (value) for non- multi-arch platforms. */ | |
185 | #if (!GDB_MULTI_ARCH) && !defined (TARGET_DOUBLE_BIT) | |
186 | #define TARGET_DOUBLE_BIT (8*TARGET_CHAR_BIT) | |
187 | #endif | |
188 | ||
104c1213 JM |
189 | extern int gdbarch_double_bit (struct gdbarch *gdbarch); |
190 | extern void set_gdbarch_double_bit (struct gdbarch *gdbarch, int double_bit); | |
83905903 AC |
191 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_DOUBLE_BIT) |
192 | #error "Non multi-arch definition of TARGET_DOUBLE_BIT" | |
193 | #endif | |
c25083af | 194 | #if !defined (TARGET_DOUBLE_BIT) |
0f71a2f6 JM |
195 | #define TARGET_DOUBLE_BIT (gdbarch_double_bit (current_gdbarch)) |
196 | #endif | |
0f71a2f6 | 197 | |
66b43ecb AC |
198 | /* Number of bits in a long double for the target machine. */ |
199 | ||
200 | /* Default (value) for non- multi-arch platforms. */ | |
201 | #if (!GDB_MULTI_ARCH) && !defined (TARGET_LONG_DOUBLE_BIT) | |
17ef5d92 | 202 | #define TARGET_LONG_DOUBLE_BIT (8*TARGET_CHAR_BIT) |
66b43ecb AC |
203 | #endif |
204 | ||
104c1213 JM |
205 | extern int gdbarch_long_double_bit (struct gdbarch *gdbarch); |
206 | extern void set_gdbarch_long_double_bit (struct gdbarch *gdbarch, int long_double_bit); | |
83905903 AC |
207 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_DOUBLE_BIT) |
208 | #error "Non multi-arch definition of TARGET_LONG_DOUBLE_BIT" | |
209 | #endif | |
c25083af | 210 | #if !defined (TARGET_LONG_DOUBLE_BIT) |
0f71a2f6 JM |
211 | #define TARGET_LONG_DOUBLE_BIT (gdbarch_long_double_bit (current_gdbarch)) |
212 | #endif | |
0f71a2f6 | 213 | |
52204a0b DT |
214 | /* For most targets, a pointer on the target and its representation as an |
215 | address in GDB have the same size and "look the same". For such a | |
216 | target, you need only set TARGET_PTR_BIT / ptr_bit and TARGET_ADDR_BIT | |
217 | / addr_bit will be set from it. | |
218 | ||
219 | If TARGET_PTR_BIT and TARGET_ADDR_BIT are different, you'll probably | |
220 | also need to set POINTER_TO_ADDRESS and ADDRESS_TO_POINTER as well. | |
221 | ||
222 | ptr_bit is the size of a pointer on the target */ | |
66b43ecb AC |
223 | |
224 | /* Default (value) for non- multi-arch platforms. */ | |
225 | #if (!GDB_MULTI_ARCH) && !defined (TARGET_PTR_BIT) | |
226 | #define TARGET_PTR_BIT (TARGET_INT_BIT) | |
227 | #endif | |
228 | ||
229 | extern int gdbarch_ptr_bit (struct gdbarch *gdbarch); | |
230 | extern void set_gdbarch_ptr_bit (struct gdbarch *gdbarch, int ptr_bit); | |
83905903 AC |
231 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_PTR_BIT) |
232 | #error "Non multi-arch definition of TARGET_PTR_BIT" | |
233 | #endif | |
c25083af | 234 | #if !defined (TARGET_PTR_BIT) |
66b43ecb AC |
235 | #define TARGET_PTR_BIT (gdbarch_ptr_bit (current_gdbarch)) |
236 | #endif | |
66b43ecb | 237 | |
52204a0b DT |
238 | /* addr_bit is the size of a target address as represented in gdb */ |
239 | ||
240 | /* Default (value) for non- multi-arch platforms. */ | |
241 | #if (!GDB_MULTI_ARCH) && !defined (TARGET_ADDR_BIT) | |
242 | #define TARGET_ADDR_BIT (TARGET_PTR_BIT) | |
243 | #endif | |
244 | ||
245 | extern int gdbarch_addr_bit (struct gdbarch *gdbarch); | |
246 | extern void set_gdbarch_addr_bit (struct gdbarch *gdbarch, int addr_bit); | |
83905903 AC |
247 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_ADDR_BIT) |
248 | #error "Non multi-arch definition of TARGET_ADDR_BIT" | |
249 | #endif | |
c25083af | 250 | #if !defined (TARGET_ADDR_BIT) |
52204a0b DT |
251 | #define TARGET_ADDR_BIT (gdbarch_addr_bit (current_gdbarch)) |
252 | #endif | |
52204a0b | 253 | |
66b43ecb AC |
254 | /* Number of bits in a BFD_VMA for the target object file format. */ |
255 | ||
256 | /* Default (value) for non- multi-arch platforms. */ | |
257 | #if (!GDB_MULTI_ARCH) && !defined (TARGET_BFD_VMA_BIT) | |
258 | #define TARGET_BFD_VMA_BIT (TARGET_ARCHITECTURE->bits_per_address) | |
259 | #endif | |
260 | ||
261 | extern int gdbarch_bfd_vma_bit (struct gdbarch *gdbarch); | |
262 | extern void set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch, int bfd_vma_bit); | |
83905903 AC |
263 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_BFD_VMA_BIT) |
264 | #error "Non multi-arch definition of TARGET_BFD_VMA_BIT" | |
265 | #endif | |
c25083af | 266 | #if !defined (TARGET_BFD_VMA_BIT) |
66b43ecb AC |
267 | #define TARGET_BFD_VMA_BIT (gdbarch_bfd_vma_bit (current_gdbarch)) |
268 | #endif | |
66b43ecb | 269 | |
4e409299 JB |
270 | /* One if `char' acts like `signed char', zero if `unsigned char'. */ |
271 | ||
272 | /* Default (value) for non- multi-arch platforms. */ | |
273 | #if (!GDB_MULTI_ARCH) && !defined (TARGET_CHAR_SIGNED) | |
274 | #define TARGET_CHAR_SIGNED (1) | |
275 | #endif | |
276 | ||
277 | extern int gdbarch_char_signed (struct gdbarch *gdbarch); | |
278 | extern void set_gdbarch_char_signed (struct gdbarch *gdbarch, int char_signed); | |
279 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_CHAR_SIGNED) | |
280 | #error "Non multi-arch definition of TARGET_CHAR_SIGNED" | |
281 | #endif | |
c25083af | 282 | #if !defined (TARGET_CHAR_SIGNED) |
4e409299 JB |
283 | #define TARGET_CHAR_SIGNED (gdbarch_char_signed (current_gdbarch)) |
284 | #endif | |
4e409299 | 285 | |
cde9ea48 AC |
286 | #if defined (TARGET_READ_PC) |
287 | /* Legacy for systems yet to multi-arch TARGET_READ_PC */ | |
288 | #if !defined (TARGET_READ_PC_P) | |
289 | #define TARGET_READ_PC_P() (1) | |
290 | #endif | |
291 | #endif | |
292 | ||
293 | /* Default predicate for non- multi-arch targets. */ | |
294 | #if (!GDB_MULTI_ARCH) && !defined (TARGET_READ_PC_P) | |
295 | #define TARGET_READ_PC_P() (0) | |
296 | #endif | |
297 | ||
298 | extern int gdbarch_read_pc_p (struct gdbarch *gdbarch); | |
299 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_READ_PC_P) | |
300 | #error "Non multi-arch definition of TARGET_READ_PC" | |
301 | #endif | |
302 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_READ_PC_P) | |
303 | #define TARGET_READ_PC_P() (gdbarch_read_pc_p (current_gdbarch)) | |
304 | #endif | |
305 | ||
be8dfb87 AC |
306 | /* Default (function) for non- multi-arch platforms. */ |
307 | #if (!GDB_MULTI_ARCH) && !defined (TARGET_READ_PC) | |
cde9ea48 | 308 | #define TARGET_READ_PC(ptid) (internal_error (__FILE__, __LINE__, "TARGET_READ_PC"), 0) |
be8dfb87 AC |
309 | #endif |
310 | ||
39f77062 KB |
311 | typedef CORE_ADDR (gdbarch_read_pc_ftype) (ptid_t ptid); |
312 | extern CORE_ADDR gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid); | |
104c1213 | 313 | extern void set_gdbarch_read_pc (struct gdbarch *gdbarch, gdbarch_read_pc_ftype *read_pc); |
83905903 AC |
314 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_READ_PC) |
315 | #error "Non multi-arch definition of TARGET_READ_PC" | |
316 | #endif | |
c25083af | 317 | #if !defined (TARGET_READ_PC) |
39f77062 | 318 | #define TARGET_READ_PC(ptid) (gdbarch_read_pc (current_gdbarch, ptid)) |
0f71a2f6 | 319 | #endif |
0f71a2f6 | 320 | |
be8dfb87 AC |
321 | /* Default (function) for non- multi-arch platforms. */ |
322 | #if (!GDB_MULTI_ARCH) && !defined (TARGET_WRITE_PC) | |
39f77062 | 323 | #define TARGET_WRITE_PC(val, ptid) (generic_target_write_pc (val, ptid)) |
be8dfb87 AC |
324 | #endif |
325 | ||
39f77062 KB |
326 | typedef void (gdbarch_write_pc_ftype) (CORE_ADDR val, ptid_t ptid); |
327 | extern void gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid); | |
104c1213 | 328 | extern void set_gdbarch_write_pc (struct gdbarch *gdbarch, gdbarch_write_pc_ftype *write_pc); |
83905903 AC |
329 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_WRITE_PC) |
330 | #error "Non multi-arch definition of TARGET_WRITE_PC" | |
331 | #endif | |
c25083af | 332 | #if !defined (TARGET_WRITE_PC) |
39f77062 | 333 | #define TARGET_WRITE_PC(val, ptid) (gdbarch_write_pc (current_gdbarch, val, ptid)) |
0f71a2f6 | 334 | #endif |
0f71a2f6 | 335 | |
0ba6dca9 AC |
336 | /* This is simply not needed. See value_of_builtin_frame_fp_reg and |
337 | call_function_by_hand. */ | |
338 | ||
339 | #if defined (DEPRECATED_TARGET_READ_FP) | |
340 | /* Legacy for systems yet to multi-arch DEPRECATED_TARGET_READ_FP */ | |
341 | #if !defined (DEPRECATED_TARGET_READ_FP_P) | |
342 | #define DEPRECATED_TARGET_READ_FP_P() (1) | |
343 | #endif | |
344 | #endif | |
345 | ||
346 | /* Default predicate for non- multi-arch targets. */ | |
347 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_TARGET_READ_FP_P) | |
348 | #define DEPRECATED_TARGET_READ_FP_P() (0) | |
349 | #endif | |
350 | ||
351 | extern int gdbarch_deprecated_target_read_fp_p (struct gdbarch *gdbarch); | |
352 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_TARGET_READ_FP_P) | |
353 | #error "Non multi-arch definition of DEPRECATED_TARGET_READ_FP" | |
354 | #endif | |
355 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_TARGET_READ_FP_P) | |
356 | #define DEPRECATED_TARGET_READ_FP_P() (gdbarch_deprecated_target_read_fp_p (current_gdbarch)) | |
357 | #endif | |
358 | ||
be8dfb87 | 359 | /* Default (function) for non- multi-arch platforms. */ |
0ba6dca9 AC |
360 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_TARGET_READ_FP) |
361 | #define DEPRECATED_TARGET_READ_FP() (internal_error (__FILE__, __LINE__, "DEPRECATED_TARGET_READ_FP"), 0) | |
be8dfb87 AC |
362 | #endif |
363 | ||
0ba6dca9 AC |
364 | typedef CORE_ADDR (gdbarch_deprecated_target_read_fp_ftype) (void); |
365 | extern CORE_ADDR gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch); | |
366 | extern void set_gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch, gdbarch_deprecated_target_read_fp_ftype *deprecated_target_read_fp); | |
367 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_TARGET_READ_FP) | |
368 | #error "Non multi-arch definition of DEPRECATED_TARGET_READ_FP" | |
83905903 | 369 | #endif |
c25083af | 370 | #if !defined (DEPRECATED_TARGET_READ_FP) |
0ba6dca9 | 371 | #define DEPRECATED_TARGET_READ_FP() (gdbarch_deprecated_target_read_fp (current_gdbarch)) |
0f71a2f6 | 372 | #endif |
0f71a2f6 | 373 | |
a9e5fdc2 AC |
374 | /* UNWIND_SP is a direct replacement for TARGET_READ_SP. */ |
375 | ||
bd1ce8ba AC |
376 | #if defined (TARGET_READ_SP) |
377 | /* Legacy for systems yet to multi-arch TARGET_READ_SP */ | |
378 | #if !defined (TARGET_READ_SP_P) | |
379 | #define TARGET_READ_SP_P() (1) | |
380 | #endif | |
381 | #endif | |
382 | ||
383 | /* Default predicate for non- multi-arch targets. */ | |
384 | #if (!GDB_MULTI_ARCH) && !defined (TARGET_READ_SP_P) | |
385 | #define TARGET_READ_SP_P() (0) | |
386 | #endif | |
387 | ||
388 | extern int gdbarch_read_sp_p (struct gdbarch *gdbarch); | |
389 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_READ_SP_P) | |
390 | #error "Non multi-arch definition of TARGET_READ_SP" | |
391 | #endif | |
392 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_READ_SP_P) | |
393 | #define TARGET_READ_SP_P() (gdbarch_read_sp_p (current_gdbarch)) | |
394 | #endif | |
395 | ||
be8dfb87 AC |
396 | /* Default (function) for non- multi-arch platforms. */ |
397 | #if (!GDB_MULTI_ARCH) && !defined (TARGET_READ_SP) | |
bd1ce8ba | 398 | #define TARGET_READ_SP() (internal_error (__FILE__, __LINE__, "TARGET_READ_SP"), 0) |
be8dfb87 AC |
399 | #endif |
400 | ||
104c1213 JM |
401 | typedef CORE_ADDR (gdbarch_read_sp_ftype) (void); |
402 | extern CORE_ADDR gdbarch_read_sp (struct gdbarch *gdbarch); | |
403 | extern void set_gdbarch_read_sp (struct gdbarch *gdbarch, gdbarch_read_sp_ftype *read_sp); | |
83905903 AC |
404 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_READ_SP) |
405 | #error "Non multi-arch definition of TARGET_READ_SP" | |
406 | #endif | |
c25083af | 407 | #if !defined (TARGET_READ_SP) |
0f71a2f6 JM |
408 | #define TARGET_READ_SP() (gdbarch_read_sp (current_gdbarch)) |
409 | #endif | |
0f71a2f6 | 410 | |
6c0e89ed AC |
411 | /* The dummy call frame SP should be set by push_dummy_call. */ |
412 | ||
413 | #if defined (DEPRECATED_DUMMY_WRITE_SP) | |
414 | /* Legacy for systems yet to multi-arch DEPRECATED_DUMMY_WRITE_SP */ | |
415 | #if !defined (DEPRECATED_DUMMY_WRITE_SP_P) | |
416 | #define DEPRECATED_DUMMY_WRITE_SP_P() (1) | |
417 | #endif | |
418 | #endif | |
419 | ||
420 | /* Default predicate for non- multi-arch targets. */ | |
421 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_DUMMY_WRITE_SP_P) | |
422 | #define DEPRECATED_DUMMY_WRITE_SP_P() (0) | |
423 | #endif | |
424 | ||
425 | extern int gdbarch_deprecated_dummy_write_sp_p (struct gdbarch *gdbarch); | |
426 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_DUMMY_WRITE_SP_P) | |
427 | #error "Non multi-arch definition of DEPRECATED_DUMMY_WRITE_SP" | |
428 | #endif | |
429 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_DUMMY_WRITE_SP_P) | |
430 | #define DEPRECATED_DUMMY_WRITE_SP_P() (gdbarch_deprecated_dummy_write_sp_p (current_gdbarch)) | |
431 | #endif | |
432 | ||
be8dfb87 | 433 | /* Default (function) for non- multi-arch platforms. */ |
6c0e89ed AC |
434 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_DUMMY_WRITE_SP) |
435 | #define DEPRECATED_DUMMY_WRITE_SP(val) (internal_error (__FILE__, __LINE__, "DEPRECATED_DUMMY_WRITE_SP"), 0) | |
be8dfb87 AC |
436 | #endif |
437 | ||
6c0e89ed AC |
438 | typedef void (gdbarch_deprecated_dummy_write_sp_ftype) (CORE_ADDR val); |
439 | extern void gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, CORE_ADDR val); | |
440 | extern void set_gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, gdbarch_deprecated_dummy_write_sp_ftype *deprecated_dummy_write_sp); | |
441 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_DUMMY_WRITE_SP) | |
442 | #error "Non multi-arch definition of DEPRECATED_DUMMY_WRITE_SP" | |
83905903 | 443 | #endif |
c25083af | 444 | #if !defined (DEPRECATED_DUMMY_WRITE_SP) |
6c0e89ed | 445 | #define DEPRECATED_DUMMY_WRITE_SP(val) (gdbarch_deprecated_dummy_write_sp (current_gdbarch, val)) |
0f71a2f6 | 446 | #endif |
0f71a2f6 | 447 | |
39d4ef09 AC |
448 | /* Function for getting target's idea of a frame pointer. FIXME: GDB's |
449 | whole scheme for dealing with "frames" and "frame pointers" needs a | |
450 | serious shakedown. */ | |
451 | ||
452 | /* Default (function) for non- multi-arch platforms. */ | |
453 | #if (!GDB_MULTI_ARCH) && !defined (TARGET_VIRTUAL_FRAME_POINTER) | |
454 | #define TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset) (legacy_virtual_frame_pointer (pc, frame_regnum, frame_offset)) | |
455 | #endif | |
456 | ||
457 | typedef void (gdbarch_virtual_frame_pointer_ftype) (CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset); | |
458 | extern void gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset); | |
459 | extern void set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer); | |
460 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_VIRTUAL_FRAME_POINTER) | |
461 | #error "Non multi-arch definition of TARGET_VIRTUAL_FRAME_POINTER" | |
462 | #endif | |
c25083af | 463 | #if !defined (TARGET_VIRTUAL_FRAME_POINTER) |
39d4ef09 AC |
464 | #define TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset) (gdbarch_virtual_frame_pointer (current_gdbarch, pc, frame_regnum, frame_offset)) |
465 | #endif | |
39d4ef09 | 466 | |
d8124050 | 467 | extern int gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch); |
61a0eb5b | 468 | |
d8124050 AC |
469 | typedef void (gdbarch_pseudo_register_read_ftype) (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf); |
470 | extern void gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf); | |
471 | extern void set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch, gdbarch_pseudo_register_read_ftype *pseudo_register_read); | |
61a0eb5b | 472 | |
d8124050 | 473 | extern int gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch); |
61a0eb5b | 474 | |
d8124050 AC |
475 | typedef void (gdbarch_pseudo_register_write_ftype) (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf); |
476 | extern void gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf); | |
477 | extern void set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch, gdbarch_pseudo_register_write_ftype *pseudo_register_write); | |
61a0eb5b | 478 | |
104c1213 JM |
479 | extern int gdbarch_num_regs (struct gdbarch *gdbarch); |
480 | extern void set_gdbarch_num_regs (struct gdbarch *gdbarch, int num_regs); | |
83905903 AC |
481 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NUM_REGS) |
482 | #error "Non multi-arch definition of NUM_REGS" | |
483 | #endif | |
c25083af | 484 | #if !defined (NUM_REGS) |
0f71a2f6 JM |
485 | #define NUM_REGS (gdbarch_num_regs (current_gdbarch)) |
486 | #endif | |
0f71a2f6 | 487 | |
34620563 AC |
488 | /* This macro gives the number of pseudo-registers that live in the |
489 | register namespace but do not get fetched or stored on the target. | |
490 | These pseudo-registers may be aliases for other registers, | |
491 | combinations of other registers, or they may be computed by GDB. */ | |
492 | ||
0aba1244 | 493 | /* Default (value) for non- multi-arch platforms. */ |
6166d547 | 494 | #if (!GDB_MULTI_ARCH) && !defined (NUM_PSEUDO_REGS) |
0aba1244 EZ |
495 | #define NUM_PSEUDO_REGS (0) |
496 | #endif | |
497 | ||
498 | extern int gdbarch_num_pseudo_regs (struct gdbarch *gdbarch); | |
499 | extern void set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch, int num_pseudo_regs); | |
83905903 AC |
500 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NUM_PSEUDO_REGS) |
501 | #error "Non multi-arch definition of NUM_PSEUDO_REGS" | |
502 | #endif | |
c25083af | 503 | #if !defined (NUM_PSEUDO_REGS) |
0aba1244 EZ |
504 | #define NUM_PSEUDO_REGS (gdbarch_num_pseudo_regs (current_gdbarch)) |
505 | #endif | |
0aba1244 | 506 | |
c2169756 AC |
507 | /* GDB's standard (or well known) register numbers. These can map onto |
508 | a real register or a pseudo (computed) register or not be defined at | |
a9e5fdc2 AC |
509 | all (-1). |
510 | SP_REGNUM will hopefully be replaced by UNWIND_SP. */ | |
1200cd6e AC |
511 | |
512 | /* Default (value) for non- multi-arch platforms. */ | |
513 | #if (!GDB_MULTI_ARCH) && !defined (SP_REGNUM) | |
514 | #define SP_REGNUM (-1) | |
515 | #endif | |
c2169756 | 516 | |
104c1213 JM |
517 | extern int gdbarch_sp_regnum (struct gdbarch *gdbarch); |
518 | extern void set_gdbarch_sp_regnum (struct gdbarch *gdbarch, int sp_regnum); | |
83905903 AC |
519 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SP_REGNUM) |
520 | #error "Non multi-arch definition of SP_REGNUM" | |
521 | #endif | |
c25083af | 522 | #if !defined (SP_REGNUM) |
0f71a2f6 JM |
523 | #define SP_REGNUM (gdbarch_sp_regnum (current_gdbarch)) |
524 | #endif | |
0f71a2f6 | 525 | |
0ba6dca9 AC |
526 | /* This is simply not needed. See value_of_builtin_frame_fp_reg and |
527 | call_function_by_hand. */ | |
528 | ||
1200cd6e | 529 | /* Default (value) for non- multi-arch platforms. */ |
0ba6dca9 AC |
530 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FP_REGNUM) |
531 | #define DEPRECATED_FP_REGNUM (-1) | |
1200cd6e AC |
532 | #endif |
533 | ||
0ba6dca9 AC |
534 | extern int gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch); |
535 | extern void set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch, int deprecated_fp_regnum); | |
536 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FP_REGNUM) | |
537 | #error "Non multi-arch definition of DEPRECATED_FP_REGNUM" | |
83905903 | 538 | #endif |
c25083af | 539 | #if !defined (DEPRECATED_FP_REGNUM) |
0ba6dca9 | 540 | #define DEPRECATED_FP_REGNUM (gdbarch_deprecated_fp_regnum (current_gdbarch)) |
0f71a2f6 | 541 | #endif |
0f71a2f6 | 542 | |
1200cd6e AC |
543 | /* Default (value) for non- multi-arch platforms. */ |
544 | #if (!GDB_MULTI_ARCH) && !defined (PC_REGNUM) | |
545 | #define PC_REGNUM (-1) | |
546 | #endif | |
547 | ||
104c1213 JM |
548 | extern int gdbarch_pc_regnum (struct gdbarch *gdbarch); |
549 | extern void set_gdbarch_pc_regnum (struct gdbarch *gdbarch, int pc_regnum); | |
83905903 AC |
550 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PC_REGNUM) |
551 | #error "Non multi-arch definition of PC_REGNUM" | |
552 | #endif | |
c25083af | 553 | #if !defined (PC_REGNUM) |
0f71a2f6 JM |
554 | #define PC_REGNUM (gdbarch_pc_regnum (current_gdbarch)) |
555 | #endif | |
0f71a2f6 | 556 | |
c2169756 AC |
557 | /* Default (value) for non- multi-arch platforms. */ |
558 | #if (!GDB_MULTI_ARCH) && !defined (PS_REGNUM) | |
559 | #define PS_REGNUM (-1) | |
560 | #endif | |
561 | ||
562 | extern int gdbarch_ps_regnum (struct gdbarch *gdbarch); | |
563 | extern void set_gdbarch_ps_regnum (struct gdbarch *gdbarch, int ps_regnum); | |
564 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PS_REGNUM) | |
565 | #error "Non multi-arch definition of PS_REGNUM" | |
566 | #endif | |
c25083af | 567 | #if !defined (PS_REGNUM) |
c2169756 AC |
568 | #define PS_REGNUM (gdbarch_ps_regnum (current_gdbarch)) |
569 | #endif | |
c2169756 | 570 | |
60054393 | 571 | /* Default (value) for non- multi-arch platforms. */ |
6166d547 | 572 | #if (!GDB_MULTI_ARCH) && !defined (FP0_REGNUM) |
60054393 MS |
573 | #define FP0_REGNUM (-1) |
574 | #endif | |
575 | ||
576 | extern int gdbarch_fp0_regnum (struct gdbarch *gdbarch); | |
577 | extern void set_gdbarch_fp0_regnum (struct gdbarch *gdbarch, int fp0_regnum); | |
83905903 AC |
578 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FP0_REGNUM) |
579 | #error "Non multi-arch definition of FP0_REGNUM" | |
580 | #endif | |
c25083af | 581 | #if !defined (FP0_REGNUM) |
60054393 MS |
582 | #define FP0_REGNUM (gdbarch_fp0_regnum (current_gdbarch)) |
583 | #endif | |
60054393 | 584 | |
03863182 | 585 | /* Default (value) for non- multi-arch platforms. */ |
6166d547 | 586 | #if (!GDB_MULTI_ARCH) && !defined (NPC_REGNUM) |
03863182 AC |
587 | #define NPC_REGNUM (-1) |
588 | #endif | |
589 | ||
590 | extern int gdbarch_npc_regnum (struct gdbarch *gdbarch); | |
591 | extern void set_gdbarch_npc_regnum (struct gdbarch *gdbarch, int npc_regnum); | |
83905903 AC |
592 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NPC_REGNUM) |
593 | #error "Non multi-arch definition of NPC_REGNUM" | |
594 | #endif | |
c25083af | 595 | #if !defined (NPC_REGNUM) |
03863182 AC |
596 | #define NPC_REGNUM (gdbarch_npc_regnum (current_gdbarch)) |
597 | #endif | |
03863182 | 598 | |
88c72b7d AC |
599 | /* Convert stab register number (from `r' declaration) to a gdb REGNUM. */ |
600 | ||
601 | /* Default (function) for non- multi-arch platforms. */ | |
602 | #if (!GDB_MULTI_ARCH) && !defined (STAB_REG_TO_REGNUM) | |
603 | #define STAB_REG_TO_REGNUM(stab_regnr) (no_op_reg_to_regnum (stab_regnr)) | |
604 | #endif | |
605 | ||
606 | typedef int (gdbarch_stab_reg_to_regnum_ftype) (int stab_regnr); | |
607 | extern int gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr); | |
608 | extern void set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum); | |
83905903 AC |
609 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STAB_REG_TO_REGNUM) |
610 | #error "Non multi-arch definition of STAB_REG_TO_REGNUM" | |
611 | #endif | |
c25083af | 612 | #if !defined (STAB_REG_TO_REGNUM) |
88c72b7d AC |
613 | #define STAB_REG_TO_REGNUM(stab_regnr) (gdbarch_stab_reg_to_regnum (current_gdbarch, stab_regnr)) |
614 | #endif | |
88c72b7d AC |
615 | |
616 | /* Provide a default mapping from a ecoff register number to a gdb REGNUM. */ | |
617 | ||
618 | /* Default (function) for non- multi-arch platforms. */ | |
619 | #if (!GDB_MULTI_ARCH) && !defined (ECOFF_REG_TO_REGNUM) | |
620 | #define ECOFF_REG_TO_REGNUM(ecoff_regnr) (no_op_reg_to_regnum (ecoff_regnr)) | |
621 | #endif | |
622 | ||
623 | typedef int (gdbarch_ecoff_reg_to_regnum_ftype) (int ecoff_regnr); | |
624 | extern int gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr); | |
625 | extern void set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum); | |
83905903 AC |
626 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ECOFF_REG_TO_REGNUM) |
627 | #error "Non multi-arch definition of ECOFF_REG_TO_REGNUM" | |
628 | #endif | |
c25083af | 629 | #if !defined (ECOFF_REG_TO_REGNUM) |
88c72b7d AC |
630 | #define ECOFF_REG_TO_REGNUM(ecoff_regnr) (gdbarch_ecoff_reg_to_regnum (current_gdbarch, ecoff_regnr)) |
631 | #endif | |
88c72b7d AC |
632 | |
633 | /* Provide a default mapping from a DWARF register number to a gdb REGNUM. */ | |
634 | ||
635 | /* Default (function) for non- multi-arch platforms. */ | |
636 | #if (!GDB_MULTI_ARCH) && !defined (DWARF_REG_TO_REGNUM) | |
637 | #define DWARF_REG_TO_REGNUM(dwarf_regnr) (no_op_reg_to_regnum (dwarf_regnr)) | |
638 | #endif | |
639 | ||
640 | typedef int (gdbarch_dwarf_reg_to_regnum_ftype) (int dwarf_regnr); | |
641 | extern int gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr); | |
642 | extern void set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_dwarf_reg_to_regnum_ftype *dwarf_reg_to_regnum); | |
83905903 AC |
643 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF_REG_TO_REGNUM) |
644 | #error "Non multi-arch definition of DWARF_REG_TO_REGNUM" | |
645 | #endif | |
c25083af | 646 | #if !defined (DWARF_REG_TO_REGNUM) |
88c72b7d AC |
647 | #define DWARF_REG_TO_REGNUM(dwarf_regnr) (gdbarch_dwarf_reg_to_regnum (current_gdbarch, dwarf_regnr)) |
648 | #endif | |
88c72b7d AC |
649 | |
650 | /* Convert from an sdb register number to an internal gdb register number. | |
651 | This should be defined in tm.h, if REGISTER_NAMES is not set up | |
652 | to map one to one onto the sdb register numbers. */ | |
653 | ||
654 | /* Default (function) for non- multi-arch platforms. */ | |
655 | #if (!GDB_MULTI_ARCH) && !defined (SDB_REG_TO_REGNUM) | |
656 | #define SDB_REG_TO_REGNUM(sdb_regnr) (no_op_reg_to_regnum (sdb_regnr)) | |
657 | #endif | |
658 | ||
659 | typedef int (gdbarch_sdb_reg_to_regnum_ftype) (int sdb_regnr); | |
660 | extern int gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr); | |
661 | extern void set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum); | |
83905903 AC |
662 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SDB_REG_TO_REGNUM) |
663 | #error "Non multi-arch definition of SDB_REG_TO_REGNUM" | |
664 | #endif | |
c25083af | 665 | #if !defined (SDB_REG_TO_REGNUM) |
88c72b7d AC |
666 | #define SDB_REG_TO_REGNUM(sdb_regnr) (gdbarch_sdb_reg_to_regnum (current_gdbarch, sdb_regnr)) |
667 | #endif | |
88c72b7d AC |
668 | |
669 | /* Default (function) for non- multi-arch platforms. */ | |
670 | #if (!GDB_MULTI_ARCH) && !defined (DWARF2_REG_TO_REGNUM) | |
671 | #define DWARF2_REG_TO_REGNUM(dwarf2_regnr) (no_op_reg_to_regnum (dwarf2_regnr)) | |
672 | #endif | |
673 | ||
674 | typedef int (gdbarch_dwarf2_reg_to_regnum_ftype) (int dwarf2_regnr); | |
675 | extern int gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr); | |
676 | extern void set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum); | |
83905903 AC |
677 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF2_REG_TO_REGNUM) |
678 | #error "Non multi-arch definition of DWARF2_REG_TO_REGNUM" | |
679 | #endif | |
c25083af | 680 | #if !defined (DWARF2_REG_TO_REGNUM) |
88c72b7d AC |
681 | #define DWARF2_REG_TO_REGNUM(dwarf2_regnr) (gdbarch_dwarf2_reg_to_regnum (current_gdbarch, dwarf2_regnr)) |
682 | #endif | |
88c72b7d | 683 | |
33489c5b | 684 | /* Default (function) for non- multi-arch platforms. */ |
6166d547 | 685 | #if (!GDB_MULTI_ARCH) && !defined (REGISTER_NAME) |
33489c5b AC |
686 | #define REGISTER_NAME(regnr) (legacy_register_name (regnr)) |
687 | #endif | |
688 | ||
fa88f677 AC |
689 | typedef const char * (gdbarch_register_name_ftype) (int regnr); |
690 | extern const char * gdbarch_register_name (struct gdbarch *gdbarch, int regnr); | |
104c1213 | 691 | extern void set_gdbarch_register_name (struct gdbarch *gdbarch, gdbarch_register_name_ftype *register_name); |
83905903 AC |
692 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_NAME) |
693 | #error "Non multi-arch definition of REGISTER_NAME" | |
694 | #endif | |
c25083af | 695 | #if !defined (REGISTER_NAME) |
0f71a2f6 JM |
696 | #define REGISTER_NAME(regnr) (gdbarch_register_name (current_gdbarch, regnr)) |
697 | #endif | |
0f71a2f6 | 698 | |
b1e29e33 AC |
699 | extern int gdbarch_deprecated_register_size (struct gdbarch *gdbarch); |
700 | extern void set_gdbarch_deprecated_register_size (struct gdbarch *gdbarch, int deprecated_register_size); | |
701 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_SIZE) | |
702 | #error "Non multi-arch definition of DEPRECATED_REGISTER_SIZE" | |
83905903 | 703 | #endif |
b1e29e33 AC |
704 | #if !defined (DEPRECATED_REGISTER_SIZE) |
705 | #define DEPRECATED_REGISTER_SIZE (gdbarch_deprecated_register_size (current_gdbarch)) | |
0f71a2f6 | 706 | #endif |
0f71a2f6 | 707 | |
b8b527c5 AC |
708 | extern int gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch); |
709 | extern void set_gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch, int deprecated_register_bytes); | |
710 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_BYTES) | |
711 | #error "Non multi-arch definition of DEPRECATED_REGISTER_BYTES" | |
83905903 | 712 | #endif |
b8b527c5 AC |
713 | #if !defined (DEPRECATED_REGISTER_BYTES) |
714 | #define DEPRECATED_REGISTER_BYTES (gdbarch_deprecated_register_bytes (current_gdbarch)) | |
0f71a2f6 | 715 | #endif |
0f71a2f6 | 716 | |
46654a5b AC |
717 | /* NOTE: cagney/2002-05-02: This function with predicate has a valid |
718 | (callable) initial value. As a consequence, even when the predicate | |
719 | is false, the corresponding function works. This simplifies the | |
720 | migration process - old code, calling REGISTER_BYTE, doesn't need to | |
721 | be modified. */ | |
722 | ||
723 | #if defined (REGISTER_BYTE) | |
724 | /* Legacy for systems yet to multi-arch REGISTER_BYTE */ | |
725 | #if !defined (REGISTER_BYTE_P) | |
726 | #define REGISTER_BYTE_P() (1) | |
727 | #endif | |
728 | #endif | |
729 | ||
730 | /* Default predicate for non- multi-arch targets. */ | |
731 | #if (!GDB_MULTI_ARCH) && !defined (REGISTER_BYTE_P) | |
732 | #define REGISTER_BYTE_P() (0) | |
733 | #endif | |
734 | ||
735 | extern int gdbarch_register_byte_p (struct gdbarch *gdbarch); | |
736 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTE_P) | |
737 | #error "Non multi-arch definition of REGISTER_BYTE" | |
738 | #endif | |
739 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_BYTE_P) | |
740 | #define REGISTER_BYTE_P() (gdbarch_register_byte_p (current_gdbarch)) | |
741 | #endif | |
742 | ||
a7e3c2ad AC |
743 | /* Default (function) for non- multi-arch platforms. */ |
744 | #if (!GDB_MULTI_ARCH) && !defined (REGISTER_BYTE) | |
745 | #define REGISTER_BYTE(reg_nr) (generic_register_byte (reg_nr)) | |
746 | #endif | |
747 | ||
104c1213 JM |
748 | typedef int (gdbarch_register_byte_ftype) (int reg_nr); |
749 | extern int gdbarch_register_byte (struct gdbarch *gdbarch, int reg_nr); | |
750 | extern void set_gdbarch_register_byte (struct gdbarch *gdbarch, gdbarch_register_byte_ftype *register_byte); | |
83905903 AC |
751 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTE) |
752 | #error "Non multi-arch definition of REGISTER_BYTE" | |
753 | #endif | |
c25083af | 754 | #if !defined (REGISTER_BYTE) |
0f71a2f6 JM |
755 | #define REGISTER_BYTE(reg_nr) (gdbarch_register_byte (current_gdbarch, reg_nr)) |
756 | #endif | |
0f71a2f6 | 757 | |
0c92afe8 AC |
758 | /* The methods REGISTER_VIRTUAL_TYPE, REGISTER_VIRTUAL_SIZE and |
759 | REGISTER_RAW_SIZE are all being replaced by REGISTER_TYPE. */ | |
35cac7cf | 760 | |
b2e75d78 AC |
761 | /* Default (function) for non- multi-arch platforms. */ |
762 | #if (!GDB_MULTI_ARCH) && !defined (REGISTER_RAW_SIZE) | |
763 | #define REGISTER_RAW_SIZE(reg_nr) (generic_register_size (reg_nr)) | |
764 | #endif | |
765 | ||
104c1213 JM |
766 | typedef int (gdbarch_register_raw_size_ftype) (int reg_nr); |
767 | extern int gdbarch_register_raw_size (struct gdbarch *gdbarch, int reg_nr); | |
768 | extern void set_gdbarch_register_raw_size (struct gdbarch *gdbarch, gdbarch_register_raw_size_ftype *register_raw_size); | |
83905903 AC |
769 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_RAW_SIZE) |
770 | #error "Non multi-arch definition of REGISTER_RAW_SIZE" | |
771 | #endif | |
c25083af | 772 | #if !defined (REGISTER_RAW_SIZE) |
0f71a2f6 JM |
773 | #define REGISTER_RAW_SIZE(reg_nr) (gdbarch_register_raw_size (current_gdbarch, reg_nr)) |
774 | #endif | |
0f71a2f6 | 775 | |
d9d9c31f AC |
776 | /* The methods DEPRECATED_MAX_REGISTER_RAW_SIZE and |
777 | DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE are all being replaced by | |
778 | MAX_REGISTER_SIZE (a constant). */ | |
35cac7cf | 779 | |
a0ed5532 AC |
780 | #if defined (DEPRECATED_MAX_REGISTER_RAW_SIZE) |
781 | /* Legacy for systems yet to multi-arch DEPRECATED_MAX_REGISTER_RAW_SIZE */ | |
782 | #if !defined (DEPRECATED_MAX_REGISTER_RAW_SIZE_P) | |
783 | #define DEPRECATED_MAX_REGISTER_RAW_SIZE_P() (1) | |
784 | #endif | |
785 | #endif | |
786 | ||
787 | /* Default predicate for non- multi-arch targets. */ | |
788 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_MAX_REGISTER_RAW_SIZE_P) | |
789 | #define DEPRECATED_MAX_REGISTER_RAW_SIZE_P() (0) | |
790 | #endif | |
791 | ||
792 | extern int gdbarch_deprecated_max_register_raw_size_p (struct gdbarch *gdbarch); | |
793 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_MAX_REGISTER_RAW_SIZE_P) | |
794 | #error "Non multi-arch definition of DEPRECATED_MAX_REGISTER_RAW_SIZE" | |
795 | #endif | |
796 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_MAX_REGISTER_RAW_SIZE_P) | |
797 | #define DEPRECATED_MAX_REGISTER_RAW_SIZE_P() (gdbarch_deprecated_max_register_raw_size_p (current_gdbarch)) | |
798 | #endif | |
799 | ||
800 | /* Default (value) for non- multi-arch platforms. */ | |
801 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_MAX_REGISTER_RAW_SIZE) | |
802 | #define DEPRECATED_MAX_REGISTER_RAW_SIZE (0) | |
803 | #endif | |
804 | ||
805 | extern int gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch); | |
806 | extern void set_gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch, int deprecated_max_register_raw_size); | |
807 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_MAX_REGISTER_RAW_SIZE) | |
808 | #error "Non multi-arch definition of DEPRECATED_MAX_REGISTER_RAW_SIZE" | |
83905903 | 809 | #endif |
c25083af | 810 | #if !defined (DEPRECATED_MAX_REGISTER_RAW_SIZE) |
a0ed5532 | 811 | #define DEPRECATED_MAX_REGISTER_RAW_SIZE (gdbarch_deprecated_max_register_raw_size (current_gdbarch)) |
0f71a2f6 | 812 | #endif |
0f71a2f6 | 813 | |
0c92afe8 AC |
814 | /* The methods REGISTER_VIRTUAL_TYPE, REGISTER_VIRTUAL_SIZE and |
815 | REGISTER_RAW_SIZE are all being replaced by REGISTER_TYPE. */ | |
35cac7cf | 816 | |
b2e75d78 AC |
817 | /* Default (function) for non- multi-arch platforms. */ |
818 | #if (!GDB_MULTI_ARCH) && !defined (REGISTER_VIRTUAL_SIZE) | |
819 | #define REGISTER_VIRTUAL_SIZE(reg_nr) (generic_register_size (reg_nr)) | |
820 | #endif | |
821 | ||
104c1213 JM |
822 | typedef int (gdbarch_register_virtual_size_ftype) (int reg_nr); |
823 | extern int gdbarch_register_virtual_size (struct gdbarch *gdbarch, int reg_nr); | |
824 | extern void set_gdbarch_register_virtual_size (struct gdbarch *gdbarch, gdbarch_register_virtual_size_ftype *register_virtual_size); | |
83905903 AC |
825 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_VIRTUAL_SIZE) |
826 | #error "Non multi-arch definition of REGISTER_VIRTUAL_SIZE" | |
827 | #endif | |
c25083af | 828 | #if !defined (REGISTER_VIRTUAL_SIZE) |
0f71a2f6 JM |
829 | #define REGISTER_VIRTUAL_SIZE(reg_nr) (gdbarch_register_virtual_size (current_gdbarch, reg_nr)) |
830 | #endif | |
0f71a2f6 | 831 | |
d9d9c31f AC |
832 | /* The methods DEPRECATED_MAX_REGISTER_RAW_SIZE and |
833 | DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE are all being replaced by | |
834 | MAX_REGISTER_SIZE (a constant). */ | |
35cac7cf | 835 | |
a0ed5532 AC |
836 | #if defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE) |
837 | /* Legacy for systems yet to multi-arch DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE */ | |
838 | #if !defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P) | |
839 | #define DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() (1) | |
840 | #endif | |
841 | #endif | |
842 | ||
843 | /* Default predicate for non- multi-arch targets. */ | |
844 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P) | |
845 | #define DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() (0) | |
846 | #endif | |
847 | ||
848 | extern int gdbarch_deprecated_max_register_virtual_size_p (struct gdbarch *gdbarch); | |
849 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P) | |
850 | #error "Non multi-arch definition of DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE" | |
851 | #endif | |
852 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P) | |
853 | #define DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() (gdbarch_deprecated_max_register_virtual_size_p (current_gdbarch)) | |
854 | #endif | |
855 | ||
856 | /* Default (value) for non- multi-arch platforms. */ | |
857 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE) | |
858 | #define DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE (0) | |
859 | #endif | |
860 | ||
861 | extern int gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch); | |
862 | extern void set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch, int deprecated_max_register_virtual_size); | |
863 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE) | |
864 | #error "Non multi-arch definition of DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE" | |
83905903 | 865 | #endif |
c25083af | 866 | #if !defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE) |
a0ed5532 | 867 | #define DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE (gdbarch_deprecated_max_register_virtual_size (current_gdbarch)) |
0f71a2f6 | 868 | #endif |
0f71a2f6 | 869 | |
0c92afe8 AC |
870 | /* The methods REGISTER_VIRTUAL_TYPE, REGISTER_VIRTUAL_SIZE and |
871 | REGISTER_RAW_SIZE are all being replaced by REGISTER_TYPE. */ | |
35cac7cf AC |
872 | |
873 | #if defined (REGISTER_VIRTUAL_TYPE) | |
874 | /* Legacy for systems yet to multi-arch REGISTER_VIRTUAL_TYPE */ | |
875 | #if !defined (REGISTER_VIRTUAL_TYPE_P) | |
876 | #define REGISTER_VIRTUAL_TYPE_P() (1) | |
877 | #endif | |
878 | #endif | |
879 | ||
880 | /* Default predicate for non- multi-arch targets. */ | |
881 | #if (!GDB_MULTI_ARCH) && !defined (REGISTER_VIRTUAL_TYPE_P) | |
882 | #define REGISTER_VIRTUAL_TYPE_P() (0) | |
883 | #endif | |
884 | ||
885 | extern int gdbarch_register_virtual_type_p (struct gdbarch *gdbarch); | |
886 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_VIRTUAL_TYPE_P) | |
887 | #error "Non multi-arch definition of REGISTER_VIRTUAL_TYPE" | |
888 | #endif | |
889 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_VIRTUAL_TYPE_P) | |
890 | #define REGISTER_VIRTUAL_TYPE_P() (gdbarch_register_virtual_type_p (current_gdbarch)) | |
891 | #endif | |
892 | ||
893 | /* Default (function) for non- multi-arch platforms. */ | |
894 | #if (!GDB_MULTI_ARCH) && !defined (REGISTER_VIRTUAL_TYPE) | |
895 | #define REGISTER_VIRTUAL_TYPE(reg_nr) (internal_error (__FILE__, __LINE__, "REGISTER_VIRTUAL_TYPE"), 0) | |
896 | #endif | |
897 | ||
104c1213 JM |
898 | typedef struct type * (gdbarch_register_virtual_type_ftype) (int reg_nr); |
899 | extern struct type * gdbarch_register_virtual_type (struct gdbarch *gdbarch, int reg_nr); | |
900 | extern void set_gdbarch_register_virtual_type (struct gdbarch *gdbarch, gdbarch_register_virtual_type_ftype *register_virtual_type); | |
83905903 AC |
901 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_VIRTUAL_TYPE) |
902 | #error "Non multi-arch definition of REGISTER_VIRTUAL_TYPE" | |
903 | #endif | |
c25083af | 904 | #if !defined (REGISTER_VIRTUAL_TYPE) |
0f71a2f6 JM |
905 | #define REGISTER_VIRTUAL_TYPE(reg_nr) (gdbarch_register_virtual_type (current_gdbarch, reg_nr)) |
906 | #endif | |
0f71a2f6 | 907 | |
35cac7cf AC |
908 | extern int gdbarch_register_type_p (struct gdbarch *gdbarch); |
909 | ||
910 | typedef struct type * (gdbarch_register_type_ftype) (struct gdbarch *gdbarch, int reg_nr); | |
911 | extern struct type * gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr); | |
912 | extern void set_gdbarch_register_type (struct gdbarch *gdbarch, gdbarch_register_type_ftype *register_type); | |
913 | ||
903ad3a6 AC |
914 | #if defined (DEPRECATED_DO_REGISTERS_INFO) |
915 | /* Legacy for systems yet to multi-arch DEPRECATED_DO_REGISTERS_INFO */ | |
916 | #if !defined (DEPRECATED_DO_REGISTERS_INFO_P) | |
917 | #define DEPRECATED_DO_REGISTERS_INFO_P() (1) | |
0ab7a791 AC |
918 | #endif |
919 | #endif | |
920 | ||
921 | /* Default predicate for non- multi-arch targets. */ | |
903ad3a6 AC |
922 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_DO_REGISTERS_INFO_P) |
923 | #define DEPRECATED_DO_REGISTERS_INFO_P() (0) | |
0ab7a791 AC |
924 | #endif |
925 | ||
903ad3a6 AC |
926 | extern int gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch); |
927 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_DO_REGISTERS_INFO_P) | |
928 | #error "Non multi-arch definition of DEPRECATED_DO_REGISTERS_INFO" | |
0ab7a791 | 929 | #endif |
903ad3a6 AC |
930 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_DO_REGISTERS_INFO_P) |
931 | #define DEPRECATED_DO_REGISTERS_INFO_P() (gdbarch_deprecated_do_registers_info_p (current_gdbarch)) | |
0ab7a791 AC |
932 | #endif |
933 | ||
666e11c5 | 934 | /* Default (function) for non- multi-arch platforms. */ |
903ad3a6 AC |
935 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_DO_REGISTERS_INFO) |
936 | #define DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs) (internal_error (__FILE__, __LINE__, "DEPRECATED_DO_REGISTERS_INFO"), 0) | |
666e11c5 EZ |
937 | #endif |
938 | ||
903ad3a6 AC |
939 | typedef void (gdbarch_deprecated_do_registers_info_ftype) (int reg_nr, int fpregs); |
940 | extern void gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs); | |
941 | extern void set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, gdbarch_deprecated_do_registers_info_ftype *deprecated_do_registers_info); | |
942 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_DO_REGISTERS_INFO) | |
943 | #error "Non multi-arch definition of DEPRECATED_DO_REGISTERS_INFO" | |
83905903 | 944 | #endif |
c25083af | 945 | #if !defined (DEPRECATED_DO_REGISTERS_INFO) |
903ad3a6 | 946 | #define DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs) (gdbarch_deprecated_do_registers_info (current_gdbarch, reg_nr, fpregs)) |
666e11c5 | 947 | #endif |
666e11c5 | 948 | |
0ab7a791 AC |
949 | typedef void (gdbarch_print_registers_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all); |
950 | extern void gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all); | |
951 | extern void set_gdbarch_print_registers_info (struct gdbarch *gdbarch, gdbarch_print_registers_info_ftype *print_registers_info); | |
952 | ||
23e3a7ac AC |
953 | extern int gdbarch_print_float_info_p (struct gdbarch *gdbarch); |
954 | ||
955 | typedef void (gdbarch_print_float_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args); | |
956 | extern void gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args); | |
5e74b15c | 957 | extern void set_gdbarch_print_float_info (struct gdbarch *gdbarch, gdbarch_print_float_info_ftype *print_float_info); |
5e74b15c | 958 | |
e76f1f2e AC |
959 | extern int gdbarch_print_vector_info_p (struct gdbarch *gdbarch); |
960 | ||
961 | typedef void (gdbarch_print_vector_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args); | |
962 | extern void gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args); | |
963 | extern void set_gdbarch_print_vector_info (struct gdbarch *gdbarch, gdbarch_print_vector_info_ftype *print_vector_info); | |
964 | ||
7c7651b2 AC |
965 | /* MAP a GDB RAW register number onto a simulator register number. See |
966 | also include/...-sim.h. */ | |
967 | ||
968 | /* Default (function) for non- multi-arch platforms. */ | |
969 | #if (!GDB_MULTI_ARCH) && !defined (REGISTER_SIM_REGNO) | |
8238d0bf | 970 | #define REGISTER_SIM_REGNO(reg_nr) (legacy_register_sim_regno (reg_nr)) |
7c7651b2 AC |
971 | #endif |
972 | ||
973 | typedef int (gdbarch_register_sim_regno_ftype) (int reg_nr); | |
974 | extern int gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr); | |
975 | extern void set_gdbarch_register_sim_regno (struct gdbarch *gdbarch, gdbarch_register_sim_regno_ftype *register_sim_regno); | |
83905903 AC |
976 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_SIM_REGNO) |
977 | #error "Non multi-arch definition of REGISTER_SIM_REGNO" | |
978 | #endif | |
c25083af | 979 | #if !defined (REGISTER_SIM_REGNO) |
7c7651b2 AC |
980 | #define REGISTER_SIM_REGNO(reg_nr) (gdbarch_register_sim_regno (current_gdbarch, reg_nr)) |
981 | #endif | |
7c7651b2 | 982 | |
2649061d AC |
983 | #if defined (REGISTER_BYTES_OK) |
984 | /* Legacy for systems yet to multi-arch REGISTER_BYTES_OK */ | |
eee30e78 | 985 | #if !defined (REGISTER_BYTES_OK_P) |
2649061d AC |
986 | #define REGISTER_BYTES_OK_P() (1) |
987 | #endif | |
eee30e78 | 988 | #endif |
2649061d AC |
989 | |
990 | /* Default predicate for non- multi-arch targets. */ | |
991 | #if (!GDB_MULTI_ARCH) && !defined (REGISTER_BYTES_OK_P) | |
992 | #define REGISTER_BYTES_OK_P() (0) | |
993 | #endif | |
994 | ||
995 | extern int gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch); | |
83905903 AC |
996 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTES_OK_P) |
997 | #error "Non multi-arch definition of REGISTER_BYTES_OK" | |
998 | #endif | |
2649061d AC |
999 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_BYTES_OK_P) |
1000 | #define REGISTER_BYTES_OK_P() (gdbarch_register_bytes_ok_p (current_gdbarch)) | |
1001 | #endif | |
1002 | ||
1003 | /* Default (function) for non- multi-arch platforms. */ | |
1004 | #if (!GDB_MULTI_ARCH) && !defined (REGISTER_BYTES_OK) | |
8e65ff28 | 1005 | #define REGISTER_BYTES_OK(nr_bytes) (internal_error (__FILE__, __LINE__, "REGISTER_BYTES_OK"), 0) |
2649061d AC |
1006 | #endif |
1007 | ||
1008 | typedef int (gdbarch_register_bytes_ok_ftype) (long nr_bytes); | |
1009 | extern int gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes); | |
1010 | extern void set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch, gdbarch_register_bytes_ok_ftype *register_bytes_ok); | |
83905903 AC |
1011 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTES_OK) |
1012 | #error "Non multi-arch definition of REGISTER_BYTES_OK" | |
1013 | #endif | |
c25083af | 1014 | #if !defined (REGISTER_BYTES_OK) |
2649061d AC |
1015 | #define REGISTER_BYTES_OK(nr_bytes) (gdbarch_register_bytes_ok (current_gdbarch, nr_bytes)) |
1016 | #endif | |
2649061d | 1017 | |
01fb7433 AC |
1018 | /* Default (function) for non- multi-arch platforms. */ |
1019 | #if (!GDB_MULTI_ARCH) && !defined (CANNOT_FETCH_REGISTER) | |
1020 | #define CANNOT_FETCH_REGISTER(regnum) (cannot_register_not (regnum)) | |
1021 | #endif | |
1022 | ||
1023 | typedef int (gdbarch_cannot_fetch_register_ftype) (int regnum); | |
1024 | extern int gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum); | |
1025 | extern void set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, gdbarch_cannot_fetch_register_ftype *cannot_fetch_register); | |
83905903 AC |
1026 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CANNOT_FETCH_REGISTER) |
1027 | #error "Non multi-arch definition of CANNOT_FETCH_REGISTER" | |
1028 | #endif | |
c25083af | 1029 | #if !defined (CANNOT_FETCH_REGISTER) |
01fb7433 AC |
1030 | #define CANNOT_FETCH_REGISTER(regnum) (gdbarch_cannot_fetch_register (current_gdbarch, regnum)) |
1031 | #endif | |
01fb7433 AC |
1032 | |
1033 | /* Default (function) for non- multi-arch platforms. */ | |
1034 | #if (!GDB_MULTI_ARCH) && !defined (CANNOT_STORE_REGISTER) | |
1035 | #define CANNOT_STORE_REGISTER(regnum) (cannot_register_not (regnum)) | |
1036 | #endif | |
1037 | ||
1038 | typedef int (gdbarch_cannot_store_register_ftype) (int regnum); | |
1039 | extern int gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum); | |
1040 | extern void set_gdbarch_cannot_store_register (struct gdbarch *gdbarch, gdbarch_cannot_store_register_ftype *cannot_store_register); | |
83905903 AC |
1041 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CANNOT_STORE_REGISTER) |
1042 | #error "Non multi-arch definition of CANNOT_STORE_REGISTER" | |
1043 | #endif | |
c25083af | 1044 | #if !defined (CANNOT_STORE_REGISTER) |
01fb7433 AC |
1045 | #define CANNOT_STORE_REGISTER(regnum) (gdbarch_cannot_store_register (current_gdbarch, regnum)) |
1046 | #endif | |
01fb7433 | 1047 | |
9df628e0 RE |
1048 | /* setjmp/longjmp support. */ |
1049 | ||
1050 | #if defined (GET_LONGJMP_TARGET) | |
1051 | /* Legacy for systems yet to multi-arch GET_LONGJMP_TARGET */ | |
1052 | #if !defined (GET_LONGJMP_TARGET_P) | |
1053 | #define GET_LONGJMP_TARGET_P() (1) | |
1054 | #endif | |
1055 | #endif | |
1056 | ||
1057 | /* Default predicate for non- multi-arch targets. */ | |
1058 | #if (!GDB_MULTI_ARCH) && !defined (GET_LONGJMP_TARGET_P) | |
1059 | #define GET_LONGJMP_TARGET_P() (0) | |
1060 | #endif | |
1061 | ||
1062 | extern int gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch); | |
1063 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (GET_LONGJMP_TARGET_P) | |
1064 | #error "Non multi-arch definition of GET_LONGJMP_TARGET" | |
1065 | #endif | |
1066 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (GET_LONGJMP_TARGET_P) | |
1067 | #define GET_LONGJMP_TARGET_P() (gdbarch_get_longjmp_target_p (current_gdbarch)) | |
1068 | #endif | |
1069 | ||
1070 | /* Default (function) for non- multi-arch platforms. */ | |
1071 | #if (!GDB_MULTI_ARCH) && !defined (GET_LONGJMP_TARGET) | |
1072 | #define GET_LONGJMP_TARGET(pc) (internal_error (__FILE__, __LINE__, "GET_LONGJMP_TARGET"), 0) | |
1073 | #endif | |
1074 | ||
1075 | typedef int (gdbarch_get_longjmp_target_ftype) (CORE_ADDR *pc); | |
1076 | extern int gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc); | |
1077 | extern void set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch, gdbarch_get_longjmp_target_ftype *get_longjmp_target); | |
1078 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (GET_LONGJMP_TARGET) | |
1079 | #error "Non multi-arch definition of GET_LONGJMP_TARGET" | |
1080 | #endif | |
c25083af | 1081 | #if !defined (GET_LONGJMP_TARGET) |
9df628e0 RE |
1082 | #define GET_LONGJMP_TARGET(pc) (gdbarch_get_longjmp_target (current_gdbarch, pc)) |
1083 | #endif | |
9df628e0 | 1084 | |
028c194b AC |
1085 | /* Non multi-arch DUMMY_FRAMES are a mess (multi-arch ones are not that |
1086 | much better but at least they are vaguely consistent). The headers | |
1087 | and body contain convoluted #if/#else sequences for determine how | |
1088 | things should be compiled. Instead of trying to mimic that | |
1089 | behaviour here (and hence entrench it further) gdbarch simply | |
1090 | reqires that these methods be set up from the word go. This also | |
1091 | avoids any potential problems with moving beyond multi-arch partial. */ | |
1092 | ||
b99fa2d2 | 1093 | /* Default (value) for non- multi-arch platforms. */ |
07555a72 AC |
1094 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_USE_GENERIC_DUMMY_FRAMES) |
1095 | #define DEPRECATED_USE_GENERIC_DUMMY_FRAMES (1) | |
b99fa2d2 AC |
1096 | #endif |
1097 | ||
07555a72 AC |
1098 | extern int gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch); |
1099 | extern void set_gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch, int deprecated_use_generic_dummy_frames); | |
55e1d7e7 | 1100 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_USE_GENERIC_DUMMY_FRAMES) |
07555a72 | 1101 | #error "Non multi-arch definition of DEPRECATED_USE_GENERIC_DUMMY_FRAMES" |
83905903 | 1102 | #endif |
55e1d7e7 | 1103 | #if !defined (DEPRECATED_USE_GENERIC_DUMMY_FRAMES) |
07555a72 | 1104 | #define DEPRECATED_USE_GENERIC_DUMMY_FRAMES (gdbarch_deprecated_use_generic_dummy_frames (current_gdbarch)) |
0f71a2f6 | 1105 | #endif |
0f71a2f6 | 1106 | |
7043d8dc AC |
1107 | /* Replaced by push_dummy_code. */ |
1108 | ||
b99fa2d2 AC |
1109 | /* Default (value) for non- multi-arch platforms. */ |
1110 | #if (!GDB_MULTI_ARCH) && !defined (CALL_DUMMY_LOCATION) | |
1111 | #define CALL_DUMMY_LOCATION (AT_ENTRY_POINT) | |
1112 | #endif | |
1113 | ||
104c1213 JM |
1114 | extern int gdbarch_call_dummy_location (struct gdbarch *gdbarch); |
1115 | extern void set_gdbarch_call_dummy_location (struct gdbarch *gdbarch, int call_dummy_location); | |
55e1d7e7 | 1116 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_LOCATION) |
83905903 AC |
1117 | #error "Non multi-arch definition of CALL_DUMMY_LOCATION" |
1118 | #endif | |
55e1d7e7 | 1119 | #if !defined (CALL_DUMMY_LOCATION) |
0f71a2f6 JM |
1120 | #define CALL_DUMMY_LOCATION (gdbarch_call_dummy_location (current_gdbarch)) |
1121 | #endif | |
0f71a2f6 | 1122 | |
7043d8dc AC |
1123 | /* Replaced by push_dummy_code. */ |
1124 | ||
e9a2674e AC |
1125 | /* Default (function) for non- multi-arch platforms. */ |
1126 | #if (!GDB_MULTI_ARCH) && !defined (CALL_DUMMY_ADDRESS) | |
1127 | #define CALL_DUMMY_ADDRESS() (entry_point_address ()) | |
1128 | #endif | |
1129 | ||
104c1213 JM |
1130 | typedef CORE_ADDR (gdbarch_call_dummy_address_ftype) (void); |
1131 | extern CORE_ADDR gdbarch_call_dummy_address (struct gdbarch *gdbarch); | |
1132 | extern void set_gdbarch_call_dummy_address (struct gdbarch *gdbarch, gdbarch_call_dummy_address_ftype *call_dummy_address); | |
83905903 AC |
1133 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_ADDRESS) |
1134 | #error "Non multi-arch definition of CALL_DUMMY_ADDRESS" | |
1135 | #endif | |
c25083af | 1136 | #if !defined (CALL_DUMMY_ADDRESS) |
0f71a2f6 JM |
1137 | #define CALL_DUMMY_ADDRESS() (gdbarch_call_dummy_address (current_gdbarch)) |
1138 | #endif | |
0f71a2f6 | 1139 | |
7043d8dc AC |
1140 | /* Replaced by push_dummy_code. */ |
1141 | ||
b1e29e33 AC |
1142 | extern CORE_ADDR gdbarch_deprecated_call_dummy_start_offset (struct gdbarch *gdbarch); |
1143 | extern void set_gdbarch_deprecated_call_dummy_start_offset (struct gdbarch *gdbarch, CORE_ADDR deprecated_call_dummy_start_offset); | |
1144 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_START_OFFSET) | |
1145 | #error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_START_OFFSET" | |
83905903 | 1146 | #endif |
b1e29e33 AC |
1147 | #if !defined (DEPRECATED_CALL_DUMMY_START_OFFSET) |
1148 | #define DEPRECATED_CALL_DUMMY_START_OFFSET (gdbarch_deprecated_call_dummy_start_offset (current_gdbarch)) | |
0f71a2f6 | 1149 | #endif |
0f71a2f6 | 1150 | |
7043d8dc AC |
1151 | /* Replaced by push_dummy_code. */ |
1152 | ||
b1e29e33 AC |
1153 | extern CORE_ADDR gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch *gdbarch); |
1154 | extern void set_gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch *gdbarch, CORE_ADDR deprecated_call_dummy_breakpoint_offset); | |
1155 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET) | |
1156 | #error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET" | |
83905903 | 1157 | #endif |
b1e29e33 AC |
1158 | #if !defined (DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET) |
1159 | #define DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET (gdbarch_deprecated_call_dummy_breakpoint_offset (current_gdbarch)) | |
0f71a2f6 | 1160 | #endif |
0f71a2f6 | 1161 | |
7043d8dc AC |
1162 | /* Replaced by push_dummy_code. */ |
1163 | ||
b1e29e33 AC |
1164 | extern int gdbarch_deprecated_call_dummy_length (struct gdbarch *gdbarch); |
1165 | extern void set_gdbarch_deprecated_call_dummy_length (struct gdbarch *gdbarch, int deprecated_call_dummy_length); | |
1166 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_LENGTH) | |
1167 | #error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_LENGTH" | |
83905903 | 1168 | #endif |
b1e29e33 AC |
1169 | #if !defined (DEPRECATED_CALL_DUMMY_LENGTH) |
1170 | #define DEPRECATED_CALL_DUMMY_LENGTH (gdbarch_deprecated_call_dummy_length (current_gdbarch)) | |
0f71a2f6 | 1171 | #endif |
0f71a2f6 | 1172 | |
ae45cd16 AC |
1173 | /* NOTE: cagney/2002-11-24: This function with predicate has a valid |
1174 | (callable) initial value. As a consequence, even when the predicate | |
1175 | is false, the corresponding function works. This simplifies the | |
1176 | migration process - old code, calling DEPRECATED_PC_IN_CALL_DUMMY(), | |
1177 | doesn't need to be modified. */ | |
1178 | ||
1179 | #if defined (DEPRECATED_PC_IN_CALL_DUMMY) | |
1180 | /* Legacy for systems yet to multi-arch DEPRECATED_PC_IN_CALL_DUMMY */ | |
1181 | #if !defined (DEPRECATED_PC_IN_CALL_DUMMY_P) | |
1182 | #define DEPRECATED_PC_IN_CALL_DUMMY_P() (1) | |
1183 | #endif | |
1184 | #endif | |
1185 | ||
1186 | /* Default predicate for non- multi-arch targets. */ | |
1187 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PC_IN_CALL_DUMMY_P) | |
1188 | #define DEPRECATED_PC_IN_CALL_DUMMY_P() (0) | |
1189 | #endif | |
1190 | ||
1191 | extern int gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch *gdbarch); | |
55e1d7e7 | 1192 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PC_IN_CALL_DUMMY_P) |
ae45cd16 AC |
1193 | #error "Non multi-arch definition of DEPRECATED_PC_IN_CALL_DUMMY" |
1194 | #endif | |
55e1d7e7 | 1195 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PC_IN_CALL_DUMMY_P) |
ae45cd16 AC |
1196 | #define DEPRECATED_PC_IN_CALL_DUMMY_P() (gdbarch_deprecated_pc_in_call_dummy_p (current_gdbarch)) |
1197 | #endif | |
1198 | ||
b99fa2d2 | 1199 | /* Default (function) for non- multi-arch platforms. */ |
ae45cd16 AC |
1200 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PC_IN_CALL_DUMMY) |
1201 | #define DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address) (generic_pc_in_call_dummy (pc, sp, frame_address)) | |
b99fa2d2 AC |
1202 | #endif |
1203 | ||
ae45cd16 AC |
1204 | typedef int (gdbarch_deprecated_pc_in_call_dummy_ftype) (CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address); |
1205 | extern int gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address); | |
1206 | 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 | 1207 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PC_IN_CALL_DUMMY) |
ae45cd16 | 1208 | #error "Non multi-arch definition of DEPRECATED_PC_IN_CALL_DUMMY" |
83905903 | 1209 | #endif |
c25083af | 1210 | #if !defined (DEPRECATED_PC_IN_CALL_DUMMY) |
ae45cd16 | 1211 | #define DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address) (gdbarch_deprecated_pc_in_call_dummy (current_gdbarch, pc, sp, frame_address)) |
0f71a2f6 | 1212 | #endif |
0f71a2f6 | 1213 | |
7043d8dc AC |
1214 | /* Replaced by push_dummy_code. */ |
1215 | ||
33489c5b | 1216 | /* Default (value) for non- multi-arch platforms. */ |
b1e29e33 AC |
1217 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_CALL_DUMMY_WORDS) |
1218 | #define DEPRECATED_CALL_DUMMY_WORDS (legacy_call_dummy_words) | |
33489c5b AC |
1219 | #endif |
1220 | ||
b1e29e33 AC |
1221 | extern LONGEST * gdbarch_deprecated_call_dummy_words (struct gdbarch *gdbarch); |
1222 | extern void set_gdbarch_deprecated_call_dummy_words (struct gdbarch *gdbarch, LONGEST * deprecated_call_dummy_words); | |
1223 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_WORDS) | |
1224 | #error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_WORDS" | |
83905903 | 1225 | #endif |
b1e29e33 AC |
1226 | #if !defined (DEPRECATED_CALL_DUMMY_WORDS) |
1227 | #define DEPRECATED_CALL_DUMMY_WORDS (gdbarch_deprecated_call_dummy_words (current_gdbarch)) | |
0f71a2f6 | 1228 | #endif |
33489c5b | 1229 | |
7043d8dc AC |
1230 | /* Replaced by push_dummy_code. */ |
1231 | ||
33489c5b | 1232 | /* Default (value) for non- multi-arch platforms. */ |
b1e29e33 AC |
1233 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_SIZEOF_CALL_DUMMY_WORDS) |
1234 | #define DEPRECATED_SIZEOF_CALL_DUMMY_WORDS (legacy_sizeof_call_dummy_words) | |
33489c5b | 1235 | #endif |
0f71a2f6 | 1236 | |
b1e29e33 AC |
1237 | extern int gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch *gdbarch); |
1238 | extern void set_gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch *gdbarch, int deprecated_sizeof_call_dummy_words); | |
1239 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SIZEOF_CALL_DUMMY_WORDS) | |
1240 | #error "Non multi-arch definition of DEPRECATED_SIZEOF_CALL_DUMMY_WORDS" | |
83905903 | 1241 | #endif |
b1e29e33 AC |
1242 | #if !defined (DEPRECATED_SIZEOF_CALL_DUMMY_WORDS) |
1243 | #define DEPRECATED_SIZEOF_CALL_DUMMY_WORDS (gdbarch_deprecated_sizeof_call_dummy_words (current_gdbarch)) | |
0f71a2f6 | 1244 | #endif |
0f71a2f6 | 1245 | |
7043d8dc AC |
1246 | /* Replaced by push_dummy_code. */ |
1247 | ||
1bf6d5cc AC |
1248 | #if defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST) |
1249 | /* Legacy for systems yet to multi-arch DEPRECATED_CALL_DUMMY_STACK_ADJUST */ | |
1250 | #if !defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST_P) | |
1251 | #define DEPRECATED_CALL_DUMMY_STACK_ADJUST_P() (1) | |
83905903 | 1252 | #endif |
0f71a2f6 | 1253 | #endif |
1bf6d5cc AC |
1254 | |
1255 | /* Default predicate for non- multi-arch targets. */ | |
1256 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST_P) | |
1257 | #define DEPRECATED_CALL_DUMMY_STACK_ADJUST_P() (0) | |
1258 | #endif | |
1259 | ||
1260 | extern int gdbarch_deprecated_call_dummy_stack_adjust_p (struct gdbarch *gdbarch); | |
1261 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST_P) | |
1262 | #error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_STACK_ADJUST" | |
1263 | #endif | |
1264 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST_P) | |
1265 | #define DEPRECATED_CALL_DUMMY_STACK_ADJUST_P() (gdbarch_deprecated_call_dummy_stack_adjust_p (current_gdbarch)) | |
1266 | #endif | |
1267 | ||
1268 | /* Default (value) for non- multi-arch platforms. */ | |
1269 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST) | |
1270 | #define DEPRECATED_CALL_DUMMY_STACK_ADJUST (0) | |
0f71a2f6 JM |
1271 | #endif |
1272 | ||
1bf6d5cc AC |
1273 | extern int gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch *gdbarch); |
1274 | extern void set_gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch *gdbarch, int deprecated_call_dummy_stack_adjust); | |
1275 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST) | |
1276 | #error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_STACK_ADJUST" | |
83905903 | 1277 | #endif |
c25083af | 1278 | #if !defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST) |
1bf6d5cc | 1279 | #define DEPRECATED_CALL_DUMMY_STACK_ADJUST (gdbarch_deprecated_call_dummy_stack_adjust (current_gdbarch)) |
0f71a2f6 | 1280 | #endif |
0f71a2f6 | 1281 | |
7043d8dc AC |
1282 | /* Replaced by push_dummy_code. */ |
1283 | ||
b1e29e33 AC |
1284 | #if defined (DEPRECATED_FIX_CALL_DUMMY) |
1285 | /* Legacy for systems yet to multi-arch DEPRECATED_FIX_CALL_DUMMY */ | |
1286 | #if !defined (DEPRECATED_FIX_CALL_DUMMY_P) | |
1287 | #define DEPRECATED_FIX_CALL_DUMMY_P() (1) | |
e8ab51f7 AC |
1288 | #endif |
1289 | #endif | |
1290 | ||
1291 | /* Default predicate for non- multi-arch targets. */ | |
b1e29e33 AC |
1292 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FIX_CALL_DUMMY_P) |
1293 | #define DEPRECATED_FIX_CALL_DUMMY_P() (0) | |
e8ab51f7 AC |
1294 | #endif |
1295 | ||
b1e29e33 AC |
1296 | extern int gdbarch_deprecated_fix_call_dummy_p (struct gdbarch *gdbarch); |
1297 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FIX_CALL_DUMMY_P) | |
1298 | #error "Non multi-arch definition of DEPRECATED_FIX_CALL_DUMMY" | |
e8ab51f7 | 1299 | #endif |
b1e29e33 AC |
1300 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FIX_CALL_DUMMY_P) |
1301 | #define DEPRECATED_FIX_CALL_DUMMY_P() (gdbarch_deprecated_fix_call_dummy_p (current_gdbarch)) | |
e8ab51f7 AC |
1302 | #endif |
1303 | ||
1304 | /* Default (function) for non- multi-arch platforms. */ | |
b1e29e33 AC |
1305 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FIX_CALL_DUMMY) |
1306 | #define DEPRECATED_FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p) (internal_error (__FILE__, __LINE__, "DEPRECATED_FIX_CALL_DUMMY"), 0) | |
e8ab51f7 AC |
1307 | #endif |
1308 | ||
b1e29e33 AC |
1309 | 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); |
1310 | 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); | |
1311 | extern void set_gdbarch_deprecated_fix_call_dummy (struct gdbarch *gdbarch, gdbarch_deprecated_fix_call_dummy_ftype *deprecated_fix_call_dummy); | |
1312 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FIX_CALL_DUMMY) | |
1313 | #error "Non multi-arch definition of DEPRECATED_FIX_CALL_DUMMY" | |
83905903 | 1314 | #endif |
c25083af | 1315 | #if !defined (DEPRECATED_FIX_CALL_DUMMY) |
b1e29e33 | 1316 | #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)) |
0f71a2f6 | 1317 | #endif |
0f71a2f6 | 1318 | |
b1e29e33 | 1319 | /* This is a replacement for DEPRECATED_FIX_CALL_DUMMY et.al. */ |
7043d8dc AC |
1320 | |
1321 | extern int gdbarch_push_dummy_code_p (struct gdbarch *gdbarch); | |
1322 | ||
1323 | 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); | |
1324 | 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); | |
1325 | extern void set_gdbarch_push_dummy_code (struct gdbarch *gdbarch, gdbarch_push_dummy_code_ftype *push_dummy_code); | |
1326 | ||
2ca6c561 AC |
1327 | #if defined (DEPRECATED_INIT_FRAME_PC_FIRST) |
1328 | /* Legacy for systems yet to multi-arch DEPRECATED_INIT_FRAME_PC_FIRST */ | |
1329 | #if !defined (DEPRECATED_INIT_FRAME_PC_FIRST_P) | |
1330 | #define DEPRECATED_INIT_FRAME_PC_FIRST_P() (1) | |
1331 | #endif | |
1332 | #endif | |
1333 | ||
1334 | /* Default predicate for non- multi-arch targets. */ | |
1335 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_INIT_FRAME_PC_FIRST_P) | |
1336 | #define DEPRECATED_INIT_FRAME_PC_FIRST_P() (0) | |
1337 | #endif | |
1338 | ||
1339 | extern int gdbarch_deprecated_init_frame_pc_first_p (struct gdbarch *gdbarch); | |
1340 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_FRAME_PC_FIRST_P) | |
1341 | #error "Non multi-arch definition of DEPRECATED_INIT_FRAME_PC_FIRST" | |
1342 | #endif | |
1343 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_INIT_FRAME_PC_FIRST_P) | |
1344 | #define DEPRECATED_INIT_FRAME_PC_FIRST_P() (gdbarch_deprecated_init_frame_pc_first_p (current_gdbarch)) | |
1345 | #endif | |
1346 | ||
10312cc4 | 1347 | /* Default (function) for non- multi-arch platforms. */ |
2ca6c561 AC |
1348 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_INIT_FRAME_PC_FIRST) |
1349 | #define DEPRECATED_INIT_FRAME_PC_FIRST(fromleaf, prev) (internal_error (__FILE__, __LINE__, "DEPRECATED_INIT_FRAME_PC_FIRST"), 0) | |
10312cc4 AC |
1350 | #endif |
1351 | ||
97f46953 AC |
1352 | typedef CORE_ADDR (gdbarch_deprecated_init_frame_pc_first_ftype) (int fromleaf, struct frame_info *prev); |
1353 | extern CORE_ADDR gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev); | |
2ca6c561 AC |
1354 | extern void set_gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch, gdbarch_deprecated_init_frame_pc_first_ftype *deprecated_init_frame_pc_first); |
1355 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_FRAME_PC_FIRST) | |
1356 | #error "Non multi-arch definition of DEPRECATED_INIT_FRAME_PC_FIRST" | |
83905903 | 1357 | #endif |
c25083af | 1358 | #if !defined (DEPRECATED_INIT_FRAME_PC_FIRST) |
2ca6c561 | 1359 | #define DEPRECATED_INIT_FRAME_PC_FIRST(fromleaf, prev) (gdbarch_deprecated_init_frame_pc_first (current_gdbarch, fromleaf, prev)) |
10312cc4 | 1360 | #endif |
10312cc4 | 1361 | |
a5afb99f AC |
1362 | #if defined (DEPRECATED_INIT_FRAME_PC) |
1363 | /* Legacy for systems yet to multi-arch DEPRECATED_INIT_FRAME_PC */ | |
1364 | #if !defined (DEPRECATED_INIT_FRAME_PC_P) | |
1365 | #define DEPRECATED_INIT_FRAME_PC_P() (1) | |
1366 | #endif | |
1367 | #endif | |
1368 | ||
1369 | /* Default predicate for non- multi-arch targets. */ | |
1370 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_INIT_FRAME_PC_P) | |
1371 | #define DEPRECATED_INIT_FRAME_PC_P() (0) | |
1372 | #endif | |
1373 | ||
1374 | extern int gdbarch_deprecated_init_frame_pc_p (struct gdbarch *gdbarch); | |
1375 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_FRAME_PC_P) | |
1376 | #error "Non multi-arch definition of DEPRECATED_INIT_FRAME_PC" | |
1377 | #endif | |
1378 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_INIT_FRAME_PC_P) | |
1379 | #define DEPRECATED_INIT_FRAME_PC_P() (gdbarch_deprecated_init_frame_pc_p (current_gdbarch)) | |
1380 | #endif | |
1381 | ||
10312cc4 | 1382 | /* Default (function) for non- multi-arch platforms. */ |
a5afb99f AC |
1383 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_INIT_FRAME_PC) |
1384 | #define DEPRECATED_INIT_FRAME_PC(fromleaf, prev) (internal_error (__FILE__, __LINE__, "DEPRECATED_INIT_FRAME_PC"), 0) | |
10312cc4 AC |
1385 | #endif |
1386 | ||
a5afb99f AC |
1387 | typedef CORE_ADDR (gdbarch_deprecated_init_frame_pc_ftype) (int fromleaf, struct frame_info *prev); |
1388 | extern CORE_ADDR gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev); | |
1389 | extern void set_gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, gdbarch_deprecated_init_frame_pc_ftype *deprecated_init_frame_pc); | |
1390 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_FRAME_PC) | |
1391 | #error "Non multi-arch definition of DEPRECATED_INIT_FRAME_PC" | |
83905903 | 1392 | #endif |
c25083af | 1393 | #if !defined (DEPRECATED_INIT_FRAME_PC) |
a5afb99f | 1394 | #define DEPRECATED_INIT_FRAME_PC(fromleaf, prev) (gdbarch_deprecated_init_frame_pc (current_gdbarch, fromleaf, prev)) |
10312cc4 | 1395 | #endif |
10312cc4 | 1396 | |
104c1213 JM |
1397 | extern int gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch); |
1398 | extern void set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch, int believe_pcc_promotion); | |
83905903 AC |
1399 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (BELIEVE_PCC_PROMOTION) |
1400 | #error "Non multi-arch definition of BELIEVE_PCC_PROMOTION" | |
1401 | #endif | |
c25083af | 1402 | #if !defined (BELIEVE_PCC_PROMOTION) |
0f71a2f6 JM |
1403 | #define BELIEVE_PCC_PROMOTION (gdbarch_believe_pcc_promotion (current_gdbarch)) |
1404 | #endif | |
0f71a2f6 | 1405 | |
104c1213 JM |
1406 | extern int gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch); |
1407 | extern void set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch, int believe_pcc_promotion_type); | |
83905903 AC |
1408 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (BELIEVE_PCC_PROMOTION_TYPE) |
1409 | #error "Non multi-arch definition of BELIEVE_PCC_PROMOTION_TYPE" | |
1410 | #endif | |
e669114a | 1411 | #if !defined (BELIEVE_PCC_PROMOTION_TYPE) |
0f71a2f6 JM |
1412 | #define BELIEVE_PCC_PROMOTION_TYPE (gdbarch_believe_pcc_promotion_type (current_gdbarch)) |
1413 | #endif | |
0f71a2f6 | 1414 | |
129c1cd6 AC |
1415 | #if defined (DEPRECATED_GET_SAVED_REGISTER) |
1416 | /* Legacy for systems yet to multi-arch DEPRECATED_GET_SAVED_REGISTER */ | |
1417 | #if !defined (DEPRECATED_GET_SAVED_REGISTER_P) | |
1418 | #define DEPRECATED_GET_SAVED_REGISTER_P() (1) | |
a216a322 AC |
1419 | #endif |
1420 | #endif | |
1421 | ||
1422 | /* Default predicate for non- multi-arch targets. */ | |
129c1cd6 AC |
1423 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_GET_SAVED_REGISTER_P) |
1424 | #define DEPRECATED_GET_SAVED_REGISTER_P() (0) | |
a216a322 AC |
1425 | #endif |
1426 | ||
129c1cd6 AC |
1427 | extern int gdbarch_deprecated_get_saved_register_p (struct gdbarch *gdbarch); |
1428 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_GET_SAVED_REGISTER_P) | |
1429 | #error "Non multi-arch definition of DEPRECATED_GET_SAVED_REGISTER" | |
a216a322 | 1430 | #endif |
129c1cd6 AC |
1431 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_GET_SAVED_REGISTER_P) |
1432 | #define DEPRECATED_GET_SAVED_REGISTER_P() (gdbarch_deprecated_get_saved_register_p (current_gdbarch)) | |
a216a322 AC |
1433 | #endif |
1434 | ||
e4b415d9 | 1435 | /* Default (function) for non- multi-arch platforms. */ |
129c1cd6 AC |
1436 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_GET_SAVED_REGISTER) |
1437 | #define DEPRECATED_GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) (internal_error (__FILE__, __LINE__, "DEPRECATED_GET_SAVED_REGISTER"), 0) | |
e4b415d9 | 1438 | #endif |
028c194b | 1439 | |
129c1cd6 AC |
1440 | 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); |
1441 | 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); | |
1442 | extern void set_gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch, gdbarch_deprecated_get_saved_register_ftype *deprecated_get_saved_register); | |
1443 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_GET_SAVED_REGISTER) | |
1444 | #error "Non multi-arch definition of DEPRECATED_GET_SAVED_REGISTER" | |
83905903 | 1445 | #endif |
c25083af | 1446 | #if !defined (DEPRECATED_GET_SAVED_REGISTER) |
129c1cd6 | 1447 | #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 | 1448 | #endif |
0f71a2f6 | 1449 | |
781a750d AC |
1450 | /* For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al. |
1451 | For raw <-> cooked register conversions, replaced by pseudo registers. */ | |
1452 | ||
33489c5b | 1453 | /* Default (function) for non- multi-arch platforms. */ |
781a750d AC |
1454 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_REGISTER_CONVERTIBLE) |
1455 | #define DEPRECATED_REGISTER_CONVERTIBLE(nr) (deprecated_register_convertible_not (nr)) | |
33489c5b AC |
1456 | #endif |
1457 | ||
781a750d AC |
1458 | typedef int (gdbarch_deprecated_register_convertible_ftype) (int nr); |
1459 | extern int gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch, int nr); | |
1460 | extern void set_gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch, gdbarch_deprecated_register_convertible_ftype *deprecated_register_convertible); | |
1461 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_CONVERTIBLE) | |
1462 | #error "Non multi-arch definition of DEPRECATED_REGISTER_CONVERTIBLE" | |
83905903 | 1463 | #endif |
781a750d AC |
1464 | #if !defined (DEPRECATED_REGISTER_CONVERTIBLE) |
1465 | #define DEPRECATED_REGISTER_CONVERTIBLE(nr) (gdbarch_deprecated_register_convertible (current_gdbarch, nr)) | |
0f71a2f6 | 1466 | #endif |
33489c5b | 1467 | |
781a750d AC |
1468 | /* For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al. |
1469 | For raw <-> cooked register conversions, replaced by pseudo registers. */ | |
1470 | ||
33489c5b | 1471 | /* Default (function) for non- multi-arch platforms. */ |
781a750d AC |
1472 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL) |
1473 | #define DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to) (internal_error (__FILE__, __LINE__, "DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL"), 0) | |
33489c5b | 1474 | #endif |
0f71a2f6 | 1475 | |
781a750d AC |
1476 | typedef void (gdbarch_deprecated_register_convert_to_virtual_ftype) (int regnum, struct type *type, char *from, char *to); |
1477 | extern void gdbarch_deprecated_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to); | |
1478 | extern void set_gdbarch_deprecated_register_convert_to_virtual (struct gdbarch *gdbarch, gdbarch_deprecated_register_convert_to_virtual_ftype *deprecated_register_convert_to_virtual); | |
1479 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL) | |
1480 | #error "Non multi-arch definition of DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL" | |
83905903 | 1481 | #endif |
781a750d AC |
1482 | #if !defined (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL) |
1483 | #define DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to) (gdbarch_deprecated_register_convert_to_virtual (current_gdbarch, regnum, type, from, to)) | |
0f71a2f6 | 1484 | #endif |
33489c5b | 1485 | |
781a750d AC |
1486 | /* For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al. |
1487 | For raw <-> cooked register conversions, replaced by pseudo registers. */ | |
1488 | ||
33489c5b | 1489 | /* Default (function) for non- multi-arch platforms. */ |
781a750d AC |
1490 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_REGISTER_CONVERT_TO_RAW) |
1491 | #define DEPRECATED_REGISTER_CONVERT_TO_RAW(type, regnum, from, to) (internal_error (__FILE__, __LINE__, "DEPRECATED_REGISTER_CONVERT_TO_RAW"), 0) | |
33489c5b | 1492 | #endif |
0f71a2f6 | 1493 | |
781a750d AC |
1494 | typedef void (gdbarch_deprecated_register_convert_to_raw_ftype) (struct type *type, int regnum, const char *from, char *to); |
1495 | extern void gdbarch_deprecated_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, const char *from, char *to); | |
1496 | extern void set_gdbarch_deprecated_register_convert_to_raw (struct gdbarch *gdbarch, gdbarch_deprecated_register_convert_to_raw_ftype *deprecated_register_convert_to_raw); | |
1497 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_CONVERT_TO_RAW) | |
1498 | #error "Non multi-arch definition of DEPRECATED_REGISTER_CONVERT_TO_RAW" | |
83905903 | 1499 | #endif |
781a750d AC |
1500 | #if !defined (DEPRECATED_REGISTER_CONVERT_TO_RAW) |
1501 | #define DEPRECATED_REGISTER_CONVERT_TO_RAW(type, regnum, from, to) (gdbarch_deprecated_register_convert_to_raw (current_gdbarch, type, regnum, from, to)) | |
0f71a2f6 | 1502 | #endif |
33489c5b | 1503 | |
13d01224 AC |
1504 | /* Default (function) for non- multi-arch platforms. */ |
1505 | #if (!GDB_MULTI_ARCH) && !defined (CONVERT_REGISTER_P) | |
1506 | #define CONVERT_REGISTER_P(regnum) (legacy_convert_register_p (regnum)) | |
1507 | #endif | |
1508 | ||
1509 | typedef int (gdbarch_convert_register_p_ftype) (int regnum); | |
1510 | extern int gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum); | |
1511 | extern void set_gdbarch_convert_register_p (struct gdbarch *gdbarch, gdbarch_convert_register_p_ftype *convert_register_p); | |
1512 | #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (CONVERT_REGISTER_P) | |
1513 | #error "Non multi-arch definition of CONVERT_REGISTER_P" | |
1514 | #endif | |
c25083af | 1515 | #if !defined (CONVERT_REGISTER_P) |
13d01224 AC |
1516 | #define CONVERT_REGISTER_P(regnum) (gdbarch_convert_register_p (current_gdbarch, regnum)) |
1517 | #endif | |
13d01224 AC |
1518 | |
1519 | /* Default (function) for non- multi-arch platforms. */ | |
1520 | #if (!GDB_MULTI_ARCH) && !defined (REGISTER_TO_VALUE) | |
1521 | #define REGISTER_TO_VALUE(regnum, type, from, to) (legacy_register_to_value (regnum, type, from, to)) | |
1522 | #endif | |
1523 | ||
1524 | typedef void (gdbarch_register_to_value_ftype) (int regnum, struct type *type, char *from, char *to); | |
1525 | extern void gdbarch_register_to_value (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to); | |
1526 | extern void set_gdbarch_register_to_value (struct gdbarch *gdbarch, gdbarch_register_to_value_ftype *register_to_value); | |
1527 | #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_TO_VALUE) | |
1528 | #error "Non multi-arch definition of REGISTER_TO_VALUE" | |
1529 | #endif | |
c25083af | 1530 | #if !defined (REGISTER_TO_VALUE) |
13d01224 AC |
1531 | #define REGISTER_TO_VALUE(regnum, type, from, to) (gdbarch_register_to_value (current_gdbarch, regnum, type, from, to)) |
1532 | #endif | |
13d01224 AC |
1533 | |
1534 | /* Default (function) for non- multi-arch platforms. */ | |
1535 | #if (!GDB_MULTI_ARCH) && !defined (VALUE_TO_REGISTER) | |
1536 | #define VALUE_TO_REGISTER(type, regnum, from, to) (legacy_value_to_register (type, regnum, from, to)) | |
1537 | #endif | |
1538 | ||
1539 | typedef void (gdbarch_value_to_register_ftype) (struct type *type, int regnum, char *from, char *to); | |
1540 | extern void gdbarch_value_to_register (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to); | |
1541 | extern void set_gdbarch_value_to_register (struct gdbarch *gdbarch, gdbarch_value_to_register_ftype *value_to_register); | |
1542 | #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (VALUE_TO_REGISTER) | |
1543 | #error "Non multi-arch definition of VALUE_TO_REGISTER" | |
1544 | #endif | |
c25083af | 1545 | #if !defined (VALUE_TO_REGISTER) |
13d01224 AC |
1546 | #define VALUE_TO_REGISTER(type, regnum, from, to) (gdbarch_value_to_register (current_gdbarch, type, regnum, from, to)) |
1547 | #endif | |
13d01224 | 1548 | |
33489c5b | 1549 | /* Default (function) for non- multi-arch platforms. */ |
6166d547 | 1550 | #if (!GDB_MULTI_ARCH) && !defined (POINTER_TO_ADDRESS) |
ac2e2ef7 | 1551 | #define POINTER_TO_ADDRESS(type, buf) (unsigned_pointer_to_address (type, buf)) |
33489c5b | 1552 | #endif |
4478b372 | 1553 | |
66140c26 AC |
1554 | typedef CORE_ADDR (gdbarch_pointer_to_address_ftype) (struct type *type, const void *buf); |
1555 | extern CORE_ADDR gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const void *buf); | |
4478b372 | 1556 | extern void set_gdbarch_pointer_to_address (struct gdbarch *gdbarch, gdbarch_pointer_to_address_ftype *pointer_to_address); |
83905903 AC |
1557 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (POINTER_TO_ADDRESS) |
1558 | #error "Non multi-arch definition of POINTER_TO_ADDRESS" | |
1559 | #endif | |
c25083af | 1560 | #if !defined (POINTER_TO_ADDRESS) |
4478b372 JB |
1561 | #define POINTER_TO_ADDRESS(type, buf) (gdbarch_pointer_to_address (current_gdbarch, type, buf)) |
1562 | #endif | |
33489c5b AC |
1563 | |
1564 | /* Default (function) for non- multi-arch platforms. */ | |
6166d547 | 1565 | #if (!GDB_MULTI_ARCH) && !defined (ADDRESS_TO_POINTER) |
ac2e2ef7 | 1566 | #define ADDRESS_TO_POINTER(type, buf, addr) (unsigned_address_to_pointer (type, buf, addr)) |
33489c5b | 1567 | #endif |
4478b372 | 1568 | |
ac2e2ef7 AC |
1569 | typedef void (gdbarch_address_to_pointer_ftype) (struct type *type, void *buf, CORE_ADDR addr); |
1570 | extern void gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr); | |
4478b372 | 1571 | extern void set_gdbarch_address_to_pointer (struct gdbarch *gdbarch, gdbarch_address_to_pointer_ftype *address_to_pointer); |
83905903 AC |
1572 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDRESS_TO_POINTER) |
1573 | #error "Non multi-arch definition of ADDRESS_TO_POINTER" | |
1574 | #endif | |
c25083af | 1575 | #if !defined (ADDRESS_TO_POINTER) |
4478b372 JB |
1576 | #define ADDRESS_TO_POINTER(type, buf, addr) (gdbarch_address_to_pointer (current_gdbarch, type, buf, addr)) |
1577 | #endif | |
33489c5b | 1578 | |
fc0c74b1 AC |
1579 | #if defined (INTEGER_TO_ADDRESS) |
1580 | /* Legacy for systems yet to multi-arch INTEGER_TO_ADDRESS */ | |
1581 | #if !defined (INTEGER_TO_ADDRESS_P) | |
1582 | #define INTEGER_TO_ADDRESS_P() (1) | |
1583 | #endif | |
1584 | #endif | |
1585 | ||
1586 | /* Default predicate for non- multi-arch targets. */ | |
1587 | #if (!GDB_MULTI_ARCH) && !defined (INTEGER_TO_ADDRESS_P) | |
1588 | #define INTEGER_TO_ADDRESS_P() (0) | |
1589 | #endif | |
1590 | ||
1591 | extern int gdbarch_integer_to_address_p (struct gdbarch *gdbarch); | |
1592 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INTEGER_TO_ADDRESS_P) | |
1593 | #error "Non multi-arch definition of INTEGER_TO_ADDRESS" | |
1594 | #endif | |
1595 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (INTEGER_TO_ADDRESS_P) | |
1596 | #define INTEGER_TO_ADDRESS_P() (gdbarch_integer_to_address_p (current_gdbarch)) | |
1597 | #endif | |
1598 | ||
1599 | /* Default (function) for non- multi-arch platforms. */ | |
1600 | #if (!GDB_MULTI_ARCH) && !defined (INTEGER_TO_ADDRESS) | |
73d3c16e | 1601 | #define INTEGER_TO_ADDRESS(type, buf) (internal_error (__FILE__, __LINE__, "INTEGER_TO_ADDRESS"), 0) |
fc0c74b1 AC |
1602 | #endif |
1603 | ||
1604 | typedef CORE_ADDR (gdbarch_integer_to_address_ftype) (struct type *type, void *buf); | |
1605 | extern CORE_ADDR gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf); | |
1606 | extern void set_gdbarch_integer_to_address (struct gdbarch *gdbarch, gdbarch_integer_to_address_ftype *integer_to_address); | |
1607 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INTEGER_TO_ADDRESS) | |
1608 | #error "Non multi-arch definition of INTEGER_TO_ADDRESS" | |
1609 | #endif | |
c25083af | 1610 | #if !defined (INTEGER_TO_ADDRESS) |
fc0c74b1 AC |
1611 | #define INTEGER_TO_ADDRESS(type, buf) (gdbarch_integer_to_address (current_gdbarch, type, buf)) |
1612 | #endif | |
fc0c74b1 | 1613 | |
33489c5b | 1614 | /* Default (function) for non- multi-arch platforms. */ |
6166d547 | 1615 | #if (!GDB_MULTI_ARCH) && !defined (RETURN_VALUE_ON_STACK) |
33489c5b AC |
1616 | #define RETURN_VALUE_ON_STACK(type) (generic_return_value_on_stack_not (type)) |
1617 | #endif | |
0f71a2f6 | 1618 | |
71a9f22e JB |
1619 | typedef int (gdbarch_return_value_on_stack_ftype) (struct type *type); |
1620 | extern int gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type); | |
1621 | extern void set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch, gdbarch_return_value_on_stack_ftype *return_value_on_stack); | |
83905903 AC |
1622 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (RETURN_VALUE_ON_STACK) |
1623 | #error "Non multi-arch definition of RETURN_VALUE_ON_STACK" | |
1624 | #endif | |
c25083af | 1625 | #if !defined (RETURN_VALUE_ON_STACK) |
71a9f22e JB |
1626 | #define RETURN_VALUE_ON_STACK(type) (gdbarch_return_value_on_stack (current_gdbarch, type)) |
1627 | #endif | |
1628 | ||
b81774d8 AC |
1629 | /* Replaced by PUSH_DUMMY_CALL */ |
1630 | ||
1631 | #if defined (DEPRECATED_PUSH_ARGUMENTS) | |
1632 | /* Legacy for systems yet to multi-arch DEPRECATED_PUSH_ARGUMENTS */ | |
1633 | #if !defined (DEPRECATED_PUSH_ARGUMENTS_P) | |
1634 | #define DEPRECATED_PUSH_ARGUMENTS_P() (1) | |
1635 | #endif | |
1636 | #endif | |
1637 | ||
1638 | /* Default predicate for non- multi-arch targets. */ | |
1639 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_ARGUMENTS_P) | |
1640 | #define DEPRECATED_PUSH_ARGUMENTS_P() (0) | |
1641 | #endif | |
1642 | ||
1643 | extern int gdbarch_deprecated_push_arguments_p (struct gdbarch *gdbarch); | |
1644 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_ARGUMENTS_P) | |
1645 | #error "Non multi-arch definition of DEPRECATED_PUSH_ARGUMENTS" | |
1646 | #endif | |
1647 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PUSH_ARGUMENTS_P) | |
1648 | #define DEPRECATED_PUSH_ARGUMENTS_P() (gdbarch_deprecated_push_arguments_p (current_gdbarch)) | |
1649 | #endif | |
1650 | ||
c203844d | 1651 | /* Default (function) for non- multi-arch platforms. */ |
b81774d8 AC |
1652 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_ARGUMENTS) |
1653 | #define DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) (internal_error (__FILE__, __LINE__, "DEPRECATED_PUSH_ARGUMENTS"), 0) | |
c203844d AC |
1654 | #endif |
1655 | ||
b81774d8 AC |
1656 | typedef CORE_ADDR (gdbarch_deprecated_push_arguments_ftype) (int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr); |
1657 | 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); | |
1658 | extern void set_gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, gdbarch_deprecated_push_arguments_ftype *deprecated_push_arguments); | |
1659 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_ARGUMENTS) | |
1660 | #error "Non multi-arch definition of DEPRECATED_PUSH_ARGUMENTS" | |
83905903 | 1661 | #endif |
c25083af | 1662 | #if !defined (DEPRECATED_PUSH_ARGUMENTS) |
b81774d8 | 1663 | #define DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) (gdbarch_deprecated_push_arguments (current_gdbarch, nargs, args, sp, struct_return, struct_addr)) |
0f71a2f6 | 1664 | #endif |
0f71a2f6 | 1665 | |
b81774d8 AC |
1666 | extern int gdbarch_push_dummy_call_p (struct gdbarch *gdbarch); |
1667 | ||
6a65450a AC |
1668 | 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); |
1669 | 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); | |
b81774d8 AC |
1670 | extern void set_gdbarch_push_dummy_call (struct gdbarch *gdbarch, gdbarch_push_dummy_call_ftype *push_dummy_call); |
1671 | ||
f3824013 AC |
1672 | #if defined (DEPRECATED_PUSH_DUMMY_FRAME) |
1673 | /* Legacy for systems yet to multi-arch DEPRECATED_PUSH_DUMMY_FRAME */ | |
1674 | #if !defined (DEPRECATED_PUSH_DUMMY_FRAME_P) | |
1675 | #define DEPRECATED_PUSH_DUMMY_FRAME_P() (1) | |
1676 | #endif | |
1677 | #endif | |
1678 | ||
1679 | /* Default predicate for non- multi-arch targets. */ | |
1680 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_DUMMY_FRAME_P) | |
1681 | #define DEPRECATED_PUSH_DUMMY_FRAME_P() (0) | |
1682 | #endif | |
1683 | ||
1684 | extern int gdbarch_deprecated_push_dummy_frame_p (struct gdbarch *gdbarch); | |
1685 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_DUMMY_FRAME_P) | |
1686 | #error "Non multi-arch definition of DEPRECATED_PUSH_DUMMY_FRAME" | |
1687 | #endif | |
1688 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PUSH_DUMMY_FRAME_P) | |
1689 | #define DEPRECATED_PUSH_DUMMY_FRAME_P() (gdbarch_deprecated_push_dummy_frame_p (current_gdbarch)) | |
1690 | #endif | |
1691 | ||
1692 | /* Default (function) for non- multi-arch platforms. */ | |
1693 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_DUMMY_FRAME) | |
1694 | #define DEPRECATED_PUSH_DUMMY_FRAME (internal_error (__FILE__, __LINE__, "DEPRECATED_PUSH_DUMMY_FRAME"), 0) | |
f3824013 AC |
1695 | #endif |
1696 | ||
1697 | typedef void (gdbarch_deprecated_push_dummy_frame_ftype) (void); | |
1698 | extern void gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch); | |
1699 | extern void set_gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch, gdbarch_deprecated_push_dummy_frame_ftype *deprecated_push_dummy_frame); | |
1700 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_DUMMY_FRAME) | |
1701 | #error "Non multi-arch definition of DEPRECATED_PUSH_DUMMY_FRAME" | |
83905903 | 1702 | #endif |
c25083af | 1703 | #if !defined (DEPRECATED_PUSH_DUMMY_FRAME) |
f3824013 | 1704 | #define DEPRECATED_PUSH_DUMMY_FRAME (gdbarch_deprecated_push_dummy_frame (current_gdbarch)) |
0f71a2f6 | 1705 | #endif |
0f71a2f6 | 1706 | |
28f617b3 AC |
1707 | /* NOTE: This can be handled directly in push_dummy_call. */ |
1708 | ||
1709 | #if defined (DEPRECATED_PUSH_RETURN_ADDRESS) | |
1710 | /* Legacy for systems yet to multi-arch DEPRECATED_PUSH_RETURN_ADDRESS */ | |
1711 | #if !defined (DEPRECATED_PUSH_RETURN_ADDRESS_P) | |
1712 | #define DEPRECATED_PUSH_RETURN_ADDRESS_P() (1) | |
69a0d5f4 AC |
1713 | #endif |
1714 | #endif | |
1715 | ||
1716 | /* Default predicate for non- multi-arch targets. */ | |
28f617b3 AC |
1717 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_RETURN_ADDRESS_P) |
1718 | #define DEPRECATED_PUSH_RETURN_ADDRESS_P() (0) | |
69a0d5f4 AC |
1719 | #endif |
1720 | ||
28f617b3 AC |
1721 | extern int gdbarch_deprecated_push_return_address_p (struct gdbarch *gdbarch); |
1722 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_RETURN_ADDRESS_P) | |
1723 | #error "Non multi-arch definition of DEPRECATED_PUSH_RETURN_ADDRESS" | |
69a0d5f4 | 1724 | #endif |
28f617b3 AC |
1725 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PUSH_RETURN_ADDRESS_P) |
1726 | #define DEPRECATED_PUSH_RETURN_ADDRESS_P() (gdbarch_deprecated_push_return_address_p (current_gdbarch)) | |
69a0d5f4 AC |
1727 | #endif |
1728 | ||
1729 | /* Default (function) for non- multi-arch platforms. */ | |
28f617b3 AC |
1730 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_RETURN_ADDRESS) |
1731 | #define DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp) (internal_error (__FILE__, __LINE__, "DEPRECATED_PUSH_RETURN_ADDRESS"), 0) | |
69a0d5f4 AC |
1732 | #endif |
1733 | ||
28f617b3 AC |
1734 | typedef CORE_ADDR (gdbarch_deprecated_push_return_address_ftype) (CORE_ADDR pc, CORE_ADDR sp); |
1735 | extern CORE_ADDR gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp); | |
1736 | extern void set_gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, gdbarch_deprecated_push_return_address_ftype *deprecated_push_return_address); | |
1737 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_RETURN_ADDRESS) | |
1738 | #error "Non multi-arch definition of DEPRECATED_PUSH_RETURN_ADDRESS" | |
83905903 | 1739 | #endif |
c25083af | 1740 | #if !defined (DEPRECATED_PUSH_RETURN_ADDRESS) |
28f617b3 | 1741 | #define DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp) (gdbarch_deprecated_push_return_address (current_gdbarch, pc, sp)) |
0f71a2f6 | 1742 | #endif |
0f71a2f6 | 1743 | |
749b82f6 AC |
1744 | #if defined (DEPRECATED_POP_FRAME) |
1745 | /* Legacy for systems yet to multi-arch DEPRECATED_POP_FRAME */ | |
1746 | #if !defined (DEPRECATED_POP_FRAME_P) | |
1747 | #define DEPRECATED_POP_FRAME_P() (1) | |
dedc2a2b AC |
1748 | #endif |
1749 | #endif | |
1750 | ||
1751 | /* Default predicate for non- multi-arch targets. */ | |
749b82f6 AC |
1752 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_POP_FRAME_P) |
1753 | #define DEPRECATED_POP_FRAME_P() (0) | |
dedc2a2b AC |
1754 | #endif |
1755 | ||
749b82f6 AC |
1756 | extern int gdbarch_deprecated_pop_frame_p (struct gdbarch *gdbarch); |
1757 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_POP_FRAME_P) | |
1758 | #error "Non multi-arch definition of DEPRECATED_POP_FRAME" | |
dedc2a2b | 1759 | #endif |
749b82f6 AC |
1760 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_POP_FRAME_P) |
1761 | #define DEPRECATED_POP_FRAME_P() (gdbarch_deprecated_pop_frame_p (current_gdbarch)) | |
dedc2a2b AC |
1762 | #endif |
1763 | ||
1764 | /* Default (function) for non- multi-arch platforms. */ | |
749b82f6 AC |
1765 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_POP_FRAME) |
1766 | #define DEPRECATED_POP_FRAME (internal_error (__FILE__, __LINE__, "DEPRECATED_POP_FRAME"), 0) | |
dedc2a2b AC |
1767 | #endif |
1768 | ||
749b82f6 AC |
1769 | typedef void (gdbarch_deprecated_pop_frame_ftype) (void); |
1770 | extern void gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch); | |
1771 | extern void set_gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch, gdbarch_deprecated_pop_frame_ftype *deprecated_pop_frame); | |
1772 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_POP_FRAME) | |
1773 | #error "Non multi-arch definition of DEPRECATED_POP_FRAME" | |
83905903 | 1774 | #endif |
c25083af | 1775 | #if !defined (DEPRECATED_POP_FRAME) |
749b82f6 | 1776 | #define DEPRECATED_POP_FRAME (gdbarch_deprecated_pop_frame (current_gdbarch)) |
0f71a2f6 | 1777 | #endif |
0f71a2f6 | 1778 | |
4183d812 AC |
1779 | /* NOTE: cagney/2003-03-24: Replaced by PUSH_ARGUMENTS. */ |
1780 | ||
1781 | #if defined (DEPRECATED_STORE_STRUCT_RETURN) | |
1782 | /* Legacy for systems yet to multi-arch DEPRECATED_STORE_STRUCT_RETURN */ | |
1783 | #if !defined (DEPRECATED_STORE_STRUCT_RETURN_P) | |
1784 | #define DEPRECATED_STORE_STRUCT_RETURN_P() (1) | |
1785 | #endif | |
1786 | #endif | |
1787 | ||
1788 | /* Default predicate for non- multi-arch targets. */ | |
1789 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_STORE_STRUCT_RETURN_P) | |
1790 | #define DEPRECATED_STORE_STRUCT_RETURN_P() (0) | |
1791 | #endif | |
1792 | ||
1793 | extern int gdbarch_deprecated_store_struct_return_p (struct gdbarch *gdbarch); | |
1794 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_STORE_STRUCT_RETURN_P) | |
1795 | #error "Non multi-arch definition of DEPRECATED_STORE_STRUCT_RETURN" | |
1796 | #endif | |
1797 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_STORE_STRUCT_RETURN_P) | |
1798 | #define DEPRECATED_STORE_STRUCT_RETURN_P() (gdbarch_deprecated_store_struct_return_p (current_gdbarch)) | |
1799 | #endif | |
1800 | ||
1801 | /* Default (function) for non- multi-arch platforms. */ | |
1802 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_STORE_STRUCT_RETURN) | |
1803 | #define DEPRECATED_STORE_STRUCT_RETURN(addr, sp) (internal_error (__FILE__, __LINE__, "DEPRECATED_STORE_STRUCT_RETURN"), 0) | |
1804 | #endif | |
1805 | ||
1806 | typedef void (gdbarch_deprecated_store_struct_return_ftype) (CORE_ADDR addr, CORE_ADDR sp); | |
1807 | extern void gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp); | |
1808 | extern void set_gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, gdbarch_deprecated_store_struct_return_ftype *deprecated_store_struct_return); | |
1809 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_STORE_STRUCT_RETURN) | |
1810 | #error "Non multi-arch definition of DEPRECATED_STORE_STRUCT_RETURN" | |
83905903 | 1811 | #endif |
c25083af | 1812 | #if !defined (DEPRECATED_STORE_STRUCT_RETURN) |
4183d812 | 1813 | #define DEPRECATED_STORE_STRUCT_RETURN(addr, sp) (gdbarch_deprecated_store_struct_return (current_gdbarch, addr, sp)) |
0f71a2f6 | 1814 | #endif |
0f71a2f6 | 1815 | |
ebba8386 AC |
1816 | /* Default (function) for non- multi-arch platforms. */ |
1817 | #if (!GDB_MULTI_ARCH) && !defined (EXTRACT_RETURN_VALUE) | |
1818 | #define EXTRACT_RETURN_VALUE(type, regcache, valbuf) (legacy_extract_return_value (type, regcache, valbuf)) | |
1819 | #endif | |
1820 | ||
1821 | typedef void (gdbarch_extract_return_value_ftype) (struct type *type, struct regcache *regcache, void *valbuf); | |
1822 | extern void gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf); | |
1823 | extern void set_gdbarch_extract_return_value (struct gdbarch *gdbarch, gdbarch_extract_return_value_ftype *extract_return_value); | |
1824 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_RETURN_VALUE) | |
1825 | #error "Non multi-arch definition of EXTRACT_RETURN_VALUE" | |
1826 | #endif | |
c25083af | 1827 | #if !defined (EXTRACT_RETURN_VALUE) |
ebba8386 AC |
1828 | #define EXTRACT_RETURN_VALUE(type, regcache, valbuf) (gdbarch_extract_return_value (current_gdbarch, type, regcache, valbuf)) |
1829 | #endif | |
ebba8386 AC |
1830 | |
1831 | /* Default (function) for non- multi-arch platforms. */ | |
1832 | #if (!GDB_MULTI_ARCH) && !defined (STORE_RETURN_VALUE) | |
1833 | #define STORE_RETURN_VALUE(type, regcache, valbuf) (legacy_store_return_value (type, regcache, valbuf)) | |
1834 | #endif | |
1835 | ||
1836 | typedef void (gdbarch_store_return_value_ftype) (struct type *type, struct regcache *regcache, const void *valbuf); | |
1837 | extern void gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const void *valbuf); | |
104c1213 | 1838 | extern void set_gdbarch_store_return_value (struct gdbarch *gdbarch, gdbarch_store_return_value_ftype *store_return_value); |
83905903 AC |
1839 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STORE_RETURN_VALUE) |
1840 | #error "Non multi-arch definition of STORE_RETURN_VALUE" | |
1841 | #endif | |
c25083af | 1842 | #if !defined (STORE_RETURN_VALUE) |
ebba8386 AC |
1843 | #define STORE_RETURN_VALUE(type, regcache, valbuf) (gdbarch_store_return_value (current_gdbarch, type, regcache, valbuf)) |
1844 | #endif | |
ebba8386 AC |
1845 | |
1846 | typedef void (gdbarch_deprecated_extract_return_value_ftype) (struct type *type, char *regbuf, char *valbuf); | |
1847 | extern void gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf); | |
1848 | extern void set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value); | |
1849 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRACT_RETURN_VALUE) | |
1850 | #error "Non multi-arch definition of DEPRECATED_EXTRACT_RETURN_VALUE" | |
1851 | #endif | |
c25083af | 1852 | #if !defined (DEPRECATED_EXTRACT_RETURN_VALUE) |
ebba8386 AC |
1853 | #define DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf) (gdbarch_deprecated_extract_return_value (current_gdbarch, type, regbuf, valbuf)) |
1854 | #endif | |
ebba8386 AC |
1855 | |
1856 | typedef void (gdbarch_deprecated_store_return_value_ftype) (struct type *type, char *valbuf); | |
1857 | extern void gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf); | |
1858 | extern void set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, gdbarch_deprecated_store_return_value_ftype *deprecated_store_return_value); | |
1859 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_STORE_RETURN_VALUE) | |
1860 | #error "Non multi-arch definition of DEPRECATED_STORE_RETURN_VALUE" | |
1861 | #endif | |
c25083af | 1862 | #if !defined (DEPRECATED_STORE_RETURN_VALUE) |
ebba8386 | 1863 | #define DEPRECATED_STORE_RETURN_VALUE(type, valbuf) (gdbarch_deprecated_store_return_value (current_gdbarch, type, valbuf)) |
0f71a2f6 | 1864 | #endif |
0f71a2f6 | 1865 | |
049ee0e4 AC |
1866 | #if defined (EXTRACT_STRUCT_VALUE_ADDRESS) |
1867 | /* Legacy for systems yet to multi-arch EXTRACT_STRUCT_VALUE_ADDRESS */ | |
1868 | #if !defined (EXTRACT_STRUCT_VALUE_ADDRESS_P) | |
1869 | #define EXTRACT_STRUCT_VALUE_ADDRESS_P() (1) | |
1870 | #endif | |
1871 | #endif | |
1872 | ||
1873 | /* Default predicate for non- multi-arch targets. */ | |
1874 | #if (!GDB_MULTI_ARCH) && !defined (EXTRACT_STRUCT_VALUE_ADDRESS_P) | |
1875 | #define EXTRACT_STRUCT_VALUE_ADDRESS_P() (0) | |
1876 | #endif | |
1877 | ||
1878 | extern int gdbarch_extract_struct_value_address_p (struct gdbarch *gdbarch); | |
1879 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_STRUCT_VALUE_ADDRESS_P) | |
1880 | #error "Non multi-arch definition of EXTRACT_STRUCT_VALUE_ADDRESS" | |
1881 | #endif | |
1882 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (EXTRACT_STRUCT_VALUE_ADDRESS_P) | |
1883 | #define EXTRACT_STRUCT_VALUE_ADDRESS_P() (gdbarch_extract_struct_value_address_p (current_gdbarch)) | |
1884 | #endif | |
1885 | ||
1886 | /* Default (function) for non- multi-arch platforms. */ | |
1887 | #if (!GDB_MULTI_ARCH) && !defined (EXTRACT_STRUCT_VALUE_ADDRESS) | |
1888 | #define EXTRACT_STRUCT_VALUE_ADDRESS(regcache) (internal_error (__FILE__, __LINE__, "EXTRACT_STRUCT_VALUE_ADDRESS"), 0) | |
1889 | #endif | |
1890 | ||
1891 | typedef CORE_ADDR (gdbarch_extract_struct_value_address_ftype) (struct regcache *regcache); | |
1892 | extern CORE_ADDR gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache); | |
1893 | extern void set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, gdbarch_extract_struct_value_address_ftype *extract_struct_value_address); | |
1894 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_STRUCT_VALUE_ADDRESS) | |
1895 | #error "Non multi-arch definition of EXTRACT_STRUCT_VALUE_ADDRESS" | |
1896 | #endif | |
c25083af | 1897 | #if !defined (EXTRACT_STRUCT_VALUE_ADDRESS) |
049ee0e4 AC |
1898 | #define EXTRACT_STRUCT_VALUE_ADDRESS(regcache) (gdbarch_extract_struct_value_address (current_gdbarch, regcache)) |
1899 | #endif | |
049ee0e4 | 1900 | |
26e9b323 AC |
1901 | #if defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS) |
1902 | /* Legacy for systems yet to multi-arch DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS */ | |
1903 | #if !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P) | |
1904 | #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() (1) | |
d6dd581e AC |
1905 | #endif |
1906 | #endif | |
1907 | ||
1908 | /* Default predicate for non- multi-arch targets. */ | |
26e9b323 AC |
1909 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P) |
1910 | #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() (0) | |
d6dd581e AC |
1911 | #endif |
1912 | ||
26e9b323 AC |
1913 | extern int gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch); |
1914 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P) | |
1915 | #error "Non multi-arch definition of DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS" | |
83905903 | 1916 | #endif |
26e9b323 AC |
1917 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P) |
1918 | #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() (gdbarch_deprecated_extract_struct_value_address_p (current_gdbarch)) | |
d6dd581e AC |
1919 | #endif |
1920 | ||
1921 | /* Default (function) for non- multi-arch platforms. */ | |
26e9b323 AC |
1922 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS) |
1923 | #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf) (internal_error (__FILE__, __LINE__, "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS"), 0) | |
d6dd581e AC |
1924 | #endif |
1925 | ||
26e9b323 AC |
1926 | typedef CORE_ADDR (gdbarch_deprecated_extract_struct_value_address_ftype) (char *regbuf); |
1927 | extern CORE_ADDR gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf); | |
1928 | extern void set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address); | |
1929 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS) | |
1930 | #error "Non multi-arch definition of DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS" | |
83905903 | 1931 | #endif |
c25083af | 1932 | #if !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS) |
26e9b323 | 1933 | #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf) (gdbarch_deprecated_extract_struct_value_address (current_gdbarch, regbuf)) |
0f71a2f6 | 1934 | #endif |
0f71a2f6 | 1935 | |
56f12751 AC |
1936 | /* Default (function) for non- multi-arch platforms. */ |
1937 | #if (!GDB_MULTI_ARCH) && !defined (USE_STRUCT_CONVENTION) | |
1938 | #define USE_STRUCT_CONVENTION(gcc_p, value_type) (generic_use_struct_convention (gcc_p, value_type)) | |
1939 | #endif | |
1940 | ||
104c1213 JM |
1941 | typedef int (gdbarch_use_struct_convention_ftype) (int gcc_p, struct type *value_type); |
1942 | extern int gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type); | |
1943 | extern void set_gdbarch_use_struct_convention (struct gdbarch *gdbarch, gdbarch_use_struct_convention_ftype *use_struct_convention); | |
83905903 AC |
1944 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (USE_STRUCT_CONVENTION) |
1945 | #error "Non multi-arch definition of USE_STRUCT_CONVENTION" | |
1946 | #endif | |
c25083af | 1947 | #if !defined (USE_STRUCT_CONVENTION) |
0f71a2f6 JM |
1948 | #define USE_STRUCT_CONVENTION(gcc_p, value_type) (gdbarch_use_struct_convention (current_gdbarch, gcc_p, value_type)) |
1949 | #endif | |
0f71a2f6 | 1950 | |
f30ee0bc AC |
1951 | #if defined (DEPRECATED_FRAME_INIT_SAVED_REGS) |
1952 | /* Legacy for systems yet to multi-arch DEPRECATED_FRAME_INIT_SAVED_REGS */ | |
1953 | #if !defined (DEPRECATED_FRAME_INIT_SAVED_REGS_P) | |
1954 | #define DEPRECATED_FRAME_INIT_SAVED_REGS_P() (1) | |
8f871025 AC |
1955 | #endif |
1956 | #endif | |
1957 | ||
1958 | /* Default predicate for non- multi-arch targets. */ | |
f30ee0bc AC |
1959 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_INIT_SAVED_REGS_P) |
1960 | #define DEPRECATED_FRAME_INIT_SAVED_REGS_P() (0) | |
8f871025 AC |
1961 | #endif |
1962 | ||
f30ee0bc AC |
1963 | extern int gdbarch_deprecated_frame_init_saved_regs_p (struct gdbarch *gdbarch); |
1964 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_INIT_SAVED_REGS_P) | |
1965 | #error "Non multi-arch definition of DEPRECATED_FRAME_INIT_SAVED_REGS" | |
8f871025 | 1966 | #endif |
f30ee0bc AC |
1967 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_INIT_SAVED_REGS_P) |
1968 | #define DEPRECATED_FRAME_INIT_SAVED_REGS_P() (gdbarch_deprecated_frame_init_saved_regs_p (current_gdbarch)) | |
8f871025 AC |
1969 | #endif |
1970 | ||
1971 | /* Default (function) for non- multi-arch platforms. */ | |
f30ee0bc AC |
1972 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_INIT_SAVED_REGS) |
1973 | #define DEPRECATED_FRAME_INIT_SAVED_REGS(frame) (internal_error (__FILE__, __LINE__, "DEPRECATED_FRAME_INIT_SAVED_REGS"), 0) | |
8f871025 AC |
1974 | #endif |
1975 | ||
f30ee0bc AC |
1976 | typedef void (gdbarch_deprecated_frame_init_saved_regs_ftype) (struct frame_info *frame); |
1977 | extern void gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame); | |
1978 | extern void set_gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch, gdbarch_deprecated_frame_init_saved_regs_ftype *deprecated_frame_init_saved_regs); | |
1979 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_INIT_SAVED_REGS) | |
1980 | #error "Non multi-arch definition of DEPRECATED_FRAME_INIT_SAVED_REGS" | |
83905903 | 1981 | #endif |
c25083af | 1982 | #if !defined (DEPRECATED_FRAME_INIT_SAVED_REGS) |
f30ee0bc | 1983 | #define DEPRECATED_FRAME_INIT_SAVED_REGS(frame) (gdbarch_deprecated_frame_init_saved_regs (current_gdbarch, frame)) |
0f71a2f6 | 1984 | #endif |
0f71a2f6 | 1985 | |
e9582e71 AC |
1986 | #if defined (DEPRECATED_INIT_EXTRA_FRAME_INFO) |
1987 | /* Legacy for systems yet to multi-arch DEPRECATED_INIT_EXTRA_FRAME_INFO */ | |
1988 | #if !defined (DEPRECATED_INIT_EXTRA_FRAME_INFO_P) | |
1989 | #define DEPRECATED_INIT_EXTRA_FRAME_INFO_P() (1) | |
5fdff426 AC |
1990 | #endif |
1991 | #endif | |
1992 | ||
1993 | /* Default predicate for non- multi-arch targets. */ | |
e9582e71 AC |
1994 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_INIT_EXTRA_FRAME_INFO_P) |
1995 | #define DEPRECATED_INIT_EXTRA_FRAME_INFO_P() (0) | |
5fdff426 AC |
1996 | #endif |
1997 | ||
e9582e71 AC |
1998 | extern int gdbarch_deprecated_init_extra_frame_info_p (struct gdbarch *gdbarch); |
1999 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_EXTRA_FRAME_INFO_P) | |
2000 | #error "Non multi-arch definition of DEPRECATED_INIT_EXTRA_FRAME_INFO" | |
5fdff426 | 2001 | #endif |
e9582e71 AC |
2002 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_INIT_EXTRA_FRAME_INFO_P) |
2003 | #define DEPRECATED_INIT_EXTRA_FRAME_INFO_P() (gdbarch_deprecated_init_extra_frame_info_p (current_gdbarch)) | |
5fdff426 AC |
2004 | #endif |
2005 | ||
2006 | /* Default (function) for non- multi-arch platforms. */ | |
e9582e71 AC |
2007 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_INIT_EXTRA_FRAME_INFO) |
2008 | #define DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame) (internal_error (__FILE__, __LINE__, "DEPRECATED_INIT_EXTRA_FRAME_INFO"), 0) | |
5fdff426 AC |
2009 | #endif |
2010 | ||
e9582e71 AC |
2011 | typedef void (gdbarch_deprecated_init_extra_frame_info_ftype) (int fromleaf, struct frame_info *frame); |
2012 | extern void gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame); | |
2013 | extern void set_gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch, gdbarch_deprecated_init_extra_frame_info_ftype *deprecated_init_extra_frame_info); | |
2014 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_EXTRA_FRAME_INFO) | |
2015 | #error "Non multi-arch definition of DEPRECATED_INIT_EXTRA_FRAME_INFO" | |
83905903 | 2016 | #endif |
c25083af | 2017 | #if !defined (DEPRECATED_INIT_EXTRA_FRAME_INFO) |
e9582e71 | 2018 | #define DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame) (gdbarch_deprecated_init_extra_frame_info (current_gdbarch, fromleaf, frame)) |
0f71a2f6 | 2019 | #endif |
0f71a2f6 | 2020 | |
104c1213 JM |
2021 | typedef CORE_ADDR (gdbarch_skip_prologue_ftype) (CORE_ADDR ip); |
2022 | extern CORE_ADDR gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip); | |
2023 | extern void set_gdbarch_skip_prologue (struct gdbarch *gdbarch, gdbarch_skip_prologue_ftype *skip_prologue); | |
83905903 AC |
2024 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SKIP_PROLOGUE) |
2025 | #error "Non multi-arch definition of SKIP_PROLOGUE" | |
2026 | #endif | |
c25083af | 2027 | #if !defined (SKIP_PROLOGUE) |
0f71a2f6 JM |
2028 | #define SKIP_PROLOGUE(ip) (gdbarch_skip_prologue (current_gdbarch, ip)) |
2029 | #endif | |
0f71a2f6 | 2030 | |
33489c5b | 2031 | /* Default (function) for non- multi-arch platforms. */ |
6166d547 | 2032 | #if (!GDB_MULTI_ARCH) && !defined (PROLOGUE_FRAMELESS_P) |
33489c5b AC |
2033 | #define PROLOGUE_FRAMELESS_P(ip) (generic_prologue_frameless_p (ip)) |
2034 | #endif | |
2035 | ||
dad41f9a AC |
2036 | typedef int (gdbarch_prologue_frameless_p_ftype) (CORE_ADDR ip); |
2037 | extern int gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, CORE_ADDR ip); | |
2038 | extern void set_gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, gdbarch_prologue_frameless_p_ftype *prologue_frameless_p); | |
83905903 AC |
2039 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PROLOGUE_FRAMELESS_P) |
2040 | #error "Non multi-arch definition of PROLOGUE_FRAMELESS_P" | |
2041 | #endif | |
c25083af | 2042 | #if !defined (PROLOGUE_FRAMELESS_P) |
dad41f9a AC |
2043 | #define PROLOGUE_FRAMELESS_P(ip) (gdbarch_prologue_frameless_p (current_gdbarch, ip)) |
2044 | #endif | |
2045 | ||
104c1213 JM |
2046 | typedef int (gdbarch_inner_than_ftype) (CORE_ADDR lhs, CORE_ADDR rhs); |
2047 | extern int gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs); | |
2048 | extern void set_gdbarch_inner_than (struct gdbarch *gdbarch, gdbarch_inner_than_ftype *inner_than); | |
83905903 AC |
2049 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INNER_THAN) |
2050 | #error "Non multi-arch definition of INNER_THAN" | |
2051 | #endif | |
c25083af | 2052 | #if !defined (INNER_THAN) |
0f71a2f6 JM |
2053 | #define INNER_THAN(lhs, rhs) (gdbarch_inner_than (current_gdbarch, lhs, rhs)) |
2054 | #endif | |
0f71a2f6 | 2055 | |
f4f9705a AC |
2056 | typedef const unsigned char * (gdbarch_breakpoint_from_pc_ftype) (CORE_ADDR *pcptr, int *lenptr); |
2057 | extern const unsigned char * gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr); | |
104c1213 | 2058 | extern void set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc); |
83905903 AC |
2059 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (BREAKPOINT_FROM_PC) |
2060 | #error "Non multi-arch definition of BREAKPOINT_FROM_PC" | |
2061 | #endif | |
c25083af | 2062 | #if !defined (BREAKPOINT_FROM_PC) |
0f71a2f6 JM |
2063 | #define BREAKPOINT_FROM_PC(pcptr, lenptr) (gdbarch_breakpoint_from_pc (current_gdbarch, pcptr, lenptr)) |
2064 | #endif | |
33489c5b AC |
2065 | |
2066 | /* Default (function) for non- multi-arch platforms. */ | |
6166d547 | 2067 | #if (!GDB_MULTI_ARCH) && !defined (MEMORY_INSERT_BREAKPOINT) |
33489c5b AC |
2068 | #define MEMORY_INSERT_BREAKPOINT(addr, contents_cache) (default_memory_insert_breakpoint (addr, contents_cache)) |
2069 | #endif | |
0f71a2f6 | 2070 | |
917317f4 JM |
2071 | typedef int (gdbarch_memory_insert_breakpoint_ftype) (CORE_ADDR addr, char *contents_cache); |
2072 | extern int gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache); | |
2073 | extern void set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint); | |
83905903 AC |
2074 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (MEMORY_INSERT_BREAKPOINT) |
2075 | #error "Non multi-arch definition of MEMORY_INSERT_BREAKPOINT" | |
2076 | #endif | |
c25083af | 2077 | #if !defined (MEMORY_INSERT_BREAKPOINT) |
917317f4 JM |
2078 | #define MEMORY_INSERT_BREAKPOINT(addr, contents_cache) (gdbarch_memory_insert_breakpoint (current_gdbarch, addr, contents_cache)) |
2079 | #endif | |
33489c5b AC |
2080 | |
2081 | /* Default (function) for non- multi-arch platforms. */ | |
6166d547 | 2082 | #if (!GDB_MULTI_ARCH) && !defined (MEMORY_REMOVE_BREAKPOINT) |
33489c5b AC |
2083 | #define MEMORY_REMOVE_BREAKPOINT(addr, contents_cache) (default_memory_remove_breakpoint (addr, contents_cache)) |
2084 | #endif | |
917317f4 JM |
2085 | |
2086 | typedef int (gdbarch_memory_remove_breakpoint_ftype) (CORE_ADDR addr, char *contents_cache); | |
2087 | extern int gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache); | |
2088 | extern void set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint); | |
83905903 AC |
2089 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (MEMORY_REMOVE_BREAKPOINT) |
2090 | #error "Non multi-arch definition of MEMORY_REMOVE_BREAKPOINT" | |
2091 | #endif | |
c25083af | 2092 | #if !defined (MEMORY_REMOVE_BREAKPOINT) |
917317f4 JM |
2093 | #define MEMORY_REMOVE_BREAKPOINT(addr, contents_cache) (gdbarch_memory_remove_breakpoint (current_gdbarch, addr, contents_cache)) |
2094 | #endif | |
917317f4 | 2095 | |
104c1213 JM |
2096 | extern CORE_ADDR gdbarch_decr_pc_after_break (struct gdbarch *gdbarch); |
2097 | extern void set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch, CORE_ADDR decr_pc_after_break); | |
83905903 AC |
2098 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DECR_PC_AFTER_BREAK) |
2099 | #error "Non multi-arch definition of DECR_PC_AFTER_BREAK" | |
2100 | #endif | |
c25083af | 2101 | #if !defined (DECR_PC_AFTER_BREAK) |
0f71a2f6 JM |
2102 | #define DECR_PC_AFTER_BREAK (gdbarch_decr_pc_after_break (current_gdbarch)) |
2103 | #endif | |
0f71a2f6 | 2104 | |
e02bc4cc DS |
2105 | /* Default (function) for non- multi-arch platforms. */ |
2106 | #if (!GDB_MULTI_ARCH) && !defined (PREPARE_TO_PROCEED) | |
2107 | #define PREPARE_TO_PROCEED(select_it) (default_prepare_to_proceed (select_it)) | |
2108 | #endif | |
2109 | ||
2110 | typedef int (gdbarch_prepare_to_proceed_ftype) (int select_it); | |
2111 | extern int gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, int select_it); | |
2112 | extern void set_gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, gdbarch_prepare_to_proceed_ftype *prepare_to_proceed); | |
83905903 AC |
2113 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PREPARE_TO_PROCEED) |
2114 | #error "Non multi-arch definition of PREPARE_TO_PROCEED" | |
2115 | #endif | |
c25083af | 2116 | #if !defined (PREPARE_TO_PROCEED) |
e02bc4cc DS |
2117 | #define PREPARE_TO_PROCEED(select_it) (gdbarch_prepare_to_proceed (current_gdbarch, select_it)) |
2118 | #endif | |
e02bc4cc | 2119 | |
104c1213 JM |
2120 | extern CORE_ADDR gdbarch_function_start_offset (struct gdbarch *gdbarch); |
2121 | extern void set_gdbarch_function_start_offset (struct gdbarch *gdbarch, CORE_ADDR function_start_offset); | |
83905903 AC |
2122 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FUNCTION_START_OFFSET) |
2123 | #error "Non multi-arch definition of FUNCTION_START_OFFSET" | |
2124 | #endif | |
c25083af | 2125 | #if !defined (FUNCTION_START_OFFSET) |
0f71a2f6 JM |
2126 | #define FUNCTION_START_OFFSET (gdbarch_function_start_offset (current_gdbarch)) |
2127 | #endif | |
0f71a2f6 | 2128 | |
f6684c31 AC |
2129 | 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); |
2130 | 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 | 2131 | extern void set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address); |
0f71a2f6 | 2132 | |
104c1213 JM |
2133 | extern CORE_ADDR gdbarch_frame_args_skip (struct gdbarch *gdbarch); |
2134 | extern void set_gdbarch_frame_args_skip (struct gdbarch *gdbarch, CORE_ADDR frame_args_skip); | |
83905903 AC |
2135 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_ARGS_SKIP) |
2136 | #error "Non multi-arch definition of FRAME_ARGS_SKIP" | |
2137 | #endif | |
c25083af | 2138 | #if !defined (FRAME_ARGS_SKIP) |
0f71a2f6 JM |
2139 | #define FRAME_ARGS_SKIP (gdbarch_frame_args_skip (current_gdbarch)) |
2140 | #endif | |
0f71a2f6 | 2141 | |
33489c5b | 2142 | /* Default (function) for non- multi-arch platforms. */ |
6166d547 | 2143 | #if (!GDB_MULTI_ARCH) && !defined (FRAMELESS_FUNCTION_INVOCATION) |
33489c5b AC |
2144 | #define FRAMELESS_FUNCTION_INVOCATION(fi) (generic_frameless_function_invocation_not (fi)) |
2145 | #endif | |
2146 | ||
104c1213 JM |
2147 | typedef int (gdbarch_frameless_function_invocation_ftype) (struct frame_info *fi); |
2148 | extern int gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi); | |
2149 | extern void set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, gdbarch_frameless_function_invocation_ftype *frameless_function_invocation); | |
83905903 AC |
2150 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAMELESS_FUNCTION_INVOCATION) |
2151 | #error "Non multi-arch definition of FRAMELESS_FUNCTION_INVOCATION" | |
2152 | #endif | |
c25083af | 2153 | #if !defined (FRAMELESS_FUNCTION_INVOCATION) |
0f71a2f6 JM |
2154 | #define FRAMELESS_FUNCTION_INVOCATION(fi) (gdbarch_frameless_function_invocation (current_gdbarch, fi)) |
2155 | #endif | |
0f71a2f6 | 2156 | |
618ce49f AC |
2157 | #if defined (DEPRECATED_FRAME_CHAIN) |
2158 | /* Legacy for systems yet to multi-arch DEPRECATED_FRAME_CHAIN */ | |
2159 | #if !defined (DEPRECATED_FRAME_CHAIN_P) | |
2160 | #define DEPRECATED_FRAME_CHAIN_P() (1) | |
d62d1979 AC |
2161 | #endif |
2162 | #endif | |
2163 | ||
2164 | /* Default predicate for non- multi-arch targets. */ | |
618ce49f AC |
2165 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_CHAIN_P) |
2166 | #define DEPRECATED_FRAME_CHAIN_P() (0) | |
d62d1979 AC |
2167 | #endif |
2168 | ||
618ce49f AC |
2169 | extern int gdbarch_deprecated_frame_chain_p (struct gdbarch *gdbarch); |
2170 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_CHAIN_P) | |
2171 | #error "Non multi-arch definition of DEPRECATED_FRAME_CHAIN" | |
d62d1979 | 2172 | #endif |
618ce49f AC |
2173 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_CHAIN_P) |
2174 | #define DEPRECATED_FRAME_CHAIN_P() (gdbarch_deprecated_frame_chain_p (current_gdbarch)) | |
d62d1979 AC |
2175 | #endif |
2176 | ||
2177 | /* Default (function) for non- multi-arch platforms. */ | |
618ce49f AC |
2178 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_CHAIN) |
2179 | #define DEPRECATED_FRAME_CHAIN(frame) (internal_error (__FILE__, __LINE__, "DEPRECATED_FRAME_CHAIN"), 0) | |
d62d1979 AC |
2180 | #endif |
2181 | ||
618ce49f AC |
2182 | typedef CORE_ADDR (gdbarch_deprecated_frame_chain_ftype) (struct frame_info *frame); |
2183 | extern CORE_ADDR gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame); | |
2184 | extern void set_gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch, gdbarch_deprecated_frame_chain_ftype *deprecated_frame_chain); | |
2185 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_CHAIN) | |
2186 | #error "Non multi-arch definition of DEPRECATED_FRAME_CHAIN" | |
83905903 | 2187 | #endif |
c25083af | 2188 | #if !defined (DEPRECATED_FRAME_CHAIN) |
618ce49f | 2189 | #define DEPRECATED_FRAME_CHAIN(frame) (gdbarch_deprecated_frame_chain (current_gdbarch, frame)) |
0f71a2f6 | 2190 | #endif |
0f71a2f6 | 2191 | |
618ce49f AC |
2192 | #if defined (DEPRECATED_FRAME_CHAIN_VALID) |
2193 | /* Legacy for systems yet to multi-arch DEPRECATED_FRAME_CHAIN_VALID */ | |
2194 | #if !defined (DEPRECATED_FRAME_CHAIN_VALID_P) | |
2195 | #define DEPRECATED_FRAME_CHAIN_VALID_P() (1) | |
51603483 DJ |
2196 | #endif |
2197 | #endif | |
2198 | ||
2199 | /* Default predicate for non- multi-arch targets. */ | |
618ce49f AC |
2200 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_CHAIN_VALID_P) |
2201 | #define DEPRECATED_FRAME_CHAIN_VALID_P() (0) | |
51603483 DJ |
2202 | #endif |
2203 | ||
618ce49f AC |
2204 | extern int gdbarch_deprecated_frame_chain_valid_p (struct gdbarch *gdbarch); |
2205 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_CHAIN_VALID_P) | |
2206 | #error "Non multi-arch definition of DEPRECATED_FRAME_CHAIN_VALID" | |
51603483 | 2207 | #endif |
618ce49f AC |
2208 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_CHAIN_VALID_P) |
2209 | #define DEPRECATED_FRAME_CHAIN_VALID_P() (gdbarch_deprecated_frame_chain_valid_p (current_gdbarch)) | |
51603483 | 2210 | #endif |
7f55af32 AC |
2211 | |
2212 | /* Default (function) for non- multi-arch platforms. */ | |
618ce49f AC |
2213 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_CHAIN_VALID) |
2214 | #define DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe) (internal_error (__FILE__, __LINE__, "DEPRECATED_FRAME_CHAIN_VALID"), 0) | |
7f55af32 | 2215 | #endif |
028c194b | 2216 | |
618ce49f AC |
2217 | typedef int (gdbarch_deprecated_frame_chain_valid_ftype) (CORE_ADDR chain, struct frame_info *thisframe); |
2218 | extern int gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe); | |
2219 | extern void set_gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch, gdbarch_deprecated_frame_chain_valid_ftype *deprecated_frame_chain_valid); | |
2220 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_CHAIN_VALID) | |
2221 | #error "Non multi-arch definition of DEPRECATED_FRAME_CHAIN_VALID" | |
83905903 | 2222 | #endif |
c25083af | 2223 | #if !defined (DEPRECATED_FRAME_CHAIN_VALID) |
618ce49f | 2224 | #define DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe) (gdbarch_deprecated_frame_chain_valid (current_gdbarch, chain, thisframe)) |
0f71a2f6 | 2225 | #endif |
0f71a2f6 | 2226 | |
8bedc050 AC |
2227 | /* DEPRECATED_FRAME_SAVED_PC has been replaced by UNWIND_PC. Please |
2228 | note, per UNWIND_PC's doco, that while the two have similar | |
2229 | interfaces they have very different underlying implementations. */ | |
12cc2063 | 2230 | |
8bedc050 AC |
2231 | #if defined (DEPRECATED_FRAME_SAVED_PC) |
2232 | /* Legacy for systems yet to multi-arch DEPRECATED_FRAME_SAVED_PC */ | |
2233 | #if !defined (DEPRECATED_FRAME_SAVED_PC_P) | |
2234 | #define DEPRECATED_FRAME_SAVED_PC_P() (1) | |
d62d1979 AC |
2235 | #endif |
2236 | #endif | |
2237 | ||
2238 | /* Default predicate for non- multi-arch targets. */ | |
8bedc050 AC |
2239 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_SAVED_PC_P) |
2240 | #define DEPRECATED_FRAME_SAVED_PC_P() (0) | |
d62d1979 AC |
2241 | #endif |
2242 | ||
8bedc050 AC |
2243 | extern int gdbarch_deprecated_frame_saved_pc_p (struct gdbarch *gdbarch); |
2244 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_SAVED_PC_P) | |
2245 | #error "Non multi-arch definition of DEPRECATED_FRAME_SAVED_PC" | |
d62d1979 | 2246 | #endif |
8bedc050 AC |
2247 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_SAVED_PC_P) |
2248 | #define DEPRECATED_FRAME_SAVED_PC_P() (gdbarch_deprecated_frame_saved_pc_p (current_gdbarch)) | |
d62d1979 AC |
2249 | #endif |
2250 | ||
2251 | /* Default (function) for non- multi-arch platforms. */ | |
8bedc050 AC |
2252 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_SAVED_PC) |
2253 | #define DEPRECATED_FRAME_SAVED_PC(fi) (internal_error (__FILE__, __LINE__, "DEPRECATED_FRAME_SAVED_PC"), 0) | |
d62d1979 AC |
2254 | #endif |
2255 | ||
8bedc050 AC |
2256 | typedef CORE_ADDR (gdbarch_deprecated_frame_saved_pc_ftype) (struct frame_info *fi); |
2257 | extern CORE_ADDR gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi); | |
2258 | extern void set_gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch, gdbarch_deprecated_frame_saved_pc_ftype *deprecated_frame_saved_pc); | |
2259 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_SAVED_PC) | |
2260 | #error "Non multi-arch definition of DEPRECATED_FRAME_SAVED_PC" | |
83905903 | 2261 | #endif |
c25083af | 2262 | #if !defined (DEPRECATED_FRAME_SAVED_PC) |
8bedc050 | 2263 | #define DEPRECATED_FRAME_SAVED_PC(fi) (gdbarch_deprecated_frame_saved_pc (current_gdbarch, fi)) |
0f71a2f6 | 2264 | #endif |
0f71a2f6 | 2265 | |
12cc2063 AC |
2266 | extern int gdbarch_unwind_pc_p (struct gdbarch *gdbarch); |
2267 | ||
2268 | typedef CORE_ADDR (gdbarch_unwind_pc_ftype) (struct gdbarch *gdbarch, struct frame_info *next_frame); | |
2269 | extern CORE_ADDR gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame); | |
2270 | extern void set_gdbarch_unwind_pc (struct gdbarch *gdbarch, gdbarch_unwind_pc_ftype *unwind_pc); | |
2271 | ||
a9e5fdc2 AC |
2272 | extern int gdbarch_unwind_sp_p (struct gdbarch *gdbarch); |
2273 | ||
2274 | typedef CORE_ADDR (gdbarch_unwind_sp_ftype) (struct gdbarch *gdbarch, struct frame_info *next_frame); | |
2275 | extern CORE_ADDR gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame); | |
2276 | extern void set_gdbarch_unwind_sp (struct gdbarch *gdbarch, gdbarch_unwind_sp_ftype *unwind_sp); | |
2277 | ||
f4ded5b1 AC |
2278 | /* Default (function) for non- multi-arch platforms. */ |
2279 | #if (!GDB_MULTI_ARCH) && !defined (FRAME_ARGS_ADDRESS) | |
7d6a26a7 | 2280 | #define FRAME_ARGS_ADDRESS(fi) (get_frame_base (fi)) |
f4ded5b1 AC |
2281 | #endif |
2282 | ||
104c1213 JM |
2283 | typedef CORE_ADDR (gdbarch_frame_args_address_ftype) (struct frame_info *fi); |
2284 | extern CORE_ADDR gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi); | |
2285 | extern void set_gdbarch_frame_args_address (struct gdbarch *gdbarch, gdbarch_frame_args_address_ftype *frame_args_address); | |
83905903 AC |
2286 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_ARGS_ADDRESS) |
2287 | #error "Non multi-arch definition of FRAME_ARGS_ADDRESS" | |
2288 | #endif | |
c25083af | 2289 | #if !defined (FRAME_ARGS_ADDRESS) |
0f71a2f6 JM |
2290 | #define FRAME_ARGS_ADDRESS(fi) (gdbarch_frame_args_address (current_gdbarch, fi)) |
2291 | #endif | |
0f71a2f6 | 2292 | |
f4ded5b1 AC |
2293 | /* Default (function) for non- multi-arch platforms. */ |
2294 | #if (!GDB_MULTI_ARCH) && !defined (FRAME_LOCALS_ADDRESS) | |
7d6a26a7 | 2295 | #define FRAME_LOCALS_ADDRESS(fi) (get_frame_base (fi)) |
f4ded5b1 AC |
2296 | #endif |
2297 | ||
104c1213 JM |
2298 | typedef CORE_ADDR (gdbarch_frame_locals_address_ftype) (struct frame_info *fi); |
2299 | extern CORE_ADDR gdbarch_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi); | |
2300 | extern void set_gdbarch_frame_locals_address (struct gdbarch *gdbarch, gdbarch_frame_locals_address_ftype *frame_locals_address); | |
83905903 AC |
2301 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_LOCALS_ADDRESS) |
2302 | #error "Non multi-arch definition of FRAME_LOCALS_ADDRESS" | |
2303 | #endif | |
c25083af | 2304 | #if !defined (FRAME_LOCALS_ADDRESS) |
0f71a2f6 JM |
2305 | #define FRAME_LOCALS_ADDRESS(fi) (gdbarch_frame_locals_address (current_gdbarch, fi)) |
2306 | #endif | |
0f71a2f6 | 2307 | |
6913c89a AC |
2308 | #if defined (DEPRECATED_SAVED_PC_AFTER_CALL) |
2309 | /* Legacy for systems yet to multi-arch DEPRECATED_SAVED_PC_AFTER_CALL */ | |
2310 | #if !defined (DEPRECATED_SAVED_PC_AFTER_CALL_P) | |
2311 | #define DEPRECATED_SAVED_PC_AFTER_CALL_P() (1) | |
4443bd83 AC |
2312 | #endif |
2313 | #endif | |
2314 | ||
2315 | /* Default predicate for non- multi-arch targets. */ | |
6913c89a AC |
2316 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_SAVED_PC_AFTER_CALL_P) |
2317 | #define DEPRECATED_SAVED_PC_AFTER_CALL_P() (0) | |
4443bd83 AC |
2318 | #endif |
2319 | ||
6913c89a AC |
2320 | extern int gdbarch_deprecated_saved_pc_after_call_p (struct gdbarch *gdbarch); |
2321 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SAVED_PC_AFTER_CALL_P) | |
2322 | #error "Non multi-arch definition of DEPRECATED_SAVED_PC_AFTER_CALL" | |
4443bd83 | 2323 | #endif |
6913c89a AC |
2324 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_SAVED_PC_AFTER_CALL_P) |
2325 | #define DEPRECATED_SAVED_PC_AFTER_CALL_P() (gdbarch_deprecated_saved_pc_after_call_p (current_gdbarch)) | |
4443bd83 AC |
2326 | #endif |
2327 | ||
2328 | /* Default (function) for non- multi-arch platforms. */ | |
6913c89a AC |
2329 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_SAVED_PC_AFTER_CALL) |
2330 | #define DEPRECATED_SAVED_PC_AFTER_CALL(frame) (internal_error (__FILE__, __LINE__, "DEPRECATED_SAVED_PC_AFTER_CALL"), 0) | |
4443bd83 AC |
2331 | #endif |
2332 | ||
6913c89a AC |
2333 | typedef CORE_ADDR (gdbarch_deprecated_saved_pc_after_call_ftype) (struct frame_info *frame); |
2334 | extern CORE_ADDR gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame); | |
2335 | extern void set_gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch, gdbarch_deprecated_saved_pc_after_call_ftype *deprecated_saved_pc_after_call); | |
2336 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SAVED_PC_AFTER_CALL) | |
2337 | #error "Non multi-arch definition of DEPRECATED_SAVED_PC_AFTER_CALL" | |
83905903 | 2338 | #endif |
c25083af | 2339 | #if !defined (DEPRECATED_SAVED_PC_AFTER_CALL) |
6913c89a | 2340 | #define DEPRECATED_SAVED_PC_AFTER_CALL(frame) (gdbarch_deprecated_saved_pc_after_call (current_gdbarch, frame)) |
0f71a2f6 | 2341 | #endif |
0f71a2f6 | 2342 | |
983a287a AC |
2343 | #if defined (FRAME_NUM_ARGS) |
2344 | /* Legacy for systems yet to multi-arch FRAME_NUM_ARGS */ | |
2345 | #if !defined (FRAME_NUM_ARGS_P) | |
2346 | #define FRAME_NUM_ARGS_P() (1) | |
2347 | #endif | |
2348 | #endif | |
2349 | ||
2350 | /* Default predicate for non- multi-arch targets. */ | |
2351 | #if (!GDB_MULTI_ARCH) && !defined (FRAME_NUM_ARGS_P) | |
2352 | #define FRAME_NUM_ARGS_P() (0) | |
2353 | #endif | |
2354 | ||
2355 | extern int gdbarch_frame_num_args_p (struct gdbarch *gdbarch); | |
2356 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_NUM_ARGS_P) | |
2357 | #error "Non multi-arch definition of FRAME_NUM_ARGS" | |
2358 | #endif | |
2359 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_NUM_ARGS_P) | |
2360 | #define FRAME_NUM_ARGS_P() (gdbarch_frame_num_args_p (current_gdbarch)) | |
2361 | #endif | |
2362 | ||
2363 | /* Default (function) for non- multi-arch platforms. */ | |
2364 | #if (!GDB_MULTI_ARCH) && !defined (FRAME_NUM_ARGS) | |
2365 | #define FRAME_NUM_ARGS(frame) (internal_error (__FILE__, __LINE__, "FRAME_NUM_ARGS"), 0) | |
2366 | #endif | |
2367 | ||
104c1213 JM |
2368 | typedef int (gdbarch_frame_num_args_ftype) (struct frame_info *frame); |
2369 | extern int gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame); | |
2370 | extern void set_gdbarch_frame_num_args (struct gdbarch *gdbarch, gdbarch_frame_num_args_ftype *frame_num_args); | |
83905903 AC |
2371 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_NUM_ARGS) |
2372 | #error "Non multi-arch definition of FRAME_NUM_ARGS" | |
2373 | #endif | |
c25083af | 2374 | #if !defined (FRAME_NUM_ARGS) |
0f71a2f6 JM |
2375 | #define FRAME_NUM_ARGS(frame) (gdbarch_frame_num_args (current_gdbarch, frame)) |
2376 | #endif | |
0f71a2f6 | 2377 | |
2ada493a AC |
2378 | #if defined (STACK_ALIGN) |
2379 | /* Legacy for systems yet to multi-arch STACK_ALIGN */ | |
eee30e78 | 2380 | #if !defined (STACK_ALIGN_P) |
2ada493a AC |
2381 | #define STACK_ALIGN_P() (1) |
2382 | #endif | |
eee30e78 | 2383 | #endif |
2ada493a | 2384 | |
33489c5b | 2385 | /* Default predicate for non- multi-arch targets. */ |
6166d547 | 2386 | #if (!GDB_MULTI_ARCH) && !defined (STACK_ALIGN_P) |
33489c5b AC |
2387 | #define STACK_ALIGN_P() (0) |
2388 | #endif | |
2389 | ||
2ada493a | 2390 | extern int gdbarch_stack_align_p (struct gdbarch *gdbarch); |
83905903 AC |
2391 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STACK_ALIGN_P) |
2392 | #error "Non multi-arch definition of STACK_ALIGN" | |
2393 | #endif | |
6166d547 | 2394 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (STACK_ALIGN_P) |
2ada493a AC |
2395 | #define STACK_ALIGN_P() (gdbarch_stack_align_p (current_gdbarch)) |
2396 | #endif | |
2397 | ||
33489c5b | 2398 | /* Default (function) for non- multi-arch platforms. */ |
6166d547 | 2399 | #if (!GDB_MULTI_ARCH) && !defined (STACK_ALIGN) |
8e65ff28 | 2400 | #define STACK_ALIGN(sp) (internal_error (__FILE__, __LINE__, "STACK_ALIGN"), 0) |
33489c5b AC |
2401 | #endif |
2402 | ||
2ada493a AC |
2403 | typedef CORE_ADDR (gdbarch_stack_align_ftype) (CORE_ADDR sp); |
2404 | extern CORE_ADDR gdbarch_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp); | |
2405 | extern void set_gdbarch_stack_align (struct gdbarch *gdbarch, gdbarch_stack_align_ftype *stack_align); | |
83905903 AC |
2406 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STACK_ALIGN) |
2407 | #error "Non multi-arch definition of STACK_ALIGN" | |
2408 | #endif | |
c25083af | 2409 | #if !defined (STACK_ALIGN) |
2ada493a AC |
2410 | #define STACK_ALIGN(sp) (gdbarch_stack_align (current_gdbarch, sp)) |
2411 | #endif | |
2412 | ||
dc604539 AC |
2413 | extern int gdbarch_frame_align_p (struct gdbarch *gdbarch); |
2414 | ||
2415 | typedef CORE_ADDR (gdbarch_frame_align_ftype) (struct gdbarch *gdbarch, CORE_ADDR address); | |
2416 | extern CORE_ADDR gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address); | |
2417 | extern void set_gdbarch_frame_align (struct gdbarch *gdbarch, gdbarch_frame_align_ftype *frame_align); | |
2418 | ||
f933a9c5 AC |
2419 | /* NOTE: cagney/2003-03-24: This is better handled by PUSH_ARGUMENTS. */ |
2420 | ||
0a49d05e | 2421 | /* Default (value) for non- multi-arch platforms. */ |
f933a9c5 AC |
2422 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED) |
2423 | #define DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED (0) | |
0a49d05e AC |
2424 | #endif |
2425 | ||
f933a9c5 AC |
2426 | extern int gdbarch_deprecated_extra_stack_alignment_needed (struct gdbarch *gdbarch); |
2427 | extern void set_gdbarch_deprecated_extra_stack_alignment_needed (struct gdbarch *gdbarch, int deprecated_extra_stack_alignment_needed); | |
2428 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED) | |
2429 | #error "Non multi-arch definition of DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED" | |
83905903 | 2430 | #endif |
c25083af | 2431 | #if !defined (DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED) |
f933a9c5 | 2432 | #define DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED (gdbarch_deprecated_extra_stack_alignment_needed (current_gdbarch)) |
0a49d05e | 2433 | #endif |
0a49d05e | 2434 | |
d03e67c9 AC |
2435 | #if defined (REG_STRUCT_HAS_ADDR) |
2436 | /* Legacy for systems yet to multi-arch REG_STRUCT_HAS_ADDR */ | |
eee30e78 | 2437 | #if !defined (REG_STRUCT_HAS_ADDR_P) |
d03e67c9 AC |
2438 | #define REG_STRUCT_HAS_ADDR_P() (1) |
2439 | #endif | |
eee30e78 | 2440 | #endif |
d03e67c9 | 2441 | |
33489c5b | 2442 | /* Default predicate for non- multi-arch targets. */ |
6166d547 | 2443 | #if (!GDB_MULTI_ARCH) && !defined (REG_STRUCT_HAS_ADDR_P) |
33489c5b AC |
2444 | #define REG_STRUCT_HAS_ADDR_P() (0) |
2445 | #endif | |
2446 | ||
d03e67c9 | 2447 | extern int gdbarch_reg_struct_has_addr_p (struct gdbarch *gdbarch); |
83905903 AC |
2448 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REG_STRUCT_HAS_ADDR_P) |
2449 | #error "Non multi-arch definition of REG_STRUCT_HAS_ADDR" | |
2450 | #endif | |
6166d547 | 2451 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REG_STRUCT_HAS_ADDR_P) |
d03e67c9 AC |
2452 | #define REG_STRUCT_HAS_ADDR_P() (gdbarch_reg_struct_has_addr_p (current_gdbarch)) |
2453 | #endif | |
2454 | ||
33489c5b | 2455 | /* Default (function) for non- multi-arch platforms. */ |
6166d547 | 2456 | #if (!GDB_MULTI_ARCH) && !defined (REG_STRUCT_HAS_ADDR) |
8e65ff28 | 2457 | #define REG_STRUCT_HAS_ADDR(gcc_p, type) (internal_error (__FILE__, __LINE__, "REG_STRUCT_HAS_ADDR"), 0) |
33489c5b AC |
2458 | #endif |
2459 | ||
d03e67c9 AC |
2460 | typedef int (gdbarch_reg_struct_has_addr_ftype) (int gcc_p, struct type *type); |
2461 | extern int gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type); | |
2462 | extern void set_gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, gdbarch_reg_struct_has_addr_ftype *reg_struct_has_addr); | |
83905903 AC |
2463 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REG_STRUCT_HAS_ADDR) |
2464 | #error "Non multi-arch definition of REG_STRUCT_HAS_ADDR" | |
2465 | #endif | |
c25083af | 2466 | #if !defined (REG_STRUCT_HAS_ADDR) |
d03e67c9 AC |
2467 | #define REG_STRUCT_HAS_ADDR(gcc_p, type) (gdbarch_reg_struct_has_addr (current_gdbarch, gcc_p, type)) |
2468 | #endif | |
2469 | ||
a2ce2e56 AC |
2470 | /* FIXME: kettenis/2003-03-08: This should be replaced by a function |
2471 | parametrized with (at least) the regcache. */ | |
2472 | ||
d1e3cf49 AC |
2473 | #if defined (SAVE_DUMMY_FRAME_TOS) |
2474 | /* Legacy for systems yet to multi-arch SAVE_DUMMY_FRAME_TOS */ | |
eee30e78 | 2475 | #if !defined (SAVE_DUMMY_FRAME_TOS_P) |
d1e3cf49 AC |
2476 | #define SAVE_DUMMY_FRAME_TOS_P() (1) |
2477 | #endif | |
eee30e78 | 2478 | #endif |
d1e3cf49 AC |
2479 | |
2480 | /* Default predicate for non- multi-arch targets. */ | |
6166d547 | 2481 | #if (!GDB_MULTI_ARCH) && !defined (SAVE_DUMMY_FRAME_TOS_P) |
d1e3cf49 AC |
2482 | #define SAVE_DUMMY_FRAME_TOS_P() (0) |
2483 | #endif | |
2484 | ||
2485 | extern int gdbarch_save_dummy_frame_tos_p (struct gdbarch *gdbarch); | |
83905903 AC |
2486 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SAVE_DUMMY_FRAME_TOS_P) |
2487 | #error "Non multi-arch definition of SAVE_DUMMY_FRAME_TOS" | |
2488 | #endif | |
6166d547 | 2489 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SAVE_DUMMY_FRAME_TOS_P) |
d1e3cf49 AC |
2490 | #define SAVE_DUMMY_FRAME_TOS_P() (gdbarch_save_dummy_frame_tos_p (current_gdbarch)) |
2491 | #endif | |
2492 | ||
2493 | /* Default (function) for non- multi-arch platforms. */ | |
6166d547 | 2494 | #if (!GDB_MULTI_ARCH) && !defined (SAVE_DUMMY_FRAME_TOS) |
8e65ff28 | 2495 | #define SAVE_DUMMY_FRAME_TOS(sp) (internal_error (__FILE__, __LINE__, "SAVE_DUMMY_FRAME_TOS"), 0) |
d1e3cf49 AC |
2496 | #endif |
2497 | ||
2498 | typedef void (gdbarch_save_dummy_frame_tos_ftype) (CORE_ADDR sp); | |
2499 | extern void gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp); | |
2500 | extern void set_gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, gdbarch_save_dummy_frame_tos_ftype *save_dummy_frame_tos); | |
83905903 AC |
2501 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SAVE_DUMMY_FRAME_TOS) |
2502 | #error "Non multi-arch definition of SAVE_DUMMY_FRAME_TOS" | |
2503 | #endif | |
c25083af | 2504 | #if !defined (SAVE_DUMMY_FRAME_TOS) |
d1e3cf49 AC |
2505 | #define SAVE_DUMMY_FRAME_TOS(sp) (gdbarch_save_dummy_frame_tos (current_gdbarch, sp)) |
2506 | #endif | |
d1e3cf49 | 2507 | |
6314f104 AC |
2508 | extern int gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch); |
2509 | ||
2510 | typedef struct frame_id (gdbarch_unwind_dummy_id_ftype) (struct gdbarch *gdbarch, struct frame_info *info); | |
2511 | extern struct frame_id gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *info); | |
2512 | extern void set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, gdbarch_unwind_dummy_id_ftype *unwind_dummy_id); | |
2513 | ||
58d5518e ND |
2514 | extern int gdbarch_parm_boundary (struct gdbarch *gdbarch); |
2515 | extern void set_gdbarch_parm_boundary (struct gdbarch *gdbarch, int parm_boundary); | |
83905903 AC |
2516 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PARM_BOUNDARY) |
2517 | #error "Non multi-arch definition of PARM_BOUNDARY" | |
2518 | #endif | |
c25083af | 2519 | #if !defined (PARM_BOUNDARY) |
58d5518e ND |
2520 | #define PARM_BOUNDARY (gdbarch_parm_boundary (current_gdbarch)) |
2521 | #endif | |
58d5518e | 2522 | |
f0d4cc9e | 2523 | /* Default (value) for non- multi-arch platforms. */ |
6166d547 | 2524 | #if (!GDB_MULTI_ARCH) && !defined (TARGET_FLOAT_FORMAT) |
f0d4cc9e AC |
2525 | #define TARGET_FLOAT_FORMAT (default_float_format (current_gdbarch)) |
2526 | #endif | |
2527 | ||
2528 | extern const struct floatformat * gdbarch_float_format (struct gdbarch *gdbarch); | |
2529 | extern void set_gdbarch_float_format (struct gdbarch *gdbarch, const struct floatformat * float_format); | |
83905903 AC |
2530 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_FLOAT_FORMAT) |
2531 | #error "Non multi-arch definition of TARGET_FLOAT_FORMAT" | |
2532 | #endif | |
c25083af | 2533 | #if !defined (TARGET_FLOAT_FORMAT) |
f0d4cc9e AC |
2534 | #define TARGET_FLOAT_FORMAT (gdbarch_float_format (current_gdbarch)) |
2535 | #endif | |
f0d4cc9e AC |
2536 | |
2537 | /* Default (value) for non- multi-arch platforms. */ | |
6166d547 | 2538 | #if (!GDB_MULTI_ARCH) && !defined (TARGET_DOUBLE_FORMAT) |
f0d4cc9e AC |
2539 | #define TARGET_DOUBLE_FORMAT (default_double_format (current_gdbarch)) |
2540 | #endif | |
2541 | ||
2542 | extern const struct floatformat * gdbarch_double_format (struct gdbarch *gdbarch); | |
2543 | extern void set_gdbarch_double_format (struct gdbarch *gdbarch, const struct floatformat * double_format); | |
83905903 AC |
2544 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_DOUBLE_FORMAT) |
2545 | #error "Non multi-arch definition of TARGET_DOUBLE_FORMAT" | |
2546 | #endif | |
c25083af | 2547 | #if !defined (TARGET_DOUBLE_FORMAT) |
f0d4cc9e AC |
2548 | #define TARGET_DOUBLE_FORMAT (gdbarch_double_format (current_gdbarch)) |
2549 | #endif | |
f0d4cc9e AC |
2550 | |
2551 | /* Default (value) for non- multi-arch platforms. */ | |
6166d547 | 2552 | #if (!GDB_MULTI_ARCH) && !defined (TARGET_LONG_DOUBLE_FORMAT) |
2fa5c1e0 | 2553 | #define TARGET_LONG_DOUBLE_FORMAT (default_double_format (current_gdbarch)) |
f0d4cc9e AC |
2554 | #endif |
2555 | ||
2556 | extern const struct floatformat * gdbarch_long_double_format (struct gdbarch *gdbarch); | |
2557 | extern void set_gdbarch_long_double_format (struct gdbarch *gdbarch, const struct floatformat * long_double_format); | |
83905903 AC |
2558 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_DOUBLE_FORMAT) |
2559 | #error "Non multi-arch definition of TARGET_LONG_DOUBLE_FORMAT" | |
2560 | #endif | |
c25083af | 2561 | #if !defined (TARGET_LONG_DOUBLE_FORMAT) |
f0d4cc9e AC |
2562 | #define TARGET_LONG_DOUBLE_FORMAT (gdbarch_long_double_format (current_gdbarch)) |
2563 | #endif | |
f0d4cc9e | 2564 | |
f517ea4e PS |
2565 | /* Default (function) for non- multi-arch platforms. */ |
2566 | #if (!GDB_MULTI_ARCH) && !defined (CONVERT_FROM_FUNC_PTR_ADDR) | |
875e1767 | 2567 | #define CONVERT_FROM_FUNC_PTR_ADDR(addr) (core_addr_identity (addr)) |
f517ea4e PS |
2568 | #endif |
2569 | ||
2570 | typedef CORE_ADDR (gdbarch_convert_from_func_ptr_addr_ftype) (CORE_ADDR addr); | |
2571 | extern CORE_ADDR gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr); | |
2572 | extern void set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr); | |
83905903 AC |
2573 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CONVERT_FROM_FUNC_PTR_ADDR) |
2574 | #error "Non multi-arch definition of CONVERT_FROM_FUNC_PTR_ADDR" | |
2575 | #endif | |
c25083af | 2576 | #if !defined (CONVERT_FROM_FUNC_PTR_ADDR) |
f517ea4e PS |
2577 | #define CONVERT_FROM_FUNC_PTR_ADDR(addr) (gdbarch_convert_from_func_ptr_addr (current_gdbarch, addr)) |
2578 | #endif | |
f517ea4e | 2579 | |
875e1767 AC |
2580 | /* On some machines there are bits in addresses which are not really |
2581 | part of the address, but are used by the kernel, the hardware, etc. | |
2582 | for special purposes. ADDR_BITS_REMOVE takes out any such bits so | |
2583 | we get a "real" address such as one would find in a symbol table. | |
2584 | This is used only for addresses of instructions, and even then I'm | |
2585 | not sure it's used in all contexts. It exists to deal with there | |
2586 | being a few stray bits in the PC which would mislead us, not as some | |
2587 | sort of generic thing to handle alignment or segmentation (it's | |
2588 | possible it should be in TARGET_READ_PC instead). */ | |
2589 | ||
2590 | /* Default (function) for non- multi-arch platforms. */ | |
2591 | #if (!GDB_MULTI_ARCH) && !defined (ADDR_BITS_REMOVE) | |
2592 | #define ADDR_BITS_REMOVE(addr) (core_addr_identity (addr)) | |
2593 | #endif | |
2594 | ||
2595 | typedef CORE_ADDR (gdbarch_addr_bits_remove_ftype) (CORE_ADDR addr); | |
2596 | extern CORE_ADDR gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr); | |
2597 | extern void set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch, gdbarch_addr_bits_remove_ftype *addr_bits_remove); | |
83905903 AC |
2598 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDR_BITS_REMOVE) |
2599 | #error "Non multi-arch definition of ADDR_BITS_REMOVE" | |
2600 | #endif | |
c25083af | 2601 | #if !defined (ADDR_BITS_REMOVE) |
875e1767 AC |
2602 | #define ADDR_BITS_REMOVE(addr) (gdbarch_addr_bits_remove (current_gdbarch, addr)) |
2603 | #endif | |
875e1767 | 2604 | |
5720643c | 2605 | /* It is not at all clear why SMASH_TEXT_ADDRESS is not folded into |
181c1381 RE |
2606 | ADDR_BITS_REMOVE. */ |
2607 | ||
2608 | /* Default (function) for non- multi-arch platforms. */ | |
2609 | #if (!GDB_MULTI_ARCH) && !defined (SMASH_TEXT_ADDRESS) | |
2610 | #define SMASH_TEXT_ADDRESS(addr) (core_addr_identity (addr)) | |
2611 | #endif | |
2612 | ||
2613 | typedef CORE_ADDR (gdbarch_smash_text_address_ftype) (CORE_ADDR addr); | |
2614 | extern CORE_ADDR gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr); | |
2615 | extern void set_gdbarch_smash_text_address (struct gdbarch *gdbarch, gdbarch_smash_text_address_ftype *smash_text_address); | |
2616 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SMASH_TEXT_ADDRESS) | |
2617 | #error "Non multi-arch definition of SMASH_TEXT_ADDRESS" | |
2618 | #endif | |
c25083af | 2619 | #if !defined (SMASH_TEXT_ADDRESS) |
181c1381 RE |
2620 | #define SMASH_TEXT_ADDRESS(addr) (gdbarch_smash_text_address (current_gdbarch, addr)) |
2621 | #endif | |
181c1381 | 2622 | |
64c4637f AC |
2623 | /* FIXME/cagney/2001-01-18: This should be split in two. A target method that indicates if |
2624 | the target needs software single step. An ISA method to implement it. | |
2625 | ||
2626 | FIXME/cagney/2001-01-18: This should be replaced with something that inserts breakpoints | |
2627 | using the breakpoint system instead of blatting memory directly (as with rs6000). | |
2628 | ||
2629 | FIXME/cagney/2001-01-18: The logic is backwards. It should be asking if the target can | |
2630 | single step. If not, then implement single step using breakpoints. */ | |
2631 | ||
2632 | #if defined (SOFTWARE_SINGLE_STEP) | |
2633 | /* Legacy for systems yet to multi-arch SOFTWARE_SINGLE_STEP */ | |
2634 | #if !defined (SOFTWARE_SINGLE_STEP_P) | |
2635 | #define SOFTWARE_SINGLE_STEP_P() (1) | |
2636 | #endif | |
2637 | #endif | |
2638 | ||
2639 | /* Default predicate for non- multi-arch targets. */ | |
2640 | #if (!GDB_MULTI_ARCH) && !defined (SOFTWARE_SINGLE_STEP_P) | |
2641 | #define SOFTWARE_SINGLE_STEP_P() (0) | |
2642 | #endif | |
2643 | ||
2644 | extern int gdbarch_software_single_step_p (struct gdbarch *gdbarch); | |
83905903 AC |
2645 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SOFTWARE_SINGLE_STEP_P) |
2646 | #error "Non multi-arch definition of SOFTWARE_SINGLE_STEP" | |
2647 | #endif | |
64c4637f AC |
2648 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SOFTWARE_SINGLE_STEP_P) |
2649 | #define SOFTWARE_SINGLE_STEP_P() (gdbarch_software_single_step_p (current_gdbarch)) | |
2650 | #endif | |
2651 | ||
2652 | /* Default (function) for non- multi-arch platforms. */ | |
2653 | #if (!GDB_MULTI_ARCH) && !defined (SOFTWARE_SINGLE_STEP) | |
2654 | #define SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p) (internal_error (__FILE__, __LINE__, "SOFTWARE_SINGLE_STEP"), 0) | |
2655 | #endif | |
2656 | ||
2657 | typedef void (gdbarch_software_single_step_ftype) (enum target_signal sig, int insert_breakpoints_p); | |
2658 | extern void gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p); | |
2659 | extern void set_gdbarch_software_single_step (struct gdbarch *gdbarch, gdbarch_software_single_step_ftype *software_single_step); | |
83905903 AC |
2660 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SOFTWARE_SINGLE_STEP) |
2661 | #error "Non multi-arch definition of SOFTWARE_SINGLE_STEP" | |
2662 | #endif | |
c25083af | 2663 | #if !defined (SOFTWARE_SINGLE_STEP) |
64c4637f AC |
2664 | #define SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p) (gdbarch_software_single_step (current_gdbarch, sig, insert_breakpoints_p)) |
2665 | #endif | |
64c4637f | 2666 | |
2bf0cb65 EZ |
2667 | /* Default (function) for non- multi-arch platforms. */ |
2668 | #if (!GDB_MULTI_ARCH) && !defined (TARGET_PRINT_INSN) | |
2669 | #define TARGET_PRINT_INSN(vma, info) (legacy_print_insn (vma, info)) | |
2670 | #endif | |
2671 | ||
2672 | typedef int (gdbarch_print_insn_ftype) (bfd_vma vma, disassemble_info *info); | |
2673 | extern int gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, disassemble_info *info); | |
2674 | extern void set_gdbarch_print_insn (struct gdbarch *gdbarch, gdbarch_print_insn_ftype *print_insn); | |
2675 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_PRINT_INSN) | |
2676 | #error "Non multi-arch definition of TARGET_PRINT_INSN" | |
2677 | #endif | |
c25083af | 2678 | #if !defined (TARGET_PRINT_INSN) |
2bf0cb65 EZ |
2679 | #define TARGET_PRINT_INSN(vma, info) (gdbarch_print_insn (current_gdbarch, vma, info)) |
2680 | #endif | |
2bf0cb65 | 2681 | |
bdcd319a CV |
2682 | /* Default (function) for non- multi-arch platforms. */ |
2683 | #if (!GDB_MULTI_ARCH) && !defined (SKIP_TRAMPOLINE_CODE) | |
2684 | #define SKIP_TRAMPOLINE_CODE(pc) (generic_skip_trampoline_code (pc)) | |
2685 | #endif | |
2686 | ||
2687 | typedef CORE_ADDR (gdbarch_skip_trampoline_code_ftype) (CORE_ADDR pc); | |
2688 | extern CORE_ADDR gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc); | |
2689 | extern void set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, gdbarch_skip_trampoline_code_ftype *skip_trampoline_code); | |
2690 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SKIP_TRAMPOLINE_CODE) | |
2691 | #error "Non multi-arch definition of SKIP_TRAMPOLINE_CODE" | |
2692 | #endif | |
c25083af | 2693 | #if !defined (SKIP_TRAMPOLINE_CODE) |
bdcd319a CV |
2694 | #define SKIP_TRAMPOLINE_CODE(pc) (gdbarch_skip_trampoline_code (current_gdbarch, pc)) |
2695 | #endif | |
bdcd319a | 2696 | |
68e9cc94 CV |
2697 | /* For SVR4 shared libraries, each call goes through a small piece of |
2698 | trampoline code in the ".plt" section. IN_SOLIB_CALL_TRAMPOLINE evaluates | |
d50355b6 | 2699 | to nonzero if we are currently stopped in one of these. */ |
68e9cc94 CV |
2700 | |
2701 | /* Default (function) for non- multi-arch platforms. */ | |
2702 | #if (!GDB_MULTI_ARCH) && !defined (IN_SOLIB_CALL_TRAMPOLINE) | |
2703 | #define IN_SOLIB_CALL_TRAMPOLINE(pc, name) (generic_in_solib_call_trampoline (pc, name)) | |
2704 | #endif | |
2705 | ||
2706 | typedef int (gdbarch_in_solib_call_trampoline_ftype) (CORE_ADDR pc, char *name); | |
2707 | extern int gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name); | |
2708 | extern void set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline); | |
2709 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (IN_SOLIB_CALL_TRAMPOLINE) | |
2710 | #error "Non multi-arch definition of IN_SOLIB_CALL_TRAMPOLINE" | |
2711 | #endif | |
c25083af | 2712 | #if !defined (IN_SOLIB_CALL_TRAMPOLINE) |
68e9cc94 CV |
2713 | #define IN_SOLIB_CALL_TRAMPOLINE(pc, name) (gdbarch_in_solib_call_trampoline (current_gdbarch, pc, name)) |
2714 | #endif | |
68e9cc94 | 2715 | |
d50355b6 MS |
2716 | /* Some systems also have trampoline code for returning from shared libs. */ |
2717 | ||
2718 | /* Default (function) for non- multi-arch platforms. */ | |
2719 | #if (!GDB_MULTI_ARCH) && !defined (IN_SOLIB_RETURN_TRAMPOLINE) | |
2720 | #define IN_SOLIB_RETURN_TRAMPOLINE(pc, name) (generic_in_solib_return_trampoline (pc, name)) | |
2721 | #endif | |
2722 | ||
2723 | typedef int (gdbarch_in_solib_return_trampoline_ftype) (CORE_ADDR pc, char *name); | |
2724 | extern int gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name); | |
2725 | extern void set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline); | |
2726 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (IN_SOLIB_RETURN_TRAMPOLINE) | |
2727 | #error "Non multi-arch definition of IN_SOLIB_RETURN_TRAMPOLINE" | |
2728 | #endif | |
c25083af | 2729 | #if !defined (IN_SOLIB_RETURN_TRAMPOLINE) |
d50355b6 MS |
2730 | #define IN_SOLIB_RETURN_TRAMPOLINE(pc, name) (gdbarch_in_solib_return_trampoline (current_gdbarch, pc, name)) |
2731 | #endif | |
d50355b6 | 2732 | |
d7bd68ca AC |
2733 | /* Sigtramp is a routine that the kernel calls (which then calls the |
2734 | signal handler). On most machines it is a library routine that is | |
2735 | linked into the executable. | |
2736 | ||
2737 | This macro, given a program counter value and the name of the | |
2738 | function in which that PC resides (which can be null if the name is | |
2739 | not known), returns nonzero if the PC and name show that we are in | |
2740 | sigtramp. | |
2741 | ||
2742 | On most machines just see if the name is sigtramp (and if we have | |
2743 | no name, assume we are not in sigtramp). | |
2744 | ||
2745 | FIXME: cagney/2002-04-21: The function find_pc_partial_function | |
2746 | calls find_pc_sect_partial_function() which calls PC_IN_SIGTRAMP. | |
2747 | This means PC_IN_SIGTRAMP function can't be implemented by doing its | |
2748 | own local NAME lookup. | |
2749 | ||
2750 | FIXME: cagney/2002-04-21: PC_IN_SIGTRAMP is something of a mess. | |
2751 | Some code also depends on SIGTRAMP_START and SIGTRAMP_END but other | |
2752 | does not. */ | |
2753 | ||
2754 | /* Default (function) for non- multi-arch platforms. */ | |
2755 | #if (!GDB_MULTI_ARCH) && !defined (PC_IN_SIGTRAMP) | |
2756 | #define PC_IN_SIGTRAMP(pc, name) (legacy_pc_in_sigtramp (pc, name)) | |
2757 | #endif | |
2758 | ||
2759 | typedef int (gdbarch_pc_in_sigtramp_ftype) (CORE_ADDR pc, char *name); | |
2760 | extern int gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc, char *name); | |
2761 | extern void set_gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, gdbarch_pc_in_sigtramp_ftype *pc_in_sigtramp); | |
2762 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PC_IN_SIGTRAMP) | |
2763 | #error "Non multi-arch definition of PC_IN_SIGTRAMP" | |
2764 | #endif | |
c25083af | 2765 | #if !defined (PC_IN_SIGTRAMP) |
d7bd68ca AC |
2766 | #define PC_IN_SIGTRAMP(pc, name) (gdbarch_pc_in_sigtramp (current_gdbarch, pc, name)) |
2767 | #endif | |
d7bd68ca | 2768 | |
43156d82 MK |
2769 | #if defined (SIGTRAMP_START) |
2770 | /* Legacy for systems yet to multi-arch SIGTRAMP_START */ | |
2771 | #if !defined (SIGTRAMP_START_P) | |
2772 | #define SIGTRAMP_START_P() (1) | |
2773 | #endif | |
2774 | #endif | |
2775 | ||
2776 | /* Default predicate for non- multi-arch targets. */ | |
2777 | #if (!GDB_MULTI_ARCH) && !defined (SIGTRAMP_START_P) | |
2778 | #define SIGTRAMP_START_P() (0) | |
2779 | #endif | |
2780 | ||
2781 | extern int gdbarch_sigtramp_start_p (struct gdbarch *gdbarch); | |
2782 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIGTRAMP_START_P) | |
2783 | #error "Non multi-arch definition of SIGTRAMP_START" | |
2784 | #endif | |
2785 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SIGTRAMP_START_P) | |
2786 | #define SIGTRAMP_START_P() (gdbarch_sigtramp_start_p (current_gdbarch)) | |
2787 | #endif | |
2788 | ||
2789 | /* Default (function) for non- multi-arch platforms. */ | |
2790 | #if (!GDB_MULTI_ARCH) && !defined (SIGTRAMP_START) | |
2791 | #define SIGTRAMP_START(pc) (internal_error (__FILE__, __LINE__, "SIGTRAMP_START"), 0) | |
2792 | #endif | |
2793 | ||
2794 | typedef CORE_ADDR (gdbarch_sigtramp_start_ftype) (CORE_ADDR pc); | |
2795 | extern CORE_ADDR gdbarch_sigtramp_start (struct gdbarch *gdbarch, CORE_ADDR pc); | |
2796 | extern void set_gdbarch_sigtramp_start (struct gdbarch *gdbarch, gdbarch_sigtramp_start_ftype *sigtramp_start); | |
2797 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIGTRAMP_START) | |
2798 | #error "Non multi-arch definition of SIGTRAMP_START" | |
2799 | #endif | |
c25083af | 2800 | #if !defined (SIGTRAMP_START) |
43156d82 MK |
2801 | #define SIGTRAMP_START(pc) (gdbarch_sigtramp_start (current_gdbarch, pc)) |
2802 | #endif | |
43156d82 | 2803 | |
e76cff22 AC |
2804 | #if defined (SIGTRAMP_END) |
2805 | /* Legacy for systems yet to multi-arch SIGTRAMP_END */ | |
2806 | #if !defined (SIGTRAMP_END_P) | |
2807 | #define SIGTRAMP_END_P() (1) | |
2808 | #endif | |
2809 | #endif | |
2810 | ||
2811 | /* Default predicate for non- multi-arch targets. */ | |
2812 | #if (!GDB_MULTI_ARCH) && !defined (SIGTRAMP_END_P) | |
2813 | #define SIGTRAMP_END_P() (0) | |
2814 | #endif | |
2815 | ||
2816 | extern int gdbarch_sigtramp_end_p (struct gdbarch *gdbarch); | |
2817 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIGTRAMP_END_P) | |
2818 | #error "Non multi-arch definition of SIGTRAMP_END" | |
2819 | #endif | |
2820 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SIGTRAMP_END_P) | |
2821 | #define SIGTRAMP_END_P() (gdbarch_sigtramp_end_p (current_gdbarch)) | |
2822 | #endif | |
2823 | ||
2824 | /* Default (function) for non- multi-arch platforms. */ | |
2825 | #if (!GDB_MULTI_ARCH) && !defined (SIGTRAMP_END) | |
2826 | #define SIGTRAMP_END(pc) (internal_error (__FILE__, __LINE__, "SIGTRAMP_END"), 0) | |
2827 | #endif | |
2828 | ||
43156d82 MK |
2829 | typedef CORE_ADDR (gdbarch_sigtramp_end_ftype) (CORE_ADDR pc); |
2830 | extern CORE_ADDR gdbarch_sigtramp_end (struct gdbarch *gdbarch, CORE_ADDR pc); | |
2831 | extern void set_gdbarch_sigtramp_end (struct gdbarch *gdbarch, gdbarch_sigtramp_end_ftype *sigtramp_end); | |
2832 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIGTRAMP_END) | |
2833 | #error "Non multi-arch definition of SIGTRAMP_END" | |
2834 | #endif | |
c25083af | 2835 | #if !defined (SIGTRAMP_END) |
43156d82 MK |
2836 | #define SIGTRAMP_END(pc) (gdbarch_sigtramp_end (current_gdbarch, pc)) |
2837 | #endif | |
43156d82 | 2838 | |
c12260ac CV |
2839 | /* A target might have problems with watchpoints as soon as the stack |
2840 | frame of the current function has been destroyed. This mostly happens | |
2841 | as the first action in a funtion's epilogue. in_function_epilogue_p() | |
2842 | is defined to return a non-zero value if either the given addr is one | |
2843 | instruction after the stack destroying instruction up to the trailing | |
2844 | return instruction or if we can figure out that the stack frame has | |
2845 | already been invalidated regardless of the value of addr. Targets | |
2846 | which don't suffer from that problem could just let this functionality | |
2847 | untouched. */ | |
2848 | ||
2849 | typedef int (gdbarch_in_function_epilogue_p_ftype) (struct gdbarch *gdbarch, CORE_ADDR addr); | |
2850 | extern int gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr); | |
2851 | extern void set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p); | |
2852 | ||
552c04a7 TT |
2853 | /* Given a vector of command-line arguments, return a newly allocated |
2854 | string which, when passed to the create_inferior function, will be | |
2855 | parsed (on Unix systems, by the shell) to yield the same vector. | |
2856 | This function should call error() if the argument vector is not | |
2857 | representable for this target or if this target does not support | |
2858 | command-line arguments. | |
2859 | ARGC is the number of elements in the vector. | |
2860 | ARGV is an array of strings, one per argument. */ | |
2861 | ||
2862 | typedef char * (gdbarch_construct_inferior_arguments_ftype) (struct gdbarch *gdbarch, int argc, char **argv); | |
2863 | extern char * gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv); | |
2864 | extern void set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments); | |
2865 | ||
b6af0555 JS |
2866 | #if defined (DWARF2_BUILD_FRAME_INFO) |
2867 | /* Legacy for systems yet to multi-arch DWARF2_BUILD_FRAME_INFO */ | |
2868 | #if !defined (DWARF2_BUILD_FRAME_INFO_P) | |
2869 | #define DWARF2_BUILD_FRAME_INFO_P() (1) | |
2870 | #endif | |
2871 | #endif | |
2872 | ||
2873 | /* Default predicate for non- multi-arch targets. */ | |
2874 | #if (!GDB_MULTI_ARCH) && !defined (DWARF2_BUILD_FRAME_INFO_P) | |
2875 | #define DWARF2_BUILD_FRAME_INFO_P() (0) | |
2876 | #endif | |
2877 | ||
2878 | extern int gdbarch_dwarf2_build_frame_info_p (struct gdbarch *gdbarch); | |
2879 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF2_BUILD_FRAME_INFO_P) | |
2880 | #error "Non multi-arch definition of DWARF2_BUILD_FRAME_INFO" | |
2881 | #endif | |
2882 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DWARF2_BUILD_FRAME_INFO_P) | |
2883 | #define DWARF2_BUILD_FRAME_INFO_P() (gdbarch_dwarf2_build_frame_info_p (current_gdbarch)) | |
2884 | #endif | |
2885 | ||
2886 | /* Default (function) for non- multi-arch platforms. */ | |
2887 | #if (!GDB_MULTI_ARCH) && !defined (DWARF2_BUILD_FRAME_INFO) | |
2888 | #define DWARF2_BUILD_FRAME_INFO(objfile) (internal_error (__FILE__, __LINE__, "DWARF2_BUILD_FRAME_INFO"), 0) | |
2889 | #endif | |
2890 | ||
2891 | typedef void (gdbarch_dwarf2_build_frame_info_ftype) (struct objfile *objfile); | |
2892 | extern void gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch, struct objfile *objfile); | |
2893 | extern void set_gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch, gdbarch_dwarf2_build_frame_info_ftype *dwarf2_build_frame_info); | |
2894 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF2_BUILD_FRAME_INFO) | |
2895 | #error "Non multi-arch definition of DWARF2_BUILD_FRAME_INFO" | |
2896 | #endif | |
c25083af | 2897 | #if !defined (DWARF2_BUILD_FRAME_INFO) |
b6af0555 JS |
2898 | #define DWARF2_BUILD_FRAME_INFO(objfile) (gdbarch_dwarf2_build_frame_info (current_gdbarch, objfile)) |
2899 | #endif | |
b6af0555 | 2900 | |
a2cf933a EZ |
2901 | /* Default (function) for non- multi-arch platforms. */ |
2902 | #if (!GDB_MULTI_ARCH) && !defined (ELF_MAKE_MSYMBOL_SPECIAL) | |
2903 | #define ELF_MAKE_MSYMBOL_SPECIAL(sym, msym) (default_elf_make_msymbol_special (sym, msym)) | |
2904 | #endif | |
2905 | ||
2906 | typedef void (gdbarch_elf_make_msymbol_special_ftype) (asymbol *sym, struct minimal_symbol *msym); | |
2907 | extern void gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym); | |
2908 | extern void set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special); | |
2909 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ELF_MAKE_MSYMBOL_SPECIAL) | |
2910 | #error "Non multi-arch definition of ELF_MAKE_MSYMBOL_SPECIAL" | |
2911 | #endif | |
c25083af | 2912 | #if !defined (ELF_MAKE_MSYMBOL_SPECIAL) |
a2cf933a EZ |
2913 | #define ELF_MAKE_MSYMBOL_SPECIAL(sym, msym) (gdbarch_elf_make_msymbol_special (current_gdbarch, sym, msym)) |
2914 | #endif | |
a2cf933a EZ |
2915 | |
2916 | /* Default (function) for non- multi-arch platforms. */ | |
2917 | #if (!GDB_MULTI_ARCH) && !defined (COFF_MAKE_MSYMBOL_SPECIAL) | |
2918 | #define COFF_MAKE_MSYMBOL_SPECIAL(val, msym) (default_coff_make_msymbol_special (val, msym)) | |
2919 | #endif | |
2920 | ||
2921 | typedef void (gdbarch_coff_make_msymbol_special_ftype) (int val, struct minimal_symbol *msym); | |
2922 | extern void gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym); | |
2923 | extern void set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special); | |
2924 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (COFF_MAKE_MSYMBOL_SPECIAL) | |
2925 | #error "Non multi-arch definition of COFF_MAKE_MSYMBOL_SPECIAL" | |
2926 | #endif | |
c25083af | 2927 | #if !defined (COFF_MAKE_MSYMBOL_SPECIAL) |
a2cf933a EZ |
2928 | #define COFF_MAKE_MSYMBOL_SPECIAL(val, msym) (gdbarch_coff_make_msymbol_special (current_gdbarch, val, msym)) |
2929 | #endif | |
a2cf933a | 2930 | |
5720643c JB |
2931 | /* Default (value) for non- multi-arch platforms. */ |
2932 | #if (!GDB_MULTI_ARCH) && !defined (NAME_OF_MALLOC) | |
2933 | #define NAME_OF_MALLOC ("malloc") | |
2934 | #endif | |
2935 | ||
2936 | extern const char * gdbarch_name_of_malloc (struct gdbarch *gdbarch); | |
2937 | extern void set_gdbarch_name_of_malloc (struct gdbarch *gdbarch, const char * name_of_malloc); | |
2938 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NAME_OF_MALLOC) | |
2939 | #error "Non multi-arch definition of NAME_OF_MALLOC" | |
2940 | #endif | |
c25083af | 2941 | #if !defined (NAME_OF_MALLOC) |
5720643c JB |
2942 | #define NAME_OF_MALLOC (gdbarch_name_of_malloc (current_gdbarch)) |
2943 | #endif | |
5720643c | 2944 | |
c4ed33b9 AC |
2945 | /* Default (value) for non- multi-arch platforms. */ |
2946 | #if (!GDB_MULTI_ARCH) && !defined (CANNOT_STEP_BREAKPOINT) | |
2947 | #define CANNOT_STEP_BREAKPOINT (0) | |
2948 | #endif | |
2949 | ||
2950 | extern int gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch); | |
2951 | extern void set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch, int cannot_step_breakpoint); | |
2952 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CANNOT_STEP_BREAKPOINT) | |
2953 | #error "Non multi-arch definition of CANNOT_STEP_BREAKPOINT" | |
2954 | #endif | |
c25083af | 2955 | #if !defined (CANNOT_STEP_BREAKPOINT) |
c4ed33b9 AC |
2956 | #define CANNOT_STEP_BREAKPOINT (gdbarch_cannot_step_breakpoint (current_gdbarch)) |
2957 | #endif | |
c4ed33b9 | 2958 | |
f74fa174 MM |
2959 | /* Default (value) for non- multi-arch platforms. */ |
2960 | #if (!GDB_MULTI_ARCH) && !defined (HAVE_NONSTEPPABLE_WATCHPOINT) | |
2961 | #define HAVE_NONSTEPPABLE_WATCHPOINT (0) | |
2962 | #endif | |
2963 | ||
2964 | extern int gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch); | |
2965 | extern void set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch, int have_nonsteppable_watchpoint); | |
2966 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (HAVE_NONSTEPPABLE_WATCHPOINT) | |
2967 | #error "Non multi-arch definition of HAVE_NONSTEPPABLE_WATCHPOINT" | |
2968 | #endif | |
c25083af | 2969 | #if !defined (HAVE_NONSTEPPABLE_WATCHPOINT) |
f74fa174 MM |
2970 | #define HAVE_NONSTEPPABLE_WATCHPOINT (gdbarch_have_nonsteppable_watchpoint (current_gdbarch)) |
2971 | #endif | |
f74fa174 | 2972 | |
8b2dbe47 KB |
2973 | #if defined (ADDRESS_CLASS_TYPE_FLAGS) |
2974 | /* Legacy for systems yet to multi-arch ADDRESS_CLASS_TYPE_FLAGS */ | |
2975 | #if !defined (ADDRESS_CLASS_TYPE_FLAGS_P) | |
2976 | #define ADDRESS_CLASS_TYPE_FLAGS_P() (1) | |
2977 | #endif | |
2978 | #endif | |
2979 | ||
2980 | /* Default predicate for non- multi-arch targets. */ | |
2981 | #if (!GDB_MULTI_ARCH) && !defined (ADDRESS_CLASS_TYPE_FLAGS_P) | |
2982 | #define ADDRESS_CLASS_TYPE_FLAGS_P() (0) | |
2983 | #endif | |
2984 | ||
2985 | extern int gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch); | |
2986 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDRESS_CLASS_TYPE_FLAGS_P) | |
2987 | #error "Non multi-arch definition of ADDRESS_CLASS_TYPE_FLAGS" | |
2988 | #endif | |
2989 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ADDRESS_CLASS_TYPE_FLAGS_P) | |
2990 | #define ADDRESS_CLASS_TYPE_FLAGS_P() (gdbarch_address_class_type_flags_p (current_gdbarch)) | |
2991 | #endif | |
2992 | ||
2993 | /* Default (function) for non- multi-arch platforms. */ | |
2994 | #if (!GDB_MULTI_ARCH) && !defined (ADDRESS_CLASS_TYPE_FLAGS) | |
2995 | #define ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class) (internal_error (__FILE__, __LINE__, "ADDRESS_CLASS_TYPE_FLAGS"), 0) | |
2996 | #endif | |
2997 | ||
2998 | typedef int (gdbarch_address_class_type_flags_ftype) (int byte_size, int dwarf2_addr_class); | |
2999 | extern int gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class); | |
3000 | extern void set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch, gdbarch_address_class_type_flags_ftype *address_class_type_flags); | |
3001 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDRESS_CLASS_TYPE_FLAGS) | |
3002 | #error "Non multi-arch definition of ADDRESS_CLASS_TYPE_FLAGS" | |
3003 | #endif | |
c25083af | 3004 | #if !defined (ADDRESS_CLASS_TYPE_FLAGS) |
8b2dbe47 KB |
3005 | #define ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class) (gdbarch_address_class_type_flags (current_gdbarch, byte_size, dwarf2_addr_class)) |
3006 | #endif | |
8b2dbe47 | 3007 | |
8b2dbe47 | 3008 | extern int gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch); |
8b2dbe47 | 3009 | |
321432c0 KB |
3010 | typedef const char * (gdbarch_address_class_type_flags_to_name_ftype) (struct gdbarch *gdbarch, int type_flags); |
3011 | extern const char * gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags); | |
8b2dbe47 | 3012 | 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 |
3013 | |
3014 | extern int gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch); | |
8b2dbe47 | 3015 | |
321432c0 KB |
3016 | typedef int (gdbarch_address_class_name_to_type_flags_ftype) (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr); |
3017 | extern int gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr); | |
8b2dbe47 | 3018 | 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 | 3019 | |
b59ff9d5 AC |
3020 | /* Is a register in a group */ |
3021 | ||
3022 | typedef int (gdbarch_register_reggroup_p_ftype) (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup); | |
3023 | extern int gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup); | |
3024 | extern void set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch, gdbarch_register_reggroup_p_ftype *register_reggroup_p); | |
3025 | ||
143985b7 AF |
3026 | /* Fetch the pointer to the ith function argument. */ |
3027 | ||
3028 | #if defined (FETCH_POINTER_ARGUMENT) | |
3029 | /* Legacy for systems yet to multi-arch FETCH_POINTER_ARGUMENT */ | |
3030 | #if !defined (FETCH_POINTER_ARGUMENT_P) | |
3031 | #define FETCH_POINTER_ARGUMENT_P() (1) | |
3032 | #endif | |
3033 | #endif | |
3034 | ||
3035 | /* Default predicate for non- multi-arch targets. */ | |
3036 | #if (!GDB_MULTI_ARCH) && !defined (FETCH_POINTER_ARGUMENT_P) | |
3037 | #define FETCH_POINTER_ARGUMENT_P() (0) | |
3038 | #endif | |
3039 | ||
3040 | extern int gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch); | |
3041 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FETCH_POINTER_ARGUMENT_P) | |
3042 | #error "Non multi-arch definition of FETCH_POINTER_ARGUMENT" | |
3043 | #endif | |
3044 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FETCH_POINTER_ARGUMENT_P) | |
3045 | #define FETCH_POINTER_ARGUMENT_P() (gdbarch_fetch_pointer_argument_p (current_gdbarch)) | |
3046 | #endif | |
3047 | ||
3048 | /* Default (function) for non- multi-arch platforms. */ | |
3049 | #if (!GDB_MULTI_ARCH) && !defined (FETCH_POINTER_ARGUMENT) | |
3050 | #define FETCH_POINTER_ARGUMENT(frame, argi, type) (internal_error (__FILE__, __LINE__, "FETCH_POINTER_ARGUMENT"), 0) | |
3051 | #endif | |
3052 | ||
3053 | typedef CORE_ADDR (gdbarch_fetch_pointer_argument_ftype) (struct frame_info *frame, int argi, struct type *type); | |
3054 | extern CORE_ADDR gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type); | |
3055 | extern void set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument); | |
3056 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FETCH_POINTER_ARGUMENT) | |
3057 | #error "Non multi-arch definition of FETCH_POINTER_ARGUMENT" | |
3058 | #endif | |
3059 | #if !defined (FETCH_POINTER_ARGUMENT) | |
3060 | #define FETCH_POINTER_ARGUMENT(frame, argi, type) (gdbarch_fetch_pointer_argument (current_gdbarch, frame, argi, type)) | |
3061 | #endif | |
3062 | ||
104c1213 | 3063 | extern struct gdbarch_tdep *gdbarch_tdep (struct gdbarch *gdbarch); |
0f71a2f6 JM |
3064 | |
3065 | ||
3066 | /* Mechanism for co-ordinating the selection of a specific | |
3067 | architecture. | |
3068 | ||
3069 | GDB targets (*-tdep.c) can register an interest in a specific | |
3070 | architecture. Other GDB components can register a need to maintain | |
3071 | per-architecture data. | |
3072 | ||
3073 | The mechanisms below ensures that there is only a loose connection | |
3074 | between the set-architecture command and the various GDB | |
99e7bb18 | 3075 | components. Each component can independently register their need |
0f71a2f6 JM |
3076 | to maintain architecture specific data with gdbarch. |
3077 | ||
3078 | Pragmatics: | |
3079 | ||
3080 | Previously, a single TARGET_ARCHITECTURE_HOOK was provided. It | |
3081 | didn't scale. | |
3082 | ||
3083 | The more traditional mega-struct containing architecture specific | |
3084 | data for all the various GDB components was also considered. Since | |
99e7bb18 | 3085 | GDB is built from a variable number of (fairly independent) |
0f71a2f6 JM |
3086 | components it was determined that the global aproach was not |
3087 | applicable. */ | |
3088 | ||
3089 | ||
3090 | /* Register a new architectural family with GDB. | |
3091 | ||
3092 | Register support for the specified ARCHITECTURE with GDB. When | |
3093 | gdbarch determines that the specified architecture has been | |
3094 | selected, the corresponding INIT function is called. | |
3095 | ||
3096 | -- | |
3097 | ||
3098 | The INIT function takes two parameters: INFO which contains the | |
3099 | information available to gdbarch about the (possibly new) | |
3100 | architecture; ARCHES which is a list of the previously created | |
3101 | ``struct gdbarch'' for this architecture. | |
3102 | ||
0f79675b AC |
3103 | The INFO parameter is, as far as possible, be pre-initialized with |
3104 | information obtained from INFO.ABFD or the previously selected | |
3105 | architecture. | |
3106 | ||
3107 | The ARCHES parameter is a linked list (sorted most recently used) | |
3108 | of all the previously created architures for this architecture | |
3109 | family. The (possibly NULL) ARCHES->gdbarch can used to access | |
3110 | values from the previously selected architecture for this | |
3111 | architecture family. The global ``current_gdbarch'' shall not be | |
3112 | used. | |
0f71a2f6 JM |
3113 | |
3114 | The INIT function shall return any of: NULL - indicating that it | |
ec3d358c | 3115 | doesn't recognize the selected architecture; an existing ``struct |
0f71a2f6 JM |
3116 | gdbarch'' from the ARCHES list - indicating that the new |
3117 | architecture is just a synonym for an earlier architecture (see | |
3118 | gdbarch_list_lookup_by_info()); a newly created ``struct gdbarch'' | |
4b9b3959 AC |
3119 | - that describes the selected architecture (see gdbarch_alloc()). |
3120 | ||
3121 | The DUMP_TDEP function shall print out all target specific values. | |
3122 | Care should be taken to ensure that the function works in both the | |
3123 | multi-arch and non- multi-arch cases. */ | |
0f71a2f6 | 3124 | |
adf40b2e JM |
3125 | struct gdbarch_list |
3126 | { | |
3127 | struct gdbarch *gdbarch; | |
3128 | struct gdbarch_list *next; | |
3129 | }; | |
0f71a2f6 | 3130 | |
adf40b2e JM |
3131 | struct gdbarch_info |
3132 | { | |
adf40b2e JM |
3133 | /* Use default: NULL (ZERO). */ |
3134 | const struct bfd_arch_info *bfd_arch_info; | |
0f71a2f6 | 3135 | |
428721aa | 3136 | /* Use default: BFD_ENDIAN_UNKNOWN (NB: is not ZERO). */ |
adf40b2e | 3137 | int byte_order; |
0f71a2f6 | 3138 | |
adf40b2e JM |
3139 | /* Use default: NULL (ZERO). */ |
3140 | bfd *abfd; | |
0f71a2f6 | 3141 | |
adf40b2e JM |
3142 | /* Use default: NULL (ZERO). */ |
3143 | struct gdbarch_tdep_info *tdep_info; | |
4be87837 DJ |
3144 | |
3145 | /* Use default: GDB_OSABI_UNINITIALIZED (-1). */ | |
3146 | enum gdb_osabi osabi; | |
adf40b2e | 3147 | }; |
0f71a2f6 | 3148 | |
104c1213 | 3149 | typedef struct gdbarch *(gdbarch_init_ftype) (struct gdbarch_info info, struct gdbarch_list *arches); |
4b9b3959 | 3150 | typedef void (gdbarch_dump_tdep_ftype) (struct gdbarch *gdbarch, struct ui_file *file); |
0f71a2f6 | 3151 | |
4b9b3959 | 3152 | /* DEPRECATED - use gdbarch_register() */ |
104c1213 | 3153 | extern void register_gdbarch_init (enum bfd_architecture architecture, gdbarch_init_ftype *); |
0f71a2f6 | 3154 | |
4b9b3959 AC |
3155 | extern void gdbarch_register (enum bfd_architecture architecture, |
3156 | gdbarch_init_ftype *, | |
3157 | gdbarch_dump_tdep_ftype *); | |
3158 | ||
0f71a2f6 | 3159 | |
b4a20239 AC |
3160 | /* Return a freshly allocated, NULL terminated, array of the valid |
3161 | architecture names. Since architectures are registered during the | |
3162 | _initialize phase this function only returns useful information | |
3163 | once initialization has been completed. */ | |
3164 | ||
3165 | extern const char **gdbarch_printable_names (void); | |
3166 | ||
3167 | ||
0f71a2f6 JM |
3168 | /* Helper function. Search the list of ARCHES for a GDBARCH that |
3169 | matches the information provided by INFO. */ | |
3170 | ||
104c1213 | 3171 | extern struct gdbarch_list *gdbarch_list_lookup_by_info (struct gdbarch_list *arches, const struct gdbarch_info *info); |
0f71a2f6 JM |
3172 | |
3173 | ||
3174 | /* Helper function. Create a preliminary ``struct gdbarch''. Perform | |
3175 | basic initialization using values obtained from the INFO andTDEP | |
3176 | parameters. set_gdbarch_*() functions are called to complete the | |
3177 | initialization of the object. */ | |
3178 | ||
104c1213 | 3179 | extern struct gdbarch *gdbarch_alloc (const struct gdbarch_info *info, struct gdbarch_tdep *tdep); |
0f71a2f6 JM |
3180 | |
3181 | ||
4b9b3959 AC |
3182 | /* Helper function. Free a partially-constructed ``struct gdbarch''. |
3183 | It is assumed that the caller freeds the ``struct | |
3184 | gdbarch_tdep''. */ | |
3185 | ||
058f20d5 JB |
3186 | extern void gdbarch_free (struct gdbarch *); |
3187 | ||
3188 | ||
b732d07d | 3189 | /* Helper function. Force an update of the current architecture. |
0f71a2f6 | 3190 | |
b732d07d AC |
3191 | The actual architecture selected is determined by INFO, ``(gdb) set |
3192 | architecture'' et.al., the existing architecture and BFD's default | |
3193 | architecture. INFO should be initialized to zero and then selected | |
3194 | fields should be updated. | |
0f71a2f6 | 3195 | |
16f33e29 AC |
3196 | Returns non-zero if the update succeeds */ |
3197 | ||
3198 | extern int gdbarch_update_p (struct gdbarch_info info); | |
0f71a2f6 JM |
3199 | |
3200 | ||
3201 | ||
3202 | /* Register per-architecture data-pointer. | |
3203 | ||
3204 | Reserve space for a per-architecture data-pointer. An identifier | |
3205 | for the reserved data-pointer is returned. That identifer should | |
95160752 | 3206 | be saved in a local static variable. |
0f71a2f6 | 3207 | |
76860b5f AC |
3208 | The per-architecture data-pointer is either initialized explicitly |
3209 | (set_gdbarch_data()) or implicitly (by INIT() via a call to | |
3210 | gdbarch_data()). FREE() is called to delete either an existing | |
2af496cb | 3211 | data-pointer overridden by set_gdbarch_data() or when the |
76860b5f | 3212 | architecture object is being deleted. |
0f71a2f6 | 3213 | |
95160752 AC |
3214 | When a previously created architecture is re-selected, the |
3215 | per-architecture data-pointer for that previous architecture is | |
76860b5f | 3216 | restored. INIT() is not re-called. |
0f71a2f6 JM |
3217 | |
3218 | Multiple registrarants for any architecture are allowed (and | |
3219 | strongly encouraged). */ | |
3220 | ||
95160752 | 3221 | struct gdbarch_data; |
0f71a2f6 | 3222 | |
95160752 AC |
3223 | typedef void *(gdbarch_data_init_ftype) (struct gdbarch *gdbarch); |
3224 | typedef void (gdbarch_data_free_ftype) (struct gdbarch *gdbarch, | |
3225 | void *pointer); | |
3226 | extern struct gdbarch_data *register_gdbarch_data (gdbarch_data_init_ftype *init, | |
3227 | gdbarch_data_free_ftype *free); | |
3228 | extern void set_gdbarch_data (struct gdbarch *gdbarch, | |
3229 | struct gdbarch_data *data, | |
3230 | void *pointer); | |
0f71a2f6 | 3231 | |
451fbdda | 3232 | extern void *gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *); |
0f71a2f6 JM |
3233 | |
3234 | ||
0f71a2f6 JM |
3235 | /* Register per-architecture memory region. |
3236 | ||
3237 | Provide a memory-region swap mechanism. Per-architecture memory | |
3238 | region are created. These memory regions are swapped whenever the | |
3239 | architecture is changed. For a new architecture, the memory region | |
3240 | is initialized with zero (0) and the INIT function is called. | |
3241 | ||
3242 | Memory regions are swapped / initialized in the order that they are | |
3243 | registered. NULL DATA and/or INIT values can be specified. | |
3244 | ||
3245 | New code should use register_gdbarch_data(). */ | |
3246 | ||
104c1213 JM |
3247 | typedef void (gdbarch_swap_ftype) (void); |
3248 | extern void register_gdbarch_swap (void *data, unsigned long size, gdbarch_swap_ftype *init); | |
e514a9d6 | 3249 | #define REGISTER_GDBARCH_SWAP(VAR) register_gdbarch_swap (&(VAR), sizeof ((VAR)), NULL) |
0f71a2f6 JM |
3250 | |
3251 | ||
3252 | ||
99e7bb18 | 3253 | /* The target-system-dependent byte order is dynamic */ |
c906108c | 3254 | |
adf40b2e | 3255 | extern int target_byte_order; |
c906108c SS |
3256 | #ifndef TARGET_BYTE_ORDER |
3257 | #define TARGET_BYTE_ORDER (target_byte_order + 0) | |
3258 | #endif | |
3259 | ||
adf40b2e | 3260 | extern int target_byte_order_auto; |
c906108c SS |
3261 | #ifndef TARGET_BYTE_ORDER_AUTO |
3262 | #define TARGET_BYTE_ORDER_AUTO (target_byte_order_auto + 0) | |
3263 | #endif | |
3264 | ||
3265 | ||
3266 | ||
99e7bb18 | 3267 | /* The target-system-dependent BFD architecture is dynamic */ |
c906108c | 3268 | |
adf40b2e | 3269 | extern int target_architecture_auto; |
c906108c SS |
3270 | #ifndef TARGET_ARCHITECTURE_AUTO |
3271 | #define TARGET_ARCHITECTURE_AUTO (target_architecture_auto + 0) | |
3272 | #endif | |
3273 | ||
adf40b2e | 3274 | extern const struct bfd_arch_info *target_architecture; |
c906108c SS |
3275 | #ifndef TARGET_ARCHITECTURE |
3276 | #define TARGET_ARCHITECTURE (target_architecture + 0) | |
3277 | #endif | |
3278 | ||
c906108c | 3279 | |
99e7bb18 | 3280 | /* The target-system-dependent disassembler is semi-dynamic */ |
c906108c | 3281 | |
810ecf9f | 3282 | /* Use gdb_disassemble, and gdbarch_print_insn instead. */ |
d7a27068 | 3283 | extern int (*deprecated_tm_print_insn) (bfd_vma, disassemble_info*); |
c906108c | 3284 | |
810ecf9f AC |
3285 | /* Use set_gdbarch_print_insn instead. */ |
3286 | extern disassemble_info deprecated_tm_print_insn_info; | |
c906108c | 3287 | |
99e7bb18 | 3288 | /* Set the dynamic target-system-dependent parameters (architecture, |
c906108c SS |
3289 | byte-order, ...) using information found in the BFD */ |
3290 | ||
104c1213 | 3291 | extern void set_gdbarch_from_file (bfd *); |
c906108c SS |
3292 | |
3293 | ||
e514a9d6 JM |
3294 | /* Initialize the current architecture to the "first" one we find on |
3295 | our list. */ | |
3296 | ||
3297 | extern void initialize_current_architecture (void); | |
3298 | ||
ceaa8edf JB |
3299 | /* For non-multiarched targets, do any initialization of the default |
3300 | gdbarch object necessary after the _initialize_MODULE functions | |
3301 | have run. */ | |
5ae5f592 | 3302 | extern void initialize_non_multiarch (void); |
cce74817 | 3303 | |
c906108c | 3304 | /* gdbarch trace variable */ |
adf40b2e | 3305 | extern int gdbarch_debug; |
c906108c | 3306 | |
4b9b3959 | 3307 | extern void gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file); |
0f71a2f6 | 3308 | |
c906108c | 3309 | #endif |