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 | |
96baa820 JM |
6 | This file is part of GDB. |
7 | ||
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 | |
96baa820 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 | |
96baa820 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. */ | |
adf40b2e | 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. */ | |
c906108c | 34 | |
c906108c SS |
35 | |
36 | #include "defs.h" | |
1ad03bde | 37 | #include "arch-utils.h" |
c906108c | 38 | |
0f71a2f6 JM |
39 | #if GDB_MULTI_ARCH |
40 | #include "gdbcmd.h" | |
adf40b2e | 41 | #include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */ |
0f71a2f6 | 42 | #else |
7a292a7a SS |
43 | /* Just include everything in sight so that the every old definition |
44 | of macro is visible. */ | |
45 | #include "gdb_string.h" | |
46 | #include <ctype.h> | |
47 | #include "symtab.h" | |
48 | #include "frame.h" | |
49 | #include "inferior.h" | |
50 | #include "breakpoint.h" | |
03f2053f | 51 | #include "gdb_wait.h" |
7a292a7a SS |
52 | #include "gdbcore.h" |
53 | #include "gdbcmd.h" | |
54 | #include "target.h" | |
55 | #include "gdbthread.h" | |
56 | #include "annotate.h" | |
57 | #include "symfile.h" /* for overlay functions */ | |
fd0407d6 | 58 | #include "value.h" /* For old tm.h/nm.h macros. */ |
0f71a2f6 | 59 | #endif |
7a292a7a | 60 | #include "symcat.h" |
c906108c | 61 | |
f0d4cc9e | 62 | #include "floatformat.h" |
c906108c | 63 | |
95160752 | 64 | #include "gdb_assert.h" |
b66d6d2e | 65 | #include "gdb_string.h" |
67c2c32c | 66 | #include "gdb-events.h" |
95160752 | 67 | |
104c1213 JM |
68 | /* Static function declarations */ |
69 | ||
70 | static void verify_gdbarch (struct gdbarch *gdbarch); | |
b3cc3077 | 71 | static void alloc_gdbarch_data (struct gdbarch *); |
95160752 | 72 | static void free_gdbarch_data (struct gdbarch *); |
104c1213 | 73 | static void init_gdbarch_swap (struct gdbarch *); |
40af4b0c | 74 | static void clear_gdbarch_swap (struct gdbarch *); |
104c1213 JM |
75 | static void swapout_gdbarch_swap (struct gdbarch *); |
76 | static void swapin_gdbarch_swap (struct gdbarch *); | |
77 | ||
0f71a2f6 JM |
78 | /* Non-zero if we want to trace architecture code. */ |
79 | ||
80 | #ifndef GDBARCH_DEBUG | |
81 | #define GDBARCH_DEBUG 0 | |
82 | #endif | |
83 | int gdbarch_debug = GDBARCH_DEBUG; | |
84 | ||
85 | ||
86 | /* Maintain the struct gdbarch object */ | |
87 | ||
88 | struct gdbarch | |
adf40b2e | 89 | { |
76860b5f AC |
90 | /* Has this architecture been fully initialized? */ |
91 | int initialized_p; | |
adf40b2e JM |
92 | /* basic architectural information */ |
93 | const struct bfd_arch_info * bfd_arch_info; | |
94 | int byte_order; | |
0f71a2f6 | 95 | |
adf40b2e JM |
96 | /* target specific vector. */ |
97 | struct gdbarch_tdep *tdep; | |
4b9b3959 | 98 | gdbarch_dump_tdep_ftype *dump_tdep; |
0f71a2f6 | 99 | |
adf40b2e | 100 | /* per-architecture data-pointers */ |
95160752 | 101 | unsigned nr_data; |
adf40b2e | 102 | void **data; |
0f71a2f6 | 103 | |
adf40b2e JM |
104 | /* per-architecture swap-regions */ |
105 | struct gdbarch_swap *swap; | |
0f71a2f6 | 106 | |
adf40b2e | 107 | /* Multi-arch values. |
0f71a2f6 | 108 | |
adf40b2e | 109 | When extending this structure you must: |
0f71a2f6 | 110 | |
adf40b2e | 111 | Add the field below. |
0f71a2f6 | 112 | |
adf40b2e JM |
113 | Declare set/get functions and define the corresponding |
114 | macro in gdbarch.h. | |
0f71a2f6 | 115 | |
adf40b2e JM |
116 | gdbarch_alloc(): If zero/NULL is not a suitable default, |
117 | initialize the new field. | |
0f71a2f6 | 118 | |
adf40b2e JM |
119 | verify_gdbarch(): Confirm that the target updated the field |
120 | correctly. | |
0f71a2f6 | 121 | |
7e73cedf | 122 | gdbarch_dump(): Add a fprintf_unfiltered call so that the new |
adf40b2e | 123 | field is dumped out |
0f71a2f6 | 124 | |
c0e8c252 | 125 | ``startup_gdbarch()'': Append an initial value to the static |
adf40b2e | 126 | variable (base values on the host's c-type system). |
0f71a2f6 | 127 | |
adf40b2e JM |
128 | get_gdbarch(): Implement the set/get functions (probably using |
129 | the macro's as shortcuts). | |
0f71a2f6 JM |
130 | |
131 | */ | |
132 | ||
adf40b2e JM |
133 | int short_bit; |
134 | int int_bit; | |
135 | int long_bit; | |
136 | int long_long_bit; | |
137 | int float_bit; | |
138 | int double_bit; | |
139 | int long_double_bit; | |
66b43ecb | 140 | int ptr_bit; |
52204a0b | 141 | int addr_bit; |
66b43ecb | 142 | int bfd_vma_bit; |
4e409299 | 143 | int char_signed; |
adf40b2e JM |
144 | gdbarch_read_pc_ftype *read_pc; |
145 | gdbarch_write_pc_ftype *write_pc; | |
146 | gdbarch_read_fp_ftype *read_fp; | |
adf40b2e JM |
147 | gdbarch_read_sp_ftype *read_sp; |
148 | gdbarch_write_sp_ftype *write_sp; | |
39d4ef09 | 149 | gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer; |
d8124050 AC |
150 | gdbarch_pseudo_register_read_ftype *pseudo_register_read; |
151 | gdbarch_pseudo_register_write_ftype *pseudo_register_write; | |
adf40b2e | 152 | int num_regs; |
0aba1244 | 153 | int num_pseudo_regs; |
adf40b2e JM |
154 | int sp_regnum; |
155 | int fp_regnum; | |
156 | int pc_regnum; | |
c2169756 | 157 | int ps_regnum; |
60054393 | 158 | int fp0_regnum; |
03863182 | 159 | int npc_regnum; |
88c72b7d AC |
160 | gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum; |
161 | gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum; | |
162 | gdbarch_dwarf_reg_to_regnum_ftype *dwarf_reg_to_regnum; | |
163 | gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum; | |
164 | gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum; | |
adf40b2e JM |
165 | gdbarch_register_name_ftype *register_name; |
166 | int register_size; | |
167 | int register_bytes; | |
168 | gdbarch_register_byte_ftype *register_byte; | |
169 | gdbarch_register_raw_size_ftype *register_raw_size; | |
170 | int max_register_raw_size; | |
171 | gdbarch_register_virtual_size_ftype *register_virtual_size; | |
172 | int max_register_virtual_size; | |
173 | gdbarch_register_virtual_type_ftype *register_virtual_type; | |
666e11c5 | 174 | gdbarch_do_registers_info_ftype *do_registers_info; |
0ab7a791 | 175 | gdbarch_print_registers_info_ftype *print_registers_info; |
5e74b15c | 176 | gdbarch_print_float_info_ftype *print_float_info; |
e76f1f2e | 177 | gdbarch_print_vector_info_ftype *print_vector_info; |
7c7651b2 | 178 | gdbarch_register_sim_regno_ftype *register_sim_regno; |
2649061d | 179 | gdbarch_register_bytes_ok_ftype *register_bytes_ok; |
01fb7433 AC |
180 | gdbarch_cannot_fetch_register_ftype *cannot_fetch_register; |
181 | gdbarch_cannot_store_register_ftype *cannot_store_register; | |
9df628e0 | 182 | gdbarch_get_longjmp_target_ftype *get_longjmp_target; |
adf40b2e JM |
183 | int use_generic_dummy_frames; |
184 | int call_dummy_location; | |
185 | gdbarch_call_dummy_address_ftype *call_dummy_address; | |
186 | CORE_ADDR call_dummy_start_offset; | |
187 | CORE_ADDR call_dummy_breakpoint_offset; | |
188 | int call_dummy_breakpoint_offset_p; | |
189 | int call_dummy_length; | |
190 | gdbarch_pc_in_call_dummy_ftype *pc_in_call_dummy; | |
191 | int call_dummy_p; | |
192 | LONGEST * call_dummy_words; | |
193 | int sizeof_call_dummy_words; | |
194 | int call_dummy_stack_adjust_p; | |
195 | int call_dummy_stack_adjust; | |
196 | gdbarch_fix_call_dummy_ftype *fix_call_dummy; | |
10312cc4 AC |
197 | gdbarch_init_frame_pc_first_ftype *init_frame_pc_first; |
198 | gdbarch_init_frame_pc_ftype *init_frame_pc; | |
adf40b2e JM |
199 | int believe_pcc_promotion; |
200 | int believe_pcc_promotion_type; | |
b9a8e3bf | 201 | gdbarch_coerce_float_to_double_ftype *coerce_float_to_double; |
adf40b2e JM |
202 | gdbarch_get_saved_register_ftype *get_saved_register; |
203 | gdbarch_register_convertible_ftype *register_convertible; | |
204 | gdbarch_register_convert_to_virtual_ftype *register_convert_to_virtual; | |
205 | gdbarch_register_convert_to_raw_ftype *register_convert_to_raw; | |
13d01224 AC |
206 | gdbarch_convert_register_p_ftype *convert_register_p; |
207 | gdbarch_register_to_value_ftype *register_to_value; | |
208 | gdbarch_value_to_register_ftype *value_to_register; | |
4478b372 JB |
209 | gdbarch_pointer_to_address_ftype *pointer_to_address; |
210 | gdbarch_address_to_pointer_ftype *address_to_pointer; | |
fc0c74b1 | 211 | gdbarch_integer_to_address_ftype *integer_to_address; |
71a9f22e | 212 | gdbarch_return_value_on_stack_ftype *return_value_on_stack; |
adf40b2e JM |
213 | gdbarch_push_arguments_ftype *push_arguments; |
214 | gdbarch_push_dummy_frame_ftype *push_dummy_frame; | |
215 | gdbarch_push_return_address_ftype *push_return_address; | |
216 | gdbarch_pop_frame_ftype *pop_frame; | |
adf40b2e | 217 | gdbarch_store_struct_return_ftype *store_struct_return; |
ebba8386 | 218 | gdbarch_extract_return_value_ftype *extract_return_value; |
adf40b2e | 219 | gdbarch_store_return_value_ftype *store_return_value; |
ebba8386 AC |
220 | gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value; |
221 | gdbarch_deprecated_store_return_value_ftype *deprecated_store_return_value; | |
049ee0e4 | 222 | gdbarch_extract_struct_value_address_ftype *extract_struct_value_address; |
26e9b323 | 223 | gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address; |
adf40b2e JM |
224 | gdbarch_use_struct_convention_ftype *use_struct_convention; |
225 | gdbarch_frame_init_saved_regs_ftype *frame_init_saved_regs; | |
226 | gdbarch_init_extra_frame_info_ftype *init_extra_frame_info; | |
227 | gdbarch_skip_prologue_ftype *skip_prologue; | |
dad41f9a | 228 | gdbarch_prologue_frameless_p_ftype *prologue_frameless_p; |
adf40b2e JM |
229 | gdbarch_inner_than_ftype *inner_than; |
230 | gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc; | |
917317f4 JM |
231 | gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint; |
232 | gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint; | |
adf40b2e | 233 | CORE_ADDR decr_pc_after_break; |
e02bc4cc | 234 | gdbarch_prepare_to_proceed_ftype *prepare_to_proceed; |
adf40b2e JM |
235 | CORE_ADDR function_start_offset; |
236 | gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address; | |
237 | CORE_ADDR frame_args_skip; | |
238 | gdbarch_frameless_function_invocation_ftype *frameless_function_invocation; | |
239 | gdbarch_frame_chain_ftype *frame_chain; | |
240 | gdbarch_frame_chain_valid_ftype *frame_chain_valid; | |
241 | gdbarch_frame_saved_pc_ftype *frame_saved_pc; | |
242 | gdbarch_frame_args_address_ftype *frame_args_address; | |
243 | gdbarch_frame_locals_address_ftype *frame_locals_address; | |
244 | gdbarch_saved_pc_after_call_ftype *saved_pc_after_call; | |
245 | gdbarch_frame_num_args_ftype *frame_num_args; | |
2ada493a | 246 | gdbarch_stack_align_ftype *stack_align; |
1dd4193b | 247 | int extra_stack_alignment_needed; |
d03e67c9 | 248 | gdbarch_reg_struct_has_addr_ftype *reg_struct_has_addr; |
d1e3cf49 | 249 | gdbarch_save_dummy_frame_tos_ftype *save_dummy_frame_tos; |
58d5518e | 250 | int parm_boundary; |
f0d4cc9e AC |
251 | const struct floatformat * float_format; |
252 | const struct floatformat * double_format; | |
253 | const struct floatformat * long_double_format; | |
f517ea4e | 254 | gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr; |
875e1767 | 255 | gdbarch_addr_bits_remove_ftype *addr_bits_remove; |
181c1381 | 256 | gdbarch_smash_text_address_ftype *smash_text_address; |
64c4637f | 257 | gdbarch_software_single_step_ftype *software_single_step; |
2bf0cb65 | 258 | gdbarch_print_insn_ftype *print_insn; |
bdcd319a | 259 | gdbarch_skip_trampoline_code_ftype *skip_trampoline_code; |
68e9cc94 | 260 | gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline; |
d50355b6 | 261 | gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline; |
d7bd68ca | 262 | gdbarch_pc_in_sigtramp_ftype *pc_in_sigtramp; |
43156d82 MK |
263 | gdbarch_sigtramp_start_ftype *sigtramp_start; |
264 | gdbarch_sigtramp_end_ftype *sigtramp_end; | |
c12260ac | 265 | gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p; |
552c04a7 | 266 | gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments; |
b6af0555 | 267 | gdbarch_dwarf2_build_frame_info_ftype *dwarf2_build_frame_info; |
a2cf933a EZ |
268 | gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special; |
269 | gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special; | |
5720643c | 270 | const char * name_of_malloc; |
adf40b2e | 271 | }; |
0f71a2f6 JM |
272 | |
273 | ||
274 | /* The default architecture uses host values (for want of a better | |
275 | choice). */ | |
276 | ||
277 | extern const struct bfd_arch_info bfd_default_arch_struct; | |
278 | ||
4b9b3959 AC |
279 | struct gdbarch startup_gdbarch = |
280 | { | |
76860b5f | 281 | 1, /* Always initialized. */ |
0f71a2f6 JM |
282 | /* basic architecture information */ |
283 | &bfd_default_arch_struct, | |
d7449b42 | 284 | BFD_ENDIAN_BIG, |
4b9b3959 AC |
285 | /* target specific vector and its dump routine */ |
286 | NULL, NULL, | |
0f71a2f6 JM |
287 | /*per-architecture data-pointers and swap regions */ |
288 | 0, NULL, NULL, | |
289 | /* Multi-arch values */ | |
0f71a2f6 JM |
290 | 8 * sizeof (short), |
291 | 8 * sizeof (int), | |
292 | 8 * sizeof (long), | |
293 | 8 * sizeof (LONGEST), | |
294 | 8 * sizeof (float), | |
295 | 8 * sizeof (double), | |
296 | 8 * sizeof (long double), | |
66b43ecb AC |
297 | 8 * sizeof (void*), |
298 | 8 * sizeof (void*), | |
52204a0b | 299 | 8 * sizeof (void*), |
4e409299 | 300 | 1, |
0f71a2f6 JM |
301 | 0, |
302 | 0, | |
303 | 0, | |
304 | 0, | |
305 | 0, | |
306 | 0, | |
307 | 0, | |
308 | 0, | |
309 | 0, | |
310 | 0, | |
1200cd6e AC |
311 | -1, |
312 | -1, | |
313 | -1, | |
c2169756 | 314 | -1, |
0f71a2f6 JM |
315 | 0, |
316 | 0, | |
317 | 0, | |
318 | 0, | |
319 | 0, | |
320 | 0, | |
321 | 0, | |
322 | 0, | |
323 | 0, | |
324 | 0, | |
a7e3c2ad | 325 | generic_register_byte, |
b2e75d78 | 326 | generic_register_size, |
0f71a2f6 | 327 | 0, |
b2e75d78 | 328 | generic_register_size, |
0f71a2f6 JM |
329 | 0, |
330 | 0, | |
331 | 0, | |
0ab7a791 | 332 | default_print_registers_info, |
23e3a7ac | 333 | 0, |
0f71a2f6 | 334 | 0, |
b9a8e3bf | 335 | 0, |
7355ddba | 336 | 0, |
03863182 AC |
337 | 0, |
338 | 0, | |
60054393 | 339 | 0, |
0aba1244 | 340 | 0, |
666e11c5 | 341 | 0, |
7c7651b2 | 342 | 0, |
88c72b7d AC |
343 | 0, |
344 | 0, | |
345 | 0, | |
346 | 0, | |
347 | 0, | |
2649061d | 348 | 0, |
61a0eb5b AC |
349 | 0, |
350 | 0, | |
10312cc4 AC |
351 | 0, |
352 | 0, | |
01fb7433 AC |
353 | 0, |
354 | 0, | |
39d4ef09 | 355 | 0, |
5e74b15c | 356 | 0, |
9df628e0 | 357 | 0, |
e4b415d9 | 358 | 0, |
0f71a2f6 JM |
359 | 0, |
360 | 0, | |
361 | 0, | |
362 | 0, | |
363 | 0, | |
364 | 0, | |
365 | 0, | |
366 | 0, | |
367 | 0, | |
368 | 0, | |
369 | 0, | |
370 | 0, | |
371 | 0, | |
372 | 0, | |
373 | 0, | |
374 | 0, | |
375 | 0, | |
376 | 0, | |
377 | 0, | |
378 | 0, | |
379 | 0, | |
380 | 0, | |
381 | 0, | |
382 | 0, | |
383 | 0, | |
384 | 0, | |
385 | 0, | |
386 | 0, | |
387 | 0, | |
388 | 0, | |
389 | 0, | |
390 | 0, | |
391 | 0, | |
392 | 0, | |
393 | 0, | |
917317f4 JM |
394 | 0, |
395 | 0, | |
4478b372 JB |
396 | 0, |
397 | 0, | |
71a9f22e | 398 | 0, |
2ada493a | 399 | 0, |
d03e67c9 | 400 | 0, |
dad41f9a | 401 | 0, |
d1e3cf49 | 402 | 0, |
f0d4cc9e AC |
403 | 0, |
404 | 0, | |
405 | 0, | |
7f1b2585 EZ |
406 | 0, |
407 | 0, | |
bdcd319a | 408 | 0, |
2bf0cb65 | 409 | 0, |
fc0c74b1 | 410 | 0, |
68e9cc94 | 411 | 0, |
181c1381 | 412 | 0, |
d7bd68ca | 413 | 0, |
13d01224 AC |
414 | 0, |
415 | 0, | |
416 | 0, | |
e76f1f2e | 417 | 0, |
d50355b6 | 418 | 0, |
ebba8386 | 419 | 0, |
43156d82 MK |
420 | 0, |
421 | 0, | |
a72293e2 | 422 | generic_in_function_epilogue_p, |
552c04a7 | 423 | construct_inferior_arguments, |
b6af0555 | 424 | 0, |
a2cf933a EZ |
425 | 0, |
426 | 0, | |
5720643c | 427 | "malloc", |
c0e8c252 | 428 | /* startup_gdbarch() */ |
0f71a2f6 | 429 | }; |
4b9b3959 | 430 | |
c0e8c252 | 431 | struct gdbarch *current_gdbarch = &startup_gdbarch; |
0f71a2f6 | 432 | |
ceaa8edf JB |
433 | /* Do any initialization needed for a non-multiarch configuration |
434 | after the _initialize_MODULE functions have been run. */ | |
435 | void | |
5ae5f592 | 436 | initialize_non_multiarch (void) |
ceaa8edf JB |
437 | { |
438 | alloc_gdbarch_data (&startup_gdbarch); | |
40af4b0c AC |
439 | /* Ensure that all swap areas are zeroed so that they again think |
440 | they are starting from scratch. */ | |
441 | clear_gdbarch_swap (&startup_gdbarch); | |
6c1e5d11 | 442 | init_gdbarch_swap (&startup_gdbarch); |
ceaa8edf JB |
443 | } |
444 | ||
0f71a2f6 | 445 | |
66b43ecb | 446 | /* Create a new ``struct gdbarch'' based on information provided by |
0f71a2f6 JM |
447 | ``struct gdbarch_info''. */ |
448 | ||
449 | struct gdbarch * | |
104c1213 JM |
450 | gdbarch_alloc (const struct gdbarch_info *info, |
451 | struct gdbarch_tdep *tdep) | |
0f71a2f6 | 452 | { |
85de9627 AC |
453 | /* NOTE: The new architecture variable is named ``current_gdbarch'' |
454 | so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to | |
455 | the current local architecture and not the previous global | |
456 | architecture. This ensures that the new architectures initial | |
457 | values are not influenced by the previous architecture. Once | |
458 | everything is parameterised with gdbarch, this will go away. */ | |
459 | struct gdbarch *current_gdbarch = XMALLOC (struct gdbarch); | |
460 | memset (current_gdbarch, 0, sizeof (*current_gdbarch)); | |
0f71a2f6 | 461 | |
85de9627 | 462 | alloc_gdbarch_data (current_gdbarch); |
b3cc3077 | 463 | |
85de9627 | 464 | current_gdbarch->tdep = tdep; |
0f71a2f6 | 465 | |
85de9627 AC |
466 | current_gdbarch->bfd_arch_info = info->bfd_arch_info; |
467 | current_gdbarch->byte_order = info->byte_order; | |
0f71a2f6 JM |
468 | |
469 | /* Force the explicit initialization of these. */ | |
85de9627 AC |
470 | current_gdbarch->short_bit = 2*TARGET_CHAR_BIT; |
471 | current_gdbarch->int_bit = 4*TARGET_CHAR_BIT; | |
472 | current_gdbarch->long_bit = 4*TARGET_CHAR_BIT; | |
473 | current_gdbarch->long_long_bit = 2*TARGET_LONG_BIT; | |
474 | current_gdbarch->float_bit = 4*TARGET_CHAR_BIT; | |
475 | current_gdbarch->double_bit = 8*TARGET_CHAR_BIT; | |
17ef5d92 | 476 | current_gdbarch->long_double_bit = 8*TARGET_CHAR_BIT; |
85de9627 AC |
477 | current_gdbarch->ptr_bit = TARGET_INT_BIT; |
478 | current_gdbarch->bfd_vma_bit = TARGET_ARCHITECTURE->bits_per_address; | |
4e409299 | 479 | current_gdbarch->char_signed = -1; |
85de9627 AC |
480 | current_gdbarch->read_pc = generic_target_read_pc; |
481 | current_gdbarch->write_pc = generic_target_write_pc; | |
482 | current_gdbarch->read_fp = generic_target_read_fp; | |
85de9627 AC |
483 | current_gdbarch->read_sp = generic_target_read_sp; |
484 | current_gdbarch->write_sp = generic_target_write_sp; | |
485 | current_gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer; | |
486 | current_gdbarch->num_regs = -1; | |
487 | current_gdbarch->sp_regnum = -1; | |
488 | current_gdbarch->fp_regnum = -1; | |
489 | current_gdbarch->pc_regnum = -1; | |
c2169756 | 490 | current_gdbarch->ps_regnum = -1; |
85de9627 AC |
491 | current_gdbarch->fp0_regnum = -1; |
492 | current_gdbarch->npc_regnum = -1; | |
85de9627 AC |
493 | current_gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum; |
494 | current_gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum; | |
495 | current_gdbarch->dwarf_reg_to_regnum = no_op_reg_to_regnum; | |
496 | current_gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum; | |
497 | current_gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum; | |
498 | current_gdbarch->register_name = legacy_register_name; | |
499 | current_gdbarch->register_size = -1; | |
500 | current_gdbarch->register_bytes = -1; | |
a7e3c2ad | 501 | current_gdbarch->register_byte = generic_register_byte; |
b2e75d78 | 502 | current_gdbarch->register_raw_size = generic_register_size; |
85de9627 | 503 | current_gdbarch->max_register_raw_size = -1; |
b2e75d78 | 504 | current_gdbarch->register_virtual_size = generic_register_size; |
85de9627 | 505 | current_gdbarch->max_register_virtual_size = -1; |
0ab7a791 | 506 | current_gdbarch->print_registers_info = default_print_registers_info; |
8238d0bf | 507 | current_gdbarch->register_sim_regno = legacy_register_sim_regno; |
85de9627 AC |
508 | current_gdbarch->cannot_fetch_register = cannot_register_not; |
509 | current_gdbarch->cannot_store_register = cannot_register_not; | |
510 | current_gdbarch->use_generic_dummy_frames = -1; | |
511 | current_gdbarch->call_dummy_start_offset = -1; | |
512 | current_gdbarch->call_dummy_breakpoint_offset = -1; | |
513 | current_gdbarch->call_dummy_breakpoint_offset_p = -1; | |
514 | current_gdbarch->call_dummy_length = -1; | |
515 | current_gdbarch->call_dummy_p = -1; | |
516 | current_gdbarch->call_dummy_words = legacy_call_dummy_words; | |
517 | current_gdbarch->sizeof_call_dummy_words = legacy_sizeof_call_dummy_words; | |
518 | current_gdbarch->call_dummy_stack_adjust_p = -1; | |
519 | current_gdbarch->init_frame_pc_first = init_frame_pc_noop; | |
520 | current_gdbarch->init_frame_pc = init_frame_pc_default; | |
521 | current_gdbarch->coerce_float_to_double = default_coerce_float_to_double; | |
e4b415d9 | 522 | current_gdbarch->get_saved_register = generic_unwind_get_saved_register; |
85de9627 | 523 | current_gdbarch->register_convertible = generic_register_convertible_not; |
13d01224 AC |
524 | current_gdbarch->convert_register_p = legacy_convert_register_p; |
525 | current_gdbarch->register_to_value = legacy_register_to_value; | |
526 | current_gdbarch->value_to_register = legacy_value_to_register; | |
85de9627 AC |
527 | current_gdbarch->pointer_to_address = unsigned_pointer_to_address; |
528 | current_gdbarch->address_to_pointer = unsigned_address_to_pointer; | |
529 | current_gdbarch->return_value_on_stack = generic_return_value_on_stack_not; | |
6e6d6484 | 530 | current_gdbarch->push_arguments = default_push_arguments; |
ebba8386 AC |
531 | current_gdbarch->extract_return_value = legacy_extract_return_value; |
532 | current_gdbarch->store_return_value = legacy_store_return_value; | |
56f12751 | 533 | current_gdbarch->use_struct_convention = generic_use_struct_convention; |
85de9627 AC |
534 | current_gdbarch->prologue_frameless_p = generic_prologue_frameless_p; |
535 | current_gdbarch->breakpoint_from_pc = legacy_breakpoint_from_pc; | |
536 | current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint; | |
537 | current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint; | |
538 | current_gdbarch->decr_pc_after_break = -1; | |
539 | current_gdbarch->prepare_to_proceed = default_prepare_to_proceed; | |
540 | current_gdbarch->function_start_offset = -1; | |
541 | current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address; | |
542 | current_gdbarch->frame_args_skip = -1; | |
543 | current_gdbarch->frameless_function_invocation = generic_frameless_function_invocation_not; | |
ca0d0b52 | 544 | current_gdbarch->frame_chain_valid = generic_func_frame_chain_valid; |
85de9627 AC |
545 | current_gdbarch->extra_stack_alignment_needed = 1; |
546 | current_gdbarch->convert_from_func_ptr_addr = core_addr_identity; | |
547 | current_gdbarch->addr_bits_remove = core_addr_identity; | |
181c1381 | 548 | current_gdbarch->smash_text_address = core_addr_identity; |
85de9627 AC |
549 | current_gdbarch->print_insn = legacy_print_insn; |
550 | current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code; | |
68e9cc94 | 551 | current_gdbarch->in_solib_call_trampoline = generic_in_solib_call_trampoline; |
d50355b6 | 552 | current_gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline; |
d7bd68ca | 553 | current_gdbarch->pc_in_sigtramp = legacy_pc_in_sigtramp; |
c12260ac | 554 | current_gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p; |
552c04a7 | 555 | current_gdbarch->construct_inferior_arguments = construct_inferior_arguments; |
a2cf933a EZ |
556 | current_gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special; |
557 | current_gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special; | |
5720643c | 558 | current_gdbarch->name_of_malloc = "malloc"; |
0f71a2f6 JM |
559 | /* gdbarch_alloc() */ |
560 | ||
85de9627 | 561 | return current_gdbarch; |
0f71a2f6 JM |
562 | } |
563 | ||
564 | ||
058f20d5 JB |
565 | /* Free a gdbarch struct. This should never happen in normal |
566 | operation --- once you've created a gdbarch, you keep it around. | |
567 | However, if an architecture's init function encounters an error | |
568 | building the structure, it may need to clean up a partially | |
569 | constructed gdbarch. */ | |
4b9b3959 | 570 | |
058f20d5 JB |
571 | void |
572 | gdbarch_free (struct gdbarch *arch) | |
573 | { | |
95160752 AC |
574 | gdb_assert (arch != NULL); |
575 | free_gdbarch_data (arch); | |
338d7c5c | 576 | xfree (arch); |
058f20d5 JB |
577 | } |
578 | ||
579 | ||
0f71a2f6 JM |
580 | /* Ensure that all values in a GDBARCH are reasonable. */ |
581 | ||
0f71a2f6 | 582 | static void |
104c1213 | 583 | verify_gdbarch (struct gdbarch *gdbarch) |
0f71a2f6 | 584 | { |
f16a1923 AC |
585 | struct ui_file *log; |
586 | struct cleanup *cleanups; | |
587 | long dummy; | |
588 | char *buf; | |
0f71a2f6 | 589 | /* Only perform sanity checks on a multi-arch target. */ |
6166d547 | 590 | if (!GDB_MULTI_ARCH) |
0f71a2f6 | 591 | return; |
f16a1923 AC |
592 | log = mem_fileopen (); |
593 | cleanups = make_cleanup_ui_file_delete (log); | |
0f71a2f6 | 594 | /* fundamental */ |
428721aa | 595 | if (gdbarch->byte_order == BFD_ENDIAN_UNKNOWN) |
f16a1923 | 596 | fprintf_unfiltered (log, "\n\tbyte-order"); |
0f71a2f6 | 597 | if (gdbarch->bfd_arch_info == NULL) |
f16a1923 | 598 | fprintf_unfiltered (log, "\n\tbfd_arch_info"); |
0f71a2f6 | 599 | /* Check those that need to be defined for the given multi-arch level. */ |
66b43ecb AC |
600 | /* Skip verify of short_bit, invalid_p == 0 */ |
601 | /* Skip verify of int_bit, invalid_p == 0 */ | |
602 | /* Skip verify of long_bit, invalid_p == 0 */ | |
603 | /* Skip verify of long_long_bit, invalid_p == 0 */ | |
604 | /* Skip verify of float_bit, invalid_p == 0 */ | |
605 | /* Skip verify of double_bit, invalid_p == 0 */ | |
606 | /* Skip verify of long_double_bit, invalid_p == 0 */ | |
607 | /* Skip verify of ptr_bit, invalid_p == 0 */ | |
52204a0b DT |
608 | if (gdbarch->addr_bit == 0) |
609 | gdbarch->addr_bit = TARGET_PTR_BIT; | |
c0e8c252 | 610 | /* Skip verify of bfd_vma_bit, invalid_p == 0 */ |
4e409299 JB |
611 | if (gdbarch->char_signed == -1) |
612 | gdbarch->char_signed = 1; | |
be8dfb87 AC |
613 | /* Skip verify of read_pc, invalid_p == 0 */ |
614 | /* Skip verify of write_pc, invalid_p == 0 */ | |
615 | /* Skip verify of read_fp, invalid_p == 0 */ | |
be8dfb87 AC |
616 | /* Skip verify of read_sp, invalid_p == 0 */ |
617 | /* Skip verify of write_sp, invalid_p == 0 */ | |
39d4ef09 | 618 | /* Skip verify of virtual_frame_pointer, invalid_p == 0 */ |
d8124050 AC |
619 | /* Skip verify of pseudo_register_read, has predicate */ |
620 | /* Skip verify of pseudo_register_write, has predicate */ | |
50248794 | 621 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
0f71a2f6 | 622 | && (gdbarch->num_regs == -1)) |
f16a1923 | 623 | fprintf_unfiltered (log, "\n\tnum_regs"); |
0aba1244 | 624 | /* Skip verify of num_pseudo_regs, invalid_p == 0 */ |
1200cd6e AC |
625 | /* Skip verify of sp_regnum, invalid_p == 0 */ |
626 | /* Skip verify of fp_regnum, invalid_p == 0 */ | |
627 | /* Skip verify of pc_regnum, invalid_p == 0 */ | |
c2169756 | 628 | /* Skip verify of ps_regnum, invalid_p == 0 */ |
60054393 | 629 | /* Skip verify of fp0_regnum, invalid_p == 0 */ |
03863182 | 630 | /* Skip verify of npc_regnum, invalid_p == 0 */ |
88c72b7d AC |
631 | /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */ |
632 | /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */ | |
633 | /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */ | |
634 | /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */ | |
635 | /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */ | |
c0e8c252 | 636 | /* Skip verify of register_name, invalid_p == 0 */ |
50248794 | 637 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
0f71a2f6 | 638 | && (gdbarch->register_size == -1)) |
f16a1923 | 639 | fprintf_unfiltered (log, "\n\tregister_size"); |
50248794 | 640 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
0f71a2f6 | 641 | && (gdbarch->register_bytes == -1)) |
f16a1923 | 642 | fprintf_unfiltered (log, "\n\tregister_bytes"); |
a7e3c2ad | 643 | /* Skip verify of register_byte, invalid_p == 0 */ |
b2e75d78 | 644 | /* Skip verify of register_raw_size, invalid_p == 0 */ |
50248794 | 645 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
0f71a2f6 | 646 | && (gdbarch->max_register_raw_size == -1)) |
f16a1923 | 647 | fprintf_unfiltered (log, "\n\tmax_register_raw_size"); |
b2e75d78 | 648 | /* Skip verify of register_virtual_size, invalid_p == 0 */ |
50248794 | 649 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
0f71a2f6 | 650 | && (gdbarch->max_register_virtual_size == -1)) |
f16a1923 | 651 | fprintf_unfiltered (log, "\n\tmax_register_virtual_size"); |
50248794 | 652 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
0f71a2f6 | 653 | && (gdbarch->register_virtual_type == 0)) |
f16a1923 | 654 | fprintf_unfiltered (log, "\n\tregister_virtual_type"); |
0ab7a791 AC |
655 | /* Skip verify of do_registers_info, has predicate */ |
656 | /* Skip verify of print_registers_info, invalid_p == 0 */ | |
23e3a7ac | 657 | /* Skip verify of print_float_info, has predicate */ |
e76f1f2e | 658 | /* Skip verify of print_vector_info, has predicate */ |
7c7651b2 | 659 | /* Skip verify of register_sim_regno, invalid_p == 0 */ |
2649061d | 660 | /* Skip verify of register_bytes_ok, has predicate */ |
01fb7433 AC |
661 | /* Skip verify of cannot_fetch_register, invalid_p == 0 */ |
662 | /* Skip verify of cannot_store_register, invalid_p == 0 */ | |
9df628e0 | 663 | /* Skip verify of get_longjmp_target, has predicate */ |
50248794 | 664 | if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) |
0f71a2f6 | 665 | && (gdbarch->use_generic_dummy_frames == -1)) |
f16a1923 | 666 | fprintf_unfiltered (log, "\n\tuse_generic_dummy_frames"); |
50248794 | 667 | if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) |
0f71a2f6 | 668 | && (gdbarch->call_dummy_location == 0)) |
f16a1923 | 669 | fprintf_unfiltered (log, "\n\tcall_dummy_location"); |
50248794 | 670 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
0f71a2f6 | 671 | && (gdbarch->call_dummy_location == AT_ENTRY_POINT && gdbarch->call_dummy_address == 0)) |
f16a1923 | 672 | fprintf_unfiltered (log, "\n\tcall_dummy_address"); |
50248794 | 673 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
0f71a2f6 | 674 | && (gdbarch->call_dummy_start_offset == -1)) |
f16a1923 | 675 | fprintf_unfiltered (log, "\n\tcall_dummy_start_offset"); |
50248794 | 676 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
83e6b173 | 677 | && (gdbarch->call_dummy_breakpoint_offset_p && gdbarch->call_dummy_breakpoint_offset == -1)) |
f16a1923 | 678 | fprintf_unfiltered (log, "\n\tcall_dummy_breakpoint_offset"); |
50248794 | 679 | if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) |
0f71a2f6 | 680 | && (gdbarch->call_dummy_breakpoint_offset_p == -1)) |
f16a1923 | 681 | fprintf_unfiltered (log, "\n\tcall_dummy_breakpoint_offset_p"); |
50248794 | 682 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
0f71a2f6 | 683 | && (gdbarch->call_dummy_length == -1)) |
f16a1923 | 684 | fprintf_unfiltered (log, "\n\tcall_dummy_length"); |
50248794 | 685 | if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) |
0f71a2f6 | 686 | && (gdbarch->pc_in_call_dummy == 0)) |
f16a1923 | 687 | fprintf_unfiltered (log, "\n\tpc_in_call_dummy"); |
50248794 | 688 | if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) |
0f71a2f6 | 689 | && (gdbarch->call_dummy_p == -1)) |
f16a1923 | 690 | fprintf_unfiltered (log, "\n\tcall_dummy_p"); |
c0e8c252 AC |
691 | /* Skip verify of call_dummy_words, invalid_p == 0 */ |
692 | /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */ | |
50248794 | 693 | if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) |
0f71a2f6 | 694 | && (gdbarch->call_dummy_stack_adjust_p == -1)) |
f16a1923 | 695 | fprintf_unfiltered (log, "\n\tcall_dummy_stack_adjust_p"); |
50248794 | 696 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
0f71a2f6 | 697 | && (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0)) |
f16a1923 | 698 | fprintf_unfiltered (log, "\n\tcall_dummy_stack_adjust"); |
50248794 | 699 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
0f71a2f6 | 700 | && (gdbarch->fix_call_dummy == 0)) |
f16a1923 | 701 | fprintf_unfiltered (log, "\n\tfix_call_dummy"); |
10312cc4 AC |
702 | /* Skip verify of init_frame_pc_first, invalid_p == 0 */ |
703 | /* Skip verify of init_frame_pc, invalid_p == 0 */ | |
c0e8c252 | 704 | /* Skip verify of coerce_float_to_double, invalid_p == 0 */ |
e4b415d9 | 705 | /* Skip verify of get_saved_register, invalid_p == 0 */ |
c0e8c252 AC |
706 | /* Skip verify of register_convertible, invalid_p == 0 */ |
707 | /* Skip verify of register_convert_to_virtual, invalid_p == 0 */ | |
708 | /* Skip verify of register_convert_to_raw, invalid_p == 0 */ | |
13d01224 AC |
709 | /* Skip verify of convert_register_p, invalid_p == 0 */ |
710 | /* Skip verify of register_to_value, invalid_p == 0 */ | |
711 | /* Skip verify of value_to_register, invalid_p == 0 */ | |
4478b372 JB |
712 | /* Skip verify of pointer_to_address, invalid_p == 0 */ |
713 | /* Skip verify of address_to_pointer, invalid_p == 0 */ | |
fc0c74b1 | 714 | /* Skip verify of integer_to_address, has predicate */ |
71a9f22e | 715 | /* Skip verify of return_value_on_stack, invalid_p == 0 */ |
6e6d6484 | 716 | /* Skip verify of push_arguments, invalid_p == 0 */ |
50248794 | 717 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
0f71a2f6 | 718 | && (gdbarch->push_dummy_frame == 0)) |
f16a1923 | 719 | fprintf_unfiltered (log, "\n\tpush_dummy_frame"); |
69a0d5f4 | 720 | /* Skip verify of push_return_address, has predicate */ |
50248794 | 721 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
0f71a2f6 | 722 | && (gdbarch->pop_frame == 0)) |
f16a1923 | 723 | fprintf_unfiltered (log, "\n\tpop_frame"); |
50248794 | 724 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
0f71a2f6 | 725 | && (gdbarch->store_struct_return == 0)) |
f16a1923 | 726 | fprintf_unfiltered (log, "\n\tstore_struct_return"); |
ebba8386 AC |
727 | /* Skip verify of extract_return_value, invalid_p == 0 */ |
728 | /* Skip verify of store_return_value, invalid_p == 0 */ | |
049ee0e4 | 729 | /* Skip verify of extract_struct_value_address, has predicate */ |
26e9b323 | 730 | /* Skip verify of deprecated_extract_struct_value_address, has predicate */ |
56f12751 | 731 | /* Skip verify of use_struct_convention, invalid_p == 0 */ |
50248794 | 732 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
0f71a2f6 | 733 | && (gdbarch->frame_init_saved_regs == 0)) |
f16a1923 | 734 | fprintf_unfiltered (log, "\n\tframe_init_saved_regs"); |
5fdff426 | 735 | /* Skip verify of init_extra_frame_info, has predicate */ |
50248794 | 736 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
0f71a2f6 | 737 | && (gdbarch->skip_prologue == 0)) |
f16a1923 | 738 | fprintf_unfiltered (log, "\n\tskip_prologue"); |
dad41f9a | 739 | /* Skip verify of prologue_frameless_p, invalid_p == 0 */ |
50248794 | 740 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
0f71a2f6 | 741 | && (gdbarch->inner_than == 0)) |
f16a1923 | 742 | fprintf_unfiltered (log, "\n\tinner_than"); |
c0e8c252 AC |
743 | /* Skip verify of breakpoint_from_pc, invalid_p == 0 */ |
744 | /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */ | |
745 | /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */ | |
50248794 | 746 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
0f71a2f6 | 747 | && (gdbarch->decr_pc_after_break == -1)) |
f16a1923 | 748 | fprintf_unfiltered (log, "\n\tdecr_pc_after_break"); |
e02bc4cc | 749 | /* Skip verify of prepare_to_proceed, invalid_p == 0 */ |
50248794 | 750 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
0f71a2f6 | 751 | && (gdbarch->function_start_offset == -1)) |
f16a1923 | 752 | fprintf_unfiltered (log, "\n\tfunction_start_offset"); |
c0e8c252 | 753 | /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */ |
50248794 | 754 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
0f71a2f6 | 755 | && (gdbarch->frame_args_skip == -1)) |
f16a1923 | 756 | fprintf_unfiltered (log, "\n\tframe_args_skip"); |
c0e8c252 | 757 | /* Skip verify of frameless_function_invocation, invalid_p == 0 */ |
50248794 | 758 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
0f71a2f6 | 759 | && (gdbarch->frame_chain == 0)) |
f16a1923 | 760 | fprintf_unfiltered (log, "\n\tframe_chain"); |
7f55af32 | 761 | /* Skip verify of frame_chain_valid, invalid_p == 0 */ |
50248794 | 762 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
0f71a2f6 | 763 | && (gdbarch->frame_saved_pc == 0)) |
f16a1923 | 764 | fprintf_unfiltered (log, "\n\tframe_saved_pc"); |
50248794 | 765 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
0f71a2f6 | 766 | && (gdbarch->frame_args_address == 0)) |
f16a1923 | 767 | fprintf_unfiltered (log, "\n\tframe_args_address"); |
50248794 | 768 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
0f71a2f6 | 769 | && (gdbarch->frame_locals_address == 0)) |
f16a1923 | 770 | fprintf_unfiltered (log, "\n\tframe_locals_address"); |
50248794 | 771 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
0f71a2f6 | 772 | && (gdbarch->saved_pc_after_call == 0)) |
f16a1923 | 773 | fprintf_unfiltered (log, "\n\tsaved_pc_after_call"); |
50248794 | 774 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
0f71a2f6 | 775 | && (gdbarch->frame_num_args == 0)) |
f16a1923 | 776 | fprintf_unfiltered (log, "\n\tframe_num_args"); |
2ada493a | 777 | /* Skip verify of stack_align, has predicate */ |
1dd4193b | 778 | /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */ |
d03e67c9 | 779 | /* Skip verify of reg_struct_has_addr, has predicate */ |
d1e3cf49 | 780 | /* Skip verify of save_dummy_frame_tos, has predicate */ |
f0d4cc9e AC |
781 | if (gdbarch->float_format == 0) |
782 | gdbarch->float_format = default_float_format (gdbarch); | |
783 | if (gdbarch->double_format == 0) | |
784 | gdbarch->double_format = default_double_format (gdbarch); | |
785 | if (gdbarch->long_double_format == 0) | |
2fa5c1e0 | 786 | gdbarch->long_double_format = default_double_format (gdbarch); |
f517ea4e | 787 | /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */ |
875e1767 | 788 | /* Skip verify of addr_bits_remove, invalid_p == 0 */ |
181c1381 | 789 | /* Skip verify of smash_text_address, invalid_p == 0 */ |
64c4637f | 790 | /* Skip verify of software_single_step, has predicate */ |
2bf0cb65 | 791 | /* Skip verify of print_insn, invalid_p == 0 */ |
bdcd319a | 792 | /* Skip verify of skip_trampoline_code, invalid_p == 0 */ |
68e9cc94 | 793 | /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */ |
d50355b6 | 794 | /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */ |
d7bd68ca | 795 | /* Skip verify of pc_in_sigtramp, invalid_p == 0 */ |
43156d82 | 796 | /* Skip verify of sigtramp_start, has predicate */ |
e76cff22 | 797 | /* Skip verify of sigtramp_end, has predicate */ |
c12260ac | 798 | /* Skip verify of in_function_epilogue_p, invalid_p == 0 */ |
552c04a7 | 799 | /* Skip verify of construct_inferior_arguments, invalid_p == 0 */ |
b6af0555 | 800 | /* Skip verify of dwarf2_build_frame_info, has predicate */ |
a2cf933a EZ |
801 | /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */ |
802 | /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */ | |
5720643c | 803 | /* Skip verify of name_of_malloc, invalid_p == 0 */ |
f16a1923 AC |
804 | buf = ui_file_xstrdup (log, &dummy); |
805 | make_cleanup (xfree, buf); | |
806 | if (strlen (buf) > 0) | |
807 | internal_error (__FILE__, __LINE__, | |
808 | "verify_gdbarch: the following are invalid ...%s", | |
809 | buf); | |
810 | do_cleanups (cleanups); | |
0f71a2f6 JM |
811 | } |
812 | ||
813 | ||
814 | /* Print out the details of the current architecture. */ | |
815 | ||
4b9b3959 AC |
816 | /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it |
817 | just happens to match the global variable ``current_gdbarch''. That | |
818 | way macros refering to that variable get the local and not the global | |
819 | version - ulgh. Once everything is parameterised with gdbarch, this | |
820 | will go away. */ | |
821 | ||
0f71a2f6 | 822 | void |
4b9b3959 | 823 | gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) |
0f71a2f6 | 824 | { |
4b9b3959 AC |
825 | fprintf_unfiltered (file, |
826 | "gdbarch_dump: GDB_MULTI_ARCH = %d\n", | |
827 | GDB_MULTI_ARCH); | |
c12260ac CV |
828 | if (GDB_MULTI_ARCH) |
829 | fprintf_unfiltered (file, | |
5e74b15c RE |
830 | "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n", |
831 | (long) current_gdbarch->in_function_epilogue_p); | |
832 | if (GDB_MULTI_ARCH) | |
833 | fprintf_unfiltered (file, | |
d8124050 AC |
834 | "gdbarch_dump: pseudo_register_read = 0x%08lx\n", |
835 | (long) current_gdbarch->pseudo_register_read); | |
5e74b15c RE |
836 | if (GDB_MULTI_ARCH) |
837 | fprintf_unfiltered (file, | |
d8124050 AC |
838 | "gdbarch_dump: pseudo_register_write = 0x%08lx\n", |
839 | (long) current_gdbarch->pseudo_register_write); | |
08e45a40 AC |
840 | #ifdef ADDRESS_TO_POINTER |
841 | #if GDB_MULTI_ARCH | |
842 | /* Macro might contain `[{}]' when not multi-arch */ | |
4b9b3959 | 843 | fprintf_unfiltered (file, |
08e45a40 AC |
844 | "gdbarch_dump: %s # %s\n", |
845 | "ADDRESS_TO_POINTER(type, buf, addr)", | |
846 | XSTRING (ADDRESS_TO_POINTER (type, buf, addr))); | |
4b9b3959 | 847 | #endif |
08e45a40 AC |
848 | if (GDB_MULTI_ARCH) |
849 | fprintf_unfiltered (file, | |
850 | "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n", | |
851 | (long) current_gdbarch->address_to_pointer | |
852 | /*ADDRESS_TO_POINTER ()*/); | |
4b9b3959 | 853 | #endif |
5e74b15c RE |
854 | #ifdef ADDR_BITS_REMOVE |
855 | fprintf_unfiltered (file, | |
856 | "gdbarch_dump: %s # %s\n", | |
857 | "ADDR_BITS_REMOVE(addr)", | |
858 | XSTRING (ADDR_BITS_REMOVE (addr))); | |
859 | if (GDB_MULTI_ARCH) | |
860 | fprintf_unfiltered (file, | |
861 | "gdbarch_dump: ADDR_BITS_REMOVE = 0x%08lx\n", | |
862 | (long) current_gdbarch->addr_bits_remove | |
863 | /*ADDR_BITS_REMOVE ()*/); | |
864 | #endif | |
08e45a40 | 865 | #ifdef BELIEVE_PCC_PROMOTION |
4b9b3959 | 866 | fprintf_unfiltered (file, |
08e45a40 AC |
867 | "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n", |
868 | XSTRING (BELIEVE_PCC_PROMOTION)); | |
869 | fprintf_unfiltered (file, | |
06b25f14 AC |
870 | "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n", |
871 | BELIEVE_PCC_PROMOTION); | |
4b9b3959 | 872 | #endif |
08e45a40 | 873 | #ifdef BELIEVE_PCC_PROMOTION_TYPE |
4b9b3959 | 874 | fprintf_unfiltered (file, |
08e45a40 AC |
875 | "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n", |
876 | XSTRING (BELIEVE_PCC_PROMOTION_TYPE)); | |
877 | fprintf_unfiltered (file, | |
06b25f14 AC |
878 | "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n", |
879 | BELIEVE_PCC_PROMOTION_TYPE); | |
4b9b3959 | 880 | #endif |
08e45a40 | 881 | #ifdef BREAKPOINT_FROM_PC |
4b9b3959 | 882 | fprintf_unfiltered (file, |
08e45a40 AC |
883 | "gdbarch_dump: %s # %s\n", |
884 | "BREAKPOINT_FROM_PC(pcptr, lenptr)", | |
885 | XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr))); | |
886 | if (GDB_MULTI_ARCH) | |
887 | fprintf_unfiltered (file, | |
888 | "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n", | |
889 | (long) current_gdbarch->breakpoint_from_pc | |
890 | /*BREAKPOINT_FROM_PC ()*/); | |
4b9b3959 | 891 | #endif |
08e45a40 | 892 | #ifdef CALL_DUMMY_ADDRESS |
4b9b3959 | 893 | fprintf_unfiltered (file, |
08e45a40 AC |
894 | "gdbarch_dump: %s # %s\n", |
895 | "CALL_DUMMY_ADDRESS()", | |
896 | XSTRING (CALL_DUMMY_ADDRESS ())); | |
897 | if (GDB_MULTI_ARCH) | |
898 | fprintf_unfiltered (file, | |
899 | "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n", | |
900 | (long) current_gdbarch->call_dummy_address | |
901 | /*CALL_DUMMY_ADDRESS ()*/); | |
4b9b3959 | 902 | #endif |
08e45a40 | 903 | #ifdef CALL_DUMMY_BREAKPOINT_OFFSET |
4b9b3959 | 904 | fprintf_unfiltered (file, |
08e45a40 AC |
905 | "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n", |
906 | XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET)); | |
907 | if (CALL_DUMMY_BREAKPOINT_OFFSET_P) | |
908 | fprintf_unfiltered (file, | |
909 | "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n", | |
910 | (long) CALL_DUMMY_BREAKPOINT_OFFSET); | |
4b9b3959 | 911 | #endif |
08e45a40 | 912 | #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P |
4b9b3959 | 913 | fprintf_unfiltered (file, |
08e45a40 AC |
914 | "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n", |
915 | XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P)); | |
916 | fprintf_unfiltered (file, | |
06b25f14 AC |
917 | "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %d\n", |
918 | CALL_DUMMY_BREAKPOINT_OFFSET_P); | |
4b9b3959 | 919 | #endif |
08e45a40 | 920 | #ifdef CALL_DUMMY_LENGTH |
66b43ecb | 921 | fprintf_unfiltered (file, |
08e45a40 AC |
922 | "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n", |
923 | XSTRING (CALL_DUMMY_LENGTH)); | |
924 | if (CALL_DUMMY_LOCATION == BEFORE_TEXT_END || CALL_DUMMY_LOCATION == AFTER_TEXT_END) | |
925 | fprintf_unfiltered (file, | |
06b25f14 AC |
926 | "gdbarch_dump: CALL_DUMMY_LENGTH = %d\n", |
927 | CALL_DUMMY_LENGTH); | |
66b43ecb | 928 | #endif |
08e45a40 | 929 | #ifdef CALL_DUMMY_LOCATION |
52204a0b | 930 | fprintf_unfiltered (file, |
08e45a40 AC |
931 | "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n", |
932 | XSTRING (CALL_DUMMY_LOCATION)); | |
933 | fprintf_unfiltered (file, | |
06b25f14 AC |
934 | "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n", |
935 | CALL_DUMMY_LOCATION); | |
52204a0b | 936 | #endif |
08e45a40 | 937 | #ifdef CALL_DUMMY_P |
66b43ecb | 938 | fprintf_unfiltered (file, |
08e45a40 AC |
939 | "gdbarch_dump: CALL_DUMMY_P # %s\n", |
940 | XSTRING (CALL_DUMMY_P)); | |
941 | fprintf_unfiltered (file, | |
06b25f14 AC |
942 | "gdbarch_dump: CALL_DUMMY_P = %d\n", |
943 | CALL_DUMMY_P); | |
66b43ecb | 944 | #endif |
08e45a40 | 945 | #ifdef CALL_DUMMY_STACK_ADJUST |
4b9b3959 | 946 | fprintf_unfiltered (file, |
08e45a40 AC |
947 | "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n", |
948 | XSTRING (CALL_DUMMY_STACK_ADJUST)); | |
949 | if (CALL_DUMMY_STACK_ADJUST_P) | |
950 | fprintf_unfiltered (file, | |
951 | "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n", | |
952 | (long) CALL_DUMMY_STACK_ADJUST); | |
4b9b3959 | 953 | #endif |
08e45a40 | 954 | #ifdef CALL_DUMMY_STACK_ADJUST_P |
4b9b3959 | 955 | fprintf_unfiltered (file, |
08e45a40 AC |
956 | "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n", |
957 | XSTRING (CALL_DUMMY_STACK_ADJUST_P)); | |
958 | fprintf_unfiltered (file, | |
959 | "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n", | |
960 | (long) CALL_DUMMY_STACK_ADJUST_P); | |
4b9b3959 | 961 | #endif |
08e45a40 | 962 | #ifdef CALL_DUMMY_START_OFFSET |
4b9b3959 | 963 | fprintf_unfiltered (file, |
08e45a40 AC |
964 | "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n", |
965 | XSTRING (CALL_DUMMY_START_OFFSET)); | |
966 | fprintf_unfiltered (file, | |
967 | "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n", | |
968 | (long) CALL_DUMMY_START_OFFSET); | |
4b9b3959 | 969 | #endif |
08e45a40 | 970 | #ifdef CALL_DUMMY_WORDS |
4b9b3959 | 971 | fprintf_unfiltered (file, |
08e45a40 AC |
972 | "gdbarch_dump: CALL_DUMMY_WORDS # %s\n", |
973 | XSTRING (CALL_DUMMY_WORDS)); | |
974 | fprintf_unfiltered (file, | |
975 | "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n", | |
976 | (long) CALL_DUMMY_WORDS); | |
4b9b3959 | 977 | #endif |
08e45a40 | 978 | #ifdef CANNOT_FETCH_REGISTER |
4b9b3959 AC |
979 | fprintf_unfiltered (file, |
980 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
981 | "CANNOT_FETCH_REGISTER(regnum)", |
982 | XSTRING (CANNOT_FETCH_REGISTER (regnum))); | |
983 | if (GDB_MULTI_ARCH) | |
984 | fprintf_unfiltered (file, | |
985 | "gdbarch_dump: CANNOT_FETCH_REGISTER = 0x%08lx\n", | |
986 | (long) current_gdbarch->cannot_fetch_register | |
987 | /*CANNOT_FETCH_REGISTER ()*/); | |
4b9b3959 | 988 | #endif |
08e45a40 | 989 | #ifdef CANNOT_STORE_REGISTER |
4b9b3959 AC |
990 | fprintf_unfiltered (file, |
991 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
992 | "CANNOT_STORE_REGISTER(regnum)", |
993 | XSTRING (CANNOT_STORE_REGISTER (regnum))); | |
994 | if (GDB_MULTI_ARCH) | |
995 | fprintf_unfiltered (file, | |
996 | "gdbarch_dump: CANNOT_STORE_REGISTER = 0x%08lx\n", | |
997 | (long) current_gdbarch->cannot_store_register | |
998 | /*CANNOT_STORE_REGISTER ()*/); | |
4b9b3959 | 999 | #endif |
08e45a40 | 1000 | #ifdef COERCE_FLOAT_TO_DOUBLE |
4b9b3959 AC |
1001 | fprintf_unfiltered (file, |
1002 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1003 | "COERCE_FLOAT_TO_DOUBLE(formal, actual)", |
1004 | XSTRING (COERCE_FLOAT_TO_DOUBLE (formal, actual))); | |
1005 | if (GDB_MULTI_ARCH) | |
1006 | fprintf_unfiltered (file, | |
1007 | "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n", | |
1008 | (long) current_gdbarch->coerce_float_to_double | |
1009 | /*COERCE_FLOAT_TO_DOUBLE ()*/); | |
a2cf933a EZ |
1010 | #endif |
1011 | #ifdef COFF_MAKE_MSYMBOL_SPECIAL | |
1012 | #if GDB_MULTI_ARCH | |
1013 | /* Macro might contain `[{}]' when not multi-arch */ | |
1014 | fprintf_unfiltered (file, | |
1015 | "gdbarch_dump: %s # %s\n", | |
1016 | "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)", | |
1017 | XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val, msym))); | |
1018 | #endif | |
1019 | if (GDB_MULTI_ARCH) | |
1020 | fprintf_unfiltered (file, | |
1021 | "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = 0x%08lx\n", | |
1022 | (long) current_gdbarch->coff_make_msymbol_special | |
1023 | /*COFF_MAKE_MSYMBOL_SPECIAL ()*/); | |
4b9b3959 | 1024 | #endif |
552c04a7 TT |
1025 | if (GDB_MULTI_ARCH) |
1026 | fprintf_unfiltered (file, | |
1027 | "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n", | |
1028 | (long) current_gdbarch->construct_inferior_arguments); | |
08e45a40 | 1029 | #ifdef CONVERT_FROM_FUNC_PTR_ADDR |
39d4ef09 AC |
1030 | fprintf_unfiltered (file, |
1031 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1032 | "CONVERT_FROM_FUNC_PTR_ADDR(addr)", |
1033 | XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr))); | |
1034 | if (GDB_MULTI_ARCH) | |
1035 | fprintf_unfiltered (file, | |
1036 | "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n", | |
1037 | (long) current_gdbarch->convert_from_func_ptr_addr | |
1038 | /*CONVERT_FROM_FUNC_PTR_ADDR ()*/); | |
39d4ef09 | 1039 | #endif |
13d01224 AC |
1040 | #ifdef CONVERT_REGISTER_P |
1041 | fprintf_unfiltered (file, | |
1042 | "gdbarch_dump: %s # %s\n", | |
1043 | "CONVERT_REGISTER_P(regnum)", | |
1044 | XSTRING (CONVERT_REGISTER_P (regnum))); | |
1045 | if (GDB_MULTI_ARCH) | |
1046 | fprintf_unfiltered (file, | |
1047 | "gdbarch_dump: CONVERT_REGISTER_P = 0x%08lx\n", | |
1048 | (long) current_gdbarch->convert_register_p | |
1049 | /*CONVERT_REGISTER_P ()*/); | |
1050 | #endif | |
08e45a40 | 1051 | #ifdef DECR_PC_AFTER_BREAK |
4b9b3959 | 1052 | fprintf_unfiltered (file, |
08e45a40 AC |
1053 | "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n", |
1054 | XSTRING (DECR_PC_AFTER_BREAK)); | |
0aba1244 | 1055 | fprintf_unfiltered (file, |
08e45a40 AC |
1056 | "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n", |
1057 | (long) DECR_PC_AFTER_BREAK); | |
0aba1244 | 1058 | #endif |
26e9b323 AC |
1059 | #ifdef DEPRECATED_EXTRACT_RETURN_VALUE |
1060 | #if GDB_MULTI_ARCH | |
1061 | /* Macro might contain `[{}]' when not multi-arch */ | |
1062 | fprintf_unfiltered (file, | |
1063 | "gdbarch_dump: %s # %s\n", | |
1064 | "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)", | |
1065 | XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type, regbuf, valbuf))); | |
1066 | #endif | |
1067 | if (GDB_MULTI_ARCH) | |
1068 | fprintf_unfiltered (file, | |
1069 | "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = 0x%08lx\n", | |
1070 | (long) current_gdbarch->deprecated_extract_return_value | |
1071 | /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/); | |
1072 | #endif | |
1073 | #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS | |
1074 | fprintf_unfiltered (file, | |
1075 | "gdbarch_dump: %s # %s\n", | |
1076 | "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)", | |
1077 | XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regbuf))); | |
1078 | if (GDB_MULTI_ARCH) | |
1079 | fprintf_unfiltered (file, | |
1080 | "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n", | |
1081 | (long) current_gdbarch->deprecated_extract_struct_value_address | |
1082 | /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/); | |
1083 | #endif | |
ebba8386 AC |
1084 | #ifdef DEPRECATED_STORE_RETURN_VALUE |
1085 | #if GDB_MULTI_ARCH | |
1086 | /* Macro might contain `[{}]' when not multi-arch */ | |
1087 | fprintf_unfiltered (file, | |
1088 | "gdbarch_dump: %s # %s\n", | |
1089 | "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)", | |
1090 | XSTRING (DEPRECATED_STORE_RETURN_VALUE (type, valbuf))); | |
1091 | #endif | |
1092 | if (GDB_MULTI_ARCH) | |
1093 | fprintf_unfiltered (file, | |
1094 | "gdbarch_dump: DEPRECATED_STORE_RETURN_VALUE = 0x%08lx\n", | |
1095 | (long) current_gdbarch->deprecated_store_return_value | |
1096 | /*DEPRECATED_STORE_RETURN_VALUE ()*/); | |
1097 | #endif | |
08e45a40 AC |
1098 | #ifdef DO_REGISTERS_INFO |
1099 | #if GDB_MULTI_ARCH | |
1100 | /* Macro might contain `[{}]' when not multi-arch */ | |
4b9b3959 | 1101 | fprintf_unfiltered (file, |
08e45a40 AC |
1102 | "gdbarch_dump: %s # %s\n", |
1103 | "DO_REGISTERS_INFO(reg_nr, fpregs)", | |
1104 | XSTRING (DO_REGISTERS_INFO (reg_nr, fpregs))); | |
4b9b3959 | 1105 | #endif |
08e45a40 AC |
1106 | if (GDB_MULTI_ARCH) |
1107 | fprintf_unfiltered (file, | |
1108 | "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n", | |
1109 | (long) current_gdbarch->do_registers_info | |
1110 | /*DO_REGISTERS_INFO ()*/); | |
4b9b3959 | 1111 | #endif |
b6af0555 JS |
1112 | #ifdef DWARF2_BUILD_FRAME_INFO |
1113 | #if GDB_MULTI_ARCH | |
1114 | /* Macro might contain `[{}]' when not multi-arch */ | |
1115 | fprintf_unfiltered (file, | |
1116 | "gdbarch_dump: %s # %s\n", | |
1117 | "DWARF2_BUILD_FRAME_INFO(objfile)", | |
1118 | XSTRING (DWARF2_BUILD_FRAME_INFO (objfile))); | |
1119 | #endif | |
1120 | if (GDB_MULTI_ARCH) | |
1121 | fprintf_unfiltered (file, | |
1122 | "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = 0x%08lx\n", | |
1123 | (long) current_gdbarch->dwarf2_build_frame_info | |
1124 | /*DWARF2_BUILD_FRAME_INFO ()*/); | |
1125 | #endif | |
08e45a40 | 1126 | #ifdef DWARF2_REG_TO_REGNUM |
4b9b3959 | 1127 | fprintf_unfiltered (file, |
08e45a40 AC |
1128 | "gdbarch_dump: %s # %s\n", |
1129 | "DWARF2_REG_TO_REGNUM(dwarf2_regnr)", | |
1130 | XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr))); | |
1131 | if (GDB_MULTI_ARCH) | |
1132 | fprintf_unfiltered (file, | |
1133 | "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n", | |
1134 | (long) current_gdbarch->dwarf2_reg_to_regnum | |
1135 | /*DWARF2_REG_TO_REGNUM ()*/); | |
4b9b3959 | 1136 | #endif |
08e45a40 | 1137 | #ifdef DWARF_REG_TO_REGNUM |
88c72b7d AC |
1138 | fprintf_unfiltered (file, |
1139 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1140 | "DWARF_REG_TO_REGNUM(dwarf_regnr)", |
1141 | XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr))); | |
1142 | if (GDB_MULTI_ARCH) | |
1143 | fprintf_unfiltered (file, | |
1144 | "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n", | |
1145 | (long) current_gdbarch->dwarf_reg_to_regnum | |
1146 | /*DWARF_REG_TO_REGNUM ()*/); | |
88c72b7d AC |
1147 | #endif |
1148 | #ifdef ECOFF_REG_TO_REGNUM | |
1149 | fprintf_unfiltered (file, | |
1150 | "gdbarch_dump: %s # %s\n", | |
1151 | "ECOFF_REG_TO_REGNUM(ecoff_regnr)", | |
1152 | XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr))); | |
08e45a40 AC |
1153 | if (GDB_MULTI_ARCH) |
1154 | fprintf_unfiltered (file, | |
1155 | "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n", | |
1156 | (long) current_gdbarch->ecoff_reg_to_regnum | |
1157 | /*ECOFF_REG_TO_REGNUM ()*/); | |
88c72b7d | 1158 | #endif |
a2cf933a EZ |
1159 | #ifdef ELF_MAKE_MSYMBOL_SPECIAL |
1160 | #if GDB_MULTI_ARCH | |
1161 | /* Macro might contain `[{}]' when not multi-arch */ | |
1162 | fprintf_unfiltered (file, | |
1163 | "gdbarch_dump: %s # %s\n", | |
1164 | "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)", | |
1165 | XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym, msym))); | |
1166 | #endif | |
1167 | if (GDB_MULTI_ARCH) | |
1168 | fprintf_unfiltered (file, | |
1169 | "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = 0x%08lx\n", | |
1170 | (long) current_gdbarch->elf_make_msymbol_special | |
1171 | /*ELF_MAKE_MSYMBOL_SPECIAL ()*/); | |
1172 | #endif | |
049ee0e4 AC |
1173 | #ifdef EXTRACT_RETURN_VALUE |
1174 | #if GDB_MULTI_ARCH | |
1175 | /* Macro might contain `[{}]' when not multi-arch */ | |
1176 | fprintf_unfiltered (file, | |
1177 | "gdbarch_dump: %s # %s\n", | |
1178 | "EXTRACT_RETURN_VALUE(type, regcache, valbuf)", | |
1179 | XSTRING (EXTRACT_RETURN_VALUE (type, regcache, valbuf))); | |
1180 | #endif | |
1181 | if (GDB_MULTI_ARCH) | |
1182 | fprintf_unfiltered (file, | |
1183 | "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n", | |
1184 | (long) current_gdbarch->extract_return_value | |
1185 | /*EXTRACT_RETURN_VALUE ()*/); | |
1186 | #endif | |
1187 | #ifdef EXTRACT_STRUCT_VALUE_ADDRESS | |
1188 | fprintf_unfiltered (file, | |
1189 | "gdbarch_dump: %s # %s\n", | |
1190 | "EXTRACT_STRUCT_VALUE_ADDRESS(regcache)", | |
1191 | XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regcache))); | |
1192 | if (GDB_MULTI_ARCH) | |
1193 | fprintf_unfiltered (file, | |
1194 | "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n", | |
1195 | (long) current_gdbarch->extract_struct_value_address | |
1196 | /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/); | |
1197 | #endif | |
08e45a40 AC |
1198 | #ifdef EXTRA_STACK_ALIGNMENT_NEEDED |
1199 | fprintf_unfiltered (file, | |
1200 | "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n", | |
1201 | XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED)); | |
1202 | fprintf_unfiltered (file, | |
06b25f14 AC |
1203 | "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %d\n", |
1204 | EXTRA_STACK_ALIGNMENT_NEEDED); | |
08e45a40 | 1205 | #endif |
08e45a40 AC |
1206 | #ifdef FIX_CALL_DUMMY |
1207 | #if GDB_MULTI_ARCH | |
1208 | /* Macro might contain `[{}]' when not multi-arch */ | |
4b9b3959 AC |
1209 | fprintf_unfiltered (file, |
1210 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1211 | "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)", |
1212 | XSTRING (FIX_CALL_DUMMY (dummy, pc, fun, nargs, args, type, gcc_p))); | |
4b9b3959 | 1213 | #endif |
08e45a40 AC |
1214 | if (GDB_MULTI_ARCH) |
1215 | fprintf_unfiltered (file, | |
1216 | "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n", | |
1217 | (long) current_gdbarch->fix_call_dummy | |
1218 | /*FIX_CALL_DUMMY ()*/); | |
1219 | #endif | |
1220 | #ifdef FP0_REGNUM | |
4b9b3959 | 1221 | fprintf_unfiltered (file, |
08e45a40 AC |
1222 | "gdbarch_dump: FP0_REGNUM # %s\n", |
1223 | XSTRING (FP0_REGNUM)); | |
1224 | fprintf_unfiltered (file, | |
06b25f14 AC |
1225 | "gdbarch_dump: FP0_REGNUM = %d\n", |
1226 | FP0_REGNUM); | |
4b9b3959 | 1227 | #endif |
08e45a40 | 1228 | #ifdef FP_REGNUM |
4b9b3959 | 1229 | fprintf_unfiltered (file, |
08e45a40 AC |
1230 | "gdbarch_dump: FP_REGNUM # %s\n", |
1231 | XSTRING (FP_REGNUM)); | |
1232 | fprintf_unfiltered (file, | |
06b25f14 AC |
1233 | "gdbarch_dump: FP_REGNUM = %d\n", |
1234 | FP_REGNUM); | |
4b9b3959 | 1235 | #endif |
5e74b15c RE |
1236 | #ifdef FRAMELESS_FUNCTION_INVOCATION |
1237 | fprintf_unfiltered (file, | |
1238 | "gdbarch_dump: %s # %s\n", | |
1239 | "FRAMELESS_FUNCTION_INVOCATION(fi)", | |
1240 | XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi))); | |
1241 | if (GDB_MULTI_ARCH) | |
1242 | fprintf_unfiltered (file, | |
1243 | "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n", | |
1244 | (long) current_gdbarch->frameless_function_invocation | |
1245 | /*FRAMELESS_FUNCTION_INVOCATION ()*/); | |
1246 | #endif | |
08e45a40 | 1247 | #ifdef FRAME_ARGS_ADDRESS |
4b9b3959 AC |
1248 | fprintf_unfiltered (file, |
1249 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1250 | "FRAME_ARGS_ADDRESS(fi)", |
1251 | XSTRING (FRAME_ARGS_ADDRESS (fi))); | |
1252 | if (GDB_MULTI_ARCH) | |
1253 | fprintf_unfiltered (file, | |
1254 | "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n", | |
1255 | (long) current_gdbarch->frame_args_address | |
1256 | /*FRAME_ARGS_ADDRESS ()*/); | |
4b9b3959 | 1257 | #endif |
08e45a40 | 1258 | #ifdef FRAME_ARGS_SKIP |
4b9b3959 | 1259 | fprintf_unfiltered (file, |
08e45a40 AC |
1260 | "gdbarch_dump: FRAME_ARGS_SKIP # %s\n", |
1261 | XSTRING (FRAME_ARGS_SKIP)); | |
4b9b3959 | 1262 | fprintf_unfiltered (file, |
08e45a40 AC |
1263 | "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n", |
1264 | (long) FRAME_ARGS_SKIP); | |
4b9b3959 | 1265 | #endif |
08e45a40 | 1266 | #ifdef FRAME_CHAIN |
4b9b3959 | 1267 | fprintf_unfiltered (file, |
08e45a40 AC |
1268 | "gdbarch_dump: %s # %s\n", |
1269 | "FRAME_CHAIN(frame)", | |
1270 | XSTRING (FRAME_CHAIN (frame))); | |
1271 | if (GDB_MULTI_ARCH) | |
1272 | fprintf_unfiltered (file, | |
1273 | "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n", | |
1274 | (long) current_gdbarch->frame_chain | |
1275 | /*FRAME_CHAIN ()*/); | |
4b9b3959 | 1276 | #endif |
08e45a40 | 1277 | #ifdef FRAME_CHAIN_VALID |
4b9b3959 AC |
1278 | fprintf_unfiltered (file, |
1279 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1280 | "FRAME_CHAIN_VALID(chain, thisframe)", |
1281 | XSTRING (FRAME_CHAIN_VALID (chain, thisframe))); | |
1282 | if (GDB_MULTI_ARCH) | |
1283 | fprintf_unfiltered (file, | |
1284 | "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n", | |
1285 | (long) current_gdbarch->frame_chain_valid | |
1286 | /*FRAME_CHAIN_VALID ()*/); | |
4b9b3959 | 1287 | #endif |
08e45a40 AC |
1288 | #ifdef FRAME_INIT_SAVED_REGS |
1289 | #if GDB_MULTI_ARCH | |
666e11c5 EZ |
1290 | /* Macro might contain `[{}]' when not multi-arch */ |
1291 | fprintf_unfiltered (file, | |
1292 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1293 | "FRAME_INIT_SAVED_REGS(frame)", |
1294 | XSTRING (FRAME_INIT_SAVED_REGS (frame))); | |
666e11c5 | 1295 | #endif |
08e45a40 AC |
1296 | if (GDB_MULTI_ARCH) |
1297 | fprintf_unfiltered (file, | |
1298 | "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n", | |
1299 | (long) current_gdbarch->frame_init_saved_regs | |
1300 | /*FRAME_INIT_SAVED_REGS ()*/); | |
7c7651b2 | 1301 | #endif |
08e45a40 | 1302 | #ifdef FRAME_LOCALS_ADDRESS |
2649061d AC |
1303 | fprintf_unfiltered (file, |
1304 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1305 | "FRAME_LOCALS_ADDRESS(fi)", |
1306 | XSTRING (FRAME_LOCALS_ADDRESS (fi))); | |
1307 | if (GDB_MULTI_ARCH) | |
1308 | fprintf_unfiltered (file, | |
1309 | "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n", | |
1310 | (long) current_gdbarch->frame_locals_address | |
1311 | /*FRAME_LOCALS_ADDRESS ()*/); | |
2649061d | 1312 | #endif |
08e45a40 | 1313 | #ifdef FRAME_NUM_ARGS |
01fb7433 AC |
1314 | fprintf_unfiltered (file, |
1315 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1316 | "FRAME_NUM_ARGS(frame)", |
1317 | XSTRING (FRAME_NUM_ARGS (frame))); | |
1318 | if (GDB_MULTI_ARCH) | |
1319 | fprintf_unfiltered (file, | |
1320 | "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n", | |
1321 | (long) current_gdbarch->frame_num_args | |
1322 | /*FRAME_NUM_ARGS ()*/); | |
01fb7433 | 1323 | #endif |
08e45a40 | 1324 | #ifdef FRAME_SAVED_PC |
01fb7433 AC |
1325 | fprintf_unfiltered (file, |
1326 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1327 | "FRAME_SAVED_PC(fi)", |
1328 | XSTRING (FRAME_SAVED_PC (fi))); | |
1329 | if (GDB_MULTI_ARCH) | |
1330 | fprintf_unfiltered (file, | |
1331 | "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n", | |
1332 | (long) current_gdbarch->frame_saved_pc | |
1333 | /*FRAME_SAVED_PC ()*/); | |
01fb7433 | 1334 | #endif |
08e45a40 | 1335 | #ifdef FUNCTION_START_OFFSET |
4b9b3959 | 1336 | fprintf_unfiltered (file, |
08e45a40 AC |
1337 | "gdbarch_dump: FUNCTION_START_OFFSET # %s\n", |
1338 | XSTRING (FUNCTION_START_OFFSET)); | |
4b9b3959 | 1339 | fprintf_unfiltered (file, |
08e45a40 AC |
1340 | "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n", |
1341 | (long) FUNCTION_START_OFFSET); | |
4b9b3959 | 1342 | #endif |
9df628e0 RE |
1343 | #ifdef GET_LONGJMP_TARGET |
1344 | fprintf_unfiltered (file, | |
1345 | "gdbarch_dump: %s # %s\n", | |
1346 | "GET_LONGJMP_TARGET(pc)", | |
1347 | XSTRING (GET_LONGJMP_TARGET (pc))); | |
1348 | if (GDB_MULTI_ARCH) | |
1349 | fprintf_unfiltered (file, | |
1350 | "gdbarch_dump: GET_LONGJMP_TARGET = 0x%08lx\n", | |
1351 | (long) current_gdbarch->get_longjmp_target | |
1352 | /*GET_LONGJMP_TARGET ()*/); | |
1353 | #endif | |
08e45a40 AC |
1354 | #ifdef GET_SAVED_REGISTER |
1355 | #if GDB_MULTI_ARCH | |
1356 | /* Macro might contain `[{}]' when not multi-arch */ | |
4b9b3959 AC |
1357 | fprintf_unfiltered (file, |
1358 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1359 | "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)", |
1360 | XSTRING (GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval))); | |
4b9b3959 | 1361 | #endif |
08e45a40 AC |
1362 | if (GDB_MULTI_ARCH) |
1363 | fprintf_unfiltered (file, | |
1364 | "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n", | |
1365 | (long) current_gdbarch->get_saved_register | |
1366 | /*GET_SAVED_REGISTER ()*/); | |
4b9b3959 | 1367 | #endif |
08e45a40 AC |
1368 | #ifdef INIT_EXTRA_FRAME_INFO |
1369 | #if GDB_MULTI_ARCH | |
1370 | /* Macro might contain `[{}]' when not multi-arch */ | |
4b9b3959 AC |
1371 | fprintf_unfiltered (file, |
1372 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1373 | "INIT_EXTRA_FRAME_INFO(fromleaf, frame)", |
1374 | XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf, frame))); | |
4b9b3959 | 1375 | #endif |
08e45a40 AC |
1376 | if (GDB_MULTI_ARCH) |
1377 | fprintf_unfiltered (file, | |
1378 | "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n", | |
1379 | (long) current_gdbarch->init_extra_frame_info | |
1380 | /*INIT_EXTRA_FRAME_INFO ()*/); | |
4b9b3959 | 1381 | #endif |
5e74b15c | 1382 | #ifdef INIT_FRAME_PC |
08e45a40 | 1383 | #if GDB_MULTI_ARCH |
63e69063 | 1384 | /* Macro might contain `[{}]' when not multi-arch */ |
4b9b3959 AC |
1385 | fprintf_unfiltered (file, |
1386 | "gdbarch_dump: %s # %s\n", | |
5e74b15c RE |
1387 | "INIT_FRAME_PC(fromleaf, prev)", |
1388 | XSTRING (INIT_FRAME_PC (fromleaf, prev))); | |
08e45a40 AC |
1389 | #endif |
1390 | if (GDB_MULTI_ARCH) | |
1391 | fprintf_unfiltered (file, | |
5e74b15c RE |
1392 | "gdbarch_dump: INIT_FRAME_PC = 0x%08lx\n", |
1393 | (long) current_gdbarch->init_frame_pc | |
1394 | /*INIT_FRAME_PC ()*/); | |
4b9b3959 | 1395 | #endif |
5e74b15c | 1396 | #ifdef INIT_FRAME_PC_FIRST |
08e45a40 | 1397 | #if GDB_MULTI_ARCH |
10312cc4 AC |
1398 | /* Macro might contain `[{}]' when not multi-arch */ |
1399 | fprintf_unfiltered (file, | |
1400 | "gdbarch_dump: %s # %s\n", | |
5e74b15c RE |
1401 | "INIT_FRAME_PC_FIRST(fromleaf, prev)", |
1402 | XSTRING (INIT_FRAME_PC_FIRST (fromleaf, prev))); | |
10312cc4 | 1403 | #endif |
08e45a40 AC |
1404 | if (GDB_MULTI_ARCH) |
1405 | fprintf_unfiltered (file, | |
5e74b15c RE |
1406 | "gdbarch_dump: INIT_FRAME_PC_FIRST = 0x%08lx\n", |
1407 | (long) current_gdbarch->init_frame_pc_first | |
1408 | /*INIT_FRAME_PC_FIRST ()*/); | |
08e45a40 AC |
1409 | #endif |
1410 | #ifdef INNER_THAN | |
10312cc4 AC |
1411 | fprintf_unfiltered (file, |
1412 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1413 | "INNER_THAN(lhs, rhs)", |
1414 | XSTRING (INNER_THAN (lhs, rhs))); | |
1415 | if (GDB_MULTI_ARCH) | |
1416 | fprintf_unfiltered (file, | |
1417 | "gdbarch_dump: INNER_THAN = 0x%08lx\n", | |
1418 | (long) current_gdbarch->inner_than | |
1419 | /*INNER_THAN ()*/); | |
10312cc4 | 1420 | #endif |
fc0c74b1 AC |
1421 | #ifdef INTEGER_TO_ADDRESS |
1422 | fprintf_unfiltered (file, | |
1423 | "gdbarch_dump: %s # %s\n", | |
1424 | "INTEGER_TO_ADDRESS(type, buf)", | |
1425 | XSTRING (INTEGER_TO_ADDRESS (type, buf))); | |
1426 | if (GDB_MULTI_ARCH) | |
1427 | fprintf_unfiltered (file, | |
1428 | "gdbarch_dump: INTEGER_TO_ADDRESS = 0x%08lx\n", | |
1429 | (long) current_gdbarch->integer_to_address | |
1430 | /*INTEGER_TO_ADDRESS ()*/); | |
1431 | #endif | |
5e74b15c RE |
1432 | #ifdef IN_SOLIB_CALL_TRAMPOLINE |
1433 | fprintf_unfiltered (file, | |
1434 | "gdbarch_dump: %s # %s\n", | |
1435 | "IN_SOLIB_CALL_TRAMPOLINE(pc, name)", | |
1436 | XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc, name))); | |
68e9cc94 CV |
1437 | if (GDB_MULTI_ARCH) |
1438 | fprintf_unfiltered (file, | |
5e74b15c RE |
1439 | "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = 0x%08lx\n", |
1440 | (long) current_gdbarch->in_solib_call_trampoline | |
1441 | /*IN_SOLIB_CALL_TRAMPOLINE ()*/); | |
1442 | #endif | |
d50355b6 MS |
1443 | #ifdef IN_SOLIB_RETURN_TRAMPOLINE |
1444 | fprintf_unfiltered (file, | |
1445 | "gdbarch_dump: %s # %s\n", | |
1446 | "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)", | |
1447 | XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc, name))); | |
1448 | if (GDB_MULTI_ARCH) | |
1449 | fprintf_unfiltered (file, | |
1450 | "gdbarch_dump: IN_SOLIB_RETURN_TRAMPOLINE = 0x%08lx\n", | |
1451 | (long) current_gdbarch->in_solib_return_trampoline | |
1452 | /*IN_SOLIB_RETURN_TRAMPOLINE ()*/); | |
1453 | #endif | |
08e45a40 | 1454 | #ifdef MAX_REGISTER_RAW_SIZE |
4b9b3959 | 1455 | fprintf_unfiltered (file, |
08e45a40 AC |
1456 | "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n", |
1457 | XSTRING (MAX_REGISTER_RAW_SIZE)); | |
1458 | fprintf_unfiltered (file, | |
06b25f14 AC |
1459 | "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %d\n", |
1460 | MAX_REGISTER_RAW_SIZE); | |
4b9b3959 | 1461 | #endif |
08e45a40 | 1462 | #ifdef MAX_REGISTER_VIRTUAL_SIZE |
4b9b3959 | 1463 | fprintf_unfiltered (file, |
08e45a40 AC |
1464 | "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n", |
1465 | XSTRING (MAX_REGISTER_VIRTUAL_SIZE)); | |
1466 | fprintf_unfiltered (file, | |
06b25f14 AC |
1467 | "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %d\n", |
1468 | MAX_REGISTER_VIRTUAL_SIZE); | |
4b9b3959 | 1469 | #endif |
08e45a40 | 1470 | #ifdef MEMORY_INSERT_BREAKPOINT |
4b9b3959 AC |
1471 | fprintf_unfiltered (file, |
1472 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1473 | "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)", |
1474 | XSTRING (MEMORY_INSERT_BREAKPOINT (addr, contents_cache))); | |
1475 | if (GDB_MULTI_ARCH) | |
1476 | fprintf_unfiltered (file, | |
1477 | "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n", | |
1478 | (long) current_gdbarch->memory_insert_breakpoint | |
1479 | /*MEMORY_INSERT_BREAKPOINT ()*/); | |
4b9b3959 | 1480 | #endif |
08e45a40 | 1481 | #ifdef MEMORY_REMOVE_BREAKPOINT |
4b9b3959 AC |
1482 | fprintf_unfiltered (file, |
1483 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1484 | "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)", |
1485 | XSTRING (MEMORY_REMOVE_BREAKPOINT (addr, contents_cache))); | |
1486 | if (GDB_MULTI_ARCH) | |
1487 | fprintf_unfiltered (file, | |
1488 | "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n", | |
1489 | (long) current_gdbarch->memory_remove_breakpoint | |
1490 | /*MEMORY_REMOVE_BREAKPOINT ()*/); | |
4b9b3959 | 1491 | #endif |
5720643c JB |
1492 | #ifdef NAME_OF_MALLOC |
1493 | fprintf_unfiltered (file, | |
1494 | "gdbarch_dump: NAME_OF_MALLOC # %s\n", | |
1495 | XSTRING (NAME_OF_MALLOC)); | |
1496 | fprintf_unfiltered (file, | |
1497 | "gdbarch_dump: NAME_OF_MALLOC = %ld\n", | |
1498 | (long) NAME_OF_MALLOC); | |
1499 | #endif | |
08e45a40 | 1500 | #ifdef NPC_REGNUM |
4b9b3959 | 1501 | fprintf_unfiltered (file, |
08e45a40 AC |
1502 | "gdbarch_dump: NPC_REGNUM # %s\n", |
1503 | XSTRING (NPC_REGNUM)); | |
1504 | fprintf_unfiltered (file, | |
06b25f14 AC |
1505 | "gdbarch_dump: NPC_REGNUM = %d\n", |
1506 | NPC_REGNUM); | |
4b9b3959 | 1507 | #endif |
08e45a40 | 1508 | #ifdef NUM_PSEUDO_REGS |
4b9b3959 | 1509 | fprintf_unfiltered (file, |
08e45a40 AC |
1510 | "gdbarch_dump: NUM_PSEUDO_REGS # %s\n", |
1511 | XSTRING (NUM_PSEUDO_REGS)); | |
1512 | fprintf_unfiltered (file, | |
06b25f14 AC |
1513 | "gdbarch_dump: NUM_PSEUDO_REGS = %d\n", |
1514 | NUM_PSEUDO_REGS); | |
4b9b3959 | 1515 | #endif |
08e45a40 | 1516 | #ifdef NUM_REGS |
7f1b2585 | 1517 | fprintf_unfiltered (file, |
08e45a40 AC |
1518 | "gdbarch_dump: NUM_REGS # %s\n", |
1519 | XSTRING (NUM_REGS)); | |
1520 | fprintf_unfiltered (file, | |
06b25f14 AC |
1521 | "gdbarch_dump: NUM_REGS = %d\n", |
1522 | NUM_REGS); | |
7f1b2585 | 1523 | #endif |
08e45a40 AC |
1524 | #ifdef PARM_BOUNDARY |
1525 | fprintf_unfiltered (file, | |
1526 | "gdbarch_dump: PARM_BOUNDARY # %s\n", | |
1527 | XSTRING (PARM_BOUNDARY)); | |
1528 | fprintf_unfiltered (file, | |
06b25f14 AC |
1529 | "gdbarch_dump: PARM_BOUNDARY = %d\n", |
1530 | PARM_BOUNDARY); | |
08e45a40 AC |
1531 | #endif |
1532 | #ifdef PC_IN_CALL_DUMMY | |
7f1b2585 EZ |
1533 | fprintf_unfiltered (file, |
1534 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1535 | "PC_IN_CALL_DUMMY(pc, sp, frame_address)", |
1536 | XSTRING (PC_IN_CALL_DUMMY (pc, sp, frame_address))); | |
1537 | if (GDB_MULTI_ARCH) | |
1538 | fprintf_unfiltered (file, | |
1539 | "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n", | |
1540 | (long) current_gdbarch->pc_in_call_dummy | |
1541 | /*PC_IN_CALL_DUMMY ()*/); | |
1542 | #endif | |
d7bd68ca AC |
1543 | #ifdef PC_IN_SIGTRAMP |
1544 | fprintf_unfiltered (file, | |
1545 | "gdbarch_dump: %s # %s\n", | |
1546 | "PC_IN_SIGTRAMP(pc, name)", | |
1547 | XSTRING (PC_IN_SIGTRAMP (pc, name))); | |
1548 | if (GDB_MULTI_ARCH) | |
1549 | fprintf_unfiltered (file, | |
1550 | "gdbarch_dump: PC_IN_SIGTRAMP = 0x%08lx\n", | |
1551 | (long) current_gdbarch->pc_in_sigtramp | |
1552 | /*PC_IN_SIGTRAMP ()*/); | |
1553 | #endif | |
08e45a40 AC |
1554 | #ifdef PC_REGNUM |
1555 | fprintf_unfiltered (file, | |
1556 | "gdbarch_dump: PC_REGNUM # %s\n", | |
1557 | XSTRING (PC_REGNUM)); | |
1558 | fprintf_unfiltered (file, | |
06b25f14 AC |
1559 | "gdbarch_dump: PC_REGNUM = %d\n", |
1560 | PC_REGNUM); | |
7f1b2585 | 1561 | #endif |
4b9b3959 AC |
1562 | #ifdef POINTER_TO_ADDRESS |
1563 | fprintf_unfiltered (file, | |
1564 | "gdbarch_dump: %s # %s\n", | |
1565 | "POINTER_TO_ADDRESS(type, buf)", | |
1566 | XSTRING (POINTER_TO_ADDRESS (type, buf))); | |
08e45a40 AC |
1567 | if (GDB_MULTI_ARCH) |
1568 | fprintf_unfiltered (file, | |
1569 | "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n", | |
1570 | (long) current_gdbarch->pointer_to_address | |
1571 | /*POINTER_TO_ADDRESS ()*/); | |
4b9b3959 | 1572 | #endif |
08e45a40 AC |
1573 | #ifdef POP_FRAME |
1574 | #if GDB_MULTI_ARCH | |
63e69063 | 1575 | /* Macro might contain `[{}]' when not multi-arch */ |
4b9b3959 AC |
1576 | fprintf_unfiltered (file, |
1577 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1578 | "POP_FRAME(-)", |
1579 | XSTRING (POP_FRAME (-))); | |
4b9b3959 | 1580 | #endif |
08e45a40 AC |
1581 | if (GDB_MULTI_ARCH) |
1582 | fprintf_unfiltered (file, | |
1583 | "gdbarch_dump: POP_FRAME = 0x%08lx\n", | |
1584 | (long) current_gdbarch->pop_frame | |
1585 | /*POP_FRAME ()*/); | |
1586 | #endif | |
1587 | #ifdef PREPARE_TO_PROCEED | |
4b9b3959 AC |
1588 | fprintf_unfiltered (file, |
1589 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1590 | "PREPARE_TO_PROCEED(select_it)", |
1591 | XSTRING (PREPARE_TO_PROCEED (select_it))); | |
1592 | if (GDB_MULTI_ARCH) | |
1593 | fprintf_unfiltered (file, | |
1594 | "gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n", | |
1595 | (long) current_gdbarch->prepare_to_proceed | |
1596 | /*PREPARE_TO_PROCEED ()*/); | |
5e74b15c RE |
1597 | #endif |
1598 | if (GDB_MULTI_ARCH) | |
1599 | fprintf_unfiltered (file, | |
d855c300 AC |
1600 | "gdbarch_dump: print_float_info = 0x%08lx\n", |
1601 | (long) current_gdbarch->print_float_info); | |
0ab7a791 AC |
1602 | if (GDB_MULTI_ARCH) |
1603 | fprintf_unfiltered (file, | |
1604 | "gdbarch_dump: print_registers_info = 0x%08lx\n", | |
1605 | (long) current_gdbarch->print_registers_info); | |
e76f1f2e AC |
1606 | if (GDB_MULTI_ARCH) |
1607 | fprintf_unfiltered (file, | |
1608 | "gdbarch_dump: print_vector_info = 0x%08lx\n", | |
1609 | (long) current_gdbarch->print_vector_info); | |
08e45a40 | 1610 | #ifdef PROLOGUE_FRAMELESS_P |
4b9b3959 AC |
1611 | fprintf_unfiltered (file, |
1612 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1613 | "PROLOGUE_FRAMELESS_P(ip)", |
1614 | XSTRING (PROLOGUE_FRAMELESS_P (ip))); | |
1615 | if (GDB_MULTI_ARCH) | |
1616 | fprintf_unfiltered (file, | |
1617 | "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n", | |
1618 | (long) current_gdbarch->prologue_frameless_p | |
1619 | /*PROLOGUE_FRAMELESS_P ()*/); | |
4b9b3959 | 1620 | #endif |
c2169756 AC |
1621 | #ifdef PS_REGNUM |
1622 | fprintf_unfiltered (file, | |
1623 | "gdbarch_dump: PS_REGNUM # %s\n", | |
1624 | XSTRING (PS_REGNUM)); | |
1625 | fprintf_unfiltered (file, | |
1626 | "gdbarch_dump: PS_REGNUM = %d\n", | |
1627 | PS_REGNUM); | |
1628 | #endif | |
4b9b3959 AC |
1629 | #ifdef PUSH_ARGUMENTS |
1630 | fprintf_unfiltered (file, | |
1631 | "gdbarch_dump: %s # %s\n", | |
1632 | "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)", | |
1633 | XSTRING (PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr))); | |
08e45a40 AC |
1634 | if (GDB_MULTI_ARCH) |
1635 | fprintf_unfiltered (file, | |
1636 | "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n", | |
1637 | (long) current_gdbarch->push_arguments | |
1638 | /*PUSH_ARGUMENTS ()*/); | |
4b9b3959 | 1639 | #endif |
08e45a40 AC |
1640 | #ifdef PUSH_DUMMY_FRAME |
1641 | #if GDB_MULTI_ARCH | |
63e69063 | 1642 | /* Macro might contain `[{}]' when not multi-arch */ |
4b9b3959 AC |
1643 | fprintf_unfiltered (file, |
1644 | "gdbarch_dump: %s # %s\n", | |
1645 | "PUSH_DUMMY_FRAME(-)", | |
1646 | XSTRING (PUSH_DUMMY_FRAME (-))); | |
08e45a40 AC |
1647 | #endif |
1648 | if (GDB_MULTI_ARCH) | |
1649 | fprintf_unfiltered (file, | |
1650 | "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n", | |
1651 | (long) current_gdbarch->push_dummy_frame | |
1652 | /*PUSH_DUMMY_FRAME ()*/); | |
4b9b3959 AC |
1653 | #endif |
1654 | #ifdef PUSH_RETURN_ADDRESS | |
1655 | fprintf_unfiltered (file, | |
1656 | "gdbarch_dump: %s # %s\n", | |
1657 | "PUSH_RETURN_ADDRESS(pc, sp)", | |
1658 | XSTRING (PUSH_RETURN_ADDRESS (pc, sp))); | |
08e45a40 AC |
1659 | if (GDB_MULTI_ARCH) |
1660 | fprintf_unfiltered (file, | |
1661 | "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n", | |
1662 | (long) current_gdbarch->push_return_address | |
1663 | /*PUSH_RETURN_ADDRESS ()*/); | |
4b9b3959 | 1664 | #endif |
08e45a40 | 1665 | #ifdef REGISTER_BYTE |
4b9b3959 AC |
1666 | fprintf_unfiltered (file, |
1667 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1668 | "REGISTER_BYTE(reg_nr)", |
1669 | XSTRING (REGISTER_BYTE (reg_nr))); | |
1670 | if (GDB_MULTI_ARCH) | |
1671 | fprintf_unfiltered (file, | |
1672 | "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n", | |
1673 | (long) current_gdbarch->register_byte | |
1674 | /*REGISTER_BYTE ()*/); | |
4b9b3959 | 1675 | #endif |
08e45a40 | 1676 | #ifdef REGISTER_BYTES |
4b9b3959 | 1677 | fprintf_unfiltered (file, |
08e45a40 AC |
1678 | "gdbarch_dump: REGISTER_BYTES # %s\n", |
1679 | XSTRING (REGISTER_BYTES)); | |
4b9b3959 | 1680 | fprintf_unfiltered (file, |
06b25f14 AC |
1681 | "gdbarch_dump: REGISTER_BYTES = %d\n", |
1682 | REGISTER_BYTES); | |
4b9b3959 | 1683 | #endif |
08e45a40 | 1684 | #ifdef REGISTER_BYTES_OK |
4b9b3959 AC |
1685 | fprintf_unfiltered (file, |
1686 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1687 | "REGISTER_BYTES_OK(nr_bytes)", |
1688 | XSTRING (REGISTER_BYTES_OK (nr_bytes))); | |
1689 | if (GDB_MULTI_ARCH) | |
1690 | fprintf_unfiltered (file, | |
1691 | "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n", | |
1692 | (long) current_gdbarch->register_bytes_ok | |
1693 | /*REGISTER_BYTES_OK ()*/); | |
4b9b3959 | 1694 | #endif |
08e45a40 | 1695 | #ifdef REGISTER_CONVERTIBLE |
4b9b3959 AC |
1696 | fprintf_unfiltered (file, |
1697 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1698 | "REGISTER_CONVERTIBLE(nr)", |
1699 | XSTRING (REGISTER_CONVERTIBLE (nr))); | |
1700 | if (GDB_MULTI_ARCH) | |
1701 | fprintf_unfiltered (file, | |
1702 | "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n", | |
1703 | (long) current_gdbarch->register_convertible | |
1704 | /*REGISTER_CONVERTIBLE ()*/); | |
4b9b3959 | 1705 | #endif |
08e45a40 AC |
1706 | #ifdef REGISTER_CONVERT_TO_RAW |
1707 | #if GDB_MULTI_ARCH | |
63e69063 | 1708 | /* Macro might contain `[{}]' when not multi-arch */ |
4b9b3959 AC |
1709 | fprintf_unfiltered (file, |
1710 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1711 | "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)", |
1712 | XSTRING (REGISTER_CONVERT_TO_RAW (type, regnum, from, to))); | |
1713 | #endif | |
1714 | if (GDB_MULTI_ARCH) | |
1715 | fprintf_unfiltered (file, | |
1716 | "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n", | |
1717 | (long) current_gdbarch->register_convert_to_raw | |
1718 | /*REGISTER_CONVERT_TO_RAW ()*/); | |
4b9b3959 | 1719 | #endif |
08e45a40 AC |
1720 | #ifdef REGISTER_CONVERT_TO_VIRTUAL |
1721 | #if GDB_MULTI_ARCH | |
63e69063 | 1722 | /* Macro might contain `[{}]' when not multi-arch */ |
4b9b3959 AC |
1723 | fprintf_unfiltered (file, |
1724 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1725 | "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)", |
1726 | XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to))); | |
4b9b3959 | 1727 | #endif |
08e45a40 AC |
1728 | if (GDB_MULTI_ARCH) |
1729 | fprintf_unfiltered (file, | |
1730 | "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n", | |
1731 | (long) current_gdbarch->register_convert_to_virtual | |
1732 | /*REGISTER_CONVERT_TO_VIRTUAL ()*/); | |
4b9b3959 | 1733 | #endif |
08e45a40 | 1734 | #ifdef REGISTER_NAME |
4b9b3959 AC |
1735 | fprintf_unfiltered (file, |
1736 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1737 | "REGISTER_NAME(regnr)", |
1738 | XSTRING (REGISTER_NAME (regnr))); | |
1739 | if (GDB_MULTI_ARCH) | |
1740 | fprintf_unfiltered (file, | |
1741 | "gdbarch_dump: REGISTER_NAME = 0x%08lx\n", | |
1742 | (long) current_gdbarch->register_name | |
1743 | /*REGISTER_NAME ()*/); | |
4b9b3959 | 1744 | #endif |
08e45a40 | 1745 | #ifdef REGISTER_RAW_SIZE |
4b9b3959 AC |
1746 | fprintf_unfiltered (file, |
1747 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1748 | "REGISTER_RAW_SIZE(reg_nr)", |
1749 | XSTRING (REGISTER_RAW_SIZE (reg_nr))); | |
1750 | if (GDB_MULTI_ARCH) | |
1751 | fprintf_unfiltered (file, | |
1752 | "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n", | |
1753 | (long) current_gdbarch->register_raw_size | |
1754 | /*REGISTER_RAW_SIZE ()*/); | |
4b9b3959 | 1755 | #endif |
08e45a40 | 1756 | #ifdef REGISTER_SIM_REGNO |
4b9b3959 AC |
1757 | fprintf_unfiltered (file, |
1758 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1759 | "REGISTER_SIM_REGNO(reg_nr)", |
1760 | XSTRING (REGISTER_SIM_REGNO (reg_nr))); | |
1761 | if (GDB_MULTI_ARCH) | |
1762 | fprintf_unfiltered (file, | |
1763 | "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n", | |
1764 | (long) current_gdbarch->register_sim_regno | |
1765 | /*REGISTER_SIM_REGNO ()*/); | |
4b9b3959 | 1766 | #endif |
08e45a40 | 1767 | #ifdef REGISTER_SIZE |
4b9b3959 | 1768 | fprintf_unfiltered (file, |
08e45a40 AC |
1769 | "gdbarch_dump: REGISTER_SIZE # %s\n", |
1770 | XSTRING (REGISTER_SIZE)); | |
4b9b3959 | 1771 | fprintf_unfiltered (file, |
06b25f14 AC |
1772 | "gdbarch_dump: REGISTER_SIZE = %d\n", |
1773 | REGISTER_SIZE); | |
4b9b3959 | 1774 | #endif |
13d01224 AC |
1775 | #ifdef REGISTER_TO_VALUE |
1776 | #if GDB_MULTI_ARCH | |
1777 | /* Macro might contain `[{}]' when not multi-arch */ | |
1778 | fprintf_unfiltered (file, | |
1779 | "gdbarch_dump: %s # %s\n", | |
1780 | "REGISTER_TO_VALUE(regnum, type, from, to)", | |
1781 | XSTRING (REGISTER_TO_VALUE (regnum, type, from, to))); | |
1782 | #endif | |
1783 | if (GDB_MULTI_ARCH) | |
1784 | fprintf_unfiltered (file, | |
1785 | "gdbarch_dump: REGISTER_TO_VALUE = 0x%08lx\n", | |
1786 | (long) current_gdbarch->register_to_value | |
1787 | /*REGISTER_TO_VALUE ()*/); | |
1788 | #endif | |
08e45a40 | 1789 | #ifdef REGISTER_VIRTUAL_SIZE |
4b9b3959 | 1790 | fprintf_unfiltered (file, |
08e45a40 AC |
1791 | "gdbarch_dump: %s # %s\n", |
1792 | "REGISTER_VIRTUAL_SIZE(reg_nr)", | |
1793 | XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr))); | |
1794 | if (GDB_MULTI_ARCH) | |
1795 | fprintf_unfiltered (file, | |
1796 | "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n", | |
1797 | (long) current_gdbarch->register_virtual_size | |
1798 | /*REGISTER_VIRTUAL_SIZE ()*/); | |
4b9b3959 | 1799 | #endif |
08e45a40 | 1800 | #ifdef REGISTER_VIRTUAL_TYPE |
e02bc4cc DS |
1801 | fprintf_unfiltered (file, |
1802 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1803 | "REGISTER_VIRTUAL_TYPE(reg_nr)", |
1804 | XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr))); | |
1805 | if (GDB_MULTI_ARCH) | |
1806 | fprintf_unfiltered (file, | |
1807 | "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n", | |
1808 | (long) current_gdbarch->register_virtual_type | |
1809 | /*REGISTER_VIRTUAL_TYPE ()*/); | |
e02bc4cc | 1810 | #endif |
08e45a40 | 1811 | #ifdef REG_STRUCT_HAS_ADDR |
4b9b3959 | 1812 | fprintf_unfiltered (file, |
08e45a40 AC |
1813 | "gdbarch_dump: %s # %s\n", |
1814 | "REG_STRUCT_HAS_ADDR(gcc_p, type)", | |
1815 | XSTRING (REG_STRUCT_HAS_ADDR (gcc_p, type))); | |
1816 | if (GDB_MULTI_ARCH) | |
1817 | fprintf_unfiltered (file, | |
1818 | "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n", | |
1819 | (long) current_gdbarch->reg_struct_has_addr | |
1820 | /*REG_STRUCT_HAS_ADDR ()*/); | |
4b9b3959 | 1821 | #endif |
08e45a40 AC |
1822 | #ifdef REMOTE_TRANSLATE_XFER_ADDRESS |
1823 | #if GDB_MULTI_ARCH | |
63e69063 | 1824 | /* Macro might contain `[{}]' when not multi-arch */ |
4b9b3959 AC |
1825 | fprintf_unfiltered (file, |
1826 | "gdbarch_dump: %s # %s\n", | |
1827 | "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)", | |
1828 | XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr, gdb_len, rem_addr, rem_len))); | |
1829 | #endif | |
08e45a40 AC |
1830 | if (GDB_MULTI_ARCH) |
1831 | fprintf_unfiltered (file, | |
1832 | "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n", | |
1833 | (long) current_gdbarch->remote_translate_xfer_address | |
1834 | /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/); | |
4b9b3959 | 1835 | #endif |
08e45a40 | 1836 | #ifdef RETURN_VALUE_ON_STACK |
4b9b3959 AC |
1837 | fprintf_unfiltered (file, |
1838 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1839 | "RETURN_VALUE_ON_STACK(type)", |
1840 | XSTRING (RETURN_VALUE_ON_STACK (type))); | |
1841 | if (GDB_MULTI_ARCH) | |
1842 | fprintf_unfiltered (file, | |
1843 | "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n", | |
1844 | (long) current_gdbarch->return_value_on_stack | |
1845 | /*RETURN_VALUE_ON_STACK ()*/); | |
4b9b3959 | 1846 | #endif |
08e45a40 | 1847 | #ifdef SAVED_PC_AFTER_CALL |
4b9b3959 AC |
1848 | fprintf_unfiltered (file, |
1849 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1850 | "SAVED_PC_AFTER_CALL(frame)", |
1851 | XSTRING (SAVED_PC_AFTER_CALL (frame))); | |
1852 | if (GDB_MULTI_ARCH) | |
1853 | fprintf_unfiltered (file, | |
1854 | "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n", | |
1855 | (long) current_gdbarch->saved_pc_after_call | |
1856 | /*SAVED_PC_AFTER_CALL ()*/); | |
4b9b3959 | 1857 | #endif |
08e45a40 AC |
1858 | #ifdef SAVE_DUMMY_FRAME_TOS |
1859 | #if GDB_MULTI_ARCH | |
1860 | /* Macro might contain `[{}]' when not multi-arch */ | |
4b9b3959 AC |
1861 | fprintf_unfiltered (file, |
1862 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1863 | "SAVE_DUMMY_FRAME_TOS(sp)", |
1864 | XSTRING (SAVE_DUMMY_FRAME_TOS (sp))); | |
4b9b3959 | 1865 | #endif |
08e45a40 AC |
1866 | if (GDB_MULTI_ARCH) |
1867 | fprintf_unfiltered (file, | |
1868 | "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n", | |
1869 | (long) current_gdbarch->save_dummy_frame_tos | |
1870 | /*SAVE_DUMMY_FRAME_TOS ()*/); | |
4b9b3959 | 1871 | #endif |
08e45a40 | 1872 | #ifdef SDB_REG_TO_REGNUM |
4b9b3959 AC |
1873 | fprintf_unfiltered (file, |
1874 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1875 | "SDB_REG_TO_REGNUM(sdb_regnr)", |
1876 | XSTRING (SDB_REG_TO_REGNUM (sdb_regnr))); | |
1877 | if (GDB_MULTI_ARCH) | |
1878 | fprintf_unfiltered (file, | |
1879 | "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n", | |
1880 | (long) current_gdbarch->sdb_reg_to_regnum | |
1881 | /*SDB_REG_TO_REGNUM ()*/); | |
4b9b3959 | 1882 | #endif |
43156d82 MK |
1883 | #ifdef SIGTRAMP_END |
1884 | fprintf_unfiltered (file, | |
1885 | "gdbarch_dump: %s # %s\n", | |
1886 | "SIGTRAMP_END(pc)", | |
1887 | XSTRING (SIGTRAMP_END (pc))); | |
1888 | if (GDB_MULTI_ARCH) | |
1889 | fprintf_unfiltered (file, | |
1890 | "gdbarch_dump: SIGTRAMP_END = 0x%08lx\n", | |
1891 | (long) current_gdbarch->sigtramp_end | |
1892 | /*SIGTRAMP_END ()*/); | |
1893 | #endif | |
1894 | #ifdef SIGTRAMP_START | |
1895 | fprintf_unfiltered (file, | |
1896 | "gdbarch_dump: %s # %s\n", | |
1897 | "SIGTRAMP_START(pc)", | |
1898 | XSTRING (SIGTRAMP_START (pc))); | |
1899 | if (GDB_MULTI_ARCH) | |
1900 | fprintf_unfiltered (file, | |
1901 | "gdbarch_dump: SIGTRAMP_START = 0x%08lx\n", | |
1902 | (long) current_gdbarch->sigtramp_start | |
1903 | /*SIGTRAMP_START ()*/); | |
1904 | #endif | |
08e45a40 | 1905 | #ifdef SIZEOF_CALL_DUMMY_WORDS |
4b9b3959 | 1906 | fprintf_unfiltered (file, |
08e45a40 AC |
1907 | "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n", |
1908 | XSTRING (SIZEOF_CALL_DUMMY_WORDS)); | |
1909 | fprintf_unfiltered (file, | |
1910 | "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n", | |
1911 | (long) SIZEOF_CALL_DUMMY_WORDS); | |
4b9b3959 | 1912 | #endif |
08e45a40 | 1913 | #ifdef SKIP_PROLOGUE |
4b9b3959 AC |
1914 | fprintf_unfiltered (file, |
1915 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1916 | "SKIP_PROLOGUE(ip)", |
1917 | XSTRING (SKIP_PROLOGUE (ip))); | |
1918 | if (GDB_MULTI_ARCH) | |
1919 | fprintf_unfiltered (file, | |
1920 | "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n", | |
1921 | (long) current_gdbarch->skip_prologue | |
1922 | /*SKIP_PROLOGUE ()*/); | |
4b9b3959 | 1923 | #endif |
08e45a40 | 1924 | #ifdef SKIP_TRAMPOLINE_CODE |
4b9b3959 AC |
1925 | fprintf_unfiltered (file, |
1926 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1927 | "SKIP_TRAMPOLINE_CODE(pc)", |
1928 | XSTRING (SKIP_TRAMPOLINE_CODE (pc))); | |
1929 | if (GDB_MULTI_ARCH) | |
1930 | fprintf_unfiltered (file, | |
1931 | "gdbarch_dump: SKIP_TRAMPOLINE_CODE = 0x%08lx\n", | |
1932 | (long) current_gdbarch->skip_trampoline_code | |
1933 | /*SKIP_TRAMPOLINE_CODE ()*/); | |
4b9b3959 | 1934 | #endif |
181c1381 RE |
1935 | #ifdef SMASH_TEXT_ADDRESS |
1936 | fprintf_unfiltered (file, | |
1937 | "gdbarch_dump: %s # %s\n", | |
1938 | "SMASH_TEXT_ADDRESS(addr)", | |
1939 | XSTRING (SMASH_TEXT_ADDRESS (addr))); | |
1940 | if (GDB_MULTI_ARCH) | |
1941 | fprintf_unfiltered (file, | |
1942 | "gdbarch_dump: SMASH_TEXT_ADDRESS = 0x%08lx\n", | |
1943 | (long) current_gdbarch->smash_text_address | |
1944 | /*SMASH_TEXT_ADDRESS ()*/); | |
1945 | #endif | |
08e45a40 AC |
1946 | #ifdef SOFTWARE_SINGLE_STEP |
1947 | #if GDB_MULTI_ARCH | |
1948 | /* Macro might contain `[{}]' when not multi-arch */ | |
4b9b3959 AC |
1949 | fprintf_unfiltered (file, |
1950 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1951 | "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)", |
1952 | XSTRING (SOFTWARE_SINGLE_STEP (sig, insert_breakpoints_p))); | |
4b9b3959 | 1953 | #endif |
08e45a40 AC |
1954 | if (GDB_MULTI_ARCH) |
1955 | fprintf_unfiltered (file, | |
1956 | "gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n", | |
1957 | (long) current_gdbarch->software_single_step | |
1958 | /*SOFTWARE_SINGLE_STEP ()*/); | |
1959 | #endif | |
1960 | #ifdef SP_REGNUM | |
1dd4193b | 1961 | fprintf_unfiltered (file, |
08e45a40 AC |
1962 | "gdbarch_dump: SP_REGNUM # %s\n", |
1963 | XSTRING (SP_REGNUM)); | |
1964 | fprintf_unfiltered (file, | |
06b25f14 AC |
1965 | "gdbarch_dump: SP_REGNUM = %d\n", |
1966 | SP_REGNUM); | |
1dd4193b | 1967 | #endif |
08e45a40 | 1968 | #ifdef STAB_REG_TO_REGNUM |
4b9b3959 AC |
1969 | fprintf_unfiltered (file, |
1970 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1971 | "STAB_REG_TO_REGNUM(stab_regnr)", |
1972 | XSTRING (STAB_REG_TO_REGNUM (stab_regnr))); | |
1973 | if (GDB_MULTI_ARCH) | |
1974 | fprintf_unfiltered (file, | |
1975 | "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n", | |
1976 | (long) current_gdbarch->stab_reg_to_regnum | |
1977 | /*STAB_REG_TO_REGNUM ()*/); | |
4b9b3959 | 1978 | #endif |
08e45a40 | 1979 | #ifdef STACK_ALIGN |
4b9b3959 AC |
1980 | fprintf_unfiltered (file, |
1981 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1982 | "STACK_ALIGN(sp)", |
1983 | XSTRING (STACK_ALIGN (sp))); | |
1984 | if (GDB_MULTI_ARCH) | |
1985 | fprintf_unfiltered (file, | |
1986 | "gdbarch_dump: STACK_ALIGN = 0x%08lx\n", | |
1987 | (long) current_gdbarch->stack_align | |
1988 | /*STACK_ALIGN ()*/); | |
4b9b3959 | 1989 | #endif |
08e45a40 AC |
1990 | #ifdef STORE_RETURN_VALUE |
1991 | #if GDB_MULTI_ARCH | |
1992 | /* Macro might contain `[{}]' when not multi-arch */ | |
f517ea4e PS |
1993 | fprintf_unfiltered (file, |
1994 | "gdbarch_dump: %s # %s\n", | |
ebba8386 AC |
1995 | "STORE_RETURN_VALUE(type, regcache, valbuf)", |
1996 | XSTRING (STORE_RETURN_VALUE (type, regcache, valbuf))); | |
f517ea4e | 1997 | #endif |
08e45a40 AC |
1998 | if (GDB_MULTI_ARCH) |
1999 | fprintf_unfiltered (file, | |
2000 | "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n", | |
2001 | (long) current_gdbarch->store_return_value | |
2002 | /*STORE_RETURN_VALUE ()*/); | |
875e1767 | 2003 | #endif |
08e45a40 AC |
2004 | #ifdef STORE_STRUCT_RETURN |
2005 | #if GDB_MULTI_ARCH | |
64c4637f AC |
2006 | /* Macro might contain `[{}]' when not multi-arch */ |
2007 | fprintf_unfiltered (file, | |
2008 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
2009 | "STORE_STRUCT_RETURN(addr, sp)", |
2010 | XSTRING (STORE_STRUCT_RETURN (addr, sp))); | |
64c4637f | 2011 | #endif |
08e45a40 AC |
2012 | if (GDB_MULTI_ARCH) |
2013 | fprintf_unfiltered (file, | |
2014 | "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n", | |
2015 | (long) current_gdbarch->store_struct_return | |
2016 | /*STORE_STRUCT_RETURN ()*/); | |
2bf0cb65 | 2017 | #endif |
08e45a40 | 2018 | #ifdef TARGET_ADDR_BIT |
bdcd319a | 2019 | fprintf_unfiltered (file, |
08e45a40 AC |
2020 | "gdbarch_dump: TARGET_ADDR_BIT # %s\n", |
2021 | XSTRING (TARGET_ADDR_BIT)); | |
2022 | fprintf_unfiltered (file, | |
06b25f14 AC |
2023 | "gdbarch_dump: TARGET_ADDR_BIT = %d\n", |
2024 | TARGET_ADDR_BIT); | |
bdcd319a | 2025 | #endif |
381323f4 | 2026 | #ifdef TARGET_ARCHITECTURE |
08e45a40 AC |
2027 | fprintf_unfiltered (file, |
2028 | "gdbarch_dump: TARGET_ARCHITECTURE # %s\n", | |
2029 | XSTRING (TARGET_ARCHITECTURE)); | |
0f71a2f6 | 2030 | if (TARGET_ARCHITECTURE != NULL) |
4b9b3959 AC |
2031 | fprintf_unfiltered (file, |
2032 | "gdbarch_dump: TARGET_ARCHITECTURE = %s\n", | |
adf40b2e | 2033 | TARGET_ARCHITECTURE->printable_name); |
381323f4 | 2034 | #endif |
08e45a40 AC |
2035 | #ifdef TARGET_BFD_VMA_BIT |
2036 | fprintf_unfiltered (file, | |
2037 | "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n", | |
2038 | XSTRING (TARGET_BFD_VMA_BIT)); | |
2039 | fprintf_unfiltered (file, | |
06b25f14 AC |
2040 | "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n", |
2041 | TARGET_BFD_VMA_BIT); | |
08e45a40 | 2042 | #endif |
381323f4 | 2043 | #ifdef TARGET_BYTE_ORDER |
08e45a40 AC |
2044 | fprintf_unfiltered (file, |
2045 | "gdbarch_dump: TARGET_BYTE_ORDER # %s\n", | |
2046 | XSTRING (TARGET_BYTE_ORDER)); | |
4b9b3959 AC |
2047 | fprintf_unfiltered (file, |
2048 | "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n", | |
adf40b2e | 2049 | (long) TARGET_BYTE_ORDER); |
381323f4 | 2050 | #endif |
4e409299 JB |
2051 | #ifdef TARGET_CHAR_SIGNED |
2052 | fprintf_unfiltered (file, | |
2053 | "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n", | |
2054 | XSTRING (TARGET_CHAR_SIGNED)); | |
2055 | fprintf_unfiltered (file, | |
06b25f14 AC |
2056 | "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n", |
2057 | TARGET_CHAR_SIGNED); | |
4e409299 | 2058 | #endif |
08e45a40 | 2059 | #ifdef TARGET_DOUBLE_BIT |
4b9b3959 | 2060 | fprintf_unfiltered (file, |
08e45a40 AC |
2061 | "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n", |
2062 | XSTRING (TARGET_DOUBLE_BIT)); | |
4b9b3959 | 2063 | fprintf_unfiltered (file, |
06b25f14 AC |
2064 | "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n", |
2065 | TARGET_DOUBLE_BIT); | |
381323f4 | 2066 | #endif |
08e45a40 | 2067 | #ifdef TARGET_DOUBLE_FORMAT |
4b9b3959 | 2068 | fprintf_unfiltered (file, |
08e45a40 AC |
2069 | "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n", |
2070 | XSTRING (TARGET_DOUBLE_FORMAT)); | |
4b9b3959 | 2071 | fprintf_unfiltered (file, |
08e45a40 AC |
2072 | "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n", |
2073 | (long) TARGET_DOUBLE_FORMAT); | |
381323f4 AC |
2074 | #endif |
2075 | #ifdef TARGET_FLOAT_BIT | |
08e45a40 AC |
2076 | fprintf_unfiltered (file, |
2077 | "gdbarch_dump: TARGET_FLOAT_BIT # %s\n", | |
2078 | XSTRING (TARGET_FLOAT_BIT)); | |
4b9b3959 | 2079 | fprintf_unfiltered (file, |
06b25f14 AC |
2080 | "gdbarch_dump: TARGET_FLOAT_BIT = %d\n", |
2081 | TARGET_FLOAT_BIT); | |
381323f4 | 2082 | #endif |
08e45a40 | 2083 | #ifdef TARGET_FLOAT_FORMAT |
4b9b3959 | 2084 | fprintf_unfiltered (file, |
08e45a40 AC |
2085 | "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n", |
2086 | XSTRING (TARGET_FLOAT_FORMAT)); | |
2087 | fprintf_unfiltered (file, | |
2088 | "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n", | |
2089 | (long) TARGET_FLOAT_FORMAT); | |
2090 | #endif | |
2091 | #ifdef TARGET_INT_BIT | |
2092 | fprintf_unfiltered (file, | |
2093 | "gdbarch_dump: TARGET_INT_BIT # %s\n", | |
2094 | XSTRING (TARGET_INT_BIT)); | |
2095 | fprintf_unfiltered (file, | |
06b25f14 AC |
2096 | "gdbarch_dump: TARGET_INT_BIT = %d\n", |
2097 | TARGET_INT_BIT); | |
08e45a40 AC |
2098 | #endif |
2099 | #ifdef TARGET_LONG_BIT | |
2100 | fprintf_unfiltered (file, | |
2101 | "gdbarch_dump: TARGET_LONG_BIT # %s\n", | |
2102 | XSTRING (TARGET_LONG_BIT)); | |
2103 | fprintf_unfiltered (file, | |
06b25f14 AC |
2104 | "gdbarch_dump: TARGET_LONG_BIT = %d\n", |
2105 | TARGET_LONG_BIT); | |
381323f4 AC |
2106 | #endif |
2107 | #ifdef TARGET_LONG_DOUBLE_BIT | |
08e45a40 AC |
2108 | fprintf_unfiltered (file, |
2109 | "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n", | |
2110 | XSTRING (TARGET_LONG_DOUBLE_BIT)); | |
4b9b3959 | 2111 | fprintf_unfiltered (file, |
06b25f14 AC |
2112 | "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n", |
2113 | TARGET_LONG_DOUBLE_BIT); | |
381323f4 | 2114 | #endif |
08e45a40 | 2115 | #ifdef TARGET_LONG_DOUBLE_FORMAT |
66b43ecb | 2116 | fprintf_unfiltered (file, |
08e45a40 AC |
2117 | "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n", |
2118 | XSTRING (TARGET_LONG_DOUBLE_FORMAT)); | |
52204a0b | 2119 | fprintf_unfiltered (file, |
08e45a40 AC |
2120 | "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n", |
2121 | (long) TARGET_LONG_DOUBLE_FORMAT); | |
52204a0b | 2122 | #endif |
08e45a40 | 2123 | #ifdef TARGET_LONG_LONG_BIT |
66b43ecb | 2124 | fprintf_unfiltered (file, |
08e45a40 AC |
2125 | "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n", |
2126 | XSTRING (TARGET_LONG_LONG_BIT)); | |
4b9b3959 | 2127 | fprintf_unfiltered (file, |
06b25f14 AC |
2128 | "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n", |
2129 | TARGET_LONG_LONG_BIT); | |
381323f4 | 2130 | #endif |
08e45a40 AC |
2131 | #ifdef TARGET_PRINT_INSN |
2132 | fprintf_unfiltered (file, | |
2133 | "gdbarch_dump: %s # %s\n", | |
2134 | "TARGET_PRINT_INSN(vma, info)", | |
2135 | XSTRING (TARGET_PRINT_INSN (vma, info))); | |
4b9b3959 AC |
2136 | if (GDB_MULTI_ARCH) |
2137 | fprintf_unfiltered (file, | |
08e45a40 AC |
2138 | "gdbarch_dump: TARGET_PRINT_INSN = 0x%08lx\n", |
2139 | (long) current_gdbarch->print_insn | |
2140 | /*TARGET_PRINT_INSN ()*/); | |
381323f4 | 2141 | #endif |
08e45a40 AC |
2142 | #ifdef TARGET_PTR_BIT |
2143 | fprintf_unfiltered (file, | |
2144 | "gdbarch_dump: TARGET_PTR_BIT # %s\n", | |
2145 | XSTRING (TARGET_PTR_BIT)); | |
2146 | fprintf_unfiltered (file, | |
06b25f14 AC |
2147 | "gdbarch_dump: TARGET_PTR_BIT = %d\n", |
2148 | TARGET_PTR_BIT); | |
381323f4 AC |
2149 | #endif |
2150 | #ifdef TARGET_READ_FP | |
08e45a40 AC |
2151 | fprintf_unfiltered (file, |
2152 | "gdbarch_dump: %s # %s\n", | |
2153 | "TARGET_READ_FP()", | |
2154 | XSTRING (TARGET_READ_FP ())); | |
4b9b3959 AC |
2155 | if (GDB_MULTI_ARCH) |
2156 | fprintf_unfiltered (file, | |
2157 | "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n", | |
2158 | (long) current_gdbarch->read_fp | |
2159 | /*TARGET_READ_FP ()*/); | |
381323f4 | 2160 | #endif |
08e45a40 AC |
2161 | #ifdef TARGET_READ_PC |
2162 | fprintf_unfiltered (file, | |
2163 | "gdbarch_dump: %s # %s\n", | |
2164 | "TARGET_READ_PC(ptid)", | |
2165 | XSTRING (TARGET_READ_PC (ptid))); | |
4b9b3959 AC |
2166 | if (GDB_MULTI_ARCH) |
2167 | fprintf_unfiltered (file, | |
08e45a40 AC |
2168 | "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n", |
2169 | (long) current_gdbarch->read_pc | |
2170 | /*TARGET_READ_PC ()*/); | |
381323f4 AC |
2171 | #endif |
2172 | #ifdef TARGET_READ_SP | |
08e45a40 AC |
2173 | fprintf_unfiltered (file, |
2174 | "gdbarch_dump: %s # %s\n", | |
2175 | "TARGET_READ_SP()", | |
2176 | XSTRING (TARGET_READ_SP ())); | |
4b9b3959 AC |
2177 | if (GDB_MULTI_ARCH) |
2178 | fprintf_unfiltered (file, | |
2179 | "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n", | |
2180 | (long) current_gdbarch->read_sp | |
2181 | /*TARGET_READ_SP ()*/); | |
381323f4 | 2182 | #endif |
08e45a40 AC |
2183 | #ifdef TARGET_SHORT_BIT |
2184 | fprintf_unfiltered (file, | |
2185 | "gdbarch_dump: TARGET_SHORT_BIT # %s\n", | |
2186 | XSTRING (TARGET_SHORT_BIT)); | |
2187 | fprintf_unfiltered (file, | |
06b25f14 AC |
2188 | "gdbarch_dump: TARGET_SHORT_BIT = %d\n", |
2189 | TARGET_SHORT_BIT); | |
39d4ef09 AC |
2190 | #endif |
2191 | #ifdef TARGET_VIRTUAL_FRAME_POINTER | |
08e45a40 AC |
2192 | #if GDB_MULTI_ARCH |
2193 | /* Macro might contain `[{}]' when not multi-arch */ | |
2194 | fprintf_unfiltered (file, | |
2195 | "gdbarch_dump: %s # %s\n", | |
2196 | "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)", | |
2197 | XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc, frame_regnum, frame_offset))); | |
2198 | #endif | |
39d4ef09 AC |
2199 | if (GDB_MULTI_ARCH) |
2200 | fprintf_unfiltered (file, | |
2201 | "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = 0x%08lx\n", | |
2202 | (long) current_gdbarch->virtual_frame_pointer | |
2203 | /*TARGET_VIRTUAL_FRAME_POINTER ()*/); | |
381323f4 | 2204 | #endif |
08e45a40 AC |
2205 | #ifdef TARGET_WRITE_PC |
2206 | #if GDB_MULTI_ARCH | |
2207 | /* Macro might contain `[{}]' when not multi-arch */ | |
4b9b3959 | 2208 | fprintf_unfiltered (file, |
08e45a40 AC |
2209 | "gdbarch_dump: %s # %s\n", |
2210 | "TARGET_WRITE_PC(val, ptid)", | |
2211 | XSTRING (TARGET_WRITE_PC (val, ptid))); | |
381323f4 | 2212 | #endif |
4b9b3959 AC |
2213 | if (GDB_MULTI_ARCH) |
2214 | fprintf_unfiltered (file, | |
08e45a40 AC |
2215 | "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n", |
2216 | (long) current_gdbarch->write_pc | |
2217 | /*TARGET_WRITE_PC ()*/); | |
381323f4 | 2218 | #endif |
08e45a40 AC |
2219 | #ifdef TARGET_WRITE_SP |
2220 | #if GDB_MULTI_ARCH | |
2221 | /* Macro might contain `[{}]' when not multi-arch */ | |
4b9b3959 | 2222 | fprintf_unfiltered (file, |
08e45a40 AC |
2223 | "gdbarch_dump: %s # %s\n", |
2224 | "TARGET_WRITE_SP(val)", | |
2225 | XSTRING (TARGET_WRITE_SP (val))); | |
01fb7433 | 2226 | #endif |
01fb7433 AC |
2227 | if (GDB_MULTI_ARCH) |
2228 | fprintf_unfiltered (file, | |
08e45a40 AC |
2229 | "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n", |
2230 | (long) current_gdbarch->write_sp | |
2231 | /*TARGET_WRITE_SP ()*/); | |
01fb7433 | 2232 | #endif |
381323f4 | 2233 | #ifdef USE_GENERIC_DUMMY_FRAMES |
08e45a40 AC |
2234 | fprintf_unfiltered (file, |
2235 | "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n", | |
2236 | XSTRING (USE_GENERIC_DUMMY_FRAMES)); | |
4b9b3959 | 2237 | fprintf_unfiltered (file, |
06b25f14 AC |
2238 | "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %d\n", |
2239 | USE_GENERIC_DUMMY_FRAMES); | |
381323f4 | 2240 | #endif |
08e45a40 | 2241 | #ifdef USE_STRUCT_CONVENTION |
4b9b3959 | 2242 | fprintf_unfiltered (file, |
08e45a40 AC |
2243 | "gdbarch_dump: %s # %s\n", |
2244 | "USE_STRUCT_CONVENTION(gcc_p, value_type)", | |
2245 | XSTRING (USE_STRUCT_CONVENTION (gcc_p, value_type))); | |
4b9b3959 AC |
2246 | if (GDB_MULTI_ARCH) |
2247 | fprintf_unfiltered (file, | |
2248 | "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n", | |
2249 | (long) current_gdbarch->use_struct_convention | |
2250 | /*USE_STRUCT_CONVENTION ()*/); | |
13d01224 AC |
2251 | #endif |
2252 | #ifdef VALUE_TO_REGISTER | |
2253 | #if GDB_MULTI_ARCH | |
2254 | /* Macro might contain `[{}]' when not multi-arch */ | |
2255 | fprintf_unfiltered (file, | |
2256 | "gdbarch_dump: %s # %s\n", | |
2257 | "VALUE_TO_REGISTER(type, regnum, from, to)", | |
2258 | XSTRING (VALUE_TO_REGISTER (type, regnum, from, to))); | |
2259 | #endif | |
2260 | if (GDB_MULTI_ARCH) | |
2261 | fprintf_unfiltered (file, | |
2262 | "gdbarch_dump: VALUE_TO_REGISTER = 0x%08lx\n", | |
2263 | (long) current_gdbarch->value_to_register | |
2264 | /*VALUE_TO_REGISTER ()*/); | |
381323f4 | 2265 | #endif |
4b9b3959 AC |
2266 | if (current_gdbarch->dump_tdep != NULL) |
2267 | current_gdbarch->dump_tdep (current_gdbarch, file); | |
0f71a2f6 JM |
2268 | } |
2269 | ||
2270 | struct gdbarch_tdep * | |
104c1213 | 2271 | gdbarch_tdep (struct gdbarch *gdbarch) |
0f71a2f6 JM |
2272 | { |
2273 | if (gdbarch_debug >= 2) | |
0f71a2f6 JM |
2274 | fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n"); |
2275 | return gdbarch->tdep; | |
2276 | } | |
2277 | ||
2278 | ||
2279 | const struct bfd_arch_info * | |
104c1213 | 2280 | gdbarch_bfd_arch_info (struct gdbarch *gdbarch) |
0f71a2f6 | 2281 | { |
8de9bdc4 | 2282 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 2283 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2284 | fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n"); |
2285 | return gdbarch->bfd_arch_info; | |
2286 | } | |
2287 | ||
2288 | int | |
104c1213 | 2289 | gdbarch_byte_order (struct gdbarch *gdbarch) |
0f71a2f6 | 2290 | { |
8de9bdc4 | 2291 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 2292 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2293 | fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n"); |
2294 | return gdbarch->byte_order; | |
2295 | } | |
2296 | ||
0f71a2f6 | 2297 | int |
104c1213 | 2298 | gdbarch_short_bit (struct gdbarch *gdbarch) |
0f71a2f6 | 2299 | { |
8de9bdc4 | 2300 | gdb_assert (gdbarch != NULL); |
66b43ecb | 2301 | /* Skip verify of short_bit, invalid_p == 0 */ |
0f71a2f6 | 2302 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2303 | fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n"); |
2304 | return gdbarch->short_bit; | |
2305 | } | |
2306 | ||
2307 | void | |
104c1213 JM |
2308 | set_gdbarch_short_bit (struct gdbarch *gdbarch, |
2309 | int short_bit) | |
0f71a2f6 JM |
2310 | { |
2311 | gdbarch->short_bit = short_bit; | |
2312 | } | |
2313 | ||
2314 | int | |
104c1213 | 2315 | gdbarch_int_bit (struct gdbarch *gdbarch) |
0f71a2f6 | 2316 | { |
8de9bdc4 | 2317 | gdb_assert (gdbarch != NULL); |
66b43ecb | 2318 | /* Skip verify of int_bit, invalid_p == 0 */ |
0f71a2f6 | 2319 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2320 | fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n"); |
2321 | return gdbarch->int_bit; | |
2322 | } | |
2323 | ||
2324 | void | |
104c1213 JM |
2325 | set_gdbarch_int_bit (struct gdbarch *gdbarch, |
2326 | int int_bit) | |
0f71a2f6 JM |
2327 | { |
2328 | gdbarch->int_bit = int_bit; | |
2329 | } | |
2330 | ||
2331 | int | |
104c1213 | 2332 | gdbarch_long_bit (struct gdbarch *gdbarch) |
0f71a2f6 | 2333 | { |
8de9bdc4 | 2334 | gdb_assert (gdbarch != NULL); |
66b43ecb | 2335 | /* Skip verify of long_bit, invalid_p == 0 */ |
0f71a2f6 | 2336 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2337 | fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n"); |
2338 | return gdbarch->long_bit; | |
2339 | } | |
2340 | ||
2341 | void | |
104c1213 JM |
2342 | set_gdbarch_long_bit (struct gdbarch *gdbarch, |
2343 | int long_bit) | |
0f71a2f6 JM |
2344 | { |
2345 | gdbarch->long_bit = long_bit; | |
2346 | } | |
2347 | ||
2348 | int | |
104c1213 | 2349 | gdbarch_long_long_bit (struct gdbarch *gdbarch) |
0f71a2f6 | 2350 | { |
8de9bdc4 | 2351 | gdb_assert (gdbarch != NULL); |
66b43ecb | 2352 | /* Skip verify of long_long_bit, invalid_p == 0 */ |
0f71a2f6 | 2353 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2354 | fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n"); |
2355 | return gdbarch->long_long_bit; | |
2356 | } | |
2357 | ||
2358 | void | |
104c1213 JM |
2359 | set_gdbarch_long_long_bit (struct gdbarch *gdbarch, |
2360 | int long_long_bit) | |
0f71a2f6 JM |
2361 | { |
2362 | gdbarch->long_long_bit = long_long_bit; | |
2363 | } | |
2364 | ||
2365 | int | |
104c1213 | 2366 | gdbarch_float_bit (struct gdbarch *gdbarch) |
0f71a2f6 | 2367 | { |
8de9bdc4 | 2368 | gdb_assert (gdbarch != NULL); |
66b43ecb | 2369 | /* Skip verify of float_bit, invalid_p == 0 */ |
0f71a2f6 | 2370 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2371 | fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n"); |
2372 | return gdbarch->float_bit; | |
2373 | } | |
2374 | ||
2375 | void | |
104c1213 JM |
2376 | set_gdbarch_float_bit (struct gdbarch *gdbarch, |
2377 | int float_bit) | |
0f71a2f6 JM |
2378 | { |
2379 | gdbarch->float_bit = float_bit; | |
2380 | } | |
2381 | ||
2382 | int | |
104c1213 | 2383 | gdbarch_double_bit (struct gdbarch *gdbarch) |
0f71a2f6 | 2384 | { |
8de9bdc4 | 2385 | gdb_assert (gdbarch != NULL); |
66b43ecb | 2386 | /* Skip verify of double_bit, invalid_p == 0 */ |
0f71a2f6 | 2387 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2388 | fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n"); |
2389 | return gdbarch->double_bit; | |
2390 | } | |
2391 | ||
2392 | void | |
104c1213 JM |
2393 | set_gdbarch_double_bit (struct gdbarch *gdbarch, |
2394 | int double_bit) | |
0f71a2f6 JM |
2395 | { |
2396 | gdbarch->double_bit = double_bit; | |
2397 | } | |
2398 | ||
2399 | int | |
104c1213 | 2400 | gdbarch_long_double_bit (struct gdbarch *gdbarch) |
0f71a2f6 | 2401 | { |
8de9bdc4 | 2402 | gdb_assert (gdbarch != NULL); |
66b43ecb | 2403 | /* Skip verify of long_double_bit, invalid_p == 0 */ |
0f71a2f6 | 2404 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2405 | fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n"); |
2406 | return gdbarch->long_double_bit; | |
2407 | } | |
2408 | ||
2409 | void | |
104c1213 JM |
2410 | set_gdbarch_long_double_bit (struct gdbarch *gdbarch, |
2411 | int long_double_bit) | |
0f71a2f6 JM |
2412 | { |
2413 | gdbarch->long_double_bit = long_double_bit; | |
2414 | } | |
2415 | ||
66b43ecb AC |
2416 | int |
2417 | gdbarch_ptr_bit (struct gdbarch *gdbarch) | |
2418 | { | |
8de9bdc4 | 2419 | gdb_assert (gdbarch != NULL); |
66b43ecb AC |
2420 | /* Skip verify of ptr_bit, invalid_p == 0 */ |
2421 | if (gdbarch_debug >= 2) | |
2422 | fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n"); | |
2423 | return gdbarch->ptr_bit; | |
2424 | } | |
2425 | ||
2426 | void | |
2427 | set_gdbarch_ptr_bit (struct gdbarch *gdbarch, | |
2428 | int ptr_bit) | |
2429 | { | |
2430 | gdbarch->ptr_bit = ptr_bit; | |
2431 | } | |
2432 | ||
52204a0b DT |
2433 | int |
2434 | gdbarch_addr_bit (struct gdbarch *gdbarch) | |
2435 | { | |
8de9bdc4 | 2436 | gdb_assert (gdbarch != NULL); |
52204a0b | 2437 | if (gdbarch->addr_bit == 0) |
8e65ff28 AC |
2438 | internal_error (__FILE__, __LINE__, |
2439 | "gdbarch: gdbarch_addr_bit invalid"); | |
52204a0b DT |
2440 | if (gdbarch_debug >= 2) |
2441 | fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n"); | |
2442 | return gdbarch->addr_bit; | |
2443 | } | |
2444 | ||
2445 | void | |
2446 | set_gdbarch_addr_bit (struct gdbarch *gdbarch, | |
2447 | int addr_bit) | |
2448 | { | |
2449 | gdbarch->addr_bit = addr_bit; | |
2450 | } | |
2451 | ||
66b43ecb AC |
2452 | int |
2453 | gdbarch_bfd_vma_bit (struct gdbarch *gdbarch) | |
2454 | { | |
8de9bdc4 | 2455 | gdb_assert (gdbarch != NULL); |
66b43ecb AC |
2456 | /* Skip verify of bfd_vma_bit, invalid_p == 0 */ |
2457 | if (gdbarch_debug >= 2) | |
2458 | fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n"); | |
2459 | return gdbarch->bfd_vma_bit; | |
2460 | } | |
2461 | ||
2462 | void | |
2463 | set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch, | |
2464 | int bfd_vma_bit) | |
2465 | { | |
2466 | gdbarch->bfd_vma_bit = bfd_vma_bit; | |
2467 | } | |
2468 | ||
4e409299 JB |
2469 | int |
2470 | gdbarch_char_signed (struct gdbarch *gdbarch) | |
2471 | { | |
8de9bdc4 | 2472 | gdb_assert (gdbarch != NULL); |
4e409299 JB |
2473 | if (gdbarch->char_signed == -1) |
2474 | internal_error (__FILE__, __LINE__, | |
2475 | "gdbarch: gdbarch_char_signed invalid"); | |
2476 | if (gdbarch_debug >= 2) | |
2477 | fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n"); | |
2478 | return gdbarch->char_signed; | |
2479 | } | |
2480 | ||
2481 | void | |
2482 | set_gdbarch_char_signed (struct gdbarch *gdbarch, | |
2483 | int char_signed) | |
2484 | { | |
2485 | gdbarch->char_signed = char_signed; | |
2486 | } | |
2487 | ||
0f71a2f6 | 2488 | CORE_ADDR |
39f77062 | 2489 | gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid) |
0f71a2f6 | 2490 | { |
8de9bdc4 | 2491 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 2492 | if (gdbarch->read_pc == 0) |
8e65ff28 AC |
2493 | internal_error (__FILE__, __LINE__, |
2494 | "gdbarch: gdbarch_read_pc invalid"); | |
0f71a2f6 | 2495 | if (gdbarch_debug >= 2) |
0f71a2f6 | 2496 | fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n"); |
39f77062 | 2497 | return gdbarch->read_pc (ptid); |
0f71a2f6 JM |
2498 | } |
2499 | ||
2500 | void | |
104c1213 JM |
2501 | set_gdbarch_read_pc (struct gdbarch *gdbarch, |
2502 | gdbarch_read_pc_ftype read_pc) | |
0f71a2f6 JM |
2503 | { |
2504 | gdbarch->read_pc = read_pc; | |
2505 | } | |
2506 | ||
2507 | void | |
39f77062 | 2508 | gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid) |
0f71a2f6 | 2509 | { |
8de9bdc4 | 2510 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 2511 | if (gdbarch->write_pc == 0) |
8e65ff28 AC |
2512 | internal_error (__FILE__, __LINE__, |
2513 | "gdbarch: gdbarch_write_pc invalid"); | |
0f71a2f6 | 2514 | if (gdbarch_debug >= 2) |
0f71a2f6 | 2515 | fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n"); |
39f77062 | 2516 | gdbarch->write_pc (val, ptid); |
0f71a2f6 JM |
2517 | } |
2518 | ||
2519 | void | |
104c1213 JM |
2520 | set_gdbarch_write_pc (struct gdbarch *gdbarch, |
2521 | gdbarch_write_pc_ftype write_pc) | |
0f71a2f6 JM |
2522 | { |
2523 | gdbarch->write_pc = write_pc; | |
2524 | } | |
2525 | ||
2526 | CORE_ADDR | |
2527 | gdbarch_read_fp (struct gdbarch *gdbarch) | |
2528 | { | |
8de9bdc4 | 2529 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 2530 | if (gdbarch->read_fp == 0) |
8e65ff28 AC |
2531 | internal_error (__FILE__, __LINE__, |
2532 | "gdbarch: gdbarch_read_fp invalid"); | |
0f71a2f6 | 2533 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2534 | fprintf_unfiltered (gdb_stdlog, "gdbarch_read_fp called\n"); |
2535 | return gdbarch->read_fp (); | |
2536 | } | |
2537 | ||
2538 | void | |
104c1213 JM |
2539 | set_gdbarch_read_fp (struct gdbarch *gdbarch, |
2540 | gdbarch_read_fp_ftype read_fp) | |
0f71a2f6 JM |
2541 | { |
2542 | gdbarch->read_fp = read_fp; | |
2543 | } | |
2544 | ||
0f71a2f6 JM |
2545 | CORE_ADDR |
2546 | gdbarch_read_sp (struct gdbarch *gdbarch) | |
2547 | { | |
8de9bdc4 | 2548 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 2549 | if (gdbarch->read_sp == 0) |
8e65ff28 AC |
2550 | internal_error (__FILE__, __LINE__, |
2551 | "gdbarch: gdbarch_read_sp invalid"); | |
0f71a2f6 | 2552 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2553 | fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n"); |
2554 | return gdbarch->read_sp (); | |
2555 | } | |
2556 | ||
2557 | void | |
104c1213 JM |
2558 | set_gdbarch_read_sp (struct gdbarch *gdbarch, |
2559 | gdbarch_read_sp_ftype read_sp) | |
0f71a2f6 JM |
2560 | { |
2561 | gdbarch->read_sp = read_sp; | |
2562 | } | |
2563 | ||
2564 | void | |
2565 | gdbarch_write_sp (struct gdbarch *gdbarch, CORE_ADDR val) | |
2566 | { | |
8de9bdc4 | 2567 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 2568 | if (gdbarch->write_sp == 0) |
8e65ff28 AC |
2569 | internal_error (__FILE__, __LINE__, |
2570 | "gdbarch: gdbarch_write_sp invalid"); | |
0f71a2f6 | 2571 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2572 | fprintf_unfiltered (gdb_stdlog, "gdbarch_write_sp called\n"); |
2573 | gdbarch->write_sp (val); | |
2574 | } | |
2575 | ||
2576 | void | |
104c1213 JM |
2577 | set_gdbarch_write_sp (struct gdbarch *gdbarch, |
2578 | gdbarch_write_sp_ftype write_sp) | |
0f71a2f6 JM |
2579 | { |
2580 | gdbarch->write_sp = write_sp; | |
2581 | } | |
2582 | ||
39d4ef09 AC |
2583 | void |
2584 | gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset) | |
2585 | { | |
8de9bdc4 | 2586 | gdb_assert (gdbarch != NULL); |
39d4ef09 AC |
2587 | if (gdbarch->virtual_frame_pointer == 0) |
2588 | internal_error (__FILE__, __LINE__, | |
2589 | "gdbarch: gdbarch_virtual_frame_pointer invalid"); | |
2590 | if (gdbarch_debug >= 2) | |
2591 | fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n"); | |
2592 | gdbarch->virtual_frame_pointer (pc, frame_regnum, frame_offset); | |
2593 | } | |
2594 | ||
2595 | void | |
2596 | set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, | |
2597 | gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer) | |
2598 | { | |
2599 | gdbarch->virtual_frame_pointer = virtual_frame_pointer; | |
2600 | } | |
2601 | ||
61a0eb5b | 2602 | int |
d8124050 | 2603 | gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch) |
61a0eb5b | 2604 | { |
8de9bdc4 | 2605 | gdb_assert (gdbarch != NULL); |
d8124050 | 2606 | return gdbarch->pseudo_register_read != 0; |
61a0eb5b AC |
2607 | } |
2608 | ||
2609 | void | |
d8124050 | 2610 | gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf) |
61a0eb5b | 2611 | { |
8de9bdc4 | 2612 | gdb_assert (gdbarch != NULL); |
d8124050 | 2613 | if (gdbarch->pseudo_register_read == 0) |
61a0eb5b | 2614 | internal_error (__FILE__, __LINE__, |
d8124050 | 2615 | "gdbarch: gdbarch_pseudo_register_read invalid"); |
61a0eb5b | 2616 | if (gdbarch_debug >= 2) |
d8124050 AC |
2617 | fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n"); |
2618 | gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf); | |
61a0eb5b AC |
2619 | } |
2620 | ||
2621 | void | |
d8124050 AC |
2622 | set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch, |
2623 | gdbarch_pseudo_register_read_ftype pseudo_register_read) | |
61a0eb5b | 2624 | { |
d8124050 | 2625 | gdbarch->pseudo_register_read = pseudo_register_read; |
61a0eb5b AC |
2626 | } |
2627 | ||
2628 | int | |
d8124050 | 2629 | gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch) |
61a0eb5b | 2630 | { |
8de9bdc4 | 2631 | gdb_assert (gdbarch != NULL); |
d8124050 | 2632 | return gdbarch->pseudo_register_write != 0; |
61a0eb5b AC |
2633 | } |
2634 | ||
2635 | void | |
d8124050 | 2636 | gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf) |
61a0eb5b | 2637 | { |
8de9bdc4 | 2638 | gdb_assert (gdbarch != NULL); |
d8124050 | 2639 | if (gdbarch->pseudo_register_write == 0) |
61a0eb5b | 2640 | internal_error (__FILE__, __LINE__, |
d8124050 | 2641 | "gdbarch: gdbarch_pseudo_register_write invalid"); |
61a0eb5b | 2642 | if (gdbarch_debug >= 2) |
d8124050 AC |
2643 | fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n"); |
2644 | gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf); | |
61a0eb5b AC |
2645 | } |
2646 | ||
2647 | void | |
d8124050 AC |
2648 | set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch, |
2649 | gdbarch_pseudo_register_write_ftype pseudo_register_write) | |
61a0eb5b | 2650 | { |
d8124050 | 2651 | gdbarch->pseudo_register_write = pseudo_register_write; |
61a0eb5b AC |
2652 | } |
2653 | ||
0f71a2f6 | 2654 | int |
104c1213 | 2655 | gdbarch_num_regs (struct gdbarch *gdbarch) |
0f71a2f6 | 2656 | { |
8de9bdc4 | 2657 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 2658 | if (gdbarch->num_regs == -1) |
8e65ff28 AC |
2659 | internal_error (__FILE__, __LINE__, |
2660 | "gdbarch: gdbarch_num_regs invalid"); | |
0f71a2f6 | 2661 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2662 | fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n"); |
2663 | return gdbarch->num_regs; | |
2664 | } | |
2665 | ||
2666 | void | |
104c1213 JM |
2667 | set_gdbarch_num_regs (struct gdbarch *gdbarch, |
2668 | int num_regs) | |
0f71a2f6 JM |
2669 | { |
2670 | gdbarch->num_regs = num_regs; | |
2671 | } | |
2672 | ||
0aba1244 EZ |
2673 | int |
2674 | gdbarch_num_pseudo_regs (struct gdbarch *gdbarch) | |
2675 | { | |
8de9bdc4 | 2676 | gdb_assert (gdbarch != NULL); |
0aba1244 EZ |
2677 | /* Skip verify of num_pseudo_regs, invalid_p == 0 */ |
2678 | if (gdbarch_debug >= 2) | |
2679 | fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n"); | |
2680 | return gdbarch->num_pseudo_regs; | |
2681 | } | |
2682 | ||
2683 | void | |
2684 | set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch, | |
2685 | int num_pseudo_regs) | |
2686 | { | |
2687 | gdbarch->num_pseudo_regs = num_pseudo_regs; | |
2688 | } | |
2689 | ||
0f71a2f6 | 2690 | int |
104c1213 | 2691 | gdbarch_sp_regnum (struct gdbarch *gdbarch) |
0f71a2f6 | 2692 | { |
8de9bdc4 | 2693 | gdb_assert (gdbarch != NULL); |
1200cd6e | 2694 | /* Skip verify of sp_regnum, invalid_p == 0 */ |
0f71a2f6 | 2695 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2696 | fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n"); |
2697 | return gdbarch->sp_regnum; | |
2698 | } | |
2699 | ||
2700 | void | |
104c1213 JM |
2701 | set_gdbarch_sp_regnum (struct gdbarch *gdbarch, |
2702 | int sp_regnum) | |
0f71a2f6 JM |
2703 | { |
2704 | gdbarch->sp_regnum = sp_regnum; | |
2705 | } | |
2706 | ||
2707 | int | |
104c1213 | 2708 | gdbarch_fp_regnum (struct gdbarch *gdbarch) |
0f71a2f6 | 2709 | { |
8de9bdc4 | 2710 | gdb_assert (gdbarch != NULL); |
1200cd6e | 2711 | /* Skip verify of fp_regnum, invalid_p == 0 */ |
0f71a2f6 | 2712 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2713 | fprintf_unfiltered (gdb_stdlog, "gdbarch_fp_regnum called\n"); |
2714 | return gdbarch->fp_regnum; | |
2715 | } | |
2716 | ||
2717 | void | |
104c1213 JM |
2718 | set_gdbarch_fp_regnum (struct gdbarch *gdbarch, |
2719 | int fp_regnum) | |
0f71a2f6 JM |
2720 | { |
2721 | gdbarch->fp_regnum = fp_regnum; | |
2722 | } | |
2723 | ||
2724 | int | |
104c1213 | 2725 | gdbarch_pc_regnum (struct gdbarch *gdbarch) |
0f71a2f6 | 2726 | { |
8de9bdc4 | 2727 | gdb_assert (gdbarch != NULL); |
1200cd6e | 2728 | /* Skip verify of pc_regnum, invalid_p == 0 */ |
0f71a2f6 | 2729 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2730 | fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n"); |
2731 | return gdbarch->pc_regnum; | |
2732 | } | |
2733 | ||
2734 | void | |
104c1213 JM |
2735 | set_gdbarch_pc_regnum (struct gdbarch *gdbarch, |
2736 | int pc_regnum) | |
0f71a2f6 JM |
2737 | { |
2738 | gdbarch->pc_regnum = pc_regnum; | |
2739 | } | |
2740 | ||
c2169756 AC |
2741 | int |
2742 | gdbarch_ps_regnum (struct gdbarch *gdbarch) | |
2743 | { | |
8de9bdc4 | 2744 | gdb_assert (gdbarch != NULL); |
c2169756 AC |
2745 | /* Skip verify of ps_regnum, invalid_p == 0 */ |
2746 | if (gdbarch_debug >= 2) | |
2747 | fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n"); | |
2748 | return gdbarch->ps_regnum; | |
2749 | } | |
2750 | ||
2751 | void | |
2752 | set_gdbarch_ps_regnum (struct gdbarch *gdbarch, | |
2753 | int ps_regnum) | |
2754 | { | |
2755 | gdbarch->ps_regnum = ps_regnum; | |
2756 | } | |
2757 | ||
60054393 MS |
2758 | int |
2759 | gdbarch_fp0_regnum (struct gdbarch *gdbarch) | |
2760 | { | |
8de9bdc4 | 2761 | gdb_assert (gdbarch != NULL); |
60054393 MS |
2762 | /* Skip verify of fp0_regnum, invalid_p == 0 */ |
2763 | if (gdbarch_debug >= 2) | |
2764 | fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n"); | |
2765 | return gdbarch->fp0_regnum; | |
2766 | } | |
2767 | ||
2768 | void | |
2769 | set_gdbarch_fp0_regnum (struct gdbarch *gdbarch, | |
2770 | int fp0_regnum) | |
2771 | { | |
2772 | gdbarch->fp0_regnum = fp0_regnum; | |
2773 | } | |
2774 | ||
03863182 AC |
2775 | int |
2776 | gdbarch_npc_regnum (struct gdbarch *gdbarch) | |
2777 | { | |
8de9bdc4 | 2778 | gdb_assert (gdbarch != NULL); |
03863182 AC |
2779 | /* Skip verify of npc_regnum, invalid_p == 0 */ |
2780 | if (gdbarch_debug >= 2) | |
2781 | fprintf_unfiltered (gdb_stdlog, "gdbarch_npc_regnum called\n"); | |
2782 | return gdbarch->npc_regnum; | |
2783 | } | |
2784 | ||
2785 | void | |
2786 | set_gdbarch_npc_regnum (struct gdbarch *gdbarch, | |
2787 | int npc_regnum) | |
2788 | { | |
2789 | gdbarch->npc_regnum = npc_regnum; | |
2790 | } | |
2791 | ||
88c72b7d AC |
2792 | int |
2793 | gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr) | |
2794 | { | |
8de9bdc4 | 2795 | gdb_assert (gdbarch != NULL); |
88c72b7d | 2796 | if (gdbarch->stab_reg_to_regnum == 0) |
8e65ff28 AC |
2797 | internal_error (__FILE__, __LINE__, |
2798 | "gdbarch: gdbarch_stab_reg_to_regnum invalid"); | |
88c72b7d AC |
2799 | if (gdbarch_debug >= 2) |
2800 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n"); | |
2801 | return gdbarch->stab_reg_to_regnum (stab_regnr); | |
2802 | } | |
2803 | ||
2804 | void | |
2805 | set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, | |
2806 | gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum) | |
2807 | { | |
2808 | gdbarch->stab_reg_to_regnum = stab_reg_to_regnum; | |
2809 | } | |
2810 | ||
2811 | int | |
2812 | gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr) | |
2813 | { | |
8de9bdc4 | 2814 | gdb_assert (gdbarch != NULL); |
88c72b7d | 2815 | if (gdbarch->ecoff_reg_to_regnum == 0) |
8e65ff28 AC |
2816 | internal_error (__FILE__, __LINE__, |
2817 | "gdbarch: gdbarch_ecoff_reg_to_regnum invalid"); | |
88c72b7d AC |
2818 | if (gdbarch_debug >= 2) |
2819 | fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n"); | |
2820 | return gdbarch->ecoff_reg_to_regnum (ecoff_regnr); | |
2821 | } | |
2822 | ||
2823 | void | |
2824 | set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, | |
2825 | gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum) | |
2826 | { | |
2827 | gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum; | |
2828 | } | |
2829 | ||
2830 | int | |
2831 | gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr) | |
2832 | { | |
8de9bdc4 | 2833 | gdb_assert (gdbarch != NULL); |
88c72b7d | 2834 | if (gdbarch->dwarf_reg_to_regnum == 0) |
8e65ff28 AC |
2835 | internal_error (__FILE__, __LINE__, |
2836 | "gdbarch: gdbarch_dwarf_reg_to_regnum invalid"); | |
88c72b7d AC |
2837 | if (gdbarch_debug >= 2) |
2838 | fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf_reg_to_regnum called\n"); | |
2839 | return gdbarch->dwarf_reg_to_regnum (dwarf_regnr); | |
2840 | } | |
2841 | ||
2842 | void | |
2843 | set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, | |
2844 | gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum) | |
2845 | { | |
2846 | gdbarch->dwarf_reg_to_regnum = dwarf_reg_to_regnum; | |
2847 | } | |
2848 | ||
2849 | int | |
2850 | gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr) | |
2851 | { | |
8de9bdc4 | 2852 | gdb_assert (gdbarch != NULL); |
88c72b7d | 2853 | if (gdbarch->sdb_reg_to_regnum == 0) |
8e65ff28 AC |
2854 | internal_error (__FILE__, __LINE__, |
2855 | "gdbarch: gdbarch_sdb_reg_to_regnum invalid"); | |
88c72b7d AC |
2856 | if (gdbarch_debug >= 2) |
2857 | fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n"); | |
2858 | return gdbarch->sdb_reg_to_regnum (sdb_regnr); | |
2859 | } | |
2860 | ||
2861 | void | |
2862 | set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, | |
2863 | gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum) | |
2864 | { | |
2865 | gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum; | |
2866 | } | |
2867 | ||
2868 | int | |
2869 | gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr) | |
2870 | { | |
8de9bdc4 | 2871 | gdb_assert (gdbarch != NULL); |
88c72b7d | 2872 | if (gdbarch->dwarf2_reg_to_regnum == 0) |
8e65ff28 AC |
2873 | internal_error (__FILE__, __LINE__, |
2874 | "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid"); | |
88c72b7d AC |
2875 | if (gdbarch_debug >= 2) |
2876 | fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n"); | |
2877 | return gdbarch->dwarf2_reg_to_regnum (dwarf2_regnr); | |
2878 | } | |
2879 | ||
2880 | void | |
2881 | set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, | |
2882 | gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum) | |
2883 | { | |
2884 | gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum; | |
2885 | } | |
2886 | ||
fa88f677 | 2887 | const char * |
0f71a2f6 JM |
2888 | gdbarch_register_name (struct gdbarch *gdbarch, int regnr) |
2889 | { | |
8de9bdc4 | 2890 | gdb_assert (gdbarch != NULL); |
7be570e7 | 2891 | if (gdbarch->register_name == 0) |
8e65ff28 AC |
2892 | internal_error (__FILE__, __LINE__, |
2893 | "gdbarch: gdbarch_register_name invalid"); | |
0f71a2f6 | 2894 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2895 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n"); |
2896 | return gdbarch->register_name (regnr); | |
2897 | } | |
2898 | ||
2899 | void | |
104c1213 JM |
2900 | set_gdbarch_register_name (struct gdbarch *gdbarch, |
2901 | gdbarch_register_name_ftype register_name) | |
0f71a2f6 JM |
2902 | { |
2903 | gdbarch->register_name = register_name; | |
2904 | } | |
2905 | ||
2906 | int | |
104c1213 | 2907 | gdbarch_register_size (struct gdbarch *gdbarch) |
0f71a2f6 | 2908 | { |
8de9bdc4 | 2909 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 2910 | if (gdbarch->register_size == -1) |
8e65ff28 AC |
2911 | internal_error (__FILE__, __LINE__, |
2912 | "gdbarch: gdbarch_register_size invalid"); | |
0f71a2f6 | 2913 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2914 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_size called\n"); |
2915 | return gdbarch->register_size; | |
2916 | } | |
2917 | ||
2918 | void | |
104c1213 JM |
2919 | set_gdbarch_register_size (struct gdbarch *gdbarch, |
2920 | int register_size) | |
0f71a2f6 JM |
2921 | { |
2922 | gdbarch->register_size = register_size; | |
2923 | } | |
2924 | ||
2925 | int | |
104c1213 | 2926 | gdbarch_register_bytes (struct gdbarch *gdbarch) |
0f71a2f6 | 2927 | { |
8de9bdc4 | 2928 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 2929 | if (gdbarch->register_bytes == -1) |
8e65ff28 AC |
2930 | internal_error (__FILE__, __LINE__, |
2931 | "gdbarch: gdbarch_register_bytes invalid"); | |
0f71a2f6 | 2932 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2933 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes called\n"); |
2934 | return gdbarch->register_bytes; | |
2935 | } | |
2936 | ||
2937 | void | |
104c1213 JM |
2938 | set_gdbarch_register_bytes (struct gdbarch *gdbarch, |
2939 | int register_bytes) | |
0f71a2f6 JM |
2940 | { |
2941 | gdbarch->register_bytes = register_bytes; | |
2942 | } | |
2943 | ||
2944 | int | |
2945 | gdbarch_register_byte (struct gdbarch *gdbarch, int reg_nr) | |
2946 | { | |
8de9bdc4 | 2947 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 2948 | if (gdbarch->register_byte == 0) |
8e65ff28 AC |
2949 | internal_error (__FILE__, __LINE__, |
2950 | "gdbarch: gdbarch_register_byte invalid"); | |
0f71a2f6 | 2951 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2952 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_byte called\n"); |
2953 | return gdbarch->register_byte (reg_nr); | |
2954 | } | |
2955 | ||
2956 | void | |
104c1213 JM |
2957 | set_gdbarch_register_byte (struct gdbarch *gdbarch, |
2958 | gdbarch_register_byte_ftype register_byte) | |
0f71a2f6 JM |
2959 | { |
2960 | gdbarch->register_byte = register_byte; | |
2961 | } | |
2962 | ||
2963 | int | |
2964 | gdbarch_register_raw_size (struct gdbarch *gdbarch, int reg_nr) | |
2965 | { | |
8de9bdc4 | 2966 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 2967 | if (gdbarch->register_raw_size == 0) |
8e65ff28 AC |
2968 | internal_error (__FILE__, __LINE__, |
2969 | "gdbarch: gdbarch_register_raw_size invalid"); | |
0f71a2f6 | 2970 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2971 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_raw_size called\n"); |
2972 | return gdbarch->register_raw_size (reg_nr); | |
2973 | } | |
2974 | ||
2975 | void | |
104c1213 JM |
2976 | set_gdbarch_register_raw_size (struct gdbarch *gdbarch, |
2977 | gdbarch_register_raw_size_ftype register_raw_size) | |
0f71a2f6 JM |
2978 | { |
2979 | gdbarch->register_raw_size = register_raw_size; | |
2980 | } | |
2981 | ||
2982 | int | |
104c1213 | 2983 | gdbarch_max_register_raw_size (struct gdbarch *gdbarch) |
0f71a2f6 | 2984 | { |
8de9bdc4 | 2985 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 2986 | if (gdbarch->max_register_raw_size == -1) |
8e65ff28 AC |
2987 | internal_error (__FILE__, __LINE__, |
2988 | "gdbarch: gdbarch_max_register_raw_size invalid"); | |
0f71a2f6 | 2989 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2990 | fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_raw_size called\n"); |
2991 | return gdbarch->max_register_raw_size; | |
2992 | } | |
2993 | ||
2994 | void | |
104c1213 JM |
2995 | set_gdbarch_max_register_raw_size (struct gdbarch *gdbarch, |
2996 | int max_register_raw_size) | |
0f71a2f6 JM |
2997 | { |
2998 | gdbarch->max_register_raw_size = max_register_raw_size; | |
2999 | } | |
3000 | ||
3001 | int | |
3002 | gdbarch_register_virtual_size (struct gdbarch *gdbarch, int reg_nr) | |
3003 | { | |
8de9bdc4 | 3004 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 3005 | if (gdbarch->register_virtual_size == 0) |
8e65ff28 AC |
3006 | internal_error (__FILE__, __LINE__, |
3007 | "gdbarch: gdbarch_register_virtual_size invalid"); | |
0f71a2f6 | 3008 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3009 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_size called\n"); |
3010 | return gdbarch->register_virtual_size (reg_nr); | |
3011 | } | |
3012 | ||
3013 | void | |
104c1213 JM |
3014 | set_gdbarch_register_virtual_size (struct gdbarch *gdbarch, |
3015 | gdbarch_register_virtual_size_ftype register_virtual_size) | |
0f71a2f6 JM |
3016 | { |
3017 | gdbarch->register_virtual_size = register_virtual_size; | |
3018 | } | |
3019 | ||
3020 | int | |
104c1213 | 3021 | gdbarch_max_register_virtual_size (struct gdbarch *gdbarch) |
0f71a2f6 | 3022 | { |
8de9bdc4 | 3023 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 3024 | if (gdbarch->max_register_virtual_size == -1) |
8e65ff28 AC |
3025 | internal_error (__FILE__, __LINE__, |
3026 | "gdbarch: gdbarch_max_register_virtual_size invalid"); | |
0f71a2f6 | 3027 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3028 | fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_virtual_size called\n"); |
3029 | return gdbarch->max_register_virtual_size; | |
3030 | } | |
3031 | ||
3032 | void | |
104c1213 JM |
3033 | set_gdbarch_max_register_virtual_size (struct gdbarch *gdbarch, |
3034 | int max_register_virtual_size) | |
0f71a2f6 JM |
3035 | { |
3036 | gdbarch->max_register_virtual_size = max_register_virtual_size; | |
3037 | } | |
3038 | ||
3039 | struct type * | |
3040 | gdbarch_register_virtual_type (struct gdbarch *gdbarch, int reg_nr) | |
3041 | { | |
8de9bdc4 | 3042 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 3043 | if (gdbarch->register_virtual_type == 0) |
8e65ff28 AC |
3044 | internal_error (__FILE__, __LINE__, |
3045 | "gdbarch: gdbarch_register_virtual_type invalid"); | |
0f71a2f6 | 3046 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3047 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_type called\n"); |
3048 | return gdbarch->register_virtual_type (reg_nr); | |
3049 | } | |
3050 | ||
3051 | void | |
104c1213 JM |
3052 | set_gdbarch_register_virtual_type (struct gdbarch *gdbarch, |
3053 | gdbarch_register_virtual_type_ftype register_virtual_type) | |
0f71a2f6 JM |
3054 | { |
3055 | gdbarch->register_virtual_type = register_virtual_type; | |
3056 | } | |
3057 | ||
0ab7a791 AC |
3058 | int |
3059 | gdbarch_do_registers_info_p (struct gdbarch *gdbarch) | |
3060 | { | |
3061 | gdb_assert (gdbarch != NULL); | |
3062 | return gdbarch->do_registers_info != 0; | |
3063 | } | |
3064 | ||
666e11c5 EZ |
3065 | void |
3066 | gdbarch_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs) | |
3067 | { | |
8de9bdc4 | 3068 | gdb_assert (gdbarch != NULL); |
666e11c5 | 3069 | if (gdbarch->do_registers_info == 0) |
8e65ff28 AC |
3070 | internal_error (__FILE__, __LINE__, |
3071 | "gdbarch: gdbarch_do_registers_info invalid"); | |
666e11c5 EZ |
3072 | if (gdbarch_debug >= 2) |
3073 | fprintf_unfiltered (gdb_stdlog, "gdbarch_do_registers_info called\n"); | |
3074 | gdbarch->do_registers_info (reg_nr, fpregs); | |
3075 | } | |
3076 | ||
3077 | void | |
3078 | set_gdbarch_do_registers_info (struct gdbarch *gdbarch, | |
3079 | gdbarch_do_registers_info_ftype do_registers_info) | |
3080 | { | |
3081 | gdbarch->do_registers_info = do_registers_info; | |
3082 | } | |
3083 | ||
0ab7a791 AC |
3084 | void |
3085 | gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all) | |
3086 | { | |
3087 | gdb_assert (gdbarch != NULL); | |
3088 | if (gdbarch->print_registers_info == 0) | |
3089 | internal_error (__FILE__, __LINE__, | |
3090 | "gdbarch: gdbarch_print_registers_info invalid"); | |
3091 | if (gdbarch_debug >= 2) | |
3092 | fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n"); | |
3093 | gdbarch->print_registers_info (gdbarch, file, frame, regnum, all); | |
3094 | } | |
3095 | ||
3096 | void | |
3097 | set_gdbarch_print_registers_info (struct gdbarch *gdbarch, | |
3098 | gdbarch_print_registers_info_ftype print_registers_info) | |
3099 | { | |
3100 | gdbarch->print_registers_info = print_registers_info; | |
3101 | } | |
3102 | ||
23e3a7ac AC |
3103 | int |
3104 | gdbarch_print_float_info_p (struct gdbarch *gdbarch) | |
3105 | { | |
3106 | gdb_assert (gdbarch != NULL); | |
3107 | return gdbarch->print_float_info != 0; | |
3108 | } | |
3109 | ||
5e74b15c | 3110 | void |
23e3a7ac | 3111 | gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args) |
5e74b15c | 3112 | { |
8de9bdc4 | 3113 | gdb_assert (gdbarch != NULL); |
5e74b15c RE |
3114 | if (gdbarch->print_float_info == 0) |
3115 | internal_error (__FILE__, __LINE__, | |
3116 | "gdbarch: gdbarch_print_float_info invalid"); | |
3117 | if (gdbarch_debug >= 2) | |
3118 | fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n"); | |
23e3a7ac | 3119 | gdbarch->print_float_info (gdbarch, file, frame, args); |
5e74b15c RE |
3120 | } |
3121 | ||
3122 | void | |
3123 | set_gdbarch_print_float_info (struct gdbarch *gdbarch, | |
3124 | gdbarch_print_float_info_ftype print_float_info) | |
3125 | { | |
3126 | gdbarch->print_float_info = print_float_info; | |
3127 | } | |
3128 | ||
e76f1f2e AC |
3129 | int |
3130 | gdbarch_print_vector_info_p (struct gdbarch *gdbarch) | |
3131 | { | |
3132 | gdb_assert (gdbarch != NULL); | |
3133 | return gdbarch->print_vector_info != 0; | |
3134 | } | |
3135 | ||
3136 | void | |
3137 | gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args) | |
3138 | { | |
3139 | gdb_assert (gdbarch != NULL); | |
3140 | if (gdbarch->print_vector_info == 0) | |
3141 | internal_error (__FILE__, __LINE__, | |
3142 | "gdbarch: gdbarch_print_vector_info invalid"); | |
3143 | if (gdbarch_debug >= 2) | |
3144 | fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n"); | |
3145 | gdbarch->print_vector_info (gdbarch, file, frame, args); | |
3146 | } | |
3147 | ||
3148 | void | |
3149 | set_gdbarch_print_vector_info (struct gdbarch *gdbarch, | |
3150 | gdbarch_print_vector_info_ftype print_vector_info) | |
3151 | { | |
3152 | gdbarch->print_vector_info = print_vector_info; | |
3153 | } | |
3154 | ||
7c7651b2 AC |
3155 | int |
3156 | gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr) | |
3157 | { | |
8de9bdc4 | 3158 | gdb_assert (gdbarch != NULL); |
7c7651b2 | 3159 | if (gdbarch->register_sim_regno == 0) |
8e65ff28 AC |
3160 | internal_error (__FILE__, __LINE__, |
3161 | "gdbarch: gdbarch_register_sim_regno invalid"); | |
7c7651b2 AC |
3162 | if (gdbarch_debug >= 2) |
3163 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n"); | |
3164 | return gdbarch->register_sim_regno (reg_nr); | |
3165 | } | |
3166 | ||
3167 | void | |
3168 | set_gdbarch_register_sim_regno (struct gdbarch *gdbarch, | |
3169 | gdbarch_register_sim_regno_ftype register_sim_regno) | |
3170 | { | |
3171 | gdbarch->register_sim_regno = register_sim_regno; | |
3172 | } | |
3173 | ||
2649061d AC |
3174 | int |
3175 | gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch) | |
3176 | { | |
8de9bdc4 | 3177 | gdb_assert (gdbarch != NULL); |
2649061d AC |
3178 | return gdbarch->register_bytes_ok != 0; |
3179 | } | |
3180 | ||
3181 | int | |
3182 | gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes) | |
3183 | { | |
8de9bdc4 | 3184 | gdb_assert (gdbarch != NULL); |
2649061d | 3185 | if (gdbarch->register_bytes_ok == 0) |
8e65ff28 AC |
3186 | internal_error (__FILE__, __LINE__, |
3187 | "gdbarch: gdbarch_register_bytes_ok invalid"); | |
2649061d AC |
3188 | if (gdbarch_debug >= 2) |
3189 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n"); | |
3190 | return gdbarch->register_bytes_ok (nr_bytes); | |
3191 | } | |
3192 | ||
3193 | void | |
3194 | set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch, | |
3195 | gdbarch_register_bytes_ok_ftype register_bytes_ok) | |
3196 | { | |
3197 | gdbarch->register_bytes_ok = register_bytes_ok; | |
3198 | } | |
3199 | ||
01fb7433 | 3200 | int |
1622c8f7 | 3201 | gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum) |
01fb7433 | 3202 | { |
8de9bdc4 | 3203 | gdb_assert (gdbarch != NULL); |
01fb7433 AC |
3204 | if (gdbarch->cannot_fetch_register == 0) |
3205 | internal_error (__FILE__, __LINE__, | |
3206 | "gdbarch: gdbarch_cannot_fetch_register invalid"); | |
3207 | if (gdbarch_debug >= 2) | |
3208 | fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n"); | |
1622c8f7 | 3209 | return gdbarch->cannot_fetch_register (regnum); |
01fb7433 AC |
3210 | } |
3211 | ||
3212 | void | |
3213 | set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, | |
3214 | gdbarch_cannot_fetch_register_ftype cannot_fetch_register) | |
3215 | { | |
3216 | gdbarch->cannot_fetch_register = cannot_fetch_register; | |
3217 | } | |
3218 | ||
3219 | int | |
1622c8f7 | 3220 | gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum) |
01fb7433 | 3221 | { |
8de9bdc4 | 3222 | gdb_assert (gdbarch != NULL); |
01fb7433 AC |
3223 | if (gdbarch->cannot_store_register == 0) |
3224 | internal_error (__FILE__, __LINE__, | |
3225 | "gdbarch: gdbarch_cannot_store_register invalid"); | |
3226 | if (gdbarch_debug >= 2) | |
3227 | fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n"); | |
1622c8f7 | 3228 | return gdbarch->cannot_store_register (regnum); |
01fb7433 AC |
3229 | } |
3230 | ||
3231 | void | |
3232 | set_gdbarch_cannot_store_register (struct gdbarch *gdbarch, | |
3233 | gdbarch_cannot_store_register_ftype cannot_store_register) | |
3234 | { | |
3235 | gdbarch->cannot_store_register = cannot_store_register; | |
3236 | } | |
3237 | ||
9df628e0 RE |
3238 | int |
3239 | gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch) | |
3240 | { | |
8de9bdc4 | 3241 | gdb_assert (gdbarch != NULL); |
9df628e0 RE |
3242 | return gdbarch->get_longjmp_target != 0; |
3243 | } | |
3244 | ||
3245 | int | |
3246 | gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc) | |
3247 | { | |
8de9bdc4 | 3248 | gdb_assert (gdbarch != NULL); |
9df628e0 RE |
3249 | if (gdbarch->get_longjmp_target == 0) |
3250 | internal_error (__FILE__, __LINE__, | |
3251 | "gdbarch: gdbarch_get_longjmp_target invalid"); | |
3252 | if (gdbarch_debug >= 2) | |
3253 | fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n"); | |
3254 | return gdbarch->get_longjmp_target (pc); | |
3255 | } | |
3256 | ||
3257 | void | |
3258 | set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch, | |
3259 | gdbarch_get_longjmp_target_ftype get_longjmp_target) | |
3260 | { | |
3261 | gdbarch->get_longjmp_target = get_longjmp_target; | |
3262 | } | |
3263 | ||
0f71a2f6 | 3264 | int |
104c1213 | 3265 | gdbarch_use_generic_dummy_frames (struct gdbarch *gdbarch) |
0f71a2f6 | 3266 | { |
8de9bdc4 | 3267 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 3268 | if (gdbarch->use_generic_dummy_frames == -1) |
8e65ff28 AC |
3269 | internal_error (__FILE__, __LINE__, |
3270 | "gdbarch: gdbarch_use_generic_dummy_frames invalid"); | |
0f71a2f6 | 3271 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3272 | fprintf_unfiltered (gdb_stdlog, "gdbarch_use_generic_dummy_frames called\n"); |
3273 | return gdbarch->use_generic_dummy_frames; | |
3274 | } | |
3275 | ||
3276 | void | |
104c1213 JM |
3277 | set_gdbarch_use_generic_dummy_frames (struct gdbarch *gdbarch, |
3278 | int use_generic_dummy_frames) | |
0f71a2f6 JM |
3279 | { |
3280 | gdbarch->use_generic_dummy_frames = use_generic_dummy_frames; | |
3281 | } | |
3282 | ||
3283 | int | |
104c1213 | 3284 | gdbarch_call_dummy_location (struct gdbarch *gdbarch) |
0f71a2f6 | 3285 | { |
8de9bdc4 | 3286 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 3287 | if (gdbarch->call_dummy_location == 0) |
8e65ff28 AC |
3288 | internal_error (__FILE__, __LINE__, |
3289 | "gdbarch: gdbarch_call_dummy_location invalid"); | |
0f71a2f6 | 3290 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3291 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n"); |
3292 | return gdbarch->call_dummy_location; | |
3293 | } | |
3294 | ||
3295 | void | |
104c1213 JM |
3296 | set_gdbarch_call_dummy_location (struct gdbarch *gdbarch, |
3297 | int call_dummy_location) | |
0f71a2f6 JM |
3298 | { |
3299 | gdbarch->call_dummy_location = call_dummy_location; | |
3300 | } | |
3301 | ||
3302 | CORE_ADDR | |
3303 | gdbarch_call_dummy_address (struct gdbarch *gdbarch) | |
3304 | { | |
8de9bdc4 | 3305 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 3306 | if (gdbarch->call_dummy_address == 0) |
8e65ff28 AC |
3307 | internal_error (__FILE__, __LINE__, |
3308 | "gdbarch: gdbarch_call_dummy_address invalid"); | |
0f71a2f6 | 3309 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3310 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_address called\n"); |
3311 | return gdbarch->call_dummy_address (); | |
3312 | } | |
3313 | ||
3314 | void | |
104c1213 JM |
3315 | set_gdbarch_call_dummy_address (struct gdbarch *gdbarch, |
3316 | gdbarch_call_dummy_address_ftype call_dummy_address) | |
0f71a2f6 JM |
3317 | { |
3318 | gdbarch->call_dummy_address = call_dummy_address; | |
3319 | } | |
3320 | ||
3321 | CORE_ADDR | |
104c1213 | 3322 | gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch) |
0f71a2f6 | 3323 | { |
8de9bdc4 | 3324 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 3325 | if (gdbarch->call_dummy_start_offset == -1) |
8e65ff28 AC |
3326 | internal_error (__FILE__, __LINE__, |
3327 | "gdbarch: gdbarch_call_dummy_start_offset invalid"); | |
0f71a2f6 | 3328 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3329 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_start_offset called\n"); |
3330 | return gdbarch->call_dummy_start_offset; | |
3331 | } | |
3332 | ||
3333 | void | |
104c1213 JM |
3334 | set_gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch, |
3335 | CORE_ADDR call_dummy_start_offset) | |
0f71a2f6 JM |
3336 | { |
3337 | gdbarch->call_dummy_start_offset = call_dummy_start_offset; | |
3338 | } | |
3339 | ||
3340 | CORE_ADDR | |
104c1213 | 3341 | gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch) |
0f71a2f6 | 3342 | { |
8de9bdc4 | 3343 | gdb_assert (gdbarch != NULL); |
83e6b173 | 3344 | if (gdbarch->call_dummy_breakpoint_offset_p && gdbarch->call_dummy_breakpoint_offset == -1) |
8e65ff28 AC |
3345 | internal_error (__FILE__, __LINE__, |
3346 | "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid"); | |
0f71a2f6 | 3347 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3348 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset called\n"); |
3349 | return gdbarch->call_dummy_breakpoint_offset; | |
3350 | } | |
3351 | ||
3352 | void | |
104c1213 JM |
3353 | set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch, |
3354 | CORE_ADDR call_dummy_breakpoint_offset) | |
0f71a2f6 JM |
3355 | { |
3356 | gdbarch->call_dummy_breakpoint_offset = call_dummy_breakpoint_offset; | |
3357 | } | |
3358 | ||
3359 | int | |
104c1213 | 3360 | gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch) |
0f71a2f6 | 3361 | { |
8de9bdc4 | 3362 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 3363 | if (gdbarch->call_dummy_breakpoint_offset_p == -1) |
8e65ff28 AC |
3364 | internal_error (__FILE__, __LINE__, |
3365 | "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid"); | |
0f71a2f6 | 3366 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3367 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset_p called\n"); |
3368 | return gdbarch->call_dummy_breakpoint_offset_p; | |
3369 | } | |
3370 | ||
3371 | void | |
104c1213 JM |
3372 | set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch, |
3373 | int call_dummy_breakpoint_offset_p) | |
0f71a2f6 JM |
3374 | { |
3375 | gdbarch->call_dummy_breakpoint_offset_p = call_dummy_breakpoint_offset_p; | |
3376 | } | |
3377 | ||
3378 | int | |
104c1213 | 3379 | gdbarch_call_dummy_length (struct gdbarch *gdbarch) |
0f71a2f6 | 3380 | { |
8de9bdc4 | 3381 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 3382 | if (gdbarch->call_dummy_length == -1) |
8e65ff28 AC |
3383 | internal_error (__FILE__, __LINE__, |
3384 | "gdbarch: gdbarch_call_dummy_length invalid"); | |
0f71a2f6 | 3385 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3386 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_length called\n"); |
3387 | return gdbarch->call_dummy_length; | |
3388 | } | |
3389 | ||
3390 | void | |
104c1213 JM |
3391 | set_gdbarch_call_dummy_length (struct gdbarch *gdbarch, |
3392 | int call_dummy_length) | |
0f71a2f6 JM |
3393 | { |
3394 | gdbarch->call_dummy_length = call_dummy_length; | |
3395 | } | |
3396 | ||
3397 | int | |
3398 | gdbarch_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address) | |
3399 | { | |
8de9bdc4 | 3400 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 3401 | if (gdbarch->pc_in_call_dummy == 0) |
8e65ff28 AC |
3402 | internal_error (__FILE__, __LINE__, |
3403 | "gdbarch: gdbarch_pc_in_call_dummy invalid"); | |
0f71a2f6 | 3404 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3405 | fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_in_call_dummy called\n"); |
3406 | return gdbarch->pc_in_call_dummy (pc, sp, frame_address); | |
3407 | } | |
3408 | ||
3409 | void | |
104c1213 JM |
3410 | set_gdbarch_pc_in_call_dummy (struct gdbarch *gdbarch, |
3411 | gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy) | |
0f71a2f6 JM |
3412 | { |
3413 | gdbarch->pc_in_call_dummy = pc_in_call_dummy; | |
3414 | } | |
3415 | ||
3416 | int | |
104c1213 | 3417 | gdbarch_call_dummy_p (struct gdbarch *gdbarch) |
0f71a2f6 | 3418 | { |
8de9bdc4 | 3419 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 3420 | if (gdbarch->call_dummy_p == -1) |
8e65ff28 AC |
3421 | internal_error (__FILE__, __LINE__, |
3422 | "gdbarch: gdbarch_call_dummy_p invalid"); | |
0f71a2f6 | 3423 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3424 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_p called\n"); |
3425 | return gdbarch->call_dummy_p; | |
3426 | } | |
3427 | ||
3428 | void | |
104c1213 JM |
3429 | set_gdbarch_call_dummy_p (struct gdbarch *gdbarch, |
3430 | int call_dummy_p) | |
0f71a2f6 JM |
3431 | { |
3432 | gdbarch->call_dummy_p = call_dummy_p; | |
3433 | } | |
3434 | ||
3435 | LONGEST * | |
104c1213 | 3436 | gdbarch_call_dummy_words (struct gdbarch *gdbarch) |
0f71a2f6 | 3437 | { |
8de9bdc4 | 3438 | gdb_assert (gdbarch != NULL); |
c0e8c252 | 3439 | /* Skip verify of call_dummy_words, invalid_p == 0 */ |
0f71a2f6 | 3440 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3441 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_words called\n"); |
3442 | return gdbarch->call_dummy_words; | |
3443 | } | |
3444 | ||
3445 | void | |
104c1213 JM |
3446 | set_gdbarch_call_dummy_words (struct gdbarch *gdbarch, |
3447 | LONGEST * call_dummy_words) | |
0f71a2f6 JM |
3448 | { |
3449 | gdbarch->call_dummy_words = call_dummy_words; | |
3450 | } | |
3451 | ||
3452 | int | |
104c1213 | 3453 | gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch) |
0f71a2f6 | 3454 | { |
8de9bdc4 | 3455 | gdb_assert (gdbarch != NULL); |
c0e8c252 | 3456 | /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */ |
0f71a2f6 | 3457 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3458 | fprintf_unfiltered (gdb_stdlog, "gdbarch_sizeof_call_dummy_words called\n"); |
3459 | return gdbarch->sizeof_call_dummy_words; | |
3460 | } | |
3461 | ||
3462 | void | |
104c1213 JM |
3463 | set_gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch, |
3464 | int sizeof_call_dummy_words) | |
0f71a2f6 JM |
3465 | { |
3466 | gdbarch->sizeof_call_dummy_words = sizeof_call_dummy_words; | |
3467 | } | |
3468 | ||
3469 | int | |
104c1213 | 3470 | gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch) |
0f71a2f6 | 3471 | { |
8de9bdc4 | 3472 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 3473 | if (gdbarch->call_dummy_stack_adjust_p == -1) |
8e65ff28 AC |
3474 | internal_error (__FILE__, __LINE__, |
3475 | "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid"); | |
0f71a2f6 | 3476 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3477 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust_p called\n"); |
3478 | return gdbarch->call_dummy_stack_adjust_p; | |
3479 | } | |
3480 | ||
3481 | void | |
104c1213 JM |
3482 | set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch, |
3483 | int call_dummy_stack_adjust_p) | |
0f71a2f6 JM |
3484 | { |
3485 | gdbarch->call_dummy_stack_adjust_p = call_dummy_stack_adjust_p; | |
3486 | } | |
3487 | ||
3488 | int | |
104c1213 | 3489 | gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch) |
0f71a2f6 | 3490 | { |
8de9bdc4 | 3491 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 3492 | if (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0) |
8e65ff28 AC |
3493 | internal_error (__FILE__, __LINE__, |
3494 | "gdbarch: gdbarch_call_dummy_stack_adjust invalid"); | |
0f71a2f6 | 3495 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3496 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust called\n"); |
3497 | return gdbarch->call_dummy_stack_adjust; | |
3498 | } | |
3499 | ||
3500 | void | |
104c1213 JM |
3501 | set_gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch, |
3502 | int call_dummy_stack_adjust) | |
0f71a2f6 JM |
3503 | { |
3504 | gdbarch->call_dummy_stack_adjust = call_dummy_stack_adjust; | |
3505 | } | |
3506 | ||
3507 | void | |
3508 | 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) | |
3509 | { | |
8de9bdc4 | 3510 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 3511 | if (gdbarch->fix_call_dummy == 0) |
8e65ff28 AC |
3512 | internal_error (__FILE__, __LINE__, |
3513 | "gdbarch: gdbarch_fix_call_dummy invalid"); | |
0f71a2f6 | 3514 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3515 | fprintf_unfiltered (gdb_stdlog, "gdbarch_fix_call_dummy called\n"); |
3516 | gdbarch->fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p); | |
3517 | } | |
3518 | ||
3519 | void | |
104c1213 JM |
3520 | set_gdbarch_fix_call_dummy (struct gdbarch *gdbarch, |
3521 | gdbarch_fix_call_dummy_ftype fix_call_dummy) | |
0f71a2f6 JM |
3522 | { |
3523 | gdbarch->fix_call_dummy = fix_call_dummy; | |
3524 | } | |
3525 | ||
10312cc4 AC |
3526 | void |
3527 | gdbarch_init_frame_pc_first (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev) | |
3528 | { | |
8de9bdc4 | 3529 | gdb_assert (gdbarch != NULL); |
10312cc4 AC |
3530 | if (gdbarch->init_frame_pc_first == 0) |
3531 | internal_error (__FILE__, __LINE__, | |
3532 | "gdbarch: gdbarch_init_frame_pc_first invalid"); | |
3533 | if (gdbarch_debug >= 2) | |
3534 | fprintf_unfiltered (gdb_stdlog, "gdbarch_init_frame_pc_first called\n"); | |
3535 | gdbarch->init_frame_pc_first (fromleaf, prev); | |
3536 | } | |
3537 | ||
3538 | void | |
3539 | set_gdbarch_init_frame_pc_first (struct gdbarch *gdbarch, | |
3540 | gdbarch_init_frame_pc_first_ftype init_frame_pc_first) | |
3541 | { | |
3542 | gdbarch->init_frame_pc_first = init_frame_pc_first; | |
3543 | } | |
3544 | ||
3545 | void | |
3546 | gdbarch_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev) | |
3547 | { | |
8de9bdc4 | 3548 | gdb_assert (gdbarch != NULL); |
10312cc4 AC |
3549 | if (gdbarch->init_frame_pc == 0) |
3550 | internal_error (__FILE__, __LINE__, | |
3551 | "gdbarch: gdbarch_init_frame_pc invalid"); | |
3552 | if (gdbarch_debug >= 2) | |
3553 | fprintf_unfiltered (gdb_stdlog, "gdbarch_init_frame_pc called\n"); | |
3554 | gdbarch->init_frame_pc (fromleaf, prev); | |
3555 | } | |
3556 | ||
3557 | void | |
3558 | set_gdbarch_init_frame_pc (struct gdbarch *gdbarch, | |
3559 | gdbarch_init_frame_pc_ftype init_frame_pc) | |
3560 | { | |
3561 | gdbarch->init_frame_pc = init_frame_pc; | |
3562 | } | |
3563 | ||
0f71a2f6 | 3564 | int |
104c1213 | 3565 | gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch) |
0f71a2f6 | 3566 | { |
8de9bdc4 | 3567 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 3568 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3569 | fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n"); |
3570 | return gdbarch->believe_pcc_promotion; | |
3571 | } | |
3572 | ||
3573 | void | |
104c1213 JM |
3574 | set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch, |
3575 | int believe_pcc_promotion) | |
0f71a2f6 JM |
3576 | { |
3577 | gdbarch->believe_pcc_promotion = believe_pcc_promotion; | |
3578 | } | |
3579 | ||
3580 | int | |
104c1213 | 3581 | gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch) |
0f71a2f6 | 3582 | { |
8de9bdc4 | 3583 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 3584 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3585 | fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion_type called\n"); |
3586 | return gdbarch->believe_pcc_promotion_type; | |
3587 | } | |
3588 | ||
3589 | void | |
104c1213 JM |
3590 | set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch, |
3591 | int believe_pcc_promotion_type) | |
0f71a2f6 JM |
3592 | { |
3593 | gdbarch->believe_pcc_promotion_type = believe_pcc_promotion_type; | |
3594 | } | |
3595 | ||
b9a8e3bf JB |
3596 | int |
3597 | gdbarch_coerce_float_to_double (struct gdbarch *gdbarch, struct type *formal, struct type *actual) | |
3598 | { | |
8de9bdc4 | 3599 | gdb_assert (gdbarch != NULL); |
b9a8e3bf | 3600 | if (gdbarch->coerce_float_to_double == 0) |
8e65ff28 AC |
3601 | internal_error (__FILE__, __LINE__, |
3602 | "gdbarch: gdbarch_coerce_float_to_double invalid"); | |
b9a8e3bf | 3603 | if (gdbarch_debug >= 2) |
b9a8e3bf JB |
3604 | fprintf_unfiltered (gdb_stdlog, "gdbarch_coerce_float_to_double called\n"); |
3605 | return gdbarch->coerce_float_to_double (formal, actual); | |
3606 | } | |
3607 | ||
3608 | void | |
3609 | set_gdbarch_coerce_float_to_double (struct gdbarch *gdbarch, | |
3610 | gdbarch_coerce_float_to_double_ftype coerce_float_to_double) | |
3611 | { | |
3612 | gdbarch->coerce_float_to_double = coerce_float_to_double; | |
3613 | } | |
3614 | ||
0f71a2f6 | 3615 | void |
adf40b2e | 3616 | 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) |
0f71a2f6 | 3617 | { |
8de9bdc4 | 3618 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 3619 | if (gdbarch->get_saved_register == 0) |
8e65ff28 AC |
3620 | internal_error (__FILE__, __LINE__, |
3621 | "gdbarch: gdbarch_get_saved_register invalid"); | |
0f71a2f6 | 3622 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3623 | fprintf_unfiltered (gdb_stdlog, "gdbarch_get_saved_register called\n"); |
3624 | gdbarch->get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval); | |
3625 | } | |
3626 | ||
3627 | void | |
104c1213 JM |
3628 | set_gdbarch_get_saved_register (struct gdbarch *gdbarch, |
3629 | gdbarch_get_saved_register_ftype get_saved_register) | |
0f71a2f6 JM |
3630 | { |
3631 | gdbarch->get_saved_register = get_saved_register; | |
3632 | } | |
3633 | ||
3634 | int | |
3635 | gdbarch_register_convertible (struct gdbarch *gdbarch, int nr) | |
3636 | { | |
8de9bdc4 | 3637 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 3638 | if (gdbarch->register_convertible == 0) |
8e65ff28 AC |
3639 | internal_error (__FILE__, __LINE__, |
3640 | "gdbarch: gdbarch_register_convertible invalid"); | |
0f71a2f6 | 3641 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3642 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convertible called\n"); |
3643 | return gdbarch->register_convertible (nr); | |
3644 | } | |
3645 | ||
3646 | void | |
104c1213 JM |
3647 | set_gdbarch_register_convertible (struct gdbarch *gdbarch, |
3648 | gdbarch_register_convertible_ftype register_convertible) | |
0f71a2f6 JM |
3649 | { |
3650 | gdbarch->register_convertible = register_convertible; | |
3651 | } | |
3652 | ||
3653 | void | |
3654 | gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to) | |
3655 | { | |
8de9bdc4 | 3656 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 3657 | if (gdbarch->register_convert_to_virtual == 0) |
8e65ff28 AC |
3658 | internal_error (__FILE__, __LINE__, |
3659 | "gdbarch: gdbarch_register_convert_to_virtual invalid"); | |
0f71a2f6 | 3660 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3661 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_virtual called\n"); |
3662 | gdbarch->register_convert_to_virtual (regnum, type, from, to); | |
3663 | } | |
3664 | ||
3665 | void | |
104c1213 JM |
3666 | set_gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, |
3667 | gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual) | |
0f71a2f6 JM |
3668 | { |
3669 | gdbarch->register_convert_to_virtual = register_convert_to_virtual; | |
3670 | } | |
3671 | ||
3672 | void | |
3673 | gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to) | |
3674 | { | |
8de9bdc4 | 3675 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 3676 | if (gdbarch->register_convert_to_raw == 0) |
8e65ff28 AC |
3677 | internal_error (__FILE__, __LINE__, |
3678 | "gdbarch: gdbarch_register_convert_to_raw invalid"); | |
0f71a2f6 | 3679 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3680 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_raw called\n"); |
3681 | gdbarch->register_convert_to_raw (type, regnum, from, to); | |
3682 | } | |
3683 | ||
3684 | void | |
104c1213 JM |
3685 | set_gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, |
3686 | gdbarch_register_convert_to_raw_ftype register_convert_to_raw) | |
0f71a2f6 JM |
3687 | { |
3688 | gdbarch->register_convert_to_raw = register_convert_to_raw; | |
3689 | } | |
3690 | ||
13d01224 AC |
3691 | int |
3692 | gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum) | |
3693 | { | |
3694 | gdb_assert (gdbarch != NULL); | |
3695 | if (gdbarch->convert_register_p == 0) | |
3696 | internal_error (__FILE__, __LINE__, | |
3697 | "gdbarch: gdbarch_convert_register_p invalid"); | |
3698 | if (gdbarch_debug >= 2) | |
3699 | fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n"); | |
3700 | return gdbarch->convert_register_p (regnum); | |
3701 | } | |
3702 | ||
3703 | void | |
3704 | set_gdbarch_convert_register_p (struct gdbarch *gdbarch, | |
3705 | gdbarch_convert_register_p_ftype convert_register_p) | |
3706 | { | |
3707 | gdbarch->convert_register_p = convert_register_p; | |
3708 | } | |
3709 | ||
3710 | void | |
3711 | gdbarch_register_to_value (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to) | |
3712 | { | |
3713 | gdb_assert (gdbarch != NULL); | |
3714 | if (gdbarch->register_to_value == 0) | |
3715 | internal_error (__FILE__, __LINE__, | |
3716 | "gdbarch: gdbarch_register_to_value invalid"); | |
3717 | if (gdbarch_debug >= 2) | |
3718 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n"); | |
3719 | gdbarch->register_to_value (regnum, type, from, to); | |
3720 | } | |
3721 | ||
3722 | void | |
3723 | set_gdbarch_register_to_value (struct gdbarch *gdbarch, | |
3724 | gdbarch_register_to_value_ftype register_to_value) | |
3725 | { | |
3726 | gdbarch->register_to_value = register_to_value; | |
3727 | } | |
3728 | ||
3729 | void | |
3730 | gdbarch_value_to_register (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to) | |
3731 | { | |
3732 | gdb_assert (gdbarch != NULL); | |
3733 | if (gdbarch->value_to_register == 0) | |
3734 | internal_error (__FILE__, __LINE__, | |
3735 | "gdbarch: gdbarch_value_to_register invalid"); | |
3736 | if (gdbarch_debug >= 2) | |
3737 | fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n"); | |
3738 | gdbarch->value_to_register (type, regnum, from, to); | |
3739 | } | |
3740 | ||
3741 | void | |
3742 | set_gdbarch_value_to_register (struct gdbarch *gdbarch, | |
3743 | gdbarch_value_to_register_ftype value_to_register) | |
3744 | { | |
3745 | gdbarch->value_to_register = value_to_register; | |
3746 | } | |
3747 | ||
4478b372 | 3748 | CORE_ADDR |
ac2e2ef7 | 3749 | gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf) |
4478b372 | 3750 | { |
8de9bdc4 | 3751 | gdb_assert (gdbarch != NULL); |
4478b372 | 3752 | if (gdbarch->pointer_to_address == 0) |
8e65ff28 AC |
3753 | internal_error (__FILE__, __LINE__, |
3754 | "gdbarch: gdbarch_pointer_to_address invalid"); | |
4478b372 JB |
3755 | if (gdbarch_debug >= 2) |
3756 | fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n"); | |
3757 | return gdbarch->pointer_to_address (type, buf); | |
3758 | } | |
3759 | ||
3760 | void | |
3761 | set_gdbarch_pointer_to_address (struct gdbarch *gdbarch, | |
3762 | gdbarch_pointer_to_address_ftype pointer_to_address) | |
3763 | { | |
3764 | gdbarch->pointer_to_address = pointer_to_address; | |
3765 | } | |
3766 | ||
3767 | void | |
ac2e2ef7 | 3768 | gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr) |
4478b372 | 3769 | { |
8de9bdc4 | 3770 | gdb_assert (gdbarch != NULL); |
4478b372 | 3771 | if (gdbarch->address_to_pointer == 0) |
8e65ff28 AC |
3772 | internal_error (__FILE__, __LINE__, |
3773 | "gdbarch: gdbarch_address_to_pointer invalid"); | |
4478b372 JB |
3774 | if (gdbarch_debug >= 2) |
3775 | fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n"); | |
3776 | gdbarch->address_to_pointer (type, buf, addr); | |
3777 | } | |
3778 | ||
3779 | void | |
3780 | set_gdbarch_address_to_pointer (struct gdbarch *gdbarch, | |
3781 | gdbarch_address_to_pointer_ftype address_to_pointer) | |
3782 | { | |
3783 | gdbarch->address_to_pointer = address_to_pointer; | |
3784 | } | |
3785 | ||
fc0c74b1 AC |
3786 | int |
3787 | gdbarch_integer_to_address_p (struct gdbarch *gdbarch) | |
3788 | { | |
8de9bdc4 | 3789 | gdb_assert (gdbarch != NULL); |
fc0c74b1 AC |
3790 | return gdbarch->integer_to_address != 0; |
3791 | } | |
3792 | ||
3793 | CORE_ADDR | |
3794 | gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf) | |
3795 | { | |
8de9bdc4 | 3796 | gdb_assert (gdbarch != NULL); |
fc0c74b1 AC |
3797 | if (gdbarch->integer_to_address == 0) |
3798 | internal_error (__FILE__, __LINE__, | |
3799 | "gdbarch: gdbarch_integer_to_address invalid"); | |
3800 | if (gdbarch_debug >= 2) | |
3801 | fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n"); | |
3802 | return gdbarch->integer_to_address (type, buf); | |
3803 | } | |
3804 | ||
3805 | void | |
3806 | set_gdbarch_integer_to_address (struct gdbarch *gdbarch, | |
3807 | gdbarch_integer_to_address_ftype integer_to_address) | |
3808 | { | |
3809 | gdbarch->integer_to_address = integer_to_address; | |
3810 | } | |
3811 | ||
71a9f22e JB |
3812 | int |
3813 | gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type) | |
3814 | { | |
8de9bdc4 | 3815 | gdb_assert (gdbarch != NULL); |
71a9f22e | 3816 | if (gdbarch->return_value_on_stack == 0) |
8e65ff28 AC |
3817 | internal_error (__FILE__, __LINE__, |
3818 | "gdbarch: gdbarch_return_value_on_stack invalid"); | |
71a9f22e JB |
3819 | if (gdbarch_debug >= 2) |
3820 | fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value_on_stack called\n"); | |
3821 | return gdbarch->return_value_on_stack (type); | |
3822 | } | |
3823 | ||
3824 | void | |
3825 | set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch, | |
3826 | gdbarch_return_value_on_stack_ftype return_value_on_stack) | |
3827 | { | |
3828 | gdbarch->return_value_on_stack = return_value_on_stack; | |
3829 | } | |
3830 | ||
0f71a2f6 JM |
3831 | CORE_ADDR |
3832 | gdbarch_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr) | |
3833 | { | |
8de9bdc4 | 3834 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 3835 | if (gdbarch->push_arguments == 0) |
8e65ff28 AC |
3836 | internal_error (__FILE__, __LINE__, |
3837 | "gdbarch: gdbarch_push_arguments invalid"); | |
0f71a2f6 | 3838 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3839 | fprintf_unfiltered (gdb_stdlog, "gdbarch_push_arguments called\n"); |
3840 | return gdbarch->push_arguments (nargs, args, sp, struct_return, struct_addr); | |
3841 | } | |
3842 | ||
3843 | void | |
104c1213 JM |
3844 | set_gdbarch_push_arguments (struct gdbarch *gdbarch, |
3845 | gdbarch_push_arguments_ftype push_arguments) | |
0f71a2f6 JM |
3846 | { |
3847 | gdbarch->push_arguments = push_arguments; | |
3848 | } | |
3849 | ||
3850 | void | |
3851 | gdbarch_push_dummy_frame (struct gdbarch *gdbarch) | |
3852 | { | |
8de9bdc4 | 3853 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 3854 | if (gdbarch->push_dummy_frame == 0) |
8e65ff28 AC |
3855 | internal_error (__FILE__, __LINE__, |
3856 | "gdbarch: gdbarch_push_dummy_frame invalid"); | |
0f71a2f6 | 3857 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3858 | fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_frame called\n"); |
3859 | gdbarch->push_dummy_frame (); | |
3860 | } | |
3861 | ||
3862 | void | |
104c1213 JM |
3863 | set_gdbarch_push_dummy_frame (struct gdbarch *gdbarch, |
3864 | gdbarch_push_dummy_frame_ftype push_dummy_frame) | |
0f71a2f6 JM |
3865 | { |
3866 | gdbarch->push_dummy_frame = push_dummy_frame; | |
3867 | } | |
3868 | ||
69a0d5f4 AC |
3869 | int |
3870 | gdbarch_push_return_address_p (struct gdbarch *gdbarch) | |
3871 | { | |
8de9bdc4 | 3872 | gdb_assert (gdbarch != NULL); |
69a0d5f4 AC |
3873 | return gdbarch->push_return_address != 0; |
3874 | } | |
3875 | ||
0f71a2f6 JM |
3876 | CORE_ADDR |
3877 | gdbarch_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp) | |
3878 | { | |
8de9bdc4 | 3879 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 3880 | if (gdbarch->push_return_address == 0) |
8e65ff28 AC |
3881 | internal_error (__FILE__, __LINE__, |
3882 | "gdbarch: gdbarch_push_return_address invalid"); | |
0f71a2f6 | 3883 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3884 | fprintf_unfiltered (gdb_stdlog, "gdbarch_push_return_address called\n"); |
3885 | return gdbarch->push_return_address (pc, sp); | |
3886 | } | |
3887 | ||
3888 | void | |
104c1213 JM |
3889 | set_gdbarch_push_return_address (struct gdbarch *gdbarch, |
3890 | gdbarch_push_return_address_ftype push_return_address) | |
0f71a2f6 JM |
3891 | { |
3892 | gdbarch->push_return_address = push_return_address; | |
3893 | } | |
3894 | ||
3895 | void | |
3896 | gdbarch_pop_frame (struct gdbarch *gdbarch) | |
3897 | { | |
8de9bdc4 | 3898 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 3899 | if (gdbarch->pop_frame == 0) |
8e65ff28 AC |
3900 | internal_error (__FILE__, __LINE__, |
3901 | "gdbarch: gdbarch_pop_frame invalid"); | |
0f71a2f6 | 3902 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3903 | fprintf_unfiltered (gdb_stdlog, "gdbarch_pop_frame called\n"); |
3904 | gdbarch->pop_frame (); | |
3905 | } | |
3906 | ||
3907 | void | |
104c1213 JM |
3908 | set_gdbarch_pop_frame (struct gdbarch *gdbarch, |
3909 | gdbarch_pop_frame_ftype pop_frame) | |
0f71a2f6 JM |
3910 | { |
3911 | gdbarch->pop_frame = pop_frame; | |
3912 | } | |
3913 | ||
0f71a2f6 JM |
3914 | void |
3915 | gdbarch_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp) | |
3916 | { | |
8de9bdc4 | 3917 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 3918 | if (gdbarch->store_struct_return == 0) |
8e65ff28 AC |
3919 | internal_error (__FILE__, __LINE__, |
3920 | "gdbarch: gdbarch_store_struct_return invalid"); | |
0f71a2f6 | 3921 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3922 | fprintf_unfiltered (gdb_stdlog, "gdbarch_store_struct_return called\n"); |
3923 | gdbarch->store_struct_return (addr, sp); | |
3924 | } | |
3925 | ||
3926 | void | |
104c1213 JM |
3927 | set_gdbarch_store_struct_return (struct gdbarch *gdbarch, |
3928 | gdbarch_store_struct_return_ftype store_struct_return) | |
0f71a2f6 JM |
3929 | { |
3930 | gdbarch->store_struct_return = store_struct_return; | |
3931 | } | |
3932 | ||
3933 | void | |
ebba8386 AC |
3934 | gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf) |
3935 | { | |
3936 | gdb_assert (gdbarch != NULL); | |
3937 | if (gdbarch->extract_return_value == 0) | |
3938 | internal_error (__FILE__, __LINE__, | |
3939 | "gdbarch: gdbarch_extract_return_value invalid"); | |
3940 | if (gdbarch_debug >= 2) | |
3941 | fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n"); | |
3942 | gdbarch->extract_return_value (type, regcache, valbuf); | |
3943 | } | |
3944 | ||
3945 | void | |
3946 | set_gdbarch_extract_return_value (struct gdbarch *gdbarch, | |
3947 | gdbarch_extract_return_value_ftype extract_return_value) | |
3948 | { | |
3949 | gdbarch->extract_return_value = extract_return_value; | |
3950 | } | |
3951 | ||
3952 | void | |
3953 | gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const void *valbuf) | |
0f71a2f6 | 3954 | { |
8de9bdc4 | 3955 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 3956 | if (gdbarch->store_return_value == 0) |
8e65ff28 AC |
3957 | internal_error (__FILE__, __LINE__, |
3958 | "gdbarch: gdbarch_store_return_value invalid"); | |
0f71a2f6 | 3959 | if (gdbarch_debug >= 2) |
0f71a2f6 | 3960 | fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n"); |
ebba8386 | 3961 | gdbarch->store_return_value (type, regcache, valbuf); |
0f71a2f6 JM |
3962 | } |
3963 | ||
3964 | void | |
104c1213 JM |
3965 | set_gdbarch_store_return_value (struct gdbarch *gdbarch, |
3966 | gdbarch_store_return_value_ftype store_return_value) | |
0f71a2f6 JM |
3967 | { |
3968 | gdbarch->store_return_value = store_return_value; | |
3969 | } | |
3970 | ||
ebba8386 AC |
3971 | void |
3972 | gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf) | |
3973 | { | |
3974 | gdb_assert (gdbarch != NULL); | |
3975 | if (gdbarch->deprecated_extract_return_value == 0) | |
3976 | internal_error (__FILE__, __LINE__, | |
3977 | "gdbarch: gdbarch_deprecated_extract_return_value invalid"); | |
3978 | if (gdbarch_debug >= 2) | |
3979 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_return_value called\n"); | |
3980 | gdbarch->deprecated_extract_return_value (type, regbuf, valbuf); | |
3981 | } | |
3982 | ||
3983 | void | |
3984 | set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, | |
3985 | gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value) | |
3986 | { | |
3987 | gdbarch->deprecated_extract_return_value = deprecated_extract_return_value; | |
3988 | } | |
3989 | ||
3990 | void | |
3991 | gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf) | |
3992 | { | |
3993 | gdb_assert (gdbarch != NULL); | |
3994 | if (gdbarch->deprecated_store_return_value == 0) | |
3995 | internal_error (__FILE__, __LINE__, | |
3996 | "gdbarch: gdbarch_deprecated_store_return_value invalid"); | |
3997 | if (gdbarch_debug >= 2) | |
3998 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_return_value called\n"); | |
3999 | gdbarch->deprecated_store_return_value (type, valbuf); | |
4000 | } | |
4001 | ||
4002 | void | |
4003 | set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, | |
4004 | gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value) | |
4005 | { | |
4006 | gdbarch->deprecated_store_return_value = deprecated_store_return_value; | |
4007 | } | |
4008 | ||
049ee0e4 AC |
4009 | int |
4010 | gdbarch_extract_struct_value_address_p (struct gdbarch *gdbarch) | |
4011 | { | |
4012 | gdb_assert (gdbarch != NULL); | |
4013 | return gdbarch->extract_struct_value_address != 0; | |
4014 | } | |
4015 | ||
4016 | CORE_ADDR | |
4017 | gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache) | |
4018 | { | |
4019 | gdb_assert (gdbarch != NULL); | |
4020 | if (gdbarch->extract_struct_value_address == 0) | |
4021 | internal_error (__FILE__, __LINE__, | |
4022 | "gdbarch: gdbarch_extract_struct_value_address invalid"); | |
4023 | if (gdbarch_debug >= 2) | |
4024 | fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_struct_value_address called\n"); | |
4025 | return gdbarch->extract_struct_value_address (regcache); | |
4026 | } | |
4027 | ||
4028 | void | |
4029 | set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, | |
4030 | gdbarch_extract_struct_value_address_ftype extract_struct_value_address) | |
4031 | { | |
4032 | gdbarch->extract_struct_value_address = extract_struct_value_address; | |
4033 | } | |
4034 | ||
d6dd581e | 4035 | int |
26e9b323 | 4036 | gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch) |
d6dd581e | 4037 | { |
8de9bdc4 | 4038 | gdb_assert (gdbarch != NULL); |
26e9b323 | 4039 | return gdbarch->deprecated_extract_struct_value_address != 0; |
d6dd581e AC |
4040 | } |
4041 | ||
0f71a2f6 | 4042 | CORE_ADDR |
26e9b323 | 4043 | gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf) |
0f71a2f6 | 4044 | { |
8de9bdc4 | 4045 | gdb_assert (gdbarch != NULL); |
26e9b323 | 4046 | if (gdbarch->deprecated_extract_struct_value_address == 0) |
8e65ff28 | 4047 | internal_error (__FILE__, __LINE__, |
26e9b323 | 4048 | "gdbarch: gdbarch_deprecated_extract_struct_value_address invalid"); |
0f71a2f6 | 4049 | if (gdbarch_debug >= 2) |
26e9b323 AC |
4050 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_struct_value_address called\n"); |
4051 | return gdbarch->deprecated_extract_struct_value_address (regbuf); | |
0f71a2f6 JM |
4052 | } |
4053 | ||
4054 | void | |
26e9b323 AC |
4055 | set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, |
4056 | gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address) | |
0f71a2f6 | 4057 | { |
26e9b323 | 4058 | gdbarch->deprecated_extract_struct_value_address = deprecated_extract_struct_value_address; |
0f71a2f6 JM |
4059 | } |
4060 | ||
4061 | int | |
4062 | gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type) | |
4063 | { | |
8de9bdc4 | 4064 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 4065 | if (gdbarch->use_struct_convention == 0) |
8e65ff28 AC |
4066 | internal_error (__FILE__, __LINE__, |
4067 | "gdbarch: gdbarch_use_struct_convention invalid"); | |
0f71a2f6 | 4068 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
4069 | fprintf_unfiltered (gdb_stdlog, "gdbarch_use_struct_convention called\n"); |
4070 | return gdbarch->use_struct_convention (gcc_p, value_type); | |
4071 | } | |
4072 | ||
4073 | void | |
104c1213 JM |
4074 | set_gdbarch_use_struct_convention (struct gdbarch *gdbarch, |
4075 | gdbarch_use_struct_convention_ftype use_struct_convention) | |
0f71a2f6 JM |
4076 | { |
4077 | gdbarch->use_struct_convention = use_struct_convention; | |
4078 | } | |
4079 | ||
4080 | void | |
4081 | gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame) | |
4082 | { | |
8de9bdc4 | 4083 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 4084 | if (gdbarch->frame_init_saved_regs == 0) |
8e65ff28 AC |
4085 | internal_error (__FILE__, __LINE__, |
4086 | "gdbarch: gdbarch_frame_init_saved_regs invalid"); | |
0f71a2f6 | 4087 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
4088 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_init_saved_regs called\n"); |
4089 | gdbarch->frame_init_saved_regs (frame); | |
4090 | } | |
4091 | ||
4092 | void | |
104c1213 JM |
4093 | set_gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch, |
4094 | gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs) | |
0f71a2f6 JM |
4095 | { |
4096 | gdbarch->frame_init_saved_regs = frame_init_saved_regs; | |
4097 | } | |
4098 | ||
5fdff426 AC |
4099 | int |
4100 | gdbarch_init_extra_frame_info_p (struct gdbarch *gdbarch) | |
4101 | { | |
8de9bdc4 | 4102 | gdb_assert (gdbarch != NULL); |
5fdff426 AC |
4103 | return gdbarch->init_extra_frame_info != 0; |
4104 | } | |
4105 | ||
0f71a2f6 JM |
4106 | void |
4107 | gdbarch_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame) | |
4108 | { | |
8de9bdc4 | 4109 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 4110 | if (gdbarch->init_extra_frame_info == 0) |
8e65ff28 AC |
4111 | internal_error (__FILE__, __LINE__, |
4112 | "gdbarch: gdbarch_init_extra_frame_info invalid"); | |
0f71a2f6 | 4113 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
4114 | fprintf_unfiltered (gdb_stdlog, "gdbarch_init_extra_frame_info called\n"); |
4115 | gdbarch->init_extra_frame_info (fromleaf, frame); | |
4116 | } | |
4117 | ||
4118 | void | |
104c1213 JM |
4119 | set_gdbarch_init_extra_frame_info (struct gdbarch *gdbarch, |
4120 | gdbarch_init_extra_frame_info_ftype init_extra_frame_info) | |
0f71a2f6 JM |
4121 | { |
4122 | gdbarch->init_extra_frame_info = init_extra_frame_info; | |
4123 | } | |
4124 | ||
4125 | CORE_ADDR | |
4126 | gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip) | |
4127 | { | |
8de9bdc4 | 4128 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 4129 | if (gdbarch->skip_prologue == 0) |
8e65ff28 AC |
4130 | internal_error (__FILE__, __LINE__, |
4131 | "gdbarch: gdbarch_skip_prologue invalid"); | |
0f71a2f6 | 4132 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
4133 | fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n"); |
4134 | return gdbarch->skip_prologue (ip); | |
4135 | } | |
4136 | ||
4137 | void | |
104c1213 JM |
4138 | set_gdbarch_skip_prologue (struct gdbarch *gdbarch, |
4139 | gdbarch_skip_prologue_ftype skip_prologue) | |
0f71a2f6 JM |
4140 | { |
4141 | gdbarch->skip_prologue = skip_prologue; | |
4142 | } | |
4143 | ||
dad41f9a AC |
4144 | int |
4145 | gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, CORE_ADDR ip) | |
4146 | { | |
8de9bdc4 | 4147 | gdb_assert (gdbarch != NULL); |
dad41f9a | 4148 | if (gdbarch->prologue_frameless_p == 0) |
8e65ff28 AC |
4149 | internal_error (__FILE__, __LINE__, |
4150 | "gdbarch: gdbarch_prologue_frameless_p invalid"); | |
dad41f9a AC |
4151 | if (gdbarch_debug >= 2) |
4152 | fprintf_unfiltered (gdb_stdlog, "gdbarch_prologue_frameless_p called\n"); | |
4153 | return gdbarch->prologue_frameless_p (ip); | |
4154 | } | |
4155 | ||
4156 | void | |
4157 | set_gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, | |
4158 | gdbarch_prologue_frameless_p_ftype prologue_frameless_p) | |
4159 | { | |
4160 | gdbarch->prologue_frameless_p = prologue_frameless_p; | |
4161 | } | |
4162 | ||
0f71a2f6 JM |
4163 | int |
4164 | gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs) | |
4165 | { | |
8de9bdc4 | 4166 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 4167 | if (gdbarch->inner_than == 0) |
8e65ff28 AC |
4168 | internal_error (__FILE__, __LINE__, |
4169 | "gdbarch: gdbarch_inner_than invalid"); | |
0f71a2f6 | 4170 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
4171 | fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n"); |
4172 | return gdbarch->inner_than (lhs, rhs); | |
4173 | } | |
4174 | ||
4175 | void | |
104c1213 JM |
4176 | set_gdbarch_inner_than (struct gdbarch *gdbarch, |
4177 | gdbarch_inner_than_ftype inner_than) | |
0f71a2f6 JM |
4178 | { |
4179 | gdbarch->inner_than = inner_than; | |
4180 | } | |
4181 | ||
f4f9705a | 4182 | const unsigned char * |
adf40b2e | 4183 | gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr) |
0f71a2f6 | 4184 | { |
8de9bdc4 | 4185 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 4186 | if (gdbarch->breakpoint_from_pc == 0) |
8e65ff28 AC |
4187 | internal_error (__FILE__, __LINE__, |
4188 | "gdbarch: gdbarch_breakpoint_from_pc invalid"); | |
0f71a2f6 | 4189 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
4190 | fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n"); |
4191 | return gdbarch->breakpoint_from_pc (pcptr, lenptr); | |
4192 | } | |
4193 | ||
4194 | void | |
104c1213 JM |
4195 | set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, |
4196 | gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc) | |
0f71a2f6 JM |
4197 | { |
4198 | gdbarch->breakpoint_from_pc = breakpoint_from_pc; | |
4199 | } | |
4200 | ||
917317f4 JM |
4201 | int |
4202 | gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache) | |
4203 | { | |
8de9bdc4 | 4204 | gdb_assert (gdbarch != NULL); |
917317f4 | 4205 | if (gdbarch->memory_insert_breakpoint == 0) |
8e65ff28 AC |
4206 | internal_error (__FILE__, __LINE__, |
4207 | "gdbarch: gdbarch_memory_insert_breakpoint invalid"); | |
917317f4 | 4208 | if (gdbarch_debug >= 2) |
917317f4 JM |
4209 | fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n"); |
4210 | return gdbarch->memory_insert_breakpoint (addr, contents_cache); | |
4211 | } | |
4212 | ||
4213 | void | |
4214 | set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, | |
4215 | gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint) | |
4216 | { | |
4217 | gdbarch->memory_insert_breakpoint = memory_insert_breakpoint; | |
4218 | } | |
4219 | ||
4220 | int | |
4221 | gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache) | |
4222 | { | |
8de9bdc4 | 4223 | gdb_assert (gdbarch != NULL); |
917317f4 | 4224 | if (gdbarch->memory_remove_breakpoint == 0) |
8e65ff28 AC |
4225 | internal_error (__FILE__, __LINE__, |
4226 | "gdbarch: gdbarch_memory_remove_breakpoint invalid"); | |
917317f4 | 4227 | if (gdbarch_debug >= 2) |
917317f4 JM |
4228 | fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n"); |
4229 | return gdbarch->memory_remove_breakpoint (addr, contents_cache); | |
4230 | } | |
4231 | ||
4232 | void | |
4233 | set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, | |
4234 | gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint) | |
4235 | { | |
4236 | gdbarch->memory_remove_breakpoint = memory_remove_breakpoint; | |
4237 | } | |
4238 | ||
0f71a2f6 | 4239 | CORE_ADDR |
104c1213 | 4240 | gdbarch_decr_pc_after_break (struct gdbarch *gdbarch) |
0f71a2f6 | 4241 | { |
8de9bdc4 | 4242 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 4243 | if (gdbarch->decr_pc_after_break == -1) |
8e65ff28 AC |
4244 | internal_error (__FILE__, __LINE__, |
4245 | "gdbarch: gdbarch_decr_pc_after_break invalid"); | |
0f71a2f6 | 4246 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
4247 | fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n"); |
4248 | return gdbarch->decr_pc_after_break; | |
4249 | } | |
4250 | ||
4251 | void | |
104c1213 JM |
4252 | set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch, |
4253 | CORE_ADDR decr_pc_after_break) | |
0f71a2f6 JM |
4254 | { |
4255 | gdbarch->decr_pc_after_break = decr_pc_after_break; | |
4256 | } | |
4257 | ||
e02bc4cc DS |
4258 | int |
4259 | gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, int select_it) | |
4260 | { | |
8de9bdc4 | 4261 | gdb_assert (gdbarch != NULL); |
e02bc4cc DS |
4262 | if (gdbarch->prepare_to_proceed == 0) |
4263 | internal_error (__FILE__, __LINE__, | |
4264 | "gdbarch: gdbarch_prepare_to_proceed invalid"); | |
4265 | if (gdbarch_debug >= 2) | |
4266 | fprintf_unfiltered (gdb_stdlog, "gdbarch_prepare_to_proceed called\n"); | |
4267 | return gdbarch->prepare_to_proceed (select_it); | |
4268 | } | |
4269 | ||
4270 | void | |
4271 | set_gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, | |
4272 | gdbarch_prepare_to_proceed_ftype prepare_to_proceed) | |
4273 | { | |
4274 | gdbarch->prepare_to_proceed = prepare_to_proceed; | |
4275 | } | |
4276 | ||
0f71a2f6 | 4277 | CORE_ADDR |
104c1213 | 4278 | gdbarch_function_start_offset (struct gdbarch *gdbarch) |
0f71a2f6 | 4279 | { |
8de9bdc4 | 4280 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 4281 | if (gdbarch->function_start_offset == -1) |
8e65ff28 AC |
4282 | internal_error (__FILE__, __LINE__, |
4283 | "gdbarch: gdbarch_function_start_offset invalid"); | |
0f71a2f6 | 4284 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
4285 | fprintf_unfiltered (gdb_stdlog, "gdbarch_function_start_offset called\n"); |
4286 | return gdbarch->function_start_offset; | |
4287 | } | |
4288 | ||
4289 | void | |
104c1213 JM |
4290 | set_gdbarch_function_start_offset (struct gdbarch *gdbarch, |
4291 | CORE_ADDR function_start_offset) | |
0f71a2f6 JM |
4292 | { |
4293 | gdbarch->function_start_offset = function_start_offset; | |
4294 | } | |
4295 | ||
4296 | void | |
adf40b2e | 4297 | gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len) |
0f71a2f6 | 4298 | { |
8de9bdc4 | 4299 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 4300 | if (gdbarch->remote_translate_xfer_address == 0) |
8e65ff28 AC |
4301 | internal_error (__FILE__, __LINE__, |
4302 | "gdbarch: gdbarch_remote_translate_xfer_address invalid"); | |
0f71a2f6 | 4303 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
4304 | fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n"); |
4305 | gdbarch->remote_translate_xfer_address (gdb_addr, gdb_len, rem_addr, rem_len); | |
4306 | } | |
4307 | ||
4308 | void | |
104c1213 JM |
4309 | set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, |
4310 | gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address) | |
0f71a2f6 JM |
4311 | { |
4312 | gdbarch->remote_translate_xfer_address = remote_translate_xfer_address; | |
4313 | } | |
4314 | ||
4315 | CORE_ADDR | |
104c1213 | 4316 | gdbarch_frame_args_skip (struct gdbarch *gdbarch) |
0f71a2f6 | 4317 | { |
8de9bdc4 | 4318 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 4319 | if (gdbarch->frame_args_skip == -1) |
8e65ff28 AC |
4320 | internal_error (__FILE__, __LINE__, |
4321 | "gdbarch: gdbarch_frame_args_skip invalid"); | |
0f71a2f6 | 4322 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
4323 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n"); |
4324 | return gdbarch->frame_args_skip; | |
4325 | } | |
4326 | ||
4327 | void | |
104c1213 JM |
4328 | set_gdbarch_frame_args_skip (struct gdbarch *gdbarch, |
4329 | CORE_ADDR frame_args_skip) | |
0f71a2f6 JM |
4330 | { |
4331 | gdbarch->frame_args_skip = frame_args_skip; | |
4332 | } | |
4333 | ||
4334 | int | |
4335 | gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi) | |
4336 | { | |
8de9bdc4 | 4337 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 4338 | if (gdbarch->frameless_function_invocation == 0) |
8e65ff28 AC |
4339 | internal_error (__FILE__, __LINE__, |
4340 | "gdbarch: gdbarch_frameless_function_invocation invalid"); | |
0f71a2f6 | 4341 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
4342 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frameless_function_invocation called\n"); |
4343 | return gdbarch->frameless_function_invocation (fi); | |
4344 | } | |
4345 | ||
4346 | void | |
104c1213 JM |
4347 | set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, |
4348 | gdbarch_frameless_function_invocation_ftype frameless_function_invocation) | |
0f71a2f6 JM |
4349 | { |
4350 | gdbarch->frameless_function_invocation = frameless_function_invocation; | |
4351 | } | |
4352 | ||
4353 | CORE_ADDR | |
4354 | gdbarch_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame) | |
4355 | { | |
8de9bdc4 | 4356 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 4357 | if (gdbarch->frame_chain == 0) |
8e65ff28 AC |
4358 | internal_error (__FILE__, __LINE__, |
4359 | "gdbarch: gdbarch_frame_chain invalid"); | |
0f71a2f6 | 4360 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
4361 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain called\n"); |
4362 | return gdbarch->frame_chain (frame); | |
4363 | } | |
4364 | ||
4365 | void | |
104c1213 JM |
4366 | set_gdbarch_frame_chain (struct gdbarch *gdbarch, |
4367 | gdbarch_frame_chain_ftype frame_chain) | |
0f71a2f6 JM |
4368 | { |
4369 | gdbarch->frame_chain = frame_chain; | |
4370 | } | |
4371 | ||
4372 | int | |
4373 | gdbarch_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe) | |
4374 | { | |
8de9bdc4 | 4375 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 4376 | if (gdbarch->frame_chain_valid == 0) |
8e65ff28 AC |
4377 | internal_error (__FILE__, __LINE__, |
4378 | "gdbarch: gdbarch_frame_chain_valid invalid"); | |
0f71a2f6 | 4379 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
4380 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain_valid called\n"); |
4381 | return gdbarch->frame_chain_valid (chain, thisframe); | |
4382 | } | |
4383 | ||
4384 | void | |
104c1213 JM |
4385 | set_gdbarch_frame_chain_valid (struct gdbarch *gdbarch, |
4386 | gdbarch_frame_chain_valid_ftype frame_chain_valid) | |
0f71a2f6 JM |
4387 | { |
4388 | gdbarch->frame_chain_valid = frame_chain_valid; | |
4389 | } | |
4390 | ||
4391 | CORE_ADDR | |
4392 | gdbarch_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi) | |
4393 | { | |
8de9bdc4 | 4394 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 4395 | if (gdbarch->frame_saved_pc == 0) |
8e65ff28 AC |
4396 | internal_error (__FILE__, __LINE__, |
4397 | "gdbarch: gdbarch_frame_saved_pc invalid"); | |
0f71a2f6 | 4398 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
4399 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_saved_pc called\n"); |
4400 | return gdbarch->frame_saved_pc (fi); | |
4401 | } | |
4402 | ||
4403 | void | |
104c1213 JM |
4404 | set_gdbarch_frame_saved_pc (struct gdbarch *gdbarch, |
4405 | gdbarch_frame_saved_pc_ftype frame_saved_pc) | |
0f71a2f6 JM |
4406 | { |
4407 | gdbarch->frame_saved_pc = frame_saved_pc; | |
4408 | } | |
4409 | ||
4410 | CORE_ADDR | |
4411 | gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi) | |
4412 | { | |
8de9bdc4 | 4413 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 4414 | if (gdbarch->frame_args_address == 0) |
8e65ff28 AC |
4415 | internal_error (__FILE__, __LINE__, |
4416 | "gdbarch: gdbarch_frame_args_address invalid"); | |
0f71a2f6 | 4417 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
4418 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_address called\n"); |
4419 | return gdbarch->frame_args_address (fi); | |
4420 | } | |
4421 | ||
4422 | void | |
104c1213 JM |
4423 | set_gdbarch_frame_args_address (struct gdbarch *gdbarch, |
4424 | gdbarch_frame_args_address_ftype frame_args_address) | |
0f71a2f6 JM |
4425 | { |
4426 | gdbarch->frame_args_address = frame_args_address; | |
4427 | } | |
4428 | ||
4429 | CORE_ADDR | |
4430 | gdbarch_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi) | |
4431 | { | |
8de9bdc4 | 4432 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 4433 | if (gdbarch->frame_locals_address == 0) |
8e65ff28 AC |
4434 | internal_error (__FILE__, __LINE__, |
4435 | "gdbarch: gdbarch_frame_locals_address invalid"); | |
0f71a2f6 | 4436 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
4437 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_locals_address called\n"); |
4438 | return gdbarch->frame_locals_address (fi); | |
4439 | } | |
4440 | ||
4441 | void | |
104c1213 JM |
4442 | set_gdbarch_frame_locals_address (struct gdbarch *gdbarch, |
4443 | gdbarch_frame_locals_address_ftype frame_locals_address) | |
0f71a2f6 JM |
4444 | { |
4445 | gdbarch->frame_locals_address = frame_locals_address; | |
4446 | } | |
4447 | ||
4448 | CORE_ADDR | |
4449 | gdbarch_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame) | |
4450 | { | |
8de9bdc4 | 4451 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 4452 | if (gdbarch->saved_pc_after_call == 0) |
8e65ff28 AC |
4453 | internal_error (__FILE__, __LINE__, |
4454 | "gdbarch: gdbarch_saved_pc_after_call invalid"); | |
0f71a2f6 | 4455 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
4456 | fprintf_unfiltered (gdb_stdlog, "gdbarch_saved_pc_after_call called\n"); |
4457 | return gdbarch->saved_pc_after_call (frame); | |
4458 | } | |
4459 | ||
4460 | void | |
104c1213 JM |
4461 | set_gdbarch_saved_pc_after_call (struct gdbarch *gdbarch, |
4462 | gdbarch_saved_pc_after_call_ftype saved_pc_after_call) | |
0f71a2f6 JM |
4463 | { |
4464 | gdbarch->saved_pc_after_call = saved_pc_after_call; | |
4465 | } | |
4466 | ||
4467 | int | |
4468 | gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame) | |
4469 | { | |
8de9bdc4 | 4470 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 4471 | if (gdbarch->frame_num_args == 0) |
8e65ff28 AC |
4472 | internal_error (__FILE__, __LINE__, |
4473 | "gdbarch: gdbarch_frame_num_args invalid"); | |
0f71a2f6 | 4474 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
4475 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n"); |
4476 | return gdbarch->frame_num_args (frame); | |
4477 | } | |
4478 | ||
4479 | void | |
104c1213 JM |
4480 | set_gdbarch_frame_num_args (struct gdbarch *gdbarch, |
4481 | gdbarch_frame_num_args_ftype frame_num_args) | |
0f71a2f6 JM |
4482 | { |
4483 | gdbarch->frame_num_args = frame_num_args; | |
4484 | } | |
4485 | ||
2ada493a AC |
4486 | int |
4487 | gdbarch_stack_align_p (struct gdbarch *gdbarch) | |
4488 | { | |
8de9bdc4 | 4489 | gdb_assert (gdbarch != NULL); |
2ada493a AC |
4490 | return gdbarch->stack_align != 0; |
4491 | } | |
4492 | ||
4493 | CORE_ADDR | |
4494 | gdbarch_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp) | |
4495 | { | |
8de9bdc4 | 4496 | gdb_assert (gdbarch != NULL); |
2ada493a | 4497 | if (gdbarch->stack_align == 0) |
8e65ff28 AC |
4498 | internal_error (__FILE__, __LINE__, |
4499 | "gdbarch: gdbarch_stack_align invalid"); | |
2ada493a AC |
4500 | if (gdbarch_debug >= 2) |
4501 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stack_align called\n"); | |
4502 | return gdbarch->stack_align (sp); | |
4503 | } | |
4504 | ||
4505 | void | |
4506 | set_gdbarch_stack_align (struct gdbarch *gdbarch, | |
4507 | gdbarch_stack_align_ftype stack_align) | |
4508 | { | |
4509 | gdbarch->stack_align = stack_align; | |
4510 | } | |
4511 | ||
1dd4193b AC |
4512 | int |
4513 | gdbarch_extra_stack_alignment_needed (struct gdbarch *gdbarch) | |
4514 | { | |
8de9bdc4 | 4515 | gdb_assert (gdbarch != NULL); |
1dd4193b AC |
4516 | /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */ |
4517 | if (gdbarch_debug >= 2) | |
4518 | fprintf_unfiltered (gdb_stdlog, "gdbarch_extra_stack_alignment_needed called\n"); | |
4519 | return gdbarch->extra_stack_alignment_needed; | |
4520 | } | |
4521 | ||
4522 | void | |
4523 | set_gdbarch_extra_stack_alignment_needed (struct gdbarch *gdbarch, | |
4524 | int extra_stack_alignment_needed) | |
4525 | { | |
4526 | gdbarch->extra_stack_alignment_needed = extra_stack_alignment_needed; | |
4527 | } | |
4528 | ||
d03e67c9 AC |
4529 | int |
4530 | gdbarch_reg_struct_has_addr_p (struct gdbarch *gdbarch) | |
4531 | { | |
8de9bdc4 | 4532 | gdb_assert (gdbarch != NULL); |
d03e67c9 AC |
4533 | return gdbarch->reg_struct_has_addr != 0; |
4534 | } | |
4535 | ||
4536 | int | |
4537 | gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type) | |
4538 | { | |
8de9bdc4 | 4539 | gdb_assert (gdbarch != NULL); |
d03e67c9 | 4540 | if (gdbarch->reg_struct_has_addr == 0) |
8e65ff28 AC |
4541 | internal_error (__FILE__, __LINE__, |
4542 | "gdbarch: gdbarch_reg_struct_has_addr invalid"); | |
d03e67c9 AC |
4543 | if (gdbarch_debug >= 2) |
4544 | fprintf_unfiltered (gdb_stdlog, "gdbarch_reg_struct_has_addr called\n"); | |
4545 | return gdbarch->reg_struct_has_addr (gcc_p, type); | |
4546 | } | |
4547 | ||
4548 | void | |
4549 | set_gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, | |
4550 | gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr) | |
4551 | { | |
4552 | gdbarch->reg_struct_has_addr = reg_struct_has_addr; | |
4553 | } | |
4554 | ||
d1e3cf49 AC |
4555 | int |
4556 | gdbarch_save_dummy_frame_tos_p (struct gdbarch *gdbarch) | |
4557 | { | |
8de9bdc4 | 4558 | gdb_assert (gdbarch != NULL); |
d1e3cf49 AC |
4559 | return gdbarch->save_dummy_frame_tos != 0; |
4560 | } | |
4561 | ||
4562 | void | |
4563 | gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp) | |
4564 | { | |
8de9bdc4 | 4565 | gdb_assert (gdbarch != NULL); |
d1e3cf49 | 4566 | if (gdbarch->save_dummy_frame_tos == 0) |
8e65ff28 AC |
4567 | internal_error (__FILE__, __LINE__, |
4568 | "gdbarch: gdbarch_save_dummy_frame_tos invalid"); | |
d1e3cf49 AC |
4569 | if (gdbarch_debug >= 2) |
4570 | fprintf_unfiltered (gdb_stdlog, "gdbarch_save_dummy_frame_tos called\n"); | |
4571 | gdbarch->save_dummy_frame_tos (sp); | |
4572 | } | |
4573 | ||
4574 | void | |
4575 | set_gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, | |
4576 | gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos) | |
4577 | { | |
4578 | gdbarch->save_dummy_frame_tos = save_dummy_frame_tos; | |
4579 | } | |
4580 | ||
58d5518e ND |
4581 | int |
4582 | gdbarch_parm_boundary (struct gdbarch *gdbarch) | |
4583 | { | |
8de9bdc4 | 4584 | gdb_assert (gdbarch != NULL); |
58d5518e ND |
4585 | if (gdbarch_debug >= 2) |
4586 | fprintf_unfiltered (gdb_stdlog, "gdbarch_parm_boundary called\n"); | |
4587 | return gdbarch->parm_boundary; | |
4588 | } | |
4589 | ||
4590 | void | |
4591 | set_gdbarch_parm_boundary (struct gdbarch *gdbarch, | |
4592 | int parm_boundary) | |
4593 | { | |
4594 | gdbarch->parm_boundary = parm_boundary; | |
4595 | } | |
4596 | ||
f0d4cc9e AC |
4597 | const struct floatformat * |
4598 | gdbarch_float_format (struct gdbarch *gdbarch) | |
4599 | { | |
8de9bdc4 | 4600 | gdb_assert (gdbarch != NULL); |
f0d4cc9e AC |
4601 | if (gdbarch_debug >= 2) |
4602 | fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n"); | |
4603 | return gdbarch->float_format; | |
4604 | } | |
4605 | ||
4606 | void | |
4607 | set_gdbarch_float_format (struct gdbarch *gdbarch, | |
4608 | const struct floatformat * float_format) | |
4609 | { | |
4610 | gdbarch->float_format = float_format; | |
4611 | } | |
4612 | ||
4613 | const struct floatformat * | |
4614 | gdbarch_double_format (struct gdbarch *gdbarch) | |
4615 | { | |
8de9bdc4 | 4616 | gdb_assert (gdbarch != NULL); |
f0d4cc9e AC |
4617 | if (gdbarch_debug >= 2) |
4618 | fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n"); | |
4619 | return gdbarch->double_format; | |
4620 | } | |
4621 | ||
4622 | void | |
4623 | set_gdbarch_double_format (struct gdbarch *gdbarch, | |
4624 | const struct floatformat * double_format) | |
4625 | { | |
4626 | gdbarch->double_format = double_format; | |
4627 | } | |
4628 | ||
4629 | const struct floatformat * | |
4630 | gdbarch_long_double_format (struct gdbarch *gdbarch) | |
4631 | { | |
8de9bdc4 | 4632 | gdb_assert (gdbarch != NULL); |
f0d4cc9e AC |
4633 | if (gdbarch_debug >= 2) |
4634 | fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n"); | |
4635 | return gdbarch->long_double_format; | |
4636 | } | |
4637 | ||
4638 | void | |
4639 | set_gdbarch_long_double_format (struct gdbarch *gdbarch, | |
4640 | const struct floatformat * long_double_format) | |
4641 | { | |
4642 | gdbarch->long_double_format = long_double_format; | |
4643 | } | |
4644 | ||
f517ea4e PS |
4645 | CORE_ADDR |
4646 | gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr) | |
4647 | { | |
8de9bdc4 | 4648 | gdb_assert (gdbarch != NULL); |
f517ea4e | 4649 | if (gdbarch->convert_from_func_ptr_addr == 0) |
8e65ff28 AC |
4650 | internal_error (__FILE__, __LINE__, |
4651 | "gdbarch: gdbarch_convert_from_func_ptr_addr invalid"); | |
f517ea4e PS |
4652 | if (gdbarch_debug >= 2) |
4653 | fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n"); | |
4654 | return gdbarch->convert_from_func_ptr_addr (addr); | |
4655 | } | |
4656 | ||
4657 | void | |
4658 | set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, | |
4659 | gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr) | |
4660 | { | |
4661 | gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr; | |
4662 | } | |
4663 | ||
875e1767 AC |
4664 | CORE_ADDR |
4665 | gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr) | |
4666 | { | |
8de9bdc4 | 4667 | gdb_assert (gdbarch != NULL); |
875e1767 AC |
4668 | if (gdbarch->addr_bits_remove == 0) |
4669 | internal_error (__FILE__, __LINE__, | |
4670 | "gdbarch: gdbarch_addr_bits_remove invalid"); | |
4671 | if (gdbarch_debug >= 2) | |
4672 | fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n"); | |
4673 | return gdbarch->addr_bits_remove (addr); | |
4674 | } | |
4675 | ||
4676 | void | |
4677 | set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch, | |
4678 | gdbarch_addr_bits_remove_ftype addr_bits_remove) | |
4679 | { | |
4680 | gdbarch->addr_bits_remove = addr_bits_remove; | |
4681 | } | |
4682 | ||
181c1381 RE |
4683 | CORE_ADDR |
4684 | gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr) | |
4685 | { | |
8de9bdc4 | 4686 | gdb_assert (gdbarch != NULL); |
181c1381 RE |
4687 | if (gdbarch->smash_text_address == 0) |
4688 | internal_error (__FILE__, __LINE__, | |
4689 | "gdbarch: gdbarch_smash_text_address invalid"); | |
4690 | if (gdbarch_debug >= 2) | |
4691 | fprintf_unfiltered (gdb_stdlog, "gdbarch_smash_text_address called\n"); | |
4692 | return gdbarch->smash_text_address (addr); | |
4693 | } | |
4694 | ||
4695 | void | |
4696 | set_gdbarch_smash_text_address (struct gdbarch *gdbarch, | |
4697 | gdbarch_smash_text_address_ftype smash_text_address) | |
4698 | { | |
4699 | gdbarch->smash_text_address = smash_text_address; | |
4700 | } | |
4701 | ||
64c4637f AC |
4702 | int |
4703 | gdbarch_software_single_step_p (struct gdbarch *gdbarch) | |
4704 | { | |
8de9bdc4 | 4705 | gdb_assert (gdbarch != NULL); |
64c4637f AC |
4706 | return gdbarch->software_single_step != 0; |
4707 | } | |
4708 | ||
4709 | void | |
4710 | gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p) | |
4711 | { | |
8de9bdc4 | 4712 | gdb_assert (gdbarch != NULL); |
64c4637f AC |
4713 | if (gdbarch->software_single_step == 0) |
4714 | internal_error (__FILE__, __LINE__, | |
4715 | "gdbarch: gdbarch_software_single_step invalid"); | |
4716 | if (gdbarch_debug >= 2) | |
4717 | fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n"); | |
4718 | gdbarch->software_single_step (sig, insert_breakpoints_p); | |
4719 | } | |
4720 | ||
4721 | void | |
4722 | set_gdbarch_software_single_step (struct gdbarch *gdbarch, | |
4723 | gdbarch_software_single_step_ftype software_single_step) | |
4724 | { | |
4725 | gdbarch->software_single_step = software_single_step; | |
4726 | } | |
4727 | ||
2bf0cb65 EZ |
4728 | int |
4729 | gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, disassemble_info *info) | |
4730 | { | |
8de9bdc4 | 4731 | gdb_assert (gdbarch != NULL); |
2bf0cb65 EZ |
4732 | if (gdbarch->print_insn == 0) |
4733 | internal_error (__FILE__, __LINE__, | |
4734 | "gdbarch: gdbarch_print_insn invalid"); | |
4735 | if (gdbarch_debug >= 2) | |
4736 | fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n"); | |
4737 | return gdbarch->print_insn (vma, info); | |
4738 | } | |
4739 | ||
4740 | void | |
4741 | set_gdbarch_print_insn (struct gdbarch *gdbarch, | |
4742 | gdbarch_print_insn_ftype print_insn) | |
4743 | { | |
4744 | gdbarch->print_insn = print_insn; | |
4745 | } | |
4746 | ||
bdcd319a CV |
4747 | CORE_ADDR |
4748 | gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc) | |
4749 | { | |
8de9bdc4 | 4750 | gdb_assert (gdbarch != NULL); |
bdcd319a CV |
4751 | if (gdbarch->skip_trampoline_code == 0) |
4752 | internal_error (__FILE__, __LINE__, | |
4753 | "gdbarch: gdbarch_skip_trampoline_code invalid"); | |
4754 | if (gdbarch_debug >= 2) | |
4755 | fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n"); | |
4756 | return gdbarch->skip_trampoline_code (pc); | |
4757 | } | |
4758 | ||
4759 | void | |
4760 | set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, | |
4761 | gdbarch_skip_trampoline_code_ftype skip_trampoline_code) | |
4762 | { | |
4763 | gdbarch->skip_trampoline_code = skip_trampoline_code; | |
4764 | } | |
4765 | ||
68e9cc94 CV |
4766 | int |
4767 | gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name) | |
4768 | { | |
8de9bdc4 | 4769 | gdb_assert (gdbarch != NULL); |
68e9cc94 CV |
4770 | if (gdbarch->in_solib_call_trampoline == 0) |
4771 | internal_error (__FILE__, __LINE__, | |
4772 | "gdbarch: gdbarch_in_solib_call_trampoline invalid"); | |
4773 | if (gdbarch_debug >= 2) | |
4774 | fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_call_trampoline called\n"); | |
4775 | return gdbarch->in_solib_call_trampoline (pc, name); | |
4776 | } | |
4777 | ||
4778 | void | |
4779 | set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, | |
4780 | gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline) | |
4781 | { | |
4782 | gdbarch->in_solib_call_trampoline = in_solib_call_trampoline; | |
4783 | } | |
4784 | ||
d50355b6 MS |
4785 | int |
4786 | gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name) | |
4787 | { | |
4788 | gdb_assert (gdbarch != NULL); | |
4789 | if (gdbarch->in_solib_return_trampoline == 0) | |
4790 | internal_error (__FILE__, __LINE__, | |
4791 | "gdbarch: gdbarch_in_solib_return_trampoline invalid"); | |
4792 | if (gdbarch_debug >= 2) | |
4793 | fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n"); | |
4794 | return gdbarch->in_solib_return_trampoline (pc, name); | |
4795 | } | |
4796 | ||
4797 | void | |
4798 | set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, | |
4799 | gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline) | |
4800 | { | |
4801 | gdbarch->in_solib_return_trampoline = in_solib_return_trampoline; | |
4802 | } | |
4803 | ||
d7bd68ca AC |
4804 | int |
4805 | gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc, char *name) | |
4806 | { | |
8de9bdc4 | 4807 | gdb_assert (gdbarch != NULL); |
d7bd68ca AC |
4808 | if (gdbarch->pc_in_sigtramp == 0) |
4809 | internal_error (__FILE__, __LINE__, | |
4810 | "gdbarch: gdbarch_pc_in_sigtramp invalid"); | |
4811 | if (gdbarch_debug >= 2) | |
4812 | fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_in_sigtramp called\n"); | |
4813 | return gdbarch->pc_in_sigtramp (pc, name); | |
4814 | } | |
4815 | ||
4816 | void | |
4817 | set_gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, | |
4818 | gdbarch_pc_in_sigtramp_ftype pc_in_sigtramp) | |
4819 | { | |
4820 | gdbarch->pc_in_sigtramp = pc_in_sigtramp; | |
4821 | } | |
4822 | ||
43156d82 MK |
4823 | int |
4824 | gdbarch_sigtramp_start_p (struct gdbarch *gdbarch) | |
4825 | { | |
4826 | gdb_assert (gdbarch != NULL); | |
4827 | return gdbarch->sigtramp_start != 0; | |
4828 | } | |
4829 | ||
4830 | CORE_ADDR | |
4831 | gdbarch_sigtramp_start (struct gdbarch *gdbarch, CORE_ADDR pc) | |
4832 | { | |
4833 | gdb_assert (gdbarch != NULL); | |
4834 | if (gdbarch->sigtramp_start == 0) | |
4835 | internal_error (__FILE__, __LINE__, | |
4836 | "gdbarch: gdbarch_sigtramp_start invalid"); | |
4837 | if (gdbarch_debug >= 2) | |
4838 | fprintf_unfiltered (gdb_stdlog, "gdbarch_sigtramp_start called\n"); | |
4839 | return gdbarch->sigtramp_start (pc); | |
4840 | } | |
4841 | ||
4842 | void | |
4843 | set_gdbarch_sigtramp_start (struct gdbarch *gdbarch, | |
4844 | gdbarch_sigtramp_start_ftype sigtramp_start) | |
4845 | { | |
4846 | gdbarch->sigtramp_start = sigtramp_start; | |
4847 | } | |
4848 | ||
e76cff22 AC |
4849 | int |
4850 | gdbarch_sigtramp_end_p (struct gdbarch *gdbarch) | |
4851 | { | |
4852 | gdb_assert (gdbarch != NULL); | |
4853 | return gdbarch->sigtramp_end != 0; | |
4854 | } | |
4855 | ||
43156d82 MK |
4856 | CORE_ADDR |
4857 | gdbarch_sigtramp_end (struct gdbarch *gdbarch, CORE_ADDR pc) | |
4858 | { | |
4859 | gdb_assert (gdbarch != NULL); | |
4860 | if (gdbarch->sigtramp_end == 0) | |
4861 | internal_error (__FILE__, __LINE__, | |
4862 | "gdbarch: gdbarch_sigtramp_end invalid"); | |
4863 | if (gdbarch_debug >= 2) | |
4864 | fprintf_unfiltered (gdb_stdlog, "gdbarch_sigtramp_end called\n"); | |
4865 | return gdbarch->sigtramp_end (pc); | |
4866 | } | |
4867 | ||
4868 | void | |
4869 | set_gdbarch_sigtramp_end (struct gdbarch *gdbarch, | |
4870 | gdbarch_sigtramp_end_ftype sigtramp_end) | |
4871 | { | |
4872 | gdbarch->sigtramp_end = sigtramp_end; | |
4873 | } | |
4874 | ||
c12260ac CV |
4875 | int |
4876 | gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr) | |
4877 | { | |
8de9bdc4 | 4878 | gdb_assert (gdbarch != NULL); |
c12260ac CV |
4879 | if (gdbarch->in_function_epilogue_p == 0) |
4880 | internal_error (__FILE__, __LINE__, | |
4881 | "gdbarch: gdbarch_in_function_epilogue_p invalid"); | |
4882 | if (gdbarch_debug >= 2) | |
4883 | fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n"); | |
4884 | return gdbarch->in_function_epilogue_p (gdbarch, addr); | |
4885 | } | |
4886 | ||
4887 | void | |
4888 | set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, | |
4889 | gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p) | |
4890 | { | |
4891 | gdbarch->in_function_epilogue_p = in_function_epilogue_p; | |
4892 | } | |
4893 | ||
552c04a7 TT |
4894 | char * |
4895 | gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv) | |
4896 | { | |
8de9bdc4 | 4897 | gdb_assert (gdbarch != NULL); |
552c04a7 TT |
4898 | if (gdbarch->construct_inferior_arguments == 0) |
4899 | internal_error (__FILE__, __LINE__, | |
4900 | "gdbarch: gdbarch_construct_inferior_arguments invalid"); | |
4901 | if (gdbarch_debug >= 2) | |
4902 | fprintf_unfiltered (gdb_stdlog, "gdbarch_construct_inferior_arguments called\n"); | |
4903 | return gdbarch->construct_inferior_arguments (gdbarch, argc, argv); | |
4904 | } | |
4905 | ||
4906 | void | |
4907 | set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, | |
4908 | gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments) | |
4909 | { | |
4910 | gdbarch->construct_inferior_arguments = construct_inferior_arguments; | |
4911 | } | |
4912 | ||
b6af0555 JS |
4913 | int |
4914 | gdbarch_dwarf2_build_frame_info_p (struct gdbarch *gdbarch) | |
4915 | { | |
8de9bdc4 | 4916 | gdb_assert (gdbarch != NULL); |
b6af0555 JS |
4917 | return gdbarch->dwarf2_build_frame_info != 0; |
4918 | } | |
4919 | ||
4920 | void | |
4921 | gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch, struct objfile *objfile) | |
4922 | { | |
8de9bdc4 | 4923 | gdb_assert (gdbarch != NULL); |
b6af0555 JS |
4924 | if (gdbarch->dwarf2_build_frame_info == 0) |
4925 | internal_error (__FILE__, __LINE__, | |
4926 | "gdbarch: gdbarch_dwarf2_build_frame_info invalid"); | |
4927 | if (gdbarch_debug >= 2) | |
4928 | fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_build_frame_info called\n"); | |
4929 | gdbarch->dwarf2_build_frame_info (objfile); | |
4930 | } | |
4931 | ||
4932 | void | |
4933 | set_gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch, | |
4934 | gdbarch_dwarf2_build_frame_info_ftype dwarf2_build_frame_info) | |
4935 | { | |
4936 | gdbarch->dwarf2_build_frame_info = dwarf2_build_frame_info; | |
4937 | } | |
4938 | ||
a2cf933a EZ |
4939 | void |
4940 | gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym) | |
4941 | { | |
8de9bdc4 | 4942 | gdb_assert (gdbarch != NULL); |
a2cf933a EZ |
4943 | if (gdbarch->elf_make_msymbol_special == 0) |
4944 | internal_error (__FILE__, __LINE__, | |
4945 | "gdbarch: gdbarch_elf_make_msymbol_special invalid"); | |
4946 | if (gdbarch_debug >= 2) | |
4947 | fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n"); | |
4948 | gdbarch->elf_make_msymbol_special (sym, msym); | |
4949 | } | |
4950 | ||
4951 | void | |
4952 | set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, | |
4953 | gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special) | |
4954 | { | |
4955 | gdbarch->elf_make_msymbol_special = elf_make_msymbol_special; | |
4956 | } | |
4957 | ||
4958 | void | |
4959 | gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym) | |
4960 | { | |
8de9bdc4 | 4961 | gdb_assert (gdbarch != NULL); |
a2cf933a EZ |
4962 | if (gdbarch->coff_make_msymbol_special == 0) |
4963 | internal_error (__FILE__, __LINE__, | |
4964 | "gdbarch: gdbarch_coff_make_msymbol_special invalid"); | |
4965 | if (gdbarch_debug >= 2) | |
4966 | fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n"); | |
4967 | gdbarch->coff_make_msymbol_special (val, msym); | |
4968 | } | |
4969 | ||
4970 | void | |
4971 | set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, | |
4972 | gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special) | |
4973 | { | |
4974 | gdbarch->coff_make_msymbol_special = coff_make_msymbol_special; | |
4975 | } | |
4976 | ||
5720643c JB |
4977 | const char * |
4978 | gdbarch_name_of_malloc (struct gdbarch *gdbarch) | |
4979 | { | |
4980 | gdb_assert (gdbarch != NULL); | |
4981 | /* Skip verify of name_of_malloc, invalid_p == 0 */ | |
4982 | if (gdbarch_debug >= 2) | |
4983 | fprintf_unfiltered (gdb_stdlog, "gdbarch_name_of_malloc called\n"); | |
4984 | return gdbarch->name_of_malloc; | |
4985 | } | |
4986 | ||
4987 | void | |
4988 | set_gdbarch_name_of_malloc (struct gdbarch *gdbarch, | |
4989 | const char * name_of_malloc) | |
4990 | { | |
4991 | gdbarch->name_of_malloc = name_of_malloc; | |
4992 | } | |
4993 | ||
0f71a2f6 | 4994 | |
be5a57e1 | 4995 | /* Keep a registry of per-architecture data-pointers required by GDB |
0f71a2f6 JM |
4996 | modules. */ |
4997 | ||
4998 | struct gdbarch_data | |
4999 | { | |
95160752 | 5000 | unsigned index; |
76860b5f | 5001 | int init_p; |
95160752 AC |
5002 | gdbarch_data_init_ftype *init; |
5003 | gdbarch_data_free_ftype *free; | |
0f71a2f6 JM |
5004 | }; |
5005 | ||
5006 | struct gdbarch_data_registration | |
adf40b2e | 5007 | { |
adf40b2e JM |
5008 | struct gdbarch_data *data; |
5009 | struct gdbarch_data_registration *next; | |
5010 | }; | |
0f71a2f6 | 5011 | |
be5a57e1 | 5012 | struct gdbarch_data_registry |
adf40b2e | 5013 | { |
95160752 | 5014 | unsigned nr; |
adf40b2e JM |
5015 | struct gdbarch_data_registration *registrations; |
5016 | }; | |
0f71a2f6 | 5017 | |
be5a57e1 | 5018 | struct gdbarch_data_registry gdbarch_data_registry = |
0f71a2f6 JM |
5019 | { |
5020 | 0, NULL, | |
5021 | }; | |
5022 | ||
5023 | struct gdbarch_data * | |
95160752 AC |
5024 | register_gdbarch_data (gdbarch_data_init_ftype *init, |
5025 | gdbarch_data_free_ftype *free) | |
0f71a2f6 JM |
5026 | { |
5027 | struct gdbarch_data_registration **curr; | |
76860b5f | 5028 | /* Append the new registraration. */ |
be5a57e1 | 5029 | for (curr = &gdbarch_data_registry.registrations; |
0f71a2f6 JM |
5030 | (*curr) != NULL; |
5031 | curr = &(*curr)->next); | |
5032 | (*curr) = XMALLOC (struct gdbarch_data_registration); | |
5033 | (*curr)->next = NULL; | |
0f71a2f6 | 5034 | (*curr)->data = XMALLOC (struct gdbarch_data); |
be5a57e1 | 5035 | (*curr)->data->index = gdbarch_data_registry.nr++; |
95160752 | 5036 | (*curr)->data->init = init; |
76860b5f | 5037 | (*curr)->data->init_p = 1; |
95160752 | 5038 | (*curr)->data->free = free; |
0f71a2f6 JM |
5039 | return (*curr)->data; |
5040 | } | |
5041 | ||
5042 | ||
b3cc3077 | 5043 | /* Create/delete the gdbarch data vector. */ |
95160752 AC |
5044 | |
5045 | static void | |
b3cc3077 | 5046 | alloc_gdbarch_data (struct gdbarch *gdbarch) |
95160752 | 5047 | { |
b3cc3077 JB |
5048 | gdb_assert (gdbarch->data == NULL); |
5049 | gdbarch->nr_data = gdbarch_data_registry.nr; | |
5050 | gdbarch->data = xcalloc (gdbarch->nr_data, sizeof (void*)); | |
5051 | } | |
3c875b6f | 5052 | |
b3cc3077 JB |
5053 | static void |
5054 | free_gdbarch_data (struct gdbarch *gdbarch) | |
5055 | { | |
5056 | struct gdbarch_data_registration *rego; | |
5057 | gdb_assert (gdbarch->data != NULL); | |
5058 | for (rego = gdbarch_data_registry.registrations; | |
5059 | rego != NULL; | |
5060 | rego = rego->next) | |
95160752 | 5061 | { |
b3cc3077 JB |
5062 | struct gdbarch_data *data = rego->data; |
5063 | gdb_assert (data->index < gdbarch->nr_data); | |
5064 | if (data->free != NULL && gdbarch->data[data->index] != NULL) | |
95160752 | 5065 | { |
b3cc3077 JB |
5066 | data->free (gdbarch, gdbarch->data[data->index]); |
5067 | gdbarch->data[data->index] = NULL; | |
95160752 | 5068 | } |
0f71a2f6 | 5069 | } |
b3cc3077 JB |
5070 | xfree (gdbarch->data); |
5071 | gdbarch->data = NULL; | |
0f71a2f6 JM |
5072 | } |
5073 | ||
5074 | ||
76860b5f | 5075 | /* Initialize the current value of the specified per-architecture |
b3cc3077 JB |
5076 | data-pointer. */ |
5077 | ||
95160752 AC |
5078 | void |
5079 | set_gdbarch_data (struct gdbarch *gdbarch, | |
5080 | struct gdbarch_data *data, | |
5081 | void *pointer) | |
5082 | { | |
5083 | gdb_assert (data->index < gdbarch->nr_data); | |
76860b5f AC |
5084 | if (gdbarch->data[data->index] != NULL) |
5085 | { | |
5086 | gdb_assert (data->free != NULL); | |
5087 | data->free (gdbarch, gdbarch->data[data->index]); | |
5088 | } | |
95160752 AC |
5089 | gdbarch->data[data->index] = pointer; |
5090 | } | |
5091 | ||
0f71a2f6 JM |
5092 | /* Return the current value of the specified per-architecture |
5093 | data-pointer. */ | |
5094 | ||
5095 | void * | |
451fbdda | 5096 | gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data) |
0f71a2f6 | 5097 | { |
451fbdda | 5098 | gdb_assert (data->index < gdbarch->nr_data); |
76860b5f AC |
5099 | /* The data-pointer isn't initialized, call init() to get a value but |
5100 | only if the architecture initializaiton has completed. Otherwise | |
5101 | punt - hope that the caller knows what they are doing. */ | |
5102 | if (gdbarch->data[data->index] == NULL | |
5103 | && gdbarch->initialized_p) | |
5104 | { | |
5105 | /* Be careful to detect an initialization cycle. */ | |
5106 | gdb_assert (data->init_p); | |
5107 | data->init_p = 0; | |
5108 | gdb_assert (data->init != NULL); | |
5109 | gdbarch->data[data->index] = data->init (gdbarch); | |
5110 | data->init_p = 1; | |
5111 | gdb_assert (gdbarch->data[data->index] != NULL); | |
5112 | } | |
451fbdda | 5113 | return gdbarch->data[data->index]; |
0f71a2f6 JM |
5114 | } |
5115 | ||
5116 | ||
5117 | ||
be5a57e1 | 5118 | /* Keep a registry of swapped data required by GDB modules. */ |
0f71a2f6 JM |
5119 | |
5120 | struct gdbarch_swap | |
5121 | { | |
5122 | void *swap; | |
5123 | struct gdbarch_swap_registration *source; | |
5124 | struct gdbarch_swap *next; | |
5125 | }; | |
5126 | ||
5127 | struct gdbarch_swap_registration | |
adf40b2e JM |
5128 | { |
5129 | void *data; | |
5130 | unsigned long sizeof_data; | |
5131 | gdbarch_swap_ftype *init; | |
5132 | struct gdbarch_swap_registration *next; | |
5133 | }; | |
0f71a2f6 | 5134 | |
be5a57e1 | 5135 | struct gdbarch_swap_registry |
adf40b2e JM |
5136 | { |
5137 | int nr; | |
5138 | struct gdbarch_swap_registration *registrations; | |
5139 | }; | |
0f71a2f6 | 5140 | |
be5a57e1 | 5141 | struct gdbarch_swap_registry gdbarch_swap_registry = |
0f71a2f6 JM |
5142 | { |
5143 | 0, NULL, | |
5144 | }; | |
5145 | ||
5146 | void | |
104c1213 JM |
5147 | register_gdbarch_swap (void *data, |
5148 | unsigned long sizeof_data, | |
5149 | gdbarch_swap_ftype *init) | |
0f71a2f6 JM |
5150 | { |
5151 | struct gdbarch_swap_registration **rego; | |
be5a57e1 | 5152 | for (rego = &gdbarch_swap_registry.registrations; |
0f71a2f6 JM |
5153 | (*rego) != NULL; |
5154 | rego = &(*rego)->next); | |
5155 | (*rego) = XMALLOC (struct gdbarch_swap_registration); | |
5156 | (*rego)->next = NULL; | |
5157 | (*rego)->init = init; | |
5158 | (*rego)->data = data; | |
5159 | (*rego)->sizeof_data = sizeof_data; | |
5160 | } | |
5161 | ||
40af4b0c AC |
5162 | static void |
5163 | clear_gdbarch_swap (struct gdbarch *gdbarch) | |
5164 | { | |
5165 | struct gdbarch_swap *curr; | |
5166 | for (curr = gdbarch->swap; | |
5167 | curr != NULL; | |
5168 | curr = curr->next) | |
5169 | { | |
5170 | memset (curr->source->data, 0, curr->source->sizeof_data); | |
5171 | } | |
5172 | } | |
0f71a2f6 | 5173 | |
0f71a2f6 | 5174 | static void |
104c1213 | 5175 | init_gdbarch_swap (struct gdbarch *gdbarch) |
0f71a2f6 JM |
5176 | { |
5177 | struct gdbarch_swap_registration *rego; | |
5178 | struct gdbarch_swap **curr = &gdbarch->swap; | |
be5a57e1 | 5179 | for (rego = gdbarch_swap_registry.registrations; |
0f71a2f6 JM |
5180 | rego != NULL; |
5181 | rego = rego->next) | |
5182 | { | |
5183 | if (rego->data != NULL) | |
5184 | { | |
5185 | (*curr) = XMALLOC (struct gdbarch_swap); | |
5186 | (*curr)->source = rego; | |
5187 | (*curr)->swap = xmalloc (rego->sizeof_data); | |
5188 | (*curr)->next = NULL; | |
0f71a2f6 JM |
5189 | curr = &(*curr)->next; |
5190 | } | |
5191 | if (rego->init != NULL) | |
5192 | rego->init (); | |
5193 | } | |
5194 | } | |
5195 | ||
0f71a2f6 | 5196 | static void |
104c1213 | 5197 | swapout_gdbarch_swap (struct gdbarch *gdbarch) |
0f71a2f6 JM |
5198 | { |
5199 | struct gdbarch_swap *curr; | |
5200 | for (curr = gdbarch->swap; | |
5201 | curr != NULL; | |
5202 | curr = curr->next) | |
5203 | memcpy (curr->swap, curr->source->data, curr->source->sizeof_data); | |
5204 | } | |
5205 | ||
0f71a2f6 | 5206 | static void |
104c1213 | 5207 | swapin_gdbarch_swap (struct gdbarch *gdbarch) |
0f71a2f6 JM |
5208 | { |
5209 | struct gdbarch_swap *curr; | |
5210 | for (curr = gdbarch->swap; | |
5211 | curr != NULL; | |
5212 | curr = curr->next) | |
5213 | memcpy (curr->source->data, curr->swap, curr->source->sizeof_data); | |
5214 | } | |
5215 | ||
5216 | ||
be5a57e1 | 5217 | /* Keep a registry of the architectures known by GDB. */ |
0f71a2f6 | 5218 | |
4b9b3959 | 5219 | struct gdbarch_registration |
0f71a2f6 JM |
5220 | { |
5221 | enum bfd_architecture bfd_architecture; | |
5222 | gdbarch_init_ftype *init; | |
4b9b3959 | 5223 | gdbarch_dump_tdep_ftype *dump_tdep; |
0f71a2f6 | 5224 | struct gdbarch_list *arches; |
4b9b3959 | 5225 | struct gdbarch_registration *next; |
0f71a2f6 JM |
5226 | }; |
5227 | ||
be5a57e1 | 5228 | static struct gdbarch_registration *gdbarch_registry = NULL; |
0f71a2f6 | 5229 | |
b4a20239 AC |
5230 | static void |
5231 | append_name (const char ***buf, int *nr, const char *name) | |
5232 | { | |
5233 | *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1)); | |
5234 | (*buf)[*nr] = name; | |
5235 | *nr += 1; | |
5236 | } | |
5237 | ||
5238 | const char ** | |
5239 | gdbarch_printable_names (void) | |
5240 | { | |
5241 | if (GDB_MULTI_ARCH) | |
5242 | { | |
5243 | /* Accumulate a list of names based on the registed list of | |
5244 | architectures. */ | |
5245 | enum bfd_architecture a; | |
5246 | int nr_arches = 0; | |
5247 | const char **arches = NULL; | |
4b9b3959 | 5248 | struct gdbarch_registration *rego; |
be5a57e1 | 5249 | for (rego = gdbarch_registry; |
b4a20239 AC |
5250 | rego != NULL; |
5251 | rego = rego->next) | |
5252 | { | |
5253 | const struct bfd_arch_info *ap; | |
5254 | ap = bfd_lookup_arch (rego->bfd_architecture, 0); | |
5255 | if (ap == NULL) | |
8e65ff28 AC |
5256 | internal_error (__FILE__, __LINE__, |
5257 | "gdbarch_architecture_names: multi-arch unknown"); | |
b4a20239 AC |
5258 | do |
5259 | { | |
5260 | append_name (&arches, &nr_arches, ap->printable_name); | |
5261 | ap = ap->next; | |
5262 | } | |
5263 | while (ap != NULL); | |
5264 | } | |
5265 | append_name (&arches, &nr_arches, NULL); | |
5266 | return arches; | |
5267 | } | |
5268 | else | |
5269 | /* Just return all the architectures that BFD knows. Assume that | |
5270 | the legacy architecture framework supports them. */ | |
5271 | return bfd_arch_list (); | |
5272 | } | |
5273 | ||
5274 | ||
0f71a2f6 | 5275 | void |
4b9b3959 AC |
5276 | gdbarch_register (enum bfd_architecture bfd_architecture, |
5277 | gdbarch_init_ftype *init, | |
5278 | gdbarch_dump_tdep_ftype *dump_tdep) | |
0f71a2f6 | 5279 | { |
4b9b3959 | 5280 | struct gdbarch_registration **curr; |
0f71a2f6 | 5281 | const struct bfd_arch_info *bfd_arch_info; |
ec3d358c | 5282 | /* Check that BFD recognizes this architecture */ |
0f71a2f6 JM |
5283 | bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0); |
5284 | if (bfd_arch_info == NULL) | |
5285 | { | |
8e65ff28 AC |
5286 | internal_error (__FILE__, __LINE__, |
5287 | "gdbarch: Attempt to register unknown architecture (%d)", | |
5288 | bfd_architecture); | |
0f71a2f6 JM |
5289 | } |
5290 | /* Check that we haven't seen this architecture before */ | |
be5a57e1 | 5291 | for (curr = &gdbarch_registry; |
0f71a2f6 JM |
5292 | (*curr) != NULL; |
5293 | curr = &(*curr)->next) | |
5294 | { | |
5295 | if (bfd_architecture == (*curr)->bfd_architecture) | |
8e65ff28 AC |
5296 | internal_error (__FILE__, __LINE__, |
5297 | "gdbarch: Duplicate registraration of architecture (%s)", | |
5298 | bfd_arch_info->printable_name); | |
0f71a2f6 JM |
5299 | } |
5300 | /* log it */ | |
5301 | if (gdbarch_debug) | |
5302 | fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n", | |
5303 | bfd_arch_info->printable_name, | |
5304 | (long) init); | |
5305 | /* Append it */ | |
4b9b3959 | 5306 | (*curr) = XMALLOC (struct gdbarch_registration); |
0f71a2f6 JM |
5307 | (*curr)->bfd_architecture = bfd_architecture; |
5308 | (*curr)->init = init; | |
4b9b3959 | 5309 | (*curr)->dump_tdep = dump_tdep; |
0f71a2f6 JM |
5310 | (*curr)->arches = NULL; |
5311 | (*curr)->next = NULL; | |
8e1a459b C |
5312 | /* When non- multi-arch, install whatever target dump routine we've |
5313 | been provided - hopefully that routine has been written correctly | |
4b9b3959 AC |
5314 | and works regardless of multi-arch. */ |
5315 | if (!GDB_MULTI_ARCH && dump_tdep != NULL | |
5316 | && startup_gdbarch.dump_tdep == NULL) | |
5317 | startup_gdbarch.dump_tdep = dump_tdep; | |
5318 | } | |
5319 | ||
5320 | void | |
5321 | register_gdbarch_init (enum bfd_architecture bfd_architecture, | |
5322 | gdbarch_init_ftype *init) | |
5323 | { | |
5324 | gdbarch_register (bfd_architecture, init, NULL); | |
0f71a2f6 | 5325 | } |
0f71a2f6 JM |
5326 | |
5327 | ||
5328 | /* Look for an architecture using gdbarch_info. Base search on only | |
5329 | BFD_ARCH_INFO and BYTE_ORDER. */ | |
5330 | ||
5331 | struct gdbarch_list * | |
104c1213 JM |
5332 | gdbarch_list_lookup_by_info (struct gdbarch_list *arches, |
5333 | const struct gdbarch_info *info) | |
0f71a2f6 JM |
5334 | { |
5335 | for (; arches != NULL; arches = arches->next) | |
5336 | { | |
5337 | if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info) | |
5338 | continue; | |
5339 | if (info->byte_order != arches->gdbarch->byte_order) | |
5340 | continue; | |
5341 | return arches; | |
5342 | } | |
5343 | return NULL; | |
5344 | } | |
5345 | ||
5346 | ||
5347 | /* Update the current architecture. Return ZERO if the update request | |
5348 | failed. */ | |
5349 | ||
5350 | int | |
16f33e29 | 5351 | gdbarch_update_p (struct gdbarch_info info) |
0f71a2f6 JM |
5352 | { |
5353 | struct gdbarch *new_gdbarch; | |
40af4b0c | 5354 | struct gdbarch *old_gdbarch; |
4b9b3959 | 5355 | struct gdbarch_registration *rego; |
0f71a2f6 | 5356 | |
b732d07d AC |
5357 | /* Fill in missing parts of the INFO struct using a number of |
5358 | sources: ``set ...''; INFOabfd supplied; existing target. */ | |
5359 | ||
5360 | /* ``(gdb) set architecture ...'' */ | |
5361 | if (info.bfd_arch_info == NULL | |
5362 | && !TARGET_ARCHITECTURE_AUTO) | |
5363 | info.bfd_arch_info = TARGET_ARCHITECTURE; | |
5364 | if (info.bfd_arch_info == NULL | |
5365 | && info.abfd != NULL | |
5366 | && bfd_get_arch (info.abfd) != bfd_arch_unknown | |
5367 | && bfd_get_arch (info.abfd) != bfd_arch_obscure) | |
5368 | info.bfd_arch_info = bfd_get_arch_info (info.abfd); | |
0f71a2f6 | 5369 | if (info.bfd_arch_info == NULL) |
b732d07d AC |
5370 | info.bfd_arch_info = TARGET_ARCHITECTURE; |
5371 | ||
5372 | /* ``(gdb) set byte-order ...'' */ | |
428721aa | 5373 | if (info.byte_order == BFD_ENDIAN_UNKNOWN |
b732d07d AC |
5374 | && !TARGET_BYTE_ORDER_AUTO) |
5375 | info.byte_order = TARGET_BYTE_ORDER; | |
5376 | /* From the INFO struct. */ | |
428721aa | 5377 | if (info.byte_order == BFD_ENDIAN_UNKNOWN |
b732d07d | 5378 | && info.abfd != NULL) |
d7449b42 | 5379 | info.byte_order = (bfd_big_endian (info.abfd) ? BFD_ENDIAN_BIG |
778eb05e | 5380 | : bfd_little_endian (info.abfd) ? BFD_ENDIAN_LITTLE |
428721aa | 5381 | : BFD_ENDIAN_UNKNOWN); |
b732d07d | 5382 | /* From the current target. */ |
428721aa | 5383 | if (info.byte_order == BFD_ENDIAN_UNKNOWN) |
b732d07d | 5384 | info.byte_order = TARGET_BYTE_ORDER; |
0f71a2f6 | 5385 | |
b732d07d AC |
5386 | /* Must have found some sort of architecture. */ |
5387 | gdb_assert (info.bfd_arch_info != NULL); | |
0f71a2f6 JM |
5388 | |
5389 | if (gdbarch_debug) | |
5390 | { | |
0f71a2f6 JM |
5391 | fprintf_unfiltered (gdb_stdlog, |
5392 | "gdbarch_update: info.bfd_arch_info %s\n", | |
5393 | (info.bfd_arch_info != NULL | |
5394 | ? info.bfd_arch_info->printable_name | |
5395 | : "(null)")); | |
5396 | fprintf_unfiltered (gdb_stdlog, | |
5397 | "gdbarch_update: info.byte_order %d (%s)\n", | |
5398 | info.byte_order, | |
d7449b42 | 5399 | (info.byte_order == BFD_ENDIAN_BIG ? "big" |
778eb05e | 5400 | : info.byte_order == BFD_ENDIAN_LITTLE ? "little" |
0f71a2f6 JM |
5401 | : "default")); |
5402 | fprintf_unfiltered (gdb_stdlog, | |
5403 | "gdbarch_update: info.abfd 0x%lx\n", | |
5404 | (long) info.abfd); | |
5405 | fprintf_unfiltered (gdb_stdlog, | |
5406 | "gdbarch_update: info.tdep_info 0x%lx\n", | |
5407 | (long) info.tdep_info); | |
5408 | } | |
5409 | ||
b732d07d AC |
5410 | /* Find the target that knows about this architecture. */ |
5411 | for (rego = gdbarch_registry; | |
5412 | rego != NULL; | |
5413 | rego = rego->next) | |
5414 | if (rego->bfd_architecture == info.bfd_arch_info->arch) | |
5415 | break; | |
5416 | if (rego == NULL) | |
5417 | { | |
5418 | if (gdbarch_debug) | |
5419 | fprintf_unfiltered (gdb_stdlog, "gdbarch_update: No matching architecture\n"); | |
5420 | return 0; | |
5421 | } | |
5422 | ||
40af4b0c AC |
5423 | /* Swap the data belonging to the old target out setting the |
5424 | installed data to zero. This stops the ->init() function trying | |
5425 | to refer to the previous architecture's global data structures. */ | |
5426 | swapout_gdbarch_swap (current_gdbarch); | |
5427 | clear_gdbarch_swap (current_gdbarch); | |
5428 | ||
5429 | /* Save the previously selected architecture, setting the global to | |
5430 | NULL. This stops ->init() trying to use the previous | |
5431 | architecture's configuration. The previous architecture may not | |
5432 | even be of the same architecture family. The most recent | |
5433 | architecture of the same family is found at the head of the | |
5434 | rego->arches list. */ | |
5435 | old_gdbarch = current_gdbarch; | |
5436 | current_gdbarch = NULL; | |
5437 | ||
0f71a2f6 JM |
5438 | /* Ask the target for a replacement architecture. */ |
5439 | new_gdbarch = rego->init (info, rego->arches); | |
5440 | ||
40af4b0c AC |
5441 | /* Did the target like it? No. Reject the change and revert to the |
5442 | old architecture. */ | |
0f71a2f6 JM |
5443 | if (new_gdbarch == NULL) |
5444 | { | |
5445 | if (gdbarch_debug) | |
5446 | fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Target rejected architecture\n"); | |
40af4b0c AC |
5447 | swapin_gdbarch_swap (old_gdbarch); |
5448 | current_gdbarch = old_gdbarch; | |
0f71a2f6 JM |
5449 | return 0; |
5450 | } | |
5451 | ||
40af4b0c AC |
5452 | /* Did the architecture change? No. Oops, put the old architecture |
5453 | back. */ | |
5454 | if (old_gdbarch == new_gdbarch) | |
0f71a2f6 JM |
5455 | { |
5456 | if (gdbarch_debug) | |
5457 | fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n", | |
5458 | (long) new_gdbarch, | |
5459 | new_gdbarch->bfd_arch_info->printable_name); | |
40af4b0c AC |
5460 | swapin_gdbarch_swap (old_gdbarch); |
5461 | current_gdbarch = old_gdbarch; | |
0f71a2f6 JM |
5462 | return 1; |
5463 | } | |
5464 | ||
0f79675b AC |
5465 | /* Is this a pre-existing architecture? Yes. Move it to the front |
5466 | of the list of architectures (keeping the list sorted Most | |
5467 | Recently Used) and then copy it in. */ | |
5468 | { | |
5469 | struct gdbarch_list **list; | |
5470 | for (list = ®o->arches; | |
5471 | (*list) != NULL; | |
5472 | list = &(*list)->next) | |
5473 | { | |
5474 | if ((*list)->gdbarch == new_gdbarch) | |
5475 | { | |
5476 | struct gdbarch_list *this; | |
5477 | if (gdbarch_debug) | |
5478 | fprintf_unfiltered (gdb_stdlog, | |
5479 | "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n", | |
5480 | (long) new_gdbarch, | |
5481 | new_gdbarch->bfd_arch_info->printable_name); | |
5482 | /* Unlink this. */ | |
5483 | this = (*list); | |
5484 | (*list) = this->next; | |
5485 | /* Insert in the front. */ | |
5486 | this->next = rego->arches; | |
5487 | rego->arches = this; | |
5488 | /* Copy the new architecture in. */ | |
5489 | current_gdbarch = new_gdbarch; | |
5490 | swapin_gdbarch_swap (new_gdbarch); | |
5491 | architecture_changed_event (); | |
5492 | return 1; | |
5493 | } | |
5494 | } | |
5495 | } | |
5496 | ||
5497 | /* Prepend this new architecture to the architecture list (keep the | |
5498 | list sorted Most Recently Used). */ | |
5499 | { | |
5500 | struct gdbarch_list *this = XMALLOC (struct gdbarch_list); | |
5501 | this->next = rego->arches; | |
5502 | this->gdbarch = new_gdbarch; | |
5503 | rego->arches = this; | |
5504 | } | |
0f71a2f6 | 5505 | |
76860b5f | 5506 | /* Switch to this new architecture marking it initialized. */ |
0f71a2f6 | 5507 | current_gdbarch = new_gdbarch; |
76860b5f | 5508 | current_gdbarch->initialized_p = 1; |
0f71a2f6 JM |
5509 | if (gdbarch_debug) |
5510 | { | |
5511 | fprintf_unfiltered (gdb_stdlog, | |
adf40b2e | 5512 | "gdbarch_update: New architecture 0x%08lx (%s) selected\n", |
0f71a2f6 JM |
5513 | (long) new_gdbarch, |
5514 | new_gdbarch->bfd_arch_info->printable_name); | |
0f71a2f6 | 5515 | } |
adf40b2e | 5516 | |
4b9b3959 AC |
5517 | /* Check that the newly installed architecture is valid. Plug in |
5518 | any post init values. */ | |
5519 | new_gdbarch->dump_tdep = rego->dump_tdep; | |
0f71a2f6 JM |
5520 | verify_gdbarch (new_gdbarch); |
5521 | ||
cf17c188 AC |
5522 | /* Initialize the per-architecture memory (swap) areas. |
5523 | CURRENT_GDBARCH must be update before these modules are | |
5524 | called. */ | |
5525 | init_gdbarch_swap (new_gdbarch); | |
5526 | ||
76860b5f | 5527 | /* Initialize the per-architecture data. CURRENT_GDBARCH |
cf17c188 | 5528 | must be updated before these modules are called. */ |
67c2c32c KS |
5529 | architecture_changed_event (); |
5530 | ||
4b9b3959 AC |
5531 | if (gdbarch_debug) |
5532 | gdbarch_dump (current_gdbarch, gdb_stdlog); | |
5533 | ||
0f71a2f6 JM |
5534 | return 1; |
5535 | } | |
c906108c | 5536 | |
c906108c | 5537 | |
c906108c SS |
5538 | /* Disassembler */ |
5539 | ||
5540 | /* Pointer to the target-dependent disassembly function. */ | |
104c1213 | 5541 | int (*tm_print_insn) (bfd_vma, disassemble_info *); |
c906108c SS |
5542 | disassemble_info tm_print_insn_info; |
5543 | ||
5544 | ||
104c1213 | 5545 | extern void _initialize_gdbarch (void); |
b4a20239 | 5546 | |
c906108c | 5547 | void |
7c7651b2 | 5548 | _initialize_gdbarch (void) |
c906108c | 5549 | { |
5d161b24 DB |
5550 | struct cmd_list_element *c; |
5551 | ||
adf40b2e | 5552 | INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info, gdb_stdout, (fprintf_ftype)fprintf_filtered); |
c906108c SS |
5553 | tm_print_insn_info.flavour = bfd_target_unknown_flavour; |
5554 | tm_print_insn_info.read_memory_func = dis_asm_read_memory; | |
5555 | tm_print_insn_info.memory_error_func = dis_asm_memory_error; | |
5556 | tm_print_insn_info.print_address_func = dis_asm_print_address; | |
5557 | ||
5d161b24 | 5558 | add_show_from_set (add_set_cmd ("arch", |
c906108c SS |
5559 | class_maintenance, |
5560 | var_zinteger, | |
adf40b2e | 5561 | (char *)&gdbarch_debug, |
c906108c | 5562 | "Set architecture debugging.\n\ |
5d161b24 DB |
5563 | When non-zero, architecture debugging is enabled.", &setdebuglist), |
5564 | &showdebuglist); | |
59233f88 AC |
5565 | c = add_set_cmd ("archdebug", |
5566 | class_maintenance, | |
5567 | var_zinteger, | |
5568 | (char *)&gdbarch_debug, | |
5569 | "Set architecture debugging.\n\ | |
5d161b24 DB |
5570 | When non-zero, architecture debugging is enabled.", &setlist); |
5571 | ||
59233f88 AC |
5572 | deprecate_cmd (c, "set debug arch"); |
5573 | deprecate_cmd (add_show_from_set (c, &showlist), "show debug arch"); | |
c906108c | 5574 | } |