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