Commit | Line | Data |
---|---|---|
59233f88 AC |
1 | /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */ |
2 | ||
adf40b2e | 3 | /* Dynamic architecture support for GDB, the GNU debugger. |
181c1381 | 4 | Copyright 1998, 1999, 2000, 2001, 2002 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. */ |
fd0407d6 | 41 | #include "value.h" /* For default_coerce_float_to_double which is referenced by a macro. */ |
67a2b77e | 42 | #include "inferior.h" /* For unsigned_address_to_pointer(). */ |
fd0407d6 | 43 | #endif |
2bf0cb65 | 44 | |
cce74817 JM |
45 | struct frame_info; |
46 | struct value; | |
b6af0555 | 47 | struct objfile; |
a2cf933a | 48 | struct minimal_symbol; |
0f71a2f6 | 49 | |
0f71a2f6 JM |
50 | extern struct gdbarch *current_gdbarch; |
51 | ||
52 | ||
0f71a2f6 JM |
53 | /* If any of the following are defined, the target wasn't correctly |
54 | converted. */ | |
55 | ||
0f71a2f6 JM |
56 | #if GDB_MULTI_ARCH |
57 | #if defined (EXTRA_FRAME_INFO) | |
58 | #error "EXTRA_FRAME_INFO: replaced by struct frame_extra_info" | |
59 | #endif | |
60 | #endif | |
61 | ||
62 | #if GDB_MULTI_ARCH | |
63 | #if defined (FRAME_FIND_SAVED_REGS) | |
64 | #error "FRAME_FIND_SAVED_REGS: replaced by FRAME_INIT_SAVED_REGS" | |
65 | #endif | |
66 | #endif | |
67 | ||
83905903 AC |
68 | #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PURE) && defined (GDB_TM_FILE) |
69 | #error "GDB_TM_FILE: Pure multi-arch targets do not have a tm.h file." | |
70 | #endif | |
71 | ||
0f71a2f6 JM |
72 | |
73 | /* The following are pre-initialized by GDBARCH. */ | |
74 | ||
104c1213 | 75 | extern const struct bfd_arch_info * gdbarch_bfd_arch_info (struct gdbarch *gdbarch); |
0f71a2f6 | 76 | /* set_gdbarch_bfd_arch_info() - not applicable - pre-initialized. */ |
83905903 AC |
77 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_ARCHITECTURE) |
78 | #error "Non multi-arch definition of TARGET_ARCHITECTURE" | |
79 | #endif | |
0f71a2f6 | 80 | #if GDB_MULTI_ARCH |
6166d547 | 81 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_ARCHITECTURE) |
0f71a2f6 JM |
82 | #define TARGET_ARCHITECTURE (gdbarch_bfd_arch_info (current_gdbarch)) |
83 | #endif | |
84 | #endif | |
85 | ||
104c1213 | 86 | extern int gdbarch_byte_order (struct gdbarch *gdbarch); |
0f71a2f6 | 87 | /* set_gdbarch_byte_order() - not applicable - pre-initialized. */ |
83905903 AC |
88 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_BYTE_ORDER) |
89 | #error "Non multi-arch definition of TARGET_BYTE_ORDER" | |
90 | #endif | |
0f71a2f6 | 91 | #if GDB_MULTI_ARCH |
6166d547 | 92 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_BYTE_ORDER) |
0f71a2f6 JM |
93 | #define TARGET_BYTE_ORDER (gdbarch_byte_order (current_gdbarch)) |
94 | #endif | |
95 | #endif | |
96 | ||
97 | ||
99e7bb18 | 98 | /* The following are initialized by the target dependent code. */ |
0f71a2f6 | 99 | |
66b43ecb AC |
100 | /* Number of bits in a char or unsigned char for the target machine. |
101 | Just like CHAR_BIT in <limits.h> but describes the target machine. | |
102 | v::TARGET_CHAR_BIT:int:char_bit::::8 * sizeof (char):8::0: | |
103 | ||
104 | Number of bits in a short or unsigned short for the target machine. */ | |
c4093a6a | 105 | |
66b43ecb AC |
106 | /* Default (value) for non- multi-arch platforms. */ |
107 | #if (!GDB_MULTI_ARCH) && !defined (TARGET_SHORT_BIT) | |
108 | #define TARGET_SHORT_BIT (2*TARGET_CHAR_BIT) | |
0f71a2f6 JM |
109 | #endif |
110 | ||
104c1213 JM |
111 | extern int gdbarch_short_bit (struct gdbarch *gdbarch); |
112 | extern void set_gdbarch_short_bit (struct gdbarch *gdbarch, int short_bit); | |
83905903 AC |
113 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_SHORT_BIT) |
114 | #error "Non multi-arch definition of TARGET_SHORT_BIT" | |
115 | #endif | |
0f71a2f6 | 116 | #if GDB_MULTI_ARCH |
6166d547 | 117 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_SHORT_BIT) |
0f71a2f6 JM |
118 | #define TARGET_SHORT_BIT (gdbarch_short_bit (current_gdbarch)) |
119 | #endif | |
120 | #endif | |
121 | ||
66b43ecb AC |
122 | /* Number of bits in an int or unsigned int for the target machine. */ |
123 | ||
124 | /* Default (value) for non- multi-arch platforms. */ | |
125 | #if (!GDB_MULTI_ARCH) && !defined (TARGET_INT_BIT) | |
126 | #define TARGET_INT_BIT (4*TARGET_CHAR_BIT) | |
127 | #endif | |
128 | ||
104c1213 JM |
129 | extern int gdbarch_int_bit (struct gdbarch *gdbarch); |
130 | extern void set_gdbarch_int_bit (struct gdbarch *gdbarch, int int_bit); | |
83905903 AC |
131 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_INT_BIT) |
132 | #error "Non multi-arch definition of TARGET_INT_BIT" | |
133 | #endif | |
0f71a2f6 | 134 | #if GDB_MULTI_ARCH |
6166d547 | 135 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_INT_BIT) |
0f71a2f6 JM |
136 | #define TARGET_INT_BIT (gdbarch_int_bit (current_gdbarch)) |
137 | #endif | |
138 | #endif | |
139 | ||
66b43ecb AC |
140 | /* Number of bits in a long or unsigned long for the target machine. */ |
141 | ||
142 | /* Default (value) for non- multi-arch platforms. */ | |
143 | #if (!GDB_MULTI_ARCH) && !defined (TARGET_LONG_BIT) | |
144 | #define TARGET_LONG_BIT (4*TARGET_CHAR_BIT) | |
145 | #endif | |
146 | ||
104c1213 JM |
147 | extern int gdbarch_long_bit (struct gdbarch *gdbarch); |
148 | extern void set_gdbarch_long_bit (struct gdbarch *gdbarch, int long_bit); | |
83905903 AC |
149 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_BIT) |
150 | #error "Non multi-arch definition of TARGET_LONG_BIT" | |
151 | #endif | |
0f71a2f6 | 152 | #if GDB_MULTI_ARCH |
6166d547 | 153 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_LONG_BIT) |
0f71a2f6 JM |
154 | #define TARGET_LONG_BIT (gdbarch_long_bit (current_gdbarch)) |
155 | #endif | |
156 | #endif | |
157 | ||
66b43ecb AC |
158 | /* Number of bits in a long long or unsigned long long for the target |
159 | machine. */ | |
160 | ||
161 | /* Default (value) for non- multi-arch platforms. */ | |
162 | #if (!GDB_MULTI_ARCH) && !defined (TARGET_LONG_LONG_BIT) | |
163 | #define TARGET_LONG_LONG_BIT (2*TARGET_LONG_BIT) | |
164 | #endif | |
165 | ||
104c1213 JM |
166 | extern int gdbarch_long_long_bit (struct gdbarch *gdbarch); |
167 | extern void set_gdbarch_long_long_bit (struct gdbarch *gdbarch, int long_long_bit); | |
83905903 AC |
168 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_LONG_BIT) |
169 | #error "Non multi-arch definition of TARGET_LONG_LONG_BIT" | |
170 | #endif | |
0f71a2f6 | 171 | #if GDB_MULTI_ARCH |
6166d547 | 172 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_LONG_LONG_BIT) |
0f71a2f6 JM |
173 | #define TARGET_LONG_LONG_BIT (gdbarch_long_long_bit (current_gdbarch)) |
174 | #endif | |
175 | #endif | |
176 | ||
66b43ecb AC |
177 | /* Number of bits in a float for the target machine. */ |
178 | ||
179 | /* Default (value) for non- multi-arch platforms. */ | |
180 | #if (!GDB_MULTI_ARCH) && !defined (TARGET_FLOAT_BIT) | |
181 | #define TARGET_FLOAT_BIT (4*TARGET_CHAR_BIT) | |
182 | #endif | |
183 | ||
104c1213 JM |
184 | extern int gdbarch_float_bit (struct gdbarch *gdbarch); |
185 | extern void set_gdbarch_float_bit (struct gdbarch *gdbarch, int float_bit); | |
83905903 AC |
186 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_FLOAT_BIT) |
187 | #error "Non multi-arch definition of TARGET_FLOAT_BIT" | |
188 | #endif | |
0f71a2f6 | 189 | #if GDB_MULTI_ARCH |
6166d547 | 190 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_FLOAT_BIT) |
0f71a2f6 JM |
191 | #define TARGET_FLOAT_BIT (gdbarch_float_bit (current_gdbarch)) |
192 | #endif | |
193 | #endif | |
194 | ||
66b43ecb AC |
195 | /* Number of bits in a double for the target machine. */ |
196 | ||
197 | /* Default (value) for non- multi-arch platforms. */ | |
198 | #if (!GDB_MULTI_ARCH) && !defined (TARGET_DOUBLE_BIT) | |
199 | #define TARGET_DOUBLE_BIT (8*TARGET_CHAR_BIT) | |
200 | #endif | |
201 | ||
104c1213 JM |
202 | extern int gdbarch_double_bit (struct gdbarch *gdbarch); |
203 | extern void set_gdbarch_double_bit (struct gdbarch *gdbarch, int double_bit); | |
83905903 AC |
204 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_DOUBLE_BIT) |
205 | #error "Non multi-arch definition of TARGET_DOUBLE_BIT" | |
206 | #endif | |
0f71a2f6 | 207 | #if GDB_MULTI_ARCH |
6166d547 | 208 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_DOUBLE_BIT) |
0f71a2f6 JM |
209 | #define TARGET_DOUBLE_BIT (gdbarch_double_bit (current_gdbarch)) |
210 | #endif | |
211 | #endif | |
212 | ||
66b43ecb AC |
213 | /* Number of bits in a long double for the target machine. */ |
214 | ||
215 | /* Default (value) for non- multi-arch platforms. */ | |
216 | #if (!GDB_MULTI_ARCH) && !defined (TARGET_LONG_DOUBLE_BIT) | |
17ef5d92 | 217 | #define TARGET_LONG_DOUBLE_BIT (8*TARGET_CHAR_BIT) |
66b43ecb AC |
218 | #endif |
219 | ||
104c1213 JM |
220 | extern int gdbarch_long_double_bit (struct gdbarch *gdbarch); |
221 | extern void set_gdbarch_long_double_bit (struct gdbarch *gdbarch, int long_double_bit); | |
83905903 AC |
222 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_DOUBLE_BIT) |
223 | #error "Non multi-arch definition of TARGET_LONG_DOUBLE_BIT" | |
224 | #endif | |
0f71a2f6 | 225 | #if GDB_MULTI_ARCH |
6166d547 | 226 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_LONG_DOUBLE_BIT) |
0f71a2f6 JM |
227 | #define TARGET_LONG_DOUBLE_BIT (gdbarch_long_double_bit (current_gdbarch)) |
228 | #endif | |
229 | #endif | |
230 | ||
52204a0b DT |
231 | /* For most targets, a pointer on the target and its representation as an |
232 | address in GDB have the same size and "look the same". For such a | |
233 | target, you need only set TARGET_PTR_BIT / ptr_bit and TARGET_ADDR_BIT | |
234 | / addr_bit will be set from it. | |
235 | ||
236 | If TARGET_PTR_BIT and TARGET_ADDR_BIT are different, you'll probably | |
237 | also need to set POINTER_TO_ADDRESS and ADDRESS_TO_POINTER as well. | |
238 | ||
239 | ptr_bit is the size of a pointer on the target */ | |
66b43ecb AC |
240 | |
241 | /* Default (value) for non- multi-arch platforms. */ | |
242 | #if (!GDB_MULTI_ARCH) && !defined (TARGET_PTR_BIT) | |
243 | #define TARGET_PTR_BIT (TARGET_INT_BIT) | |
244 | #endif | |
245 | ||
246 | extern int gdbarch_ptr_bit (struct gdbarch *gdbarch); | |
247 | extern void set_gdbarch_ptr_bit (struct gdbarch *gdbarch, int ptr_bit); | |
83905903 AC |
248 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_PTR_BIT) |
249 | #error "Non multi-arch definition of TARGET_PTR_BIT" | |
250 | #endif | |
66b43ecb AC |
251 | #if GDB_MULTI_ARCH |
252 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_PTR_BIT) | |
253 | #define TARGET_PTR_BIT (gdbarch_ptr_bit (current_gdbarch)) | |
254 | #endif | |
255 | #endif | |
256 | ||
52204a0b DT |
257 | /* addr_bit is the size of a target address as represented in gdb */ |
258 | ||
259 | /* Default (value) for non- multi-arch platforms. */ | |
260 | #if (!GDB_MULTI_ARCH) && !defined (TARGET_ADDR_BIT) | |
261 | #define TARGET_ADDR_BIT (TARGET_PTR_BIT) | |
262 | #endif | |
263 | ||
264 | extern int gdbarch_addr_bit (struct gdbarch *gdbarch); | |
265 | extern void set_gdbarch_addr_bit (struct gdbarch *gdbarch, int addr_bit); | |
83905903 AC |
266 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_ADDR_BIT) |
267 | #error "Non multi-arch definition of TARGET_ADDR_BIT" | |
268 | #endif | |
52204a0b DT |
269 | #if GDB_MULTI_ARCH |
270 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_ADDR_BIT) | |
271 | #define TARGET_ADDR_BIT (gdbarch_addr_bit (current_gdbarch)) | |
272 | #endif | |
273 | #endif | |
274 | ||
66b43ecb AC |
275 | /* Number of bits in a BFD_VMA for the target object file format. */ |
276 | ||
277 | /* Default (value) for non- multi-arch platforms. */ | |
278 | #if (!GDB_MULTI_ARCH) && !defined (TARGET_BFD_VMA_BIT) | |
279 | #define TARGET_BFD_VMA_BIT (TARGET_ARCHITECTURE->bits_per_address) | |
280 | #endif | |
281 | ||
282 | extern int gdbarch_bfd_vma_bit (struct gdbarch *gdbarch); | |
283 | extern void set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch, int bfd_vma_bit); | |
83905903 AC |
284 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_BFD_VMA_BIT) |
285 | #error "Non multi-arch definition of TARGET_BFD_VMA_BIT" | |
286 | #endif | |
66b43ecb AC |
287 | #if GDB_MULTI_ARCH |
288 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_BFD_VMA_BIT) | |
289 | #define TARGET_BFD_VMA_BIT (gdbarch_bfd_vma_bit (current_gdbarch)) | |
290 | #endif | |
291 | #endif | |
292 | ||
4e409299 JB |
293 | /* One if `char' acts like `signed char', zero if `unsigned char'. */ |
294 | ||
295 | /* Default (value) for non- multi-arch platforms. */ | |
296 | #if (!GDB_MULTI_ARCH) && !defined (TARGET_CHAR_SIGNED) | |
297 | #define TARGET_CHAR_SIGNED (1) | |
298 | #endif | |
299 | ||
300 | extern int gdbarch_char_signed (struct gdbarch *gdbarch); | |
301 | extern void set_gdbarch_char_signed (struct gdbarch *gdbarch, int char_signed); | |
302 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_CHAR_SIGNED) | |
303 | #error "Non multi-arch definition of TARGET_CHAR_SIGNED" | |
304 | #endif | |
305 | #if GDB_MULTI_ARCH | |
306 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_CHAR_SIGNED) | |
307 | #define TARGET_CHAR_SIGNED (gdbarch_char_signed (current_gdbarch)) | |
308 | #endif | |
309 | #endif | |
310 | ||
be8dfb87 AC |
311 | /* Default (function) for non- multi-arch platforms. */ |
312 | #if (!GDB_MULTI_ARCH) && !defined (TARGET_READ_PC) | |
39f77062 | 313 | #define TARGET_READ_PC(ptid) (generic_target_read_pc (ptid)) |
be8dfb87 AC |
314 | #endif |
315 | ||
39f77062 KB |
316 | typedef CORE_ADDR (gdbarch_read_pc_ftype) (ptid_t ptid); |
317 | extern CORE_ADDR gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid); | |
104c1213 | 318 | extern void set_gdbarch_read_pc (struct gdbarch *gdbarch, gdbarch_read_pc_ftype *read_pc); |
83905903 AC |
319 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_READ_PC) |
320 | #error "Non multi-arch definition of TARGET_READ_PC" | |
321 | #endif | |
0f71a2f6 | 322 | #if GDB_MULTI_ARCH |
6166d547 | 323 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_READ_PC) |
39f77062 | 324 | #define TARGET_READ_PC(ptid) (gdbarch_read_pc (current_gdbarch, ptid)) |
0f71a2f6 JM |
325 | #endif |
326 | #endif | |
327 | ||
be8dfb87 AC |
328 | /* Default (function) for non- multi-arch platforms. */ |
329 | #if (!GDB_MULTI_ARCH) && !defined (TARGET_WRITE_PC) | |
39f77062 | 330 | #define TARGET_WRITE_PC(val, ptid) (generic_target_write_pc (val, ptid)) |
be8dfb87 AC |
331 | #endif |
332 | ||
39f77062 KB |
333 | typedef void (gdbarch_write_pc_ftype) (CORE_ADDR val, ptid_t ptid); |
334 | extern void gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid); | |
104c1213 | 335 | extern void set_gdbarch_write_pc (struct gdbarch *gdbarch, gdbarch_write_pc_ftype *write_pc); |
83905903 AC |
336 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_WRITE_PC) |
337 | #error "Non multi-arch definition of TARGET_WRITE_PC" | |
338 | #endif | |
0f71a2f6 | 339 | #if GDB_MULTI_ARCH |
6166d547 | 340 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_WRITE_PC) |
39f77062 | 341 | #define TARGET_WRITE_PC(val, ptid) (gdbarch_write_pc (current_gdbarch, val, ptid)) |
0f71a2f6 JM |
342 | #endif |
343 | #endif | |
344 | ||
be8dfb87 AC |
345 | /* Default (function) for non- multi-arch platforms. */ |
346 | #if (!GDB_MULTI_ARCH) && !defined (TARGET_READ_FP) | |
347 | #define TARGET_READ_FP() (generic_target_read_fp ()) | |
348 | #endif | |
349 | ||
104c1213 JM |
350 | typedef CORE_ADDR (gdbarch_read_fp_ftype) (void); |
351 | extern CORE_ADDR gdbarch_read_fp (struct gdbarch *gdbarch); | |
352 | extern void set_gdbarch_read_fp (struct gdbarch *gdbarch, gdbarch_read_fp_ftype *read_fp); | |
83905903 AC |
353 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_READ_FP) |
354 | #error "Non multi-arch definition of TARGET_READ_FP" | |
355 | #endif | |
0f71a2f6 | 356 | #if GDB_MULTI_ARCH |
6166d547 | 357 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_READ_FP) |
0f71a2f6 JM |
358 | #define TARGET_READ_FP() (gdbarch_read_fp (current_gdbarch)) |
359 | #endif | |
360 | #endif | |
361 | ||
be8dfb87 AC |
362 | /* Default (function) for non- multi-arch platforms. */ |
363 | #if (!GDB_MULTI_ARCH) && !defined (TARGET_READ_SP) | |
364 | #define TARGET_READ_SP() (generic_target_read_sp ()) | |
365 | #endif | |
366 | ||
104c1213 JM |
367 | typedef CORE_ADDR (gdbarch_read_sp_ftype) (void); |
368 | extern CORE_ADDR gdbarch_read_sp (struct gdbarch *gdbarch); | |
369 | extern void set_gdbarch_read_sp (struct gdbarch *gdbarch, gdbarch_read_sp_ftype *read_sp); | |
83905903 AC |
370 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_READ_SP) |
371 | #error "Non multi-arch definition of TARGET_READ_SP" | |
372 | #endif | |
0f71a2f6 | 373 | #if GDB_MULTI_ARCH |
6166d547 | 374 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_READ_SP) |
0f71a2f6 JM |
375 | #define TARGET_READ_SP() (gdbarch_read_sp (current_gdbarch)) |
376 | #endif | |
377 | #endif | |
378 | ||
be8dfb87 AC |
379 | /* Default (function) for non- multi-arch platforms. */ |
380 | #if (!GDB_MULTI_ARCH) && !defined (TARGET_WRITE_SP) | |
381 | #define TARGET_WRITE_SP(val) (generic_target_write_sp (val)) | |
382 | #endif | |
383 | ||
104c1213 JM |
384 | typedef void (gdbarch_write_sp_ftype) (CORE_ADDR val); |
385 | extern void gdbarch_write_sp (struct gdbarch *gdbarch, CORE_ADDR val); | |
386 | extern void set_gdbarch_write_sp (struct gdbarch *gdbarch, gdbarch_write_sp_ftype *write_sp); | |
83905903 AC |
387 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_WRITE_SP) |
388 | #error "Non multi-arch definition of TARGET_WRITE_SP" | |
389 | #endif | |
0f71a2f6 | 390 | #if GDB_MULTI_ARCH |
6166d547 | 391 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_WRITE_SP) |
0f71a2f6 JM |
392 | #define TARGET_WRITE_SP(val) (gdbarch_write_sp (current_gdbarch, val)) |
393 | #endif | |
394 | #endif | |
395 | ||
39d4ef09 AC |
396 | /* Function for getting target's idea of a frame pointer. FIXME: GDB's |
397 | whole scheme for dealing with "frames" and "frame pointers" needs a | |
398 | serious shakedown. */ | |
399 | ||
400 | /* Default (function) for non- multi-arch platforms. */ | |
401 | #if (!GDB_MULTI_ARCH) && !defined (TARGET_VIRTUAL_FRAME_POINTER) | |
402 | #define TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset) (legacy_virtual_frame_pointer (pc, frame_regnum, frame_offset)) | |
403 | #endif | |
404 | ||
405 | typedef void (gdbarch_virtual_frame_pointer_ftype) (CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset); | |
406 | extern void gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset); | |
407 | extern void set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer); | |
408 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_VIRTUAL_FRAME_POINTER) | |
409 | #error "Non multi-arch definition of TARGET_VIRTUAL_FRAME_POINTER" | |
410 | #endif | |
411 | #if GDB_MULTI_ARCH | |
412 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_VIRTUAL_FRAME_POINTER) | |
413 | #define TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset) (gdbarch_virtual_frame_pointer (current_gdbarch, pc, frame_regnum, frame_offset)) | |
414 | #endif | |
415 | #endif | |
416 | ||
61a0eb5b AC |
417 | extern int gdbarch_register_read_p (struct gdbarch *gdbarch); |
418 | ||
419 | typedef void (gdbarch_register_read_ftype) (struct gdbarch *gdbarch, int regnum, char *buf); | |
420 | extern void gdbarch_register_read (struct gdbarch *gdbarch, int regnum, char *buf); | |
421 | extern void set_gdbarch_register_read (struct gdbarch *gdbarch, gdbarch_register_read_ftype *register_read); | |
422 | ||
423 | extern int gdbarch_register_write_p (struct gdbarch *gdbarch); | |
424 | ||
425 | typedef void (gdbarch_register_write_ftype) (struct gdbarch *gdbarch, int regnum, char *buf); | |
426 | extern void gdbarch_register_write (struct gdbarch *gdbarch, int regnum, char *buf); | |
427 | extern void set_gdbarch_register_write (struct gdbarch *gdbarch, gdbarch_register_write_ftype *register_write); | |
428 | ||
104c1213 JM |
429 | extern int gdbarch_num_regs (struct gdbarch *gdbarch); |
430 | extern void set_gdbarch_num_regs (struct gdbarch *gdbarch, int num_regs); | |
83905903 AC |
431 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NUM_REGS) |
432 | #error "Non multi-arch definition of NUM_REGS" | |
433 | #endif | |
0f71a2f6 | 434 | #if GDB_MULTI_ARCH |
6166d547 | 435 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (NUM_REGS) |
0f71a2f6 JM |
436 | #define NUM_REGS (gdbarch_num_regs (current_gdbarch)) |
437 | #endif | |
438 | #endif | |
439 | ||
34620563 AC |
440 | /* This macro gives the number of pseudo-registers that live in the |
441 | register namespace but do not get fetched or stored on the target. | |
442 | These pseudo-registers may be aliases for other registers, | |
443 | combinations of other registers, or they may be computed by GDB. */ | |
444 | ||
0aba1244 | 445 | /* Default (value) for non- multi-arch platforms. */ |
6166d547 | 446 | #if (!GDB_MULTI_ARCH) && !defined (NUM_PSEUDO_REGS) |
0aba1244 EZ |
447 | #define NUM_PSEUDO_REGS (0) |
448 | #endif | |
449 | ||
450 | extern int gdbarch_num_pseudo_regs (struct gdbarch *gdbarch); | |
451 | extern void set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch, int num_pseudo_regs); | |
83905903 AC |
452 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NUM_PSEUDO_REGS) |
453 | #error "Non multi-arch definition of NUM_PSEUDO_REGS" | |
454 | #endif | |
0aba1244 | 455 | #if GDB_MULTI_ARCH |
6166d547 | 456 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (NUM_PSEUDO_REGS) |
0aba1244 EZ |
457 | #define NUM_PSEUDO_REGS (gdbarch_num_pseudo_regs (current_gdbarch)) |
458 | #endif | |
459 | #endif | |
460 | ||
c2169756 AC |
461 | /* GDB's standard (or well known) register numbers. These can map onto |
462 | a real register or a pseudo (computed) register or not be defined at | |
1200cd6e AC |
463 | all (-1). */ |
464 | ||
465 | /* Default (value) for non- multi-arch platforms. */ | |
466 | #if (!GDB_MULTI_ARCH) && !defined (SP_REGNUM) | |
467 | #define SP_REGNUM (-1) | |
468 | #endif | |
c2169756 | 469 | |
104c1213 JM |
470 | extern int gdbarch_sp_regnum (struct gdbarch *gdbarch); |
471 | extern void set_gdbarch_sp_regnum (struct gdbarch *gdbarch, int sp_regnum); | |
83905903 AC |
472 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SP_REGNUM) |
473 | #error "Non multi-arch definition of SP_REGNUM" | |
474 | #endif | |
0f71a2f6 | 475 | #if GDB_MULTI_ARCH |
6166d547 | 476 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SP_REGNUM) |
0f71a2f6 JM |
477 | #define SP_REGNUM (gdbarch_sp_regnum (current_gdbarch)) |
478 | #endif | |
479 | #endif | |
480 | ||
1200cd6e AC |
481 | /* Default (value) for non- multi-arch platforms. */ |
482 | #if (!GDB_MULTI_ARCH) && !defined (FP_REGNUM) | |
483 | #define FP_REGNUM (-1) | |
484 | #endif | |
485 | ||
104c1213 JM |
486 | extern int gdbarch_fp_regnum (struct gdbarch *gdbarch); |
487 | extern void set_gdbarch_fp_regnum (struct gdbarch *gdbarch, int fp_regnum); | |
83905903 AC |
488 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FP_REGNUM) |
489 | #error "Non multi-arch definition of FP_REGNUM" | |
490 | #endif | |
0f71a2f6 | 491 | #if GDB_MULTI_ARCH |
6166d547 | 492 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FP_REGNUM) |
0f71a2f6 JM |
493 | #define FP_REGNUM (gdbarch_fp_regnum (current_gdbarch)) |
494 | #endif | |
495 | #endif | |
496 | ||
1200cd6e AC |
497 | /* Default (value) for non- multi-arch platforms. */ |
498 | #if (!GDB_MULTI_ARCH) && !defined (PC_REGNUM) | |
499 | #define PC_REGNUM (-1) | |
500 | #endif | |
501 | ||
104c1213 JM |
502 | extern int gdbarch_pc_regnum (struct gdbarch *gdbarch); |
503 | extern void set_gdbarch_pc_regnum (struct gdbarch *gdbarch, int pc_regnum); | |
83905903 AC |
504 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PC_REGNUM) |
505 | #error "Non multi-arch definition of PC_REGNUM" | |
506 | #endif | |
0f71a2f6 | 507 | #if GDB_MULTI_ARCH |
6166d547 | 508 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PC_REGNUM) |
0f71a2f6 JM |
509 | #define PC_REGNUM (gdbarch_pc_regnum (current_gdbarch)) |
510 | #endif | |
511 | #endif | |
512 | ||
c2169756 AC |
513 | /* Default (value) for non- multi-arch platforms. */ |
514 | #if (!GDB_MULTI_ARCH) && !defined (PS_REGNUM) | |
515 | #define PS_REGNUM (-1) | |
516 | #endif | |
517 | ||
518 | extern int gdbarch_ps_regnum (struct gdbarch *gdbarch); | |
519 | extern void set_gdbarch_ps_regnum (struct gdbarch *gdbarch, int ps_regnum); | |
520 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PS_REGNUM) | |
521 | #error "Non multi-arch definition of PS_REGNUM" | |
522 | #endif | |
523 | #if GDB_MULTI_ARCH | |
524 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PS_REGNUM) | |
525 | #define PS_REGNUM (gdbarch_ps_regnum (current_gdbarch)) | |
526 | #endif | |
527 | #endif | |
528 | ||
60054393 | 529 | /* Default (value) for non- multi-arch platforms. */ |
6166d547 | 530 | #if (!GDB_MULTI_ARCH) && !defined (FP0_REGNUM) |
60054393 MS |
531 | #define FP0_REGNUM (-1) |
532 | #endif | |
533 | ||
534 | extern int gdbarch_fp0_regnum (struct gdbarch *gdbarch); | |
535 | extern void set_gdbarch_fp0_regnum (struct gdbarch *gdbarch, int fp0_regnum); | |
83905903 AC |
536 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FP0_REGNUM) |
537 | #error "Non multi-arch definition of FP0_REGNUM" | |
538 | #endif | |
60054393 | 539 | #if GDB_MULTI_ARCH |
6166d547 | 540 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FP0_REGNUM) |
60054393 MS |
541 | #define FP0_REGNUM (gdbarch_fp0_regnum (current_gdbarch)) |
542 | #endif | |
543 | #endif | |
544 | ||
03863182 | 545 | /* Default (value) for non- multi-arch platforms. */ |
6166d547 | 546 | #if (!GDB_MULTI_ARCH) && !defined (NPC_REGNUM) |
03863182 AC |
547 | #define NPC_REGNUM (-1) |
548 | #endif | |
549 | ||
550 | extern int gdbarch_npc_regnum (struct gdbarch *gdbarch); | |
551 | extern void set_gdbarch_npc_regnum (struct gdbarch *gdbarch, int npc_regnum); | |
83905903 AC |
552 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NPC_REGNUM) |
553 | #error "Non multi-arch definition of NPC_REGNUM" | |
554 | #endif | |
03863182 | 555 | #if GDB_MULTI_ARCH |
6166d547 | 556 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (NPC_REGNUM) |
03863182 AC |
557 | #define NPC_REGNUM (gdbarch_npc_regnum (current_gdbarch)) |
558 | #endif | |
559 | #endif | |
560 | ||
561 | /* Default (value) for non- multi-arch platforms. */ | |
6166d547 | 562 | #if (!GDB_MULTI_ARCH) && !defined (NNPC_REGNUM) |
03863182 AC |
563 | #define NNPC_REGNUM (-1) |
564 | #endif | |
565 | ||
566 | extern int gdbarch_nnpc_regnum (struct gdbarch *gdbarch); | |
567 | extern void set_gdbarch_nnpc_regnum (struct gdbarch *gdbarch, int nnpc_regnum); | |
83905903 AC |
568 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NNPC_REGNUM) |
569 | #error "Non multi-arch definition of NNPC_REGNUM" | |
570 | #endif | |
03863182 | 571 | #if GDB_MULTI_ARCH |
6166d547 | 572 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (NNPC_REGNUM) |
03863182 AC |
573 | #define NNPC_REGNUM (gdbarch_nnpc_regnum (current_gdbarch)) |
574 | #endif | |
575 | #endif | |
576 | ||
88c72b7d AC |
577 | /* Convert stab register number (from `r' declaration) to a gdb REGNUM. */ |
578 | ||
579 | /* Default (function) for non- multi-arch platforms. */ | |
580 | #if (!GDB_MULTI_ARCH) && !defined (STAB_REG_TO_REGNUM) | |
581 | #define STAB_REG_TO_REGNUM(stab_regnr) (no_op_reg_to_regnum (stab_regnr)) | |
582 | #endif | |
583 | ||
584 | typedef int (gdbarch_stab_reg_to_regnum_ftype) (int stab_regnr); | |
585 | extern int gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr); | |
586 | extern void set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum); | |
83905903 AC |
587 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STAB_REG_TO_REGNUM) |
588 | #error "Non multi-arch definition of STAB_REG_TO_REGNUM" | |
589 | #endif | |
88c72b7d AC |
590 | #if GDB_MULTI_ARCH |
591 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (STAB_REG_TO_REGNUM) | |
592 | #define STAB_REG_TO_REGNUM(stab_regnr) (gdbarch_stab_reg_to_regnum (current_gdbarch, stab_regnr)) | |
593 | #endif | |
594 | #endif | |
595 | ||
596 | /* Provide a default mapping from a ecoff register number to a gdb REGNUM. */ | |
597 | ||
598 | /* Default (function) for non- multi-arch platforms. */ | |
599 | #if (!GDB_MULTI_ARCH) && !defined (ECOFF_REG_TO_REGNUM) | |
600 | #define ECOFF_REG_TO_REGNUM(ecoff_regnr) (no_op_reg_to_regnum (ecoff_regnr)) | |
601 | #endif | |
602 | ||
603 | typedef int (gdbarch_ecoff_reg_to_regnum_ftype) (int ecoff_regnr); | |
604 | extern int gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr); | |
605 | extern void set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum); | |
83905903 AC |
606 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ECOFF_REG_TO_REGNUM) |
607 | #error "Non multi-arch definition of ECOFF_REG_TO_REGNUM" | |
608 | #endif | |
88c72b7d AC |
609 | #if GDB_MULTI_ARCH |
610 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ECOFF_REG_TO_REGNUM) | |
611 | #define ECOFF_REG_TO_REGNUM(ecoff_regnr) (gdbarch_ecoff_reg_to_regnum (current_gdbarch, ecoff_regnr)) | |
612 | #endif | |
613 | #endif | |
614 | ||
615 | /* Provide a default mapping from a DWARF register number to a gdb REGNUM. */ | |
616 | ||
617 | /* Default (function) for non- multi-arch platforms. */ | |
618 | #if (!GDB_MULTI_ARCH) && !defined (DWARF_REG_TO_REGNUM) | |
619 | #define DWARF_REG_TO_REGNUM(dwarf_regnr) (no_op_reg_to_regnum (dwarf_regnr)) | |
620 | #endif | |
621 | ||
622 | typedef int (gdbarch_dwarf_reg_to_regnum_ftype) (int dwarf_regnr); | |
623 | extern int gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr); | |
624 | extern void set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_dwarf_reg_to_regnum_ftype *dwarf_reg_to_regnum); | |
83905903 AC |
625 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF_REG_TO_REGNUM) |
626 | #error "Non multi-arch definition of DWARF_REG_TO_REGNUM" | |
627 | #endif | |
88c72b7d AC |
628 | #if GDB_MULTI_ARCH |
629 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DWARF_REG_TO_REGNUM) | |
630 | #define DWARF_REG_TO_REGNUM(dwarf_regnr) (gdbarch_dwarf_reg_to_regnum (current_gdbarch, dwarf_regnr)) | |
631 | #endif | |
632 | #endif | |
633 | ||
634 | /* Convert from an sdb register number to an internal gdb register number. | |
635 | This should be defined in tm.h, if REGISTER_NAMES is not set up | |
636 | to map one to one onto the sdb register numbers. */ | |
637 | ||
638 | /* Default (function) for non- multi-arch platforms. */ | |
639 | #if (!GDB_MULTI_ARCH) && !defined (SDB_REG_TO_REGNUM) | |
640 | #define SDB_REG_TO_REGNUM(sdb_regnr) (no_op_reg_to_regnum (sdb_regnr)) | |
641 | #endif | |
642 | ||
643 | typedef int (gdbarch_sdb_reg_to_regnum_ftype) (int sdb_regnr); | |
644 | extern int gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr); | |
645 | extern void set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum); | |
83905903 AC |
646 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SDB_REG_TO_REGNUM) |
647 | #error "Non multi-arch definition of SDB_REG_TO_REGNUM" | |
648 | #endif | |
88c72b7d AC |
649 | #if GDB_MULTI_ARCH |
650 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SDB_REG_TO_REGNUM) | |
651 | #define SDB_REG_TO_REGNUM(sdb_regnr) (gdbarch_sdb_reg_to_regnum (current_gdbarch, sdb_regnr)) | |
652 | #endif | |
653 | #endif | |
654 | ||
655 | /* Default (function) for non- multi-arch platforms. */ | |
656 | #if (!GDB_MULTI_ARCH) && !defined (DWARF2_REG_TO_REGNUM) | |
657 | #define DWARF2_REG_TO_REGNUM(dwarf2_regnr) (no_op_reg_to_regnum (dwarf2_regnr)) | |
658 | #endif | |
659 | ||
660 | typedef int (gdbarch_dwarf2_reg_to_regnum_ftype) (int dwarf2_regnr); | |
661 | extern int gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr); | |
662 | extern void set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum); | |
83905903 AC |
663 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF2_REG_TO_REGNUM) |
664 | #error "Non multi-arch definition of DWARF2_REG_TO_REGNUM" | |
665 | #endif | |
88c72b7d AC |
666 | #if GDB_MULTI_ARCH |
667 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DWARF2_REG_TO_REGNUM) | |
668 | #define DWARF2_REG_TO_REGNUM(dwarf2_regnr) (gdbarch_dwarf2_reg_to_regnum (current_gdbarch, dwarf2_regnr)) | |
669 | #endif | |
670 | #endif | |
671 | ||
33489c5b | 672 | /* Default (function) for non- multi-arch platforms. */ |
6166d547 | 673 | #if (!GDB_MULTI_ARCH) && !defined (REGISTER_NAME) |
33489c5b AC |
674 | #define REGISTER_NAME(regnr) (legacy_register_name (regnr)) |
675 | #endif | |
676 | ||
104c1213 JM |
677 | typedef char * (gdbarch_register_name_ftype) (int regnr); |
678 | extern char * gdbarch_register_name (struct gdbarch *gdbarch, int regnr); | |
679 | extern void set_gdbarch_register_name (struct gdbarch *gdbarch, gdbarch_register_name_ftype *register_name); | |
83905903 AC |
680 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_NAME) |
681 | #error "Non multi-arch definition of REGISTER_NAME" | |
682 | #endif | |
33489c5b | 683 | #if GDB_MULTI_ARCH |
6166d547 | 684 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_NAME) |
0f71a2f6 JM |
685 | #define REGISTER_NAME(regnr) (gdbarch_register_name (current_gdbarch, regnr)) |
686 | #endif | |
33489c5b | 687 | #endif |
0f71a2f6 | 688 | |
104c1213 JM |
689 | extern int gdbarch_register_size (struct gdbarch *gdbarch); |
690 | extern void set_gdbarch_register_size (struct gdbarch *gdbarch, int register_size); | |
83905903 AC |
691 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_SIZE) |
692 | #error "Non multi-arch definition of REGISTER_SIZE" | |
693 | #endif | |
0f71a2f6 | 694 | #if GDB_MULTI_ARCH |
6166d547 | 695 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_SIZE) |
0f71a2f6 JM |
696 | #define REGISTER_SIZE (gdbarch_register_size (current_gdbarch)) |
697 | #endif | |
698 | #endif | |
699 | ||
104c1213 JM |
700 | extern int gdbarch_register_bytes (struct gdbarch *gdbarch); |
701 | extern void set_gdbarch_register_bytes (struct gdbarch *gdbarch, int register_bytes); | |
83905903 AC |
702 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTES) |
703 | #error "Non multi-arch definition of REGISTER_BYTES" | |
704 | #endif | |
0f71a2f6 | 705 | #if GDB_MULTI_ARCH |
6166d547 | 706 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_BYTES) |
0f71a2f6 JM |
707 | #define REGISTER_BYTES (gdbarch_register_bytes (current_gdbarch)) |
708 | #endif | |
709 | #endif | |
710 | ||
104c1213 JM |
711 | typedef int (gdbarch_register_byte_ftype) (int reg_nr); |
712 | extern int gdbarch_register_byte (struct gdbarch *gdbarch, int reg_nr); | |
713 | extern void set_gdbarch_register_byte (struct gdbarch *gdbarch, gdbarch_register_byte_ftype *register_byte); | |
83905903 AC |
714 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTE) |
715 | #error "Non multi-arch definition of REGISTER_BYTE" | |
716 | #endif | |
0f71a2f6 | 717 | #if GDB_MULTI_ARCH |
6166d547 | 718 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_BYTE) |
0f71a2f6 JM |
719 | #define REGISTER_BYTE(reg_nr) (gdbarch_register_byte (current_gdbarch, reg_nr)) |
720 | #endif | |
721 | #endif | |
722 | ||
b2e75d78 AC |
723 | /* Default (function) for non- multi-arch platforms. */ |
724 | #if (!GDB_MULTI_ARCH) && !defined (REGISTER_RAW_SIZE) | |
725 | #define REGISTER_RAW_SIZE(reg_nr) (generic_register_size (reg_nr)) | |
726 | #endif | |
727 | ||
104c1213 JM |
728 | typedef int (gdbarch_register_raw_size_ftype) (int reg_nr); |
729 | extern int gdbarch_register_raw_size (struct gdbarch *gdbarch, int reg_nr); | |
730 | extern void set_gdbarch_register_raw_size (struct gdbarch *gdbarch, gdbarch_register_raw_size_ftype *register_raw_size); | |
83905903 AC |
731 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_RAW_SIZE) |
732 | #error "Non multi-arch definition of REGISTER_RAW_SIZE" | |
733 | #endif | |
0f71a2f6 | 734 | #if GDB_MULTI_ARCH |
6166d547 | 735 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_RAW_SIZE) |
0f71a2f6 JM |
736 | #define REGISTER_RAW_SIZE(reg_nr) (gdbarch_register_raw_size (current_gdbarch, reg_nr)) |
737 | #endif | |
738 | #endif | |
739 | ||
104c1213 JM |
740 | extern int gdbarch_max_register_raw_size (struct gdbarch *gdbarch); |
741 | extern void set_gdbarch_max_register_raw_size (struct gdbarch *gdbarch, int max_register_raw_size); | |
83905903 AC |
742 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (MAX_REGISTER_RAW_SIZE) |
743 | #error "Non multi-arch definition of MAX_REGISTER_RAW_SIZE" | |
744 | #endif | |
0f71a2f6 | 745 | #if GDB_MULTI_ARCH |
6166d547 | 746 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (MAX_REGISTER_RAW_SIZE) |
0f71a2f6 JM |
747 | #define MAX_REGISTER_RAW_SIZE (gdbarch_max_register_raw_size (current_gdbarch)) |
748 | #endif | |
749 | #endif | |
750 | ||
b2e75d78 AC |
751 | /* Default (function) for non- multi-arch platforms. */ |
752 | #if (!GDB_MULTI_ARCH) && !defined (REGISTER_VIRTUAL_SIZE) | |
753 | #define REGISTER_VIRTUAL_SIZE(reg_nr) (generic_register_size (reg_nr)) | |
754 | #endif | |
755 | ||
104c1213 JM |
756 | typedef int (gdbarch_register_virtual_size_ftype) (int reg_nr); |
757 | extern int gdbarch_register_virtual_size (struct gdbarch *gdbarch, int reg_nr); | |
758 | extern void set_gdbarch_register_virtual_size (struct gdbarch *gdbarch, gdbarch_register_virtual_size_ftype *register_virtual_size); | |
83905903 AC |
759 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_VIRTUAL_SIZE) |
760 | #error "Non multi-arch definition of REGISTER_VIRTUAL_SIZE" | |
761 | #endif | |
0f71a2f6 | 762 | #if GDB_MULTI_ARCH |
6166d547 | 763 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_VIRTUAL_SIZE) |
0f71a2f6 JM |
764 | #define REGISTER_VIRTUAL_SIZE(reg_nr) (gdbarch_register_virtual_size (current_gdbarch, reg_nr)) |
765 | #endif | |
766 | #endif | |
767 | ||
104c1213 JM |
768 | extern int gdbarch_max_register_virtual_size (struct gdbarch *gdbarch); |
769 | extern void set_gdbarch_max_register_virtual_size (struct gdbarch *gdbarch, int max_register_virtual_size); | |
83905903 AC |
770 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (MAX_REGISTER_VIRTUAL_SIZE) |
771 | #error "Non multi-arch definition of MAX_REGISTER_VIRTUAL_SIZE" | |
772 | #endif | |
0f71a2f6 | 773 | #if GDB_MULTI_ARCH |
6166d547 | 774 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (MAX_REGISTER_VIRTUAL_SIZE) |
0f71a2f6 JM |
775 | #define MAX_REGISTER_VIRTUAL_SIZE (gdbarch_max_register_virtual_size (current_gdbarch)) |
776 | #endif | |
777 | #endif | |
778 | ||
104c1213 JM |
779 | typedef struct type * (gdbarch_register_virtual_type_ftype) (int reg_nr); |
780 | extern struct type * gdbarch_register_virtual_type (struct gdbarch *gdbarch, int reg_nr); | |
781 | extern void set_gdbarch_register_virtual_type (struct gdbarch *gdbarch, gdbarch_register_virtual_type_ftype *register_virtual_type); | |
83905903 AC |
782 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_VIRTUAL_TYPE) |
783 | #error "Non multi-arch definition of REGISTER_VIRTUAL_TYPE" | |
784 | #endif | |
0f71a2f6 | 785 | #if GDB_MULTI_ARCH |
6166d547 | 786 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_VIRTUAL_TYPE) |
0f71a2f6 JM |
787 | #define REGISTER_VIRTUAL_TYPE(reg_nr) (gdbarch_register_virtual_type (current_gdbarch, reg_nr)) |
788 | #endif | |
789 | #endif | |
790 | ||
666e11c5 EZ |
791 | /* Default (function) for non- multi-arch platforms. */ |
792 | #if (!GDB_MULTI_ARCH) && !defined (DO_REGISTERS_INFO) | |
793 | #define DO_REGISTERS_INFO(reg_nr, fpregs) (do_registers_info (reg_nr, fpregs)) | |
794 | #endif | |
795 | ||
796 | typedef void (gdbarch_do_registers_info_ftype) (int reg_nr, int fpregs); | |
797 | extern void gdbarch_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs); | |
798 | extern void set_gdbarch_do_registers_info (struct gdbarch *gdbarch, gdbarch_do_registers_info_ftype *do_registers_info); | |
83905903 AC |
799 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DO_REGISTERS_INFO) |
800 | #error "Non multi-arch definition of DO_REGISTERS_INFO" | |
801 | #endif | |
666e11c5 EZ |
802 | #if GDB_MULTI_ARCH |
803 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DO_REGISTERS_INFO) | |
804 | #define DO_REGISTERS_INFO(reg_nr, fpregs) (gdbarch_do_registers_info (current_gdbarch, reg_nr, fpregs)) | |
805 | #endif | |
806 | #endif | |
807 | ||
5e74b15c RE |
808 | /* Default (function) for non- multi-arch platforms. */ |
809 | #if (!GDB_MULTI_ARCH) && !defined (PRINT_FLOAT_INFO) | |
810 | #define PRINT_FLOAT_INFO() (default_print_float_info ()) | |
811 | #endif | |
812 | ||
813 | typedef void (gdbarch_print_float_info_ftype) (void); | |
814 | extern void gdbarch_print_float_info (struct gdbarch *gdbarch); | |
815 | extern void set_gdbarch_print_float_info (struct gdbarch *gdbarch, gdbarch_print_float_info_ftype *print_float_info); | |
816 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PRINT_FLOAT_INFO) | |
817 | #error "Non multi-arch definition of PRINT_FLOAT_INFO" | |
818 | #endif | |
819 | #if GDB_MULTI_ARCH | |
820 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PRINT_FLOAT_INFO) | |
821 | #define PRINT_FLOAT_INFO() (gdbarch_print_float_info (current_gdbarch)) | |
822 | #endif | |
823 | #endif | |
824 | ||
7c7651b2 AC |
825 | /* MAP a GDB RAW register number onto a simulator register number. See |
826 | also include/...-sim.h. */ | |
827 | ||
828 | /* Default (function) for non- multi-arch platforms. */ | |
829 | #if (!GDB_MULTI_ARCH) && !defined (REGISTER_SIM_REGNO) | |
830 | #define REGISTER_SIM_REGNO(reg_nr) (default_register_sim_regno (reg_nr)) | |
831 | #endif | |
832 | ||
833 | typedef int (gdbarch_register_sim_regno_ftype) (int reg_nr); | |
834 | extern int gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr); | |
835 | extern void set_gdbarch_register_sim_regno (struct gdbarch *gdbarch, gdbarch_register_sim_regno_ftype *register_sim_regno); | |
83905903 AC |
836 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_SIM_REGNO) |
837 | #error "Non multi-arch definition of REGISTER_SIM_REGNO" | |
838 | #endif | |
7c7651b2 AC |
839 | #if GDB_MULTI_ARCH |
840 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_SIM_REGNO) | |
841 | #define REGISTER_SIM_REGNO(reg_nr) (gdbarch_register_sim_regno (current_gdbarch, reg_nr)) | |
842 | #endif | |
843 | #endif | |
844 | ||
2649061d AC |
845 | #if defined (REGISTER_BYTES_OK) |
846 | /* Legacy for systems yet to multi-arch REGISTER_BYTES_OK */ | |
eee30e78 | 847 | #if !defined (REGISTER_BYTES_OK_P) |
2649061d AC |
848 | #define REGISTER_BYTES_OK_P() (1) |
849 | #endif | |
eee30e78 | 850 | #endif |
2649061d AC |
851 | |
852 | /* Default predicate for non- multi-arch targets. */ | |
853 | #if (!GDB_MULTI_ARCH) && !defined (REGISTER_BYTES_OK_P) | |
854 | #define REGISTER_BYTES_OK_P() (0) | |
855 | #endif | |
856 | ||
857 | extern int gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch); | |
83905903 AC |
858 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTES_OK_P) |
859 | #error "Non multi-arch definition of REGISTER_BYTES_OK" | |
860 | #endif | |
2649061d AC |
861 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_BYTES_OK_P) |
862 | #define REGISTER_BYTES_OK_P() (gdbarch_register_bytes_ok_p (current_gdbarch)) | |
863 | #endif | |
864 | ||
865 | /* Default (function) for non- multi-arch platforms. */ | |
866 | #if (!GDB_MULTI_ARCH) && !defined (REGISTER_BYTES_OK) | |
8e65ff28 | 867 | #define REGISTER_BYTES_OK(nr_bytes) (internal_error (__FILE__, __LINE__, "REGISTER_BYTES_OK"), 0) |
2649061d AC |
868 | #endif |
869 | ||
870 | typedef int (gdbarch_register_bytes_ok_ftype) (long nr_bytes); | |
871 | extern int gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes); | |
872 | extern void set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch, gdbarch_register_bytes_ok_ftype *register_bytes_ok); | |
83905903 AC |
873 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTES_OK) |
874 | #error "Non multi-arch definition of REGISTER_BYTES_OK" | |
875 | #endif | |
2649061d AC |
876 | #if GDB_MULTI_ARCH |
877 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_BYTES_OK) | |
878 | #define REGISTER_BYTES_OK(nr_bytes) (gdbarch_register_bytes_ok (current_gdbarch, nr_bytes)) | |
879 | #endif | |
880 | #endif | |
881 | ||
01fb7433 AC |
882 | /* Default (function) for non- multi-arch platforms. */ |
883 | #if (!GDB_MULTI_ARCH) && !defined (CANNOT_FETCH_REGISTER) | |
884 | #define CANNOT_FETCH_REGISTER(regnum) (cannot_register_not (regnum)) | |
885 | #endif | |
886 | ||
887 | typedef int (gdbarch_cannot_fetch_register_ftype) (int regnum); | |
888 | extern int gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum); | |
889 | extern void set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, gdbarch_cannot_fetch_register_ftype *cannot_fetch_register); | |
83905903 AC |
890 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CANNOT_FETCH_REGISTER) |
891 | #error "Non multi-arch definition of CANNOT_FETCH_REGISTER" | |
892 | #endif | |
01fb7433 AC |
893 | #if GDB_MULTI_ARCH |
894 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CANNOT_FETCH_REGISTER) | |
895 | #define CANNOT_FETCH_REGISTER(regnum) (gdbarch_cannot_fetch_register (current_gdbarch, regnum)) | |
896 | #endif | |
897 | #endif | |
898 | ||
899 | /* Default (function) for non- multi-arch platforms. */ | |
900 | #if (!GDB_MULTI_ARCH) && !defined (CANNOT_STORE_REGISTER) | |
901 | #define CANNOT_STORE_REGISTER(regnum) (cannot_register_not (regnum)) | |
902 | #endif | |
903 | ||
904 | typedef int (gdbarch_cannot_store_register_ftype) (int regnum); | |
905 | extern int gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum); | |
906 | extern void set_gdbarch_cannot_store_register (struct gdbarch *gdbarch, gdbarch_cannot_store_register_ftype *cannot_store_register); | |
83905903 AC |
907 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CANNOT_STORE_REGISTER) |
908 | #error "Non multi-arch definition of CANNOT_STORE_REGISTER" | |
909 | #endif | |
01fb7433 AC |
910 | #if GDB_MULTI_ARCH |
911 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CANNOT_STORE_REGISTER) | |
912 | #define CANNOT_STORE_REGISTER(regnum) (gdbarch_cannot_store_register (current_gdbarch, regnum)) | |
913 | #endif | |
914 | #endif | |
915 | ||
9df628e0 RE |
916 | /* setjmp/longjmp support. */ |
917 | ||
918 | #if defined (GET_LONGJMP_TARGET) | |
919 | /* Legacy for systems yet to multi-arch GET_LONGJMP_TARGET */ | |
920 | #if !defined (GET_LONGJMP_TARGET_P) | |
921 | #define GET_LONGJMP_TARGET_P() (1) | |
922 | #endif | |
923 | #endif | |
924 | ||
925 | /* Default predicate for non- multi-arch targets. */ | |
926 | #if (!GDB_MULTI_ARCH) && !defined (GET_LONGJMP_TARGET_P) | |
927 | #define GET_LONGJMP_TARGET_P() (0) | |
928 | #endif | |
929 | ||
930 | extern int gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch); | |
931 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (GET_LONGJMP_TARGET_P) | |
932 | #error "Non multi-arch definition of GET_LONGJMP_TARGET" | |
933 | #endif | |
934 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (GET_LONGJMP_TARGET_P) | |
935 | #define GET_LONGJMP_TARGET_P() (gdbarch_get_longjmp_target_p (current_gdbarch)) | |
936 | #endif | |
937 | ||
938 | /* Default (function) for non- multi-arch platforms. */ | |
939 | #if (!GDB_MULTI_ARCH) && !defined (GET_LONGJMP_TARGET) | |
940 | #define GET_LONGJMP_TARGET(pc) (internal_error (__FILE__, __LINE__, "GET_LONGJMP_TARGET"), 0) | |
941 | #endif | |
942 | ||
943 | typedef int (gdbarch_get_longjmp_target_ftype) (CORE_ADDR *pc); | |
944 | extern int gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc); | |
945 | extern void set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch, gdbarch_get_longjmp_target_ftype *get_longjmp_target); | |
946 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (GET_LONGJMP_TARGET) | |
947 | #error "Non multi-arch definition of GET_LONGJMP_TARGET" | |
948 | #endif | |
949 | #if GDB_MULTI_ARCH | |
950 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (GET_LONGJMP_TARGET) | |
951 | #define GET_LONGJMP_TARGET(pc) (gdbarch_get_longjmp_target (current_gdbarch, pc)) | |
952 | #endif | |
953 | #endif | |
954 | ||
028c194b AC |
955 | /* Non multi-arch DUMMY_FRAMES are a mess (multi-arch ones are not that |
956 | much better but at least they are vaguely consistent). The headers | |
957 | and body contain convoluted #if/#else sequences for determine how | |
958 | things should be compiled. Instead of trying to mimic that | |
959 | behaviour here (and hence entrench it further) gdbarch simply | |
960 | reqires that these methods be set up from the word go. This also | |
961 | avoids any potential problems with moving beyond multi-arch partial. */ | |
962 | ||
104c1213 JM |
963 | extern int gdbarch_use_generic_dummy_frames (struct gdbarch *gdbarch); |
964 | extern void set_gdbarch_use_generic_dummy_frames (struct gdbarch *gdbarch, int use_generic_dummy_frames); | |
028c194b | 965 | #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (USE_GENERIC_DUMMY_FRAMES) |
83905903 AC |
966 | #error "Non multi-arch definition of USE_GENERIC_DUMMY_FRAMES" |
967 | #endif | |
0f71a2f6 | 968 | #if GDB_MULTI_ARCH |
028c194b | 969 | #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) || !defined (USE_GENERIC_DUMMY_FRAMES) |
0f71a2f6 JM |
970 | #define USE_GENERIC_DUMMY_FRAMES (gdbarch_use_generic_dummy_frames (current_gdbarch)) |
971 | #endif | |
972 | #endif | |
973 | ||
104c1213 JM |
974 | extern int gdbarch_call_dummy_location (struct gdbarch *gdbarch); |
975 | extern void set_gdbarch_call_dummy_location (struct gdbarch *gdbarch, int call_dummy_location); | |
028c194b | 976 | #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_LOCATION) |
83905903 AC |
977 | #error "Non multi-arch definition of CALL_DUMMY_LOCATION" |
978 | #endif | |
0f71a2f6 | 979 | #if GDB_MULTI_ARCH |
028c194b | 980 | #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_LOCATION) |
0f71a2f6 JM |
981 | #define CALL_DUMMY_LOCATION (gdbarch_call_dummy_location (current_gdbarch)) |
982 | #endif | |
983 | #endif | |
984 | ||
104c1213 JM |
985 | typedef CORE_ADDR (gdbarch_call_dummy_address_ftype) (void); |
986 | extern CORE_ADDR gdbarch_call_dummy_address (struct gdbarch *gdbarch); | |
987 | extern void set_gdbarch_call_dummy_address (struct gdbarch *gdbarch, gdbarch_call_dummy_address_ftype *call_dummy_address); | |
83905903 AC |
988 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_ADDRESS) |
989 | #error "Non multi-arch definition of CALL_DUMMY_ADDRESS" | |
990 | #endif | |
0f71a2f6 | 991 | #if GDB_MULTI_ARCH |
6166d547 | 992 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_ADDRESS) |
0f71a2f6 JM |
993 | #define CALL_DUMMY_ADDRESS() (gdbarch_call_dummy_address (current_gdbarch)) |
994 | #endif | |
995 | #endif | |
996 | ||
104c1213 JM |
997 | extern CORE_ADDR gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch); |
998 | extern void set_gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch, CORE_ADDR call_dummy_start_offset); | |
83905903 AC |
999 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_START_OFFSET) |
1000 | #error "Non multi-arch definition of CALL_DUMMY_START_OFFSET" | |
1001 | #endif | |
0f71a2f6 | 1002 | #if GDB_MULTI_ARCH |
6166d547 | 1003 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_START_OFFSET) |
0f71a2f6 JM |
1004 | #define CALL_DUMMY_START_OFFSET (gdbarch_call_dummy_start_offset (current_gdbarch)) |
1005 | #endif | |
1006 | #endif | |
1007 | ||
104c1213 JM |
1008 | extern CORE_ADDR gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch); |
1009 | extern void set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch, CORE_ADDR call_dummy_breakpoint_offset); | |
83905903 AC |
1010 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_BREAKPOINT_OFFSET) |
1011 | #error "Non multi-arch definition of CALL_DUMMY_BREAKPOINT_OFFSET" | |
1012 | #endif | |
0f71a2f6 | 1013 | #if GDB_MULTI_ARCH |
6166d547 | 1014 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_BREAKPOINT_OFFSET) |
0f71a2f6 JM |
1015 | #define CALL_DUMMY_BREAKPOINT_OFFSET (gdbarch_call_dummy_breakpoint_offset (current_gdbarch)) |
1016 | #endif | |
1017 | #endif | |
1018 | ||
104c1213 JM |
1019 | extern int gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch); |
1020 | extern void set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch, int call_dummy_breakpoint_offset_p); | |
028c194b | 1021 | #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_BREAKPOINT_OFFSET_P) |
83905903 AC |
1022 | #error "Non multi-arch definition of CALL_DUMMY_BREAKPOINT_OFFSET_P" |
1023 | #endif | |
0f71a2f6 | 1024 | #if GDB_MULTI_ARCH |
028c194b | 1025 | #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_BREAKPOINT_OFFSET_P) |
0f71a2f6 JM |
1026 | #define CALL_DUMMY_BREAKPOINT_OFFSET_P (gdbarch_call_dummy_breakpoint_offset_p (current_gdbarch)) |
1027 | #endif | |
1028 | #endif | |
1029 | ||
104c1213 JM |
1030 | extern int gdbarch_call_dummy_length (struct gdbarch *gdbarch); |
1031 | extern void set_gdbarch_call_dummy_length (struct gdbarch *gdbarch, int call_dummy_length); | |
83905903 AC |
1032 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_LENGTH) |
1033 | #error "Non multi-arch definition of CALL_DUMMY_LENGTH" | |
1034 | #endif | |
0f71a2f6 | 1035 | #if GDB_MULTI_ARCH |
6166d547 | 1036 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_LENGTH) |
0f71a2f6 JM |
1037 | #define CALL_DUMMY_LENGTH (gdbarch_call_dummy_length (current_gdbarch)) |
1038 | #endif | |
1039 | #endif | |
1040 | ||
104c1213 JM |
1041 | typedef int (gdbarch_pc_in_call_dummy_ftype) (CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address); |
1042 | extern int gdbarch_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address); | |
1043 | extern void set_gdbarch_pc_in_call_dummy (struct gdbarch *gdbarch, gdbarch_pc_in_call_dummy_ftype *pc_in_call_dummy); | |
028c194b | 1044 | #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (PC_IN_CALL_DUMMY) |
83905903 AC |
1045 | #error "Non multi-arch definition of PC_IN_CALL_DUMMY" |
1046 | #endif | |
0f71a2f6 | 1047 | #if GDB_MULTI_ARCH |
028c194b | 1048 | #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) || !defined (PC_IN_CALL_DUMMY) |
0f71a2f6 JM |
1049 | #define PC_IN_CALL_DUMMY(pc, sp, frame_address) (gdbarch_pc_in_call_dummy (current_gdbarch, pc, sp, frame_address)) |
1050 | #endif | |
1051 | #endif | |
1052 | ||
104c1213 JM |
1053 | extern int gdbarch_call_dummy_p (struct gdbarch *gdbarch); |
1054 | extern void set_gdbarch_call_dummy_p (struct gdbarch *gdbarch, int call_dummy_p); | |
028c194b | 1055 | #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_P) |
83905903 AC |
1056 | #error "Non multi-arch definition of CALL_DUMMY_P" |
1057 | #endif | |
0f71a2f6 | 1058 | #if GDB_MULTI_ARCH |
028c194b | 1059 | #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_P) |
0f71a2f6 JM |
1060 | #define CALL_DUMMY_P (gdbarch_call_dummy_p (current_gdbarch)) |
1061 | #endif | |
1062 | #endif | |
1063 | ||
33489c5b | 1064 | /* Default (value) for non- multi-arch platforms. */ |
6166d547 | 1065 | #if (!GDB_MULTI_ARCH) && !defined (CALL_DUMMY_WORDS) |
33489c5b AC |
1066 | #define CALL_DUMMY_WORDS (legacy_call_dummy_words) |
1067 | #endif | |
1068 | ||
104c1213 JM |
1069 | extern LONGEST * gdbarch_call_dummy_words (struct gdbarch *gdbarch); |
1070 | extern void set_gdbarch_call_dummy_words (struct gdbarch *gdbarch, LONGEST * call_dummy_words); | |
83905903 AC |
1071 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_WORDS) |
1072 | #error "Non multi-arch definition of CALL_DUMMY_WORDS" | |
1073 | #endif | |
33489c5b | 1074 | #if GDB_MULTI_ARCH |
6166d547 | 1075 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_WORDS) |
0f71a2f6 JM |
1076 | #define CALL_DUMMY_WORDS (gdbarch_call_dummy_words (current_gdbarch)) |
1077 | #endif | |
33489c5b AC |
1078 | #endif |
1079 | ||
1080 | /* Default (value) for non- multi-arch platforms. */ | |
6166d547 | 1081 | #if (!GDB_MULTI_ARCH) && !defined (SIZEOF_CALL_DUMMY_WORDS) |
33489c5b AC |
1082 | #define SIZEOF_CALL_DUMMY_WORDS (legacy_sizeof_call_dummy_words) |
1083 | #endif | |
0f71a2f6 | 1084 | |
104c1213 JM |
1085 | extern int gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch); |
1086 | extern void set_gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch, int sizeof_call_dummy_words); | |
83905903 AC |
1087 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIZEOF_CALL_DUMMY_WORDS) |
1088 | #error "Non multi-arch definition of SIZEOF_CALL_DUMMY_WORDS" | |
1089 | #endif | |
33489c5b | 1090 | #if GDB_MULTI_ARCH |
6166d547 | 1091 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SIZEOF_CALL_DUMMY_WORDS) |
0f71a2f6 JM |
1092 | #define SIZEOF_CALL_DUMMY_WORDS (gdbarch_sizeof_call_dummy_words (current_gdbarch)) |
1093 | #endif | |
33489c5b | 1094 | #endif |
0f71a2f6 | 1095 | |
104c1213 JM |
1096 | extern int gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch); |
1097 | extern void set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch, int call_dummy_stack_adjust_p); | |
028c194b | 1098 | #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_STACK_ADJUST_P) |
83905903 AC |
1099 | #error "Non multi-arch definition of CALL_DUMMY_STACK_ADJUST_P" |
1100 | #endif | |
0f71a2f6 | 1101 | #if GDB_MULTI_ARCH |
028c194b | 1102 | #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_STACK_ADJUST_P) |
0f71a2f6 JM |
1103 | #define CALL_DUMMY_STACK_ADJUST_P (gdbarch_call_dummy_stack_adjust_p (current_gdbarch)) |
1104 | #endif | |
1105 | #endif | |
1106 | ||
104c1213 JM |
1107 | extern int gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch); |
1108 | extern void set_gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch, int call_dummy_stack_adjust); | |
83905903 AC |
1109 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_STACK_ADJUST) |
1110 | #error "Non multi-arch definition of CALL_DUMMY_STACK_ADJUST" | |
1111 | #endif | |
0f71a2f6 | 1112 | #if GDB_MULTI_ARCH |
6166d547 | 1113 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_STACK_ADJUST) |
0f71a2f6 JM |
1114 | #define CALL_DUMMY_STACK_ADJUST (gdbarch_call_dummy_stack_adjust (current_gdbarch)) |
1115 | #endif | |
1116 | #endif | |
1117 | ||
104c1213 JM |
1118 | 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); |
1119 | 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); | |
1120 | extern void set_gdbarch_fix_call_dummy (struct gdbarch *gdbarch, gdbarch_fix_call_dummy_ftype *fix_call_dummy); | |
83905903 AC |
1121 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FIX_CALL_DUMMY) |
1122 | #error "Non multi-arch definition of FIX_CALL_DUMMY" | |
1123 | #endif | |
0f71a2f6 | 1124 | #if GDB_MULTI_ARCH |
6166d547 | 1125 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FIX_CALL_DUMMY) |
0f71a2f6 JM |
1126 | #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)) |
1127 | #endif | |
1128 | #endif | |
1129 | ||
10312cc4 AC |
1130 | /* Default (function) for non- multi-arch platforms. */ |
1131 | #if (!GDB_MULTI_ARCH) && !defined (INIT_FRAME_PC_FIRST) | |
1132 | #define INIT_FRAME_PC_FIRST(fromleaf, prev) (init_frame_pc_noop (fromleaf, prev)) | |
1133 | #endif | |
1134 | ||
1135 | typedef void (gdbarch_init_frame_pc_first_ftype) (int fromleaf, struct frame_info *prev); | |
1136 | extern void gdbarch_init_frame_pc_first (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev); | |
1137 | extern void set_gdbarch_init_frame_pc_first (struct gdbarch *gdbarch, gdbarch_init_frame_pc_first_ftype *init_frame_pc_first); | |
83905903 AC |
1138 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INIT_FRAME_PC_FIRST) |
1139 | #error "Non multi-arch definition of INIT_FRAME_PC_FIRST" | |
1140 | #endif | |
10312cc4 AC |
1141 | #if GDB_MULTI_ARCH |
1142 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (INIT_FRAME_PC_FIRST) | |
1143 | #define INIT_FRAME_PC_FIRST(fromleaf, prev) (gdbarch_init_frame_pc_first (current_gdbarch, fromleaf, prev)) | |
1144 | #endif | |
1145 | #endif | |
1146 | ||
1147 | /* Default (function) for non- multi-arch platforms. */ | |
1148 | #if (!GDB_MULTI_ARCH) && !defined (INIT_FRAME_PC) | |
7824d2f2 | 1149 | #define INIT_FRAME_PC(fromleaf, prev) (init_frame_pc_default (fromleaf, prev)) |
10312cc4 AC |
1150 | #endif |
1151 | ||
1152 | typedef void (gdbarch_init_frame_pc_ftype) (int fromleaf, struct frame_info *prev); | |
1153 | extern void gdbarch_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev); | |
1154 | extern void set_gdbarch_init_frame_pc (struct gdbarch *gdbarch, gdbarch_init_frame_pc_ftype *init_frame_pc); | |
83905903 AC |
1155 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INIT_FRAME_PC) |
1156 | #error "Non multi-arch definition of INIT_FRAME_PC" | |
1157 | #endif | |
10312cc4 AC |
1158 | #if GDB_MULTI_ARCH |
1159 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (INIT_FRAME_PC) | |
1160 | #define INIT_FRAME_PC(fromleaf, prev) (gdbarch_init_frame_pc (current_gdbarch, fromleaf, prev)) | |
1161 | #endif | |
1162 | #endif | |
1163 | ||
104c1213 JM |
1164 | extern int gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch); |
1165 | extern void set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch, int believe_pcc_promotion); | |
83905903 AC |
1166 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (BELIEVE_PCC_PROMOTION) |
1167 | #error "Non multi-arch definition of BELIEVE_PCC_PROMOTION" | |
1168 | #endif | |
0f71a2f6 | 1169 | #if GDB_MULTI_ARCH |
6166d547 | 1170 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (BELIEVE_PCC_PROMOTION) |
0f71a2f6 JM |
1171 | #define BELIEVE_PCC_PROMOTION (gdbarch_believe_pcc_promotion (current_gdbarch)) |
1172 | #endif | |
1173 | #endif | |
1174 | ||
104c1213 JM |
1175 | extern int gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch); |
1176 | extern void set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch, int believe_pcc_promotion_type); | |
83905903 AC |
1177 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (BELIEVE_PCC_PROMOTION_TYPE) |
1178 | #error "Non multi-arch definition of BELIEVE_PCC_PROMOTION_TYPE" | |
1179 | #endif | |
0f71a2f6 | 1180 | #if GDB_MULTI_ARCH |
6166d547 | 1181 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (BELIEVE_PCC_PROMOTION_TYPE) |
0f71a2f6 JM |
1182 | #define BELIEVE_PCC_PROMOTION_TYPE (gdbarch_believe_pcc_promotion_type (current_gdbarch)) |
1183 | #endif | |
1184 | #endif | |
1185 | ||
33489c5b | 1186 | /* Default (function) for non- multi-arch platforms. */ |
6166d547 | 1187 | #if (!GDB_MULTI_ARCH) && !defined (COERCE_FLOAT_TO_DOUBLE) |
33489c5b AC |
1188 | #define COERCE_FLOAT_TO_DOUBLE(formal, actual) (default_coerce_float_to_double (formal, actual)) |
1189 | #endif | |
1190 | ||
b9a8e3bf JB |
1191 | typedef int (gdbarch_coerce_float_to_double_ftype) (struct type *formal, struct type *actual); |
1192 | extern int gdbarch_coerce_float_to_double (struct gdbarch *gdbarch, struct type *formal, struct type *actual); | |
1193 | extern void set_gdbarch_coerce_float_to_double (struct gdbarch *gdbarch, gdbarch_coerce_float_to_double_ftype *coerce_float_to_double); | |
83905903 AC |
1194 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (COERCE_FLOAT_TO_DOUBLE) |
1195 | #error "Non multi-arch definition of COERCE_FLOAT_TO_DOUBLE" | |
1196 | #endif | |
33489c5b | 1197 | #if GDB_MULTI_ARCH |
6166d547 | 1198 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (COERCE_FLOAT_TO_DOUBLE) |
b9a8e3bf JB |
1199 | #define COERCE_FLOAT_TO_DOUBLE(formal, actual) (gdbarch_coerce_float_to_double (current_gdbarch, formal, actual)) |
1200 | #endif | |
33489c5b | 1201 | #endif |
b9a8e3bf | 1202 | |
028c194b AC |
1203 | /* GET_SAVED_REGISTER is like DUMMY_FRAMES. It is at level one as the |
1204 | old code has strange #ifdef interaction. So far no one has found | |
1205 | that default_get_saved_register() is the default they are after. */ | |
1206 | ||
104c1213 JM |
1207 | 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); |
1208 | 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); | |
1209 | extern void set_gdbarch_get_saved_register (struct gdbarch *gdbarch, gdbarch_get_saved_register_ftype *get_saved_register); | |
028c194b | 1210 | #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (GET_SAVED_REGISTER) |
83905903 AC |
1211 | #error "Non multi-arch definition of GET_SAVED_REGISTER" |
1212 | #endif | |
0f71a2f6 | 1213 | #if GDB_MULTI_ARCH |
028c194b | 1214 | #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) || !defined (GET_SAVED_REGISTER) |
0f71a2f6 JM |
1215 | #define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) (gdbarch_get_saved_register (current_gdbarch, raw_buffer, optimized, addrp, frame, regnum, lval)) |
1216 | #endif | |
1217 | #endif | |
1218 | ||
33489c5b | 1219 | /* Default (function) for non- multi-arch platforms. */ |
6166d547 | 1220 | #if (!GDB_MULTI_ARCH) && !defined (REGISTER_CONVERTIBLE) |
33489c5b AC |
1221 | #define REGISTER_CONVERTIBLE(nr) (generic_register_convertible_not (nr)) |
1222 | #endif | |
1223 | ||
104c1213 JM |
1224 | typedef int (gdbarch_register_convertible_ftype) (int nr); |
1225 | extern int gdbarch_register_convertible (struct gdbarch *gdbarch, int nr); | |
1226 | extern void set_gdbarch_register_convertible (struct gdbarch *gdbarch, gdbarch_register_convertible_ftype *register_convertible); | |
83905903 AC |
1227 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_CONVERTIBLE) |
1228 | #error "Non multi-arch definition of REGISTER_CONVERTIBLE" | |
1229 | #endif | |
33489c5b | 1230 | #if GDB_MULTI_ARCH |
6166d547 | 1231 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_CONVERTIBLE) |
0f71a2f6 JM |
1232 | #define REGISTER_CONVERTIBLE(nr) (gdbarch_register_convertible (current_gdbarch, nr)) |
1233 | #endif | |
33489c5b AC |
1234 | #endif |
1235 | ||
1236 | /* Default (function) for non- multi-arch platforms. */ | |
6166d547 | 1237 | #if (!GDB_MULTI_ARCH) && !defined (REGISTER_CONVERT_TO_VIRTUAL) |
8e65ff28 | 1238 | #define REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to) (internal_error (__FILE__, __LINE__, "REGISTER_CONVERT_TO_VIRTUAL"), 0) |
33489c5b | 1239 | #endif |
0f71a2f6 | 1240 | |
104c1213 JM |
1241 | typedef void (gdbarch_register_convert_to_virtual_ftype) (int regnum, struct type *type, char *from, char *to); |
1242 | extern void gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to); | |
1243 | extern void set_gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, gdbarch_register_convert_to_virtual_ftype *register_convert_to_virtual); | |
83905903 AC |
1244 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_CONVERT_TO_VIRTUAL) |
1245 | #error "Non multi-arch definition of REGISTER_CONVERT_TO_VIRTUAL" | |
1246 | #endif | |
33489c5b | 1247 | #if GDB_MULTI_ARCH |
6166d547 | 1248 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_CONVERT_TO_VIRTUAL) |
0f71a2f6 JM |
1249 | #define REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to) (gdbarch_register_convert_to_virtual (current_gdbarch, regnum, type, from, to)) |
1250 | #endif | |
33489c5b AC |
1251 | #endif |
1252 | ||
1253 | /* Default (function) for non- multi-arch platforms. */ | |
6166d547 | 1254 | #if (!GDB_MULTI_ARCH) && !defined (REGISTER_CONVERT_TO_RAW) |
8e65ff28 | 1255 | #define REGISTER_CONVERT_TO_RAW(type, regnum, from, to) (internal_error (__FILE__, __LINE__, "REGISTER_CONVERT_TO_RAW"), 0) |
33489c5b | 1256 | #endif |
0f71a2f6 | 1257 | |
104c1213 JM |
1258 | typedef void (gdbarch_register_convert_to_raw_ftype) (struct type *type, int regnum, char *from, char *to); |
1259 | extern void gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to); | |
1260 | extern void set_gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, gdbarch_register_convert_to_raw_ftype *register_convert_to_raw); | |
83905903 AC |
1261 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_CONVERT_TO_RAW) |
1262 | #error "Non multi-arch definition of REGISTER_CONVERT_TO_RAW" | |
1263 | #endif | |
33489c5b | 1264 | #if GDB_MULTI_ARCH |
6166d547 | 1265 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_CONVERT_TO_RAW) |
0f71a2f6 JM |
1266 | #define REGISTER_CONVERT_TO_RAW(type, regnum, from, to) (gdbarch_register_convert_to_raw (current_gdbarch, type, regnum, from, to)) |
1267 | #endif | |
33489c5b AC |
1268 | #endif |
1269 | ||
13d01224 AC |
1270 | /* Default (function) for non- multi-arch platforms. */ |
1271 | #if (!GDB_MULTI_ARCH) && !defined (CONVERT_REGISTER_P) | |
1272 | #define CONVERT_REGISTER_P(regnum) (legacy_convert_register_p (regnum)) | |
1273 | #endif | |
1274 | ||
1275 | typedef int (gdbarch_convert_register_p_ftype) (int regnum); | |
1276 | extern int gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum); | |
1277 | extern void set_gdbarch_convert_register_p (struct gdbarch *gdbarch, gdbarch_convert_register_p_ftype *convert_register_p); | |
1278 | #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (CONVERT_REGISTER_P) | |
1279 | #error "Non multi-arch definition of CONVERT_REGISTER_P" | |
1280 | #endif | |
1281 | #if GDB_MULTI_ARCH | |
1282 | #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) || !defined (CONVERT_REGISTER_P) | |
1283 | #define CONVERT_REGISTER_P(regnum) (gdbarch_convert_register_p (current_gdbarch, regnum)) | |
1284 | #endif | |
1285 | #endif | |
1286 | ||
1287 | /* Default (function) for non- multi-arch platforms. */ | |
1288 | #if (!GDB_MULTI_ARCH) && !defined (REGISTER_TO_VALUE) | |
1289 | #define REGISTER_TO_VALUE(regnum, type, from, to) (legacy_register_to_value (regnum, type, from, to)) | |
1290 | #endif | |
1291 | ||
1292 | typedef void (gdbarch_register_to_value_ftype) (int regnum, struct type *type, char *from, char *to); | |
1293 | extern void gdbarch_register_to_value (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to); | |
1294 | extern void set_gdbarch_register_to_value (struct gdbarch *gdbarch, gdbarch_register_to_value_ftype *register_to_value); | |
1295 | #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_TO_VALUE) | |
1296 | #error "Non multi-arch definition of REGISTER_TO_VALUE" | |
1297 | #endif | |
1298 | #if GDB_MULTI_ARCH | |
1299 | #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_TO_VALUE) | |
1300 | #define REGISTER_TO_VALUE(regnum, type, from, to) (gdbarch_register_to_value (current_gdbarch, regnum, type, from, to)) | |
1301 | #endif | |
1302 | #endif | |
1303 | ||
1304 | /* Default (function) for non- multi-arch platforms. */ | |
1305 | #if (!GDB_MULTI_ARCH) && !defined (VALUE_TO_REGISTER) | |
1306 | #define VALUE_TO_REGISTER(type, regnum, from, to) (legacy_value_to_register (type, regnum, from, to)) | |
1307 | #endif | |
1308 | ||
1309 | typedef void (gdbarch_value_to_register_ftype) (struct type *type, int regnum, char *from, char *to); | |
1310 | extern void gdbarch_value_to_register (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to); | |
1311 | extern void set_gdbarch_value_to_register (struct gdbarch *gdbarch, gdbarch_value_to_register_ftype *value_to_register); | |
1312 | #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (VALUE_TO_REGISTER) | |
1313 | #error "Non multi-arch definition of VALUE_TO_REGISTER" | |
1314 | #endif | |
1315 | #if GDB_MULTI_ARCH | |
1316 | #if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) || !defined (VALUE_TO_REGISTER) | |
1317 | #define VALUE_TO_REGISTER(type, regnum, from, to) (gdbarch_value_to_register (current_gdbarch, type, regnum, from, to)) | |
1318 | #endif | |
1319 | #endif | |
1320 | ||
34620563 AC |
1321 | /* This function is called when the value of a pseudo-register needs to |
1322 | be updated. Typically it will be defined on a per-architecture | |
1323 | basis. */ | |
1324 | ||
31e9866e AC |
1325 | #if defined (FETCH_PSEUDO_REGISTER) |
1326 | /* Legacy for systems yet to multi-arch FETCH_PSEUDO_REGISTER */ | |
1327 | #if !defined (FETCH_PSEUDO_REGISTER_P) | |
1328 | #define FETCH_PSEUDO_REGISTER_P() (1) | |
1329 | #endif | |
1330 | #endif | |
1331 | ||
1332 | /* Default predicate for non- multi-arch targets. */ | |
1333 | #if (!GDB_MULTI_ARCH) && !defined (FETCH_PSEUDO_REGISTER_P) | |
1334 | #define FETCH_PSEUDO_REGISTER_P() (0) | |
1335 | #endif | |
1336 | ||
1337 | extern int gdbarch_fetch_pseudo_register_p (struct gdbarch *gdbarch); | |
1338 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FETCH_PSEUDO_REGISTER_P) | |
1339 | #error "Non multi-arch definition of FETCH_PSEUDO_REGISTER" | |
1340 | #endif | |
1341 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FETCH_PSEUDO_REGISTER_P) | |
1342 | #define FETCH_PSEUDO_REGISTER_P() (gdbarch_fetch_pseudo_register_p (current_gdbarch)) | |
1343 | #endif | |
1344 | ||
7f1b2585 | 1345 | /* Default (function) for non- multi-arch platforms. */ |
6166d547 | 1346 | #if (!GDB_MULTI_ARCH) && !defined (FETCH_PSEUDO_REGISTER) |
8e65ff28 | 1347 | #define FETCH_PSEUDO_REGISTER(regnum) (internal_error (__FILE__, __LINE__, "FETCH_PSEUDO_REGISTER"), 0) |
7f1b2585 EZ |
1348 | #endif |
1349 | ||
1350 | typedef void (gdbarch_fetch_pseudo_register_ftype) (int regnum); | |
1351 | extern void gdbarch_fetch_pseudo_register (struct gdbarch *gdbarch, int regnum); | |
1352 | extern void set_gdbarch_fetch_pseudo_register (struct gdbarch *gdbarch, gdbarch_fetch_pseudo_register_ftype *fetch_pseudo_register); | |
83905903 AC |
1353 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FETCH_PSEUDO_REGISTER) |
1354 | #error "Non multi-arch definition of FETCH_PSEUDO_REGISTER" | |
1355 | #endif | |
7f1b2585 | 1356 | #if GDB_MULTI_ARCH |
6166d547 | 1357 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FETCH_PSEUDO_REGISTER) |
7f1b2585 EZ |
1358 | #define FETCH_PSEUDO_REGISTER(regnum) (gdbarch_fetch_pseudo_register (current_gdbarch, regnum)) |
1359 | #endif | |
1360 | #endif | |
1361 | ||
34620563 AC |
1362 | /* This function is called when the value of a pseudo-register needs to |
1363 | be set or stored. Typically it will be defined on a | |
1364 | per-architecture basis. */ | |
1365 | ||
31e9866e AC |
1366 | #if defined (STORE_PSEUDO_REGISTER) |
1367 | /* Legacy for systems yet to multi-arch STORE_PSEUDO_REGISTER */ | |
1368 | #if !defined (STORE_PSEUDO_REGISTER_P) | |
1369 | #define STORE_PSEUDO_REGISTER_P() (1) | |
1370 | #endif | |
1371 | #endif | |
1372 | ||
1373 | /* Default predicate for non- multi-arch targets. */ | |
1374 | #if (!GDB_MULTI_ARCH) && !defined (STORE_PSEUDO_REGISTER_P) | |
1375 | #define STORE_PSEUDO_REGISTER_P() (0) | |
1376 | #endif | |
1377 | ||
1378 | extern int gdbarch_store_pseudo_register_p (struct gdbarch *gdbarch); | |
1379 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STORE_PSEUDO_REGISTER_P) | |
1380 | #error "Non multi-arch definition of STORE_PSEUDO_REGISTER" | |
1381 | #endif | |
1382 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (STORE_PSEUDO_REGISTER_P) | |
1383 | #define STORE_PSEUDO_REGISTER_P() (gdbarch_store_pseudo_register_p (current_gdbarch)) | |
1384 | #endif | |
1385 | ||
7f1b2585 | 1386 | /* Default (function) for non- multi-arch platforms. */ |
6166d547 | 1387 | #if (!GDB_MULTI_ARCH) && !defined (STORE_PSEUDO_REGISTER) |
8e65ff28 | 1388 | #define STORE_PSEUDO_REGISTER(regnum) (internal_error (__FILE__, __LINE__, "STORE_PSEUDO_REGISTER"), 0) |
7f1b2585 EZ |
1389 | #endif |
1390 | ||
1391 | typedef void (gdbarch_store_pseudo_register_ftype) (int regnum); | |
1392 | extern void gdbarch_store_pseudo_register (struct gdbarch *gdbarch, int regnum); | |
1393 | extern void set_gdbarch_store_pseudo_register (struct gdbarch *gdbarch, gdbarch_store_pseudo_register_ftype *store_pseudo_register); | |
83905903 AC |
1394 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STORE_PSEUDO_REGISTER) |
1395 | #error "Non multi-arch definition of STORE_PSEUDO_REGISTER" | |
1396 | #endif | |
7f1b2585 | 1397 | #if GDB_MULTI_ARCH |
6166d547 | 1398 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (STORE_PSEUDO_REGISTER) |
7f1b2585 EZ |
1399 | #define STORE_PSEUDO_REGISTER(regnum) (gdbarch_store_pseudo_register (current_gdbarch, regnum)) |
1400 | #endif | |
1401 | #endif | |
1402 | ||
33489c5b | 1403 | /* Default (function) for non- multi-arch platforms. */ |
6166d547 | 1404 | #if (!GDB_MULTI_ARCH) && !defined (POINTER_TO_ADDRESS) |
ac2e2ef7 | 1405 | #define POINTER_TO_ADDRESS(type, buf) (unsigned_pointer_to_address (type, buf)) |
33489c5b | 1406 | #endif |
4478b372 | 1407 | |
ac2e2ef7 AC |
1408 | typedef CORE_ADDR (gdbarch_pointer_to_address_ftype) (struct type *type, void *buf); |
1409 | extern CORE_ADDR gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf); | |
4478b372 | 1410 | extern void set_gdbarch_pointer_to_address (struct gdbarch *gdbarch, gdbarch_pointer_to_address_ftype *pointer_to_address); |
83905903 AC |
1411 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (POINTER_TO_ADDRESS) |
1412 | #error "Non multi-arch definition of POINTER_TO_ADDRESS" | |
1413 | #endif | |
33489c5b | 1414 | #if GDB_MULTI_ARCH |
6166d547 | 1415 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (POINTER_TO_ADDRESS) |
4478b372 JB |
1416 | #define POINTER_TO_ADDRESS(type, buf) (gdbarch_pointer_to_address (current_gdbarch, type, buf)) |
1417 | #endif | |
33489c5b AC |
1418 | #endif |
1419 | ||
1420 | /* Default (function) for non- multi-arch platforms. */ | |
6166d547 | 1421 | #if (!GDB_MULTI_ARCH) && !defined (ADDRESS_TO_POINTER) |
ac2e2ef7 | 1422 | #define ADDRESS_TO_POINTER(type, buf, addr) (unsigned_address_to_pointer (type, buf, addr)) |
33489c5b | 1423 | #endif |
4478b372 | 1424 | |
ac2e2ef7 AC |
1425 | typedef void (gdbarch_address_to_pointer_ftype) (struct type *type, void *buf, CORE_ADDR addr); |
1426 | extern void gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr); | |
4478b372 | 1427 | extern void set_gdbarch_address_to_pointer (struct gdbarch *gdbarch, gdbarch_address_to_pointer_ftype *address_to_pointer); |
83905903 AC |
1428 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDRESS_TO_POINTER) |
1429 | #error "Non multi-arch definition of ADDRESS_TO_POINTER" | |
1430 | #endif | |
33489c5b | 1431 | #if GDB_MULTI_ARCH |
6166d547 | 1432 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ADDRESS_TO_POINTER) |
4478b372 JB |
1433 | #define ADDRESS_TO_POINTER(type, buf, addr) (gdbarch_address_to_pointer (current_gdbarch, type, buf, addr)) |
1434 | #endif | |
33489c5b AC |
1435 | #endif |
1436 | ||
fc0c74b1 AC |
1437 | #if defined (INTEGER_TO_ADDRESS) |
1438 | /* Legacy for systems yet to multi-arch INTEGER_TO_ADDRESS */ | |
1439 | #if !defined (INTEGER_TO_ADDRESS_P) | |
1440 | #define INTEGER_TO_ADDRESS_P() (1) | |
1441 | #endif | |
1442 | #endif | |
1443 | ||
1444 | /* Default predicate for non- multi-arch targets. */ | |
1445 | #if (!GDB_MULTI_ARCH) && !defined (INTEGER_TO_ADDRESS_P) | |
1446 | #define INTEGER_TO_ADDRESS_P() (0) | |
1447 | #endif | |
1448 | ||
1449 | extern int gdbarch_integer_to_address_p (struct gdbarch *gdbarch); | |
1450 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INTEGER_TO_ADDRESS_P) | |
1451 | #error "Non multi-arch definition of INTEGER_TO_ADDRESS" | |
1452 | #endif | |
1453 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (INTEGER_TO_ADDRESS_P) | |
1454 | #define INTEGER_TO_ADDRESS_P() (gdbarch_integer_to_address_p (current_gdbarch)) | |
1455 | #endif | |
1456 | ||
1457 | /* Default (function) for non- multi-arch platforms. */ | |
1458 | #if (!GDB_MULTI_ARCH) && !defined (INTEGER_TO_ADDRESS) | |
73d3c16e | 1459 | #define INTEGER_TO_ADDRESS(type, buf) (internal_error (__FILE__, __LINE__, "INTEGER_TO_ADDRESS"), 0) |
fc0c74b1 AC |
1460 | #endif |
1461 | ||
1462 | typedef CORE_ADDR (gdbarch_integer_to_address_ftype) (struct type *type, void *buf); | |
1463 | extern CORE_ADDR gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf); | |
1464 | extern void set_gdbarch_integer_to_address (struct gdbarch *gdbarch, gdbarch_integer_to_address_ftype *integer_to_address); | |
1465 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INTEGER_TO_ADDRESS) | |
1466 | #error "Non multi-arch definition of INTEGER_TO_ADDRESS" | |
1467 | #endif | |
1468 | #if GDB_MULTI_ARCH | |
1469 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (INTEGER_TO_ADDRESS) | |
1470 | #define INTEGER_TO_ADDRESS(type, buf) (gdbarch_integer_to_address (current_gdbarch, type, buf)) | |
1471 | #endif | |
1472 | #endif | |
1473 | ||
33489c5b | 1474 | /* Default (function) for non- multi-arch platforms. */ |
6166d547 | 1475 | #if (!GDB_MULTI_ARCH) && !defined (RETURN_VALUE_ON_STACK) |
33489c5b AC |
1476 | #define RETURN_VALUE_ON_STACK(type) (generic_return_value_on_stack_not (type)) |
1477 | #endif | |
0f71a2f6 | 1478 | |
71a9f22e JB |
1479 | typedef int (gdbarch_return_value_on_stack_ftype) (struct type *type); |
1480 | extern int gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type); | |
1481 | extern void set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch, gdbarch_return_value_on_stack_ftype *return_value_on_stack); | |
83905903 AC |
1482 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (RETURN_VALUE_ON_STACK) |
1483 | #error "Non multi-arch definition of RETURN_VALUE_ON_STACK" | |
1484 | #endif | |
33489c5b | 1485 | #if GDB_MULTI_ARCH |
6166d547 | 1486 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (RETURN_VALUE_ON_STACK) |
71a9f22e JB |
1487 | #define RETURN_VALUE_ON_STACK(type) (gdbarch_return_value_on_stack (current_gdbarch, type)) |
1488 | #endif | |
33489c5b | 1489 | #endif |
71a9f22e | 1490 | |
104c1213 JM |
1491 | typedef void (gdbarch_extract_return_value_ftype) (struct type *type, char *regbuf, char *valbuf); |
1492 | extern void gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf); | |
1493 | extern void set_gdbarch_extract_return_value (struct gdbarch *gdbarch, gdbarch_extract_return_value_ftype *extract_return_value); | |
83905903 AC |
1494 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_RETURN_VALUE) |
1495 | #error "Non multi-arch definition of EXTRACT_RETURN_VALUE" | |
1496 | #endif | |
0f71a2f6 | 1497 | #if GDB_MULTI_ARCH |
6166d547 | 1498 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (EXTRACT_RETURN_VALUE) |
0f71a2f6 JM |
1499 | #define EXTRACT_RETURN_VALUE(type, regbuf, valbuf) (gdbarch_extract_return_value (current_gdbarch, type, regbuf, valbuf)) |
1500 | #endif | |
1501 | #endif | |
1502 | ||
c203844d AC |
1503 | /* Default (function) for non- multi-arch platforms. */ |
1504 | #if (!GDB_MULTI_ARCH) && !defined (PUSH_ARGUMENTS) | |
1505 | #define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) (default_push_arguments (nargs, args, sp, struct_return, struct_addr)) | |
1506 | #endif | |
1507 | ||
104c1213 JM |
1508 | typedef CORE_ADDR (gdbarch_push_arguments_ftype) (int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr); |
1509 | extern CORE_ADDR gdbarch_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr); | |
1510 | extern void set_gdbarch_push_arguments (struct gdbarch *gdbarch, gdbarch_push_arguments_ftype *push_arguments); | |
83905903 AC |
1511 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PUSH_ARGUMENTS) |
1512 | #error "Non multi-arch definition of PUSH_ARGUMENTS" | |
1513 | #endif | |
0f71a2f6 | 1514 | #if GDB_MULTI_ARCH |
6166d547 | 1515 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PUSH_ARGUMENTS) |
0f71a2f6 JM |
1516 | #define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) (gdbarch_push_arguments (current_gdbarch, nargs, args, sp, struct_return, struct_addr)) |
1517 | #endif | |
1518 | #endif | |
1519 | ||
104c1213 JM |
1520 | typedef void (gdbarch_push_dummy_frame_ftype) (void); |
1521 | extern void gdbarch_push_dummy_frame (struct gdbarch *gdbarch); | |
1522 | extern void set_gdbarch_push_dummy_frame (struct gdbarch *gdbarch, gdbarch_push_dummy_frame_ftype *push_dummy_frame); | |
83905903 AC |
1523 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PUSH_DUMMY_FRAME) |
1524 | #error "Non multi-arch definition of PUSH_DUMMY_FRAME" | |
1525 | #endif | |
0f71a2f6 | 1526 | #if GDB_MULTI_ARCH |
6166d547 | 1527 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PUSH_DUMMY_FRAME) |
0f71a2f6 JM |
1528 | #define PUSH_DUMMY_FRAME (gdbarch_push_dummy_frame (current_gdbarch)) |
1529 | #endif | |
1530 | #endif | |
1531 | ||
69a0d5f4 AC |
1532 | #if defined (PUSH_RETURN_ADDRESS) |
1533 | /* Legacy for systems yet to multi-arch PUSH_RETURN_ADDRESS */ | |
1534 | #if !defined (PUSH_RETURN_ADDRESS_P) | |
1535 | #define PUSH_RETURN_ADDRESS_P() (1) | |
1536 | #endif | |
1537 | #endif | |
1538 | ||
1539 | /* Default predicate for non- multi-arch targets. */ | |
1540 | #if (!GDB_MULTI_ARCH) && !defined (PUSH_RETURN_ADDRESS_P) | |
1541 | #define PUSH_RETURN_ADDRESS_P() (0) | |
1542 | #endif | |
1543 | ||
1544 | extern int gdbarch_push_return_address_p (struct gdbarch *gdbarch); | |
1545 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PUSH_RETURN_ADDRESS_P) | |
1546 | #error "Non multi-arch definition of PUSH_RETURN_ADDRESS" | |
1547 | #endif | |
1548 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PUSH_RETURN_ADDRESS_P) | |
1549 | #define PUSH_RETURN_ADDRESS_P() (gdbarch_push_return_address_p (current_gdbarch)) | |
1550 | #endif | |
1551 | ||
1552 | /* Default (function) for non- multi-arch platforms. */ | |
1553 | #if (!GDB_MULTI_ARCH) && !defined (PUSH_RETURN_ADDRESS) | |
1554 | #define PUSH_RETURN_ADDRESS(pc, sp) (internal_error (__FILE__, __LINE__, "PUSH_RETURN_ADDRESS"), 0) | |
1555 | #endif | |
1556 | ||
104c1213 JM |
1557 | typedef CORE_ADDR (gdbarch_push_return_address_ftype) (CORE_ADDR pc, CORE_ADDR sp); |
1558 | extern CORE_ADDR gdbarch_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp); | |
1559 | extern void set_gdbarch_push_return_address (struct gdbarch *gdbarch, gdbarch_push_return_address_ftype *push_return_address); | |
83905903 AC |
1560 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PUSH_RETURN_ADDRESS) |
1561 | #error "Non multi-arch definition of PUSH_RETURN_ADDRESS" | |
1562 | #endif | |
0f71a2f6 | 1563 | #if GDB_MULTI_ARCH |
6166d547 | 1564 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PUSH_RETURN_ADDRESS) |
0f71a2f6 JM |
1565 | #define PUSH_RETURN_ADDRESS(pc, sp) (gdbarch_push_return_address (current_gdbarch, pc, sp)) |
1566 | #endif | |
1567 | #endif | |
1568 | ||
104c1213 JM |
1569 | typedef void (gdbarch_pop_frame_ftype) (void); |
1570 | extern void gdbarch_pop_frame (struct gdbarch *gdbarch); | |
1571 | extern void set_gdbarch_pop_frame (struct gdbarch *gdbarch, gdbarch_pop_frame_ftype *pop_frame); | |
83905903 AC |
1572 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (POP_FRAME) |
1573 | #error "Non multi-arch definition of POP_FRAME" | |
1574 | #endif | |
0f71a2f6 | 1575 | #if GDB_MULTI_ARCH |
6166d547 | 1576 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (POP_FRAME) |
0f71a2f6 JM |
1577 | #define POP_FRAME (gdbarch_pop_frame (current_gdbarch)) |
1578 | #endif | |
1579 | #endif | |
1580 | ||
104c1213 JM |
1581 | typedef void (gdbarch_store_struct_return_ftype) (CORE_ADDR addr, CORE_ADDR sp); |
1582 | extern void gdbarch_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp); | |
1583 | extern void set_gdbarch_store_struct_return (struct gdbarch *gdbarch, gdbarch_store_struct_return_ftype *store_struct_return); | |
83905903 AC |
1584 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STORE_STRUCT_RETURN) |
1585 | #error "Non multi-arch definition of STORE_STRUCT_RETURN" | |
1586 | #endif | |
0f71a2f6 | 1587 | #if GDB_MULTI_ARCH |
6166d547 | 1588 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (STORE_STRUCT_RETURN) |
0f71a2f6 JM |
1589 | #define STORE_STRUCT_RETURN(addr, sp) (gdbarch_store_struct_return (current_gdbarch, addr, sp)) |
1590 | #endif | |
1591 | #endif | |
1592 | ||
104c1213 JM |
1593 | typedef void (gdbarch_store_return_value_ftype) (struct type *type, char *valbuf); |
1594 | extern void gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf); | |
1595 | extern void set_gdbarch_store_return_value (struct gdbarch *gdbarch, gdbarch_store_return_value_ftype *store_return_value); | |
83905903 AC |
1596 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STORE_RETURN_VALUE) |
1597 | #error "Non multi-arch definition of STORE_RETURN_VALUE" | |
1598 | #endif | |
0f71a2f6 | 1599 | #if GDB_MULTI_ARCH |
6166d547 | 1600 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (STORE_RETURN_VALUE) |
0f71a2f6 JM |
1601 | #define STORE_RETURN_VALUE(type, valbuf) (gdbarch_store_return_value (current_gdbarch, type, valbuf)) |
1602 | #endif | |
1603 | #endif | |
1604 | ||
d6dd581e AC |
1605 | #if defined (EXTRACT_STRUCT_VALUE_ADDRESS) |
1606 | /* Legacy for systems yet to multi-arch EXTRACT_STRUCT_VALUE_ADDRESS */ | |
1607 | #if !defined (EXTRACT_STRUCT_VALUE_ADDRESS_P) | |
1608 | #define EXTRACT_STRUCT_VALUE_ADDRESS_P() (1) | |
1609 | #endif | |
1610 | #endif | |
1611 | ||
1612 | /* Default predicate for non- multi-arch targets. */ | |
1613 | #if (!GDB_MULTI_ARCH) && !defined (EXTRACT_STRUCT_VALUE_ADDRESS_P) | |
1614 | #define EXTRACT_STRUCT_VALUE_ADDRESS_P() (0) | |
1615 | #endif | |
1616 | ||
1617 | extern int gdbarch_extract_struct_value_address_p (struct gdbarch *gdbarch); | |
83905903 AC |
1618 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_STRUCT_VALUE_ADDRESS_P) |
1619 | #error "Non multi-arch definition of EXTRACT_STRUCT_VALUE_ADDRESS" | |
1620 | #endif | |
d6dd581e AC |
1621 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (EXTRACT_STRUCT_VALUE_ADDRESS_P) |
1622 | #define EXTRACT_STRUCT_VALUE_ADDRESS_P() (gdbarch_extract_struct_value_address_p (current_gdbarch)) | |
1623 | #endif | |
1624 | ||
1625 | /* Default (function) for non- multi-arch platforms. */ | |
1626 | #if (!GDB_MULTI_ARCH) && !defined (EXTRACT_STRUCT_VALUE_ADDRESS) | |
1627 | #define EXTRACT_STRUCT_VALUE_ADDRESS(regbuf) (internal_error (__FILE__, __LINE__, "EXTRACT_STRUCT_VALUE_ADDRESS"), 0) | |
1628 | #endif | |
1629 | ||
104c1213 JM |
1630 | typedef CORE_ADDR (gdbarch_extract_struct_value_address_ftype) (char *regbuf); |
1631 | extern CORE_ADDR gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf); | |
1632 | extern void set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, gdbarch_extract_struct_value_address_ftype *extract_struct_value_address); | |
83905903 AC |
1633 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_STRUCT_VALUE_ADDRESS) |
1634 | #error "Non multi-arch definition of EXTRACT_STRUCT_VALUE_ADDRESS" | |
1635 | #endif | |
0f71a2f6 | 1636 | #if GDB_MULTI_ARCH |
6166d547 | 1637 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (EXTRACT_STRUCT_VALUE_ADDRESS) |
0f71a2f6 JM |
1638 | #define EXTRACT_STRUCT_VALUE_ADDRESS(regbuf) (gdbarch_extract_struct_value_address (current_gdbarch, regbuf)) |
1639 | #endif | |
1640 | #endif | |
1641 | ||
56f12751 AC |
1642 | /* Default (function) for non- multi-arch platforms. */ |
1643 | #if (!GDB_MULTI_ARCH) && !defined (USE_STRUCT_CONVENTION) | |
1644 | #define USE_STRUCT_CONVENTION(gcc_p, value_type) (generic_use_struct_convention (gcc_p, value_type)) | |
1645 | #endif | |
1646 | ||
104c1213 JM |
1647 | typedef int (gdbarch_use_struct_convention_ftype) (int gcc_p, struct type *value_type); |
1648 | extern int gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type); | |
1649 | extern void set_gdbarch_use_struct_convention (struct gdbarch *gdbarch, gdbarch_use_struct_convention_ftype *use_struct_convention); | |
83905903 AC |
1650 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (USE_STRUCT_CONVENTION) |
1651 | #error "Non multi-arch definition of USE_STRUCT_CONVENTION" | |
1652 | #endif | |
0f71a2f6 | 1653 | #if GDB_MULTI_ARCH |
6166d547 | 1654 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (USE_STRUCT_CONVENTION) |
0f71a2f6 JM |
1655 | #define USE_STRUCT_CONVENTION(gcc_p, value_type) (gdbarch_use_struct_convention (current_gdbarch, gcc_p, value_type)) |
1656 | #endif | |
1657 | #endif | |
1658 | ||
104c1213 JM |
1659 | typedef void (gdbarch_frame_init_saved_regs_ftype) (struct frame_info *frame); |
1660 | extern void gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame); | |
1661 | extern void set_gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch, gdbarch_frame_init_saved_regs_ftype *frame_init_saved_regs); | |
83905903 AC |
1662 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_INIT_SAVED_REGS) |
1663 | #error "Non multi-arch definition of FRAME_INIT_SAVED_REGS" | |
1664 | #endif | |
0f71a2f6 | 1665 | #if GDB_MULTI_ARCH |
6166d547 | 1666 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_INIT_SAVED_REGS) |
0f71a2f6 JM |
1667 | #define FRAME_INIT_SAVED_REGS(frame) (gdbarch_frame_init_saved_regs (current_gdbarch, frame)) |
1668 | #endif | |
1669 | #endif | |
1670 | ||
5fdff426 AC |
1671 | #if defined (INIT_EXTRA_FRAME_INFO) |
1672 | /* Legacy for systems yet to multi-arch INIT_EXTRA_FRAME_INFO */ | |
1673 | #if !defined (INIT_EXTRA_FRAME_INFO_P) | |
1674 | #define INIT_EXTRA_FRAME_INFO_P() (1) | |
1675 | #endif | |
1676 | #endif | |
1677 | ||
1678 | /* Default predicate for non- multi-arch targets. */ | |
1679 | #if (!GDB_MULTI_ARCH) && !defined (INIT_EXTRA_FRAME_INFO_P) | |
1680 | #define INIT_EXTRA_FRAME_INFO_P() (0) | |
1681 | #endif | |
1682 | ||
1683 | extern int gdbarch_init_extra_frame_info_p (struct gdbarch *gdbarch); | |
1684 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INIT_EXTRA_FRAME_INFO_P) | |
1685 | #error "Non multi-arch definition of INIT_EXTRA_FRAME_INFO" | |
1686 | #endif | |
1687 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (INIT_EXTRA_FRAME_INFO_P) | |
1688 | #define INIT_EXTRA_FRAME_INFO_P() (gdbarch_init_extra_frame_info_p (current_gdbarch)) | |
1689 | #endif | |
1690 | ||
1691 | /* Default (function) for non- multi-arch platforms. */ | |
1692 | #if (!GDB_MULTI_ARCH) && !defined (INIT_EXTRA_FRAME_INFO) | |
1693 | #define INIT_EXTRA_FRAME_INFO(fromleaf, frame) (internal_error (__FILE__, __LINE__, "INIT_EXTRA_FRAME_INFO"), 0) | |
1694 | #endif | |
1695 | ||
104c1213 JM |
1696 | typedef void (gdbarch_init_extra_frame_info_ftype) (int fromleaf, struct frame_info *frame); |
1697 | extern void gdbarch_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame); | |
1698 | extern void set_gdbarch_init_extra_frame_info (struct gdbarch *gdbarch, gdbarch_init_extra_frame_info_ftype *init_extra_frame_info); | |
83905903 AC |
1699 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INIT_EXTRA_FRAME_INFO) |
1700 | #error "Non multi-arch definition of INIT_EXTRA_FRAME_INFO" | |
1701 | #endif | |
0f71a2f6 | 1702 | #if GDB_MULTI_ARCH |
6166d547 | 1703 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (INIT_EXTRA_FRAME_INFO) |
0f71a2f6 JM |
1704 | #define INIT_EXTRA_FRAME_INFO(fromleaf, frame) (gdbarch_init_extra_frame_info (current_gdbarch, fromleaf, frame)) |
1705 | #endif | |
1706 | #endif | |
1707 | ||
104c1213 JM |
1708 | typedef CORE_ADDR (gdbarch_skip_prologue_ftype) (CORE_ADDR ip); |
1709 | extern CORE_ADDR gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip); | |
1710 | extern void set_gdbarch_skip_prologue (struct gdbarch *gdbarch, gdbarch_skip_prologue_ftype *skip_prologue); | |
83905903 AC |
1711 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SKIP_PROLOGUE) |
1712 | #error "Non multi-arch definition of SKIP_PROLOGUE" | |
1713 | #endif | |
0f71a2f6 | 1714 | #if GDB_MULTI_ARCH |
6166d547 | 1715 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SKIP_PROLOGUE) |
0f71a2f6 JM |
1716 | #define SKIP_PROLOGUE(ip) (gdbarch_skip_prologue (current_gdbarch, ip)) |
1717 | #endif | |
1718 | #endif | |
1719 | ||
33489c5b | 1720 | /* Default (function) for non- multi-arch platforms. */ |
6166d547 | 1721 | #if (!GDB_MULTI_ARCH) && !defined (PROLOGUE_FRAMELESS_P) |
33489c5b AC |
1722 | #define PROLOGUE_FRAMELESS_P(ip) (generic_prologue_frameless_p (ip)) |
1723 | #endif | |
1724 | ||
dad41f9a AC |
1725 | typedef int (gdbarch_prologue_frameless_p_ftype) (CORE_ADDR ip); |
1726 | extern int gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, CORE_ADDR ip); | |
1727 | extern void set_gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, gdbarch_prologue_frameless_p_ftype *prologue_frameless_p); | |
83905903 AC |
1728 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PROLOGUE_FRAMELESS_P) |
1729 | #error "Non multi-arch definition of PROLOGUE_FRAMELESS_P" | |
1730 | #endif | |
33489c5b | 1731 | #if GDB_MULTI_ARCH |
6166d547 | 1732 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PROLOGUE_FRAMELESS_P) |
dad41f9a AC |
1733 | #define PROLOGUE_FRAMELESS_P(ip) (gdbarch_prologue_frameless_p (current_gdbarch, ip)) |
1734 | #endif | |
33489c5b | 1735 | #endif |
dad41f9a | 1736 | |
104c1213 JM |
1737 | typedef int (gdbarch_inner_than_ftype) (CORE_ADDR lhs, CORE_ADDR rhs); |
1738 | extern int gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs); | |
1739 | extern void set_gdbarch_inner_than (struct gdbarch *gdbarch, gdbarch_inner_than_ftype *inner_than); | |
83905903 AC |
1740 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INNER_THAN) |
1741 | #error "Non multi-arch definition of INNER_THAN" | |
1742 | #endif | |
0f71a2f6 | 1743 | #if GDB_MULTI_ARCH |
6166d547 | 1744 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (INNER_THAN) |
0f71a2f6 JM |
1745 | #define INNER_THAN(lhs, rhs) (gdbarch_inner_than (current_gdbarch, lhs, rhs)) |
1746 | #endif | |
1747 | #endif | |
1748 | ||
33489c5b | 1749 | /* Default (function) for non- multi-arch platforms. */ |
6166d547 | 1750 | #if (!GDB_MULTI_ARCH) && !defined (BREAKPOINT_FROM_PC) |
33489c5b AC |
1751 | #define BREAKPOINT_FROM_PC(pcptr, lenptr) (legacy_breakpoint_from_pc (pcptr, lenptr)) |
1752 | #endif | |
1753 | ||
f4f9705a AC |
1754 | typedef const unsigned char * (gdbarch_breakpoint_from_pc_ftype) (CORE_ADDR *pcptr, int *lenptr); |
1755 | extern const unsigned char * gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr); | |
104c1213 | 1756 | extern void set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc); |
83905903 AC |
1757 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (BREAKPOINT_FROM_PC) |
1758 | #error "Non multi-arch definition of BREAKPOINT_FROM_PC" | |
1759 | #endif | |
33489c5b | 1760 | #if GDB_MULTI_ARCH |
6166d547 | 1761 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (BREAKPOINT_FROM_PC) |
0f71a2f6 JM |
1762 | #define BREAKPOINT_FROM_PC(pcptr, lenptr) (gdbarch_breakpoint_from_pc (current_gdbarch, pcptr, lenptr)) |
1763 | #endif | |
33489c5b AC |
1764 | #endif |
1765 | ||
1766 | /* Default (function) for non- multi-arch platforms. */ | |
6166d547 | 1767 | #if (!GDB_MULTI_ARCH) && !defined (MEMORY_INSERT_BREAKPOINT) |
33489c5b AC |
1768 | #define MEMORY_INSERT_BREAKPOINT(addr, contents_cache) (default_memory_insert_breakpoint (addr, contents_cache)) |
1769 | #endif | |
0f71a2f6 | 1770 | |
917317f4 JM |
1771 | typedef int (gdbarch_memory_insert_breakpoint_ftype) (CORE_ADDR addr, char *contents_cache); |
1772 | extern int gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache); | |
1773 | extern void set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint); | |
83905903 AC |
1774 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (MEMORY_INSERT_BREAKPOINT) |
1775 | #error "Non multi-arch definition of MEMORY_INSERT_BREAKPOINT" | |
1776 | #endif | |
33489c5b | 1777 | #if GDB_MULTI_ARCH |
6166d547 | 1778 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (MEMORY_INSERT_BREAKPOINT) |
917317f4 JM |
1779 | #define MEMORY_INSERT_BREAKPOINT(addr, contents_cache) (gdbarch_memory_insert_breakpoint (current_gdbarch, addr, contents_cache)) |
1780 | #endif | |
33489c5b AC |
1781 | #endif |
1782 | ||
1783 | /* Default (function) for non- multi-arch platforms. */ | |
6166d547 | 1784 | #if (!GDB_MULTI_ARCH) && !defined (MEMORY_REMOVE_BREAKPOINT) |
33489c5b AC |
1785 | #define MEMORY_REMOVE_BREAKPOINT(addr, contents_cache) (default_memory_remove_breakpoint (addr, contents_cache)) |
1786 | #endif | |
917317f4 JM |
1787 | |
1788 | typedef int (gdbarch_memory_remove_breakpoint_ftype) (CORE_ADDR addr, char *contents_cache); | |
1789 | extern int gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache); | |
1790 | extern void set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint); | |
83905903 AC |
1791 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (MEMORY_REMOVE_BREAKPOINT) |
1792 | #error "Non multi-arch definition of MEMORY_REMOVE_BREAKPOINT" | |
1793 | #endif | |
33489c5b | 1794 | #if GDB_MULTI_ARCH |
6166d547 | 1795 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (MEMORY_REMOVE_BREAKPOINT) |
917317f4 JM |
1796 | #define MEMORY_REMOVE_BREAKPOINT(addr, contents_cache) (gdbarch_memory_remove_breakpoint (current_gdbarch, addr, contents_cache)) |
1797 | #endif | |
33489c5b | 1798 | #endif |
917317f4 | 1799 | |
104c1213 JM |
1800 | extern CORE_ADDR gdbarch_decr_pc_after_break (struct gdbarch *gdbarch); |
1801 | extern void set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch, CORE_ADDR decr_pc_after_break); | |
83905903 AC |
1802 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DECR_PC_AFTER_BREAK) |
1803 | #error "Non multi-arch definition of DECR_PC_AFTER_BREAK" | |
1804 | #endif | |
0f71a2f6 | 1805 | #if GDB_MULTI_ARCH |
6166d547 | 1806 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DECR_PC_AFTER_BREAK) |
0f71a2f6 JM |
1807 | #define DECR_PC_AFTER_BREAK (gdbarch_decr_pc_after_break (current_gdbarch)) |
1808 | #endif | |
1809 | #endif | |
1810 | ||
e02bc4cc DS |
1811 | /* Default (function) for non- multi-arch platforms. */ |
1812 | #if (!GDB_MULTI_ARCH) && !defined (PREPARE_TO_PROCEED) | |
1813 | #define PREPARE_TO_PROCEED(select_it) (default_prepare_to_proceed (select_it)) | |
1814 | #endif | |
1815 | ||
1816 | typedef int (gdbarch_prepare_to_proceed_ftype) (int select_it); | |
1817 | extern int gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, int select_it); | |
1818 | extern void set_gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, gdbarch_prepare_to_proceed_ftype *prepare_to_proceed); | |
83905903 AC |
1819 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PREPARE_TO_PROCEED) |
1820 | #error "Non multi-arch definition of PREPARE_TO_PROCEED" | |
1821 | #endif | |
e02bc4cc DS |
1822 | #if GDB_MULTI_ARCH |
1823 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PREPARE_TO_PROCEED) | |
1824 | #define PREPARE_TO_PROCEED(select_it) (gdbarch_prepare_to_proceed (current_gdbarch, select_it)) | |
1825 | #endif | |
1826 | #endif | |
1827 | ||
104c1213 JM |
1828 | extern CORE_ADDR gdbarch_function_start_offset (struct gdbarch *gdbarch); |
1829 | extern void set_gdbarch_function_start_offset (struct gdbarch *gdbarch, CORE_ADDR function_start_offset); | |
83905903 AC |
1830 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FUNCTION_START_OFFSET) |
1831 | #error "Non multi-arch definition of FUNCTION_START_OFFSET" | |
1832 | #endif | |
0f71a2f6 | 1833 | #if GDB_MULTI_ARCH |
6166d547 | 1834 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FUNCTION_START_OFFSET) |
0f71a2f6 JM |
1835 | #define FUNCTION_START_OFFSET (gdbarch_function_start_offset (current_gdbarch)) |
1836 | #endif | |
1837 | #endif | |
1838 | ||
33489c5b | 1839 | /* Default (function) for non- multi-arch platforms. */ |
6166d547 | 1840 | #if (!GDB_MULTI_ARCH) && !defined (REMOTE_TRANSLATE_XFER_ADDRESS) |
33489c5b AC |
1841 | #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)) |
1842 | #endif | |
1843 | ||
104c1213 JM |
1844 | typedef void (gdbarch_remote_translate_xfer_address_ftype) (CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len); |
1845 | extern void gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len); | |
1846 | extern void set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address); | |
83905903 AC |
1847 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REMOTE_TRANSLATE_XFER_ADDRESS) |
1848 | #error "Non multi-arch definition of REMOTE_TRANSLATE_XFER_ADDRESS" | |
1849 | #endif | |
33489c5b | 1850 | #if GDB_MULTI_ARCH |
6166d547 | 1851 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REMOTE_TRANSLATE_XFER_ADDRESS) |
0f71a2f6 JM |
1852 | #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)) |
1853 | #endif | |
33489c5b | 1854 | #endif |
0f71a2f6 | 1855 | |
104c1213 JM |
1856 | extern CORE_ADDR gdbarch_frame_args_skip (struct gdbarch *gdbarch); |
1857 | extern void set_gdbarch_frame_args_skip (struct gdbarch *gdbarch, CORE_ADDR frame_args_skip); | |
83905903 AC |
1858 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_ARGS_SKIP) |
1859 | #error "Non multi-arch definition of FRAME_ARGS_SKIP" | |
1860 | #endif | |
0f71a2f6 | 1861 | #if GDB_MULTI_ARCH |
6166d547 | 1862 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_ARGS_SKIP) |
0f71a2f6 JM |
1863 | #define FRAME_ARGS_SKIP (gdbarch_frame_args_skip (current_gdbarch)) |
1864 | #endif | |
1865 | #endif | |
1866 | ||
33489c5b | 1867 | /* Default (function) for non- multi-arch platforms. */ |
6166d547 | 1868 | #if (!GDB_MULTI_ARCH) && !defined (FRAMELESS_FUNCTION_INVOCATION) |
33489c5b AC |
1869 | #define FRAMELESS_FUNCTION_INVOCATION(fi) (generic_frameless_function_invocation_not (fi)) |
1870 | #endif | |
1871 | ||
104c1213 JM |
1872 | typedef int (gdbarch_frameless_function_invocation_ftype) (struct frame_info *fi); |
1873 | extern int gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi); | |
1874 | extern void set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, gdbarch_frameless_function_invocation_ftype *frameless_function_invocation); | |
83905903 AC |
1875 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAMELESS_FUNCTION_INVOCATION) |
1876 | #error "Non multi-arch definition of FRAMELESS_FUNCTION_INVOCATION" | |
1877 | #endif | |
33489c5b | 1878 | #if GDB_MULTI_ARCH |
6166d547 | 1879 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAMELESS_FUNCTION_INVOCATION) |
0f71a2f6 JM |
1880 | #define FRAMELESS_FUNCTION_INVOCATION(fi) (gdbarch_frameless_function_invocation (current_gdbarch, fi)) |
1881 | #endif | |
33489c5b | 1882 | #endif |
0f71a2f6 | 1883 | |
104c1213 JM |
1884 | typedef CORE_ADDR (gdbarch_frame_chain_ftype) (struct frame_info *frame); |
1885 | extern CORE_ADDR gdbarch_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame); | |
1886 | extern void set_gdbarch_frame_chain (struct gdbarch *gdbarch, gdbarch_frame_chain_ftype *frame_chain); | |
83905903 AC |
1887 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_CHAIN) |
1888 | #error "Non multi-arch definition of FRAME_CHAIN" | |
1889 | #endif | |
0f71a2f6 | 1890 | #if GDB_MULTI_ARCH |
6166d547 | 1891 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_CHAIN) |
0f71a2f6 JM |
1892 | #define FRAME_CHAIN(frame) (gdbarch_frame_chain (current_gdbarch, frame)) |
1893 | #endif | |
1894 | #endif | |
1895 | ||
7f55af32 AC |
1896 | /* Define a default FRAME_CHAIN_VALID, in the form that is suitable for |
1897 | most targets. If FRAME_CHAIN_VALID returns zero it means that the | |
1898 | given frame is the outermost one and has no caller. | |
1899 | ||
1900 | XXXX - both default and alternate frame_chain_valid functions are | |
1901 | deprecated. New code should use dummy frames and one of the generic | |
1902 | functions. */ | |
1903 | ||
1904 | /* Default (function) for non- multi-arch platforms. */ | |
1905 | #if (!GDB_MULTI_ARCH) && !defined (FRAME_CHAIN_VALID) | |
1906 | #define FRAME_CHAIN_VALID(chain, thisframe) (func_frame_chain_valid (chain, thisframe)) | |
1907 | #endif | |
028c194b | 1908 | |
104c1213 JM |
1909 | typedef int (gdbarch_frame_chain_valid_ftype) (CORE_ADDR chain, struct frame_info *thisframe); |
1910 | extern int gdbarch_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe); | |
1911 | extern void set_gdbarch_frame_chain_valid (struct gdbarch *gdbarch, gdbarch_frame_chain_valid_ftype *frame_chain_valid); | |
7f55af32 | 1912 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_CHAIN_VALID) |
83905903 AC |
1913 | #error "Non multi-arch definition of FRAME_CHAIN_VALID" |
1914 | #endif | |
0f71a2f6 | 1915 | #if GDB_MULTI_ARCH |
7f55af32 | 1916 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_CHAIN_VALID) |
0f71a2f6 JM |
1917 | #define FRAME_CHAIN_VALID(chain, thisframe) (gdbarch_frame_chain_valid (current_gdbarch, chain, thisframe)) |
1918 | #endif | |
1919 | #endif | |
1920 | ||
104c1213 JM |
1921 | typedef CORE_ADDR (gdbarch_frame_saved_pc_ftype) (struct frame_info *fi); |
1922 | extern CORE_ADDR gdbarch_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi); | |
1923 | extern void set_gdbarch_frame_saved_pc (struct gdbarch *gdbarch, gdbarch_frame_saved_pc_ftype *frame_saved_pc); | |
83905903 AC |
1924 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_SAVED_PC) |
1925 | #error "Non multi-arch definition of FRAME_SAVED_PC" | |
1926 | #endif | |
0f71a2f6 | 1927 | #if GDB_MULTI_ARCH |
6166d547 | 1928 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_SAVED_PC) |
0f71a2f6 JM |
1929 | #define FRAME_SAVED_PC(fi) (gdbarch_frame_saved_pc (current_gdbarch, fi)) |
1930 | #endif | |
1931 | #endif | |
1932 | ||
104c1213 JM |
1933 | typedef CORE_ADDR (gdbarch_frame_args_address_ftype) (struct frame_info *fi); |
1934 | extern CORE_ADDR gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi); | |
1935 | extern void set_gdbarch_frame_args_address (struct gdbarch *gdbarch, gdbarch_frame_args_address_ftype *frame_args_address); | |
83905903 AC |
1936 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_ARGS_ADDRESS) |
1937 | #error "Non multi-arch definition of FRAME_ARGS_ADDRESS" | |
1938 | #endif | |
0f71a2f6 | 1939 | #if GDB_MULTI_ARCH |
6166d547 | 1940 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_ARGS_ADDRESS) |
0f71a2f6 JM |
1941 | #define FRAME_ARGS_ADDRESS(fi) (gdbarch_frame_args_address (current_gdbarch, fi)) |
1942 | #endif | |
1943 | #endif | |
1944 | ||
104c1213 JM |
1945 | typedef CORE_ADDR (gdbarch_frame_locals_address_ftype) (struct frame_info *fi); |
1946 | extern CORE_ADDR gdbarch_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi); | |
1947 | extern void set_gdbarch_frame_locals_address (struct gdbarch *gdbarch, gdbarch_frame_locals_address_ftype *frame_locals_address); | |
83905903 AC |
1948 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_LOCALS_ADDRESS) |
1949 | #error "Non multi-arch definition of FRAME_LOCALS_ADDRESS" | |
1950 | #endif | |
0f71a2f6 | 1951 | #if GDB_MULTI_ARCH |
6166d547 | 1952 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_LOCALS_ADDRESS) |
0f71a2f6 JM |
1953 | #define FRAME_LOCALS_ADDRESS(fi) (gdbarch_frame_locals_address (current_gdbarch, fi)) |
1954 | #endif | |
1955 | #endif | |
1956 | ||
104c1213 JM |
1957 | typedef CORE_ADDR (gdbarch_saved_pc_after_call_ftype) (struct frame_info *frame); |
1958 | extern CORE_ADDR gdbarch_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame); | |
1959 | extern void set_gdbarch_saved_pc_after_call (struct gdbarch *gdbarch, gdbarch_saved_pc_after_call_ftype *saved_pc_after_call); | |
83905903 AC |
1960 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SAVED_PC_AFTER_CALL) |
1961 | #error "Non multi-arch definition of SAVED_PC_AFTER_CALL" | |
1962 | #endif | |
0f71a2f6 | 1963 | #if GDB_MULTI_ARCH |
6166d547 | 1964 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SAVED_PC_AFTER_CALL) |
0f71a2f6 JM |
1965 | #define SAVED_PC_AFTER_CALL(frame) (gdbarch_saved_pc_after_call (current_gdbarch, frame)) |
1966 | #endif | |
1967 | #endif | |
1968 | ||
104c1213 JM |
1969 | typedef int (gdbarch_frame_num_args_ftype) (struct frame_info *frame); |
1970 | extern int gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame); | |
1971 | extern void set_gdbarch_frame_num_args (struct gdbarch *gdbarch, gdbarch_frame_num_args_ftype *frame_num_args); | |
83905903 AC |
1972 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_NUM_ARGS) |
1973 | #error "Non multi-arch definition of FRAME_NUM_ARGS" | |
1974 | #endif | |
0f71a2f6 | 1975 | #if GDB_MULTI_ARCH |
6166d547 | 1976 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_NUM_ARGS) |
0f71a2f6 JM |
1977 | #define FRAME_NUM_ARGS(frame) (gdbarch_frame_num_args (current_gdbarch, frame)) |
1978 | #endif | |
1979 | #endif | |
1980 | ||
2ada493a AC |
1981 | #if defined (STACK_ALIGN) |
1982 | /* Legacy for systems yet to multi-arch STACK_ALIGN */ | |
eee30e78 | 1983 | #if !defined (STACK_ALIGN_P) |
2ada493a AC |
1984 | #define STACK_ALIGN_P() (1) |
1985 | #endif | |
eee30e78 | 1986 | #endif |
2ada493a | 1987 | |
33489c5b | 1988 | /* Default predicate for non- multi-arch targets. */ |
6166d547 | 1989 | #if (!GDB_MULTI_ARCH) && !defined (STACK_ALIGN_P) |
33489c5b AC |
1990 | #define STACK_ALIGN_P() (0) |
1991 | #endif | |
1992 | ||
2ada493a | 1993 | extern int gdbarch_stack_align_p (struct gdbarch *gdbarch); |
83905903 AC |
1994 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STACK_ALIGN_P) |
1995 | #error "Non multi-arch definition of STACK_ALIGN" | |
1996 | #endif | |
6166d547 | 1997 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (STACK_ALIGN_P) |
2ada493a AC |
1998 | #define STACK_ALIGN_P() (gdbarch_stack_align_p (current_gdbarch)) |
1999 | #endif | |
2000 | ||
33489c5b | 2001 | /* Default (function) for non- multi-arch platforms. */ |
6166d547 | 2002 | #if (!GDB_MULTI_ARCH) && !defined (STACK_ALIGN) |
8e65ff28 | 2003 | #define STACK_ALIGN(sp) (internal_error (__FILE__, __LINE__, "STACK_ALIGN"), 0) |
33489c5b AC |
2004 | #endif |
2005 | ||
2ada493a AC |
2006 | typedef CORE_ADDR (gdbarch_stack_align_ftype) (CORE_ADDR sp); |
2007 | extern CORE_ADDR gdbarch_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp); | |
2008 | extern void set_gdbarch_stack_align (struct gdbarch *gdbarch, gdbarch_stack_align_ftype *stack_align); | |
83905903 AC |
2009 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STACK_ALIGN) |
2010 | #error "Non multi-arch definition of STACK_ALIGN" | |
2011 | #endif | |
33489c5b | 2012 | #if GDB_MULTI_ARCH |
6166d547 | 2013 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (STACK_ALIGN) |
2ada493a AC |
2014 | #define STACK_ALIGN(sp) (gdbarch_stack_align (current_gdbarch, sp)) |
2015 | #endif | |
33489c5b | 2016 | #endif |
2ada493a | 2017 | |
0a49d05e AC |
2018 | /* Default (value) for non- multi-arch platforms. */ |
2019 | #if (!GDB_MULTI_ARCH) && !defined (EXTRA_STACK_ALIGNMENT_NEEDED) | |
2020 | #define EXTRA_STACK_ALIGNMENT_NEEDED (1) | |
2021 | #endif | |
2022 | ||
2023 | extern int gdbarch_extra_stack_alignment_needed (struct gdbarch *gdbarch); | |
2024 | extern void set_gdbarch_extra_stack_alignment_needed (struct gdbarch *gdbarch, int extra_stack_alignment_needed); | |
83905903 AC |
2025 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRA_STACK_ALIGNMENT_NEEDED) |
2026 | #error "Non multi-arch definition of EXTRA_STACK_ALIGNMENT_NEEDED" | |
2027 | #endif | |
0a49d05e AC |
2028 | #if GDB_MULTI_ARCH |
2029 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (EXTRA_STACK_ALIGNMENT_NEEDED) | |
2030 | #define EXTRA_STACK_ALIGNMENT_NEEDED (gdbarch_extra_stack_alignment_needed (current_gdbarch)) | |
2031 | #endif | |
2032 | #endif | |
2033 | ||
d03e67c9 AC |
2034 | #if defined (REG_STRUCT_HAS_ADDR) |
2035 | /* Legacy for systems yet to multi-arch REG_STRUCT_HAS_ADDR */ | |
eee30e78 | 2036 | #if !defined (REG_STRUCT_HAS_ADDR_P) |
d03e67c9 AC |
2037 | #define REG_STRUCT_HAS_ADDR_P() (1) |
2038 | #endif | |
eee30e78 | 2039 | #endif |
d03e67c9 | 2040 | |
33489c5b | 2041 | /* Default predicate for non- multi-arch targets. */ |
6166d547 | 2042 | #if (!GDB_MULTI_ARCH) && !defined (REG_STRUCT_HAS_ADDR_P) |
33489c5b AC |
2043 | #define REG_STRUCT_HAS_ADDR_P() (0) |
2044 | #endif | |
2045 | ||
d03e67c9 | 2046 | extern int gdbarch_reg_struct_has_addr_p (struct gdbarch *gdbarch); |
83905903 AC |
2047 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REG_STRUCT_HAS_ADDR_P) |
2048 | #error "Non multi-arch definition of REG_STRUCT_HAS_ADDR" | |
2049 | #endif | |
6166d547 | 2050 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REG_STRUCT_HAS_ADDR_P) |
d03e67c9 AC |
2051 | #define REG_STRUCT_HAS_ADDR_P() (gdbarch_reg_struct_has_addr_p (current_gdbarch)) |
2052 | #endif | |
2053 | ||
33489c5b | 2054 | /* Default (function) for non- multi-arch platforms. */ |
6166d547 | 2055 | #if (!GDB_MULTI_ARCH) && !defined (REG_STRUCT_HAS_ADDR) |
8e65ff28 | 2056 | #define REG_STRUCT_HAS_ADDR(gcc_p, type) (internal_error (__FILE__, __LINE__, "REG_STRUCT_HAS_ADDR"), 0) |
33489c5b AC |
2057 | #endif |
2058 | ||
d03e67c9 AC |
2059 | typedef int (gdbarch_reg_struct_has_addr_ftype) (int gcc_p, struct type *type); |
2060 | extern int gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type); | |
2061 | extern void set_gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, gdbarch_reg_struct_has_addr_ftype *reg_struct_has_addr); | |
83905903 AC |
2062 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REG_STRUCT_HAS_ADDR) |
2063 | #error "Non multi-arch definition of REG_STRUCT_HAS_ADDR" | |
2064 | #endif | |
33489c5b | 2065 | #if GDB_MULTI_ARCH |
6166d547 | 2066 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REG_STRUCT_HAS_ADDR) |
d03e67c9 AC |
2067 | #define REG_STRUCT_HAS_ADDR(gcc_p, type) (gdbarch_reg_struct_has_addr (current_gdbarch, gcc_p, type)) |
2068 | #endif | |
33489c5b | 2069 | #endif |
d03e67c9 | 2070 | |
d1e3cf49 AC |
2071 | #if defined (SAVE_DUMMY_FRAME_TOS) |
2072 | /* Legacy for systems yet to multi-arch SAVE_DUMMY_FRAME_TOS */ | |
eee30e78 | 2073 | #if !defined (SAVE_DUMMY_FRAME_TOS_P) |
d1e3cf49 AC |
2074 | #define SAVE_DUMMY_FRAME_TOS_P() (1) |
2075 | #endif | |
eee30e78 | 2076 | #endif |
d1e3cf49 AC |
2077 | |
2078 | /* Default predicate for non- multi-arch targets. */ | |
6166d547 | 2079 | #if (!GDB_MULTI_ARCH) && !defined (SAVE_DUMMY_FRAME_TOS_P) |
d1e3cf49 AC |
2080 | #define SAVE_DUMMY_FRAME_TOS_P() (0) |
2081 | #endif | |
2082 | ||
2083 | extern int gdbarch_save_dummy_frame_tos_p (struct gdbarch *gdbarch); | |
83905903 AC |
2084 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SAVE_DUMMY_FRAME_TOS_P) |
2085 | #error "Non multi-arch definition of SAVE_DUMMY_FRAME_TOS" | |
2086 | #endif | |
6166d547 | 2087 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SAVE_DUMMY_FRAME_TOS_P) |
d1e3cf49 AC |
2088 | #define SAVE_DUMMY_FRAME_TOS_P() (gdbarch_save_dummy_frame_tos_p (current_gdbarch)) |
2089 | #endif | |
2090 | ||
2091 | /* Default (function) for non- multi-arch platforms. */ | |
6166d547 | 2092 | #if (!GDB_MULTI_ARCH) && !defined (SAVE_DUMMY_FRAME_TOS) |
8e65ff28 | 2093 | #define SAVE_DUMMY_FRAME_TOS(sp) (internal_error (__FILE__, __LINE__, "SAVE_DUMMY_FRAME_TOS"), 0) |
d1e3cf49 AC |
2094 | #endif |
2095 | ||
2096 | typedef void (gdbarch_save_dummy_frame_tos_ftype) (CORE_ADDR sp); | |
2097 | extern void gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp); | |
2098 | extern void set_gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, gdbarch_save_dummy_frame_tos_ftype *save_dummy_frame_tos); | |
83905903 AC |
2099 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SAVE_DUMMY_FRAME_TOS) |
2100 | #error "Non multi-arch definition of SAVE_DUMMY_FRAME_TOS" | |
2101 | #endif | |
d1e3cf49 | 2102 | #if GDB_MULTI_ARCH |
6166d547 | 2103 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SAVE_DUMMY_FRAME_TOS) |
d1e3cf49 AC |
2104 | #define SAVE_DUMMY_FRAME_TOS(sp) (gdbarch_save_dummy_frame_tos (current_gdbarch, sp)) |
2105 | #endif | |
2106 | #endif | |
2107 | ||
58d5518e ND |
2108 | extern int gdbarch_parm_boundary (struct gdbarch *gdbarch); |
2109 | extern void set_gdbarch_parm_boundary (struct gdbarch *gdbarch, int parm_boundary); | |
83905903 AC |
2110 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PARM_BOUNDARY) |
2111 | #error "Non multi-arch definition of PARM_BOUNDARY" | |
2112 | #endif | |
58d5518e ND |
2113 | #if GDB_MULTI_ARCH |
2114 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PARM_BOUNDARY) | |
2115 | #define PARM_BOUNDARY (gdbarch_parm_boundary (current_gdbarch)) | |
2116 | #endif | |
2117 | #endif | |
2118 | ||
f0d4cc9e | 2119 | /* Default (value) for non- multi-arch platforms. */ |
6166d547 | 2120 | #if (!GDB_MULTI_ARCH) && !defined (TARGET_FLOAT_FORMAT) |
f0d4cc9e AC |
2121 | #define TARGET_FLOAT_FORMAT (default_float_format (current_gdbarch)) |
2122 | #endif | |
2123 | ||
2124 | extern const struct floatformat * gdbarch_float_format (struct gdbarch *gdbarch); | |
2125 | extern void set_gdbarch_float_format (struct gdbarch *gdbarch, const struct floatformat * float_format); | |
83905903 AC |
2126 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_FLOAT_FORMAT) |
2127 | #error "Non multi-arch definition of TARGET_FLOAT_FORMAT" | |
2128 | #endif | |
f0d4cc9e | 2129 | #if GDB_MULTI_ARCH |
6166d547 | 2130 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_FLOAT_FORMAT) |
f0d4cc9e AC |
2131 | #define TARGET_FLOAT_FORMAT (gdbarch_float_format (current_gdbarch)) |
2132 | #endif | |
2133 | #endif | |
2134 | ||
2135 | /* Default (value) for non- multi-arch platforms. */ | |
6166d547 | 2136 | #if (!GDB_MULTI_ARCH) && !defined (TARGET_DOUBLE_FORMAT) |
f0d4cc9e AC |
2137 | #define TARGET_DOUBLE_FORMAT (default_double_format (current_gdbarch)) |
2138 | #endif | |
2139 | ||
2140 | extern const struct floatformat * gdbarch_double_format (struct gdbarch *gdbarch); | |
2141 | extern void set_gdbarch_double_format (struct gdbarch *gdbarch, const struct floatformat * double_format); | |
83905903 AC |
2142 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_DOUBLE_FORMAT) |
2143 | #error "Non multi-arch definition of TARGET_DOUBLE_FORMAT" | |
2144 | #endif | |
f0d4cc9e | 2145 | #if GDB_MULTI_ARCH |
6166d547 | 2146 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_DOUBLE_FORMAT) |
f0d4cc9e AC |
2147 | #define TARGET_DOUBLE_FORMAT (gdbarch_double_format (current_gdbarch)) |
2148 | #endif | |
2149 | #endif | |
2150 | ||
2151 | /* Default (value) for non- multi-arch platforms. */ | |
6166d547 | 2152 | #if (!GDB_MULTI_ARCH) && !defined (TARGET_LONG_DOUBLE_FORMAT) |
2fa5c1e0 | 2153 | #define TARGET_LONG_DOUBLE_FORMAT (default_double_format (current_gdbarch)) |
f0d4cc9e AC |
2154 | #endif |
2155 | ||
2156 | extern const struct floatformat * gdbarch_long_double_format (struct gdbarch *gdbarch); | |
2157 | extern void set_gdbarch_long_double_format (struct gdbarch *gdbarch, const struct floatformat * long_double_format); | |
83905903 AC |
2158 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_DOUBLE_FORMAT) |
2159 | #error "Non multi-arch definition of TARGET_LONG_DOUBLE_FORMAT" | |
2160 | #endif | |
f0d4cc9e | 2161 | #if GDB_MULTI_ARCH |
6166d547 | 2162 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_LONG_DOUBLE_FORMAT) |
f0d4cc9e AC |
2163 | #define TARGET_LONG_DOUBLE_FORMAT (gdbarch_long_double_format (current_gdbarch)) |
2164 | #endif | |
2165 | #endif | |
2166 | ||
f517ea4e PS |
2167 | /* Default (function) for non- multi-arch platforms. */ |
2168 | #if (!GDB_MULTI_ARCH) && !defined (CONVERT_FROM_FUNC_PTR_ADDR) | |
875e1767 | 2169 | #define CONVERT_FROM_FUNC_PTR_ADDR(addr) (core_addr_identity (addr)) |
f517ea4e PS |
2170 | #endif |
2171 | ||
2172 | typedef CORE_ADDR (gdbarch_convert_from_func_ptr_addr_ftype) (CORE_ADDR addr); | |
2173 | extern CORE_ADDR gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr); | |
2174 | 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 |
2175 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CONVERT_FROM_FUNC_PTR_ADDR) |
2176 | #error "Non multi-arch definition of CONVERT_FROM_FUNC_PTR_ADDR" | |
2177 | #endif | |
f517ea4e PS |
2178 | #if GDB_MULTI_ARCH |
2179 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CONVERT_FROM_FUNC_PTR_ADDR) | |
2180 | #define CONVERT_FROM_FUNC_PTR_ADDR(addr) (gdbarch_convert_from_func_ptr_addr (current_gdbarch, addr)) | |
2181 | #endif | |
2182 | #endif | |
2183 | ||
875e1767 AC |
2184 | /* On some machines there are bits in addresses which are not really |
2185 | part of the address, but are used by the kernel, the hardware, etc. | |
2186 | for special purposes. ADDR_BITS_REMOVE takes out any such bits so | |
2187 | we get a "real" address such as one would find in a symbol table. | |
2188 | This is used only for addresses of instructions, and even then I'm | |
2189 | not sure it's used in all contexts. It exists to deal with there | |
2190 | being a few stray bits in the PC which would mislead us, not as some | |
2191 | sort of generic thing to handle alignment or segmentation (it's | |
2192 | possible it should be in TARGET_READ_PC instead). */ | |
2193 | ||
2194 | /* Default (function) for non- multi-arch platforms. */ | |
2195 | #if (!GDB_MULTI_ARCH) && !defined (ADDR_BITS_REMOVE) | |
2196 | #define ADDR_BITS_REMOVE(addr) (core_addr_identity (addr)) | |
2197 | #endif | |
2198 | ||
2199 | typedef CORE_ADDR (gdbarch_addr_bits_remove_ftype) (CORE_ADDR addr); | |
2200 | extern CORE_ADDR gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr); | |
2201 | extern void set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch, gdbarch_addr_bits_remove_ftype *addr_bits_remove); | |
83905903 AC |
2202 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDR_BITS_REMOVE) |
2203 | #error "Non multi-arch definition of ADDR_BITS_REMOVE" | |
2204 | #endif | |
875e1767 AC |
2205 | #if GDB_MULTI_ARCH |
2206 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ADDR_BITS_REMOVE) | |
2207 | #define ADDR_BITS_REMOVE(addr) (gdbarch_addr_bits_remove (current_gdbarch, addr)) | |
2208 | #endif | |
2209 | #endif | |
2210 | ||
181c1381 RE |
2211 | /* It is not at all clear why SMASH_TEXT_ADDRESS is not folded into |
2212 | ADDR_BITS_REMOVE. */ | |
2213 | ||
2214 | /* Default (function) for non- multi-arch platforms. */ | |
2215 | #if (!GDB_MULTI_ARCH) && !defined (SMASH_TEXT_ADDRESS) | |
2216 | #define SMASH_TEXT_ADDRESS(addr) (core_addr_identity (addr)) | |
2217 | #endif | |
2218 | ||
2219 | typedef CORE_ADDR (gdbarch_smash_text_address_ftype) (CORE_ADDR addr); | |
2220 | extern CORE_ADDR gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr); | |
2221 | extern void set_gdbarch_smash_text_address (struct gdbarch *gdbarch, gdbarch_smash_text_address_ftype *smash_text_address); | |
2222 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SMASH_TEXT_ADDRESS) | |
2223 | #error "Non multi-arch definition of SMASH_TEXT_ADDRESS" | |
2224 | #endif | |
2225 | #if GDB_MULTI_ARCH | |
2226 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SMASH_TEXT_ADDRESS) | |
2227 | #define SMASH_TEXT_ADDRESS(addr) (gdbarch_smash_text_address (current_gdbarch, addr)) | |
2228 | #endif | |
2229 | #endif | |
2230 | ||
64c4637f AC |
2231 | /* FIXME/cagney/2001-01-18: This should be split in two. A target method that indicates if |
2232 | the target needs software single step. An ISA method to implement it. | |
2233 | ||
2234 | FIXME/cagney/2001-01-18: This should be replaced with something that inserts breakpoints | |
2235 | using the breakpoint system instead of blatting memory directly (as with rs6000). | |
2236 | ||
2237 | FIXME/cagney/2001-01-18: The logic is backwards. It should be asking if the target can | |
2238 | single step. If not, then implement single step using breakpoints. */ | |
2239 | ||
2240 | #if defined (SOFTWARE_SINGLE_STEP) | |
2241 | /* Legacy for systems yet to multi-arch SOFTWARE_SINGLE_STEP */ | |
2242 | #if !defined (SOFTWARE_SINGLE_STEP_P) | |
2243 | #define SOFTWARE_SINGLE_STEP_P() (1) | |
2244 | #endif | |
2245 | #endif | |
2246 | ||
2247 | /* Default predicate for non- multi-arch targets. */ | |
2248 | #if (!GDB_MULTI_ARCH) && !defined (SOFTWARE_SINGLE_STEP_P) | |
2249 | #define SOFTWARE_SINGLE_STEP_P() (0) | |
2250 | #endif | |
2251 | ||
2252 | extern int gdbarch_software_single_step_p (struct gdbarch *gdbarch); | |
83905903 AC |
2253 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SOFTWARE_SINGLE_STEP_P) |
2254 | #error "Non multi-arch definition of SOFTWARE_SINGLE_STEP" | |
2255 | #endif | |
64c4637f AC |
2256 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SOFTWARE_SINGLE_STEP_P) |
2257 | #define SOFTWARE_SINGLE_STEP_P() (gdbarch_software_single_step_p (current_gdbarch)) | |
2258 | #endif | |
2259 | ||
2260 | /* Default (function) for non- multi-arch platforms. */ | |
2261 | #if (!GDB_MULTI_ARCH) && !defined (SOFTWARE_SINGLE_STEP) | |
2262 | #define SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p) (internal_error (__FILE__, __LINE__, "SOFTWARE_SINGLE_STEP"), 0) | |
2263 | #endif | |
2264 | ||
2265 | typedef void (gdbarch_software_single_step_ftype) (enum target_signal sig, int insert_breakpoints_p); | |
2266 | extern void gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p); | |
2267 | extern void set_gdbarch_software_single_step (struct gdbarch *gdbarch, gdbarch_software_single_step_ftype *software_single_step); | |
83905903 AC |
2268 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SOFTWARE_SINGLE_STEP) |
2269 | #error "Non multi-arch definition of SOFTWARE_SINGLE_STEP" | |
2270 | #endif | |
64c4637f AC |
2271 | #if GDB_MULTI_ARCH |
2272 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SOFTWARE_SINGLE_STEP) | |
2273 | #define SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p) (gdbarch_software_single_step (current_gdbarch, sig, insert_breakpoints_p)) | |
2274 | #endif | |
2275 | #endif | |
2276 | ||
2bf0cb65 EZ |
2277 | /* Default (function) for non- multi-arch platforms. */ |
2278 | #if (!GDB_MULTI_ARCH) && !defined (TARGET_PRINT_INSN) | |
2279 | #define TARGET_PRINT_INSN(vma, info) (legacy_print_insn (vma, info)) | |
2280 | #endif | |
2281 | ||
2282 | typedef int (gdbarch_print_insn_ftype) (bfd_vma vma, disassemble_info *info); | |
2283 | extern int gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, disassemble_info *info); | |
2284 | extern void set_gdbarch_print_insn (struct gdbarch *gdbarch, gdbarch_print_insn_ftype *print_insn); | |
2285 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_PRINT_INSN) | |
2286 | #error "Non multi-arch definition of TARGET_PRINT_INSN" | |
2287 | #endif | |
2288 | #if GDB_MULTI_ARCH | |
2289 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_PRINT_INSN) | |
2290 | #define TARGET_PRINT_INSN(vma, info) (gdbarch_print_insn (current_gdbarch, vma, info)) | |
2291 | #endif | |
2292 | #endif | |
2293 | ||
bdcd319a CV |
2294 | /* Default (function) for non- multi-arch platforms. */ |
2295 | #if (!GDB_MULTI_ARCH) && !defined (SKIP_TRAMPOLINE_CODE) | |
2296 | #define SKIP_TRAMPOLINE_CODE(pc) (generic_skip_trampoline_code (pc)) | |
2297 | #endif | |
2298 | ||
2299 | typedef CORE_ADDR (gdbarch_skip_trampoline_code_ftype) (CORE_ADDR pc); | |
2300 | extern CORE_ADDR gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc); | |
2301 | extern void set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, gdbarch_skip_trampoline_code_ftype *skip_trampoline_code); | |
2302 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SKIP_TRAMPOLINE_CODE) | |
2303 | #error "Non multi-arch definition of SKIP_TRAMPOLINE_CODE" | |
2304 | #endif | |
2305 | #if GDB_MULTI_ARCH | |
2306 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SKIP_TRAMPOLINE_CODE) | |
2307 | #define SKIP_TRAMPOLINE_CODE(pc) (gdbarch_skip_trampoline_code (current_gdbarch, pc)) | |
2308 | #endif | |
2309 | #endif | |
2310 | ||
68e9cc94 CV |
2311 | /* For SVR4 shared libraries, each call goes through a small piece of |
2312 | trampoline code in the ".plt" section. IN_SOLIB_CALL_TRAMPOLINE evaluates | |
2313 | to nonzero if we are current stopped in one of these. */ | |
2314 | ||
2315 | /* Default (function) for non- multi-arch platforms. */ | |
2316 | #if (!GDB_MULTI_ARCH) && !defined (IN_SOLIB_CALL_TRAMPOLINE) | |
2317 | #define IN_SOLIB_CALL_TRAMPOLINE(pc, name) (generic_in_solib_call_trampoline (pc, name)) | |
2318 | #endif | |
2319 | ||
2320 | typedef int (gdbarch_in_solib_call_trampoline_ftype) (CORE_ADDR pc, char *name); | |
2321 | extern int gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name); | |
2322 | extern void set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline); | |
2323 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (IN_SOLIB_CALL_TRAMPOLINE) | |
2324 | #error "Non multi-arch definition of IN_SOLIB_CALL_TRAMPOLINE" | |
2325 | #endif | |
2326 | #if GDB_MULTI_ARCH | |
2327 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (IN_SOLIB_CALL_TRAMPOLINE) | |
2328 | #define IN_SOLIB_CALL_TRAMPOLINE(pc, name) (gdbarch_in_solib_call_trampoline (current_gdbarch, pc, name)) | |
2329 | #endif | |
2330 | #endif | |
2331 | ||
d7bd68ca AC |
2332 | /* Sigtramp is a routine that the kernel calls (which then calls the |
2333 | signal handler). On most machines it is a library routine that is | |
2334 | linked into the executable. | |
2335 | ||
2336 | This macro, given a program counter value and the name of the | |
2337 | function in which that PC resides (which can be null if the name is | |
2338 | not known), returns nonzero if the PC and name show that we are in | |
2339 | sigtramp. | |
2340 | ||
2341 | On most machines just see if the name is sigtramp (and if we have | |
2342 | no name, assume we are not in sigtramp). | |
2343 | ||
2344 | FIXME: cagney/2002-04-21: The function find_pc_partial_function | |
2345 | calls find_pc_sect_partial_function() which calls PC_IN_SIGTRAMP. | |
2346 | This means PC_IN_SIGTRAMP function can't be implemented by doing its | |
2347 | own local NAME lookup. | |
2348 | ||
2349 | FIXME: cagney/2002-04-21: PC_IN_SIGTRAMP is something of a mess. | |
2350 | Some code also depends on SIGTRAMP_START and SIGTRAMP_END but other | |
2351 | does not. */ | |
2352 | ||
2353 | /* Default (function) for non- multi-arch platforms. */ | |
2354 | #if (!GDB_MULTI_ARCH) && !defined (PC_IN_SIGTRAMP) | |
2355 | #define PC_IN_SIGTRAMP(pc, name) (legacy_pc_in_sigtramp (pc, name)) | |
2356 | #endif | |
2357 | ||
2358 | typedef int (gdbarch_pc_in_sigtramp_ftype) (CORE_ADDR pc, char *name); | |
2359 | extern int gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc, char *name); | |
2360 | extern void set_gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, gdbarch_pc_in_sigtramp_ftype *pc_in_sigtramp); | |
2361 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PC_IN_SIGTRAMP) | |
2362 | #error "Non multi-arch definition of PC_IN_SIGTRAMP" | |
2363 | #endif | |
2364 | #if GDB_MULTI_ARCH | |
2365 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PC_IN_SIGTRAMP) | |
2366 | #define PC_IN_SIGTRAMP(pc, name) (gdbarch_pc_in_sigtramp (current_gdbarch, pc, name)) | |
2367 | #endif | |
2368 | #endif | |
2369 | ||
c12260ac CV |
2370 | /* A target might have problems with watchpoints as soon as the stack |
2371 | frame of the current function has been destroyed. This mostly happens | |
2372 | as the first action in a funtion's epilogue. in_function_epilogue_p() | |
2373 | is defined to return a non-zero value if either the given addr is one | |
2374 | instruction after the stack destroying instruction up to the trailing | |
2375 | return instruction or if we can figure out that the stack frame has | |
2376 | already been invalidated regardless of the value of addr. Targets | |
2377 | which don't suffer from that problem could just let this functionality | |
2378 | untouched. */ | |
2379 | ||
2380 | typedef int (gdbarch_in_function_epilogue_p_ftype) (struct gdbarch *gdbarch, CORE_ADDR addr); | |
2381 | extern int gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr); | |
2382 | extern void set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p); | |
2383 | ||
552c04a7 TT |
2384 | /* Given a vector of command-line arguments, return a newly allocated |
2385 | string which, when passed to the create_inferior function, will be | |
2386 | parsed (on Unix systems, by the shell) to yield the same vector. | |
2387 | This function should call error() if the argument vector is not | |
2388 | representable for this target or if this target does not support | |
2389 | command-line arguments. | |
2390 | ARGC is the number of elements in the vector. | |
2391 | ARGV is an array of strings, one per argument. */ | |
2392 | ||
2393 | typedef char * (gdbarch_construct_inferior_arguments_ftype) (struct gdbarch *gdbarch, int argc, char **argv); | |
2394 | extern char * gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv); | |
2395 | extern void set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments); | |
2396 | ||
b6af0555 JS |
2397 | #if defined (DWARF2_BUILD_FRAME_INFO) |
2398 | /* Legacy for systems yet to multi-arch DWARF2_BUILD_FRAME_INFO */ | |
2399 | #if !defined (DWARF2_BUILD_FRAME_INFO_P) | |
2400 | #define DWARF2_BUILD_FRAME_INFO_P() (1) | |
2401 | #endif | |
2402 | #endif | |
2403 | ||
2404 | /* Default predicate for non- multi-arch targets. */ | |
2405 | #if (!GDB_MULTI_ARCH) && !defined (DWARF2_BUILD_FRAME_INFO_P) | |
2406 | #define DWARF2_BUILD_FRAME_INFO_P() (0) | |
2407 | #endif | |
2408 | ||
2409 | extern int gdbarch_dwarf2_build_frame_info_p (struct gdbarch *gdbarch); | |
2410 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF2_BUILD_FRAME_INFO_P) | |
2411 | #error "Non multi-arch definition of DWARF2_BUILD_FRAME_INFO" | |
2412 | #endif | |
2413 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DWARF2_BUILD_FRAME_INFO_P) | |
2414 | #define DWARF2_BUILD_FRAME_INFO_P() (gdbarch_dwarf2_build_frame_info_p (current_gdbarch)) | |
2415 | #endif | |
2416 | ||
2417 | /* Default (function) for non- multi-arch platforms. */ | |
2418 | #if (!GDB_MULTI_ARCH) && !defined (DWARF2_BUILD_FRAME_INFO) | |
2419 | #define DWARF2_BUILD_FRAME_INFO(objfile) (internal_error (__FILE__, __LINE__, "DWARF2_BUILD_FRAME_INFO"), 0) | |
2420 | #endif | |
2421 | ||
2422 | typedef void (gdbarch_dwarf2_build_frame_info_ftype) (struct objfile *objfile); | |
2423 | extern void gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch, struct objfile *objfile); | |
2424 | extern void set_gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch, gdbarch_dwarf2_build_frame_info_ftype *dwarf2_build_frame_info); | |
2425 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF2_BUILD_FRAME_INFO) | |
2426 | #error "Non multi-arch definition of DWARF2_BUILD_FRAME_INFO" | |
2427 | #endif | |
2428 | #if GDB_MULTI_ARCH | |
2429 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DWARF2_BUILD_FRAME_INFO) | |
2430 | #define DWARF2_BUILD_FRAME_INFO(objfile) (gdbarch_dwarf2_build_frame_info (current_gdbarch, objfile)) | |
2431 | #endif | |
2432 | #endif | |
2433 | ||
a2cf933a EZ |
2434 | /* Default (function) for non- multi-arch platforms. */ |
2435 | #if (!GDB_MULTI_ARCH) && !defined (ELF_MAKE_MSYMBOL_SPECIAL) | |
2436 | #define ELF_MAKE_MSYMBOL_SPECIAL(sym, msym) (default_elf_make_msymbol_special (sym, msym)) | |
2437 | #endif | |
2438 | ||
2439 | typedef void (gdbarch_elf_make_msymbol_special_ftype) (asymbol *sym, struct minimal_symbol *msym); | |
2440 | extern void gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym); | |
2441 | extern void set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special); | |
2442 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ELF_MAKE_MSYMBOL_SPECIAL) | |
2443 | #error "Non multi-arch definition of ELF_MAKE_MSYMBOL_SPECIAL" | |
2444 | #endif | |
2445 | #if GDB_MULTI_ARCH | |
2446 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ELF_MAKE_MSYMBOL_SPECIAL) | |
2447 | #define ELF_MAKE_MSYMBOL_SPECIAL(sym, msym) (gdbarch_elf_make_msymbol_special (current_gdbarch, sym, msym)) | |
2448 | #endif | |
2449 | #endif | |
2450 | ||
2451 | /* Default (function) for non- multi-arch platforms. */ | |
2452 | #if (!GDB_MULTI_ARCH) && !defined (COFF_MAKE_MSYMBOL_SPECIAL) | |
2453 | #define COFF_MAKE_MSYMBOL_SPECIAL(val, msym) (default_coff_make_msymbol_special (val, msym)) | |
2454 | #endif | |
2455 | ||
2456 | typedef void (gdbarch_coff_make_msymbol_special_ftype) (int val, struct minimal_symbol *msym); | |
2457 | extern void gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym); | |
2458 | extern void set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special); | |
2459 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (COFF_MAKE_MSYMBOL_SPECIAL) | |
2460 | #error "Non multi-arch definition of COFF_MAKE_MSYMBOL_SPECIAL" | |
2461 | #endif | |
2462 | #if GDB_MULTI_ARCH | |
2463 | #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (COFF_MAKE_MSYMBOL_SPECIAL) | |
2464 | #define COFF_MAKE_MSYMBOL_SPECIAL(val, msym) (gdbarch_coff_make_msymbol_special (current_gdbarch, val, msym)) | |
2465 | #endif | |
2466 | #endif | |
2467 | ||
104c1213 | 2468 | extern struct gdbarch_tdep *gdbarch_tdep (struct gdbarch *gdbarch); |
0f71a2f6 JM |
2469 | |
2470 | ||
2471 | /* Mechanism for co-ordinating the selection of a specific | |
2472 | architecture. | |
2473 | ||
2474 | GDB targets (*-tdep.c) can register an interest in a specific | |
2475 | architecture. Other GDB components can register a need to maintain | |
2476 | per-architecture data. | |
2477 | ||
2478 | The mechanisms below ensures that there is only a loose connection | |
2479 | between the set-architecture command and the various GDB | |
99e7bb18 | 2480 | components. Each component can independently register their need |
0f71a2f6 JM |
2481 | to maintain architecture specific data with gdbarch. |
2482 | ||
2483 | Pragmatics: | |
2484 | ||
2485 | Previously, a single TARGET_ARCHITECTURE_HOOK was provided. It | |
2486 | didn't scale. | |
2487 | ||
2488 | The more traditional mega-struct containing architecture specific | |
2489 | data for all the various GDB components was also considered. Since | |
99e7bb18 | 2490 | GDB is built from a variable number of (fairly independent) |
0f71a2f6 JM |
2491 | components it was determined that the global aproach was not |
2492 | applicable. */ | |
2493 | ||
2494 | ||
2495 | /* Register a new architectural family with GDB. | |
2496 | ||
2497 | Register support for the specified ARCHITECTURE with GDB. When | |
2498 | gdbarch determines that the specified architecture has been | |
2499 | selected, the corresponding INIT function is called. | |
2500 | ||
2501 | -- | |
2502 | ||
2503 | The INIT function takes two parameters: INFO which contains the | |
2504 | information available to gdbarch about the (possibly new) | |
2505 | architecture; ARCHES which is a list of the previously created | |
2506 | ``struct gdbarch'' for this architecture. | |
2507 | ||
0f79675b AC |
2508 | The INFO parameter is, as far as possible, be pre-initialized with |
2509 | information obtained from INFO.ABFD or the previously selected | |
2510 | architecture. | |
2511 | ||
2512 | The ARCHES parameter is a linked list (sorted most recently used) | |
2513 | of all the previously created architures for this architecture | |
2514 | family. The (possibly NULL) ARCHES->gdbarch can used to access | |
2515 | values from the previously selected architecture for this | |
2516 | architecture family. The global ``current_gdbarch'' shall not be | |
2517 | used. | |
0f71a2f6 JM |
2518 | |
2519 | The INIT function shall return any of: NULL - indicating that it | |
ec3d358c | 2520 | doesn't recognize the selected architecture; an existing ``struct |
0f71a2f6 JM |
2521 | gdbarch'' from the ARCHES list - indicating that the new |
2522 | architecture is just a synonym for an earlier architecture (see | |
2523 | gdbarch_list_lookup_by_info()); a newly created ``struct gdbarch'' | |
4b9b3959 AC |
2524 | - that describes the selected architecture (see gdbarch_alloc()). |
2525 | ||
2526 | The DUMP_TDEP function shall print out all target specific values. | |
2527 | Care should be taken to ensure that the function works in both the | |
2528 | multi-arch and non- multi-arch cases. */ | |
0f71a2f6 | 2529 | |
adf40b2e JM |
2530 | struct gdbarch_list |
2531 | { | |
2532 | struct gdbarch *gdbarch; | |
2533 | struct gdbarch_list *next; | |
2534 | }; | |
0f71a2f6 | 2535 | |
adf40b2e JM |
2536 | struct gdbarch_info |
2537 | { | |
adf40b2e JM |
2538 | /* Use default: NULL (ZERO). */ |
2539 | const struct bfd_arch_info *bfd_arch_info; | |
0f71a2f6 | 2540 | |
428721aa | 2541 | /* Use default: BFD_ENDIAN_UNKNOWN (NB: is not ZERO). */ |
adf40b2e | 2542 | int byte_order; |
0f71a2f6 | 2543 | |
adf40b2e JM |
2544 | /* Use default: NULL (ZERO). */ |
2545 | bfd *abfd; | |
0f71a2f6 | 2546 | |
adf40b2e JM |
2547 | /* Use default: NULL (ZERO). */ |
2548 | struct gdbarch_tdep_info *tdep_info; | |
2549 | }; | |
0f71a2f6 | 2550 | |
104c1213 | 2551 | typedef struct gdbarch *(gdbarch_init_ftype) (struct gdbarch_info info, struct gdbarch_list *arches); |
4b9b3959 | 2552 | typedef void (gdbarch_dump_tdep_ftype) (struct gdbarch *gdbarch, struct ui_file *file); |
0f71a2f6 | 2553 | |
4b9b3959 | 2554 | /* DEPRECATED - use gdbarch_register() */ |
104c1213 | 2555 | extern void register_gdbarch_init (enum bfd_architecture architecture, gdbarch_init_ftype *); |
0f71a2f6 | 2556 | |
4b9b3959 AC |
2557 | extern void gdbarch_register (enum bfd_architecture architecture, |
2558 | gdbarch_init_ftype *, | |
2559 | gdbarch_dump_tdep_ftype *); | |
2560 | ||
0f71a2f6 | 2561 | |
b4a20239 AC |
2562 | /* Return a freshly allocated, NULL terminated, array of the valid |
2563 | architecture names. Since architectures are registered during the | |
2564 | _initialize phase this function only returns useful information | |
2565 | once initialization has been completed. */ | |
2566 | ||
2567 | extern const char **gdbarch_printable_names (void); | |
2568 | ||
2569 | ||
0f71a2f6 JM |
2570 | /* Helper function. Search the list of ARCHES for a GDBARCH that |
2571 | matches the information provided by INFO. */ | |
2572 | ||
104c1213 | 2573 | extern struct gdbarch_list *gdbarch_list_lookup_by_info (struct gdbarch_list *arches, const struct gdbarch_info *info); |
0f71a2f6 JM |
2574 | |
2575 | ||
2576 | /* Helper function. Create a preliminary ``struct gdbarch''. Perform | |
2577 | basic initialization using values obtained from the INFO andTDEP | |
2578 | parameters. set_gdbarch_*() functions are called to complete the | |
2579 | initialization of the object. */ | |
2580 | ||
104c1213 | 2581 | extern struct gdbarch *gdbarch_alloc (const struct gdbarch_info *info, struct gdbarch_tdep *tdep); |
0f71a2f6 JM |
2582 | |
2583 | ||
4b9b3959 AC |
2584 | /* Helper function. Free a partially-constructed ``struct gdbarch''. |
2585 | It is assumed that the caller freeds the ``struct | |
2586 | gdbarch_tdep''. */ | |
2587 | ||
058f20d5 JB |
2588 | extern void gdbarch_free (struct gdbarch *); |
2589 | ||
2590 | ||
b732d07d | 2591 | /* Helper function. Force an update of the current architecture. |
0f71a2f6 | 2592 | |
b732d07d AC |
2593 | The actual architecture selected is determined by INFO, ``(gdb) set |
2594 | architecture'' et.al., the existing architecture and BFD's default | |
2595 | architecture. INFO should be initialized to zero and then selected | |
2596 | fields should be updated. | |
0f71a2f6 | 2597 | |
16f33e29 AC |
2598 | Returns non-zero if the update succeeds */ |
2599 | ||
2600 | extern int gdbarch_update_p (struct gdbarch_info info); | |
0f71a2f6 JM |
2601 | |
2602 | ||
2603 | ||
2604 | /* Register per-architecture data-pointer. | |
2605 | ||
2606 | Reserve space for a per-architecture data-pointer. An identifier | |
2607 | for the reserved data-pointer is returned. That identifer should | |
95160752 | 2608 | be saved in a local static variable. |
0f71a2f6 | 2609 | |
95160752 AC |
2610 | The per-architecture data-pointer can be initialized in one of two |
2611 | ways: The value can be set explicitly using a call to | |
2612 | set_gdbarch_data(); the value can be set implicitly using the value | |
2613 | returned by a non-NULL INIT() callback. INIT(), when non-NULL is | |
2614 | called after the basic architecture vector has been created. | |
0f71a2f6 | 2615 | |
95160752 AC |
2616 | When a previously created architecture is re-selected, the |
2617 | per-architecture data-pointer for that previous architecture is | |
2618 | restored. INIT() is not called. | |
2619 | ||
2620 | During initialization, multiple assignments of the data-pointer are | |
2621 | allowed, non-NULL values are deleted by calling FREE(). If the | |
2622 | architecture is deleted using gdbarch_free() all non-NULL data | |
2623 | pointers are also deleted using FREE(). | |
0f71a2f6 JM |
2624 | |
2625 | Multiple registrarants for any architecture are allowed (and | |
2626 | strongly encouraged). */ | |
2627 | ||
95160752 | 2628 | struct gdbarch_data; |
0f71a2f6 | 2629 | |
95160752 AC |
2630 | typedef void *(gdbarch_data_init_ftype) (struct gdbarch *gdbarch); |
2631 | typedef void (gdbarch_data_free_ftype) (struct gdbarch *gdbarch, | |
2632 | void *pointer); | |
2633 | extern struct gdbarch_data *register_gdbarch_data (gdbarch_data_init_ftype *init, | |
2634 | gdbarch_data_free_ftype *free); | |
2635 | extern void set_gdbarch_data (struct gdbarch *gdbarch, | |
2636 | struct gdbarch_data *data, | |
2637 | void *pointer); | |
0f71a2f6 | 2638 | |
451fbdda | 2639 | extern void *gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *); |
0f71a2f6 JM |
2640 | |
2641 | ||
0f71a2f6 JM |
2642 | /* Register per-architecture memory region. |
2643 | ||
2644 | Provide a memory-region swap mechanism. Per-architecture memory | |
2645 | region are created. These memory regions are swapped whenever the | |
2646 | architecture is changed. For a new architecture, the memory region | |
2647 | is initialized with zero (0) and the INIT function is called. | |
2648 | ||
2649 | Memory regions are swapped / initialized in the order that they are | |
2650 | registered. NULL DATA and/or INIT values can be specified. | |
2651 | ||
2652 | New code should use register_gdbarch_data(). */ | |
2653 | ||
104c1213 JM |
2654 | typedef void (gdbarch_swap_ftype) (void); |
2655 | extern void register_gdbarch_swap (void *data, unsigned long size, gdbarch_swap_ftype *init); | |
e514a9d6 | 2656 | #define REGISTER_GDBARCH_SWAP(VAR) register_gdbarch_swap (&(VAR), sizeof ((VAR)), NULL) |
0f71a2f6 JM |
2657 | |
2658 | ||
2659 | ||
99e7bb18 | 2660 | /* The target-system-dependent byte order is dynamic */ |
c906108c | 2661 | |
adf40b2e | 2662 | extern int target_byte_order; |
c906108c SS |
2663 | #ifndef TARGET_BYTE_ORDER |
2664 | #define TARGET_BYTE_ORDER (target_byte_order + 0) | |
2665 | #endif | |
2666 | ||
adf40b2e | 2667 | extern int target_byte_order_auto; |
c906108c SS |
2668 | #ifndef TARGET_BYTE_ORDER_AUTO |
2669 | #define TARGET_BYTE_ORDER_AUTO (target_byte_order_auto + 0) | |
2670 | #endif | |
2671 | ||
2672 | ||
2673 | ||
99e7bb18 | 2674 | /* The target-system-dependent BFD architecture is dynamic */ |
c906108c | 2675 | |
adf40b2e | 2676 | extern int target_architecture_auto; |
c906108c SS |
2677 | #ifndef TARGET_ARCHITECTURE_AUTO |
2678 | #define TARGET_ARCHITECTURE_AUTO (target_architecture_auto + 0) | |
2679 | #endif | |
2680 | ||
adf40b2e | 2681 | extern const struct bfd_arch_info *target_architecture; |
c906108c SS |
2682 | #ifndef TARGET_ARCHITECTURE |
2683 | #define TARGET_ARCHITECTURE (target_architecture + 0) | |
2684 | #endif | |
2685 | ||
c906108c | 2686 | |
99e7bb18 | 2687 | /* The target-system-dependent disassembler is semi-dynamic */ |
c906108c | 2688 | |
104c1213 | 2689 | extern int dis_asm_read_memory (bfd_vma memaddr, bfd_byte *myaddr, |
ff844c8d | 2690 | unsigned int len, disassemble_info *info); |
c906108c | 2691 | |
104c1213 JM |
2692 | extern void dis_asm_memory_error (int status, bfd_vma memaddr, |
2693 | disassemble_info *info); | |
c906108c | 2694 | |
104c1213 JM |
2695 | extern void dis_asm_print_address (bfd_vma addr, |
2696 | disassemble_info *info); | |
c906108c | 2697 | |
104c1213 | 2698 | extern int (*tm_print_insn) (bfd_vma, disassemble_info*); |
adf40b2e | 2699 | extern disassemble_info tm_print_insn_info; |
c906108c SS |
2700 | #ifndef TARGET_PRINT_INSN_INFO |
2701 | #define TARGET_PRINT_INSN_INFO (&tm_print_insn_info) | |
2702 | #endif | |
2703 | ||
2704 | ||
2705 | ||
99e7bb18 | 2706 | /* Set the dynamic target-system-dependent parameters (architecture, |
c906108c SS |
2707 | byte-order, ...) using information found in the BFD */ |
2708 | ||
104c1213 | 2709 | extern void set_gdbarch_from_file (bfd *); |
c906108c SS |
2710 | |
2711 | ||
e514a9d6 JM |
2712 | /* Initialize the current architecture to the "first" one we find on |
2713 | our list. */ | |
2714 | ||
2715 | extern void initialize_current_architecture (void); | |
2716 | ||
ceaa8edf JB |
2717 | /* For non-multiarched targets, do any initialization of the default |
2718 | gdbarch object necessary after the _initialize_MODULE functions | |
2719 | have run. */ | |
2720 | extern void initialize_non_multiarch (); | |
cce74817 | 2721 | |
c906108c | 2722 | /* gdbarch trace variable */ |
adf40b2e | 2723 | extern int gdbarch_debug; |
c906108c | 2724 | |
4b9b3959 | 2725 | extern void gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file); |
0f71a2f6 | 2726 | |
c906108c | 2727 | #endif |