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