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