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