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 | |
33489c5b | 1450 | /* Default (function) for non- multi-arch platforms. */ |
6166d547 | 1451 | #if (!GDB_MULTI_ARCH) && !defined (REGISTER_CONVERTIBLE) |
33489c5b AC |
1452 | #define REGISTER_CONVERTIBLE(nr) (generic_register_convertible_not (nr)) |
1453 | #endif | |
1454 | ||
104c1213 JM |
1455 | typedef int (gdbarch_register_convertible_ftype) (int nr); |
1456 | extern int gdbarch_register_convertible (struct gdbarch *gdbarch, int nr); | |
1457 | extern void set_gdbarch_register_convertible (struct gdbarch *gdbarch, gdbarch_register_convertible_ftype *register_convertible); | |
83905903 AC |
1458 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_CONVERTIBLE) |
1459 | #error "Non multi-arch definition of REGISTER_CONVERTIBLE" | |
1460 | #endif | |
c25083af | 1461 | #if !defined (REGISTER_CONVERTIBLE) |
0f71a2f6 JM |
1462 | #define REGISTER_CONVERTIBLE(nr) (gdbarch_register_convertible (current_gdbarch, nr)) |
1463 | #endif | |
33489c5b AC |
1464 | |
1465 | /* Default (function) for non- multi-arch platforms. */ | |
6166d547 | 1466 | #if (!GDB_MULTI_ARCH) && !defined (REGISTER_CONVERT_TO_VIRTUAL) |
8e65ff28 | 1467 | #define REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to) (internal_error (__FILE__, __LINE__, "REGISTER_CONVERT_TO_VIRTUAL"), 0) |
33489c5b | 1468 | #endif |
0f71a2f6 | 1469 | |
104c1213 JM |
1470 | typedef void (gdbarch_register_convert_to_virtual_ftype) (int regnum, struct type *type, char *from, char *to); |
1471 | extern void gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to); | |
1472 | extern void set_gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, gdbarch_register_convert_to_virtual_ftype *register_convert_to_virtual); | |
83905903 AC |
1473 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_CONVERT_TO_VIRTUAL) |
1474 | #error "Non multi-arch definition of REGISTER_CONVERT_TO_VIRTUAL" | |
1475 | #endif | |
c25083af | 1476 | #if !defined (REGISTER_CONVERT_TO_VIRTUAL) |
0f71a2f6 JM |
1477 | #define REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to) (gdbarch_register_convert_to_virtual (current_gdbarch, regnum, type, from, to)) |
1478 | #endif | |
33489c5b AC |
1479 | |
1480 | /* Default (function) for non- multi-arch platforms. */ | |
6166d547 | 1481 | #if (!GDB_MULTI_ARCH) && !defined (REGISTER_CONVERT_TO_RAW) |
8e65ff28 | 1482 | #define REGISTER_CONVERT_TO_RAW(type, regnum, from, to) (internal_error (__FILE__, __LINE__, "REGISTER_CONVERT_TO_RAW"), 0) |
33489c5b | 1483 | #endif |
0f71a2f6 | 1484 | |
104c1213 JM |
1485 | typedef void (gdbarch_register_convert_to_raw_ftype) (struct type *type, int regnum, char *from, char *to); |
1486 | extern void gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to); | |
1487 | extern void set_gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, gdbarch_register_convert_to_raw_ftype *register_convert_to_raw); | |
83905903 AC |
1488 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_CONVERT_TO_RAW) |
1489 | #error "Non multi-arch definition of REGISTER_CONVERT_TO_RAW" | |
1490 | #endif | |
c25083af | 1491 | #if !defined (REGISTER_CONVERT_TO_RAW) |
0f71a2f6 JM |
1492 | #define REGISTER_CONVERT_TO_RAW(type, regnum, from, to) (gdbarch_register_convert_to_raw (current_gdbarch, type, regnum, from, to)) |
1493 | #endif | |
33489c5b | 1494 | |
13d01224 AC |
1495 | /* Default (function) for non- multi-arch platforms. */ |
1496 | #if (!GDB_MULTI_ARCH) && !defined (CONVERT_REGISTER_P) | |
1497 | #define CONVERT_REGISTER_P(regnum) (legacy_convert_register_p (regnum)) | |
1498 | #endif | |
1499 | ||
1500 | typedef int (gdbarch_convert_register_p_ftype) (int regnum); | |
1501 | extern int gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum); | |
1502 | extern void set_gdbarch_convert_register_p (struct gdbarch *gdbarch, gdbarch_convert_register_p_ftype *convert_register_p); | |
1503 | #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (CONVERT_REGISTER_P) | |
1504 | #error "Non multi-arch definition of CONVERT_REGISTER_P" | |
1505 | #endif | |
c25083af | 1506 | #if !defined (CONVERT_REGISTER_P) |
13d01224 AC |
1507 | #define CONVERT_REGISTER_P(regnum) (gdbarch_convert_register_p (current_gdbarch, regnum)) |
1508 | #endif | |
13d01224 AC |
1509 | |
1510 | /* Default (function) for non- multi-arch platforms. */ | |
1511 | #if (!GDB_MULTI_ARCH) && !defined (REGISTER_TO_VALUE) | |
1512 | #define REGISTER_TO_VALUE(regnum, type, from, to) (legacy_register_to_value (regnum, type, from, to)) | |
1513 | #endif | |
1514 | ||
1515 | typedef void (gdbarch_register_to_value_ftype) (int regnum, struct type *type, char *from, char *to); | |
1516 | extern void gdbarch_register_to_value (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to); | |
1517 | extern void set_gdbarch_register_to_value (struct gdbarch *gdbarch, gdbarch_register_to_value_ftype *register_to_value); | |
1518 | #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_TO_VALUE) | |
1519 | #error "Non multi-arch definition of REGISTER_TO_VALUE" | |
1520 | #endif | |
c25083af | 1521 | #if !defined (REGISTER_TO_VALUE) |
13d01224 AC |
1522 | #define REGISTER_TO_VALUE(regnum, type, from, to) (gdbarch_register_to_value (current_gdbarch, regnum, type, from, to)) |
1523 | #endif | |
13d01224 AC |
1524 | |
1525 | /* Default (function) for non- multi-arch platforms. */ | |
1526 | #if (!GDB_MULTI_ARCH) && !defined (VALUE_TO_REGISTER) | |
1527 | #define VALUE_TO_REGISTER(type, regnum, from, to) (legacy_value_to_register (type, regnum, from, to)) | |
1528 | #endif | |
1529 | ||
1530 | typedef void (gdbarch_value_to_register_ftype) (struct type *type, int regnum, char *from, char *to); | |
1531 | extern void gdbarch_value_to_register (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to); | |
1532 | extern void set_gdbarch_value_to_register (struct gdbarch *gdbarch, gdbarch_value_to_register_ftype *value_to_register); | |
1533 | #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (VALUE_TO_REGISTER) | |
1534 | #error "Non multi-arch definition of VALUE_TO_REGISTER" | |
1535 | #endif | |
c25083af | 1536 | #if !defined (VALUE_TO_REGISTER) |
13d01224 AC |
1537 | #define VALUE_TO_REGISTER(type, regnum, from, to) (gdbarch_value_to_register (current_gdbarch, type, regnum, from, to)) |
1538 | #endif | |
13d01224 | 1539 | |
33489c5b | 1540 | /* Default (function) for non- multi-arch platforms. */ |
6166d547 | 1541 | #if (!GDB_MULTI_ARCH) && !defined (POINTER_TO_ADDRESS) |
ac2e2ef7 | 1542 | #define POINTER_TO_ADDRESS(type, buf) (unsigned_pointer_to_address (type, buf)) |
33489c5b | 1543 | #endif |
4478b372 | 1544 | |
66140c26 AC |
1545 | typedef CORE_ADDR (gdbarch_pointer_to_address_ftype) (struct type *type, const void *buf); |
1546 | extern CORE_ADDR gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const void *buf); | |
4478b372 | 1547 | extern void set_gdbarch_pointer_to_address (struct gdbarch *gdbarch, gdbarch_pointer_to_address_ftype *pointer_to_address); |
83905903 AC |
1548 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (POINTER_TO_ADDRESS) |
1549 | #error "Non multi-arch definition of POINTER_TO_ADDRESS" | |
1550 | #endif | |
c25083af | 1551 | #if !defined (POINTER_TO_ADDRESS) |
4478b372 JB |
1552 | #define POINTER_TO_ADDRESS(type, buf) (gdbarch_pointer_to_address (current_gdbarch, type, buf)) |
1553 | #endif | |
33489c5b AC |
1554 | |
1555 | /* Default (function) for non- multi-arch platforms. */ | |
6166d547 | 1556 | #if (!GDB_MULTI_ARCH) && !defined (ADDRESS_TO_POINTER) |
ac2e2ef7 | 1557 | #define ADDRESS_TO_POINTER(type, buf, addr) (unsigned_address_to_pointer (type, buf, addr)) |
33489c5b | 1558 | #endif |
4478b372 | 1559 | |
ac2e2ef7 AC |
1560 | typedef void (gdbarch_address_to_pointer_ftype) (struct type *type, void *buf, CORE_ADDR addr); |
1561 | extern void gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr); | |
4478b372 | 1562 | extern void set_gdbarch_address_to_pointer (struct gdbarch *gdbarch, gdbarch_address_to_pointer_ftype *address_to_pointer); |
83905903 AC |
1563 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDRESS_TO_POINTER) |
1564 | #error "Non multi-arch definition of ADDRESS_TO_POINTER" | |
1565 | #endif | |
c25083af | 1566 | #if !defined (ADDRESS_TO_POINTER) |
4478b372 JB |
1567 | #define ADDRESS_TO_POINTER(type, buf, addr) (gdbarch_address_to_pointer (current_gdbarch, type, buf, addr)) |
1568 | #endif | |
33489c5b | 1569 | |
fc0c74b1 AC |
1570 | #if defined (INTEGER_TO_ADDRESS) |
1571 | /* Legacy for systems yet to multi-arch INTEGER_TO_ADDRESS */ | |
1572 | #if !defined (INTEGER_TO_ADDRESS_P) | |
1573 | #define INTEGER_TO_ADDRESS_P() (1) | |
1574 | #endif | |
1575 | #endif | |
1576 | ||
1577 | /* Default predicate for non- multi-arch targets. */ | |
1578 | #if (!GDB_MULTI_ARCH) && !defined (INTEGER_TO_ADDRESS_P) | |
1579 | #define INTEGER_TO_ADDRESS_P() (0) | |
1580 | #endif | |
1581 | ||
1582 | extern int gdbarch_integer_to_address_p (struct gdbarch *gdbarch); | |
1583 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INTEGER_TO_ADDRESS_P) | |
1584 | #error "Non multi-arch definition of INTEGER_TO_ADDRESS" | |
1585 | #endif | |
1586 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (INTEGER_TO_ADDRESS_P) | |
1587 | #define INTEGER_TO_ADDRESS_P() (gdbarch_integer_to_address_p (current_gdbarch)) | |
1588 | #endif | |
1589 | ||
1590 | /* Default (function) for non- multi-arch platforms. */ | |
1591 | #if (!GDB_MULTI_ARCH) && !defined (INTEGER_TO_ADDRESS) | |
73d3c16e | 1592 | #define INTEGER_TO_ADDRESS(type, buf) (internal_error (__FILE__, __LINE__, "INTEGER_TO_ADDRESS"), 0) |
fc0c74b1 AC |
1593 | #endif |
1594 | ||
1595 | typedef CORE_ADDR (gdbarch_integer_to_address_ftype) (struct type *type, void *buf); | |
1596 | extern CORE_ADDR gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf); | |
1597 | extern void set_gdbarch_integer_to_address (struct gdbarch *gdbarch, gdbarch_integer_to_address_ftype *integer_to_address); | |
1598 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INTEGER_TO_ADDRESS) | |
1599 | #error "Non multi-arch definition of INTEGER_TO_ADDRESS" | |
1600 | #endif | |
c25083af | 1601 | #if !defined (INTEGER_TO_ADDRESS) |
fc0c74b1 AC |
1602 | #define INTEGER_TO_ADDRESS(type, buf) (gdbarch_integer_to_address (current_gdbarch, type, buf)) |
1603 | #endif | |
fc0c74b1 | 1604 | |
33489c5b | 1605 | /* Default (function) for non- multi-arch platforms. */ |
6166d547 | 1606 | #if (!GDB_MULTI_ARCH) && !defined (RETURN_VALUE_ON_STACK) |
33489c5b AC |
1607 | #define RETURN_VALUE_ON_STACK(type) (generic_return_value_on_stack_not (type)) |
1608 | #endif | |
0f71a2f6 | 1609 | |
71a9f22e JB |
1610 | typedef int (gdbarch_return_value_on_stack_ftype) (struct type *type); |
1611 | extern int gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type); | |
1612 | extern void set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch, gdbarch_return_value_on_stack_ftype *return_value_on_stack); | |
83905903 AC |
1613 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (RETURN_VALUE_ON_STACK) |
1614 | #error "Non multi-arch definition of RETURN_VALUE_ON_STACK" | |
1615 | #endif | |
c25083af | 1616 | #if !defined (RETURN_VALUE_ON_STACK) |
71a9f22e JB |
1617 | #define RETURN_VALUE_ON_STACK(type) (gdbarch_return_value_on_stack (current_gdbarch, type)) |
1618 | #endif | |
1619 | ||
b81774d8 AC |
1620 | /* Replaced by PUSH_DUMMY_CALL */ |
1621 | ||
1622 | #if defined (DEPRECATED_PUSH_ARGUMENTS) | |
1623 | /* Legacy for systems yet to multi-arch DEPRECATED_PUSH_ARGUMENTS */ | |
1624 | #if !defined (DEPRECATED_PUSH_ARGUMENTS_P) | |
1625 | #define DEPRECATED_PUSH_ARGUMENTS_P() (1) | |
1626 | #endif | |
1627 | #endif | |
1628 | ||
1629 | /* Default predicate for non- multi-arch targets. */ | |
1630 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_ARGUMENTS_P) | |
1631 | #define DEPRECATED_PUSH_ARGUMENTS_P() (0) | |
1632 | #endif | |
1633 | ||
1634 | extern int gdbarch_deprecated_push_arguments_p (struct gdbarch *gdbarch); | |
1635 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_ARGUMENTS_P) | |
1636 | #error "Non multi-arch definition of DEPRECATED_PUSH_ARGUMENTS" | |
1637 | #endif | |
1638 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PUSH_ARGUMENTS_P) | |
1639 | #define DEPRECATED_PUSH_ARGUMENTS_P() (gdbarch_deprecated_push_arguments_p (current_gdbarch)) | |
1640 | #endif | |
1641 | ||
c203844d | 1642 | /* Default (function) for non- multi-arch platforms. */ |
b81774d8 AC |
1643 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_ARGUMENTS) |
1644 | #define DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) (internal_error (__FILE__, __LINE__, "DEPRECATED_PUSH_ARGUMENTS"), 0) | |
c203844d AC |
1645 | #endif |
1646 | ||
b81774d8 AC |
1647 | typedef CORE_ADDR (gdbarch_deprecated_push_arguments_ftype) (int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr); |
1648 | 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); | |
1649 | extern void set_gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, gdbarch_deprecated_push_arguments_ftype *deprecated_push_arguments); | |
1650 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_ARGUMENTS) | |
1651 | #error "Non multi-arch definition of DEPRECATED_PUSH_ARGUMENTS" | |
83905903 | 1652 | #endif |
c25083af | 1653 | #if !defined (DEPRECATED_PUSH_ARGUMENTS) |
b81774d8 | 1654 | #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 | 1655 | #endif |
0f71a2f6 | 1656 | |
b81774d8 AC |
1657 | extern int gdbarch_push_dummy_call_p (struct gdbarch *gdbarch); |
1658 | ||
6a65450a AC |
1659 | 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); |
1660 | 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 |
1661 | extern void set_gdbarch_push_dummy_call (struct gdbarch *gdbarch, gdbarch_push_dummy_call_ftype *push_dummy_call); |
1662 | ||
f3824013 AC |
1663 | #if defined (DEPRECATED_PUSH_DUMMY_FRAME) |
1664 | /* Legacy for systems yet to multi-arch DEPRECATED_PUSH_DUMMY_FRAME */ | |
1665 | #if !defined (DEPRECATED_PUSH_DUMMY_FRAME_P) | |
1666 | #define DEPRECATED_PUSH_DUMMY_FRAME_P() (1) | |
1667 | #endif | |
1668 | #endif | |
1669 | ||
1670 | /* Default predicate for non- multi-arch targets. */ | |
1671 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_DUMMY_FRAME_P) | |
1672 | #define DEPRECATED_PUSH_DUMMY_FRAME_P() (0) | |
1673 | #endif | |
1674 | ||
1675 | extern int gdbarch_deprecated_push_dummy_frame_p (struct gdbarch *gdbarch); | |
1676 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_DUMMY_FRAME_P) | |
1677 | #error "Non multi-arch definition of DEPRECATED_PUSH_DUMMY_FRAME" | |
1678 | #endif | |
1679 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PUSH_DUMMY_FRAME_P) | |
1680 | #define DEPRECATED_PUSH_DUMMY_FRAME_P() (gdbarch_deprecated_push_dummy_frame_p (current_gdbarch)) | |
1681 | #endif | |
1682 | ||
1683 | /* Default (function) for non- multi-arch platforms. */ | |
1684 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_DUMMY_FRAME) | |
1685 | #define DEPRECATED_PUSH_DUMMY_FRAME (internal_error (__FILE__, __LINE__, "DEPRECATED_PUSH_DUMMY_FRAME"), 0) | |
f3824013 AC |
1686 | #endif |
1687 | ||
1688 | typedef void (gdbarch_deprecated_push_dummy_frame_ftype) (void); | |
1689 | extern void gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch); | |
1690 | extern void set_gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch, gdbarch_deprecated_push_dummy_frame_ftype *deprecated_push_dummy_frame); | |
1691 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_DUMMY_FRAME) | |
1692 | #error "Non multi-arch definition of DEPRECATED_PUSH_DUMMY_FRAME" | |
83905903 | 1693 | #endif |
c25083af | 1694 | #if !defined (DEPRECATED_PUSH_DUMMY_FRAME) |
f3824013 | 1695 | #define DEPRECATED_PUSH_DUMMY_FRAME (gdbarch_deprecated_push_dummy_frame (current_gdbarch)) |
0f71a2f6 | 1696 | #endif |
0f71a2f6 | 1697 | |
28f617b3 AC |
1698 | /* NOTE: This can be handled directly in push_dummy_call. */ |
1699 | ||
1700 | #if defined (DEPRECATED_PUSH_RETURN_ADDRESS) | |
1701 | /* Legacy for systems yet to multi-arch DEPRECATED_PUSH_RETURN_ADDRESS */ | |
1702 | #if !defined (DEPRECATED_PUSH_RETURN_ADDRESS_P) | |
1703 | #define DEPRECATED_PUSH_RETURN_ADDRESS_P() (1) | |
69a0d5f4 AC |
1704 | #endif |
1705 | #endif | |
1706 | ||
1707 | /* Default predicate for non- multi-arch targets. */ | |
28f617b3 AC |
1708 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_RETURN_ADDRESS_P) |
1709 | #define DEPRECATED_PUSH_RETURN_ADDRESS_P() (0) | |
69a0d5f4 AC |
1710 | #endif |
1711 | ||
28f617b3 AC |
1712 | extern int gdbarch_deprecated_push_return_address_p (struct gdbarch *gdbarch); |
1713 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_RETURN_ADDRESS_P) | |
1714 | #error "Non multi-arch definition of DEPRECATED_PUSH_RETURN_ADDRESS" | |
69a0d5f4 | 1715 | #endif |
28f617b3 AC |
1716 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PUSH_RETURN_ADDRESS_P) |
1717 | #define DEPRECATED_PUSH_RETURN_ADDRESS_P() (gdbarch_deprecated_push_return_address_p (current_gdbarch)) | |
69a0d5f4 AC |
1718 | #endif |
1719 | ||
1720 | /* Default (function) for non- multi-arch platforms. */ | |
28f617b3 AC |
1721 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_RETURN_ADDRESS) |
1722 | #define DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp) (internal_error (__FILE__, __LINE__, "DEPRECATED_PUSH_RETURN_ADDRESS"), 0) | |
69a0d5f4 AC |
1723 | #endif |
1724 | ||
28f617b3 AC |
1725 | typedef CORE_ADDR (gdbarch_deprecated_push_return_address_ftype) (CORE_ADDR pc, CORE_ADDR sp); |
1726 | extern CORE_ADDR gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp); | |
1727 | extern void set_gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, gdbarch_deprecated_push_return_address_ftype *deprecated_push_return_address); | |
1728 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_RETURN_ADDRESS) | |
1729 | #error "Non multi-arch definition of DEPRECATED_PUSH_RETURN_ADDRESS" | |
83905903 | 1730 | #endif |
c25083af | 1731 | #if !defined (DEPRECATED_PUSH_RETURN_ADDRESS) |
28f617b3 | 1732 | #define DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp) (gdbarch_deprecated_push_return_address (current_gdbarch, pc, sp)) |
0f71a2f6 | 1733 | #endif |
0f71a2f6 | 1734 | |
749b82f6 AC |
1735 | #if defined (DEPRECATED_POP_FRAME) |
1736 | /* Legacy for systems yet to multi-arch DEPRECATED_POP_FRAME */ | |
1737 | #if !defined (DEPRECATED_POP_FRAME_P) | |
1738 | #define DEPRECATED_POP_FRAME_P() (1) | |
dedc2a2b AC |
1739 | #endif |
1740 | #endif | |
1741 | ||
1742 | /* Default predicate for non- multi-arch targets. */ | |
749b82f6 AC |
1743 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_POP_FRAME_P) |
1744 | #define DEPRECATED_POP_FRAME_P() (0) | |
dedc2a2b AC |
1745 | #endif |
1746 | ||
749b82f6 AC |
1747 | extern int gdbarch_deprecated_pop_frame_p (struct gdbarch *gdbarch); |
1748 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_POP_FRAME_P) | |
1749 | #error "Non multi-arch definition of DEPRECATED_POP_FRAME" | |
dedc2a2b | 1750 | #endif |
749b82f6 AC |
1751 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_POP_FRAME_P) |
1752 | #define DEPRECATED_POP_FRAME_P() (gdbarch_deprecated_pop_frame_p (current_gdbarch)) | |
dedc2a2b AC |
1753 | #endif |
1754 | ||
1755 | /* Default (function) for non- multi-arch platforms. */ | |
749b82f6 AC |
1756 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_POP_FRAME) |
1757 | #define DEPRECATED_POP_FRAME (internal_error (__FILE__, __LINE__, "DEPRECATED_POP_FRAME"), 0) | |
dedc2a2b AC |
1758 | #endif |
1759 | ||
749b82f6 AC |
1760 | typedef void (gdbarch_deprecated_pop_frame_ftype) (void); |
1761 | extern void gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch); | |
1762 | extern void set_gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch, gdbarch_deprecated_pop_frame_ftype *deprecated_pop_frame); | |
1763 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_POP_FRAME) | |
1764 | #error "Non multi-arch definition of DEPRECATED_POP_FRAME" | |
83905903 | 1765 | #endif |
c25083af | 1766 | #if !defined (DEPRECATED_POP_FRAME) |
749b82f6 | 1767 | #define DEPRECATED_POP_FRAME (gdbarch_deprecated_pop_frame (current_gdbarch)) |
0f71a2f6 | 1768 | #endif |
0f71a2f6 | 1769 | |
4183d812 AC |
1770 | /* NOTE: cagney/2003-03-24: Replaced by PUSH_ARGUMENTS. */ |
1771 | ||
1772 | #if defined (DEPRECATED_STORE_STRUCT_RETURN) | |
1773 | /* Legacy for systems yet to multi-arch DEPRECATED_STORE_STRUCT_RETURN */ | |
1774 | #if !defined (DEPRECATED_STORE_STRUCT_RETURN_P) | |
1775 | #define DEPRECATED_STORE_STRUCT_RETURN_P() (1) | |
1776 | #endif | |
1777 | #endif | |
1778 | ||
1779 | /* Default predicate for non- multi-arch targets. */ | |
1780 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_STORE_STRUCT_RETURN_P) | |
1781 | #define DEPRECATED_STORE_STRUCT_RETURN_P() (0) | |
1782 | #endif | |
1783 | ||
1784 | extern int gdbarch_deprecated_store_struct_return_p (struct gdbarch *gdbarch); | |
1785 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_STORE_STRUCT_RETURN_P) | |
1786 | #error "Non multi-arch definition of DEPRECATED_STORE_STRUCT_RETURN" | |
1787 | #endif | |
1788 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_STORE_STRUCT_RETURN_P) | |
1789 | #define DEPRECATED_STORE_STRUCT_RETURN_P() (gdbarch_deprecated_store_struct_return_p (current_gdbarch)) | |
1790 | #endif | |
1791 | ||
1792 | /* Default (function) for non- multi-arch platforms. */ | |
1793 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_STORE_STRUCT_RETURN) | |
1794 | #define DEPRECATED_STORE_STRUCT_RETURN(addr, sp) (internal_error (__FILE__, __LINE__, "DEPRECATED_STORE_STRUCT_RETURN"), 0) | |
1795 | #endif | |
1796 | ||
1797 | typedef void (gdbarch_deprecated_store_struct_return_ftype) (CORE_ADDR addr, CORE_ADDR sp); | |
1798 | extern void gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp); | |
1799 | extern void set_gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, gdbarch_deprecated_store_struct_return_ftype *deprecated_store_struct_return); | |
1800 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_STORE_STRUCT_RETURN) | |
1801 | #error "Non multi-arch definition of DEPRECATED_STORE_STRUCT_RETURN" | |
83905903 | 1802 | #endif |
c25083af | 1803 | #if !defined (DEPRECATED_STORE_STRUCT_RETURN) |
4183d812 | 1804 | #define DEPRECATED_STORE_STRUCT_RETURN(addr, sp) (gdbarch_deprecated_store_struct_return (current_gdbarch, addr, sp)) |
0f71a2f6 | 1805 | #endif |
0f71a2f6 | 1806 | |
ebba8386 AC |
1807 | /* Default (function) for non- multi-arch platforms. */ |
1808 | #if (!GDB_MULTI_ARCH) && !defined (EXTRACT_RETURN_VALUE) | |
1809 | #define EXTRACT_RETURN_VALUE(type, regcache, valbuf) (legacy_extract_return_value (type, regcache, valbuf)) | |
1810 | #endif | |
1811 | ||
1812 | typedef void (gdbarch_extract_return_value_ftype) (struct type *type, struct regcache *regcache, void *valbuf); | |
1813 | extern void gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf); | |
1814 | extern void set_gdbarch_extract_return_value (struct gdbarch *gdbarch, gdbarch_extract_return_value_ftype *extract_return_value); | |
1815 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_RETURN_VALUE) | |
1816 | #error "Non multi-arch definition of EXTRACT_RETURN_VALUE" | |
1817 | #endif | |
c25083af | 1818 | #if !defined (EXTRACT_RETURN_VALUE) |
ebba8386 AC |
1819 | #define EXTRACT_RETURN_VALUE(type, regcache, valbuf) (gdbarch_extract_return_value (current_gdbarch, type, regcache, valbuf)) |
1820 | #endif | |
ebba8386 AC |
1821 | |
1822 | /* Default (function) for non- multi-arch platforms. */ | |
1823 | #if (!GDB_MULTI_ARCH) && !defined (STORE_RETURN_VALUE) | |
1824 | #define STORE_RETURN_VALUE(type, regcache, valbuf) (legacy_store_return_value (type, regcache, valbuf)) | |
1825 | #endif | |
1826 | ||
1827 | typedef void (gdbarch_store_return_value_ftype) (struct type *type, struct regcache *regcache, const void *valbuf); | |
1828 | extern void gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const void *valbuf); | |
104c1213 | 1829 | extern void set_gdbarch_store_return_value (struct gdbarch *gdbarch, gdbarch_store_return_value_ftype *store_return_value); |
83905903 AC |
1830 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STORE_RETURN_VALUE) |
1831 | #error "Non multi-arch definition of STORE_RETURN_VALUE" | |
1832 | #endif | |
c25083af | 1833 | #if !defined (STORE_RETURN_VALUE) |
ebba8386 AC |
1834 | #define STORE_RETURN_VALUE(type, regcache, valbuf) (gdbarch_store_return_value (current_gdbarch, type, regcache, valbuf)) |
1835 | #endif | |
ebba8386 AC |
1836 | |
1837 | typedef void (gdbarch_deprecated_extract_return_value_ftype) (struct type *type, char *regbuf, char *valbuf); | |
1838 | extern void gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf); | |
1839 | extern void set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value); | |
1840 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRACT_RETURN_VALUE) | |
1841 | #error "Non multi-arch definition of DEPRECATED_EXTRACT_RETURN_VALUE" | |
1842 | #endif | |
c25083af | 1843 | #if !defined (DEPRECATED_EXTRACT_RETURN_VALUE) |
ebba8386 AC |
1844 | #define DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf) (gdbarch_deprecated_extract_return_value (current_gdbarch, type, regbuf, valbuf)) |
1845 | #endif | |
ebba8386 AC |
1846 | |
1847 | typedef void (gdbarch_deprecated_store_return_value_ftype) (struct type *type, char *valbuf); | |
1848 | extern void gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf); | |
1849 | extern void set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, gdbarch_deprecated_store_return_value_ftype *deprecated_store_return_value); | |
1850 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_STORE_RETURN_VALUE) | |
1851 | #error "Non multi-arch definition of DEPRECATED_STORE_RETURN_VALUE" | |
1852 | #endif | |
c25083af | 1853 | #if !defined (DEPRECATED_STORE_RETURN_VALUE) |
ebba8386 | 1854 | #define DEPRECATED_STORE_RETURN_VALUE(type, valbuf) (gdbarch_deprecated_store_return_value (current_gdbarch, type, valbuf)) |
0f71a2f6 | 1855 | #endif |
0f71a2f6 | 1856 | |
049ee0e4 AC |
1857 | #if defined (EXTRACT_STRUCT_VALUE_ADDRESS) |
1858 | /* Legacy for systems yet to multi-arch EXTRACT_STRUCT_VALUE_ADDRESS */ | |
1859 | #if !defined (EXTRACT_STRUCT_VALUE_ADDRESS_P) | |
1860 | #define EXTRACT_STRUCT_VALUE_ADDRESS_P() (1) | |
1861 | #endif | |
1862 | #endif | |
1863 | ||
1864 | /* Default predicate for non- multi-arch targets. */ | |
1865 | #if (!GDB_MULTI_ARCH) && !defined (EXTRACT_STRUCT_VALUE_ADDRESS_P) | |
1866 | #define EXTRACT_STRUCT_VALUE_ADDRESS_P() (0) | |
1867 | #endif | |
1868 | ||
1869 | extern int gdbarch_extract_struct_value_address_p (struct gdbarch *gdbarch); | |
1870 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_STRUCT_VALUE_ADDRESS_P) | |
1871 | #error "Non multi-arch definition of EXTRACT_STRUCT_VALUE_ADDRESS" | |
1872 | #endif | |
1873 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (EXTRACT_STRUCT_VALUE_ADDRESS_P) | |
1874 | #define EXTRACT_STRUCT_VALUE_ADDRESS_P() (gdbarch_extract_struct_value_address_p (current_gdbarch)) | |
1875 | #endif | |
1876 | ||
1877 | /* Default (function) for non- multi-arch platforms. */ | |
1878 | #if (!GDB_MULTI_ARCH) && !defined (EXTRACT_STRUCT_VALUE_ADDRESS) | |
1879 | #define EXTRACT_STRUCT_VALUE_ADDRESS(regcache) (internal_error (__FILE__, __LINE__, "EXTRACT_STRUCT_VALUE_ADDRESS"), 0) | |
1880 | #endif | |
1881 | ||
1882 | typedef CORE_ADDR (gdbarch_extract_struct_value_address_ftype) (struct regcache *regcache); | |
1883 | extern CORE_ADDR gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache); | |
1884 | extern void set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, gdbarch_extract_struct_value_address_ftype *extract_struct_value_address); | |
1885 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_STRUCT_VALUE_ADDRESS) | |
1886 | #error "Non multi-arch definition of EXTRACT_STRUCT_VALUE_ADDRESS" | |
1887 | #endif | |
c25083af | 1888 | #if !defined (EXTRACT_STRUCT_VALUE_ADDRESS) |
049ee0e4 AC |
1889 | #define EXTRACT_STRUCT_VALUE_ADDRESS(regcache) (gdbarch_extract_struct_value_address (current_gdbarch, regcache)) |
1890 | #endif | |
049ee0e4 | 1891 | |
26e9b323 AC |
1892 | #if defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS) |
1893 | /* Legacy for systems yet to multi-arch DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS */ | |
1894 | #if !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P) | |
1895 | #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() (1) | |
d6dd581e AC |
1896 | #endif |
1897 | #endif | |
1898 | ||
1899 | /* Default predicate for non- multi-arch targets. */ | |
26e9b323 AC |
1900 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P) |
1901 | #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() (0) | |
d6dd581e AC |
1902 | #endif |
1903 | ||
26e9b323 AC |
1904 | extern int gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch); |
1905 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P) | |
1906 | #error "Non multi-arch definition of DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS" | |
83905903 | 1907 | #endif |
26e9b323 AC |
1908 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P) |
1909 | #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() (gdbarch_deprecated_extract_struct_value_address_p (current_gdbarch)) | |
d6dd581e AC |
1910 | #endif |
1911 | ||
1912 | /* Default (function) for non- multi-arch platforms. */ | |
26e9b323 AC |
1913 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS) |
1914 | #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf) (internal_error (__FILE__, __LINE__, "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS"), 0) | |
d6dd581e AC |
1915 | #endif |
1916 | ||
26e9b323 AC |
1917 | typedef CORE_ADDR (gdbarch_deprecated_extract_struct_value_address_ftype) (char *regbuf); |
1918 | extern CORE_ADDR gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf); | |
1919 | extern void set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address); | |
1920 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS) | |
1921 | #error "Non multi-arch definition of DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS" | |
83905903 | 1922 | #endif |
c25083af | 1923 | #if !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS) |
26e9b323 | 1924 | #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf) (gdbarch_deprecated_extract_struct_value_address (current_gdbarch, regbuf)) |
0f71a2f6 | 1925 | #endif |
0f71a2f6 | 1926 | |
56f12751 AC |
1927 | /* Default (function) for non- multi-arch platforms. */ |
1928 | #if (!GDB_MULTI_ARCH) && !defined (USE_STRUCT_CONVENTION) | |
1929 | #define USE_STRUCT_CONVENTION(gcc_p, value_type) (generic_use_struct_convention (gcc_p, value_type)) | |
1930 | #endif | |
1931 | ||
104c1213 JM |
1932 | typedef int (gdbarch_use_struct_convention_ftype) (int gcc_p, struct type *value_type); |
1933 | extern int gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type); | |
1934 | extern void set_gdbarch_use_struct_convention (struct gdbarch *gdbarch, gdbarch_use_struct_convention_ftype *use_struct_convention); | |
83905903 AC |
1935 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (USE_STRUCT_CONVENTION) |
1936 | #error "Non multi-arch definition of USE_STRUCT_CONVENTION" | |
1937 | #endif | |
c25083af | 1938 | #if !defined (USE_STRUCT_CONVENTION) |
0f71a2f6 JM |
1939 | #define USE_STRUCT_CONVENTION(gcc_p, value_type) (gdbarch_use_struct_convention (current_gdbarch, gcc_p, value_type)) |
1940 | #endif | |
0f71a2f6 | 1941 | |
f30ee0bc AC |
1942 | #if defined (DEPRECATED_FRAME_INIT_SAVED_REGS) |
1943 | /* Legacy for systems yet to multi-arch DEPRECATED_FRAME_INIT_SAVED_REGS */ | |
1944 | #if !defined (DEPRECATED_FRAME_INIT_SAVED_REGS_P) | |
1945 | #define DEPRECATED_FRAME_INIT_SAVED_REGS_P() (1) | |
8f871025 AC |
1946 | #endif |
1947 | #endif | |
1948 | ||
1949 | /* Default predicate for non- multi-arch targets. */ | |
f30ee0bc AC |
1950 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_INIT_SAVED_REGS_P) |
1951 | #define DEPRECATED_FRAME_INIT_SAVED_REGS_P() (0) | |
8f871025 AC |
1952 | #endif |
1953 | ||
f30ee0bc AC |
1954 | extern int gdbarch_deprecated_frame_init_saved_regs_p (struct gdbarch *gdbarch); |
1955 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_INIT_SAVED_REGS_P) | |
1956 | #error "Non multi-arch definition of DEPRECATED_FRAME_INIT_SAVED_REGS" | |
8f871025 | 1957 | #endif |
f30ee0bc AC |
1958 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_INIT_SAVED_REGS_P) |
1959 | #define DEPRECATED_FRAME_INIT_SAVED_REGS_P() (gdbarch_deprecated_frame_init_saved_regs_p (current_gdbarch)) | |
8f871025 AC |
1960 | #endif |
1961 | ||
1962 | /* Default (function) for non- multi-arch platforms. */ | |
f30ee0bc AC |
1963 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_INIT_SAVED_REGS) |
1964 | #define DEPRECATED_FRAME_INIT_SAVED_REGS(frame) (internal_error (__FILE__, __LINE__, "DEPRECATED_FRAME_INIT_SAVED_REGS"), 0) | |
8f871025 AC |
1965 | #endif |
1966 | ||
f30ee0bc AC |
1967 | typedef void (gdbarch_deprecated_frame_init_saved_regs_ftype) (struct frame_info *frame); |
1968 | extern void gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame); | |
1969 | extern void set_gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch, gdbarch_deprecated_frame_init_saved_regs_ftype *deprecated_frame_init_saved_regs); | |
1970 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_INIT_SAVED_REGS) | |
1971 | #error "Non multi-arch definition of DEPRECATED_FRAME_INIT_SAVED_REGS" | |
83905903 | 1972 | #endif |
c25083af | 1973 | #if !defined (DEPRECATED_FRAME_INIT_SAVED_REGS) |
f30ee0bc | 1974 | #define DEPRECATED_FRAME_INIT_SAVED_REGS(frame) (gdbarch_deprecated_frame_init_saved_regs (current_gdbarch, frame)) |
0f71a2f6 | 1975 | #endif |
0f71a2f6 | 1976 | |
e9582e71 AC |
1977 | #if defined (DEPRECATED_INIT_EXTRA_FRAME_INFO) |
1978 | /* Legacy for systems yet to multi-arch DEPRECATED_INIT_EXTRA_FRAME_INFO */ | |
1979 | #if !defined (DEPRECATED_INIT_EXTRA_FRAME_INFO_P) | |
1980 | #define DEPRECATED_INIT_EXTRA_FRAME_INFO_P() (1) | |
5fdff426 AC |
1981 | #endif |
1982 | #endif | |
1983 | ||
1984 | /* Default predicate for non- multi-arch targets. */ | |
e9582e71 AC |
1985 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_INIT_EXTRA_FRAME_INFO_P) |
1986 | #define DEPRECATED_INIT_EXTRA_FRAME_INFO_P() (0) | |
5fdff426 AC |
1987 | #endif |
1988 | ||
e9582e71 AC |
1989 | extern int gdbarch_deprecated_init_extra_frame_info_p (struct gdbarch *gdbarch); |
1990 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_EXTRA_FRAME_INFO_P) | |
1991 | #error "Non multi-arch definition of DEPRECATED_INIT_EXTRA_FRAME_INFO" | |
5fdff426 | 1992 | #endif |
e9582e71 AC |
1993 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_INIT_EXTRA_FRAME_INFO_P) |
1994 | #define DEPRECATED_INIT_EXTRA_FRAME_INFO_P() (gdbarch_deprecated_init_extra_frame_info_p (current_gdbarch)) | |
5fdff426 AC |
1995 | #endif |
1996 | ||
1997 | /* Default (function) for non- multi-arch platforms. */ | |
e9582e71 AC |
1998 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_INIT_EXTRA_FRAME_INFO) |
1999 | #define DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame) (internal_error (__FILE__, __LINE__, "DEPRECATED_INIT_EXTRA_FRAME_INFO"), 0) | |
5fdff426 AC |
2000 | #endif |
2001 | ||
e9582e71 AC |
2002 | typedef void (gdbarch_deprecated_init_extra_frame_info_ftype) (int fromleaf, struct frame_info *frame); |
2003 | extern void gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame); | |
2004 | extern void set_gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch, gdbarch_deprecated_init_extra_frame_info_ftype *deprecated_init_extra_frame_info); | |
2005 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_EXTRA_FRAME_INFO) | |
2006 | #error "Non multi-arch definition of DEPRECATED_INIT_EXTRA_FRAME_INFO" | |
83905903 | 2007 | #endif |
c25083af | 2008 | #if !defined (DEPRECATED_INIT_EXTRA_FRAME_INFO) |
e9582e71 | 2009 | #define DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame) (gdbarch_deprecated_init_extra_frame_info (current_gdbarch, fromleaf, frame)) |
0f71a2f6 | 2010 | #endif |
0f71a2f6 | 2011 | |
104c1213 JM |
2012 | typedef CORE_ADDR (gdbarch_skip_prologue_ftype) (CORE_ADDR ip); |
2013 | extern CORE_ADDR gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip); | |
2014 | extern void set_gdbarch_skip_prologue (struct gdbarch *gdbarch, gdbarch_skip_prologue_ftype *skip_prologue); | |
83905903 AC |
2015 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SKIP_PROLOGUE) |
2016 | #error "Non multi-arch definition of SKIP_PROLOGUE" | |
2017 | #endif | |
c25083af | 2018 | #if !defined (SKIP_PROLOGUE) |
0f71a2f6 JM |
2019 | #define SKIP_PROLOGUE(ip) (gdbarch_skip_prologue (current_gdbarch, ip)) |
2020 | #endif | |
0f71a2f6 | 2021 | |
33489c5b | 2022 | /* Default (function) for non- multi-arch platforms. */ |
6166d547 | 2023 | #if (!GDB_MULTI_ARCH) && !defined (PROLOGUE_FRAMELESS_P) |
33489c5b AC |
2024 | #define PROLOGUE_FRAMELESS_P(ip) (generic_prologue_frameless_p (ip)) |
2025 | #endif | |
2026 | ||
dad41f9a AC |
2027 | typedef int (gdbarch_prologue_frameless_p_ftype) (CORE_ADDR ip); |
2028 | extern int gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, CORE_ADDR ip); | |
2029 | extern void set_gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, gdbarch_prologue_frameless_p_ftype *prologue_frameless_p); | |
83905903 AC |
2030 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PROLOGUE_FRAMELESS_P) |
2031 | #error "Non multi-arch definition of PROLOGUE_FRAMELESS_P" | |
2032 | #endif | |
c25083af | 2033 | #if !defined (PROLOGUE_FRAMELESS_P) |
dad41f9a AC |
2034 | #define PROLOGUE_FRAMELESS_P(ip) (gdbarch_prologue_frameless_p (current_gdbarch, ip)) |
2035 | #endif | |
2036 | ||
104c1213 JM |
2037 | typedef int (gdbarch_inner_than_ftype) (CORE_ADDR lhs, CORE_ADDR rhs); |
2038 | extern int gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs); | |
2039 | extern void set_gdbarch_inner_than (struct gdbarch *gdbarch, gdbarch_inner_than_ftype *inner_than); | |
83905903 AC |
2040 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INNER_THAN) |
2041 | #error "Non multi-arch definition of INNER_THAN" | |
2042 | #endif | |
c25083af | 2043 | #if !defined (INNER_THAN) |
0f71a2f6 JM |
2044 | #define INNER_THAN(lhs, rhs) (gdbarch_inner_than (current_gdbarch, lhs, rhs)) |
2045 | #endif | |
0f71a2f6 | 2046 | |
f4f9705a AC |
2047 | typedef const unsigned char * (gdbarch_breakpoint_from_pc_ftype) (CORE_ADDR *pcptr, int *lenptr); |
2048 | extern const unsigned char * gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr); | |
104c1213 | 2049 | extern void set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc); |
83905903 AC |
2050 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (BREAKPOINT_FROM_PC) |
2051 | #error "Non multi-arch definition of BREAKPOINT_FROM_PC" | |
2052 | #endif | |
c25083af | 2053 | #if !defined (BREAKPOINT_FROM_PC) |
0f71a2f6 JM |
2054 | #define BREAKPOINT_FROM_PC(pcptr, lenptr) (gdbarch_breakpoint_from_pc (current_gdbarch, pcptr, lenptr)) |
2055 | #endif | |
33489c5b AC |
2056 | |
2057 | /* Default (function) for non- multi-arch platforms. */ | |
6166d547 | 2058 | #if (!GDB_MULTI_ARCH) && !defined (MEMORY_INSERT_BREAKPOINT) |
33489c5b AC |
2059 | #define MEMORY_INSERT_BREAKPOINT(addr, contents_cache) (default_memory_insert_breakpoint (addr, contents_cache)) |
2060 | #endif | |
0f71a2f6 | 2061 | |
917317f4 JM |
2062 | typedef int (gdbarch_memory_insert_breakpoint_ftype) (CORE_ADDR addr, char *contents_cache); |
2063 | extern int gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache); | |
2064 | extern void set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint); | |
83905903 AC |
2065 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (MEMORY_INSERT_BREAKPOINT) |
2066 | #error "Non multi-arch definition of MEMORY_INSERT_BREAKPOINT" | |
2067 | #endif | |
c25083af | 2068 | #if !defined (MEMORY_INSERT_BREAKPOINT) |
917317f4 JM |
2069 | #define MEMORY_INSERT_BREAKPOINT(addr, contents_cache) (gdbarch_memory_insert_breakpoint (current_gdbarch, addr, contents_cache)) |
2070 | #endif | |
33489c5b AC |
2071 | |
2072 | /* Default (function) for non- multi-arch platforms. */ | |
6166d547 | 2073 | #if (!GDB_MULTI_ARCH) && !defined (MEMORY_REMOVE_BREAKPOINT) |
33489c5b AC |
2074 | #define MEMORY_REMOVE_BREAKPOINT(addr, contents_cache) (default_memory_remove_breakpoint (addr, contents_cache)) |
2075 | #endif | |
917317f4 JM |
2076 | |
2077 | typedef int (gdbarch_memory_remove_breakpoint_ftype) (CORE_ADDR addr, char *contents_cache); | |
2078 | extern int gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache); | |
2079 | extern void set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint); | |
83905903 AC |
2080 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (MEMORY_REMOVE_BREAKPOINT) |
2081 | #error "Non multi-arch definition of MEMORY_REMOVE_BREAKPOINT" | |
2082 | #endif | |
c25083af | 2083 | #if !defined (MEMORY_REMOVE_BREAKPOINT) |
917317f4 JM |
2084 | #define MEMORY_REMOVE_BREAKPOINT(addr, contents_cache) (gdbarch_memory_remove_breakpoint (current_gdbarch, addr, contents_cache)) |
2085 | #endif | |
917317f4 | 2086 | |
104c1213 JM |
2087 | extern CORE_ADDR gdbarch_decr_pc_after_break (struct gdbarch *gdbarch); |
2088 | extern void set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch, CORE_ADDR decr_pc_after_break); | |
83905903 AC |
2089 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DECR_PC_AFTER_BREAK) |
2090 | #error "Non multi-arch definition of DECR_PC_AFTER_BREAK" | |
2091 | #endif | |
c25083af | 2092 | #if !defined (DECR_PC_AFTER_BREAK) |
0f71a2f6 JM |
2093 | #define DECR_PC_AFTER_BREAK (gdbarch_decr_pc_after_break (current_gdbarch)) |
2094 | #endif | |
0f71a2f6 | 2095 | |
e02bc4cc DS |
2096 | /* Default (function) for non- multi-arch platforms. */ |
2097 | #if (!GDB_MULTI_ARCH) && !defined (PREPARE_TO_PROCEED) | |
2098 | #define PREPARE_TO_PROCEED(select_it) (default_prepare_to_proceed (select_it)) | |
2099 | #endif | |
2100 | ||
2101 | typedef int (gdbarch_prepare_to_proceed_ftype) (int select_it); | |
2102 | extern int gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, int select_it); | |
2103 | extern void set_gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, gdbarch_prepare_to_proceed_ftype *prepare_to_proceed); | |
83905903 AC |
2104 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PREPARE_TO_PROCEED) |
2105 | #error "Non multi-arch definition of PREPARE_TO_PROCEED" | |
2106 | #endif | |
c25083af | 2107 | #if !defined (PREPARE_TO_PROCEED) |
e02bc4cc DS |
2108 | #define PREPARE_TO_PROCEED(select_it) (gdbarch_prepare_to_proceed (current_gdbarch, select_it)) |
2109 | #endif | |
e02bc4cc | 2110 | |
104c1213 JM |
2111 | extern CORE_ADDR gdbarch_function_start_offset (struct gdbarch *gdbarch); |
2112 | extern void set_gdbarch_function_start_offset (struct gdbarch *gdbarch, CORE_ADDR function_start_offset); | |
83905903 AC |
2113 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FUNCTION_START_OFFSET) |
2114 | #error "Non multi-arch definition of FUNCTION_START_OFFSET" | |
2115 | #endif | |
c25083af | 2116 | #if !defined (FUNCTION_START_OFFSET) |
0f71a2f6 JM |
2117 | #define FUNCTION_START_OFFSET (gdbarch_function_start_offset (current_gdbarch)) |
2118 | #endif | |
0f71a2f6 | 2119 | |
f6684c31 AC |
2120 | 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); |
2121 | 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 | 2122 | extern void set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address); |
0f71a2f6 | 2123 | |
104c1213 JM |
2124 | extern CORE_ADDR gdbarch_frame_args_skip (struct gdbarch *gdbarch); |
2125 | extern void set_gdbarch_frame_args_skip (struct gdbarch *gdbarch, CORE_ADDR frame_args_skip); | |
83905903 AC |
2126 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_ARGS_SKIP) |
2127 | #error "Non multi-arch definition of FRAME_ARGS_SKIP" | |
2128 | #endif | |
c25083af | 2129 | #if !defined (FRAME_ARGS_SKIP) |
0f71a2f6 JM |
2130 | #define FRAME_ARGS_SKIP (gdbarch_frame_args_skip (current_gdbarch)) |
2131 | #endif | |
0f71a2f6 | 2132 | |
33489c5b | 2133 | /* Default (function) for non- multi-arch platforms. */ |
6166d547 | 2134 | #if (!GDB_MULTI_ARCH) && !defined (FRAMELESS_FUNCTION_INVOCATION) |
33489c5b AC |
2135 | #define FRAMELESS_FUNCTION_INVOCATION(fi) (generic_frameless_function_invocation_not (fi)) |
2136 | #endif | |
2137 | ||
104c1213 JM |
2138 | typedef int (gdbarch_frameless_function_invocation_ftype) (struct frame_info *fi); |
2139 | extern int gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi); | |
2140 | extern void set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, gdbarch_frameless_function_invocation_ftype *frameless_function_invocation); | |
83905903 AC |
2141 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAMELESS_FUNCTION_INVOCATION) |
2142 | #error "Non multi-arch definition of FRAMELESS_FUNCTION_INVOCATION" | |
2143 | #endif | |
c25083af | 2144 | #if !defined (FRAMELESS_FUNCTION_INVOCATION) |
0f71a2f6 JM |
2145 | #define FRAMELESS_FUNCTION_INVOCATION(fi) (gdbarch_frameless_function_invocation (current_gdbarch, fi)) |
2146 | #endif | |
0f71a2f6 | 2147 | |
618ce49f AC |
2148 | #if defined (DEPRECATED_FRAME_CHAIN) |
2149 | /* Legacy for systems yet to multi-arch DEPRECATED_FRAME_CHAIN */ | |
2150 | #if !defined (DEPRECATED_FRAME_CHAIN_P) | |
2151 | #define DEPRECATED_FRAME_CHAIN_P() (1) | |
d62d1979 AC |
2152 | #endif |
2153 | #endif | |
2154 | ||
2155 | /* Default predicate for non- multi-arch targets. */ | |
618ce49f AC |
2156 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_CHAIN_P) |
2157 | #define DEPRECATED_FRAME_CHAIN_P() (0) | |
d62d1979 AC |
2158 | #endif |
2159 | ||
618ce49f AC |
2160 | extern int gdbarch_deprecated_frame_chain_p (struct gdbarch *gdbarch); |
2161 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_CHAIN_P) | |
2162 | #error "Non multi-arch definition of DEPRECATED_FRAME_CHAIN" | |
d62d1979 | 2163 | #endif |
618ce49f AC |
2164 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_CHAIN_P) |
2165 | #define DEPRECATED_FRAME_CHAIN_P() (gdbarch_deprecated_frame_chain_p (current_gdbarch)) | |
d62d1979 AC |
2166 | #endif |
2167 | ||
2168 | /* Default (function) for non- multi-arch platforms. */ | |
618ce49f AC |
2169 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_CHAIN) |
2170 | #define DEPRECATED_FRAME_CHAIN(frame) (internal_error (__FILE__, __LINE__, "DEPRECATED_FRAME_CHAIN"), 0) | |
d62d1979 AC |
2171 | #endif |
2172 | ||
618ce49f AC |
2173 | typedef CORE_ADDR (gdbarch_deprecated_frame_chain_ftype) (struct frame_info *frame); |
2174 | extern CORE_ADDR gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame); | |
2175 | extern void set_gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch, gdbarch_deprecated_frame_chain_ftype *deprecated_frame_chain); | |
2176 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_CHAIN) | |
2177 | #error "Non multi-arch definition of DEPRECATED_FRAME_CHAIN" | |
83905903 | 2178 | #endif |
c25083af | 2179 | #if !defined (DEPRECATED_FRAME_CHAIN) |
618ce49f | 2180 | #define DEPRECATED_FRAME_CHAIN(frame) (gdbarch_deprecated_frame_chain (current_gdbarch, frame)) |
0f71a2f6 | 2181 | #endif |
0f71a2f6 | 2182 | |
618ce49f AC |
2183 | #if defined (DEPRECATED_FRAME_CHAIN_VALID) |
2184 | /* Legacy for systems yet to multi-arch DEPRECATED_FRAME_CHAIN_VALID */ | |
2185 | #if !defined (DEPRECATED_FRAME_CHAIN_VALID_P) | |
2186 | #define DEPRECATED_FRAME_CHAIN_VALID_P() (1) | |
51603483 DJ |
2187 | #endif |
2188 | #endif | |
2189 | ||
2190 | /* Default predicate for non- multi-arch targets. */ | |
618ce49f AC |
2191 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_CHAIN_VALID_P) |
2192 | #define DEPRECATED_FRAME_CHAIN_VALID_P() (0) | |
51603483 DJ |
2193 | #endif |
2194 | ||
618ce49f AC |
2195 | extern int gdbarch_deprecated_frame_chain_valid_p (struct gdbarch *gdbarch); |
2196 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_CHAIN_VALID_P) | |
2197 | #error "Non multi-arch definition of DEPRECATED_FRAME_CHAIN_VALID" | |
51603483 | 2198 | #endif |
618ce49f AC |
2199 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_CHAIN_VALID_P) |
2200 | #define DEPRECATED_FRAME_CHAIN_VALID_P() (gdbarch_deprecated_frame_chain_valid_p (current_gdbarch)) | |
51603483 | 2201 | #endif |
7f55af32 AC |
2202 | |
2203 | /* Default (function) for non- multi-arch platforms. */ | |
618ce49f AC |
2204 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_CHAIN_VALID) |
2205 | #define DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe) (internal_error (__FILE__, __LINE__, "DEPRECATED_FRAME_CHAIN_VALID"), 0) | |
7f55af32 | 2206 | #endif |
028c194b | 2207 | |
618ce49f AC |
2208 | typedef int (gdbarch_deprecated_frame_chain_valid_ftype) (CORE_ADDR chain, struct frame_info *thisframe); |
2209 | extern int gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe); | |
2210 | extern void set_gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch, gdbarch_deprecated_frame_chain_valid_ftype *deprecated_frame_chain_valid); | |
2211 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_CHAIN_VALID) | |
2212 | #error "Non multi-arch definition of DEPRECATED_FRAME_CHAIN_VALID" | |
83905903 | 2213 | #endif |
c25083af | 2214 | #if !defined (DEPRECATED_FRAME_CHAIN_VALID) |
618ce49f | 2215 | #define DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe) (gdbarch_deprecated_frame_chain_valid (current_gdbarch, chain, thisframe)) |
0f71a2f6 | 2216 | #endif |
0f71a2f6 | 2217 | |
8bedc050 AC |
2218 | /* DEPRECATED_FRAME_SAVED_PC has been replaced by UNWIND_PC. Please |
2219 | note, per UNWIND_PC's doco, that while the two have similar | |
2220 | interfaces they have very different underlying implementations. */ | |
12cc2063 | 2221 | |
8bedc050 AC |
2222 | #if defined (DEPRECATED_FRAME_SAVED_PC) |
2223 | /* Legacy for systems yet to multi-arch DEPRECATED_FRAME_SAVED_PC */ | |
2224 | #if !defined (DEPRECATED_FRAME_SAVED_PC_P) | |
2225 | #define DEPRECATED_FRAME_SAVED_PC_P() (1) | |
d62d1979 AC |
2226 | #endif |
2227 | #endif | |
2228 | ||
2229 | /* Default predicate for non- multi-arch targets. */ | |
8bedc050 AC |
2230 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_SAVED_PC_P) |
2231 | #define DEPRECATED_FRAME_SAVED_PC_P() (0) | |
d62d1979 AC |
2232 | #endif |
2233 | ||
8bedc050 AC |
2234 | extern int gdbarch_deprecated_frame_saved_pc_p (struct gdbarch *gdbarch); |
2235 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_SAVED_PC_P) | |
2236 | #error "Non multi-arch definition of DEPRECATED_FRAME_SAVED_PC" | |
d62d1979 | 2237 | #endif |
8bedc050 AC |
2238 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_SAVED_PC_P) |
2239 | #define DEPRECATED_FRAME_SAVED_PC_P() (gdbarch_deprecated_frame_saved_pc_p (current_gdbarch)) | |
d62d1979 AC |
2240 | #endif |
2241 | ||
2242 | /* Default (function) for non- multi-arch platforms. */ | |
8bedc050 AC |
2243 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_SAVED_PC) |
2244 | #define DEPRECATED_FRAME_SAVED_PC(fi) (internal_error (__FILE__, __LINE__, "DEPRECATED_FRAME_SAVED_PC"), 0) | |
d62d1979 AC |
2245 | #endif |
2246 | ||
8bedc050 AC |
2247 | typedef CORE_ADDR (gdbarch_deprecated_frame_saved_pc_ftype) (struct frame_info *fi); |
2248 | extern CORE_ADDR gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi); | |
2249 | extern void set_gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch, gdbarch_deprecated_frame_saved_pc_ftype *deprecated_frame_saved_pc); | |
2250 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_SAVED_PC) | |
2251 | #error "Non multi-arch definition of DEPRECATED_FRAME_SAVED_PC" | |
83905903 | 2252 | #endif |
c25083af | 2253 | #if !defined (DEPRECATED_FRAME_SAVED_PC) |
8bedc050 | 2254 | #define DEPRECATED_FRAME_SAVED_PC(fi) (gdbarch_deprecated_frame_saved_pc (current_gdbarch, fi)) |
0f71a2f6 | 2255 | #endif |
0f71a2f6 | 2256 | |
12cc2063 AC |
2257 | extern int gdbarch_unwind_pc_p (struct gdbarch *gdbarch); |
2258 | ||
2259 | typedef CORE_ADDR (gdbarch_unwind_pc_ftype) (struct gdbarch *gdbarch, struct frame_info *next_frame); | |
2260 | extern CORE_ADDR gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame); | |
2261 | extern void set_gdbarch_unwind_pc (struct gdbarch *gdbarch, gdbarch_unwind_pc_ftype *unwind_pc); | |
2262 | ||
a9e5fdc2 AC |
2263 | extern int gdbarch_unwind_sp_p (struct gdbarch *gdbarch); |
2264 | ||
2265 | typedef CORE_ADDR (gdbarch_unwind_sp_ftype) (struct gdbarch *gdbarch, struct frame_info *next_frame); | |
2266 | extern CORE_ADDR gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame); | |
2267 | extern void set_gdbarch_unwind_sp (struct gdbarch *gdbarch, gdbarch_unwind_sp_ftype *unwind_sp); | |
2268 | ||
f4ded5b1 AC |
2269 | /* Default (function) for non- multi-arch platforms. */ |
2270 | #if (!GDB_MULTI_ARCH) && !defined (FRAME_ARGS_ADDRESS) | |
7d6a26a7 | 2271 | #define FRAME_ARGS_ADDRESS(fi) (get_frame_base (fi)) |
f4ded5b1 AC |
2272 | #endif |
2273 | ||
104c1213 JM |
2274 | typedef CORE_ADDR (gdbarch_frame_args_address_ftype) (struct frame_info *fi); |
2275 | extern CORE_ADDR gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi); | |
2276 | extern void set_gdbarch_frame_args_address (struct gdbarch *gdbarch, gdbarch_frame_args_address_ftype *frame_args_address); | |
83905903 AC |
2277 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_ARGS_ADDRESS) |
2278 | #error "Non multi-arch definition of FRAME_ARGS_ADDRESS" | |
2279 | #endif | |
c25083af | 2280 | #if !defined (FRAME_ARGS_ADDRESS) |
0f71a2f6 JM |
2281 | #define FRAME_ARGS_ADDRESS(fi) (gdbarch_frame_args_address (current_gdbarch, fi)) |
2282 | #endif | |
0f71a2f6 | 2283 | |
f4ded5b1 AC |
2284 | /* Default (function) for non- multi-arch platforms. */ |
2285 | #if (!GDB_MULTI_ARCH) && !defined (FRAME_LOCALS_ADDRESS) | |
7d6a26a7 | 2286 | #define FRAME_LOCALS_ADDRESS(fi) (get_frame_base (fi)) |
f4ded5b1 AC |
2287 | #endif |
2288 | ||
104c1213 JM |
2289 | typedef CORE_ADDR (gdbarch_frame_locals_address_ftype) (struct frame_info *fi); |
2290 | extern CORE_ADDR gdbarch_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi); | |
2291 | extern void set_gdbarch_frame_locals_address (struct gdbarch *gdbarch, gdbarch_frame_locals_address_ftype *frame_locals_address); | |
83905903 AC |
2292 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_LOCALS_ADDRESS) |
2293 | #error "Non multi-arch definition of FRAME_LOCALS_ADDRESS" | |
2294 | #endif | |
c25083af | 2295 | #if !defined (FRAME_LOCALS_ADDRESS) |
0f71a2f6 JM |
2296 | #define FRAME_LOCALS_ADDRESS(fi) (gdbarch_frame_locals_address (current_gdbarch, fi)) |
2297 | #endif | |
0f71a2f6 | 2298 | |
6913c89a AC |
2299 | #if defined (DEPRECATED_SAVED_PC_AFTER_CALL) |
2300 | /* Legacy for systems yet to multi-arch DEPRECATED_SAVED_PC_AFTER_CALL */ | |
2301 | #if !defined (DEPRECATED_SAVED_PC_AFTER_CALL_P) | |
2302 | #define DEPRECATED_SAVED_PC_AFTER_CALL_P() (1) | |
4443bd83 AC |
2303 | #endif |
2304 | #endif | |
2305 | ||
2306 | /* Default predicate for non- multi-arch targets. */ | |
6913c89a AC |
2307 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_SAVED_PC_AFTER_CALL_P) |
2308 | #define DEPRECATED_SAVED_PC_AFTER_CALL_P() (0) | |
4443bd83 AC |
2309 | #endif |
2310 | ||
6913c89a AC |
2311 | extern int gdbarch_deprecated_saved_pc_after_call_p (struct gdbarch *gdbarch); |
2312 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SAVED_PC_AFTER_CALL_P) | |
2313 | #error "Non multi-arch definition of DEPRECATED_SAVED_PC_AFTER_CALL" | |
4443bd83 | 2314 | #endif |
6913c89a AC |
2315 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_SAVED_PC_AFTER_CALL_P) |
2316 | #define DEPRECATED_SAVED_PC_AFTER_CALL_P() (gdbarch_deprecated_saved_pc_after_call_p (current_gdbarch)) | |
4443bd83 AC |
2317 | #endif |
2318 | ||
2319 | /* Default (function) for non- multi-arch platforms. */ | |
6913c89a AC |
2320 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_SAVED_PC_AFTER_CALL) |
2321 | #define DEPRECATED_SAVED_PC_AFTER_CALL(frame) (internal_error (__FILE__, __LINE__, "DEPRECATED_SAVED_PC_AFTER_CALL"), 0) | |
4443bd83 AC |
2322 | #endif |
2323 | ||
6913c89a AC |
2324 | typedef CORE_ADDR (gdbarch_deprecated_saved_pc_after_call_ftype) (struct frame_info *frame); |
2325 | extern CORE_ADDR gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame); | |
2326 | extern void set_gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch, gdbarch_deprecated_saved_pc_after_call_ftype *deprecated_saved_pc_after_call); | |
2327 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SAVED_PC_AFTER_CALL) | |
2328 | #error "Non multi-arch definition of DEPRECATED_SAVED_PC_AFTER_CALL" | |
83905903 | 2329 | #endif |
c25083af | 2330 | #if !defined (DEPRECATED_SAVED_PC_AFTER_CALL) |
6913c89a | 2331 | #define DEPRECATED_SAVED_PC_AFTER_CALL(frame) (gdbarch_deprecated_saved_pc_after_call (current_gdbarch, frame)) |
0f71a2f6 | 2332 | #endif |
0f71a2f6 | 2333 | |
983a287a AC |
2334 | #if defined (FRAME_NUM_ARGS) |
2335 | /* Legacy for systems yet to multi-arch FRAME_NUM_ARGS */ | |
2336 | #if !defined (FRAME_NUM_ARGS_P) | |
2337 | #define FRAME_NUM_ARGS_P() (1) | |
2338 | #endif | |
2339 | #endif | |
2340 | ||
2341 | /* Default predicate for non- multi-arch targets. */ | |
2342 | #if (!GDB_MULTI_ARCH) && !defined (FRAME_NUM_ARGS_P) | |
2343 | #define FRAME_NUM_ARGS_P() (0) | |
2344 | #endif | |
2345 | ||
2346 | extern int gdbarch_frame_num_args_p (struct gdbarch *gdbarch); | |
2347 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_NUM_ARGS_P) | |
2348 | #error "Non multi-arch definition of FRAME_NUM_ARGS" | |
2349 | #endif | |
2350 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_NUM_ARGS_P) | |
2351 | #define FRAME_NUM_ARGS_P() (gdbarch_frame_num_args_p (current_gdbarch)) | |
2352 | #endif | |
2353 | ||
2354 | /* Default (function) for non- multi-arch platforms. */ | |
2355 | #if (!GDB_MULTI_ARCH) && !defined (FRAME_NUM_ARGS) | |
2356 | #define FRAME_NUM_ARGS(frame) (internal_error (__FILE__, __LINE__, "FRAME_NUM_ARGS"), 0) | |
2357 | #endif | |
2358 | ||
104c1213 JM |
2359 | typedef int (gdbarch_frame_num_args_ftype) (struct frame_info *frame); |
2360 | extern int gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame); | |
2361 | extern void set_gdbarch_frame_num_args (struct gdbarch *gdbarch, gdbarch_frame_num_args_ftype *frame_num_args); | |
83905903 AC |
2362 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_NUM_ARGS) |
2363 | #error "Non multi-arch definition of FRAME_NUM_ARGS" | |
2364 | #endif | |
c25083af | 2365 | #if !defined (FRAME_NUM_ARGS) |
0f71a2f6 JM |
2366 | #define FRAME_NUM_ARGS(frame) (gdbarch_frame_num_args (current_gdbarch, frame)) |
2367 | #endif | |
0f71a2f6 | 2368 | |
2ada493a AC |
2369 | #if defined (STACK_ALIGN) |
2370 | /* Legacy for systems yet to multi-arch STACK_ALIGN */ | |
eee30e78 | 2371 | #if !defined (STACK_ALIGN_P) |
2ada493a AC |
2372 | #define STACK_ALIGN_P() (1) |
2373 | #endif | |
eee30e78 | 2374 | #endif |
2ada493a | 2375 | |
33489c5b | 2376 | /* Default predicate for non- multi-arch targets. */ |
6166d547 | 2377 | #if (!GDB_MULTI_ARCH) && !defined (STACK_ALIGN_P) |
33489c5b AC |
2378 | #define STACK_ALIGN_P() (0) |
2379 | #endif | |
2380 | ||
2ada493a | 2381 | extern int gdbarch_stack_align_p (struct gdbarch *gdbarch); |
83905903 AC |
2382 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STACK_ALIGN_P) |
2383 | #error "Non multi-arch definition of STACK_ALIGN" | |
2384 | #endif | |
6166d547 | 2385 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (STACK_ALIGN_P) |
2ada493a AC |
2386 | #define STACK_ALIGN_P() (gdbarch_stack_align_p (current_gdbarch)) |
2387 | #endif | |
2388 | ||
33489c5b | 2389 | /* Default (function) for non- multi-arch platforms. */ |
6166d547 | 2390 | #if (!GDB_MULTI_ARCH) && !defined (STACK_ALIGN) |
8e65ff28 | 2391 | #define STACK_ALIGN(sp) (internal_error (__FILE__, __LINE__, "STACK_ALIGN"), 0) |
33489c5b AC |
2392 | #endif |
2393 | ||
2ada493a AC |
2394 | typedef CORE_ADDR (gdbarch_stack_align_ftype) (CORE_ADDR sp); |
2395 | extern CORE_ADDR gdbarch_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp); | |
2396 | extern void set_gdbarch_stack_align (struct gdbarch *gdbarch, gdbarch_stack_align_ftype *stack_align); | |
83905903 AC |
2397 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STACK_ALIGN) |
2398 | #error "Non multi-arch definition of STACK_ALIGN" | |
2399 | #endif | |
c25083af | 2400 | #if !defined (STACK_ALIGN) |
2ada493a AC |
2401 | #define STACK_ALIGN(sp) (gdbarch_stack_align (current_gdbarch, sp)) |
2402 | #endif | |
2403 | ||
dc604539 AC |
2404 | extern int gdbarch_frame_align_p (struct gdbarch *gdbarch); |
2405 | ||
2406 | typedef CORE_ADDR (gdbarch_frame_align_ftype) (struct gdbarch *gdbarch, CORE_ADDR address); | |
2407 | extern CORE_ADDR gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address); | |
2408 | extern void set_gdbarch_frame_align (struct gdbarch *gdbarch, gdbarch_frame_align_ftype *frame_align); | |
2409 | ||
f933a9c5 AC |
2410 | /* NOTE: cagney/2003-03-24: This is better handled by PUSH_ARGUMENTS. */ |
2411 | ||
0a49d05e | 2412 | /* Default (value) for non- multi-arch platforms. */ |
f933a9c5 AC |
2413 | #if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED) |
2414 | #define DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED (0) | |
0a49d05e AC |
2415 | #endif |
2416 | ||
f933a9c5 AC |
2417 | extern int gdbarch_deprecated_extra_stack_alignment_needed (struct gdbarch *gdbarch); |
2418 | extern void set_gdbarch_deprecated_extra_stack_alignment_needed (struct gdbarch *gdbarch, int deprecated_extra_stack_alignment_needed); | |
2419 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED) | |
2420 | #error "Non multi-arch definition of DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED" | |
83905903 | 2421 | #endif |
c25083af | 2422 | #if !defined (DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED) |
f933a9c5 | 2423 | #define DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED (gdbarch_deprecated_extra_stack_alignment_needed (current_gdbarch)) |
0a49d05e | 2424 | #endif |
0a49d05e | 2425 | |
d03e67c9 AC |
2426 | #if defined (REG_STRUCT_HAS_ADDR) |
2427 | /* Legacy for systems yet to multi-arch REG_STRUCT_HAS_ADDR */ | |
eee30e78 | 2428 | #if !defined (REG_STRUCT_HAS_ADDR_P) |
d03e67c9 AC |
2429 | #define REG_STRUCT_HAS_ADDR_P() (1) |
2430 | #endif | |
eee30e78 | 2431 | #endif |
d03e67c9 | 2432 | |
33489c5b | 2433 | /* Default predicate for non- multi-arch targets. */ |
6166d547 | 2434 | #if (!GDB_MULTI_ARCH) && !defined (REG_STRUCT_HAS_ADDR_P) |
33489c5b AC |
2435 | #define REG_STRUCT_HAS_ADDR_P() (0) |
2436 | #endif | |
2437 | ||
d03e67c9 | 2438 | extern int gdbarch_reg_struct_has_addr_p (struct gdbarch *gdbarch); |
83905903 AC |
2439 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REG_STRUCT_HAS_ADDR_P) |
2440 | #error "Non multi-arch definition of REG_STRUCT_HAS_ADDR" | |
2441 | #endif | |
6166d547 | 2442 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REG_STRUCT_HAS_ADDR_P) |
d03e67c9 AC |
2443 | #define REG_STRUCT_HAS_ADDR_P() (gdbarch_reg_struct_has_addr_p (current_gdbarch)) |
2444 | #endif | |
2445 | ||
33489c5b | 2446 | /* Default (function) for non- multi-arch platforms. */ |
6166d547 | 2447 | #if (!GDB_MULTI_ARCH) && !defined (REG_STRUCT_HAS_ADDR) |
8e65ff28 | 2448 | #define REG_STRUCT_HAS_ADDR(gcc_p, type) (internal_error (__FILE__, __LINE__, "REG_STRUCT_HAS_ADDR"), 0) |
33489c5b AC |
2449 | #endif |
2450 | ||
d03e67c9 AC |
2451 | typedef int (gdbarch_reg_struct_has_addr_ftype) (int gcc_p, struct type *type); |
2452 | extern int gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type); | |
2453 | extern void set_gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, gdbarch_reg_struct_has_addr_ftype *reg_struct_has_addr); | |
83905903 AC |
2454 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REG_STRUCT_HAS_ADDR) |
2455 | #error "Non multi-arch definition of REG_STRUCT_HAS_ADDR" | |
2456 | #endif | |
c25083af | 2457 | #if !defined (REG_STRUCT_HAS_ADDR) |
d03e67c9 AC |
2458 | #define REG_STRUCT_HAS_ADDR(gcc_p, type) (gdbarch_reg_struct_has_addr (current_gdbarch, gcc_p, type)) |
2459 | #endif | |
2460 | ||
a2ce2e56 AC |
2461 | /* FIXME: kettenis/2003-03-08: This should be replaced by a function |
2462 | parametrized with (at least) the regcache. */ | |
2463 | ||
d1e3cf49 AC |
2464 | #if defined (SAVE_DUMMY_FRAME_TOS) |
2465 | /* Legacy for systems yet to multi-arch SAVE_DUMMY_FRAME_TOS */ | |
eee30e78 | 2466 | #if !defined (SAVE_DUMMY_FRAME_TOS_P) |
d1e3cf49 AC |
2467 | #define SAVE_DUMMY_FRAME_TOS_P() (1) |
2468 | #endif | |
eee30e78 | 2469 | #endif |
d1e3cf49 AC |
2470 | |
2471 | /* Default predicate for non- multi-arch targets. */ | |
6166d547 | 2472 | #if (!GDB_MULTI_ARCH) && !defined (SAVE_DUMMY_FRAME_TOS_P) |
d1e3cf49 AC |
2473 | #define SAVE_DUMMY_FRAME_TOS_P() (0) |
2474 | #endif | |
2475 | ||
2476 | extern int gdbarch_save_dummy_frame_tos_p (struct gdbarch *gdbarch); | |
83905903 AC |
2477 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SAVE_DUMMY_FRAME_TOS_P) |
2478 | #error "Non multi-arch definition of SAVE_DUMMY_FRAME_TOS" | |
2479 | #endif | |
6166d547 | 2480 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SAVE_DUMMY_FRAME_TOS_P) |
d1e3cf49 AC |
2481 | #define SAVE_DUMMY_FRAME_TOS_P() (gdbarch_save_dummy_frame_tos_p (current_gdbarch)) |
2482 | #endif | |
2483 | ||
2484 | /* Default (function) for non- multi-arch platforms. */ | |
6166d547 | 2485 | #if (!GDB_MULTI_ARCH) && !defined (SAVE_DUMMY_FRAME_TOS) |
8e65ff28 | 2486 | #define SAVE_DUMMY_FRAME_TOS(sp) (internal_error (__FILE__, __LINE__, "SAVE_DUMMY_FRAME_TOS"), 0) |
d1e3cf49 AC |
2487 | #endif |
2488 | ||
2489 | typedef void (gdbarch_save_dummy_frame_tos_ftype) (CORE_ADDR sp); | |
2490 | extern void gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp); | |
2491 | extern void set_gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, gdbarch_save_dummy_frame_tos_ftype *save_dummy_frame_tos); | |
83905903 AC |
2492 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SAVE_DUMMY_FRAME_TOS) |
2493 | #error "Non multi-arch definition of SAVE_DUMMY_FRAME_TOS" | |
2494 | #endif | |
c25083af | 2495 | #if !defined (SAVE_DUMMY_FRAME_TOS) |
d1e3cf49 AC |
2496 | #define SAVE_DUMMY_FRAME_TOS(sp) (gdbarch_save_dummy_frame_tos (current_gdbarch, sp)) |
2497 | #endif | |
d1e3cf49 | 2498 | |
6314f104 AC |
2499 | extern int gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch); |
2500 | ||
2501 | typedef struct frame_id (gdbarch_unwind_dummy_id_ftype) (struct gdbarch *gdbarch, struct frame_info *info); | |
2502 | extern struct frame_id gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *info); | |
2503 | extern void set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, gdbarch_unwind_dummy_id_ftype *unwind_dummy_id); | |
2504 | ||
58d5518e ND |
2505 | extern int gdbarch_parm_boundary (struct gdbarch *gdbarch); |
2506 | extern void set_gdbarch_parm_boundary (struct gdbarch *gdbarch, int parm_boundary); | |
83905903 AC |
2507 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PARM_BOUNDARY) |
2508 | #error "Non multi-arch definition of PARM_BOUNDARY" | |
2509 | #endif | |
c25083af | 2510 | #if !defined (PARM_BOUNDARY) |
58d5518e ND |
2511 | #define PARM_BOUNDARY (gdbarch_parm_boundary (current_gdbarch)) |
2512 | #endif | |
58d5518e | 2513 | |
f0d4cc9e | 2514 | /* Default (value) for non- multi-arch platforms. */ |
6166d547 | 2515 | #if (!GDB_MULTI_ARCH) && !defined (TARGET_FLOAT_FORMAT) |
f0d4cc9e AC |
2516 | #define TARGET_FLOAT_FORMAT (default_float_format (current_gdbarch)) |
2517 | #endif | |
2518 | ||
2519 | extern const struct floatformat * gdbarch_float_format (struct gdbarch *gdbarch); | |
2520 | extern void set_gdbarch_float_format (struct gdbarch *gdbarch, const struct floatformat * float_format); | |
83905903 AC |
2521 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_FLOAT_FORMAT) |
2522 | #error "Non multi-arch definition of TARGET_FLOAT_FORMAT" | |
2523 | #endif | |
c25083af | 2524 | #if !defined (TARGET_FLOAT_FORMAT) |
f0d4cc9e AC |
2525 | #define TARGET_FLOAT_FORMAT (gdbarch_float_format (current_gdbarch)) |
2526 | #endif | |
f0d4cc9e AC |
2527 | |
2528 | /* Default (value) for non- multi-arch platforms. */ | |
6166d547 | 2529 | #if (!GDB_MULTI_ARCH) && !defined (TARGET_DOUBLE_FORMAT) |
f0d4cc9e AC |
2530 | #define TARGET_DOUBLE_FORMAT (default_double_format (current_gdbarch)) |
2531 | #endif | |
2532 | ||
2533 | extern const struct floatformat * gdbarch_double_format (struct gdbarch *gdbarch); | |
2534 | extern void set_gdbarch_double_format (struct gdbarch *gdbarch, const struct floatformat * double_format); | |
83905903 AC |
2535 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_DOUBLE_FORMAT) |
2536 | #error "Non multi-arch definition of TARGET_DOUBLE_FORMAT" | |
2537 | #endif | |
c25083af | 2538 | #if !defined (TARGET_DOUBLE_FORMAT) |
f0d4cc9e AC |
2539 | #define TARGET_DOUBLE_FORMAT (gdbarch_double_format (current_gdbarch)) |
2540 | #endif | |
f0d4cc9e AC |
2541 | |
2542 | /* Default (value) for non- multi-arch platforms. */ | |
6166d547 | 2543 | #if (!GDB_MULTI_ARCH) && !defined (TARGET_LONG_DOUBLE_FORMAT) |
2fa5c1e0 | 2544 | #define TARGET_LONG_DOUBLE_FORMAT (default_double_format (current_gdbarch)) |
f0d4cc9e AC |
2545 | #endif |
2546 | ||
2547 | extern const struct floatformat * gdbarch_long_double_format (struct gdbarch *gdbarch); | |
2548 | extern void set_gdbarch_long_double_format (struct gdbarch *gdbarch, const struct floatformat * long_double_format); | |
83905903 AC |
2549 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_DOUBLE_FORMAT) |
2550 | #error "Non multi-arch definition of TARGET_LONG_DOUBLE_FORMAT" | |
2551 | #endif | |
c25083af | 2552 | #if !defined (TARGET_LONG_DOUBLE_FORMAT) |
f0d4cc9e AC |
2553 | #define TARGET_LONG_DOUBLE_FORMAT (gdbarch_long_double_format (current_gdbarch)) |
2554 | #endif | |
f0d4cc9e | 2555 | |
f517ea4e PS |
2556 | /* Default (function) for non- multi-arch platforms. */ |
2557 | #if (!GDB_MULTI_ARCH) && !defined (CONVERT_FROM_FUNC_PTR_ADDR) | |
875e1767 | 2558 | #define CONVERT_FROM_FUNC_PTR_ADDR(addr) (core_addr_identity (addr)) |
f517ea4e PS |
2559 | #endif |
2560 | ||
2561 | typedef CORE_ADDR (gdbarch_convert_from_func_ptr_addr_ftype) (CORE_ADDR addr); | |
2562 | extern CORE_ADDR gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr); | |
2563 | 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 |
2564 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CONVERT_FROM_FUNC_PTR_ADDR) |
2565 | #error "Non multi-arch definition of CONVERT_FROM_FUNC_PTR_ADDR" | |
2566 | #endif | |
c25083af | 2567 | #if !defined (CONVERT_FROM_FUNC_PTR_ADDR) |
f517ea4e PS |
2568 | #define CONVERT_FROM_FUNC_PTR_ADDR(addr) (gdbarch_convert_from_func_ptr_addr (current_gdbarch, addr)) |
2569 | #endif | |
f517ea4e | 2570 | |
875e1767 AC |
2571 | /* On some machines there are bits in addresses which are not really |
2572 | part of the address, but are used by the kernel, the hardware, etc. | |
2573 | for special purposes. ADDR_BITS_REMOVE takes out any such bits so | |
2574 | we get a "real" address such as one would find in a symbol table. | |
2575 | This is used only for addresses of instructions, and even then I'm | |
2576 | not sure it's used in all contexts. It exists to deal with there | |
2577 | being a few stray bits in the PC which would mislead us, not as some | |
2578 | sort of generic thing to handle alignment or segmentation (it's | |
2579 | possible it should be in TARGET_READ_PC instead). */ | |
2580 | ||
2581 | /* Default (function) for non- multi-arch platforms. */ | |
2582 | #if (!GDB_MULTI_ARCH) && !defined (ADDR_BITS_REMOVE) | |
2583 | #define ADDR_BITS_REMOVE(addr) (core_addr_identity (addr)) | |
2584 | #endif | |
2585 | ||
2586 | typedef CORE_ADDR (gdbarch_addr_bits_remove_ftype) (CORE_ADDR addr); | |
2587 | extern CORE_ADDR gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr); | |
2588 | extern void set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch, gdbarch_addr_bits_remove_ftype *addr_bits_remove); | |
83905903 AC |
2589 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDR_BITS_REMOVE) |
2590 | #error "Non multi-arch definition of ADDR_BITS_REMOVE" | |
2591 | #endif | |
c25083af | 2592 | #if !defined (ADDR_BITS_REMOVE) |
875e1767 AC |
2593 | #define ADDR_BITS_REMOVE(addr) (gdbarch_addr_bits_remove (current_gdbarch, addr)) |
2594 | #endif | |
875e1767 | 2595 | |
5720643c | 2596 | /* It is not at all clear why SMASH_TEXT_ADDRESS is not folded into |
181c1381 RE |
2597 | ADDR_BITS_REMOVE. */ |
2598 | ||
2599 | /* Default (function) for non- multi-arch platforms. */ | |
2600 | #if (!GDB_MULTI_ARCH) && !defined (SMASH_TEXT_ADDRESS) | |
2601 | #define SMASH_TEXT_ADDRESS(addr) (core_addr_identity (addr)) | |
2602 | #endif | |
2603 | ||
2604 | typedef CORE_ADDR (gdbarch_smash_text_address_ftype) (CORE_ADDR addr); | |
2605 | extern CORE_ADDR gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr); | |
2606 | extern void set_gdbarch_smash_text_address (struct gdbarch *gdbarch, gdbarch_smash_text_address_ftype *smash_text_address); | |
2607 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SMASH_TEXT_ADDRESS) | |
2608 | #error "Non multi-arch definition of SMASH_TEXT_ADDRESS" | |
2609 | #endif | |
c25083af | 2610 | #if !defined (SMASH_TEXT_ADDRESS) |
181c1381 RE |
2611 | #define SMASH_TEXT_ADDRESS(addr) (gdbarch_smash_text_address (current_gdbarch, addr)) |
2612 | #endif | |
181c1381 | 2613 | |
64c4637f AC |
2614 | /* FIXME/cagney/2001-01-18: This should be split in two. A target method that indicates if |
2615 | the target needs software single step. An ISA method to implement it. | |
2616 | ||
2617 | FIXME/cagney/2001-01-18: This should be replaced with something that inserts breakpoints | |
2618 | using the breakpoint system instead of blatting memory directly (as with rs6000). | |
2619 | ||
2620 | FIXME/cagney/2001-01-18: The logic is backwards. It should be asking if the target can | |
2621 | single step. If not, then implement single step using breakpoints. */ | |
2622 | ||
2623 | #if defined (SOFTWARE_SINGLE_STEP) | |
2624 | /* Legacy for systems yet to multi-arch SOFTWARE_SINGLE_STEP */ | |
2625 | #if !defined (SOFTWARE_SINGLE_STEP_P) | |
2626 | #define SOFTWARE_SINGLE_STEP_P() (1) | |
2627 | #endif | |
2628 | #endif | |
2629 | ||
2630 | /* Default predicate for non- multi-arch targets. */ | |
2631 | #if (!GDB_MULTI_ARCH) && !defined (SOFTWARE_SINGLE_STEP_P) | |
2632 | #define SOFTWARE_SINGLE_STEP_P() (0) | |
2633 | #endif | |
2634 | ||
2635 | extern int gdbarch_software_single_step_p (struct gdbarch *gdbarch); | |
83905903 AC |
2636 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SOFTWARE_SINGLE_STEP_P) |
2637 | #error "Non multi-arch definition of SOFTWARE_SINGLE_STEP" | |
2638 | #endif | |
64c4637f AC |
2639 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SOFTWARE_SINGLE_STEP_P) |
2640 | #define SOFTWARE_SINGLE_STEP_P() (gdbarch_software_single_step_p (current_gdbarch)) | |
2641 | #endif | |
2642 | ||
2643 | /* Default (function) for non- multi-arch platforms. */ | |
2644 | #if (!GDB_MULTI_ARCH) && !defined (SOFTWARE_SINGLE_STEP) | |
2645 | #define SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p) (internal_error (__FILE__, __LINE__, "SOFTWARE_SINGLE_STEP"), 0) | |
2646 | #endif | |
2647 | ||
2648 | typedef void (gdbarch_software_single_step_ftype) (enum target_signal sig, int insert_breakpoints_p); | |
2649 | extern void gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p); | |
2650 | extern void set_gdbarch_software_single_step (struct gdbarch *gdbarch, gdbarch_software_single_step_ftype *software_single_step); | |
83905903 AC |
2651 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SOFTWARE_SINGLE_STEP) |
2652 | #error "Non multi-arch definition of SOFTWARE_SINGLE_STEP" | |
2653 | #endif | |
c25083af | 2654 | #if !defined (SOFTWARE_SINGLE_STEP) |
64c4637f AC |
2655 | #define SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p) (gdbarch_software_single_step (current_gdbarch, sig, insert_breakpoints_p)) |
2656 | #endif | |
64c4637f | 2657 | |
2bf0cb65 EZ |
2658 | /* Default (function) for non- multi-arch platforms. */ |
2659 | #if (!GDB_MULTI_ARCH) && !defined (TARGET_PRINT_INSN) | |
2660 | #define TARGET_PRINT_INSN(vma, info) (legacy_print_insn (vma, info)) | |
2661 | #endif | |
2662 | ||
2663 | typedef int (gdbarch_print_insn_ftype) (bfd_vma vma, disassemble_info *info); | |
2664 | extern int gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, disassemble_info *info); | |
2665 | extern void set_gdbarch_print_insn (struct gdbarch *gdbarch, gdbarch_print_insn_ftype *print_insn); | |
2666 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_PRINT_INSN) | |
2667 | #error "Non multi-arch definition of TARGET_PRINT_INSN" | |
2668 | #endif | |
c25083af | 2669 | #if !defined (TARGET_PRINT_INSN) |
2bf0cb65 EZ |
2670 | #define TARGET_PRINT_INSN(vma, info) (gdbarch_print_insn (current_gdbarch, vma, info)) |
2671 | #endif | |
2bf0cb65 | 2672 | |
bdcd319a CV |
2673 | /* Default (function) for non- multi-arch platforms. */ |
2674 | #if (!GDB_MULTI_ARCH) && !defined (SKIP_TRAMPOLINE_CODE) | |
2675 | #define SKIP_TRAMPOLINE_CODE(pc) (generic_skip_trampoline_code (pc)) | |
2676 | #endif | |
2677 | ||
2678 | typedef CORE_ADDR (gdbarch_skip_trampoline_code_ftype) (CORE_ADDR pc); | |
2679 | extern CORE_ADDR gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc); | |
2680 | extern void set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, gdbarch_skip_trampoline_code_ftype *skip_trampoline_code); | |
2681 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SKIP_TRAMPOLINE_CODE) | |
2682 | #error "Non multi-arch definition of SKIP_TRAMPOLINE_CODE" | |
2683 | #endif | |
c25083af | 2684 | #if !defined (SKIP_TRAMPOLINE_CODE) |
bdcd319a CV |
2685 | #define SKIP_TRAMPOLINE_CODE(pc) (gdbarch_skip_trampoline_code (current_gdbarch, pc)) |
2686 | #endif | |
bdcd319a | 2687 | |
68e9cc94 CV |
2688 | /* For SVR4 shared libraries, each call goes through a small piece of |
2689 | trampoline code in the ".plt" section. IN_SOLIB_CALL_TRAMPOLINE evaluates | |
d50355b6 | 2690 | to nonzero if we are currently stopped in one of these. */ |
68e9cc94 CV |
2691 | |
2692 | /* Default (function) for non- multi-arch platforms. */ | |
2693 | #if (!GDB_MULTI_ARCH) && !defined (IN_SOLIB_CALL_TRAMPOLINE) | |
2694 | #define IN_SOLIB_CALL_TRAMPOLINE(pc, name) (generic_in_solib_call_trampoline (pc, name)) | |
2695 | #endif | |
2696 | ||
2697 | typedef int (gdbarch_in_solib_call_trampoline_ftype) (CORE_ADDR pc, char *name); | |
2698 | extern int gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name); | |
2699 | extern void set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline); | |
2700 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (IN_SOLIB_CALL_TRAMPOLINE) | |
2701 | #error "Non multi-arch definition of IN_SOLIB_CALL_TRAMPOLINE" | |
2702 | #endif | |
c25083af | 2703 | #if !defined (IN_SOLIB_CALL_TRAMPOLINE) |
68e9cc94 CV |
2704 | #define IN_SOLIB_CALL_TRAMPOLINE(pc, name) (gdbarch_in_solib_call_trampoline (current_gdbarch, pc, name)) |
2705 | #endif | |
68e9cc94 | 2706 | |
d50355b6 MS |
2707 | /* Some systems also have trampoline code for returning from shared libs. */ |
2708 | ||
2709 | /* Default (function) for non- multi-arch platforms. */ | |
2710 | #if (!GDB_MULTI_ARCH) && !defined (IN_SOLIB_RETURN_TRAMPOLINE) | |
2711 | #define IN_SOLIB_RETURN_TRAMPOLINE(pc, name) (generic_in_solib_return_trampoline (pc, name)) | |
2712 | #endif | |
2713 | ||
2714 | typedef int (gdbarch_in_solib_return_trampoline_ftype) (CORE_ADDR pc, char *name); | |
2715 | extern int gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name); | |
2716 | extern void set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline); | |
2717 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (IN_SOLIB_RETURN_TRAMPOLINE) | |
2718 | #error "Non multi-arch definition of IN_SOLIB_RETURN_TRAMPOLINE" | |
2719 | #endif | |
c25083af | 2720 | #if !defined (IN_SOLIB_RETURN_TRAMPOLINE) |
d50355b6 MS |
2721 | #define IN_SOLIB_RETURN_TRAMPOLINE(pc, name) (gdbarch_in_solib_return_trampoline (current_gdbarch, pc, name)) |
2722 | #endif | |
d50355b6 | 2723 | |
d7bd68ca AC |
2724 | /* Sigtramp is a routine that the kernel calls (which then calls the |
2725 | signal handler). On most machines it is a library routine that is | |
2726 | linked into the executable. | |
2727 | ||
2728 | This macro, given a program counter value and the name of the | |
2729 | function in which that PC resides (which can be null if the name is | |
2730 | not known), returns nonzero if the PC and name show that we are in | |
2731 | sigtramp. | |
2732 | ||
2733 | On most machines just see if the name is sigtramp (and if we have | |
2734 | no name, assume we are not in sigtramp). | |
2735 | ||
2736 | FIXME: cagney/2002-04-21: The function find_pc_partial_function | |
2737 | calls find_pc_sect_partial_function() which calls PC_IN_SIGTRAMP. | |
2738 | This means PC_IN_SIGTRAMP function can't be implemented by doing its | |
2739 | own local NAME lookup. | |
2740 | ||
2741 | FIXME: cagney/2002-04-21: PC_IN_SIGTRAMP is something of a mess. | |
2742 | Some code also depends on SIGTRAMP_START and SIGTRAMP_END but other | |
2743 | does not. */ | |
2744 | ||
2745 | /* Default (function) for non- multi-arch platforms. */ | |
2746 | #if (!GDB_MULTI_ARCH) && !defined (PC_IN_SIGTRAMP) | |
2747 | #define PC_IN_SIGTRAMP(pc, name) (legacy_pc_in_sigtramp (pc, name)) | |
2748 | #endif | |
2749 | ||
2750 | typedef int (gdbarch_pc_in_sigtramp_ftype) (CORE_ADDR pc, char *name); | |
2751 | extern int gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc, char *name); | |
2752 | extern void set_gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, gdbarch_pc_in_sigtramp_ftype *pc_in_sigtramp); | |
2753 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PC_IN_SIGTRAMP) | |
2754 | #error "Non multi-arch definition of PC_IN_SIGTRAMP" | |
2755 | #endif | |
c25083af | 2756 | #if !defined (PC_IN_SIGTRAMP) |
d7bd68ca AC |
2757 | #define PC_IN_SIGTRAMP(pc, name) (gdbarch_pc_in_sigtramp (current_gdbarch, pc, name)) |
2758 | #endif | |
d7bd68ca | 2759 | |
43156d82 MK |
2760 | #if defined (SIGTRAMP_START) |
2761 | /* Legacy for systems yet to multi-arch SIGTRAMP_START */ | |
2762 | #if !defined (SIGTRAMP_START_P) | |
2763 | #define SIGTRAMP_START_P() (1) | |
2764 | #endif | |
2765 | #endif | |
2766 | ||
2767 | /* Default predicate for non- multi-arch targets. */ | |
2768 | #if (!GDB_MULTI_ARCH) && !defined (SIGTRAMP_START_P) | |
2769 | #define SIGTRAMP_START_P() (0) | |
2770 | #endif | |
2771 | ||
2772 | extern int gdbarch_sigtramp_start_p (struct gdbarch *gdbarch); | |
2773 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIGTRAMP_START_P) | |
2774 | #error "Non multi-arch definition of SIGTRAMP_START" | |
2775 | #endif | |
2776 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SIGTRAMP_START_P) | |
2777 | #define SIGTRAMP_START_P() (gdbarch_sigtramp_start_p (current_gdbarch)) | |
2778 | #endif | |
2779 | ||
2780 | /* Default (function) for non- multi-arch platforms. */ | |
2781 | #if (!GDB_MULTI_ARCH) && !defined (SIGTRAMP_START) | |
2782 | #define SIGTRAMP_START(pc) (internal_error (__FILE__, __LINE__, "SIGTRAMP_START"), 0) | |
2783 | #endif | |
2784 | ||
2785 | typedef CORE_ADDR (gdbarch_sigtramp_start_ftype) (CORE_ADDR pc); | |
2786 | extern CORE_ADDR gdbarch_sigtramp_start (struct gdbarch *gdbarch, CORE_ADDR pc); | |
2787 | extern void set_gdbarch_sigtramp_start (struct gdbarch *gdbarch, gdbarch_sigtramp_start_ftype *sigtramp_start); | |
2788 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIGTRAMP_START) | |
2789 | #error "Non multi-arch definition of SIGTRAMP_START" | |
2790 | #endif | |
c25083af | 2791 | #if !defined (SIGTRAMP_START) |
43156d82 MK |
2792 | #define SIGTRAMP_START(pc) (gdbarch_sigtramp_start (current_gdbarch, pc)) |
2793 | #endif | |
43156d82 | 2794 | |
e76cff22 AC |
2795 | #if defined (SIGTRAMP_END) |
2796 | /* Legacy for systems yet to multi-arch SIGTRAMP_END */ | |
2797 | #if !defined (SIGTRAMP_END_P) | |
2798 | #define SIGTRAMP_END_P() (1) | |
2799 | #endif | |
2800 | #endif | |
2801 | ||
2802 | /* Default predicate for non- multi-arch targets. */ | |
2803 | #if (!GDB_MULTI_ARCH) && !defined (SIGTRAMP_END_P) | |
2804 | #define SIGTRAMP_END_P() (0) | |
2805 | #endif | |
2806 | ||
2807 | extern int gdbarch_sigtramp_end_p (struct gdbarch *gdbarch); | |
2808 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIGTRAMP_END_P) | |
2809 | #error "Non multi-arch definition of SIGTRAMP_END" | |
2810 | #endif | |
2811 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SIGTRAMP_END_P) | |
2812 | #define SIGTRAMP_END_P() (gdbarch_sigtramp_end_p (current_gdbarch)) | |
2813 | #endif | |
2814 | ||
2815 | /* Default (function) for non- multi-arch platforms. */ | |
2816 | #if (!GDB_MULTI_ARCH) && !defined (SIGTRAMP_END) | |
2817 | #define SIGTRAMP_END(pc) (internal_error (__FILE__, __LINE__, "SIGTRAMP_END"), 0) | |
2818 | #endif | |
2819 | ||
43156d82 MK |
2820 | typedef CORE_ADDR (gdbarch_sigtramp_end_ftype) (CORE_ADDR pc); |
2821 | extern CORE_ADDR gdbarch_sigtramp_end (struct gdbarch *gdbarch, CORE_ADDR pc); | |
2822 | extern void set_gdbarch_sigtramp_end (struct gdbarch *gdbarch, gdbarch_sigtramp_end_ftype *sigtramp_end); | |
2823 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIGTRAMP_END) | |
2824 | #error "Non multi-arch definition of SIGTRAMP_END" | |
2825 | #endif | |
c25083af | 2826 | #if !defined (SIGTRAMP_END) |
43156d82 MK |
2827 | #define SIGTRAMP_END(pc) (gdbarch_sigtramp_end (current_gdbarch, pc)) |
2828 | #endif | |
43156d82 | 2829 | |
c12260ac CV |
2830 | /* A target might have problems with watchpoints as soon as the stack |
2831 | frame of the current function has been destroyed. This mostly happens | |
2832 | as the first action in a funtion's epilogue. in_function_epilogue_p() | |
2833 | is defined to return a non-zero value if either the given addr is one | |
2834 | instruction after the stack destroying instruction up to the trailing | |
2835 | return instruction or if we can figure out that the stack frame has | |
2836 | already been invalidated regardless of the value of addr. Targets | |
2837 | which don't suffer from that problem could just let this functionality | |
2838 | untouched. */ | |
2839 | ||
2840 | typedef int (gdbarch_in_function_epilogue_p_ftype) (struct gdbarch *gdbarch, CORE_ADDR addr); | |
2841 | extern int gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr); | |
2842 | extern void set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p); | |
2843 | ||
552c04a7 TT |
2844 | /* Given a vector of command-line arguments, return a newly allocated |
2845 | string which, when passed to the create_inferior function, will be | |
2846 | parsed (on Unix systems, by the shell) to yield the same vector. | |
2847 | This function should call error() if the argument vector is not | |
2848 | representable for this target or if this target does not support | |
2849 | command-line arguments. | |
2850 | ARGC is the number of elements in the vector. | |
2851 | ARGV is an array of strings, one per argument. */ | |
2852 | ||
2853 | typedef char * (gdbarch_construct_inferior_arguments_ftype) (struct gdbarch *gdbarch, int argc, char **argv); | |
2854 | extern char * gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv); | |
2855 | extern void set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments); | |
2856 | ||
b6af0555 JS |
2857 | #if defined (DWARF2_BUILD_FRAME_INFO) |
2858 | /* Legacy for systems yet to multi-arch DWARF2_BUILD_FRAME_INFO */ | |
2859 | #if !defined (DWARF2_BUILD_FRAME_INFO_P) | |
2860 | #define DWARF2_BUILD_FRAME_INFO_P() (1) | |
2861 | #endif | |
2862 | #endif | |
2863 | ||
2864 | /* Default predicate for non- multi-arch targets. */ | |
2865 | #if (!GDB_MULTI_ARCH) && !defined (DWARF2_BUILD_FRAME_INFO_P) | |
2866 | #define DWARF2_BUILD_FRAME_INFO_P() (0) | |
2867 | #endif | |
2868 | ||
2869 | extern int gdbarch_dwarf2_build_frame_info_p (struct gdbarch *gdbarch); | |
2870 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF2_BUILD_FRAME_INFO_P) | |
2871 | #error "Non multi-arch definition of DWARF2_BUILD_FRAME_INFO" | |
2872 | #endif | |
2873 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DWARF2_BUILD_FRAME_INFO_P) | |
2874 | #define DWARF2_BUILD_FRAME_INFO_P() (gdbarch_dwarf2_build_frame_info_p (current_gdbarch)) | |
2875 | #endif | |
2876 | ||
2877 | /* Default (function) for non- multi-arch platforms. */ | |
2878 | #if (!GDB_MULTI_ARCH) && !defined (DWARF2_BUILD_FRAME_INFO) | |
2879 | #define DWARF2_BUILD_FRAME_INFO(objfile) (internal_error (__FILE__, __LINE__, "DWARF2_BUILD_FRAME_INFO"), 0) | |
2880 | #endif | |
2881 | ||
2882 | typedef void (gdbarch_dwarf2_build_frame_info_ftype) (struct objfile *objfile); | |
2883 | extern void gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch, struct objfile *objfile); | |
2884 | extern void set_gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch, gdbarch_dwarf2_build_frame_info_ftype *dwarf2_build_frame_info); | |
2885 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF2_BUILD_FRAME_INFO) | |
2886 | #error "Non multi-arch definition of DWARF2_BUILD_FRAME_INFO" | |
2887 | #endif | |
c25083af | 2888 | #if !defined (DWARF2_BUILD_FRAME_INFO) |
b6af0555 JS |
2889 | #define DWARF2_BUILD_FRAME_INFO(objfile) (gdbarch_dwarf2_build_frame_info (current_gdbarch, objfile)) |
2890 | #endif | |
b6af0555 | 2891 | |
a2cf933a EZ |
2892 | /* Default (function) for non- multi-arch platforms. */ |
2893 | #if (!GDB_MULTI_ARCH) && !defined (ELF_MAKE_MSYMBOL_SPECIAL) | |
2894 | #define ELF_MAKE_MSYMBOL_SPECIAL(sym, msym) (default_elf_make_msymbol_special (sym, msym)) | |
2895 | #endif | |
2896 | ||
2897 | typedef void (gdbarch_elf_make_msymbol_special_ftype) (asymbol *sym, struct minimal_symbol *msym); | |
2898 | extern void gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym); | |
2899 | extern void set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special); | |
2900 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ELF_MAKE_MSYMBOL_SPECIAL) | |
2901 | #error "Non multi-arch definition of ELF_MAKE_MSYMBOL_SPECIAL" | |
2902 | #endif | |
c25083af | 2903 | #if !defined (ELF_MAKE_MSYMBOL_SPECIAL) |
a2cf933a EZ |
2904 | #define ELF_MAKE_MSYMBOL_SPECIAL(sym, msym) (gdbarch_elf_make_msymbol_special (current_gdbarch, sym, msym)) |
2905 | #endif | |
a2cf933a EZ |
2906 | |
2907 | /* Default (function) for non- multi-arch platforms. */ | |
2908 | #if (!GDB_MULTI_ARCH) && !defined (COFF_MAKE_MSYMBOL_SPECIAL) | |
2909 | #define COFF_MAKE_MSYMBOL_SPECIAL(val, msym) (default_coff_make_msymbol_special (val, msym)) | |
2910 | #endif | |
2911 | ||
2912 | typedef void (gdbarch_coff_make_msymbol_special_ftype) (int val, struct minimal_symbol *msym); | |
2913 | extern void gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym); | |
2914 | extern void set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special); | |
2915 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (COFF_MAKE_MSYMBOL_SPECIAL) | |
2916 | #error "Non multi-arch definition of COFF_MAKE_MSYMBOL_SPECIAL" | |
2917 | #endif | |
c25083af | 2918 | #if !defined (COFF_MAKE_MSYMBOL_SPECIAL) |
a2cf933a EZ |
2919 | #define COFF_MAKE_MSYMBOL_SPECIAL(val, msym) (gdbarch_coff_make_msymbol_special (current_gdbarch, val, msym)) |
2920 | #endif | |
a2cf933a | 2921 | |
5720643c JB |
2922 | /* Default (value) for non- multi-arch platforms. */ |
2923 | #if (!GDB_MULTI_ARCH) && !defined (NAME_OF_MALLOC) | |
2924 | #define NAME_OF_MALLOC ("malloc") | |
2925 | #endif | |
2926 | ||
2927 | extern const char * gdbarch_name_of_malloc (struct gdbarch *gdbarch); | |
2928 | extern void set_gdbarch_name_of_malloc (struct gdbarch *gdbarch, const char * name_of_malloc); | |
2929 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NAME_OF_MALLOC) | |
2930 | #error "Non multi-arch definition of NAME_OF_MALLOC" | |
2931 | #endif | |
c25083af | 2932 | #if !defined (NAME_OF_MALLOC) |
5720643c JB |
2933 | #define NAME_OF_MALLOC (gdbarch_name_of_malloc (current_gdbarch)) |
2934 | #endif | |
5720643c | 2935 | |
c4ed33b9 AC |
2936 | /* Default (value) for non- multi-arch platforms. */ |
2937 | #if (!GDB_MULTI_ARCH) && !defined (CANNOT_STEP_BREAKPOINT) | |
2938 | #define CANNOT_STEP_BREAKPOINT (0) | |
2939 | #endif | |
2940 | ||
2941 | extern int gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch); | |
2942 | extern void set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch, int cannot_step_breakpoint); | |
2943 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CANNOT_STEP_BREAKPOINT) | |
2944 | #error "Non multi-arch definition of CANNOT_STEP_BREAKPOINT" | |
2945 | #endif | |
c25083af | 2946 | #if !defined (CANNOT_STEP_BREAKPOINT) |
c4ed33b9 AC |
2947 | #define CANNOT_STEP_BREAKPOINT (gdbarch_cannot_step_breakpoint (current_gdbarch)) |
2948 | #endif | |
c4ed33b9 | 2949 | |
f74fa174 MM |
2950 | /* Default (value) for non- multi-arch platforms. */ |
2951 | #if (!GDB_MULTI_ARCH) && !defined (HAVE_NONSTEPPABLE_WATCHPOINT) | |
2952 | #define HAVE_NONSTEPPABLE_WATCHPOINT (0) | |
2953 | #endif | |
2954 | ||
2955 | extern int gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch); | |
2956 | extern void set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch, int have_nonsteppable_watchpoint); | |
2957 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (HAVE_NONSTEPPABLE_WATCHPOINT) | |
2958 | #error "Non multi-arch definition of HAVE_NONSTEPPABLE_WATCHPOINT" | |
2959 | #endif | |
c25083af | 2960 | #if !defined (HAVE_NONSTEPPABLE_WATCHPOINT) |
f74fa174 MM |
2961 | #define HAVE_NONSTEPPABLE_WATCHPOINT (gdbarch_have_nonsteppable_watchpoint (current_gdbarch)) |
2962 | #endif | |
f74fa174 | 2963 | |
8b2dbe47 KB |
2964 | #if defined (ADDRESS_CLASS_TYPE_FLAGS) |
2965 | /* Legacy for systems yet to multi-arch ADDRESS_CLASS_TYPE_FLAGS */ | |
2966 | #if !defined (ADDRESS_CLASS_TYPE_FLAGS_P) | |
2967 | #define ADDRESS_CLASS_TYPE_FLAGS_P() (1) | |
2968 | #endif | |
2969 | #endif | |
2970 | ||
2971 | /* Default predicate for non- multi-arch targets. */ | |
2972 | #if (!GDB_MULTI_ARCH) && !defined (ADDRESS_CLASS_TYPE_FLAGS_P) | |
2973 | #define ADDRESS_CLASS_TYPE_FLAGS_P() (0) | |
2974 | #endif | |
2975 | ||
2976 | extern int gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch); | |
2977 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDRESS_CLASS_TYPE_FLAGS_P) | |
2978 | #error "Non multi-arch definition of ADDRESS_CLASS_TYPE_FLAGS" | |
2979 | #endif | |
2980 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ADDRESS_CLASS_TYPE_FLAGS_P) | |
2981 | #define ADDRESS_CLASS_TYPE_FLAGS_P() (gdbarch_address_class_type_flags_p (current_gdbarch)) | |
2982 | #endif | |
2983 | ||
2984 | /* Default (function) for non- multi-arch platforms. */ | |
2985 | #if (!GDB_MULTI_ARCH) && !defined (ADDRESS_CLASS_TYPE_FLAGS) | |
2986 | #define ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class) (internal_error (__FILE__, __LINE__, "ADDRESS_CLASS_TYPE_FLAGS"), 0) | |
2987 | #endif | |
2988 | ||
2989 | typedef int (gdbarch_address_class_type_flags_ftype) (int byte_size, int dwarf2_addr_class); | |
2990 | extern int gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class); | |
2991 | extern void set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch, gdbarch_address_class_type_flags_ftype *address_class_type_flags); | |
2992 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDRESS_CLASS_TYPE_FLAGS) | |
2993 | #error "Non multi-arch definition of ADDRESS_CLASS_TYPE_FLAGS" | |
2994 | #endif | |
c25083af | 2995 | #if !defined (ADDRESS_CLASS_TYPE_FLAGS) |
8b2dbe47 KB |
2996 | #define ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class) (gdbarch_address_class_type_flags (current_gdbarch, byte_size, dwarf2_addr_class)) |
2997 | #endif | |
8b2dbe47 | 2998 | |
8b2dbe47 | 2999 | extern int gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch); |
8b2dbe47 | 3000 | |
321432c0 KB |
3001 | typedef const char * (gdbarch_address_class_type_flags_to_name_ftype) (struct gdbarch *gdbarch, int type_flags); |
3002 | extern const char * gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags); | |
8b2dbe47 | 3003 | 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 |
3004 | |
3005 | extern int gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch); | |
8b2dbe47 | 3006 | |
321432c0 KB |
3007 | typedef int (gdbarch_address_class_name_to_type_flags_ftype) (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr); |
3008 | extern int gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr); | |
8b2dbe47 | 3009 | 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 | 3010 | |
b59ff9d5 AC |
3011 | /* Is a register in a group */ |
3012 | ||
3013 | typedef int (gdbarch_register_reggroup_p_ftype) (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup); | |
3014 | extern int gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup); | |
3015 | extern void set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch, gdbarch_register_reggroup_p_ftype *register_reggroup_p); | |
3016 | ||
143985b7 AF |
3017 | /* Fetch the pointer to the ith function argument. */ |
3018 | ||
3019 | #if defined (FETCH_POINTER_ARGUMENT) | |
3020 | /* Legacy for systems yet to multi-arch FETCH_POINTER_ARGUMENT */ | |
3021 | #if !defined (FETCH_POINTER_ARGUMENT_P) | |
3022 | #define FETCH_POINTER_ARGUMENT_P() (1) | |
3023 | #endif | |
3024 | #endif | |
3025 | ||
3026 | /* Default predicate for non- multi-arch targets. */ | |
3027 | #if (!GDB_MULTI_ARCH) && !defined (FETCH_POINTER_ARGUMENT_P) | |
3028 | #define FETCH_POINTER_ARGUMENT_P() (0) | |
3029 | #endif | |
3030 | ||
3031 | extern int gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch); | |
3032 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FETCH_POINTER_ARGUMENT_P) | |
3033 | #error "Non multi-arch definition of FETCH_POINTER_ARGUMENT" | |
3034 | #endif | |
3035 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FETCH_POINTER_ARGUMENT_P) | |
3036 | #define FETCH_POINTER_ARGUMENT_P() (gdbarch_fetch_pointer_argument_p (current_gdbarch)) | |
3037 | #endif | |
3038 | ||
3039 | /* Default (function) for non- multi-arch platforms. */ | |
3040 | #if (!GDB_MULTI_ARCH) && !defined (FETCH_POINTER_ARGUMENT) | |
3041 | #define FETCH_POINTER_ARGUMENT(frame, argi, type) (internal_error (__FILE__, __LINE__, "FETCH_POINTER_ARGUMENT"), 0) | |
3042 | #endif | |
3043 | ||
3044 | typedef CORE_ADDR (gdbarch_fetch_pointer_argument_ftype) (struct frame_info *frame, int argi, struct type *type); | |
3045 | extern CORE_ADDR gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type); | |
3046 | extern void set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument); | |
3047 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FETCH_POINTER_ARGUMENT) | |
3048 | #error "Non multi-arch definition of FETCH_POINTER_ARGUMENT" | |
3049 | #endif | |
3050 | #if !defined (FETCH_POINTER_ARGUMENT) | |
3051 | #define FETCH_POINTER_ARGUMENT(frame, argi, type) (gdbarch_fetch_pointer_argument (current_gdbarch, frame, argi, type)) | |
3052 | #endif | |
3053 | ||
104c1213 | 3054 | extern struct gdbarch_tdep *gdbarch_tdep (struct gdbarch *gdbarch); |
0f71a2f6 JM |
3055 | |
3056 | ||
3057 | /* Mechanism for co-ordinating the selection of a specific | |
3058 | architecture. | |
3059 | ||
3060 | GDB targets (*-tdep.c) can register an interest in a specific | |
3061 | architecture. Other GDB components can register a need to maintain | |
3062 | per-architecture data. | |
3063 | ||
3064 | The mechanisms below ensures that there is only a loose connection | |
3065 | between the set-architecture command and the various GDB | |
99e7bb18 | 3066 | components. Each component can independently register their need |
0f71a2f6 JM |
3067 | to maintain architecture specific data with gdbarch. |
3068 | ||
3069 | Pragmatics: | |
3070 | ||
3071 | Previously, a single TARGET_ARCHITECTURE_HOOK was provided. It | |
3072 | didn't scale. | |
3073 | ||
3074 | The more traditional mega-struct containing architecture specific | |
3075 | data for all the various GDB components was also considered. Since | |
99e7bb18 | 3076 | GDB is built from a variable number of (fairly independent) |
0f71a2f6 JM |
3077 | components it was determined that the global aproach was not |
3078 | applicable. */ | |
3079 | ||
3080 | ||
3081 | /* Register a new architectural family with GDB. | |
3082 | ||
3083 | Register support for the specified ARCHITECTURE with GDB. When | |
3084 | gdbarch determines that the specified architecture has been | |
3085 | selected, the corresponding INIT function is called. | |
3086 | ||
3087 | -- | |
3088 | ||
3089 | The INIT function takes two parameters: INFO which contains the | |
3090 | information available to gdbarch about the (possibly new) | |
3091 | architecture; ARCHES which is a list of the previously created | |
3092 | ``struct gdbarch'' for this architecture. | |
3093 | ||
0f79675b AC |
3094 | The INFO parameter is, as far as possible, be pre-initialized with |
3095 | information obtained from INFO.ABFD or the previously selected | |
3096 | architecture. | |
3097 | ||
3098 | The ARCHES parameter is a linked list (sorted most recently used) | |
3099 | of all the previously created architures for this architecture | |
3100 | family. The (possibly NULL) ARCHES->gdbarch can used to access | |
3101 | values from the previously selected architecture for this | |
3102 | architecture family. The global ``current_gdbarch'' shall not be | |
3103 | used. | |
0f71a2f6 JM |
3104 | |
3105 | The INIT function shall return any of: NULL - indicating that it | |
ec3d358c | 3106 | doesn't recognize the selected architecture; an existing ``struct |
0f71a2f6 JM |
3107 | gdbarch'' from the ARCHES list - indicating that the new |
3108 | architecture is just a synonym for an earlier architecture (see | |
3109 | gdbarch_list_lookup_by_info()); a newly created ``struct gdbarch'' | |
4b9b3959 AC |
3110 | - that describes the selected architecture (see gdbarch_alloc()). |
3111 | ||
3112 | The DUMP_TDEP function shall print out all target specific values. | |
3113 | Care should be taken to ensure that the function works in both the | |
3114 | multi-arch and non- multi-arch cases. */ | |
0f71a2f6 | 3115 | |
adf40b2e JM |
3116 | struct gdbarch_list |
3117 | { | |
3118 | struct gdbarch *gdbarch; | |
3119 | struct gdbarch_list *next; | |
3120 | }; | |
0f71a2f6 | 3121 | |
adf40b2e JM |
3122 | struct gdbarch_info |
3123 | { | |
adf40b2e JM |
3124 | /* Use default: NULL (ZERO). */ |
3125 | const struct bfd_arch_info *bfd_arch_info; | |
0f71a2f6 | 3126 | |
428721aa | 3127 | /* Use default: BFD_ENDIAN_UNKNOWN (NB: is not ZERO). */ |
adf40b2e | 3128 | int byte_order; |
0f71a2f6 | 3129 | |
adf40b2e JM |
3130 | /* Use default: NULL (ZERO). */ |
3131 | bfd *abfd; | |
0f71a2f6 | 3132 | |
adf40b2e JM |
3133 | /* Use default: NULL (ZERO). */ |
3134 | struct gdbarch_tdep_info *tdep_info; | |
4be87837 DJ |
3135 | |
3136 | /* Use default: GDB_OSABI_UNINITIALIZED (-1). */ | |
3137 | enum gdb_osabi osabi; | |
adf40b2e | 3138 | }; |
0f71a2f6 | 3139 | |
104c1213 | 3140 | typedef struct gdbarch *(gdbarch_init_ftype) (struct gdbarch_info info, struct gdbarch_list *arches); |
4b9b3959 | 3141 | typedef void (gdbarch_dump_tdep_ftype) (struct gdbarch *gdbarch, struct ui_file *file); |
0f71a2f6 | 3142 | |
4b9b3959 | 3143 | /* DEPRECATED - use gdbarch_register() */ |
104c1213 | 3144 | extern void register_gdbarch_init (enum bfd_architecture architecture, gdbarch_init_ftype *); |
0f71a2f6 | 3145 | |
4b9b3959 AC |
3146 | extern void gdbarch_register (enum bfd_architecture architecture, |
3147 | gdbarch_init_ftype *, | |
3148 | gdbarch_dump_tdep_ftype *); | |
3149 | ||
0f71a2f6 | 3150 | |
b4a20239 AC |
3151 | /* Return a freshly allocated, NULL terminated, array of the valid |
3152 | architecture names. Since architectures are registered during the | |
3153 | _initialize phase this function only returns useful information | |
3154 | once initialization has been completed. */ | |
3155 | ||
3156 | extern const char **gdbarch_printable_names (void); | |
3157 | ||
3158 | ||
0f71a2f6 JM |
3159 | /* Helper function. Search the list of ARCHES for a GDBARCH that |
3160 | matches the information provided by INFO. */ | |
3161 | ||
104c1213 | 3162 | extern struct gdbarch_list *gdbarch_list_lookup_by_info (struct gdbarch_list *arches, const struct gdbarch_info *info); |
0f71a2f6 JM |
3163 | |
3164 | ||
3165 | /* Helper function. Create a preliminary ``struct gdbarch''. Perform | |
3166 | basic initialization using values obtained from the INFO andTDEP | |
3167 | parameters. set_gdbarch_*() functions are called to complete the | |
3168 | initialization of the object. */ | |
3169 | ||
104c1213 | 3170 | extern struct gdbarch *gdbarch_alloc (const struct gdbarch_info *info, struct gdbarch_tdep *tdep); |
0f71a2f6 JM |
3171 | |
3172 | ||
4b9b3959 AC |
3173 | /* Helper function. Free a partially-constructed ``struct gdbarch''. |
3174 | It is assumed that the caller freeds the ``struct | |
3175 | gdbarch_tdep''. */ | |
3176 | ||
058f20d5 JB |
3177 | extern void gdbarch_free (struct gdbarch *); |
3178 | ||
3179 | ||
b732d07d | 3180 | /* Helper function. Force an update of the current architecture. |
0f71a2f6 | 3181 | |
b732d07d AC |
3182 | The actual architecture selected is determined by INFO, ``(gdb) set |
3183 | architecture'' et.al., the existing architecture and BFD's default | |
3184 | architecture. INFO should be initialized to zero and then selected | |
3185 | fields should be updated. | |
0f71a2f6 | 3186 | |
16f33e29 AC |
3187 | Returns non-zero if the update succeeds */ |
3188 | ||
3189 | extern int gdbarch_update_p (struct gdbarch_info info); | |
0f71a2f6 JM |
3190 | |
3191 | ||
3192 | ||
3193 | /* Register per-architecture data-pointer. | |
3194 | ||
3195 | Reserve space for a per-architecture data-pointer. An identifier | |
3196 | for the reserved data-pointer is returned. That identifer should | |
95160752 | 3197 | be saved in a local static variable. |
0f71a2f6 | 3198 | |
76860b5f AC |
3199 | The per-architecture data-pointer is either initialized explicitly |
3200 | (set_gdbarch_data()) or implicitly (by INIT() via a call to | |
3201 | gdbarch_data()). FREE() is called to delete either an existing | |
2af496cb | 3202 | data-pointer overridden by set_gdbarch_data() or when the |
76860b5f | 3203 | architecture object is being deleted. |
0f71a2f6 | 3204 | |
95160752 AC |
3205 | When a previously created architecture is re-selected, the |
3206 | per-architecture data-pointer for that previous architecture is | |
76860b5f | 3207 | restored. INIT() is not re-called. |
0f71a2f6 JM |
3208 | |
3209 | Multiple registrarants for any architecture are allowed (and | |
3210 | strongly encouraged). */ | |
3211 | ||
95160752 | 3212 | struct gdbarch_data; |
0f71a2f6 | 3213 | |
95160752 AC |
3214 | typedef void *(gdbarch_data_init_ftype) (struct gdbarch *gdbarch); |
3215 | typedef void (gdbarch_data_free_ftype) (struct gdbarch *gdbarch, | |
3216 | void *pointer); | |
3217 | extern struct gdbarch_data *register_gdbarch_data (gdbarch_data_init_ftype *init, | |
3218 | gdbarch_data_free_ftype *free); | |
3219 | extern void set_gdbarch_data (struct gdbarch *gdbarch, | |
3220 | struct gdbarch_data *data, | |
3221 | void *pointer); | |
0f71a2f6 | 3222 | |
451fbdda | 3223 | extern void *gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *); |
0f71a2f6 JM |
3224 | |
3225 | ||
0f71a2f6 JM |
3226 | /* Register per-architecture memory region. |
3227 | ||
3228 | Provide a memory-region swap mechanism. Per-architecture memory | |
3229 | region are created. These memory regions are swapped whenever the | |
3230 | architecture is changed. For a new architecture, the memory region | |
3231 | is initialized with zero (0) and the INIT function is called. | |
3232 | ||
3233 | Memory regions are swapped / initialized in the order that they are | |
3234 | registered. NULL DATA and/or INIT values can be specified. | |
3235 | ||
3236 | New code should use register_gdbarch_data(). */ | |
3237 | ||
104c1213 JM |
3238 | typedef void (gdbarch_swap_ftype) (void); |
3239 | extern void register_gdbarch_swap (void *data, unsigned long size, gdbarch_swap_ftype *init); | |
e514a9d6 | 3240 | #define REGISTER_GDBARCH_SWAP(VAR) register_gdbarch_swap (&(VAR), sizeof ((VAR)), NULL) |
0f71a2f6 JM |
3241 | |
3242 | ||
3243 | ||
99e7bb18 | 3244 | /* The target-system-dependent byte order is dynamic */ |
c906108c | 3245 | |
adf40b2e | 3246 | extern int target_byte_order; |
c906108c SS |
3247 | #ifndef TARGET_BYTE_ORDER |
3248 | #define TARGET_BYTE_ORDER (target_byte_order + 0) | |
3249 | #endif | |
3250 | ||
adf40b2e | 3251 | extern int target_byte_order_auto; |
c906108c SS |
3252 | #ifndef TARGET_BYTE_ORDER_AUTO |
3253 | #define TARGET_BYTE_ORDER_AUTO (target_byte_order_auto + 0) | |
3254 | #endif | |
3255 | ||
3256 | ||
3257 | ||
99e7bb18 | 3258 | /* The target-system-dependent BFD architecture is dynamic */ |
c906108c | 3259 | |
adf40b2e | 3260 | extern int target_architecture_auto; |
c906108c SS |
3261 | #ifndef TARGET_ARCHITECTURE_AUTO |
3262 | #define TARGET_ARCHITECTURE_AUTO (target_architecture_auto + 0) | |
3263 | #endif | |
3264 | ||
adf40b2e | 3265 | extern const struct bfd_arch_info *target_architecture; |
c906108c SS |
3266 | #ifndef TARGET_ARCHITECTURE |
3267 | #define TARGET_ARCHITECTURE (target_architecture + 0) | |
3268 | #endif | |
3269 | ||
c906108c | 3270 | |
99e7bb18 | 3271 | /* The target-system-dependent disassembler is semi-dynamic */ |
c906108c | 3272 | |
810ecf9f | 3273 | /* Use gdb_disassemble, and gdbarch_print_insn instead. */ |
d7a27068 | 3274 | extern int (*deprecated_tm_print_insn) (bfd_vma, disassemble_info*); |
c906108c | 3275 | |
810ecf9f AC |
3276 | /* Use set_gdbarch_print_insn instead. */ |
3277 | extern disassemble_info deprecated_tm_print_insn_info; | |
c906108c | 3278 | |
99e7bb18 | 3279 | /* Set the dynamic target-system-dependent parameters (architecture, |
c906108c SS |
3280 | byte-order, ...) using information found in the BFD */ |
3281 | ||
104c1213 | 3282 | extern void set_gdbarch_from_file (bfd *); |
c906108c SS |
3283 | |
3284 | ||
e514a9d6 JM |
3285 | /* Initialize the current architecture to the "first" one we find on |
3286 | our list. */ | |
3287 | ||
3288 | extern void initialize_current_architecture (void); | |
3289 | ||
ceaa8edf JB |
3290 | /* For non-multiarched targets, do any initialization of the default |
3291 | gdbarch object necessary after the _initialize_MODULE functions | |
3292 | have run. */ | |
5ae5f592 | 3293 | extern void initialize_non_multiarch (void); |
cce74817 | 3294 | |
c906108c | 3295 | /* gdbarch trace variable */ |
adf40b2e | 3296 | extern int gdbarch_debug; |
c906108c | 3297 | |
4b9b3959 | 3298 | extern void gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file); |
0f71a2f6 | 3299 | |
c906108c | 3300 | #endif |