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