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