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