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