Commit | Line | Data |
---|---|---|
c4bfde41 JK |
1 | /* *INDENT-OFF* */ /* THIS FILE IS GENERATED -*- buffer-read-only: t -*- */ |
2 | /* vi:set ro: */ | |
59233f88 | 3 | |
adf40b2e | 4 | /* Dynamic architecture support for GDB, the GNU debugger. |
79d45cd4 | 5 | |
28e7fd62 | 6 | Copyright (C) 1998-2013 Free Software Foundation, Inc. |
c906108c | 7 | |
96baa820 JM |
8 | This file is part of GDB. |
9 | ||
10 | This program is free software; you can redistribute it and/or modify | |
11 | it under the terms of the GNU General Public License as published by | |
a9762ec7 | 12 | the Free Software Foundation; either version 3 of the License, or |
96baa820 | 13 | (at your option) any later version. |
de584861 | 14 | |
96baa820 JM |
15 | This program is distributed in the hope that it will be useful, |
16 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 | GNU General Public License for more details. | |
de584861 | 19 | |
96baa820 | 20 | You should have received a copy of the GNU General Public License |
a9762ec7 | 21 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
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 | 32 | to this file, modifying gdbarch.sh and using its output may prove |
0963b4bd | 33 | easier. */ |
c906108c | 34 | |
c906108c SS |
35 | |
36 | #include "defs.h" | |
1ad03bde | 37 | #include "arch-utils.h" |
c906108c | 38 | |
0f71a2f6 | 39 | #include "gdbcmd.h" |
faaf634c | 40 | #include "inferior.h" |
7a292a7a | 41 | #include "symcat.h" |
c906108c | 42 | |
f0d4cc9e | 43 | #include "floatformat.h" |
c906108c | 44 | |
95160752 | 45 | #include "gdb_assert.h" |
b66d6d2e | 46 | #include "gdb_string.h" |
b59ff9d5 | 47 | #include "reggroups.h" |
4be87837 | 48 | #include "osabi.h" |
aebd7893 | 49 | #include "gdb_obstack.h" |
383f836e | 50 | #include "observer.h" |
a3ecef73 | 51 | #include "regcache.h" |
19630284 | 52 | #include "objfiles.h" |
95160752 | 53 | |
104c1213 JM |
54 | /* Static function declarations */ |
55 | ||
b3cc3077 | 56 | static void alloc_gdbarch_data (struct gdbarch *); |
104c1213 | 57 | |
0f71a2f6 JM |
58 | /* Non-zero if we want to trace architecture code. */ |
59 | ||
60 | #ifndef GDBARCH_DEBUG | |
61 | #define GDBARCH_DEBUG 0 | |
62 | #endif | |
ccce17b0 | 63 | unsigned int gdbarch_debug = GDBARCH_DEBUG; |
920d2a44 AC |
64 | static void |
65 | show_gdbarch_debug (struct ui_file *file, int from_tty, | |
66 | struct cmd_list_element *c, const char *value) | |
67 | { | |
68 | fprintf_filtered (file, _("Architecture debugging is %s.\n"), value); | |
69 | } | |
0f71a2f6 | 70 | |
456fcf94 | 71 | static const char * |
8da61cc4 | 72 | pformat (const struct floatformat **format) |
456fcf94 AC |
73 | { |
74 | if (format == NULL) | |
75 | return "(null)"; | |
76 | else | |
8da61cc4 DJ |
77 | /* Just print out one of them - this is only for diagnostics. */ |
78 | return format[0]->name; | |
456fcf94 AC |
79 | } |
80 | ||
08105857 PA |
81 | static const char * |
82 | pstring (const char *string) | |
83 | { | |
84 | if (string == NULL) | |
85 | return "(null)"; | |
86 | return string; | |
87 | } | |
88 | ||
0f71a2f6 | 89 | |
0963b4bd | 90 | /* Maintain the struct gdbarch object. */ |
0f71a2f6 JM |
91 | |
92 | struct gdbarch | |
adf40b2e | 93 | { |
76860b5f AC |
94 | /* Has this architecture been fully initialized? */ |
95 | int initialized_p; | |
aebd7893 AC |
96 | |
97 | /* An obstack bound to the lifetime of the architecture. */ | |
98 | struct obstack *obstack; | |
99 | ||
0963b4bd | 100 | /* basic architectural information. */ |
adf40b2e JM |
101 | const struct bfd_arch_info * bfd_arch_info; |
102 | int byte_order; | |
9d4fde75 | 103 | int byte_order_for_code; |
4be87837 | 104 | enum gdb_osabi osabi; |
424163ea | 105 | const struct target_desc * target_desc; |
0f71a2f6 | 106 | |
0963b4bd | 107 | /* target specific vector. */ |
adf40b2e | 108 | struct gdbarch_tdep *tdep; |
4b9b3959 | 109 | gdbarch_dump_tdep_ftype *dump_tdep; |
0f71a2f6 | 110 | |
0963b4bd | 111 | /* per-architecture data-pointers. */ |
95160752 | 112 | unsigned nr_data; |
adf40b2e | 113 | void **data; |
0f71a2f6 | 114 | |
adf40b2e | 115 | /* Multi-arch values. |
0f71a2f6 | 116 | |
adf40b2e | 117 | When extending this structure you must: |
0f71a2f6 | 118 | |
adf40b2e | 119 | Add the field below. |
0f71a2f6 | 120 | |
adf40b2e JM |
121 | Declare set/get functions and define the corresponding |
122 | macro in gdbarch.h. | |
0f71a2f6 | 123 | |
adf40b2e JM |
124 | gdbarch_alloc(): If zero/NULL is not a suitable default, |
125 | initialize the new field. | |
0f71a2f6 | 126 | |
adf40b2e JM |
127 | verify_gdbarch(): Confirm that the target updated the field |
128 | correctly. | |
0f71a2f6 | 129 | |
7e73cedf | 130 | gdbarch_dump(): Add a fprintf_unfiltered call so that the new |
adf40b2e | 131 | field is dumped out |
0f71a2f6 | 132 | |
c0e8c252 | 133 | ``startup_gdbarch()'': Append an initial value to the static |
adf40b2e | 134 | variable (base values on the host's c-type system). |
0f71a2f6 | 135 | |
adf40b2e JM |
136 | get_gdbarch(): Implement the set/get functions (probably using |
137 | the macro's as shortcuts). | |
0f71a2f6 JM |
138 | |
139 | */ | |
140 | ||
32c9a795 | 141 | int bits_big_endian; |
adf40b2e JM |
142 | int short_bit; |
143 | int int_bit; | |
144 | int long_bit; | |
145 | int long_long_bit; | |
205c306f | 146 | int long_long_align_bit; |
f9e9243a UW |
147 | int half_bit; |
148 | const struct floatformat ** half_format; | |
adf40b2e | 149 | int float_bit; |
8da61cc4 | 150 | const struct floatformat ** float_format; |
adf40b2e | 151 | int double_bit; |
8da61cc4 | 152 | const struct floatformat ** double_format; |
adf40b2e | 153 | int long_double_bit; |
8da61cc4 | 154 | const struct floatformat ** long_double_format; |
66b43ecb | 155 | int ptr_bit; |
52204a0b | 156 | int addr_bit; |
8da614df | 157 | int dwarf2_addr_size; |
4e409299 | 158 | int char_signed; |
adf40b2e JM |
159 | gdbarch_read_pc_ftype *read_pc; |
160 | gdbarch_write_pc_ftype *write_pc; | |
39d4ef09 | 161 | gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer; |
d8124050 | 162 | gdbarch_pseudo_register_read_ftype *pseudo_register_read; |
3543a589 | 163 | gdbarch_pseudo_register_read_value_ftype *pseudo_register_read_value; |
d8124050 | 164 | gdbarch_pseudo_register_write_ftype *pseudo_register_write; |
adf40b2e | 165 | int num_regs; |
0aba1244 | 166 | int num_pseudo_regs; |
175ff332 HZ |
167 | gdbarch_ax_pseudo_register_collect_ftype *ax_pseudo_register_collect; |
168 | gdbarch_ax_pseudo_register_push_stack_ftype *ax_pseudo_register_push_stack; | |
adf40b2e | 169 | int sp_regnum; |
adf40b2e | 170 | int pc_regnum; |
c2169756 | 171 | int ps_regnum; |
60054393 | 172 | int fp0_regnum; |
88c72b7d AC |
173 | gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum; |
174 | gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum; | |
88c72b7d AC |
175 | gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum; |
176 | gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum; | |
adf40b2e | 177 | gdbarch_register_name_ftype *register_name; |
9c04cab7 | 178 | gdbarch_register_type_ftype *register_type; |
669fac23 | 179 | gdbarch_dummy_id_ftype *dummy_id; |
f3be58bc | 180 | int deprecated_fp_regnum; |
b8de8283 | 181 | gdbarch_push_dummy_call_ftype *push_dummy_call; |
adf40b2e | 182 | int call_dummy_location; |
7043d8dc | 183 | gdbarch_push_dummy_code_ftype *push_dummy_code; |
b8de8283 AC |
184 | gdbarch_print_registers_info_ftype *print_registers_info; |
185 | gdbarch_print_float_info_ftype *print_float_info; | |
186 | gdbarch_print_vector_info_ftype *print_vector_info; | |
187 | gdbarch_register_sim_regno_ftype *register_sim_regno; | |
b8de8283 AC |
188 | gdbarch_cannot_fetch_register_ftype *cannot_fetch_register; |
189 | gdbarch_cannot_store_register_ftype *cannot_store_register; | |
190 | gdbarch_get_longjmp_target_ftype *get_longjmp_target; | |
adf40b2e | 191 | int believe_pcc_promotion; |
13d01224 AC |
192 | gdbarch_convert_register_p_ftype *convert_register_p; |
193 | gdbarch_register_to_value_ftype *register_to_value; | |
194 | gdbarch_value_to_register_ftype *value_to_register; | |
9acbedc0 | 195 | gdbarch_value_from_register_ftype *value_from_register; |
4478b372 JB |
196 | gdbarch_pointer_to_address_ftype *pointer_to_address; |
197 | gdbarch_address_to_pointer_ftype *address_to_pointer; | |
fc0c74b1 | 198 | gdbarch_integer_to_address_ftype *integer_to_address; |
92ad9cd9 | 199 | gdbarch_return_value_ftype *return_value; |
18648a37 | 200 | gdbarch_return_in_first_hidden_param_p_ftype *return_in_first_hidden_param_p; |
adf40b2e | 201 | gdbarch_skip_prologue_ftype *skip_prologue; |
4309257c | 202 | gdbarch_skip_main_prologue_ftype *skip_main_prologue; |
adf40b2e JM |
203 | gdbarch_inner_than_ftype *inner_than; |
204 | gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc; | |
a1dcb23a | 205 | gdbarch_remote_breakpoint_from_pc_ftype *remote_breakpoint_from_pc; |
a1131521 | 206 | gdbarch_adjust_breakpoint_address_ftype *adjust_breakpoint_address; |
917317f4 JM |
207 | gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint; |
208 | gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint; | |
adf40b2e | 209 | CORE_ADDR decr_pc_after_break; |
782263ab | 210 | CORE_ADDR deprecated_function_start_offset; |
123dc839 | 211 | gdbarch_remote_register_number_ftype *remote_register_number; |
b2756930 | 212 | gdbarch_fetch_tls_load_module_address_ftype *fetch_tls_load_module_address; |
adf40b2e | 213 | CORE_ADDR frame_args_skip; |
12cc2063 | 214 | gdbarch_unwind_pc_ftype *unwind_pc; |
a9e5fdc2 | 215 | gdbarch_unwind_sp_ftype *unwind_sp; |
adf40b2e | 216 | gdbarch_frame_num_args_ftype *frame_num_args; |
dc604539 | 217 | gdbarch_frame_align_ftype *frame_align; |
192cb3d4 | 218 | gdbarch_stabs_argument_has_addr_ftype *stabs_argument_has_addr; |
8b148df9 | 219 | int frame_red_zone_size; |
f517ea4e | 220 | gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr; |
875e1767 | 221 | gdbarch_addr_bits_remove_ftype *addr_bits_remove; |
64c4637f | 222 | gdbarch_software_single_step_ftype *software_single_step; |
3352ef37 | 223 | gdbarch_single_step_through_delay_ftype *single_step_through_delay; |
2bf0cb65 | 224 | gdbarch_print_insn_ftype *print_insn; |
bdcd319a | 225 | gdbarch_skip_trampoline_code_ftype *skip_trampoline_code; |
dea0c52f | 226 | gdbarch_skip_solib_resolver_ftype *skip_solib_resolver; |
d50355b6 | 227 | gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline; |
c12260ac | 228 | gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p; |
a2cf933a EZ |
229 | gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special; |
230 | gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special; | |
c4ed33b9 | 231 | int cannot_step_breakpoint; |
f74fa174 | 232 | int have_nonsteppable_watchpoint; |
8b2dbe47 KB |
233 | gdbarch_address_class_type_flags_ftype *address_class_type_flags; |
234 | gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name; | |
235 | gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags; | |
b59ff9d5 | 236 | gdbarch_register_reggroup_p_ftype *register_reggroup_p; |
143985b7 | 237 | gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument; |
6ce6d90f | 238 | gdbarch_regset_from_core_section_ftype *regset_from_core_section; |
17ea7499 | 239 | struct core_regset_section * core_regset_sections; |
6432734d | 240 | gdbarch_make_corefile_notes_ftype *make_corefile_notes; |
b3ac9c77 | 241 | gdbarch_elfcore_write_linux_prpsinfo_ftype *elfcore_write_linux_prpsinfo; |
35c2fab7 | 242 | gdbarch_find_memory_regions_ftype *find_memory_regions; |
de584861 | 243 | gdbarch_core_xfer_shared_libraries_ftype *core_xfer_shared_libraries; |
356a5233 | 244 | gdbarch_core_xfer_shared_libraries_aix_ftype *core_xfer_shared_libraries_aix; |
28439f5e | 245 | gdbarch_core_pid_to_str_ftype *core_pid_to_str; |
a78c2d62 | 246 | const char * gcore_bfd_target; |
0d5de010 DJ |
247 | int vtable_function_descriptors; |
248 | int vbit_in_delta; | |
6d350bb5 | 249 | gdbarch_skip_permanent_breakpoint_ftype *skip_permanent_breakpoint; |
237fc4c9 PA |
250 | ULONGEST max_insn_length; |
251 | gdbarch_displaced_step_copy_insn_ftype *displaced_step_copy_insn; | |
99e40580 | 252 | gdbarch_displaced_step_hw_singlestep_ftype *displaced_step_hw_singlestep; |
237fc4c9 PA |
253 | gdbarch_displaced_step_fixup_ftype *displaced_step_fixup; |
254 | gdbarch_displaced_step_free_closure_ftype *displaced_step_free_closure; | |
255 | gdbarch_displaced_step_location_ftype *displaced_step_location; | |
dde08ee1 | 256 | gdbarch_relocate_instruction_ftype *relocate_instruction; |
1c772458 | 257 | gdbarch_overlay_update_ftype *overlay_update; |
4eb0ad19 | 258 | gdbarch_core_read_description_ftype *core_read_description; |
149ad273 | 259 | gdbarch_static_transform_name_ftype *static_transform_name; |
203c3895 | 260 | int sofun_address_maybe_missing; |
0508c3ec | 261 | gdbarch_process_record_ftype *process_record; |
3846b520 | 262 | gdbarch_process_record_signal_ftype *process_record_signal; |
22203bbf | 263 | gdbarch_gdb_signal_from_target_ftype *gdb_signal_from_target; |
4aa995e1 | 264 | gdbarch_get_siginfo_type_ftype *get_siginfo_type; |
60c5725c | 265 | gdbarch_record_special_symbol_ftype *record_special_symbol; |
a96d9b2e | 266 | gdbarch_get_syscall_number_ftype *get_syscall_number; |
55aa24fb SDJ |
267 | const char * stap_integer_prefix; |
268 | const char * stap_integer_suffix; | |
269 | const char * stap_register_prefix; | |
270 | const char * stap_register_suffix; | |
271 | const char * stap_register_indirection_prefix; | |
272 | const char * stap_register_indirection_suffix; | |
273 | const char * stap_gdb_register_prefix; | |
274 | const char * stap_gdb_register_suffix; | |
275 | gdbarch_stap_is_single_operand_ftype *stap_is_single_operand; | |
276 | gdbarch_stap_parse_special_token_ftype *stap_parse_special_token; | |
50c71eaf | 277 | int has_global_solist; |
2567c7d9 | 278 | int has_global_breakpoints; |
6c95b8df | 279 | gdbarch_has_shared_address_space_ftype *has_shared_address_space; |
7a697b8d | 280 | gdbarch_fast_tracepoint_valid_at_ftype *fast_tracepoint_valid_at; |
f870a310 TT |
281 | gdbarch_auto_charset_ftype *auto_charset; |
282 | gdbarch_auto_wide_charset_ftype *auto_wide_charset; | |
08105857 | 283 | const char * solib_symbols_extension; |
ab38a727 | 284 | int has_dos_based_file_system; |
6710bf39 | 285 | gdbarch_gen_return_address_ftype *gen_return_address; |
3030c96e | 286 | gdbarch_info_proc_ftype *info_proc; |
451b7c33 | 287 | gdbarch_core_info_proc_ftype *core_info_proc; |
19630284 | 288 | gdbarch_iterate_over_objfiles_in_search_order_ftype *iterate_over_objfiles_in_search_order; |
7e35103a | 289 | struct ravenscar_arch_ops * ravenscar_ops; |
adf40b2e | 290 | }; |
0f71a2f6 JM |
291 | |
292 | ||
293 | /* The default architecture uses host values (for want of a better | |
0963b4bd | 294 | choice). */ |
0f71a2f6 JM |
295 | |
296 | extern const struct bfd_arch_info bfd_default_arch_struct; | |
297 | ||
4b9b3959 AC |
298 | struct gdbarch startup_gdbarch = |
299 | { | |
76860b5f | 300 | 1, /* Always initialized. */ |
aebd7893 | 301 | NULL, /* The obstack. */ |
0963b4bd | 302 | /* basic architecture information. */ |
ec5cbaec AC |
303 | &bfd_default_arch_struct, /* bfd_arch_info */ |
304 | BFD_ENDIAN_BIG, /* byte_order */ | |
9d4fde75 | 305 | BFD_ENDIAN_BIG, /* byte_order_for_code */ |
ec5cbaec | 306 | GDB_OSABI_UNKNOWN, /* osabi */ |
424163ea | 307 | 0, /* target_desc */ |
0963b4bd | 308 | /* target specific vector and its dump routine. */ |
4b9b3959 | 309 | NULL, NULL, |
c66fb220 TT |
310 | /*per-architecture data-pointers. */ |
311 | 0, NULL, | |
0f71a2f6 | 312 | /* Multi-arch values */ |
32c9a795 | 313 | 1, /* bits_big_endian */ |
ec5cbaec AC |
314 | 8 * sizeof (short), /* short_bit */ |
315 | 8 * sizeof (int), /* int_bit */ | |
316 | 8 * sizeof (long), /* long_bit */ | |
317 | 8 * sizeof (LONGEST), /* long_long_bit */ | |
205c306f | 318 | 8 * sizeof (LONGEST), /* long_long_align_bit */ |
f9e9243a UW |
319 | 16, /* half_bit */ |
320 | 0, /* half_format */ | |
ec5cbaec | 321 | 8 * sizeof (float), /* float_bit */ |
456fcf94 | 322 | 0, /* float_format */ |
ec5cbaec | 323 | 8 * sizeof (double), /* double_bit */ |
456fcf94 | 324 | 0, /* double_format */ |
ec5cbaec | 325 | 8 * sizeof (long double), /* long_double_bit */ |
456fcf94 | 326 | 0, /* long_double_format */ |
ec5cbaec AC |
327 | 8 * sizeof (void*), /* ptr_bit */ |
328 | 8 * sizeof (void*), /* addr_bit */ | |
8da614df | 329 | sizeof (void*), /* dwarf2_addr_size */ |
ec5cbaec AC |
330 | 1, /* char_signed */ |
331 | 0, /* read_pc */ | |
332 | 0, /* write_pc */ | |
a54fba4c | 333 | legacy_virtual_frame_pointer, /* virtual_frame_pointer */ |
ec5cbaec | 334 | 0, /* pseudo_register_read */ |
3543a589 | 335 | 0, /* pseudo_register_read_value */ |
ec5cbaec AC |
336 | 0, /* pseudo_register_write */ |
337 | 0, /* num_regs */ | |
338 | 0, /* num_pseudo_regs */ | |
175ff332 HZ |
339 | 0, /* ax_pseudo_register_collect */ |
340 | 0, /* ax_pseudo_register_push_stack */ | |
ec5cbaec | 341 | -1, /* sp_regnum */ |
ec5cbaec AC |
342 | -1, /* pc_regnum */ |
343 | -1, /* ps_regnum */ | |
344 | 0, /* fp0_regnum */ | |
d3f73121 MD |
345 | no_op_reg_to_regnum, /* stab_reg_to_regnum */ |
346 | no_op_reg_to_regnum, /* ecoff_reg_to_regnum */ | |
d3f73121 MD |
347 | no_op_reg_to_regnum, /* sdb_reg_to_regnum */ |
348 | no_op_reg_to_regnum, /* dwarf2_reg_to_regnum */ | |
ec5cbaec | 349 | 0, /* register_name */ |
9c04cab7 | 350 | 0, /* register_type */ |
669fac23 | 351 | 0, /* dummy_id */ |
f3be58bc | 352 | -1, /* deprecated_fp_regnum */ |
b8de8283 | 353 | 0, /* push_dummy_call */ |
ec5cbaec | 354 | 0, /* call_dummy_location */ |
ec5cbaec | 355 | 0, /* push_dummy_code */ |
b8de8283 AC |
356 | default_print_registers_info, /* print_registers_info */ |
357 | 0, /* print_float_info */ | |
358 | 0, /* print_vector_info */ | |
e7faf938 | 359 | legacy_register_sim_regno, /* register_sim_regno */ |
64a3914f MD |
360 | cannot_register_not, /* cannot_fetch_register */ |
361 | cannot_register_not, /* cannot_store_register */ | |
b8de8283 | 362 | 0, /* get_longjmp_target */ |
ec5cbaec | 363 | 0, /* believe_pcc_promotion */ |
0abe36f5 | 364 | generic_convert_register_p, /* convert_register_p */ |
ec5cbaec AC |
365 | 0, /* register_to_value */ |
366 | 0, /* value_to_register */ | |
9acbedc0 | 367 | 0, /* value_from_register */ |
9898f801 UW |
368 | unsigned_pointer_to_address, /* pointer_to_address */ |
369 | unsigned_address_to_pointer, /* address_to_pointer */ | |
ec5cbaec | 370 | 0, /* integer_to_address */ |
92ad9cd9 | 371 | 0, /* return_value */ |
18648a37 | 372 | default_return_in_first_hidden_param_p, /* return_in_first_hidden_param_p */ |
ec5cbaec | 373 | 0, /* skip_prologue */ |
4309257c | 374 | 0, /* skip_main_prologue */ |
ec5cbaec AC |
375 | 0, /* inner_than */ |
376 | 0, /* breakpoint_from_pc */ | |
a1dcb23a | 377 | default_remote_breakpoint_from_pc, /* remote_breakpoint_from_pc */ |
a1131521 | 378 | 0, /* adjust_breakpoint_address */ |
ae4b2284 MD |
379 | default_memory_insert_breakpoint, /* memory_insert_breakpoint */ |
380 | default_memory_remove_breakpoint, /* memory_remove_breakpoint */ | |
ec5cbaec | 381 | 0, /* decr_pc_after_break */ |
782263ab | 382 | 0, /* deprecated_function_start_offset */ |
123dc839 | 383 | default_remote_register_number, /* remote_register_number */ |
b2756930 | 384 | 0, /* fetch_tls_load_module_address */ |
ec5cbaec | 385 | 0, /* frame_args_skip */ |
ec5cbaec | 386 | 0, /* unwind_pc */ |
a9e5fdc2 | 387 | 0, /* unwind_sp */ |
ec5cbaec | 388 | 0, /* frame_num_args */ |
ec5cbaec | 389 | 0, /* frame_align */ |
192cb3d4 | 390 | default_stabs_argument_has_addr, /* stabs_argument_has_addr */ |
8b148df9 | 391 | 0, /* frame_red_zone_size */ |
e2d0e7eb | 392 | convert_from_func_ptr_addr_identity, /* convert_from_func_ptr_addr */ |
24568a2c | 393 | core_addr_identity, /* addr_bits_remove */ |
ec5cbaec | 394 | 0, /* software_single_step */ |
3352ef37 | 395 | 0, /* single_step_through_delay */ |
ec5cbaec AC |
396 | 0, /* print_insn */ |
397 | 0, /* skip_trampoline_code */ | |
4c8c40e6 | 398 | generic_skip_solib_resolver, /* skip_solib_resolver */ |
e17a4113 | 399 | generic_in_solib_return_trampoline, /* in_solib_return_trampoline */ |
ec5cbaec | 400 | generic_in_function_epilogue_p, /* in_function_epilogue_p */ |
ec5cbaec AC |
401 | 0, /* elf_make_msymbol_special */ |
402 | 0, /* coff_make_msymbol_special */ | |
ec5cbaec AC |
403 | 0, /* cannot_step_breakpoint */ |
404 | 0, /* have_nonsteppable_watchpoint */ | |
405 | 0, /* address_class_type_flags */ | |
406 | 0, /* address_class_type_flags_to_name */ | |
407 | 0, /* address_class_name_to_type_flags */ | |
408 | default_register_reggroup_p, /* register_reggroup_p */ | |
409 | 0, /* fetch_pointer_argument */ | |
6ce6d90f | 410 | 0, /* regset_from_core_section */ |
17ea7499 | 411 | 0, /* core_regset_sections */ |
6432734d | 412 | 0, /* make_corefile_notes */ |
b3ac9c77 | 413 | 0, /* elfcore_write_linux_prpsinfo */ |
35c2fab7 | 414 | 0, /* find_memory_regions */ |
de584861 | 415 | 0, /* core_xfer_shared_libraries */ |
356a5233 | 416 | 0, /* core_xfer_shared_libraries_aix */ |
28439f5e | 417 | 0, /* core_pid_to_str */ |
a78c2d62 | 418 | 0, /* gcore_bfd_target */ |
0d5de010 DJ |
419 | 0, /* vtable_function_descriptors */ |
420 | 0, /* vbit_in_delta */ | |
6d350bb5 | 421 | 0, /* skip_permanent_breakpoint */ |
237fc4c9 PA |
422 | 0, /* max_insn_length */ |
423 | 0, /* displaced_step_copy_insn */ | |
99e40580 | 424 | default_displaced_step_hw_singlestep, /* displaced_step_hw_singlestep */ |
237fc4c9 PA |
425 | 0, /* displaced_step_fixup */ |
426 | NULL, /* displaced_step_free_closure */ | |
427 | NULL, /* displaced_step_location */ | |
dde08ee1 | 428 | 0, /* relocate_instruction */ |
1c772458 | 429 | 0, /* overlay_update */ |
4eb0ad19 | 430 | 0, /* core_read_description */ |
149ad273 | 431 | 0, /* static_transform_name */ |
203c3895 | 432 | 0, /* sofun_address_maybe_missing */ |
0508c3ec | 433 | 0, /* process_record */ |
3846b520 | 434 | 0, /* process_record_signal */ |
1f8cf220 | 435 | 0, /* gdb_signal_from_target */ |
4aa995e1 | 436 | 0, /* get_siginfo_type */ |
60c5725c | 437 | 0, /* record_special_symbol */ |
a96d9b2e | 438 | 0, /* get_syscall_number */ |
55aa24fb SDJ |
439 | 0, /* stap_integer_prefix */ |
440 | 0, /* stap_integer_suffix */ | |
441 | 0, /* stap_register_prefix */ | |
442 | 0, /* stap_register_suffix */ | |
443 | 0, /* stap_register_indirection_prefix */ | |
444 | 0, /* stap_register_indirection_suffix */ | |
445 | 0, /* stap_gdb_register_prefix */ | |
446 | 0, /* stap_gdb_register_suffix */ | |
447 | 0, /* stap_is_single_operand */ | |
448 | 0, /* stap_parse_special_token */ | |
50c71eaf | 449 | 0, /* has_global_solist */ |
2567c7d9 | 450 | 0, /* has_global_breakpoints */ |
6c95b8df | 451 | default_has_shared_address_space, /* has_shared_address_space */ |
7a697b8d | 452 | default_fast_tracepoint_valid_at, /* fast_tracepoint_valid_at */ |
f870a310 TT |
453 | default_auto_charset, /* auto_charset */ |
454 | default_auto_wide_charset, /* auto_wide_charset */ | |
08105857 | 455 | 0, /* solib_symbols_extension */ |
ab38a727 | 456 | 0, /* has_dos_based_file_system */ |
6710bf39 | 457 | default_gen_return_address, /* gen_return_address */ |
3030c96e | 458 | 0, /* info_proc */ |
451b7c33 | 459 | 0, /* core_info_proc */ |
19630284 | 460 | default_iterate_over_objfiles_in_search_order, /* iterate_over_objfiles_in_search_order */ |
7e35103a | 461 | NULL, /* ravenscar_ops */ |
c0e8c252 | 462 | /* startup_gdbarch() */ |
0f71a2f6 | 463 | }; |
4b9b3959 | 464 | |
0f71a2f6 | 465 | |
66b43ecb | 466 | /* Create a new ``struct gdbarch'' based on information provided by |
0963b4bd | 467 | ``struct gdbarch_info''. */ |
0f71a2f6 JM |
468 | |
469 | struct gdbarch * | |
104c1213 JM |
470 | gdbarch_alloc (const struct gdbarch_info *info, |
471 | struct gdbarch_tdep *tdep) | |
0f71a2f6 | 472 | { |
be7811ad | 473 | struct gdbarch *gdbarch; |
aebd7893 AC |
474 | |
475 | /* Create an obstack for allocating all the per-architecture memory, | |
476 | then use that to allocate the architecture vector. */ | |
477 | struct obstack *obstack = XMALLOC (struct obstack); | |
478 | obstack_init (obstack); | |
be7811ad MD |
479 | gdbarch = obstack_alloc (obstack, sizeof (*gdbarch)); |
480 | memset (gdbarch, 0, sizeof (*gdbarch)); | |
481 | gdbarch->obstack = obstack; | |
0f71a2f6 | 482 | |
be7811ad | 483 | alloc_gdbarch_data (gdbarch); |
b3cc3077 | 484 | |
be7811ad | 485 | gdbarch->tdep = tdep; |
0f71a2f6 | 486 | |
be7811ad MD |
487 | gdbarch->bfd_arch_info = info->bfd_arch_info; |
488 | gdbarch->byte_order = info->byte_order; | |
9d4fde75 | 489 | gdbarch->byte_order_for_code = info->byte_order_for_code; |
be7811ad MD |
490 | gdbarch->osabi = info->osabi; |
491 | gdbarch->target_desc = info->target_desc; | |
0f71a2f6 | 492 | |
0963b4bd | 493 | /* Force the explicit initialization of these. */ |
32c9a795 | 494 | gdbarch->bits_big_endian = (gdbarch->byte_order == BFD_ENDIAN_BIG); |
be7811ad MD |
495 | gdbarch->short_bit = 2*TARGET_CHAR_BIT; |
496 | gdbarch->int_bit = 4*TARGET_CHAR_BIT; | |
497 | gdbarch->long_bit = 4*TARGET_CHAR_BIT; | |
498 | gdbarch->long_long_bit = 2*gdbarch->long_bit; | |
205c306f | 499 | gdbarch->long_long_align_bit = 2*gdbarch->long_bit; |
f9e9243a | 500 | gdbarch->half_bit = 2*TARGET_CHAR_BIT; |
be7811ad MD |
501 | gdbarch->float_bit = 4*TARGET_CHAR_BIT; |
502 | gdbarch->double_bit = 8*TARGET_CHAR_BIT; | |
503 | gdbarch->long_double_bit = 8*TARGET_CHAR_BIT; | |
504 | gdbarch->ptr_bit = gdbarch->int_bit; | |
505 | gdbarch->char_signed = -1; | |
506 | gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer; | |
507 | gdbarch->num_regs = -1; | |
508 | gdbarch->sp_regnum = -1; | |
509 | gdbarch->pc_regnum = -1; | |
510 | gdbarch->ps_regnum = -1; | |
511 | gdbarch->fp0_regnum = -1; | |
512 | gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum; | |
513 | gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum; | |
be7811ad MD |
514 | gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum; |
515 | gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum; | |
516 | gdbarch->deprecated_fp_regnum = -1; | |
517 | gdbarch->call_dummy_location = AT_ENTRY_POINT; | |
518 | gdbarch->print_registers_info = default_print_registers_info; | |
519 | gdbarch->register_sim_regno = legacy_register_sim_regno; | |
520 | gdbarch->cannot_fetch_register = cannot_register_not; | |
521 | gdbarch->cannot_store_register = cannot_register_not; | |
522 | gdbarch->convert_register_p = generic_convert_register_p; | |
523 | gdbarch->value_from_register = default_value_from_register; | |
524 | gdbarch->pointer_to_address = unsigned_pointer_to_address; | |
525 | gdbarch->address_to_pointer = unsigned_address_to_pointer; | |
18648a37 | 526 | gdbarch->return_in_first_hidden_param_p = default_return_in_first_hidden_param_p; |
a1dcb23a | 527 | gdbarch->remote_breakpoint_from_pc = default_remote_breakpoint_from_pc; |
be7811ad MD |
528 | gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint; |
529 | gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint; | |
530 | gdbarch->remote_register_number = default_remote_register_number; | |
531 | gdbarch->stabs_argument_has_addr = default_stabs_argument_has_addr; | |
532 | gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr_identity; | |
533 | gdbarch->addr_bits_remove = core_addr_identity; | |
be7811ad MD |
534 | gdbarch->skip_trampoline_code = generic_skip_trampoline_code; |
535 | gdbarch->skip_solib_resolver = generic_skip_solib_resolver; | |
536 | gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline; | |
537 | gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p; | |
be7811ad MD |
538 | gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special; |
539 | gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special; | |
be7811ad | 540 | gdbarch->register_reggroup_p = default_register_reggroup_p; |
99e40580 | 541 | gdbarch->displaced_step_hw_singlestep = default_displaced_step_hw_singlestep; |
237fc4c9 PA |
542 | gdbarch->displaced_step_fixup = NULL; |
543 | gdbarch->displaced_step_free_closure = NULL; | |
544 | gdbarch->displaced_step_location = NULL; | |
dde08ee1 | 545 | gdbarch->relocate_instruction = NULL; |
6c95b8df | 546 | gdbarch->has_shared_address_space = default_has_shared_address_space; |
7a697b8d | 547 | gdbarch->fast_tracepoint_valid_at = default_fast_tracepoint_valid_at; |
f870a310 TT |
548 | gdbarch->auto_charset = default_auto_charset; |
549 | gdbarch->auto_wide_charset = default_auto_wide_charset; | |
6710bf39 | 550 | gdbarch->gen_return_address = default_gen_return_address; |
19630284 | 551 | gdbarch->iterate_over_objfiles_in_search_order = default_iterate_over_objfiles_in_search_order; |
7e35103a | 552 | gdbarch->ravenscar_ops = NULL; |
0f71a2f6 JM |
553 | /* gdbarch_alloc() */ |
554 | ||
be7811ad | 555 | return gdbarch; |
0f71a2f6 JM |
556 | } |
557 | ||
558 | ||
aebd7893 AC |
559 | /* Allocate extra space using the per-architecture obstack. */ |
560 | ||
561 | void * | |
562 | gdbarch_obstack_zalloc (struct gdbarch *arch, long size) | |
563 | { | |
564 | void *data = obstack_alloc (arch->obstack, size); | |
05c547f6 | 565 | |
aebd7893 AC |
566 | memset (data, 0, size); |
567 | return data; | |
568 | } | |
569 | ||
570 | ||
058f20d5 JB |
571 | /* Free a gdbarch struct. This should never happen in normal |
572 | operation --- once you've created a gdbarch, you keep it around. | |
573 | However, if an architecture's init function encounters an error | |
574 | building the structure, it may need to clean up a partially | |
575 | constructed gdbarch. */ | |
4b9b3959 | 576 | |
058f20d5 JB |
577 | void |
578 | gdbarch_free (struct gdbarch *arch) | |
579 | { | |
aebd7893 | 580 | struct obstack *obstack; |
05c547f6 | 581 | |
95160752 | 582 | gdb_assert (arch != NULL); |
aebd7893 AC |
583 | gdb_assert (!arch->initialized_p); |
584 | obstack = arch->obstack; | |
585 | obstack_free (obstack, 0); /* Includes the ARCH. */ | |
586 | xfree (obstack); | |
058f20d5 JB |
587 | } |
588 | ||
589 | ||
db446970 AC |
590 | /* Ensure that all values in a GDBARCH are reasonable. */ |
591 | ||
0f71a2f6 | 592 | static void |
be7811ad | 593 | verify_gdbarch (struct gdbarch *gdbarch) |
0f71a2f6 | 594 | { |
f16a1923 AC |
595 | struct ui_file *log; |
596 | struct cleanup *cleanups; | |
759ef836 | 597 | long length; |
f16a1923 | 598 | char *buf; |
05c547f6 | 599 | |
f16a1923 AC |
600 | log = mem_fileopen (); |
601 | cleanups = make_cleanup_ui_file_delete (log); | |
0f71a2f6 | 602 | /* fundamental */ |
be7811ad | 603 | if (gdbarch->byte_order == BFD_ENDIAN_UNKNOWN) |
f16a1923 | 604 | fprintf_unfiltered (log, "\n\tbyte-order"); |
be7811ad | 605 | if (gdbarch->bfd_arch_info == NULL) |
f16a1923 | 606 | fprintf_unfiltered (log, "\n\tbfd_arch_info"); |
0963b4bd | 607 | /* Check those that need to be defined for the given multi-arch level. */ |
32c9a795 | 608 | /* Skip verify of bits_big_endian, invalid_p == 0 */ |
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 */ | |
205c306f | 613 | /* Skip verify of long_long_align_bit, invalid_p == 0 */ |
f9e9243a UW |
614 | /* Skip verify of half_bit, invalid_p == 0 */ |
615 | if (gdbarch->half_format == 0) | |
616 | gdbarch->half_format = floatformats_ieee_half; | |
66b43ecb | 617 | /* Skip verify of float_bit, invalid_p == 0 */ |
be7811ad MD |
618 | if (gdbarch->float_format == 0) |
619 | gdbarch->float_format = floatformats_ieee_single; | |
66b43ecb | 620 | /* Skip verify of double_bit, invalid_p == 0 */ |
be7811ad MD |
621 | if (gdbarch->double_format == 0) |
622 | gdbarch->double_format = floatformats_ieee_double; | |
66b43ecb | 623 | /* Skip verify of long_double_bit, invalid_p == 0 */ |
be7811ad MD |
624 | if (gdbarch->long_double_format == 0) |
625 | gdbarch->long_double_format = floatformats_ieee_double; | |
66b43ecb | 626 | /* Skip verify of ptr_bit, invalid_p == 0 */ |
be7811ad MD |
627 | if (gdbarch->addr_bit == 0) |
628 | gdbarch->addr_bit = gdbarch_ptr_bit (gdbarch); | |
8da614df CV |
629 | if (gdbarch->dwarf2_addr_size == 0) |
630 | gdbarch->dwarf2_addr_size = gdbarch_ptr_bit (gdbarch) / TARGET_CHAR_BIT; | |
be7811ad MD |
631 | if (gdbarch->char_signed == -1) |
632 | gdbarch->char_signed = 1; | |
0963b4bd MS |
633 | /* Skip verify of read_pc, has predicate. */ |
634 | /* Skip verify of write_pc, has predicate. */ | |
39d4ef09 | 635 | /* Skip verify of virtual_frame_pointer, invalid_p == 0 */ |
0963b4bd | 636 | /* Skip verify of pseudo_register_read, has predicate. */ |
3543a589 | 637 | /* Skip verify of pseudo_register_read_value, has predicate. */ |
0963b4bd | 638 | /* Skip verify of pseudo_register_write, has predicate. */ |
be7811ad | 639 | if (gdbarch->num_regs == -1) |
f16a1923 | 640 | fprintf_unfiltered (log, "\n\tnum_regs"); |
0aba1244 | 641 | /* Skip verify of num_pseudo_regs, invalid_p == 0 */ |
0963b4bd MS |
642 | /* Skip verify of ax_pseudo_register_collect, has predicate. */ |
643 | /* Skip verify of ax_pseudo_register_push_stack, has predicate. */ | |
1200cd6e | 644 | /* Skip verify of sp_regnum, invalid_p == 0 */ |
1200cd6e | 645 | /* Skip verify of pc_regnum, invalid_p == 0 */ |
c2169756 | 646 | /* Skip verify of ps_regnum, invalid_p == 0 */ |
60054393 | 647 | /* Skip verify of fp0_regnum, invalid_p == 0 */ |
88c72b7d AC |
648 | /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */ |
649 | /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */ | |
88c72b7d AC |
650 | /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */ |
651 | /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */ | |
be7811ad | 652 | if (gdbarch->register_name == 0) |
d93859e2 | 653 | fprintf_unfiltered (log, "\n\tregister_name"); |
0963b4bd MS |
654 | /* Skip verify of register_type, has predicate. */ |
655 | /* Skip verify of dummy_id, has predicate. */ | |
f3be58bc | 656 | /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */ |
0963b4bd | 657 | /* Skip verify of push_dummy_call, has predicate. */ |
b8de8283 | 658 | /* Skip verify of call_dummy_location, invalid_p == 0 */ |
0963b4bd | 659 | /* Skip verify of push_dummy_code, has predicate. */ |
0ab7a791 | 660 | /* Skip verify of print_registers_info, invalid_p == 0 */ |
0963b4bd MS |
661 | /* Skip verify of print_float_info, has predicate. */ |
662 | /* Skip verify of print_vector_info, has predicate. */ | |
7c7651b2 | 663 | /* Skip verify of register_sim_regno, invalid_p == 0 */ |
01fb7433 AC |
664 | /* Skip verify of cannot_fetch_register, invalid_p == 0 */ |
665 | /* Skip verify of cannot_store_register, invalid_p == 0 */ | |
0963b4bd | 666 | /* Skip verify of get_longjmp_target, has predicate. */ |
13d01224 | 667 | /* Skip verify of convert_register_p, invalid_p == 0 */ |
9acbedc0 | 668 | /* Skip verify of value_from_register, invalid_p == 0 */ |
4478b372 JB |
669 | /* Skip verify of pointer_to_address, invalid_p == 0 */ |
670 | /* Skip verify of address_to_pointer, invalid_p == 0 */ | |
0963b4bd MS |
671 | /* Skip verify of integer_to_address, has predicate. */ |
672 | /* Skip verify of return_value, has predicate. */ | |
18648a37 | 673 | /* Skip verify of return_in_first_hidden_param_p, invalid_p == 0 */ |
be7811ad | 674 | if (gdbarch->skip_prologue == 0) |
f16a1923 | 675 | fprintf_unfiltered (log, "\n\tskip_prologue"); |
0963b4bd | 676 | /* Skip verify of skip_main_prologue, has predicate. */ |
be7811ad | 677 | if (gdbarch->inner_than == 0) |
f16a1923 | 678 | fprintf_unfiltered (log, "\n\tinner_than"); |
be7811ad | 679 | if (gdbarch->breakpoint_from_pc == 0) |
aaab4dba | 680 | fprintf_unfiltered (log, "\n\tbreakpoint_from_pc"); |
0e05dfcb | 681 | /* Skip verify of remote_breakpoint_from_pc, invalid_p == 0 */ |
0963b4bd | 682 | /* Skip verify of adjust_breakpoint_address, has predicate. */ |
c0e8c252 AC |
683 | /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */ |
684 | /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */ | |
71bd6bd4 | 685 | /* Skip verify of decr_pc_after_break, invalid_p == 0 */ |
782263ab | 686 | /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */ |
123dc839 | 687 | /* Skip verify of remote_register_number, invalid_p == 0 */ |
0963b4bd | 688 | /* Skip verify of fetch_tls_load_module_address, has predicate. */ |
5867a2fb | 689 | /* Skip verify of frame_args_skip, invalid_p == 0 */ |
0963b4bd MS |
690 | /* Skip verify of unwind_pc, has predicate. */ |
691 | /* Skip verify of unwind_sp, has predicate. */ | |
692 | /* Skip verify of frame_num_args, has predicate. */ | |
693 | /* Skip verify of frame_align, has predicate. */ | |
192cb3d4 | 694 | /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */ |
f517ea4e | 695 | /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */ |
875e1767 | 696 | /* Skip verify of addr_bits_remove, invalid_p == 0 */ |
0963b4bd MS |
697 | /* Skip verify of software_single_step, has predicate. */ |
698 | /* Skip verify of single_step_through_delay, has predicate. */ | |
be7811ad | 699 | if (gdbarch->print_insn == 0) |
f6c40618 | 700 | fprintf_unfiltered (log, "\n\tprint_insn"); |
bdcd319a | 701 | /* Skip verify of skip_trampoline_code, invalid_p == 0 */ |
dea0c52f | 702 | /* Skip verify of skip_solib_resolver, invalid_p == 0 */ |
d50355b6 | 703 | /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */ |
c12260ac | 704 | /* Skip verify of in_function_epilogue_p, invalid_p == 0 */ |
a2cf933a EZ |
705 | /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */ |
706 | /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */ | |
c4ed33b9 | 707 | /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */ |
f74fa174 | 708 | /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */ |
0963b4bd MS |
709 | /* Skip verify of address_class_type_flags, has predicate. */ |
710 | /* Skip verify of address_class_type_flags_to_name, has predicate. */ | |
711 | /* Skip verify of address_class_name_to_type_flags, has predicate. */ | |
7e20f3fb | 712 | /* Skip verify of register_reggroup_p, invalid_p == 0 */ |
0963b4bd MS |
713 | /* Skip verify of fetch_pointer_argument, has predicate. */ |
714 | /* Skip verify of regset_from_core_section, has predicate. */ | |
6432734d | 715 | /* Skip verify of make_corefile_notes, has predicate. */ |
b3ac9c77 | 716 | /* Skip verify of elfcore_write_linux_prpsinfo, has predicate. */ |
35c2fab7 | 717 | /* Skip verify of find_memory_regions, has predicate. */ |
0963b4bd | 718 | /* Skip verify of core_xfer_shared_libraries, has predicate. */ |
356a5233 | 719 | /* Skip verify of core_xfer_shared_libraries_aix, has predicate. */ |
0963b4bd MS |
720 | /* Skip verify of core_pid_to_str, has predicate. */ |
721 | /* Skip verify of gcore_bfd_target, has predicate. */ | |
0d5de010 DJ |
722 | /* Skip verify of vtable_function_descriptors, invalid_p == 0 */ |
723 | /* Skip verify of vbit_in_delta, invalid_p == 0 */ | |
0963b4bd MS |
724 | /* Skip verify of skip_permanent_breakpoint, has predicate. */ |
725 | /* Skip verify of max_insn_length, has predicate. */ | |
726 | /* Skip verify of displaced_step_copy_insn, has predicate. */ | |
99e40580 | 727 | /* Skip verify of displaced_step_hw_singlestep, invalid_p == 0 */ |
0963b4bd | 728 | /* Skip verify of displaced_step_fixup, has predicate. */ |
237fc4c9 PA |
729 | if ((! gdbarch->displaced_step_free_closure) != (! gdbarch->displaced_step_copy_insn)) |
730 | fprintf_unfiltered (log, "\n\tdisplaced_step_free_closure"); | |
731 | if ((! gdbarch->displaced_step_location) != (! gdbarch->displaced_step_copy_insn)) | |
732 | fprintf_unfiltered (log, "\n\tdisplaced_step_location"); | |
0963b4bd MS |
733 | /* Skip verify of relocate_instruction, has predicate. */ |
734 | /* Skip verify of overlay_update, has predicate. */ | |
735 | /* Skip verify of core_read_description, has predicate. */ | |
736 | /* Skip verify of static_transform_name, has predicate. */ | |
203c3895 | 737 | /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */ |
0963b4bd MS |
738 | /* Skip verify of process_record, has predicate. */ |
739 | /* Skip verify of process_record_signal, has predicate. */ | |
1f8cf220 | 740 | /* Skip verify of gdb_signal_from_target, has predicate. */ |
0963b4bd MS |
741 | /* Skip verify of get_siginfo_type, has predicate. */ |
742 | /* Skip verify of record_special_symbol, has predicate. */ | |
743 | /* Skip verify of get_syscall_number, has predicate. */ | |
55aa24fb SDJ |
744 | /* Skip verify of stap_integer_prefix, invalid_p == 0 */ |
745 | /* Skip verify of stap_integer_suffix, invalid_p == 0 */ | |
746 | /* Skip verify of stap_register_prefix, invalid_p == 0 */ | |
747 | /* Skip verify of stap_register_suffix, invalid_p == 0 */ | |
748 | /* Skip verify of stap_register_indirection_prefix, invalid_p == 0 */ | |
749 | /* Skip verify of stap_register_indirection_suffix, invalid_p == 0 */ | |
750 | /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */ | |
751 | /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */ | |
752 | /* Skip verify of stap_is_single_operand, has predicate. */ | |
753 | /* Skip verify of stap_parse_special_token, has predicate. */ | |
50c71eaf | 754 | /* Skip verify of has_global_solist, invalid_p == 0 */ |
2567c7d9 | 755 | /* Skip verify of has_global_breakpoints, invalid_p == 0 */ |
6c95b8df | 756 | /* Skip verify of has_shared_address_space, invalid_p == 0 */ |
7a697b8d | 757 | /* Skip verify of fast_tracepoint_valid_at, invalid_p == 0 */ |
f870a310 TT |
758 | /* Skip verify of auto_charset, invalid_p == 0 */ |
759 | /* Skip verify of auto_wide_charset, invalid_p == 0 */ | |
ab38a727 | 760 | /* Skip verify of has_dos_based_file_system, invalid_p == 0 */ |
6710bf39 | 761 | /* Skip verify of gen_return_address, invalid_p == 0 */ |
3030c96e | 762 | /* Skip verify of info_proc, has predicate. */ |
451b7c33 | 763 | /* Skip verify of core_info_proc, has predicate. */ |
19630284 | 764 | /* Skip verify of iterate_over_objfiles_in_search_order, invalid_p == 0 */ |
7e35103a | 765 | /* Skip verify of ravenscar_ops, invalid_p == 0 */ |
759ef836 | 766 | buf = ui_file_xstrdup (log, &length); |
f16a1923 | 767 | make_cleanup (xfree, buf); |
759ef836 | 768 | if (length > 0) |
f16a1923 | 769 | internal_error (__FILE__, __LINE__, |
e2e0b3e5 | 770 | _("verify_gdbarch: the following are invalid ...%s"), |
f16a1923 AC |
771 | buf); |
772 | do_cleanups (cleanups); | |
0f71a2f6 JM |
773 | } |
774 | ||
775 | ||
0963b4bd | 776 | /* Print out the details of the current architecture. */ |
0f71a2f6 JM |
777 | |
778 | void | |
be7811ad | 779 | gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) |
0f71a2f6 | 780 | { |
b78960be | 781 | const char *gdb_nm_file = "<not-defined>"; |
05c547f6 | 782 | |
b78960be AC |
783 | #if defined (GDB_NM_FILE) |
784 | gdb_nm_file = GDB_NM_FILE; | |
785 | #endif | |
786 | fprintf_unfiltered (file, | |
787 | "gdbarch_dump: GDB_NM_FILE = %s\n", | |
788 | gdb_nm_file); | |
48f7351b AC |
789 | fprintf_unfiltered (file, |
790 | "gdbarch_dump: addr_bit = %s\n", | |
623d3eb1 | 791 | plongest (gdbarch->addr_bit)); |
48f7351b | 792 | fprintf_unfiltered (file, |
30737ed9 JB |
793 | "gdbarch_dump: addr_bits_remove = <%s>\n", |
794 | host_address_to_string (gdbarch->addr_bits_remove)); | |
7996bcec AC |
795 | fprintf_unfiltered (file, |
796 | "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n", | |
be7811ad | 797 | gdbarch_address_class_name_to_type_flags_p (gdbarch)); |
7996bcec | 798 | fprintf_unfiltered (file, |
30737ed9 JB |
799 | "gdbarch_dump: address_class_name_to_type_flags = <%s>\n", |
800 | host_address_to_string (gdbarch->address_class_name_to_type_flags)); | |
48f7351b AC |
801 | fprintf_unfiltered (file, |
802 | "gdbarch_dump: gdbarch_address_class_type_flags_p() = %d\n", | |
be7811ad | 803 | gdbarch_address_class_type_flags_p (gdbarch)); |
48f7351b | 804 | fprintf_unfiltered (file, |
30737ed9 JB |
805 | "gdbarch_dump: address_class_type_flags = <%s>\n", |
806 | host_address_to_string (gdbarch->address_class_type_flags)); | |
7996bcec AC |
807 | fprintf_unfiltered (file, |
808 | "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n", | |
be7811ad | 809 | gdbarch_address_class_type_flags_to_name_p (gdbarch)); |
7996bcec | 810 | fprintf_unfiltered (file, |
30737ed9 JB |
811 | "gdbarch_dump: address_class_type_flags_to_name = <%s>\n", |
812 | host_address_to_string (gdbarch->address_class_type_flags_to_name)); | |
48f7351b | 813 | fprintf_unfiltered (file, |
30737ed9 JB |
814 | "gdbarch_dump: address_to_pointer = <%s>\n", |
815 | host_address_to_string (gdbarch->address_to_pointer)); | |
a1131521 KB |
816 | fprintf_unfiltered (file, |
817 | "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n", | |
be7811ad | 818 | gdbarch_adjust_breakpoint_address_p (gdbarch)); |
a1131521 | 819 | fprintf_unfiltered (file, |
30737ed9 JB |
820 | "gdbarch_dump: adjust_breakpoint_address = <%s>\n", |
821 | host_address_to_string (gdbarch->adjust_breakpoint_address)); | |
f870a310 TT |
822 | fprintf_unfiltered (file, |
823 | "gdbarch_dump: auto_charset = <%s>\n", | |
824 | host_address_to_string (gdbarch->auto_charset)); | |
825 | fprintf_unfiltered (file, | |
826 | "gdbarch_dump: auto_wide_charset = <%s>\n", | |
827 | host_address_to_string (gdbarch->auto_wide_charset)); | |
175ff332 HZ |
828 | fprintf_unfiltered (file, |
829 | "gdbarch_dump: gdbarch_ax_pseudo_register_collect_p() = %d\n", | |
830 | gdbarch_ax_pseudo_register_collect_p (gdbarch)); | |
831 | fprintf_unfiltered (file, | |
832 | "gdbarch_dump: ax_pseudo_register_collect = <%s>\n", | |
833 | host_address_to_string (gdbarch->ax_pseudo_register_collect)); | |
834 | fprintf_unfiltered (file, | |
835 | "gdbarch_dump: gdbarch_ax_pseudo_register_push_stack_p() = %d\n", | |
836 | gdbarch_ax_pseudo_register_push_stack_p (gdbarch)); | |
837 | fprintf_unfiltered (file, | |
838 | "gdbarch_dump: ax_pseudo_register_push_stack = <%s>\n", | |
839 | host_address_to_string (gdbarch->ax_pseudo_register_push_stack)); | |
48f7351b AC |
840 | fprintf_unfiltered (file, |
841 | "gdbarch_dump: believe_pcc_promotion = %s\n", | |
623d3eb1 | 842 | plongest (gdbarch->believe_pcc_promotion)); |
283354d8 | 843 | fprintf_unfiltered (file, |
48f7351b | 844 | "gdbarch_dump: bfd_arch_info = %s\n", |
be7811ad | 845 | gdbarch_bfd_arch_info (gdbarch)->printable_name); |
32c9a795 MD |
846 | fprintf_unfiltered (file, |
847 | "gdbarch_dump: bits_big_endian = %s\n", | |
623d3eb1 | 848 | plongest (gdbarch->bits_big_endian)); |
48f7351b | 849 | fprintf_unfiltered (file, |
30737ed9 JB |
850 | "gdbarch_dump: breakpoint_from_pc = <%s>\n", |
851 | host_address_to_string (gdbarch->breakpoint_from_pc)); | |
48f7351b AC |
852 | fprintf_unfiltered (file, |
853 | "gdbarch_dump: byte_order = %s\n", | |
623d3eb1 | 854 | plongest (gdbarch->byte_order)); |
9d4fde75 SS |
855 | fprintf_unfiltered (file, |
856 | "gdbarch_dump: byte_order_for_code = %s\n", | |
623d3eb1 | 857 | plongest (gdbarch->byte_order_for_code)); |
48f7351b AC |
858 | fprintf_unfiltered (file, |
859 | "gdbarch_dump: call_dummy_location = %s\n", | |
623d3eb1 | 860 | plongest (gdbarch->call_dummy_location)); |
48f7351b | 861 | fprintf_unfiltered (file, |
30737ed9 JB |
862 | "gdbarch_dump: cannot_fetch_register = <%s>\n", |
863 | host_address_to_string (gdbarch->cannot_fetch_register)); | |
48f7351b AC |
864 | fprintf_unfiltered (file, |
865 | "gdbarch_dump: cannot_step_breakpoint = %s\n", | |
623d3eb1 | 866 | plongest (gdbarch->cannot_step_breakpoint)); |
48f7351b | 867 | fprintf_unfiltered (file, |
30737ed9 JB |
868 | "gdbarch_dump: cannot_store_register = <%s>\n", |
869 | host_address_to_string (gdbarch->cannot_store_register)); | |
48f7351b AC |
870 | fprintf_unfiltered (file, |
871 | "gdbarch_dump: char_signed = %s\n", | |
623d3eb1 | 872 | plongest (gdbarch->char_signed)); |
7996bcec | 873 | fprintf_unfiltered (file, |
30737ed9 JB |
874 | "gdbarch_dump: coff_make_msymbol_special = <%s>\n", |
875 | host_address_to_string (gdbarch->coff_make_msymbol_special)); | |
a2428dbe | 876 | fprintf_unfiltered (file, |
30737ed9 JB |
877 | "gdbarch_dump: convert_from_func_ptr_addr = <%s>\n", |
878 | host_address_to_string (gdbarch->convert_from_func_ptr_addr)); | |
48f7351b | 879 | fprintf_unfiltered (file, |
30737ed9 JB |
880 | "gdbarch_dump: convert_register_p = <%s>\n", |
881 | host_address_to_string (gdbarch->convert_register_p)); | |
451b7c33 TT |
882 | fprintf_unfiltered (file, |
883 | "gdbarch_dump: gdbarch_core_info_proc_p() = %d\n", | |
884 | gdbarch_core_info_proc_p (gdbarch)); | |
885 | fprintf_unfiltered (file, | |
886 | "gdbarch_dump: core_info_proc = <%s>\n", | |
887 | host_address_to_string (gdbarch->core_info_proc)); | |
28439f5e PA |
888 | fprintf_unfiltered (file, |
889 | "gdbarch_dump: gdbarch_core_pid_to_str_p() = %d\n", | |
890 | gdbarch_core_pid_to_str_p (gdbarch)); | |
891 | fprintf_unfiltered (file, | |
892 | "gdbarch_dump: core_pid_to_str = <%s>\n", | |
893 | host_address_to_string (gdbarch->core_pid_to_str)); | |
4eb0ad19 DJ |
894 | fprintf_unfiltered (file, |
895 | "gdbarch_dump: gdbarch_core_read_description_p() = %d\n", | |
be7811ad | 896 | gdbarch_core_read_description_p (gdbarch)); |
4eb0ad19 | 897 | fprintf_unfiltered (file, |
30737ed9 JB |
898 | "gdbarch_dump: core_read_description = <%s>\n", |
899 | host_address_to_string (gdbarch->core_read_description)); | |
17ea7499 CES |
900 | fprintf_unfiltered (file, |
901 | "gdbarch_dump: core_regset_sections = %s\n", | |
902 | host_address_to_string (gdbarch->core_regset_sections)); | |
de584861 PA |
903 | fprintf_unfiltered (file, |
904 | "gdbarch_dump: gdbarch_core_xfer_shared_libraries_p() = %d\n", | |
be7811ad | 905 | gdbarch_core_xfer_shared_libraries_p (gdbarch)); |
de584861 | 906 | fprintf_unfiltered (file, |
30737ed9 JB |
907 | "gdbarch_dump: core_xfer_shared_libraries = <%s>\n", |
908 | host_address_to_string (gdbarch->core_xfer_shared_libraries)); | |
356a5233 JB |
909 | fprintf_unfiltered (file, |
910 | "gdbarch_dump: gdbarch_core_xfer_shared_libraries_aix_p() = %d\n", | |
911 | gdbarch_core_xfer_shared_libraries_aix_p (gdbarch)); | |
912 | fprintf_unfiltered (file, | |
913 | "gdbarch_dump: core_xfer_shared_libraries_aix = <%s>\n", | |
914 | host_address_to_string (gdbarch->core_xfer_shared_libraries_aix)); | |
48f7351b | 915 | fprintf_unfiltered (file, |
0b1553bc UW |
916 | "gdbarch_dump: decr_pc_after_break = %s\n", |
917 | core_addr_to_string_nz (gdbarch->decr_pc_after_break)); | |
48f7351b AC |
918 | fprintf_unfiltered (file, |
919 | "gdbarch_dump: deprecated_fp_regnum = %s\n", | |
623d3eb1 | 920 | plongest (gdbarch->deprecated_fp_regnum)); |
48f7351b | 921 | fprintf_unfiltered (file, |
0b1553bc UW |
922 | "gdbarch_dump: deprecated_function_start_offset = %s\n", |
923 | core_addr_to_string_nz (gdbarch->deprecated_function_start_offset)); | |
237fc4c9 PA |
924 | fprintf_unfiltered (file, |
925 | "gdbarch_dump: gdbarch_displaced_step_copy_insn_p() = %d\n", | |
926 | gdbarch_displaced_step_copy_insn_p (gdbarch)); | |
927 | fprintf_unfiltered (file, | |
30737ed9 JB |
928 | "gdbarch_dump: displaced_step_copy_insn = <%s>\n", |
929 | host_address_to_string (gdbarch->displaced_step_copy_insn)); | |
237fc4c9 PA |
930 | fprintf_unfiltered (file, |
931 | "gdbarch_dump: gdbarch_displaced_step_fixup_p() = %d\n", | |
932 | gdbarch_displaced_step_fixup_p (gdbarch)); | |
933 | fprintf_unfiltered (file, | |
30737ed9 JB |
934 | "gdbarch_dump: displaced_step_fixup = <%s>\n", |
935 | host_address_to_string (gdbarch->displaced_step_fixup)); | |
237fc4c9 | 936 | fprintf_unfiltered (file, |
30737ed9 JB |
937 | "gdbarch_dump: displaced_step_free_closure = <%s>\n", |
938 | host_address_to_string (gdbarch->displaced_step_free_closure)); | |
99e40580 UW |
939 | fprintf_unfiltered (file, |
940 | "gdbarch_dump: displaced_step_hw_singlestep = <%s>\n", | |
941 | host_address_to_string (gdbarch->displaced_step_hw_singlestep)); | |
237fc4c9 | 942 | fprintf_unfiltered (file, |
30737ed9 JB |
943 | "gdbarch_dump: displaced_step_location = <%s>\n", |
944 | host_address_to_string (gdbarch->displaced_step_location)); | |
48f7351b AC |
945 | fprintf_unfiltered (file, |
946 | "gdbarch_dump: double_bit = %s\n", | |
623d3eb1 | 947 | plongest (gdbarch->double_bit)); |
a2428dbe | 948 | fprintf_unfiltered (file, |
48f7351b | 949 | "gdbarch_dump: double_format = %s\n", |
be7811ad | 950 | pformat (gdbarch->double_format)); |
669fac23 DJ |
951 | fprintf_unfiltered (file, |
952 | "gdbarch_dump: gdbarch_dummy_id_p() = %d\n", | |
953 | gdbarch_dummy_id_p (gdbarch)); | |
954 | fprintf_unfiltered (file, | |
30737ed9 JB |
955 | "gdbarch_dump: dummy_id = <%s>\n", |
956 | host_address_to_string (gdbarch->dummy_id)); | |
8da614df CV |
957 | fprintf_unfiltered (file, |
958 | "gdbarch_dump: dwarf2_addr_size = %s\n", | |
959 | plongest (gdbarch->dwarf2_addr_size)); | |
48f7351b | 960 | fprintf_unfiltered (file, |
30737ed9 JB |
961 | "gdbarch_dump: dwarf2_reg_to_regnum = <%s>\n", |
962 | host_address_to_string (gdbarch->dwarf2_reg_to_regnum)); | |
48f7351b | 963 | fprintf_unfiltered (file, |
30737ed9 JB |
964 | "gdbarch_dump: ecoff_reg_to_regnum = <%s>\n", |
965 | host_address_to_string (gdbarch->ecoff_reg_to_regnum)); | |
48f7351b | 966 | fprintf_unfiltered (file, |
30737ed9 JB |
967 | "gdbarch_dump: elf_make_msymbol_special = <%s>\n", |
968 | host_address_to_string (gdbarch->elf_make_msymbol_special)); | |
b3ac9c77 SDJ |
969 | fprintf_unfiltered (file, |
970 | "gdbarch_dump: gdbarch_elfcore_write_linux_prpsinfo_p() = %d\n", | |
971 | gdbarch_elfcore_write_linux_prpsinfo_p (gdbarch)); | |
972 | fprintf_unfiltered (file, | |
973 | "gdbarch_dump: elfcore_write_linux_prpsinfo = <%s>\n", | |
974 | host_address_to_string (gdbarch->elfcore_write_linux_prpsinfo)); | |
7a697b8d SS |
975 | fprintf_unfiltered (file, |
976 | "gdbarch_dump: fast_tracepoint_valid_at = <%s>\n", | |
977 | host_address_to_string (gdbarch->fast_tracepoint_valid_at)); | |
48f7351b AC |
978 | fprintf_unfiltered (file, |
979 | "gdbarch_dump: gdbarch_fetch_pointer_argument_p() = %d\n", | |
be7811ad | 980 | gdbarch_fetch_pointer_argument_p (gdbarch)); |
48f7351b | 981 | fprintf_unfiltered (file, |
30737ed9 JB |
982 | "gdbarch_dump: fetch_pointer_argument = <%s>\n", |
983 | host_address_to_string (gdbarch->fetch_pointer_argument)); | |
b2756930 KB |
984 | fprintf_unfiltered (file, |
985 | "gdbarch_dump: gdbarch_fetch_tls_load_module_address_p() = %d\n", | |
be7811ad | 986 | gdbarch_fetch_tls_load_module_address_p (gdbarch)); |
b2756930 | 987 | fprintf_unfiltered (file, |
30737ed9 JB |
988 | "gdbarch_dump: fetch_tls_load_module_address = <%s>\n", |
989 | host_address_to_string (gdbarch->fetch_tls_load_module_address)); | |
35c2fab7 UW |
990 | fprintf_unfiltered (file, |
991 | "gdbarch_dump: gdbarch_find_memory_regions_p() = %d\n", | |
992 | gdbarch_find_memory_regions_p (gdbarch)); | |
993 | fprintf_unfiltered (file, | |
994 | "gdbarch_dump: find_memory_regions = <%s>\n", | |
995 | host_address_to_string (gdbarch->find_memory_regions)); | |
48f7351b AC |
996 | fprintf_unfiltered (file, |
997 | "gdbarch_dump: float_bit = %s\n", | |
623d3eb1 | 998 | plongest (gdbarch->float_bit)); |
a2428dbe | 999 | fprintf_unfiltered (file, |
48f7351b | 1000 | "gdbarch_dump: float_format = %s\n", |
be7811ad | 1001 | pformat (gdbarch->float_format)); |
48f7351b AC |
1002 | fprintf_unfiltered (file, |
1003 | "gdbarch_dump: fp0_regnum = %s\n", | |
623d3eb1 | 1004 | plongest (gdbarch->fp0_regnum)); |
a2428dbe AC |
1005 | fprintf_unfiltered (file, |
1006 | "gdbarch_dump: gdbarch_frame_align_p() = %d\n", | |
be7811ad | 1007 | gdbarch_frame_align_p (gdbarch)); |
a2428dbe | 1008 | fprintf_unfiltered (file, |
30737ed9 JB |
1009 | "gdbarch_dump: frame_align = <%s>\n", |
1010 | host_address_to_string (gdbarch->frame_align)); | |
48f7351b | 1011 | fprintf_unfiltered (file, |
0b1553bc UW |
1012 | "gdbarch_dump: frame_args_skip = %s\n", |
1013 | core_addr_to_string_nz (gdbarch->frame_args_skip)); | |
48f7351b AC |
1014 | fprintf_unfiltered (file, |
1015 | "gdbarch_dump: gdbarch_frame_num_args_p() = %d\n", | |
be7811ad | 1016 | gdbarch_frame_num_args_p (gdbarch)); |
48f7351b | 1017 | fprintf_unfiltered (file, |
30737ed9 JB |
1018 | "gdbarch_dump: frame_num_args = <%s>\n", |
1019 | host_address_to_string (gdbarch->frame_num_args)); | |
48f7351b AC |
1020 | fprintf_unfiltered (file, |
1021 | "gdbarch_dump: frame_red_zone_size = %s\n", | |
623d3eb1 | 1022 | plongest (gdbarch->frame_red_zone_size)); |
a78c2d62 UW |
1023 | fprintf_unfiltered (file, |
1024 | "gdbarch_dump: gdbarch_gcore_bfd_target_p() = %d\n", | |
1025 | gdbarch_gcore_bfd_target_p (gdbarch)); | |
1026 | fprintf_unfiltered (file, | |
1027 | "gdbarch_dump: gcore_bfd_target = %s\n", | |
86ba1042 | 1028 | pstring (gdbarch->gcore_bfd_target)); |
1f8cf220 PA |
1029 | fprintf_unfiltered (file, |
1030 | "gdbarch_dump: gdbarch_gdb_signal_from_target_p() = %d\n", | |
1031 | gdbarch_gdb_signal_from_target_p (gdbarch)); | |
2ea28649 | 1032 | fprintf_unfiltered (file, |
22203bbf PA |
1033 | "gdbarch_dump: gdb_signal_from_target = <%s>\n", |
1034 | host_address_to_string (gdbarch->gdb_signal_from_target)); | |
6710bf39 SS |
1035 | fprintf_unfiltered (file, |
1036 | "gdbarch_dump: gen_return_address = <%s>\n", | |
1037 | host_address_to_string (gdbarch->gen_return_address)); | |
48f7351b AC |
1038 | fprintf_unfiltered (file, |
1039 | "gdbarch_dump: gdbarch_get_longjmp_target_p() = %d\n", | |
be7811ad | 1040 | gdbarch_get_longjmp_target_p (gdbarch)); |
48f7351b | 1041 | fprintf_unfiltered (file, |
30737ed9 JB |
1042 | "gdbarch_dump: get_longjmp_target = <%s>\n", |
1043 | host_address_to_string (gdbarch->get_longjmp_target)); | |
4aa995e1 PA |
1044 | fprintf_unfiltered (file, |
1045 | "gdbarch_dump: gdbarch_get_siginfo_type_p() = %d\n", | |
1046 | gdbarch_get_siginfo_type_p (gdbarch)); | |
1047 | fprintf_unfiltered (file, | |
315aef0a PA |
1048 | "gdbarch_dump: get_siginfo_type = <%s>\n", |
1049 | host_address_to_string (gdbarch->get_siginfo_type)); | |
a96d9b2e SDJ |
1050 | fprintf_unfiltered (file, |
1051 | "gdbarch_dump: gdbarch_get_syscall_number_p() = %d\n", | |
1052 | gdbarch_get_syscall_number_p (gdbarch)); | |
1053 | fprintf_unfiltered (file, | |
1054 | "gdbarch_dump: get_syscall_number = <%s>\n", | |
1055 | host_address_to_string (gdbarch->get_syscall_number)); | |
f9e9243a UW |
1056 | fprintf_unfiltered (file, |
1057 | "gdbarch_dump: half_bit = %s\n", | |
1058 | plongest (gdbarch->half_bit)); | |
1059 | fprintf_unfiltered (file, | |
1060 | "gdbarch_dump: half_format = %s\n", | |
1061 | pformat (gdbarch->half_format)); | |
ab38a727 PA |
1062 | fprintf_unfiltered (file, |
1063 | "gdbarch_dump: has_dos_based_file_system = %s\n", | |
1064 | plongest (gdbarch->has_dos_based_file_system)); | |
2567c7d9 PA |
1065 | fprintf_unfiltered (file, |
1066 | "gdbarch_dump: has_global_breakpoints = %s\n", | |
1067 | plongest (gdbarch->has_global_breakpoints)); | |
50c71eaf PA |
1068 | fprintf_unfiltered (file, |
1069 | "gdbarch_dump: has_global_solist = %s\n", | |
1070 | plongest (gdbarch->has_global_solist)); | |
6c95b8df PA |
1071 | fprintf_unfiltered (file, |
1072 | "gdbarch_dump: has_shared_address_space = <%s>\n", | |
1073 | host_address_to_string (gdbarch->has_shared_address_space)); | |
a2428dbe | 1074 | fprintf_unfiltered (file, |
48f7351b | 1075 | "gdbarch_dump: have_nonsteppable_watchpoint = %s\n", |
623d3eb1 | 1076 | plongest (gdbarch->have_nonsteppable_watchpoint)); |
48f7351b | 1077 | fprintf_unfiltered (file, |
30737ed9 JB |
1078 | "gdbarch_dump: in_function_epilogue_p = <%s>\n", |
1079 | host_address_to_string (gdbarch->in_function_epilogue_p)); | |
48f7351b | 1080 | fprintf_unfiltered (file, |
30737ed9 JB |
1081 | "gdbarch_dump: in_solib_return_trampoline = <%s>\n", |
1082 | host_address_to_string (gdbarch->in_solib_return_trampoline)); | |
3030c96e UW |
1083 | fprintf_unfiltered (file, |
1084 | "gdbarch_dump: gdbarch_info_proc_p() = %d\n", | |
1085 | gdbarch_info_proc_p (gdbarch)); | |
1086 | fprintf_unfiltered (file, | |
1087 | "gdbarch_dump: info_proc = <%s>\n", | |
1088 | host_address_to_string (gdbarch->info_proc)); | |
48f7351b | 1089 | fprintf_unfiltered (file, |
30737ed9 JB |
1090 | "gdbarch_dump: inner_than = <%s>\n", |
1091 | host_address_to_string (gdbarch->inner_than)); | |
48f7351b AC |
1092 | fprintf_unfiltered (file, |
1093 | "gdbarch_dump: int_bit = %s\n", | |
623d3eb1 | 1094 | plongest (gdbarch->int_bit)); |
48f7351b AC |
1095 | fprintf_unfiltered (file, |
1096 | "gdbarch_dump: gdbarch_integer_to_address_p() = %d\n", | |
be7811ad | 1097 | gdbarch_integer_to_address_p (gdbarch)); |
48f7351b | 1098 | fprintf_unfiltered (file, |
30737ed9 JB |
1099 | "gdbarch_dump: integer_to_address = <%s>\n", |
1100 | host_address_to_string (gdbarch->integer_to_address)); | |
19630284 JB |
1101 | fprintf_unfiltered (file, |
1102 | "gdbarch_dump: iterate_over_objfiles_in_search_order = <%s>\n", | |
1103 | host_address_to_string (gdbarch->iterate_over_objfiles_in_search_order)); | |
48f7351b AC |
1104 | fprintf_unfiltered (file, |
1105 | "gdbarch_dump: long_bit = %s\n", | |
623d3eb1 | 1106 | plongest (gdbarch->long_bit)); |
48f7351b AC |
1107 | fprintf_unfiltered (file, |
1108 | "gdbarch_dump: long_double_bit = %s\n", | |
623d3eb1 | 1109 | plongest (gdbarch->long_double_bit)); |
a2428dbe | 1110 | fprintf_unfiltered (file, |
48f7351b | 1111 | "gdbarch_dump: long_double_format = %s\n", |
be7811ad | 1112 | pformat (gdbarch->long_double_format)); |
205c306f DM |
1113 | fprintf_unfiltered (file, |
1114 | "gdbarch_dump: long_long_align_bit = %s\n", | |
1115 | plongest (gdbarch->long_long_align_bit)); | |
48f7351b AC |
1116 | fprintf_unfiltered (file, |
1117 | "gdbarch_dump: long_long_bit = %s\n", | |
623d3eb1 | 1118 | plongest (gdbarch->long_long_bit)); |
6432734d UW |
1119 | fprintf_unfiltered (file, |
1120 | "gdbarch_dump: gdbarch_make_corefile_notes_p() = %d\n", | |
1121 | gdbarch_make_corefile_notes_p (gdbarch)); | |
1122 | fprintf_unfiltered (file, | |
1123 | "gdbarch_dump: make_corefile_notes = <%s>\n", | |
1124 | host_address_to_string (gdbarch->make_corefile_notes)); | |
237fc4c9 PA |
1125 | fprintf_unfiltered (file, |
1126 | "gdbarch_dump: gdbarch_max_insn_length_p() = %d\n", | |
1127 | gdbarch_max_insn_length_p (gdbarch)); | |
1128 | fprintf_unfiltered (file, | |
1129 | "gdbarch_dump: max_insn_length = %s\n", | |
623d3eb1 | 1130 | plongest (gdbarch->max_insn_length)); |
48f7351b | 1131 | fprintf_unfiltered (file, |
30737ed9 JB |
1132 | "gdbarch_dump: memory_insert_breakpoint = <%s>\n", |
1133 | host_address_to_string (gdbarch->memory_insert_breakpoint)); | |
48f7351b | 1134 | fprintf_unfiltered (file, |
30737ed9 JB |
1135 | "gdbarch_dump: memory_remove_breakpoint = <%s>\n", |
1136 | host_address_to_string (gdbarch->memory_remove_breakpoint)); | |
48f7351b AC |
1137 | fprintf_unfiltered (file, |
1138 | "gdbarch_dump: num_pseudo_regs = %s\n", | |
623d3eb1 | 1139 | plongest (gdbarch->num_pseudo_regs)); |
48f7351b AC |
1140 | fprintf_unfiltered (file, |
1141 | "gdbarch_dump: num_regs = %s\n", | |
623d3eb1 | 1142 | plongest (gdbarch->num_regs)); |
48f7351b AC |
1143 | fprintf_unfiltered (file, |
1144 | "gdbarch_dump: osabi = %s\n", | |
623d3eb1 | 1145 | plongest (gdbarch->osabi)); |
1c772458 UW |
1146 | fprintf_unfiltered (file, |
1147 | "gdbarch_dump: gdbarch_overlay_update_p() = %d\n", | |
be7811ad | 1148 | gdbarch_overlay_update_p (gdbarch)); |
1c772458 | 1149 | fprintf_unfiltered (file, |
30737ed9 JB |
1150 | "gdbarch_dump: overlay_update = <%s>\n", |
1151 | host_address_to_string (gdbarch->overlay_update)); | |
48f7351b AC |
1152 | fprintf_unfiltered (file, |
1153 | "gdbarch_dump: pc_regnum = %s\n", | |
623d3eb1 | 1154 | plongest (gdbarch->pc_regnum)); |
48f7351b | 1155 | fprintf_unfiltered (file, |
30737ed9 JB |
1156 | "gdbarch_dump: pointer_to_address = <%s>\n", |
1157 | host_address_to_string (gdbarch->pointer_to_address)); | |
7996bcec AC |
1158 | fprintf_unfiltered (file, |
1159 | "gdbarch_dump: gdbarch_print_float_info_p() = %d\n", | |
be7811ad | 1160 | gdbarch_print_float_info_p (gdbarch)); |
7996bcec | 1161 | fprintf_unfiltered (file, |
30737ed9 JB |
1162 | "gdbarch_dump: print_float_info = <%s>\n", |
1163 | host_address_to_string (gdbarch->print_float_info)); | |
7996bcec | 1164 | fprintf_unfiltered (file, |
30737ed9 JB |
1165 | "gdbarch_dump: print_insn = <%s>\n", |
1166 | host_address_to_string (gdbarch->print_insn)); | |
48f7351b | 1167 | fprintf_unfiltered (file, |
30737ed9 JB |
1168 | "gdbarch_dump: print_registers_info = <%s>\n", |
1169 | host_address_to_string (gdbarch->print_registers_info)); | |
7996bcec AC |
1170 | fprintf_unfiltered (file, |
1171 | "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n", | |
be7811ad | 1172 | gdbarch_print_vector_info_p (gdbarch)); |
7996bcec | 1173 | fprintf_unfiltered (file, |
30737ed9 JB |
1174 | "gdbarch_dump: print_vector_info = <%s>\n", |
1175 | host_address_to_string (gdbarch->print_vector_info)); | |
0508c3ec HZ |
1176 | fprintf_unfiltered (file, |
1177 | "gdbarch_dump: gdbarch_process_record_p() = %d\n", | |
1178 | gdbarch_process_record_p (gdbarch)); | |
1179 | fprintf_unfiltered (file, | |
1180 | "gdbarch_dump: process_record = <%s>\n", | |
1181 | host_address_to_string (gdbarch->process_record)); | |
3846b520 HZ |
1182 | fprintf_unfiltered (file, |
1183 | "gdbarch_dump: gdbarch_process_record_signal_p() = %d\n", | |
1184 | gdbarch_process_record_signal_p (gdbarch)); | |
1185 | fprintf_unfiltered (file, | |
1186 | "gdbarch_dump: process_record_signal = <%s>\n", | |
1187 | host_address_to_string (gdbarch->process_record_signal)); | |
48f7351b AC |
1188 | fprintf_unfiltered (file, |
1189 | "gdbarch_dump: ps_regnum = %s\n", | |
623d3eb1 | 1190 | plongest (gdbarch->ps_regnum)); |
a2428dbe AC |
1191 | fprintf_unfiltered (file, |
1192 | "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n", | |
be7811ad | 1193 | gdbarch_pseudo_register_read_p (gdbarch)); |
a2428dbe | 1194 | fprintf_unfiltered (file, |
30737ed9 JB |
1195 | "gdbarch_dump: pseudo_register_read = <%s>\n", |
1196 | host_address_to_string (gdbarch->pseudo_register_read)); | |
3543a589 TT |
1197 | fprintf_unfiltered (file, |
1198 | "gdbarch_dump: gdbarch_pseudo_register_read_value_p() = %d\n", | |
1199 | gdbarch_pseudo_register_read_value_p (gdbarch)); | |
1200 | fprintf_unfiltered (file, | |
1201 | "gdbarch_dump: pseudo_register_read_value = <%s>\n", | |
1202 | host_address_to_string (gdbarch->pseudo_register_read_value)); | |
a2428dbe AC |
1203 | fprintf_unfiltered (file, |
1204 | "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n", | |
be7811ad | 1205 | gdbarch_pseudo_register_write_p (gdbarch)); |
a2428dbe | 1206 | fprintf_unfiltered (file, |
30737ed9 JB |
1207 | "gdbarch_dump: pseudo_register_write = <%s>\n", |
1208 | host_address_to_string (gdbarch->pseudo_register_write)); | |
48f7351b AC |
1209 | fprintf_unfiltered (file, |
1210 | "gdbarch_dump: ptr_bit = %s\n", | |
623d3eb1 | 1211 | plongest (gdbarch->ptr_bit)); |
7996bcec AC |
1212 | fprintf_unfiltered (file, |
1213 | "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n", | |
be7811ad | 1214 | gdbarch_push_dummy_call_p (gdbarch)); |
7996bcec | 1215 | fprintf_unfiltered (file, |
30737ed9 JB |
1216 | "gdbarch_dump: push_dummy_call = <%s>\n", |
1217 | host_address_to_string (gdbarch->push_dummy_call)); | |
7996bcec AC |
1218 | fprintf_unfiltered (file, |
1219 | "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n", | |
be7811ad | 1220 | gdbarch_push_dummy_code_p (gdbarch)); |
7996bcec | 1221 | fprintf_unfiltered (file, |
30737ed9 JB |
1222 | "gdbarch_dump: push_dummy_code = <%s>\n", |
1223 | host_address_to_string (gdbarch->push_dummy_code)); | |
7e35103a JB |
1224 | fprintf_unfiltered (file, |
1225 | "gdbarch_dump: ravenscar_ops = %s\n", | |
1226 | host_address_to_string (gdbarch->ravenscar_ops)); | |
48f7351b AC |
1227 | fprintf_unfiltered (file, |
1228 | "gdbarch_dump: gdbarch_read_pc_p() = %d\n", | |
be7811ad | 1229 | gdbarch_read_pc_p (gdbarch)); |
48f7351b | 1230 | fprintf_unfiltered (file, |
30737ed9 JB |
1231 | "gdbarch_dump: read_pc = <%s>\n", |
1232 | host_address_to_string (gdbarch->read_pc)); | |
60c5725c DJ |
1233 | fprintf_unfiltered (file, |
1234 | "gdbarch_dump: gdbarch_record_special_symbol_p() = %d\n", | |
1235 | gdbarch_record_special_symbol_p (gdbarch)); | |
1236 | fprintf_unfiltered (file, | |
30737ed9 JB |
1237 | "gdbarch_dump: record_special_symbol = <%s>\n", |
1238 | host_address_to_string (gdbarch->record_special_symbol)); | |
a2428dbe | 1239 | fprintf_unfiltered (file, |
30737ed9 JB |
1240 | "gdbarch_dump: register_name = <%s>\n", |
1241 | host_address_to_string (gdbarch->register_name)); | |
48f7351b | 1242 | fprintf_unfiltered (file, |
30737ed9 JB |
1243 | "gdbarch_dump: register_reggroup_p = <%s>\n", |
1244 | host_address_to_string (gdbarch->register_reggroup_p)); | |
48f7351b | 1245 | fprintf_unfiltered (file, |
30737ed9 JB |
1246 | "gdbarch_dump: register_sim_regno = <%s>\n", |
1247 | host_address_to_string (gdbarch->register_sim_regno)); | |
48f7351b | 1248 | fprintf_unfiltered (file, |
30737ed9 JB |
1249 | "gdbarch_dump: register_to_value = <%s>\n", |
1250 | host_address_to_string (gdbarch->register_to_value)); | |
7996bcec AC |
1251 | fprintf_unfiltered (file, |
1252 | "gdbarch_dump: gdbarch_register_type_p() = %d\n", | |
be7811ad | 1253 | gdbarch_register_type_p (gdbarch)); |
7996bcec | 1254 | fprintf_unfiltered (file, |
30737ed9 JB |
1255 | "gdbarch_dump: register_type = <%s>\n", |
1256 | host_address_to_string (gdbarch->register_type)); | |
a2428dbe AC |
1257 | fprintf_unfiltered (file, |
1258 | "gdbarch_dump: gdbarch_regset_from_core_section_p() = %d\n", | |
be7811ad | 1259 | gdbarch_regset_from_core_section_p (gdbarch)); |
a2428dbe | 1260 | fprintf_unfiltered (file, |
30737ed9 JB |
1261 | "gdbarch_dump: regset_from_core_section = <%s>\n", |
1262 | host_address_to_string (gdbarch->regset_from_core_section)); | |
dde08ee1 PA |
1263 | fprintf_unfiltered (file, |
1264 | "gdbarch_dump: gdbarch_relocate_instruction_p() = %d\n", | |
1265 | gdbarch_relocate_instruction_p (gdbarch)); | |
1266 | fprintf_unfiltered (file, | |
1267 | "gdbarch_dump: relocate_instruction = <%s>\n", | |
1268 | host_address_to_string (gdbarch->relocate_instruction)); | |
a1dcb23a DJ |
1269 | fprintf_unfiltered (file, |
1270 | "gdbarch_dump: remote_breakpoint_from_pc = <%s>\n", | |
1271 | host_address_to_string (gdbarch->remote_breakpoint_from_pc)); | |
123dc839 | 1272 | fprintf_unfiltered (file, |
30737ed9 JB |
1273 | "gdbarch_dump: remote_register_number = <%s>\n", |
1274 | host_address_to_string (gdbarch->remote_register_number)); | |
18648a37 YQ |
1275 | fprintf_unfiltered (file, |
1276 | "gdbarch_dump: return_in_first_hidden_param_p = <%s>\n", | |
1277 | host_address_to_string (gdbarch->return_in_first_hidden_param_p)); | |
a2428dbe AC |
1278 | fprintf_unfiltered (file, |
1279 | "gdbarch_dump: gdbarch_return_value_p() = %d\n", | |
be7811ad | 1280 | gdbarch_return_value_p (gdbarch)); |
a2428dbe | 1281 | fprintf_unfiltered (file, |
30737ed9 JB |
1282 | "gdbarch_dump: return_value = <%s>\n", |
1283 | host_address_to_string (gdbarch->return_value)); | |
48f7351b | 1284 | fprintf_unfiltered (file, |
30737ed9 JB |
1285 | "gdbarch_dump: sdb_reg_to_regnum = <%s>\n", |
1286 | host_address_to_string (gdbarch->sdb_reg_to_regnum)); | |
48f7351b AC |
1287 | fprintf_unfiltered (file, |
1288 | "gdbarch_dump: short_bit = %s\n", | |
623d3eb1 | 1289 | plongest (gdbarch->short_bit)); |
3352ef37 AC |
1290 | fprintf_unfiltered (file, |
1291 | "gdbarch_dump: gdbarch_single_step_through_delay_p() = %d\n", | |
be7811ad | 1292 | gdbarch_single_step_through_delay_p (gdbarch)); |
3352ef37 | 1293 | fprintf_unfiltered (file, |
30737ed9 JB |
1294 | "gdbarch_dump: single_step_through_delay = <%s>\n", |
1295 | host_address_to_string (gdbarch->single_step_through_delay)); | |
4309257c PM |
1296 | fprintf_unfiltered (file, |
1297 | "gdbarch_dump: gdbarch_skip_main_prologue_p() = %d\n", | |
1298 | gdbarch_skip_main_prologue_p (gdbarch)); | |
1299 | fprintf_unfiltered (file, | |
30737ed9 JB |
1300 | "gdbarch_dump: skip_main_prologue = <%s>\n", |
1301 | host_address_to_string (gdbarch->skip_main_prologue)); | |
6d350bb5 UW |
1302 | fprintf_unfiltered (file, |
1303 | "gdbarch_dump: gdbarch_skip_permanent_breakpoint_p() = %d\n", | |
be7811ad | 1304 | gdbarch_skip_permanent_breakpoint_p (gdbarch)); |
6d350bb5 | 1305 | fprintf_unfiltered (file, |
30737ed9 JB |
1306 | "gdbarch_dump: skip_permanent_breakpoint = <%s>\n", |
1307 | host_address_to_string (gdbarch->skip_permanent_breakpoint)); | |
dea0c52f | 1308 | fprintf_unfiltered (file, |
30737ed9 JB |
1309 | "gdbarch_dump: skip_prologue = <%s>\n", |
1310 | host_address_to_string (gdbarch->skip_prologue)); | |
48f7351b | 1311 | fprintf_unfiltered (file, |
30737ed9 JB |
1312 | "gdbarch_dump: skip_solib_resolver = <%s>\n", |
1313 | host_address_to_string (gdbarch->skip_solib_resolver)); | |
48f7351b | 1314 | fprintf_unfiltered (file, |
30737ed9 JB |
1315 | "gdbarch_dump: skip_trampoline_code = <%s>\n", |
1316 | host_address_to_string (gdbarch->skip_trampoline_code)); | |
48f7351b AC |
1317 | fprintf_unfiltered (file, |
1318 | "gdbarch_dump: gdbarch_software_single_step_p() = %d\n", | |
be7811ad | 1319 | gdbarch_software_single_step_p (gdbarch)); |
48f7351b | 1320 | fprintf_unfiltered (file, |
30737ed9 JB |
1321 | "gdbarch_dump: software_single_step = <%s>\n", |
1322 | host_address_to_string (gdbarch->software_single_step)); | |
203c3895 UW |
1323 | fprintf_unfiltered (file, |
1324 | "gdbarch_dump: sofun_address_maybe_missing = %s\n", | |
623d3eb1 | 1325 | plongest (gdbarch->sofun_address_maybe_missing)); |
08105857 PA |
1326 | fprintf_unfiltered (file, |
1327 | "gdbarch_dump: solib_symbols_extension = %s\n", | |
1328 | pstring (gdbarch->solib_symbols_extension)); | |
48f7351b AC |
1329 | fprintf_unfiltered (file, |
1330 | "gdbarch_dump: sp_regnum = %s\n", | |
623d3eb1 | 1331 | plongest (gdbarch->sp_regnum)); |
a2428dbe | 1332 | fprintf_unfiltered (file, |
30737ed9 JB |
1333 | "gdbarch_dump: stab_reg_to_regnum = <%s>\n", |
1334 | host_address_to_string (gdbarch->stab_reg_to_regnum)); | |
48f7351b | 1335 | fprintf_unfiltered (file, |
30737ed9 JB |
1336 | "gdbarch_dump: stabs_argument_has_addr = <%s>\n", |
1337 | host_address_to_string (gdbarch->stabs_argument_has_addr)); | |
55aa24fb SDJ |
1338 | fprintf_unfiltered (file, |
1339 | "gdbarch_dump: stap_gdb_register_prefix = %s\n", | |
08af7a40 | 1340 | pstring (gdbarch->stap_gdb_register_prefix)); |
55aa24fb SDJ |
1341 | fprintf_unfiltered (file, |
1342 | "gdbarch_dump: stap_gdb_register_suffix = %s\n", | |
08af7a40 | 1343 | pstring (gdbarch->stap_gdb_register_suffix)); |
55aa24fb SDJ |
1344 | fprintf_unfiltered (file, |
1345 | "gdbarch_dump: stap_integer_prefix = %s\n", | |
08af7a40 | 1346 | pstring (gdbarch->stap_integer_prefix)); |
55aa24fb SDJ |
1347 | fprintf_unfiltered (file, |
1348 | "gdbarch_dump: stap_integer_suffix = %s\n", | |
08af7a40 | 1349 | pstring (gdbarch->stap_integer_suffix)); |
55aa24fb SDJ |
1350 | fprintf_unfiltered (file, |
1351 | "gdbarch_dump: gdbarch_stap_is_single_operand_p() = %d\n", | |
1352 | gdbarch_stap_is_single_operand_p (gdbarch)); | |
1353 | fprintf_unfiltered (file, | |
1354 | "gdbarch_dump: stap_is_single_operand = <%s>\n", | |
1355 | host_address_to_string (gdbarch->stap_is_single_operand)); | |
1356 | fprintf_unfiltered (file, | |
1357 | "gdbarch_dump: gdbarch_stap_parse_special_token_p() = %d\n", | |
1358 | gdbarch_stap_parse_special_token_p (gdbarch)); | |
1359 | fprintf_unfiltered (file, | |
1360 | "gdbarch_dump: stap_parse_special_token = <%s>\n", | |
1361 | host_address_to_string (gdbarch->stap_parse_special_token)); | |
1362 | fprintf_unfiltered (file, | |
1363 | "gdbarch_dump: stap_register_indirection_prefix = %s\n", | |
08af7a40 | 1364 | pstring (gdbarch->stap_register_indirection_prefix)); |
55aa24fb SDJ |
1365 | fprintf_unfiltered (file, |
1366 | "gdbarch_dump: stap_register_indirection_suffix = %s\n", | |
08af7a40 | 1367 | pstring (gdbarch->stap_register_indirection_suffix)); |
55aa24fb SDJ |
1368 | fprintf_unfiltered (file, |
1369 | "gdbarch_dump: stap_register_prefix = %s\n", | |
08af7a40 | 1370 | pstring (gdbarch->stap_register_prefix)); |
55aa24fb SDJ |
1371 | fprintf_unfiltered (file, |
1372 | "gdbarch_dump: stap_register_suffix = %s\n", | |
08af7a40 | 1373 | pstring (gdbarch->stap_register_suffix)); |
149ad273 UW |
1374 | fprintf_unfiltered (file, |
1375 | "gdbarch_dump: gdbarch_static_transform_name_p() = %d\n", | |
be7811ad | 1376 | gdbarch_static_transform_name_p (gdbarch)); |
149ad273 | 1377 | fprintf_unfiltered (file, |
30737ed9 JB |
1378 | "gdbarch_dump: static_transform_name = <%s>\n", |
1379 | host_address_to_string (gdbarch->static_transform_name)); | |
424163ea DJ |
1380 | fprintf_unfiltered (file, |
1381 | "gdbarch_dump: target_desc = %s\n", | |
30737ed9 | 1382 | host_address_to_string (gdbarch->target_desc)); |
08e45a40 | 1383 | fprintf_unfiltered (file, |
a2428dbe | 1384 | "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n", |
be7811ad | 1385 | gdbarch_unwind_pc_p (gdbarch)); |
7996bcec | 1386 | fprintf_unfiltered (file, |
30737ed9 JB |
1387 | "gdbarch_dump: unwind_pc = <%s>\n", |
1388 | host_address_to_string (gdbarch->unwind_pc)); | |
bd1ce8ba | 1389 | fprintf_unfiltered (file, |
a2428dbe | 1390 | "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n", |
be7811ad | 1391 | gdbarch_unwind_sp_p (gdbarch)); |
bd1ce8ba | 1392 | fprintf_unfiltered (file, |
30737ed9 JB |
1393 | "gdbarch_dump: unwind_sp = <%s>\n", |
1394 | host_address_to_string (gdbarch->unwind_sp)); | |
9acbedc0 | 1395 | fprintf_unfiltered (file, |
30737ed9 JB |
1396 | "gdbarch_dump: value_from_register = <%s>\n", |
1397 | host_address_to_string (gdbarch->value_from_register)); | |
48f7351b | 1398 | fprintf_unfiltered (file, |
30737ed9 JB |
1399 | "gdbarch_dump: value_to_register = <%s>\n", |
1400 | host_address_to_string (gdbarch->value_to_register)); | |
0d5de010 DJ |
1401 | fprintf_unfiltered (file, |
1402 | "gdbarch_dump: vbit_in_delta = %s\n", | |
623d3eb1 | 1403 | plongest (gdbarch->vbit_in_delta)); |
48f7351b | 1404 | fprintf_unfiltered (file, |
30737ed9 JB |
1405 | "gdbarch_dump: virtual_frame_pointer = <%s>\n", |
1406 | host_address_to_string (gdbarch->virtual_frame_pointer)); | |
0d5de010 DJ |
1407 | fprintf_unfiltered (file, |
1408 | "gdbarch_dump: vtable_function_descriptors = %s\n", | |
623d3eb1 | 1409 | plongest (gdbarch->vtable_function_descriptors)); |
4b9b3959 | 1410 | fprintf_unfiltered (file, |
61a1198a | 1411 | "gdbarch_dump: gdbarch_write_pc_p() = %d\n", |
be7811ad | 1412 | gdbarch_write_pc_p (gdbarch)); |
48f7351b | 1413 | fprintf_unfiltered (file, |
30737ed9 JB |
1414 | "gdbarch_dump: write_pc = <%s>\n", |
1415 | host_address_to_string (gdbarch->write_pc)); | |
be7811ad MD |
1416 | if (gdbarch->dump_tdep != NULL) |
1417 | gdbarch->dump_tdep (gdbarch, file); | |
0f71a2f6 JM |
1418 | } |
1419 | ||
1420 | struct gdbarch_tdep * | |
104c1213 | 1421 | gdbarch_tdep (struct gdbarch *gdbarch) |
0f71a2f6 JM |
1422 | { |
1423 | if (gdbarch_debug >= 2) | |
0f71a2f6 JM |
1424 | fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n"); |
1425 | return gdbarch->tdep; | |
1426 | } | |
1427 | ||
1428 | ||
1429 | const struct bfd_arch_info * | |
104c1213 | 1430 | gdbarch_bfd_arch_info (struct gdbarch *gdbarch) |
0f71a2f6 | 1431 | { |
8de9bdc4 | 1432 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 1433 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
1434 | fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n"); |
1435 | return gdbarch->bfd_arch_info; | |
1436 | } | |
1437 | ||
1438 | int | |
104c1213 | 1439 | gdbarch_byte_order (struct gdbarch *gdbarch) |
0f71a2f6 | 1440 | { |
8de9bdc4 | 1441 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 1442 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
1443 | fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n"); |
1444 | return gdbarch->byte_order; | |
1445 | } | |
1446 | ||
9d4fde75 SS |
1447 | int |
1448 | gdbarch_byte_order_for_code (struct gdbarch *gdbarch) | |
1449 | { | |
1450 | gdb_assert (gdbarch != NULL); | |
1451 | if (gdbarch_debug >= 2) | |
1452 | fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order_for_code called\n"); | |
1453 | return gdbarch->byte_order_for_code; | |
1454 | } | |
1455 | ||
4be87837 DJ |
1456 | enum gdb_osabi |
1457 | gdbarch_osabi (struct gdbarch *gdbarch) | |
1458 | { | |
1459 | gdb_assert (gdbarch != NULL); | |
1460 | if (gdbarch_debug >= 2) | |
1461 | fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n"); | |
1462 | return gdbarch->osabi; | |
1463 | } | |
1464 | ||
424163ea DJ |
1465 | const struct target_desc * |
1466 | gdbarch_target_desc (struct gdbarch *gdbarch) | |
1467 | { | |
1468 | gdb_assert (gdbarch != NULL); | |
1469 | if (gdbarch_debug >= 2) | |
1470 | fprintf_unfiltered (gdb_stdlog, "gdbarch_target_desc called\n"); | |
1471 | return gdbarch->target_desc; | |
1472 | } | |
1473 | ||
32c9a795 MD |
1474 | int |
1475 | gdbarch_bits_big_endian (struct gdbarch *gdbarch) | |
1476 | { | |
1477 | gdb_assert (gdbarch != NULL); | |
1478 | /* Skip verify of bits_big_endian, invalid_p == 0 */ | |
1479 | if (gdbarch_debug >= 2) | |
1480 | fprintf_unfiltered (gdb_stdlog, "gdbarch_bits_big_endian called\n"); | |
1481 | return gdbarch->bits_big_endian; | |
1482 | } | |
1483 | ||
1484 | void | |
1485 | set_gdbarch_bits_big_endian (struct gdbarch *gdbarch, | |
1486 | int bits_big_endian) | |
1487 | { | |
1488 | gdbarch->bits_big_endian = bits_big_endian; | |
1489 | } | |
1490 | ||
0f71a2f6 | 1491 | int |
104c1213 | 1492 | gdbarch_short_bit (struct gdbarch *gdbarch) |
0f71a2f6 | 1493 | { |
8de9bdc4 | 1494 | gdb_assert (gdbarch != NULL); |
66b43ecb | 1495 | /* Skip verify of short_bit, invalid_p == 0 */ |
0f71a2f6 | 1496 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
1497 | fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n"); |
1498 | return gdbarch->short_bit; | |
1499 | } | |
1500 | ||
1501 | void | |
104c1213 JM |
1502 | set_gdbarch_short_bit (struct gdbarch *gdbarch, |
1503 | int short_bit) | |
0f71a2f6 JM |
1504 | { |
1505 | gdbarch->short_bit = short_bit; | |
1506 | } | |
1507 | ||
1508 | int | |
104c1213 | 1509 | gdbarch_int_bit (struct gdbarch *gdbarch) |
0f71a2f6 | 1510 | { |
8de9bdc4 | 1511 | gdb_assert (gdbarch != NULL); |
66b43ecb | 1512 | /* Skip verify of int_bit, invalid_p == 0 */ |
0f71a2f6 | 1513 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
1514 | fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n"); |
1515 | return gdbarch->int_bit; | |
1516 | } | |
1517 | ||
1518 | void | |
104c1213 JM |
1519 | set_gdbarch_int_bit (struct gdbarch *gdbarch, |
1520 | int int_bit) | |
0f71a2f6 JM |
1521 | { |
1522 | gdbarch->int_bit = int_bit; | |
1523 | } | |
1524 | ||
1525 | int | |
104c1213 | 1526 | gdbarch_long_bit (struct gdbarch *gdbarch) |
0f71a2f6 | 1527 | { |
8de9bdc4 | 1528 | gdb_assert (gdbarch != NULL); |
66b43ecb | 1529 | /* Skip verify of long_bit, invalid_p == 0 */ |
0f71a2f6 | 1530 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
1531 | fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n"); |
1532 | return gdbarch->long_bit; | |
1533 | } | |
1534 | ||
1535 | void | |
104c1213 JM |
1536 | set_gdbarch_long_bit (struct gdbarch *gdbarch, |
1537 | int long_bit) | |
0f71a2f6 JM |
1538 | { |
1539 | gdbarch->long_bit = long_bit; | |
1540 | } | |
1541 | ||
1542 | int | |
104c1213 | 1543 | gdbarch_long_long_bit (struct gdbarch *gdbarch) |
0f71a2f6 | 1544 | { |
8de9bdc4 | 1545 | gdb_assert (gdbarch != NULL); |
66b43ecb | 1546 | /* Skip verify of long_long_bit, invalid_p == 0 */ |
0f71a2f6 | 1547 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
1548 | fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n"); |
1549 | return gdbarch->long_long_bit; | |
1550 | } | |
1551 | ||
1552 | void | |
104c1213 JM |
1553 | set_gdbarch_long_long_bit (struct gdbarch *gdbarch, |
1554 | int long_long_bit) | |
0f71a2f6 JM |
1555 | { |
1556 | gdbarch->long_long_bit = long_long_bit; | |
1557 | } | |
1558 | ||
205c306f DM |
1559 | int |
1560 | gdbarch_long_long_align_bit (struct gdbarch *gdbarch) | |
1561 | { | |
1562 | gdb_assert (gdbarch != NULL); | |
1563 | /* Skip verify of long_long_align_bit, invalid_p == 0 */ | |
1564 | if (gdbarch_debug >= 2) | |
1565 | fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_align_bit called\n"); | |
1566 | return gdbarch->long_long_align_bit; | |
1567 | } | |
1568 | ||
1569 | void | |
1570 | set_gdbarch_long_long_align_bit (struct gdbarch *gdbarch, | |
1571 | int long_long_align_bit) | |
1572 | { | |
1573 | gdbarch->long_long_align_bit = long_long_align_bit; | |
1574 | } | |
1575 | ||
f9e9243a UW |
1576 | int |
1577 | gdbarch_half_bit (struct gdbarch *gdbarch) | |
1578 | { | |
1579 | gdb_assert (gdbarch != NULL); | |
1580 | /* Skip verify of half_bit, invalid_p == 0 */ | |
1581 | if (gdbarch_debug >= 2) | |
1582 | fprintf_unfiltered (gdb_stdlog, "gdbarch_half_bit called\n"); | |
1583 | return gdbarch->half_bit; | |
1584 | } | |
1585 | ||
1586 | void | |
1587 | set_gdbarch_half_bit (struct gdbarch *gdbarch, | |
1588 | int half_bit) | |
1589 | { | |
1590 | gdbarch->half_bit = half_bit; | |
1591 | } | |
1592 | ||
1593 | const struct floatformat ** | |
1594 | gdbarch_half_format (struct gdbarch *gdbarch) | |
1595 | { | |
1596 | gdb_assert (gdbarch != NULL); | |
1597 | if (gdbarch_debug >= 2) | |
1598 | fprintf_unfiltered (gdb_stdlog, "gdbarch_half_format called\n"); | |
1599 | return gdbarch->half_format; | |
1600 | } | |
1601 | ||
1602 | void | |
1603 | set_gdbarch_half_format (struct gdbarch *gdbarch, | |
1604 | const struct floatformat ** half_format) | |
1605 | { | |
1606 | gdbarch->half_format = half_format; | |
1607 | } | |
1608 | ||
0f71a2f6 | 1609 | int |
104c1213 | 1610 | gdbarch_float_bit (struct gdbarch *gdbarch) |
0f71a2f6 | 1611 | { |
8de9bdc4 | 1612 | gdb_assert (gdbarch != NULL); |
66b43ecb | 1613 | /* Skip verify of float_bit, invalid_p == 0 */ |
0f71a2f6 | 1614 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
1615 | fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n"); |
1616 | return gdbarch->float_bit; | |
1617 | } | |
1618 | ||
1619 | void | |
104c1213 JM |
1620 | set_gdbarch_float_bit (struct gdbarch *gdbarch, |
1621 | int float_bit) | |
0f71a2f6 JM |
1622 | { |
1623 | gdbarch->float_bit = float_bit; | |
1624 | } | |
1625 | ||
8da61cc4 | 1626 | const struct floatformat ** |
456fcf94 AC |
1627 | gdbarch_float_format (struct gdbarch *gdbarch) |
1628 | { | |
1629 | gdb_assert (gdbarch != NULL); | |
1630 | if (gdbarch_debug >= 2) | |
1631 | fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n"); | |
1632 | return gdbarch->float_format; | |
1633 | } | |
1634 | ||
1635 | void | |
1636 | set_gdbarch_float_format (struct gdbarch *gdbarch, | |
8da61cc4 | 1637 | const struct floatformat ** float_format) |
456fcf94 AC |
1638 | { |
1639 | gdbarch->float_format = float_format; | |
1640 | } | |
1641 | ||
0f71a2f6 | 1642 | int |
104c1213 | 1643 | gdbarch_double_bit (struct gdbarch *gdbarch) |
0f71a2f6 | 1644 | { |
8de9bdc4 | 1645 | gdb_assert (gdbarch != NULL); |
66b43ecb | 1646 | /* Skip verify of double_bit, invalid_p == 0 */ |
0f71a2f6 | 1647 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
1648 | fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n"); |
1649 | return gdbarch->double_bit; | |
1650 | } | |
1651 | ||
1652 | void | |
104c1213 JM |
1653 | set_gdbarch_double_bit (struct gdbarch *gdbarch, |
1654 | int double_bit) | |
0f71a2f6 JM |
1655 | { |
1656 | gdbarch->double_bit = double_bit; | |
1657 | } | |
1658 | ||
8da61cc4 | 1659 | const struct floatformat ** |
456fcf94 AC |
1660 | gdbarch_double_format (struct gdbarch *gdbarch) |
1661 | { | |
1662 | gdb_assert (gdbarch != NULL); | |
1663 | if (gdbarch_debug >= 2) | |
1664 | fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n"); | |
1665 | return gdbarch->double_format; | |
1666 | } | |
1667 | ||
1668 | void | |
1669 | set_gdbarch_double_format (struct gdbarch *gdbarch, | |
8da61cc4 | 1670 | const struct floatformat ** double_format) |
456fcf94 AC |
1671 | { |
1672 | gdbarch->double_format = double_format; | |
1673 | } | |
1674 | ||
0f71a2f6 | 1675 | int |
104c1213 | 1676 | gdbarch_long_double_bit (struct gdbarch *gdbarch) |
0f71a2f6 | 1677 | { |
8de9bdc4 | 1678 | gdb_assert (gdbarch != NULL); |
66b43ecb | 1679 | /* Skip verify of long_double_bit, invalid_p == 0 */ |
0f71a2f6 | 1680 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
1681 | fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n"); |
1682 | return gdbarch->long_double_bit; | |
1683 | } | |
1684 | ||
1685 | void | |
104c1213 JM |
1686 | set_gdbarch_long_double_bit (struct gdbarch *gdbarch, |
1687 | int long_double_bit) | |
0f71a2f6 JM |
1688 | { |
1689 | gdbarch->long_double_bit = long_double_bit; | |
1690 | } | |
1691 | ||
8da61cc4 | 1692 | const struct floatformat ** |
456fcf94 AC |
1693 | gdbarch_long_double_format (struct gdbarch *gdbarch) |
1694 | { | |
1695 | gdb_assert (gdbarch != NULL); | |
1696 | if (gdbarch_debug >= 2) | |
1697 | fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n"); | |
1698 | return gdbarch->long_double_format; | |
1699 | } | |
1700 | ||
1701 | void | |
1702 | set_gdbarch_long_double_format (struct gdbarch *gdbarch, | |
8da61cc4 | 1703 | const struct floatformat ** long_double_format) |
456fcf94 AC |
1704 | { |
1705 | gdbarch->long_double_format = long_double_format; | |
1706 | } | |
1707 | ||
66b43ecb AC |
1708 | int |
1709 | gdbarch_ptr_bit (struct gdbarch *gdbarch) | |
1710 | { | |
8de9bdc4 | 1711 | gdb_assert (gdbarch != NULL); |
66b43ecb AC |
1712 | /* Skip verify of ptr_bit, invalid_p == 0 */ |
1713 | if (gdbarch_debug >= 2) | |
1714 | fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n"); | |
1715 | return gdbarch->ptr_bit; | |
1716 | } | |
1717 | ||
1718 | void | |
1719 | set_gdbarch_ptr_bit (struct gdbarch *gdbarch, | |
1720 | int ptr_bit) | |
1721 | { | |
1722 | gdbarch->ptr_bit = ptr_bit; | |
1723 | } | |
1724 | ||
52204a0b DT |
1725 | int |
1726 | gdbarch_addr_bit (struct gdbarch *gdbarch) | |
1727 | { | |
8de9bdc4 | 1728 | gdb_assert (gdbarch != NULL); |
956ac328 AC |
1729 | /* Check variable changed from pre-default. */ |
1730 | gdb_assert (gdbarch->addr_bit != 0); | |
52204a0b DT |
1731 | if (gdbarch_debug >= 2) |
1732 | fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n"); | |
1733 | return gdbarch->addr_bit; | |
1734 | } | |
1735 | ||
1736 | void | |
1737 | set_gdbarch_addr_bit (struct gdbarch *gdbarch, | |
1738 | int addr_bit) | |
1739 | { | |
1740 | gdbarch->addr_bit = addr_bit; | |
1741 | } | |
1742 | ||
8da614df CV |
1743 | int |
1744 | gdbarch_dwarf2_addr_size (struct gdbarch *gdbarch) | |
1745 | { | |
1746 | gdb_assert (gdbarch != NULL); | |
1747 | /* Check variable changed from pre-default. */ | |
1748 | gdb_assert (gdbarch->dwarf2_addr_size != 0); | |
1749 | if (gdbarch_debug >= 2) | |
1750 | fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_addr_size called\n"); | |
1751 | return gdbarch->dwarf2_addr_size; | |
1752 | } | |
1753 | ||
1754 | void | |
1755 | set_gdbarch_dwarf2_addr_size (struct gdbarch *gdbarch, | |
1756 | int dwarf2_addr_size) | |
1757 | { | |
1758 | gdbarch->dwarf2_addr_size = dwarf2_addr_size; | |
1759 | } | |
1760 | ||
4e409299 JB |
1761 | int |
1762 | gdbarch_char_signed (struct gdbarch *gdbarch) | |
1763 | { | |
8de9bdc4 | 1764 | gdb_assert (gdbarch != NULL); |
956ac328 AC |
1765 | /* Check variable changed from pre-default. */ |
1766 | gdb_assert (gdbarch->char_signed != -1); | |
4e409299 JB |
1767 | if (gdbarch_debug >= 2) |
1768 | fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n"); | |
1769 | return gdbarch->char_signed; | |
1770 | } | |
1771 | ||
1772 | void | |
1773 | set_gdbarch_char_signed (struct gdbarch *gdbarch, | |
1774 | int char_signed) | |
1775 | { | |
1776 | gdbarch->char_signed = char_signed; | |
1777 | } | |
1778 | ||
cde9ea48 AC |
1779 | int |
1780 | gdbarch_read_pc_p (struct gdbarch *gdbarch) | |
1781 | { | |
1782 | gdb_assert (gdbarch != NULL); | |
956ac328 | 1783 | return gdbarch->read_pc != NULL; |
cde9ea48 AC |
1784 | } |
1785 | ||
0f71a2f6 | 1786 | CORE_ADDR |
61a1198a | 1787 | gdbarch_read_pc (struct gdbarch *gdbarch, struct regcache *regcache) |
0f71a2f6 | 1788 | { |
8de9bdc4 | 1789 | gdb_assert (gdbarch != NULL); |
956ac328 | 1790 | gdb_assert (gdbarch->read_pc != NULL); |
0f71a2f6 | 1791 | if (gdbarch_debug >= 2) |
0f71a2f6 | 1792 | fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n"); |
61a1198a | 1793 | return gdbarch->read_pc (regcache); |
0f71a2f6 JM |
1794 | } |
1795 | ||
1796 | void | |
104c1213 JM |
1797 | set_gdbarch_read_pc (struct gdbarch *gdbarch, |
1798 | gdbarch_read_pc_ftype read_pc) | |
0f71a2f6 JM |
1799 | { |
1800 | gdbarch->read_pc = read_pc; | |
1801 | } | |
1802 | ||
61a1198a UW |
1803 | int |
1804 | gdbarch_write_pc_p (struct gdbarch *gdbarch) | |
1805 | { | |
1806 | gdb_assert (gdbarch != NULL); | |
1807 | return gdbarch->write_pc != NULL; | |
1808 | } | |
1809 | ||
0f71a2f6 | 1810 | void |
61a1198a | 1811 | gdbarch_write_pc (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR val) |
0f71a2f6 | 1812 | { |
8de9bdc4 | 1813 | gdb_assert (gdbarch != NULL); |
956ac328 | 1814 | gdb_assert (gdbarch->write_pc != NULL); |
0f71a2f6 | 1815 | if (gdbarch_debug >= 2) |
0f71a2f6 | 1816 | fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n"); |
61a1198a | 1817 | gdbarch->write_pc (regcache, val); |
0f71a2f6 JM |
1818 | } |
1819 | ||
1820 | void | |
104c1213 JM |
1821 | set_gdbarch_write_pc (struct gdbarch *gdbarch, |
1822 | gdbarch_write_pc_ftype write_pc) | |
0f71a2f6 JM |
1823 | { |
1824 | gdbarch->write_pc = write_pc; | |
1825 | } | |
1826 | ||
39d4ef09 AC |
1827 | void |
1828 | gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset) | |
1829 | { | |
8de9bdc4 | 1830 | gdb_assert (gdbarch != NULL); |
956ac328 | 1831 | gdb_assert (gdbarch->virtual_frame_pointer != NULL); |
39d4ef09 AC |
1832 | if (gdbarch_debug >= 2) |
1833 | fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n"); | |
a54fba4c | 1834 | gdbarch->virtual_frame_pointer (gdbarch, pc, frame_regnum, frame_offset); |
39d4ef09 AC |
1835 | } |
1836 | ||
1837 | void | |
1838 | set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, | |
1839 | gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer) | |
1840 | { | |
1841 | gdbarch->virtual_frame_pointer = virtual_frame_pointer; | |
1842 | } | |
1843 | ||
61a0eb5b | 1844 | int |
d8124050 | 1845 | gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch) |
61a0eb5b | 1846 | { |
8de9bdc4 | 1847 | gdb_assert (gdbarch != NULL); |
956ac328 | 1848 | return gdbarch->pseudo_register_read != NULL; |
61a0eb5b AC |
1849 | } |
1850 | ||
05d1431c | 1851 | enum register_status |
b60c417a | 1852 | gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, gdb_byte *buf) |
61a0eb5b | 1853 | { |
8de9bdc4 | 1854 | gdb_assert (gdbarch != NULL); |
956ac328 | 1855 | gdb_assert (gdbarch->pseudo_register_read != NULL); |
61a0eb5b | 1856 | if (gdbarch_debug >= 2) |
d8124050 | 1857 | fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n"); |
05d1431c | 1858 | return gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf); |
61a0eb5b AC |
1859 | } |
1860 | ||
1861 | void | |
d8124050 AC |
1862 | set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch, |
1863 | gdbarch_pseudo_register_read_ftype pseudo_register_read) | |
61a0eb5b | 1864 | { |
d8124050 | 1865 | gdbarch->pseudo_register_read = pseudo_register_read; |
61a0eb5b AC |
1866 | } |
1867 | ||
3543a589 TT |
1868 | int |
1869 | gdbarch_pseudo_register_read_value_p (struct gdbarch *gdbarch) | |
1870 | { | |
1871 | gdb_assert (gdbarch != NULL); | |
1872 | return gdbarch->pseudo_register_read_value != NULL; | |
1873 | } | |
1874 | ||
1875 | struct value * | |
1876 | gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum) | |
1877 | { | |
1878 | gdb_assert (gdbarch != NULL); | |
1879 | gdb_assert (gdbarch->pseudo_register_read_value != NULL); | |
1880 | if (gdbarch_debug >= 2) | |
1881 | fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read_value called\n"); | |
1882 | return gdbarch->pseudo_register_read_value (gdbarch, regcache, cookednum); | |
1883 | } | |
1884 | ||
1885 | void | |
1886 | set_gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch, | |
1887 | gdbarch_pseudo_register_read_value_ftype pseudo_register_read_value) | |
1888 | { | |
1889 | gdbarch->pseudo_register_read_value = pseudo_register_read_value; | |
1890 | } | |
1891 | ||
61a0eb5b | 1892 | int |
d8124050 | 1893 | gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch) |
61a0eb5b | 1894 | { |
8de9bdc4 | 1895 | gdb_assert (gdbarch != NULL); |
956ac328 | 1896 | return gdbarch->pseudo_register_write != NULL; |
61a0eb5b AC |
1897 | } |
1898 | ||
1899 | void | |
b60c417a | 1900 | gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const gdb_byte *buf) |
61a0eb5b | 1901 | { |
8de9bdc4 | 1902 | gdb_assert (gdbarch != NULL); |
956ac328 | 1903 | gdb_assert (gdbarch->pseudo_register_write != NULL); |
61a0eb5b | 1904 | if (gdbarch_debug >= 2) |
d8124050 AC |
1905 | fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n"); |
1906 | gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf); | |
61a0eb5b AC |
1907 | } |
1908 | ||
1909 | void | |
d8124050 AC |
1910 | set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch, |
1911 | gdbarch_pseudo_register_write_ftype pseudo_register_write) | |
61a0eb5b | 1912 | { |
d8124050 | 1913 | gdbarch->pseudo_register_write = pseudo_register_write; |
61a0eb5b AC |
1914 | } |
1915 | ||
0f71a2f6 | 1916 | int |
104c1213 | 1917 | gdbarch_num_regs (struct gdbarch *gdbarch) |
0f71a2f6 | 1918 | { |
8de9bdc4 | 1919 | gdb_assert (gdbarch != NULL); |
956ac328 AC |
1920 | /* Check variable changed from pre-default. */ |
1921 | gdb_assert (gdbarch->num_regs != -1); | |
0f71a2f6 | 1922 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
1923 | fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n"); |
1924 | return gdbarch->num_regs; | |
1925 | } | |
1926 | ||
1927 | void | |
104c1213 JM |
1928 | set_gdbarch_num_regs (struct gdbarch *gdbarch, |
1929 | int num_regs) | |
0f71a2f6 JM |
1930 | { |
1931 | gdbarch->num_regs = num_regs; | |
1932 | } | |
1933 | ||
0aba1244 EZ |
1934 | int |
1935 | gdbarch_num_pseudo_regs (struct gdbarch *gdbarch) | |
1936 | { | |
8de9bdc4 | 1937 | gdb_assert (gdbarch != NULL); |
0aba1244 EZ |
1938 | /* Skip verify of num_pseudo_regs, invalid_p == 0 */ |
1939 | if (gdbarch_debug >= 2) | |
1940 | fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n"); | |
1941 | return gdbarch->num_pseudo_regs; | |
1942 | } | |
1943 | ||
1944 | void | |
1945 | set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch, | |
1946 | int num_pseudo_regs) | |
1947 | { | |
1948 | gdbarch->num_pseudo_regs = num_pseudo_regs; | |
1949 | } | |
1950 | ||
175ff332 HZ |
1951 | int |
1952 | gdbarch_ax_pseudo_register_collect_p (struct gdbarch *gdbarch) | |
1953 | { | |
1954 | gdb_assert (gdbarch != NULL); | |
1955 | return gdbarch->ax_pseudo_register_collect != NULL; | |
1956 | } | |
1957 | ||
1958 | int | |
1959 | gdbarch_ax_pseudo_register_collect (struct gdbarch *gdbarch, struct agent_expr *ax, int reg) | |
1960 | { | |
1961 | gdb_assert (gdbarch != NULL); | |
1962 | gdb_assert (gdbarch->ax_pseudo_register_collect != NULL); | |
1963 | if (gdbarch_debug >= 2) | |
1964 | fprintf_unfiltered (gdb_stdlog, "gdbarch_ax_pseudo_register_collect called\n"); | |
1965 | return gdbarch->ax_pseudo_register_collect (gdbarch, ax, reg); | |
1966 | } | |
1967 | ||
1968 | void | |
1969 | set_gdbarch_ax_pseudo_register_collect (struct gdbarch *gdbarch, | |
1970 | gdbarch_ax_pseudo_register_collect_ftype ax_pseudo_register_collect) | |
1971 | { | |
1972 | gdbarch->ax_pseudo_register_collect = ax_pseudo_register_collect; | |
1973 | } | |
1974 | ||
1975 | int | |
1976 | gdbarch_ax_pseudo_register_push_stack_p (struct gdbarch *gdbarch) | |
1977 | { | |
1978 | gdb_assert (gdbarch != NULL); | |
1979 | return gdbarch->ax_pseudo_register_push_stack != NULL; | |
1980 | } | |
1981 | ||
1982 | int | |
1983 | gdbarch_ax_pseudo_register_push_stack (struct gdbarch *gdbarch, struct agent_expr *ax, int reg) | |
1984 | { | |
1985 | gdb_assert (gdbarch != NULL); | |
1986 | gdb_assert (gdbarch->ax_pseudo_register_push_stack != NULL); | |
1987 | if (gdbarch_debug >= 2) | |
1988 | fprintf_unfiltered (gdb_stdlog, "gdbarch_ax_pseudo_register_push_stack called\n"); | |
1989 | return gdbarch->ax_pseudo_register_push_stack (gdbarch, ax, reg); | |
1990 | } | |
1991 | ||
1992 | void | |
1993 | set_gdbarch_ax_pseudo_register_push_stack (struct gdbarch *gdbarch, | |
1994 | gdbarch_ax_pseudo_register_push_stack_ftype ax_pseudo_register_push_stack) | |
1995 | { | |
1996 | gdbarch->ax_pseudo_register_push_stack = ax_pseudo_register_push_stack; | |
1997 | } | |
1998 | ||
0f71a2f6 | 1999 | int |
104c1213 | 2000 | gdbarch_sp_regnum (struct gdbarch *gdbarch) |
0f71a2f6 | 2001 | { |
8de9bdc4 | 2002 | gdb_assert (gdbarch != NULL); |
1200cd6e | 2003 | /* Skip verify of sp_regnum, invalid_p == 0 */ |
0f71a2f6 | 2004 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2005 | fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n"); |
2006 | return gdbarch->sp_regnum; | |
2007 | } | |
2008 | ||
2009 | void | |
104c1213 JM |
2010 | set_gdbarch_sp_regnum (struct gdbarch *gdbarch, |
2011 | int sp_regnum) | |
0f71a2f6 JM |
2012 | { |
2013 | gdbarch->sp_regnum = sp_regnum; | |
2014 | } | |
2015 | ||
0f71a2f6 | 2016 | int |
104c1213 | 2017 | gdbarch_pc_regnum (struct gdbarch *gdbarch) |
0f71a2f6 | 2018 | { |
8de9bdc4 | 2019 | gdb_assert (gdbarch != NULL); |
1200cd6e | 2020 | /* Skip verify of pc_regnum, invalid_p == 0 */ |
0f71a2f6 | 2021 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2022 | fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n"); |
2023 | return gdbarch->pc_regnum; | |
2024 | } | |
2025 | ||
2026 | void | |
104c1213 JM |
2027 | set_gdbarch_pc_regnum (struct gdbarch *gdbarch, |
2028 | int pc_regnum) | |
0f71a2f6 JM |
2029 | { |
2030 | gdbarch->pc_regnum = pc_regnum; | |
2031 | } | |
2032 | ||
c2169756 AC |
2033 | int |
2034 | gdbarch_ps_regnum (struct gdbarch *gdbarch) | |
2035 | { | |
8de9bdc4 | 2036 | gdb_assert (gdbarch != NULL); |
c2169756 AC |
2037 | /* Skip verify of ps_regnum, invalid_p == 0 */ |
2038 | if (gdbarch_debug >= 2) | |
2039 | fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n"); | |
2040 | return gdbarch->ps_regnum; | |
2041 | } | |
2042 | ||
2043 | void | |
2044 | set_gdbarch_ps_regnum (struct gdbarch *gdbarch, | |
2045 | int ps_regnum) | |
2046 | { | |
2047 | gdbarch->ps_regnum = ps_regnum; | |
2048 | } | |
2049 | ||
60054393 MS |
2050 | int |
2051 | gdbarch_fp0_regnum (struct gdbarch *gdbarch) | |
2052 | { | |
8de9bdc4 | 2053 | gdb_assert (gdbarch != NULL); |
60054393 MS |
2054 | /* Skip verify of fp0_regnum, invalid_p == 0 */ |
2055 | if (gdbarch_debug >= 2) | |
2056 | fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n"); | |
2057 | return gdbarch->fp0_regnum; | |
2058 | } | |
2059 | ||
2060 | void | |
2061 | set_gdbarch_fp0_regnum (struct gdbarch *gdbarch, | |
2062 | int fp0_regnum) | |
2063 | { | |
2064 | gdbarch->fp0_regnum = fp0_regnum; | |
2065 | } | |
2066 | ||
88c72b7d AC |
2067 | int |
2068 | gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr) | |
2069 | { | |
8de9bdc4 | 2070 | gdb_assert (gdbarch != NULL); |
956ac328 | 2071 | gdb_assert (gdbarch->stab_reg_to_regnum != NULL); |
88c72b7d AC |
2072 | if (gdbarch_debug >= 2) |
2073 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n"); | |
d3f73121 | 2074 | return gdbarch->stab_reg_to_regnum (gdbarch, stab_regnr); |
88c72b7d AC |
2075 | } |
2076 | ||
2077 | void | |
2078 | set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, | |
2079 | gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum) | |
2080 | { | |
2081 | gdbarch->stab_reg_to_regnum = stab_reg_to_regnum; | |
2082 | } | |
2083 | ||
2084 | int | |
2085 | gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr) | |
2086 | { | |
8de9bdc4 | 2087 | gdb_assert (gdbarch != NULL); |
956ac328 | 2088 | gdb_assert (gdbarch->ecoff_reg_to_regnum != NULL); |
88c72b7d AC |
2089 | if (gdbarch_debug >= 2) |
2090 | fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n"); | |
d3f73121 | 2091 | return gdbarch->ecoff_reg_to_regnum (gdbarch, ecoff_regnr); |
88c72b7d AC |
2092 | } |
2093 | ||
2094 | void | |
2095 | set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, | |
2096 | gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum) | |
2097 | { | |
2098 | gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum; | |
2099 | } | |
2100 | ||
88c72b7d AC |
2101 | int |
2102 | gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr) | |
2103 | { | |
8de9bdc4 | 2104 | gdb_assert (gdbarch != NULL); |
956ac328 | 2105 | gdb_assert (gdbarch->sdb_reg_to_regnum != NULL); |
88c72b7d AC |
2106 | if (gdbarch_debug >= 2) |
2107 | fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n"); | |
d3f73121 | 2108 | return gdbarch->sdb_reg_to_regnum (gdbarch, sdb_regnr); |
88c72b7d AC |
2109 | } |
2110 | ||
2111 | void | |
2112 | set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, | |
2113 | gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum) | |
2114 | { | |
2115 | gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum; | |
2116 | } | |
2117 | ||
2118 | int | |
2119 | gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr) | |
2120 | { | |
8de9bdc4 | 2121 | gdb_assert (gdbarch != NULL); |
956ac328 | 2122 | gdb_assert (gdbarch->dwarf2_reg_to_regnum != NULL); |
88c72b7d AC |
2123 | if (gdbarch_debug >= 2) |
2124 | fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n"); | |
d3f73121 | 2125 | return gdbarch->dwarf2_reg_to_regnum (gdbarch, dwarf2_regnr); |
88c72b7d AC |
2126 | } |
2127 | ||
2128 | void | |
2129 | set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, | |
2130 | gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum) | |
2131 | { | |
2132 | gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum; | |
2133 | } | |
2134 | ||
fa88f677 | 2135 | const char * |
0f71a2f6 JM |
2136 | gdbarch_register_name (struct gdbarch *gdbarch, int regnr) |
2137 | { | |
8de9bdc4 | 2138 | gdb_assert (gdbarch != NULL); |
956ac328 | 2139 | gdb_assert (gdbarch->register_name != NULL); |
0f71a2f6 | 2140 | if (gdbarch_debug >= 2) |
0f71a2f6 | 2141 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n"); |
d93859e2 | 2142 | return gdbarch->register_name (gdbarch, regnr); |
0f71a2f6 JM |
2143 | } |
2144 | ||
2145 | void | |
104c1213 JM |
2146 | set_gdbarch_register_name (struct gdbarch *gdbarch, |
2147 | gdbarch_register_name_ftype register_name) | |
0f71a2f6 JM |
2148 | { |
2149 | gdbarch->register_name = register_name; | |
2150 | } | |
2151 | ||
0f71a2f6 | 2152 | int |
9c04cab7 | 2153 | gdbarch_register_type_p (struct gdbarch *gdbarch) |
0f71a2f6 | 2154 | { |
8de9bdc4 | 2155 | gdb_assert (gdbarch != NULL); |
956ac328 | 2156 | return gdbarch->register_type != NULL; |
9c04cab7 AC |
2157 | } |
2158 | ||
2159 | struct type * | |
2160 | gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr) | |
2161 | { | |
2162 | gdb_assert (gdbarch != NULL); | |
956ac328 | 2163 | gdb_assert (gdbarch->register_type != NULL); |
0f71a2f6 | 2164 | if (gdbarch_debug >= 2) |
9c04cab7 AC |
2165 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n"); |
2166 | return gdbarch->register_type (gdbarch, reg_nr); | |
0f71a2f6 JM |
2167 | } |
2168 | ||
2169 | void | |
9c04cab7 AC |
2170 | set_gdbarch_register_type (struct gdbarch *gdbarch, |
2171 | gdbarch_register_type_ftype register_type) | |
0f71a2f6 | 2172 | { |
9c04cab7 | 2173 | gdbarch->register_type = register_type; |
0f71a2f6 JM |
2174 | } |
2175 | ||
f3be58bc | 2176 | int |
669fac23 | 2177 | gdbarch_dummy_id_p (struct gdbarch *gdbarch) |
f3be58bc AC |
2178 | { |
2179 | gdb_assert (gdbarch != NULL); | |
669fac23 | 2180 | return gdbarch->dummy_id != NULL; |
f3be58bc AC |
2181 | } |
2182 | ||
2183 | struct frame_id | |
669fac23 | 2184 | gdbarch_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame) |
f3be58bc AC |
2185 | { |
2186 | gdb_assert (gdbarch != NULL); | |
669fac23 | 2187 | gdb_assert (gdbarch->dummy_id != NULL); |
f3be58bc | 2188 | if (gdbarch_debug >= 2) |
669fac23 DJ |
2189 | fprintf_unfiltered (gdb_stdlog, "gdbarch_dummy_id called\n"); |
2190 | return gdbarch->dummy_id (gdbarch, this_frame); | |
f3be58bc AC |
2191 | } |
2192 | ||
2193 | void | |
669fac23 DJ |
2194 | set_gdbarch_dummy_id (struct gdbarch *gdbarch, |
2195 | gdbarch_dummy_id_ftype dummy_id) | |
f3be58bc | 2196 | { |
669fac23 | 2197 | gdbarch->dummy_id = dummy_id; |
f3be58bc AC |
2198 | } |
2199 | ||
f3be58bc AC |
2200 | int |
2201 | gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch) | |
2202 | { | |
2203 | gdb_assert (gdbarch != NULL); | |
2204 | /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */ | |
2205 | if (gdbarch_debug >= 2) | |
2206 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n"); | |
2207 | return gdbarch->deprecated_fp_regnum; | |
2208 | } | |
2209 | ||
2210 | void | |
2211 | set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch, | |
2212 | int deprecated_fp_regnum) | |
2213 | { | |
2214 | gdbarch->deprecated_fp_regnum = deprecated_fp_regnum; | |
2215 | } | |
2216 | ||
0ab7a791 | 2217 | int |
b8de8283 | 2218 | gdbarch_push_dummy_call_p (struct gdbarch *gdbarch) |
0ab7a791 AC |
2219 | { |
2220 | gdb_assert (gdbarch != NULL); | |
956ac328 | 2221 | return gdbarch->push_dummy_call != NULL; |
0ab7a791 AC |
2222 | } |
2223 | ||
b8de8283 | 2224 | CORE_ADDR |
7d9b040b | 2225 | gdbarch_push_dummy_call (struct gdbarch *gdbarch, struct value *function, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr) |
666e11c5 | 2226 | { |
8de9bdc4 | 2227 | gdb_assert (gdbarch != NULL); |
956ac328 | 2228 | gdb_assert (gdbarch->push_dummy_call != NULL); |
666e11c5 | 2229 | if (gdbarch_debug >= 2) |
b8de8283 | 2230 | fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n"); |
7d9b040b | 2231 | return gdbarch->push_dummy_call (gdbarch, function, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr); |
666e11c5 EZ |
2232 | } |
2233 | ||
2234 | void | |
b8de8283 AC |
2235 | set_gdbarch_push_dummy_call (struct gdbarch *gdbarch, |
2236 | gdbarch_push_dummy_call_ftype push_dummy_call) | |
666e11c5 | 2237 | { |
b8de8283 | 2238 | gdbarch->push_dummy_call = push_dummy_call; |
666e11c5 EZ |
2239 | } |
2240 | ||
2649061d | 2241 | int |
b8de8283 | 2242 | gdbarch_call_dummy_location (struct gdbarch *gdbarch) |
2649061d | 2243 | { |
8de9bdc4 | 2244 | gdb_assert (gdbarch != NULL); |
b8de8283 AC |
2245 | /* Skip verify of call_dummy_location, invalid_p == 0 */ |
2246 | if (gdbarch_debug >= 2) | |
2247 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n"); | |
2248 | return gdbarch->call_dummy_location; | |
2649061d AC |
2249 | } |
2250 | ||
b8de8283 AC |
2251 | void |
2252 | set_gdbarch_call_dummy_location (struct gdbarch *gdbarch, | |
2253 | int call_dummy_location) | |
2254 | { | |
2255 | gdbarch->call_dummy_location = call_dummy_location; | |
2256 | } | |
2257 | ||
0f71a2f6 | 2258 | int |
b8de8283 | 2259 | gdbarch_push_dummy_code_p (struct gdbarch *gdbarch) |
0f71a2f6 | 2260 | { |
8de9bdc4 | 2261 | gdb_assert (gdbarch != NULL); |
956ac328 | 2262 | return gdbarch->push_dummy_code != NULL; |
b8de8283 AC |
2263 | } |
2264 | ||
2265 | CORE_ADDR | |
82585c72 | 2266 | gdbarch_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp, CORE_ADDR funaddr, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr, struct regcache *regcache) |
b8de8283 AC |
2267 | { |
2268 | gdb_assert (gdbarch != NULL); | |
956ac328 | 2269 | gdb_assert (gdbarch->push_dummy_code != NULL); |
0f71a2f6 | 2270 | if (gdbarch_debug >= 2) |
b8de8283 | 2271 | fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n"); |
82585c72 | 2272 | return gdbarch->push_dummy_code (gdbarch, sp, funaddr, args, nargs, value_type, real_pc, bp_addr, regcache); |
0f71a2f6 JM |
2273 | } |
2274 | ||
2275 | void | |
b8de8283 AC |
2276 | set_gdbarch_push_dummy_code (struct gdbarch *gdbarch, |
2277 | gdbarch_push_dummy_code_ftype push_dummy_code) | |
0f71a2f6 | 2278 | { |
b8de8283 | 2279 | gdbarch->push_dummy_code = push_dummy_code; |
0f71a2f6 JM |
2280 | } |
2281 | ||
b8de8283 AC |
2282 | void |
2283 | gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all) | |
2284 | { | |
2285 | gdb_assert (gdbarch != NULL); | |
956ac328 | 2286 | gdb_assert (gdbarch->print_registers_info != NULL); |
b8de8283 AC |
2287 | if (gdbarch_debug >= 2) |
2288 | fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n"); | |
2289 | gdbarch->print_registers_info (gdbarch, file, frame, regnum, all); | |
2290 | } | |
2291 | ||
2292 | void | |
2293 | set_gdbarch_print_registers_info (struct gdbarch *gdbarch, | |
2294 | gdbarch_print_registers_info_ftype print_registers_info) | |
2295 | { | |
2296 | gdbarch->print_registers_info = print_registers_info; | |
0f71a2f6 JM |
2297 | } |
2298 | ||
0f71a2f6 | 2299 | int |
b8de8283 AC |
2300 | gdbarch_print_float_info_p (struct gdbarch *gdbarch) |
2301 | { | |
2302 | gdb_assert (gdbarch != NULL); | |
956ac328 | 2303 | return gdbarch->print_float_info != NULL; |
b8de8283 AC |
2304 | } |
2305 | ||
2306 | void | |
2307 | gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args) | |
0f71a2f6 | 2308 | { |
8de9bdc4 | 2309 | gdb_assert (gdbarch != NULL); |
956ac328 | 2310 | gdb_assert (gdbarch->print_float_info != NULL); |
0f71a2f6 | 2311 | if (gdbarch_debug >= 2) |
b8de8283 AC |
2312 | fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n"); |
2313 | gdbarch->print_float_info (gdbarch, file, frame, args); | |
0f71a2f6 JM |
2314 | } |
2315 | ||
2316 | void | |
b8de8283 AC |
2317 | set_gdbarch_print_float_info (struct gdbarch *gdbarch, |
2318 | gdbarch_print_float_info_ftype print_float_info) | |
0f71a2f6 | 2319 | { |
b8de8283 AC |
2320 | gdbarch->print_float_info = print_float_info; |
2321 | } | |
2322 | ||
2323 | int | |
2324 | gdbarch_print_vector_info_p (struct gdbarch *gdbarch) | |
2325 | { | |
2326 | gdb_assert (gdbarch != NULL); | |
956ac328 | 2327 | return gdbarch->print_vector_info != NULL; |
b8de8283 AC |
2328 | } |
2329 | ||
2330 | void | |
2331 | gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args) | |
2332 | { | |
2333 | gdb_assert (gdbarch != NULL); | |
956ac328 | 2334 | gdb_assert (gdbarch->print_vector_info != NULL); |
b8de8283 AC |
2335 | if (gdbarch_debug >= 2) |
2336 | fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n"); | |
2337 | gdbarch->print_vector_info (gdbarch, file, frame, args); | |
0f71a2f6 JM |
2338 | } |
2339 | ||
b8de8283 AC |
2340 | void |
2341 | set_gdbarch_print_vector_info (struct gdbarch *gdbarch, | |
2342 | gdbarch_print_vector_info_ftype print_vector_info) | |
ae45cd16 | 2343 | { |
b8de8283 | 2344 | gdbarch->print_vector_info = print_vector_info; |
ae45cd16 AC |
2345 | } |
2346 | ||
2347 | int | |
b8de8283 | 2348 | gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr) |
0f71a2f6 | 2349 | { |
8de9bdc4 | 2350 | gdb_assert (gdbarch != NULL); |
956ac328 | 2351 | gdb_assert (gdbarch->register_sim_regno != NULL); |
0f71a2f6 | 2352 | if (gdbarch_debug >= 2) |
b8de8283 | 2353 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n"); |
e7faf938 | 2354 | return gdbarch->register_sim_regno (gdbarch, reg_nr); |
0f71a2f6 JM |
2355 | } |
2356 | ||
2357 | void | |
b8de8283 AC |
2358 | set_gdbarch_register_sim_regno (struct gdbarch *gdbarch, |
2359 | gdbarch_register_sim_regno_ftype register_sim_regno) | |
0f71a2f6 | 2360 | { |
b8de8283 | 2361 | gdbarch->register_sim_regno = register_sim_regno; |
0f71a2f6 JM |
2362 | } |
2363 | ||
0f71a2f6 | 2364 | int |
b8de8283 | 2365 | gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum) |
0f71a2f6 | 2366 | { |
8de9bdc4 | 2367 | gdb_assert (gdbarch != NULL); |
956ac328 | 2368 | gdb_assert (gdbarch->cannot_fetch_register != NULL); |
b8de8283 AC |
2369 | if (gdbarch_debug >= 2) |
2370 | fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n"); | |
64a3914f | 2371 | return gdbarch->cannot_fetch_register (gdbarch, regnum); |
b8de8283 AC |
2372 | } |
2373 | ||
2374 | void | |
2375 | set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, | |
2376 | gdbarch_cannot_fetch_register_ftype cannot_fetch_register) | |
2377 | { | |
2378 | gdbarch->cannot_fetch_register = cannot_fetch_register; | |
0f71a2f6 JM |
2379 | } |
2380 | ||
2381 | int | |
b8de8283 | 2382 | gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum) |
0f71a2f6 | 2383 | { |
8de9bdc4 | 2384 | gdb_assert (gdbarch != NULL); |
956ac328 | 2385 | gdb_assert (gdbarch->cannot_store_register != NULL); |
0f71a2f6 | 2386 | if (gdbarch_debug >= 2) |
b8de8283 | 2387 | fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n"); |
64a3914f | 2388 | return gdbarch->cannot_store_register (gdbarch, regnum); |
0f71a2f6 JM |
2389 | } |
2390 | ||
2391 | void | |
b8de8283 AC |
2392 | set_gdbarch_cannot_store_register (struct gdbarch *gdbarch, |
2393 | gdbarch_cannot_store_register_ftype cannot_store_register) | |
0f71a2f6 | 2394 | { |
b8de8283 | 2395 | gdbarch->cannot_store_register = cannot_store_register; |
0f71a2f6 JM |
2396 | } |
2397 | ||
e8ab51f7 | 2398 | int |
b8de8283 | 2399 | gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch) |
e8ab51f7 AC |
2400 | { |
2401 | gdb_assert (gdbarch != NULL); | |
956ac328 | 2402 | return gdbarch->get_longjmp_target != NULL; |
e8ab51f7 AC |
2403 | } |
2404 | ||
b8de8283 | 2405 | int |
60ade65d | 2406 | gdbarch_get_longjmp_target (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR *pc) |
0f71a2f6 | 2407 | { |
8de9bdc4 | 2408 | gdb_assert (gdbarch != NULL); |
956ac328 | 2409 | gdb_assert (gdbarch->get_longjmp_target != NULL); |
0f71a2f6 | 2410 | if (gdbarch_debug >= 2) |
b8de8283 | 2411 | fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n"); |
60ade65d | 2412 | return gdbarch->get_longjmp_target (frame, pc); |
0f71a2f6 JM |
2413 | } |
2414 | ||
2415 | void | |
b8de8283 AC |
2416 | set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch, |
2417 | gdbarch_get_longjmp_target_ftype get_longjmp_target) | |
0f71a2f6 | 2418 | { |
b8de8283 | 2419 | gdbarch->get_longjmp_target = get_longjmp_target; |
0f71a2f6 JM |
2420 | } |
2421 | ||
2422 | int | |
104c1213 | 2423 | gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch) |
0f71a2f6 | 2424 | { |
8de9bdc4 | 2425 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 2426 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2427 | fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n"); |
2428 | return gdbarch->believe_pcc_promotion; | |
2429 | } | |
2430 | ||
2431 | void | |
104c1213 JM |
2432 | set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch, |
2433 | int believe_pcc_promotion) | |
0f71a2f6 JM |
2434 | { |
2435 | gdbarch->believe_pcc_promotion = believe_pcc_promotion; | |
2436 | } | |
2437 | ||
13d01224 | 2438 | int |
ff2e87ac | 2439 | gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type) |
13d01224 AC |
2440 | { |
2441 | gdb_assert (gdbarch != NULL); | |
956ac328 | 2442 | gdb_assert (gdbarch->convert_register_p != NULL); |
13d01224 AC |
2443 | if (gdbarch_debug >= 2) |
2444 | fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n"); | |
0abe36f5 | 2445 | return gdbarch->convert_register_p (gdbarch, regnum, type); |
13d01224 AC |
2446 | } |
2447 | ||
2448 | void | |
2449 | set_gdbarch_convert_register_p (struct gdbarch *gdbarch, | |
2450 | gdbarch_convert_register_p_ftype convert_register_p) | |
2451 | { | |
2452 | gdbarch->convert_register_p = convert_register_p; | |
2453 | } | |
2454 | ||
8dccd430 PA |
2455 | int |
2456 | gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, gdb_byte *buf, int *optimizedp, int *unavailablep) | |
13d01224 AC |
2457 | { |
2458 | gdb_assert (gdbarch != NULL); | |
956ac328 | 2459 | gdb_assert (gdbarch->register_to_value != NULL); |
13d01224 AC |
2460 | if (gdbarch_debug >= 2) |
2461 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n"); | |
8dccd430 | 2462 | return gdbarch->register_to_value (frame, regnum, type, buf, optimizedp, unavailablep); |
13d01224 AC |
2463 | } |
2464 | ||
2465 | void | |
2466 | set_gdbarch_register_to_value (struct gdbarch *gdbarch, | |
2467 | gdbarch_register_to_value_ftype register_to_value) | |
2468 | { | |
2469 | gdbarch->register_to_value = register_to_value; | |
2470 | } | |
2471 | ||
2472 | void | |
b60c417a | 2473 | gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const gdb_byte *buf) |
13d01224 AC |
2474 | { |
2475 | gdb_assert (gdbarch != NULL); | |
956ac328 | 2476 | gdb_assert (gdbarch->value_to_register != NULL); |
13d01224 AC |
2477 | if (gdbarch_debug >= 2) |
2478 | fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n"); | |
ff2e87ac | 2479 | gdbarch->value_to_register (frame, regnum, type, buf); |
13d01224 AC |
2480 | } |
2481 | ||
2482 | void | |
2483 | set_gdbarch_value_to_register (struct gdbarch *gdbarch, | |
2484 | gdbarch_value_to_register_ftype value_to_register) | |
2485 | { | |
2486 | gdbarch->value_to_register = value_to_register; | |
2487 | } | |
2488 | ||
9acbedc0 UW |
2489 | struct value * |
2490 | gdbarch_value_from_register (struct gdbarch *gdbarch, struct type *type, int regnum, struct frame_info *frame) | |
2491 | { | |
2492 | gdb_assert (gdbarch != NULL); | |
2493 | gdb_assert (gdbarch->value_from_register != NULL); | |
2494 | if (gdbarch_debug >= 2) | |
2495 | fprintf_unfiltered (gdb_stdlog, "gdbarch_value_from_register called\n"); | |
2496 | return gdbarch->value_from_register (type, regnum, frame); | |
2497 | } | |
2498 | ||
2499 | void | |
2500 | set_gdbarch_value_from_register (struct gdbarch *gdbarch, | |
2501 | gdbarch_value_from_register_ftype value_from_register) | |
2502 | { | |
2503 | gdbarch->value_from_register = value_from_register; | |
2504 | } | |
2505 | ||
4478b372 | 2506 | CORE_ADDR |
b60c417a | 2507 | gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf) |
4478b372 | 2508 | { |
8de9bdc4 | 2509 | gdb_assert (gdbarch != NULL); |
956ac328 | 2510 | gdb_assert (gdbarch->pointer_to_address != NULL); |
4478b372 JB |
2511 | if (gdbarch_debug >= 2) |
2512 | fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n"); | |
9898f801 | 2513 | return gdbarch->pointer_to_address (gdbarch, type, buf); |
4478b372 JB |
2514 | } |
2515 | ||
2516 | void | |
2517 | set_gdbarch_pointer_to_address (struct gdbarch *gdbarch, | |
2518 | gdbarch_pointer_to_address_ftype pointer_to_address) | |
2519 | { | |
2520 | gdbarch->pointer_to_address = pointer_to_address; | |
2521 | } | |
2522 | ||
2523 | void | |
b60c417a | 2524 | gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, gdb_byte *buf, CORE_ADDR addr) |
4478b372 | 2525 | { |
8de9bdc4 | 2526 | gdb_assert (gdbarch != NULL); |
956ac328 | 2527 | gdb_assert (gdbarch->address_to_pointer != NULL); |
4478b372 JB |
2528 | if (gdbarch_debug >= 2) |
2529 | fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n"); | |
9898f801 | 2530 | gdbarch->address_to_pointer (gdbarch, type, buf, addr); |
4478b372 JB |
2531 | } |
2532 | ||
2533 | void | |
2534 | set_gdbarch_address_to_pointer (struct gdbarch *gdbarch, | |
2535 | gdbarch_address_to_pointer_ftype address_to_pointer) | |
2536 | { | |
2537 | gdbarch->address_to_pointer = address_to_pointer; | |
2538 | } | |
2539 | ||
fc0c74b1 AC |
2540 | int |
2541 | gdbarch_integer_to_address_p (struct gdbarch *gdbarch) | |
2542 | { | |
8de9bdc4 | 2543 | gdb_assert (gdbarch != NULL); |
956ac328 | 2544 | return gdbarch->integer_to_address != NULL; |
fc0c74b1 AC |
2545 | } |
2546 | ||
2547 | CORE_ADDR | |
fc1a4b47 | 2548 | gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf) |
fc0c74b1 | 2549 | { |
8de9bdc4 | 2550 | gdb_assert (gdbarch != NULL); |
956ac328 | 2551 | gdb_assert (gdbarch->integer_to_address != NULL); |
fc0c74b1 AC |
2552 | if (gdbarch_debug >= 2) |
2553 | fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n"); | |
79dd2d24 | 2554 | return gdbarch->integer_to_address (gdbarch, type, buf); |
fc0c74b1 AC |
2555 | } |
2556 | ||
2557 | void | |
2558 | set_gdbarch_integer_to_address (struct gdbarch *gdbarch, | |
2559 | gdbarch_integer_to_address_ftype integer_to_address) | |
2560 | { | |
2561 | gdbarch->integer_to_address = integer_to_address; | |
2562 | } | |
2563 | ||
92ad9cd9 AC |
2564 | int |
2565 | gdbarch_return_value_p (struct gdbarch *gdbarch) | |
2566 | { | |
2567 | gdb_assert (gdbarch != NULL); | |
c1874924 | 2568 | return gdbarch->return_value != NULL; |
92ad9cd9 AC |
2569 | } |
2570 | ||
2571 | enum return_value_convention | |
6a3a010b | 2572 | gdbarch_return_value (struct gdbarch *gdbarch, struct value *function, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf) |
92ad9cd9 AC |
2573 | { |
2574 | gdb_assert (gdbarch != NULL); | |
2575 | gdb_assert (gdbarch->return_value != NULL); | |
2576 | if (gdbarch_debug >= 2) | |
2577 | fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value called\n"); | |
6a3a010b | 2578 | return gdbarch->return_value (gdbarch, function, valtype, regcache, readbuf, writebuf); |
92ad9cd9 AC |
2579 | } |
2580 | ||
2581 | void | |
2582 | set_gdbarch_return_value (struct gdbarch *gdbarch, | |
2583 | gdbarch_return_value_ftype return_value) | |
2584 | { | |
2585 | gdbarch->return_value = return_value; | |
2586 | } | |
2587 | ||
18648a37 YQ |
2588 | int |
2589 | gdbarch_return_in_first_hidden_param_p (struct gdbarch *gdbarch, struct type *type) | |
2590 | { | |
2591 | gdb_assert (gdbarch != NULL); | |
2592 | gdb_assert (gdbarch->return_in_first_hidden_param_p != NULL); | |
2593 | if (gdbarch_debug >= 2) | |
2594 | fprintf_unfiltered (gdb_stdlog, "gdbarch_return_in_first_hidden_param_p called\n"); | |
2595 | return gdbarch->return_in_first_hidden_param_p (gdbarch, type); | |
2596 | } | |
2597 | ||
2598 | void | |
2599 | set_gdbarch_return_in_first_hidden_param_p (struct gdbarch *gdbarch, | |
2600 | gdbarch_return_in_first_hidden_param_p_ftype return_in_first_hidden_param_p) | |
2601 | { | |
2602 | gdbarch->return_in_first_hidden_param_p = return_in_first_hidden_param_p; | |
2603 | } | |
2604 | ||
0f71a2f6 JM |
2605 | CORE_ADDR |
2606 | gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip) | |
2607 | { | |
8de9bdc4 | 2608 | gdb_assert (gdbarch != NULL); |
956ac328 | 2609 | gdb_assert (gdbarch->skip_prologue != NULL); |
0f71a2f6 | 2610 | if (gdbarch_debug >= 2) |
0f71a2f6 | 2611 | fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n"); |
6093d2eb | 2612 | return gdbarch->skip_prologue (gdbarch, ip); |
0f71a2f6 JM |
2613 | } |
2614 | ||
2615 | void | |
104c1213 JM |
2616 | set_gdbarch_skip_prologue (struct gdbarch *gdbarch, |
2617 | gdbarch_skip_prologue_ftype skip_prologue) | |
0f71a2f6 JM |
2618 | { |
2619 | gdbarch->skip_prologue = skip_prologue; | |
2620 | } | |
2621 | ||
4309257c PM |
2622 | int |
2623 | gdbarch_skip_main_prologue_p (struct gdbarch *gdbarch) | |
2624 | { | |
2625 | gdb_assert (gdbarch != NULL); | |
2626 | return gdbarch->skip_main_prologue != NULL; | |
2627 | } | |
2628 | ||
2629 | CORE_ADDR | |
2630 | gdbarch_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR ip) | |
2631 | { | |
2632 | gdb_assert (gdbarch != NULL); | |
2633 | gdb_assert (gdbarch->skip_main_prologue != NULL); | |
2634 | if (gdbarch_debug >= 2) | |
2635 | fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_main_prologue called\n"); | |
2636 | return gdbarch->skip_main_prologue (gdbarch, ip); | |
2637 | } | |
2638 | ||
2639 | void | |
2640 | set_gdbarch_skip_main_prologue (struct gdbarch *gdbarch, | |
cfd8ab24 | 2641 | gdbarch_skip_main_prologue_ftype skip_main_prologue) |
4309257c PM |
2642 | { |
2643 | gdbarch->skip_main_prologue = skip_main_prologue; | |
2644 | } | |
2645 | ||
0f71a2f6 JM |
2646 | int |
2647 | gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs) | |
2648 | { | |
8de9bdc4 | 2649 | gdb_assert (gdbarch != NULL); |
956ac328 | 2650 | gdb_assert (gdbarch->inner_than != NULL); |
0f71a2f6 | 2651 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2652 | fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n"); |
2653 | return gdbarch->inner_than (lhs, rhs); | |
2654 | } | |
2655 | ||
2656 | void | |
104c1213 JM |
2657 | set_gdbarch_inner_than (struct gdbarch *gdbarch, |
2658 | gdbarch_inner_than_ftype inner_than) | |
0f71a2f6 JM |
2659 | { |
2660 | gdbarch->inner_than = inner_than; | |
2661 | } | |
2662 | ||
fc1a4b47 | 2663 | const gdb_byte * |
adf40b2e | 2664 | gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr) |
0f71a2f6 | 2665 | { |
8de9bdc4 | 2666 | gdb_assert (gdbarch != NULL); |
956ac328 | 2667 | gdb_assert (gdbarch->breakpoint_from_pc != NULL); |
0f71a2f6 | 2668 | if (gdbarch_debug >= 2) |
0f71a2f6 | 2669 | fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n"); |
67d57894 | 2670 | return gdbarch->breakpoint_from_pc (gdbarch, pcptr, lenptr); |
0f71a2f6 JM |
2671 | } |
2672 | ||
2673 | void | |
104c1213 JM |
2674 | set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, |
2675 | gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc) | |
0f71a2f6 JM |
2676 | { |
2677 | gdbarch->breakpoint_from_pc = breakpoint_from_pc; | |
2678 | } | |
2679 | ||
a1dcb23a DJ |
2680 | void |
2681 | gdbarch_remote_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *kindptr) | |
2682 | { | |
2683 | gdb_assert (gdbarch != NULL); | |
2684 | gdb_assert (gdbarch->remote_breakpoint_from_pc != NULL); | |
2685 | if (gdbarch_debug >= 2) | |
2686 | fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_breakpoint_from_pc called\n"); | |
2687 | gdbarch->remote_breakpoint_from_pc (gdbarch, pcptr, kindptr); | |
2688 | } | |
2689 | ||
2690 | void | |
2691 | set_gdbarch_remote_breakpoint_from_pc (struct gdbarch *gdbarch, | |
2692 | gdbarch_remote_breakpoint_from_pc_ftype remote_breakpoint_from_pc) | |
2693 | { | |
2694 | gdbarch->remote_breakpoint_from_pc = remote_breakpoint_from_pc; | |
2695 | } | |
2696 | ||
a1131521 KB |
2697 | int |
2698 | gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch) | |
2699 | { | |
2700 | gdb_assert (gdbarch != NULL); | |
2701 | return gdbarch->adjust_breakpoint_address != NULL; | |
2702 | } | |
2703 | ||
2704 | CORE_ADDR | |
2705 | gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr) | |
2706 | { | |
2707 | gdb_assert (gdbarch != NULL); | |
2708 | gdb_assert (gdbarch->adjust_breakpoint_address != NULL); | |
2709 | if (gdbarch_debug >= 2) | |
2710 | fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_breakpoint_address called\n"); | |
2711 | return gdbarch->adjust_breakpoint_address (gdbarch, bpaddr); | |
2712 | } | |
2713 | ||
2714 | void | |
2715 | set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, | |
2716 | gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address) | |
2717 | { | |
2718 | gdbarch->adjust_breakpoint_address = adjust_breakpoint_address; | |
2719 | } | |
2720 | ||
917317f4 | 2721 | int |
8181d85f | 2722 | gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt) |
917317f4 | 2723 | { |
8de9bdc4 | 2724 | gdb_assert (gdbarch != NULL); |
956ac328 | 2725 | gdb_assert (gdbarch->memory_insert_breakpoint != NULL); |
917317f4 | 2726 | if (gdbarch_debug >= 2) |
917317f4 | 2727 | fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n"); |
ae4b2284 | 2728 | return gdbarch->memory_insert_breakpoint (gdbarch, bp_tgt); |
917317f4 JM |
2729 | } |
2730 | ||
2731 | void | |
2732 | set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, | |
2733 | gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint) | |
2734 | { | |
2735 | gdbarch->memory_insert_breakpoint = memory_insert_breakpoint; | |
2736 | } | |
2737 | ||
2738 | int | |
8181d85f | 2739 | gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt) |
917317f4 | 2740 | { |
8de9bdc4 | 2741 | gdb_assert (gdbarch != NULL); |
956ac328 | 2742 | gdb_assert (gdbarch->memory_remove_breakpoint != NULL); |
917317f4 | 2743 | if (gdbarch_debug >= 2) |
917317f4 | 2744 | fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n"); |
ae4b2284 | 2745 | return gdbarch->memory_remove_breakpoint (gdbarch, bp_tgt); |
917317f4 JM |
2746 | } |
2747 | ||
2748 | void | |
2749 | set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, | |
2750 | gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint) | |
2751 | { | |
2752 | gdbarch->memory_remove_breakpoint = memory_remove_breakpoint; | |
2753 | } | |
2754 | ||
0f71a2f6 | 2755 | CORE_ADDR |
104c1213 | 2756 | gdbarch_decr_pc_after_break (struct gdbarch *gdbarch) |
0f71a2f6 | 2757 | { |
8de9bdc4 | 2758 | gdb_assert (gdbarch != NULL); |
71bd6bd4 | 2759 | /* Skip verify of decr_pc_after_break, invalid_p == 0 */ |
0f71a2f6 | 2760 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2761 | fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n"); |
2762 | return gdbarch->decr_pc_after_break; | |
2763 | } | |
2764 | ||
2765 | void | |
104c1213 JM |
2766 | set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch, |
2767 | CORE_ADDR decr_pc_after_break) | |
0f71a2f6 JM |
2768 | { |
2769 | gdbarch->decr_pc_after_break = decr_pc_after_break; | |
2770 | } | |
2771 | ||
2772 | CORE_ADDR | |
782263ab | 2773 | gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch) |
0f71a2f6 | 2774 | { |
8de9bdc4 | 2775 | gdb_assert (gdbarch != NULL); |
782263ab | 2776 | /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */ |
0f71a2f6 | 2777 | if (gdbarch_debug >= 2) |
782263ab AC |
2778 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_function_start_offset called\n"); |
2779 | return gdbarch->deprecated_function_start_offset; | |
0f71a2f6 JM |
2780 | } |
2781 | ||
2782 | void | |
782263ab AC |
2783 | set_gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch, |
2784 | CORE_ADDR deprecated_function_start_offset) | |
0f71a2f6 | 2785 | { |
782263ab | 2786 | gdbarch->deprecated_function_start_offset = deprecated_function_start_offset; |
0f71a2f6 JM |
2787 | } |
2788 | ||
123dc839 DJ |
2789 | int |
2790 | gdbarch_remote_register_number (struct gdbarch *gdbarch, int regno) | |
2791 | { | |
2792 | gdb_assert (gdbarch != NULL); | |
2793 | gdb_assert (gdbarch->remote_register_number != NULL); | |
2794 | if (gdbarch_debug >= 2) | |
2795 | fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_register_number called\n"); | |
2796 | return gdbarch->remote_register_number (gdbarch, regno); | |
2797 | } | |
2798 | ||
2799 | void | |
2800 | set_gdbarch_remote_register_number (struct gdbarch *gdbarch, | |
2801 | gdbarch_remote_register_number_ftype remote_register_number) | |
2802 | { | |
2803 | gdbarch->remote_register_number = remote_register_number; | |
2804 | } | |
2805 | ||
b2756930 KB |
2806 | int |
2807 | gdbarch_fetch_tls_load_module_address_p (struct gdbarch *gdbarch) | |
2808 | { | |
2809 | gdb_assert (gdbarch != NULL); | |
2810 | return gdbarch->fetch_tls_load_module_address != NULL; | |
2811 | } | |
2812 | ||
2813 | CORE_ADDR | |
2814 | gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch, struct objfile *objfile) | |
2815 | { | |
2816 | gdb_assert (gdbarch != NULL); | |
2817 | gdb_assert (gdbarch->fetch_tls_load_module_address != NULL); | |
2818 | if (gdbarch_debug >= 2) | |
2819 | fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_tls_load_module_address called\n"); | |
2820 | return gdbarch->fetch_tls_load_module_address (objfile); | |
2821 | } | |
2822 | ||
2823 | void | |
2824 | set_gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch, | |
2825 | gdbarch_fetch_tls_load_module_address_ftype fetch_tls_load_module_address) | |
2826 | { | |
2827 | gdbarch->fetch_tls_load_module_address = fetch_tls_load_module_address; | |
2828 | } | |
2829 | ||
0f71a2f6 | 2830 | CORE_ADDR |
104c1213 | 2831 | gdbarch_frame_args_skip (struct gdbarch *gdbarch) |
0f71a2f6 | 2832 | { |
8de9bdc4 | 2833 | gdb_assert (gdbarch != NULL); |
5867a2fb | 2834 | /* Skip verify of frame_args_skip, invalid_p == 0 */ |
0f71a2f6 | 2835 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2836 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n"); |
2837 | return gdbarch->frame_args_skip; | |
2838 | } | |
2839 | ||
2840 | void | |
104c1213 JM |
2841 | set_gdbarch_frame_args_skip (struct gdbarch *gdbarch, |
2842 | CORE_ADDR frame_args_skip) | |
0f71a2f6 JM |
2843 | { |
2844 | gdbarch->frame_args_skip = frame_args_skip; | |
2845 | } | |
2846 | ||
12cc2063 AC |
2847 | int |
2848 | gdbarch_unwind_pc_p (struct gdbarch *gdbarch) | |
2849 | { | |
2850 | gdb_assert (gdbarch != NULL); | |
956ac328 | 2851 | return gdbarch->unwind_pc != NULL; |
12cc2063 AC |
2852 | } |
2853 | ||
2854 | CORE_ADDR | |
2855 | gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) | |
2856 | { | |
2857 | gdb_assert (gdbarch != NULL); | |
956ac328 | 2858 | gdb_assert (gdbarch->unwind_pc != NULL); |
12cc2063 AC |
2859 | if (gdbarch_debug >= 2) |
2860 | fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n"); | |
2861 | return gdbarch->unwind_pc (gdbarch, next_frame); | |
2862 | } | |
2863 | ||
2864 | void | |
2865 | set_gdbarch_unwind_pc (struct gdbarch *gdbarch, | |
2866 | gdbarch_unwind_pc_ftype unwind_pc) | |
2867 | { | |
2868 | gdbarch->unwind_pc = unwind_pc; | |
2869 | } | |
2870 | ||
a9e5fdc2 AC |
2871 | int |
2872 | gdbarch_unwind_sp_p (struct gdbarch *gdbarch) | |
2873 | { | |
2874 | gdb_assert (gdbarch != NULL); | |
956ac328 | 2875 | return gdbarch->unwind_sp != NULL; |
a9e5fdc2 AC |
2876 | } |
2877 | ||
2878 | CORE_ADDR | |
2879 | gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame) | |
2880 | { | |
2881 | gdb_assert (gdbarch != NULL); | |
956ac328 | 2882 | gdb_assert (gdbarch->unwind_sp != NULL); |
a9e5fdc2 AC |
2883 | if (gdbarch_debug >= 2) |
2884 | fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_sp called\n"); | |
2885 | return gdbarch->unwind_sp (gdbarch, next_frame); | |
2886 | } | |
2887 | ||
2888 | void | |
2889 | set_gdbarch_unwind_sp (struct gdbarch *gdbarch, | |
2890 | gdbarch_unwind_sp_ftype unwind_sp) | |
2891 | { | |
2892 | gdbarch->unwind_sp = unwind_sp; | |
2893 | } | |
2894 | ||
983a287a AC |
2895 | int |
2896 | gdbarch_frame_num_args_p (struct gdbarch *gdbarch) | |
2897 | { | |
2898 | gdb_assert (gdbarch != NULL); | |
956ac328 | 2899 | return gdbarch->frame_num_args != NULL; |
983a287a AC |
2900 | } |
2901 | ||
0f71a2f6 JM |
2902 | int |
2903 | gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame) | |
2904 | { | |
8de9bdc4 | 2905 | gdb_assert (gdbarch != NULL); |
956ac328 | 2906 | gdb_assert (gdbarch->frame_num_args != NULL); |
0f71a2f6 | 2907 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2908 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n"); |
2909 | return gdbarch->frame_num_args (frame); | |
2910 | } | |
2911 | ||
2912 | void | |
104c1213 JM |
2913 | set_gdbarch_frame_num_args (struct gdbarch *gdbarch, |
2914 | gdbarch_frame_num_args_ftype frame_num_args) | |
0f71a2f6 JM |
2915 | { |
2916 | gdbarch->frame_num_args = frame_num_args; | |
2917 | } | |
2918 | ||
dc604539 AC |
2919 | int |
2920 | gdbarch_frame_align_p (struct gdbarch *gdbarch) | |
2921 | { | |
2922 | gdb_assert (gdbarch != NULL); | |
956ac328 | 2923 | return gdbarch->frame_align != NULL; |
dc604539 AC |
2924 | } |
2925 | ||
2926 | CORE_ADDR | |
2927 | gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address) | |
2928 | { | |
2929 | gdb_assert (gdbarch != NULL); | |
956ac328 | 2930 | gdb_assert (gdbarch->frame_align != NULL); |
dc604539 AC |
2931 | if (gdbarch_debug >= 2) |
2932 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n"); | |
2933 | return gdbarch->frame_align (gdbarch, address); | |
2934 | } | |
2935 | ||
2936 | void | |
2937 | set_gdbarch_frame_align (struct gdbarch *gdbarch, | |
2938 | gdbarch_frame_align_ftype frame_align) | |
2939 | { | |
2940 | gdbarch->frame_align = frame_align; | |
2941 | } | |
2942 | ||
192cb3d4 MK |
2943 | int |
2944 | gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type) | |
2945 | { | |
2946 | gdb_assert (gdbarch != NULL); | |
2947 | gdb_assert (gdbarch->stabs_argument_has_addr != NULL); | |
2948 | if (gdbarch_debug >= 2) | |
2949 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stabs_argument_has_addr called\n"); | |
2950 | return gdbarch->stabs_argument_has_addr (gdbarch, type); | |
2951 | } | |
2952 | ||
2953 | void | |
2954 | set_gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, | |
2955 | gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr) | |
2956 | { | |
2957 | gdbarch->stabs_argument_has_addr = stabs_argument_has_addr; | |
2958 | } | |
2959 | ||
8b148df9 AC |
2960 | int |
2961 | gdbarch_frame_red_zone_size (struct gdbarch *gdbarch) | |
2962 | { | |
2963 | gdb_assert (gdbarch != NULL); | |
2964 | if (gdbarch_debug >= 2) | |
2965 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_red_zone_size called\n"); | |
2966 | return gdbarch->frame_red_zone_size; | |
2967 | } | |
2968 | ||
2969 | void | |
2970 | set_gdbarch_frame_red_zone_size (struct gdbarch *gdbarch, | |
2971 | int frame_red_zone_size) | |
2972 | { | |
2973 | gdbarch->frame_red_zone_size = frame_red_zone_size; | |
2974 | } | |
2975 | ||
f517ea4e | 2976 | CORE_ADDR |
e2d0e7eb | 2977 | gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ) |
f517ea4e | 2978 | { |
8de9bdc4 | 2979 | gdb_assert (gdbarch != NULL); |
956ac328 | 2980 | gdb_assert (gdbarch->convert_from_func_ptr_addr != NULL); |
f517ea4e PS |
2981 | if (gdbarch_debug >= 2) |
2982 | fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n"); | |
e2d0e7eb | 2983 | return gdbarch->convert_from_func_ptr_addr (gdbarch, addr, targ); |
f517ea4e PS |
2984 | } |
2985 | ||
2986 | void | |
2987 | set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, | |
2988 | gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr) | |
2989 | { | |
2990 | gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr; | |
2991 | } | |
2992 | ||
875e1767 AC |
2993 | CORE_ADDR |
2994 | gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr) | |
2995 | { | |
8de9bdc4 | 2996 | gdb_assert (gdbarch != NULL); |
956ac328 | 2997 | gdb_assert (gdbarch->addr_bits_remove != NULL); |
875e1767 AC |
2998 | if (gdbarch_debug >= 2) |
2999 | fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n"); | |
24568a2c | 3000 | return gdbarch->addr_bits_remove (gdbarch, addr); |
875e1767 AC |
3001 | } |
3002 | ||
3003 | void | |
3004 | set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch, | |
3005 | gdbarch_addr_bits_remove_ftype addr_bits_remove) | |
3006 | { | |
3007 | gdbarch->addr_bits_remove = addr_bits_remove; | |
3008 | } | |
3009 | ||
64c4637f AC |
3010 | int |
3011 | gdbarch_software_single_step_p (struct gdbarch *gdbarch) | |
3012 | { | |
8de9bdc4 | 3013 | gdb_assert (gdbarch != NULL); |
956ac328 | 3014 | return gdbarch->software_single_step != NULL; |
64c4637f AC |
3015 | } |
3016 | ||
e6590a1b | 3017 | int |
0b1b3e42 | 3018 | gdbarch_software_single_step (struct gdbarch *gdbarch, struct frame_info *frame) |
64c4637f | 3019 | { |
8de9bdc4 | 3020 | gdb_assert (gdbarch != NULL); |
956ac328 | 3021 | gdb_assert (gdbarch->software_single_step != NULL); |
64c4637f AC |
3022 | if (gdbarch_debug >= 2) |
3023 | fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n"); | |
0b1b3e42 | 3024 | return gdbarch->software_single_step (frame); |
64c4637f AC |
3025 | } |
3026 | ||
3027 | void | |
3028 | set_gdbarch_software_single_step (struct gdbarch *gdbarch, | |
3029 | gdbarch_software_single_step_ftype software_single_step) | |
3030 | { | |
3031 | gdbarch->software_single_step = software_single_step; | |
3032 | } | |
3033 | ||
3352ef37 AC |
3034 | int |
3035 | gdbarch_single_step_through_delay_p (struct gdbarch *gdbarch) | |
3036 | { | |
3037 | gdb_assert (gdbarch != NULL); | |
3038 | return gdbarch->single_step_through_delay != NULL; | |
3039 | } | |
3040 | ||
3041 | int | |
3042 | gdbarch_single_step_through_delay (struct gdbarch *gdbarch, struct frame_info *frame) | |
3043 | { | |
3044 | gdb_assert (gdbarch != NULL); | |
3045 | gdb_assert (gdbarch->single_step_through_delay != NULL); | |
3046 | if (gdbarch_debug >= 2) | |
3047 | fprintf_unfiltered (gdb_stdlog, "gdbarch_single_step_through_delay called\n"); | |
3048 | return gdbarch->single_step_through_delay (gdbarch, frame); | |
3049 | } | |
3050 | ||
3051 | void | |
3052 | set_gdbarch_single_step_through_delay (struct gdbarch *gdbarch, | |
3053 | gdbarch_single_step_through_delay_ftype single_step_through_delay) | |
3054 | { | |
3055 | gdbarch->single_step_through_delay = single_step_through_delay; | |
3056 | } | |
3057 | ||
2bf0cb65 | 3058 | int |
a89aa300 | 3059 | gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info) |
2bf0cb65 | 3060 | { |
8de9bdc4 | 3061 | gdb_assert (gdbarch != NULL); |
956ac328 | 3062 | gdb_assert (gdbarch->print_insn != NULL); |
2bf0cb65 EZ |
3063 | if (gdbarch_debug >= 2) |
3064 | fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n"); | |
3065 | return gdbarch->print_insn (vma, info); | |
3066 | } | |
3067 | ||
3068 | void | |
3069 | set_gdbarch_print_insn (struct gdbarch *gdbarch, | |
3070 | gdbarch_print_insn_ftype print_insn) | |
3071 | { | |
3072 | gdbarch->print_insn = print_insn; | |
3073 | } | |
3074 | ||
bdcd319a | 3075 | CORE_ADDR |
52f729a7 | 3076 | gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR pc) |
bdcd319a | 3077 | { |
8de9bdc4 | 3078 | gdb_assert (gdbarch != NULL); |
956ac328 | 3079 | gdb_assert (gdbarch->skip_trampoline_code != NULL); |
bdcd319a CV |
3080 | if (gdbarch_debug >= 2) |
3081 | fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n"); | |
52f729a7 | 3082 | return gdbarch->skip_trampoline_code (frame, pc); |
bdcd319a CV |
3083 | } |
3084 | ||
3085 | void | |
3086 | set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, | |
3087 | gdbarch_skip_trampoline_code_ftype skip_trampoline_code) | |
3088 | { | |
3089 | gdbarch->skip_trampoline_code = skip_trampoline_code; | |
3090 | } | |
3091 | ||
dea0c52f MK |
3092 | CORE_ADDR |
3093 | gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc) | |
3094 | { | |
3095 | gdb_assert (gdbarch != NULL); | |
3096 | gdb_assert (gdbarch->skip_solib_resolver != NULL); | |
3097 | if (gdbarch_debug >= 2) | |
3098 | fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_solib_resolver called\n"); | |
4c8c40e6 | 3099 | return gdbarch->skip_solib_resolver (gdbarch, pc); |
dea0c52f MK |
3100 | } |
3101 | ||
3102 | void | |
3103 | set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, | |
3104 | gdbarch_skip_solib_resolver_ftype skip_solib_resolver) | |
3105 | { | |
3106 | gdbarch->skip_solib_resolver = skip_solib_resolver; | |
3107 | } | |
3108 | ||
d50355b6 | 3109 | int |
2c02bd72 | 3110 | gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, const char *name) |
d50355b6 MS |
3111 | { |
3112 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3113 | gdb_assert (gdbarch->in_solib_return_trampoline != NULL); |
d50355b6 MS |
3114 | if (gdbarch_debug >= 2) |
3115 | fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n"); | |
e17a4113 | 3116 | return gdbarch->in_solib_return_trampoline (gdbarch, pc, name); |
d50355b6 MS |
3117 | } |
3118 | ||
3119 | void | |
3120 | set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, | |
3121 | gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline) | |
3122 | { | |
3123 | gdbarch->in_solib_return_trampoline = in_solib_return_trampoline; | |
3124 | } | |
3125 | ||
c12260ac CV |
3126 | int |
3127 | gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr) | |
3128 | { | |
8de9bdc4 | 3129 | gdb_assert (gdbarch != NULL); |
956ac328 | 3130 | gdb_assert (gdbarch->in_function_epilogue_p != NULL); |
c12260ac CV |
3131 | if (gdbarch_debug >= 2) |
3132 | fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n"); | |
3133 | return gdbarch->in_function_epilogue_p (gdbarch, addr); | |
3134 | } | |
3135 | ||
3136 | void | |
3137 | set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, | |
3138 | gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p) | |
3139 | { | |
3140 | gdbarch->in_function_epilogue_p = in_function_epilogue_p; | |
3141 | } | |
3142 | ||
a2cf933a EZ |
3143 | void |
3144 | gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym) | |
3145 | { | |
8de9bdc4 | 3146 | gdb_assert (gdbarch != NULL); |
956ac328 | 3147 | gdb_assert (gdbarch->elf_make_msymbol_special != NULL); |
a2cf933a EZ |
3148 | if (gdbarch_debug >= 2) |
3149 | fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n"); | |
3150 | gdbarch->elf_make_msymbol_special (sym, msym); | |
3151 | } | |
3152 | ||
3153 | void | |
3154 | set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, | |
3155 | gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special) | |
3156 | { | |
3157 | gdbarch->elf_make_msymbol_special = elf_make_msymbol_special; | |
3158 | } | |
3159 | ||
3160 | void | |
3161 | gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym) | |
3162 | { | |
8de9bdc4 | 3163 | gdb_assert (gdbarch != NULL); |
956ac328 | 3164 | gdb_assert (gdbarch->coff_make_msymbol_special != NULL); |
a2cf933a EZ |
3165 | if (gdbarch_debug >= 2) |
3166 | fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n"); | |
3167 | gdbarch->coff_make_msymbol_special (val, msym); | |
3168 | } | |
3169 | ||
3170 | void | |
3171 | set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, | |
3172 | gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special) | |
3173 | { | |
3174 | gdbarch->coff_make_msymbol_special = coff_make_msymbol_special; | |
3175 | } | |
3176 | ||
c4ed33b9 AC |
3177 | int |
3178 | gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch) | |
3179 | { | |
3180 | gdb_assert (gdbarch != NULL); | |
3181 | /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */ | |
3182 | if (gdbarch_debug >= 2) | |
3183 | fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n"); | |
3184 | return gdbarch->cannot_step_breakpoint; | |
3185 | } | |
3186 | ||
3187 | void | |
3188 | set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch, | |
3189 | int cannot_step_breakpoint) | |
3190 | { | |
3191 | gdbarch->cannot_step_breakpoint = cannot_step_breakpoint; | |
3192 | } | |
3193 | ||
f74fa174 MM |
3194 | int |
3195 | gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch) | |
3196 | { | |
3197 | gdb_assert (gdbarch != NULL); | |
3198 | /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */ | |
3199 | if (gdbarch_debug >= 2) | |
3200 | fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n"); | |
3201 | return gdbarch->have_nonsteppable_watchpoint; | |
3202 | } | |
3203 | ||
3204 | void | |
3205 | set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch, | |
967c0d83 | 3206 | int have_nonsteppable_watchpoint) |
f74fa174 MM |
3207 | { |
3208 | gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint; | |
3209 | } | |
3210 | ||
8b2dbe47 KB |
3211 | int |
3212 | gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch) | |
3213 | { | |
3214 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3215 | return gdbarch->address_class_type_flags != NULL; |
8b2dbe47 KB |
3216 | } |
3217 | ||
3218 | int | |
3219 | gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class) | |
3220 | { | |
3221 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3222 | gdb_assert (gdbarch->address_class_type_flags != NULL); |
8b2dbe47 KB |
3223 | if (gdbarch_debug >= 2) |
3224 | fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n"); | |
3225 | return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class); | |
3226 | } | |
3227 | ||
3228 | void | |
3229 | set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch, | |
3230 | gdbarch_address_class_type_flags_ftype address_class_type_flags) | |
3231 | { | |
3232 | gdbarch->address_class_type_flags = address_class_type_flags; | |
3233 | } | |
3234 | ||
3235 | int | |
3236 | gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch) | |
3237 | { | |
3238 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3239 | return gdbarch->address_class_type_flags_to_name != NULL; |
8b2dbe47 KB |
3240 | } |
3241 | ||
321432c0 | 3242 | const char * |
8b2dbe47 KB |
3243 | gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags) |
3244 | { | |
3245 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3246 | gdb_assert (gdbarch->address_class_type_flags_to_name != NULL); |
8b2dbe47 KB |
3247 | if (gdbarch_debug >= 2) |
3248 | fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n"); | |
5f11f355 | 3249 | return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags); |
8b2dbe47 KB |
3250 | } |
3251 | ||
3252 | void | |
3253 | set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, | |
3254 | gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name) | |
3255 | { | |
3256 | gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name; | |
3257 | } | |
3258 | ||
3259 | int | |
3260 | gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch) | |
3261 | { | |
3262 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3263 | return gdbarch->address_class_name_to_type_flags != NULL; |
8b2dbe47 KB |
3264 | } |
3265 | ||
3266 | int | |
321432c0 | 3267 | gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr) |
8b2dbe47 KB |
3268 | { |
3269 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3270 | gdb_assert (gdbarch->address_class_name_to_type_flags != NULL); |
8b2dbe47 KB |
3271 | if (gdbarch_debug >= 2) |
3272 | fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n"); | |
5f11f355 | 3273 | return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr); |
8b2dbe47 KB |
3274 | } |
3275 | ||
3276 | void | |
3277 | set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, | |
3278 | gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags) | |
3279 | { | |
3280 | gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags; | |
3281 | } | |
3282 | ||
b59ff9d5 AC |
3283 | int |
3284 | gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup) | |
3285 | { | |
3286 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3287 | gdb_assert (gdbarch->register_reggroup_p != NULL); |
b59ff9d5 AC |
3288 | if (gdbarch_debug >= 2) |
3289 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n"); | |
3290 | return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup); | |
3291 | } | |
3292 | ||
3293 | void | |
3294 | set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch, | |
3295 | gdbarch_register_reggroup_p_ftype register_reggroup_p) | |
3296 | { | |
3297 | gdbarch->register_reggroup_p = register_reggroup_p; | |
3298 | } | |
3299 | ||
143985b7 AF |
3300 | int |
3301 | gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch) | |
3302 | { | |
3303 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3304 | return gdbarch->fetch_pointer_argument != NULL; |
143985b7 AF |
3305 | } |
3306 | ||
3307 | CORE_ADDR | |
3308 | gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type) | |
3309 | { | |
3310 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3311 | gdb_assert (gdbarch->fetch_pointer_argument != NULL); |
143985b7 AF |
3312 | if (gdbarch_debug >= 2) |
3313 | fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n"); | |
3314 | return gdbarch->fetch_pointer_argument (frame, argi, type); | |
3315 | } | |
3316 | ||
3317 | void | |
3318 | set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, | |
3319 | gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument) | |
3320 | { | |
3321 | gdbarch->fetch_pointer_argument = fetch_pointer_argument; | |
3322 | } | |
3323 | ||
6ce6d90f MK |
3324 | int |
3325 | gdbarch_regset_from_core_section_p (struct gdbarch *gdbarch) | |
3326 | { | |
3327 | gdb_assert (gdbarch != NULL); | |
3328 | return gdbarch->regset_from_core_section != NULL; | |
3329 | } | |
3330 | ||
3331 | const struct regset * | |
3332 | gdbarch_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size) | |
3333 | { | |
3334 | gdb_assert (gdbarch != NULL); | |
3335 | gdb_assert (gdbarch->regset_from_core_section != NULL); | |
3336 | if (gdbarch_debug >= 2) | |
3337 | fprintf_unfiltered (gdb_stdlog, "gdbarch_regset_from_core_section called\n"); | |
3338 | return gdbarch->regset_from_core_section (gdbarch, sect_name, sect_size); | |
3339 | } | |
3340 | ||
3341 | void | |
3342 | set_gdbarch_regset_from_core_section (struct gdbarch *gdbarch, | |
3343 | gdbarch_regset_from_core_section_ftype regset_from_core_section) | |
3344 | { | |
3345 | gdbarch->regset_from_core_section = regset_from_core_section; | |
3346 | } | |
3347 | ||
17ea7499 CES |
3348 | struct core_regset_section * |
3349 | gdbarch_core_regset_sections (struct gdbarch *gdbarch) | |
3350 | { | |
3351 | gdb_assert (gdbarch != NULL); | |
3352 | if (gdbarch_debug >= 2) | |
3353 | fprintf_unfiltered (gdb_stdlog, "gdbarch_core_regset_sections called\n"); | |
3354 | return gdbarch->core_regset_sections; | |
3355 | } | |
3356 | ||
3357 | void | |
3358 | set_gdbarch_core_regset_sections (struct gdbarch *gdbarch, | |
3359 | struct core_regset_section * core_regset_sections) | |
3360 | { | |
3361 | gdbarch->core_regset_sections = core_regset_sections; | |
3362 | } | |
3363 | ||
6432734d UW |
3364 | int |
3365 | gdbarch_make_corefile_notes_p (struct gdbarch *gdbarch) | |
3366 | { | |
3367 | gdb_assert (gdbarch != NULL); | |
3368 | return gdbarch->make_corefile_notes != NULL; | |
3369 | } | |
3370 | ||
3371 | char * | |
3372 | gdbarch_make_corefile_notes (struct gdbarch *gdbarch, bfd *obfd, int *note_size) | |
3373 | { | |
3374 | gdb_assert (gdbarch != NULL); | |
3375 | gdb_assert (gdbarch->make_corefile_notes != NULL); | |
3376 | if (gdbarch_debug >= 2) | |
3377 | fprintf_unfiltered (gdb_stdlog, "gdbarch_make_corefile_notes called\n"); | |
3378 | return gdbarch->make_corefile_notes (gdbarch, obfd, note_size); | |
3379 | } | |
3380 | ||
3381 | void | |
3382 | set_gdbarch_make_corefile_notes (struct gdbarch *gdbarch, | |
3383 | gdbarch_make_corefile_notes_ftype make_corefile_notes) | |
3384 | { | |
3385 | gdbarch->make_corefile_notes = make_corefile_notes; | |
3386 | } | |
3387 | ||
b3ac9c77 SDJ |
3388 | int |
3389 | gdbarch_elfcore_write_linux_prpsinfo_p (struct gdbarch *gdbarch) | |
3390 | { | |
3391 | gdb_assert (gdbarch != NULL); | |
3392 | return gdbarch->elfcore_write_linux_prpsinfo != NULL; | |
3393 | } | |
3394 | ||
3395 | char * | |
3396 | gdbarch_elfcore_write_linux_prpsinfo (struct gdbarch *gdbarch, bfd *obfd, char *note_data, int *note_size, const struct elf_internal_linux_prpsinfo *info) | |
3397 | { | |
3398 | gdb_assert (gdbarch != NULL); | |
3399 | gdb_assert (gdbarch->elfcore_write_linux_prpsinfo != NULL); | |
3400 | if (gdbarch_debug >= 2) | |
3401 | fprintf_unfiltered (gdb_stdlog, "gdbarch_elfcore_write_linux_prpsinfo called\n"); | |
3402 | return gdbarch->elfcore_write_linux_prpsinfo (obfd, note_data, note_size, info); | |
3403 | } | |
3404 | ||
3405 | void | |
3406 | set_gdbarch_elfcore_write_linux_prpsinfo (struct gdbarch *gdbarch, | |
3407 | gdbarch_elfcore_write_linux_prpsinfo_ftype elfcore_write_linux_prpsinfo) | |
3408 | { | |
3409 | gdbarch->elfcore_write_linux_prpsinfo = elfcore_write_linux_prpsinfo; | |
3410 | } | |
3411 | ||
35c2fab7 UW |
3412 | int |
3413 | gdbarch_find_memory_regions_p (struct gdbarch *gdbarch) | |
3414 | { | |
3415 | gdb_assert (gdbarch != NULL); | |
3416 | return gdbarch->find_memory_regions != NULL; | |
3417 | } | |
3418 | ||
3419 | int | |
3420 | gdbarch_find_memory_regions (struct gdbarch *gdbarch, find_memory_region_ftype func, void *data) | |
3421 | { | |
3422 | gdb_assert (gdbarch != NULL); | |
3423 | gdb_assert (gdbarch->find_memory_regions != NULL); | |
3424 | if (gdbarch_debug >= 2) | |
3425 | fprintf_unfiltered (gdb_stdlog, "gdbarch_find_memory_regions called\n"); | |
3426 | return gdbarch->find_memory_regions (gdbarch, func, data); | |
3427 | } | |
3428 | ||
3429 | void | |
3430 | set_gdbarch_find_memory_regions (struct gdbarch *gdbarch, | |
3431 | gdbarch_find_memory_regions_ftype find_memory_regions) | |
3432 | { | |
3433 | gdbarch->find_memory_regions = find_memory_regions; | |
3434 | } | |
3435 | ||
de584861 PA |
3436 | int |
3437 | gdbarch_core_xfer_shared_libraries_p (struct gdbarch *gdbarch) | |
3438 | { | |
3439 | gdb_assert (gdbarch != NULL); | |
3440 | return gdbarch->core_xfer_shared_libraries != NULL; | |
3441 | } | |
3442 | ||
3443 | LONGEST | |
3444 | gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, LONGEST len) | |
3445 | { | |
3446 | gdb_assert (gdbarch != NULL); | |
3447 | gdb_assert (gdbarch->core_xfer_shared_libraries != NULL); | |
3448 | if (gdbarch_debug >= 2) | |
3449 | fprintf_unfiltered (gdb_stdlog, "gdbarch_core_xfer_shared_libraries called\n"); | |
3450 | return gdbarch->core_xfer_shared_libraries (gdbarch, readbuf, offset, len); | |
3451 | } | |
3452 | ||
3453 | void | |
3454 | set_gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch, | |
3455 | gdbarch_core_xfer_shared_libraries_ftype core_xfer_shared_libraries) | |
3456 | { | |
3457 | gdbarch->core_xfer_shared_libraries = core_xfer_shared_libraries; | |
3458 | } | |
3459 | ||
356a5233 JB |
3460 | int |
3461 | gdbarch_core_xfer_shared_libraries_aix_p (struct gdbarch *gdbarch) | |
3462 | { | |
3463 | gdb_assert (gdbarch != NULL); | |
3464 | return gdbarch->core_xfer_shared_libraries_aix != NULL; | |
3465 | } | |
3466 | ||
3467 | LONGEST | |
3468 | gdbarch_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, LONGEST len) | |
3469 | { | |
3470 | gdb_assert (gdbarch != NULL); | |
3471 | gdb_assert (gdbarch->core_xfer_shared_libraries_aix != NULL); | |
3472 | if (gdbarch_debug >= 2) | |
3473 | fprintf_unfiltered (gdb_stdlog, "gdbarch_core_xfer_shared_libraries_aix called\n"); | |
3474 | return gdbarch->core_xfer_shared_libraries_aix (gdbarch, readbuf, offset, len); | |
3475 | } | |
3476 | ||
3477 | void | |
3478 | set_gdbarch_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch, | |
3479 | gdbarch_core_xfer_shared_libraries_aix_ftype core_xfer_shared_libraries_aix) | |
3480 | { | |
3481 | gdbarch->core_xfer_shared_libraries_aix = core_xfer_shared_libraries_aix; | |
3482 | } | |
3483 | ||
28439f5e PA |
3484 | int |
3485 | gdbarch_core_pid_to_str_p (struct gdbarch *gdbarch) | |
3486 | { | |
3487 | gdb_assert (gdbarch != NULL); | |
3488 | return gdbarch->core_pid_to_str != NULL; | |
3489 | } | |
3490 | ||
3491 | char * | |
3492 | gdbarch_core_pid_to_str (struct gdbarch *gdbarch, ptid_t ptid) | |
3493 | { | |
3494 | gdb_assert (gdbarch != NULL); | |
3495 | gdb_assert (gdbarch->core_pid_to_str != NULL); | |
3496 | if (gdbarch_debug >= 2) | |
3497 | fprintf_unfiltered (gdb_stdlog, "gdbarch_core_pid_to_str called\n"); | |
3498 | return gdbarch->core_pid_to_str (gdbarch, ptid); | |
3499 | } | |
3500 | ||
3501 | void | |
3502 | set_gdbarch_core_pid_to_str (struct gdbarch *gdbarch, | |
3503 | gdbarch_core_pid_to_str_ftype core_pid_to_str) | |
3504 | { | |
3505 | gdbarch->core_pid_to_str = core_pid_to_str; | |
3506 | } | |
3507 | ||
a78c2d62 UW |
3508 | int |
3509 | gdbarch_gcore_bfd_target_p (struct gdbarch *gdbarch) | |
3510 | { | |
3511 | gdb_assert (gdbarch != NULL); | |
3512 | return gdbarch->gcore_bfd_target != 0; | |
3513 | } | |
3514 | ||
3515 | const char * | |
3516 | gdbarch_gcore_bfd_target (struct gdbarch *gdbarch) | |
3517 | { | |
3518 | gdb_assert (gdbarch != NULL); | |
3519 | /* Check variable changed from pre-default. */ | |
3520 | gdb_assert (gdbarch->gcore_bfd_target != 0); | |
3521 | if (gdbarch_debug >= 2) | |
3522 | fprintf_unfiltered (gdb_stdlog, "gdbarch_gcore_bfd_target called\n"); | |
3523 | return gdbarch->gcore_bfd_target; | |
3524 | } | |
3525 | ||
3526 | void | |
3527 | set_gdbarch_gcore_bfd_target (struct gdbarch *gdbarch, | |
3528 | const char * gcore_bfd_target) | |
3529 | { | |
3530 | gdbarch->gcore_bfd_target = gcore_bfd_target; | |
3531 | } | |
3532 | ||
0d5de010 DJ |
3533 | int |
3534 | gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch) | |
3535 | { | |
3536 | gdb_assert (gdbarch != NULL); | |
3537 | /* Skip verify of vtable_function_descriptors, invalid_p == 0 */ | |
3538 | if (gdbarch_debug >= 2) | |
3539 | fprintf_unfiltered (gdb_stdlog, "gdbarch_vtable_function_descriptors called\n"); | |
3540 | return gdbarch->vtable_function_descriptors; | |
3541 | } | |
3542 | ||
3543 | void | |
3544 | set_gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch, | |
3545 | int vtable_function_descriptors) | |
3546 | { | |
3547 | gdbarch->vtable_function_descriptors = vtable_function_descriptors; | |
3548 | } | |
3549 | ||
3550 | int | |
3551 | gdbarch_vbit_in_delta (struct gdbarch *gdbarch) | |
3552 | { | |
3553 | gdb_assert (gdbarch != NULL); | |
3554 | /* Skip verify of vbit_in_delta, invalid_p == 0 */ | |
3555 | if (gdbarch_debug >= 2) | |
3556 | fprintf_unfiltered (gdb_stdlog, "gdbarch_vbit_in_delta called\n"); | |
3557 | return gdbarch->vbit_in_delta; | |
3558 | } | |
3559 | ||
3560 | void | |
3561 | set_gdbarch_vbit_in_delta (struct gdbarch *gdbarch, | |
3562 | int vbit_in_delta) | |
3563 | { | |
3564 | gdbarch->vbit_in_delta = vbit_in_delta; | |
3565 | } | |
3566 | ||
6d350bb5 UW |
3567 | int |
3568 | gdbarch_skip_permanent_breakpoint_p (struct gdbarch *gdbarch) | |
3569 | { | |
3570 | gdb_assert (gdbarch != NULL); | |
3571 | return gdbarch->skip_permanent_breakpoint != NULL; | |
3572 | } | |
3573 | ||
3574 | void | |
3575 | gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch, struct regcache *regcache) | |
3576 | { | |
3577 | gdb_assert (gdbarch != NULL); | |
3578 | gdb_assert (gdbarch->skip_permanent_breakpoint != NULL); | |
3579 | if (gdbarch_debug >= 2) | |
3580 | fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_permanent_breakpoint called\n"); | |
3581 | gdbarch->skip_permanent_breakpoint (regcache); | |
3582 | } | |
3583 | ||
3584 | void | |
3585 | set_gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch, | |
3586 | gdbarch_skip_permanent_breakpoint_ftype skip_permanent_breakpoint) | |
3587 | { | |
3588 | gdbarch->skip_permanent_breakpoint = skip_permanent_breakpoint; | |
3589 | } | |
3590 | ||
237fc4c9 PA |
3591 | int |
3592 | gdbarch_max_insn_length_p (struct gdbarch *gdbarch) | |
3593 | { | |
3594 | gdb_assert (gdbarch != NULL); | |
3595 | return gdbarch->max_insn_length != 0; | |
3596 | } | |
3597 | ||
3598 | ULONGEST | |
3599 | gdbarch_max_insn_length (struct gdbarch *gdbarch) | |
3600 | { | |
3601 | gdb_assert (gdbarch != NULL); | |
3602 | /* Check variable changed from pre-default. */ | |
3603 | gdb_assert (gdbarch->max_insn_length != 0); | |
3604 | if (gdbarch_debug >= 2) | |
3605 | fprintf_unfiltered (gdb_stdlog, "gdbarch_max_insn_length called\n"); | |
3606 | return gdbarch->max_insn_length; | |
3607 | } | |
3608 | ||
3609 | void | |
3610 | set_gdbarch_max_insn_length (struct gdbarch *gdbarch, | |
3611 | ULONGEST max_insn_length) | |
3612 | { | |
3613 | gdbarch->max_insn_length = max_insn_length; | |
3614 | } | |
3615 | ||
3616 | int | |
3617 | gdbarch_displaced_step_copy_insn_p (struct gdbarch *gdbarch) | |
3618 | { | |
3619 | gdb_assert (gdbarch != NULL); | |
3620 | return gdbarch->displaced_step_copy_insn != NULL; | |
3621 | } | |
3622 | ||
3623 | struct displaced_step_closure * | |
3624 | gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch, CORE_ADDR from, CORE_ADDR to, struct regcache *regs) | |
3625 | { | |
3626 | gdb_assert (gdbarch != NULL); | |
3627 | gdb_assert (gdbarch->displaced_step_copy_insn != NULL); | |
3628 | if (gdbarch_debug >= 2) | |
3629 | fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_copy_insn called\n"); | |
3630 | return gdbarch->displaced_step_copy_insn (gdbarch, from, to, regs); | |
3631 | } | |
3632 | ||
3633 | void | |
3634 | set_gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch, | |
3635 | gdbarch_displaced_step_copy_insn_ftype displaced_step_copy_insn) | |
3636 | { | |
3637 | gdbarch->displaced_step_copy_insn = displaced_step_copy_insn; | |
3638 | } | |
3639 | ||
99e40580 UW |
3640 | int |
3641 | gdbarch_displaced_step_hw_singlestep (struct gdbarch *gdbarch, struct displaced_step_closure *closure) | |
3642 | { | |
3643 | gdb_assert (gdbarch != NULL); | |
3644 | gdb_assert (gdbarch->displaced_step_hw_singlestep != NULL); | |
3645 | if (gdbarch_debug >= 2) | |
3646 | fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_hw_singlestep called\n"); | |
3647 | return gdbarch->displaced_step_hw_singlestep (gdbarch, closure); | |
3648 | } | |
3649 | ||
3650 | void | |
3651 | set_gdbarch_displaced_step_hw_singlestep (struct gdbarch *gdbarch, | |
3652 | gdbarch_displaced_step_hw_singlestep_ftype displaced_step_hw_singlestep) | |
3653 | { | |
3654 | gdbarch->displaced_step_hw_singlestep = displaced_step_hw_singlestep; | |
3655 | } | |
3656 | ||
237fc4c9 PA |
3657 | int |
3658 | gdbarch_displaced_step_fixup_p (struct gdbarch *gdbarch) | |
3659 | { | |
3660 | gdb_assert (gdbarch != NULL); | |
3661 | return gdbarch->displaced_step_fixup != NULL; | |
3662 | } | |
3663 | ||
3664 | void | |
3665 | gdbarch_displaced_step_fixup (struct gdbarch *gdbarch, struct displaced_step_closure *closure, CORE_ADDR from, CORE_ADDR to, struct regcache *regs) | |
3666 | { | |
3667 | gdb_assert (gdbarch != NULL); | |
3668 | gdb_assert (gdbarch->displaced_step_fixup != NULL); | |
3669 | /* Do not check predicate: gdbarch->displaced_step_fixup != NULL, allow call. */ | |
3670 | if (gdbarch_debug >= 2) | |
3671 | fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_fixup called\n"); | |
3672 | gdbarch->displaced_step_fixup (gdbarch, closure, from, to, regs); | |
3673 | } | |
3674 | ||
3675 | void | |
3676 | set_gdbarch_displaced_step_fixup (struct gdbarch *gdbarch, | |
3677 | gdbarch_displaced_step_fixup_ftype displaced_step_fixup) | |
3678 | { | |
3679 | gdbarch->displaced_step_fixup = displaced_step_fixup; | |
3680 | } | |
3681 | ||
3682 | void | |
3683 | gdbarch_displaced_step_free_closure (struct gdbarch *gdbarch, struct displaced_step_closure *closure) | |
3684 | { | |
3685 | gdb_assert (gdbarch != NULL); | |
3686 | gdb_assert (gdbarch->displaced_step_free_closure != NULL); | |
3687 | if (gdbarch_debug >= 2) | |
3688 | fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_free_closure called\n"); | |
3689 | gdbarch->displaced_step_free_closure (gdbarch, closure); | |
3690 | } | |
3691 | ||
3692 | void | |
3693 | set_gdbarch_displaced_step_free_closure (struct gdbarch *gdbarch, | |
3694 | gdbarch_displaced_step_free_closure_ftype displaced_step_free_closure) | |
3695 | { | |
3696 | gdbarch->displaced_step_free_closure = displaced_step_free_closure; | |
3697 | } | |
3698 | ||
3699 | CORE_ADDR | |
3700 | gdbarch_displaced_step_location (struct gdbarch *gdbarch) | |
3701 | { | |
3702 | gdb_assert (gdbarch != NULL); | |
3703 | gdb_assert (gdbarch->displaced_step_location != NULL); | |
3704 | if (gdbarch_debug >= 2) | |
3705 | fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_location called\n"); | |
3706 | return gdbarch->displaced_step_location (gdbarch); | |
3707 | } | |
3708 | ||
3709 | void | |
3710 | set_gdbarch_displaced_step_location (struct gdbarch *gdbarch, | |
3711 | gdbarch_displaced_step_location_ftype displaced_step_location) | |
3712 | { | |
3713 | gdbarch->displaced_step_location = displaced_step_location; | |
3714 | } | |
3715 | ||
dde08ee1 PA |
3716 | int |
3717 | gdbarch_relocate_instruction_p (struct gdbarch *gdbarch) | |
3718 | { | |
3719 | gdb_assert (gdbarch != NULL); | |
3720 | return gdbarch->relocate_instruction != NULL; | |
3721 | } | |
3722 | ||
3723 | void | |
3724 | gdbarch_relocate_instruction (struct gdbarch *gdbarch, CORE_ADDR *to, CORE_ADDR from) | |
3725 | { | |
3726 | gdb_assert (gdbarch != NULL); | |
3727 | gdb_assert (gdbarch->relocate_instruction != NULL); | |
3728 | /* Do not check predicate: gdbarch->relocate_instruction != NULL, allow call. */ | |
3729 | if (gdbarch_debug >= 2) | |
3730 | fprintf_unfiltered (gdb_stdlog, "gdbarch_relocate_instruction called\n"); | |
3731 | gdbarch->relocate_instruction (gdbarch, to, from); | |
3732 | } | |
3733 | ||
3734 | void | |
3735 | set_gdbarch_relocate_instruction (struct gdbarch *gdbarch, | |
3736 | gdbarch_relocate_instruction_ftype relocate_instruction) | |
3737 | { | |
3738 | gdbarch->relocate_instruction = relocate_instruction; | |
3739 | } | |
3740 | ||
1c772458 UW |
3741 | int |
3742 | gdbarch_overlay_update_p (struct gdbarch *gdbarch) | |
3743 | { | |
3744 | gdb_assert (gdbarch != NULL); | |
3745 | return gdbarch->overlay_update != NULL; | |
3746 | } | |
3747 | ||
3748 | void | |
3749 | gdbarch_overlay_update (struct gdbarch *gdbarch, struct obj_section *osect) | |
3750 | { | |
3751 | gdb_assert (gdbarch != NULL); | |
3752 | gdb_assert (gdbarch->overlay_update != NULL); | |
3753 | if (gdbarch_debug >= 2) | |
3754 | fprintf_unfiltered (gdb_stdlog, "gdbarch_overlay_update called\n"); | |
3755 | gdbarch->overlay_update (osect); | |
3756 | } | |
3757 | ||
3758 | void | |
3759 | set_gdbarch_overlay_update (struct gdbarch *gdbarch, | |
3760 | gdbarch_overlay_update_ftype overlay_update) | |
3761 | { | |
3762 | gdbarch->overlay_update = overlay_update; | |
3763 | } | |
3764 | ||
4eb0ad19 DJ |
3765 | int |
3766 | gdbarch_core_read_description_p (struct gdbarch *gdbarch) | |
3767 | { | |
3768 | gdb_assert (gdbarch != NULL); | |
3769 | return gdbarch->core_read_description != NULL; | |
3770 | } | |
3771 | ||
3772 | const struct target_desc * | |
3773 | gdbarch_core_read_description (struct gdbarch *gdbarch, struct target_ops *target, bfd *abfd) | |
3774 | { | |
3775 | gdb_assert (gdbarch != NULL); | |
3776 | gdb_assert (gdbarch->core_read_description != NULL); | |
3777 | if (gdbarch_debug >= 2) | |
3778 | fprintf_unfiltered (gdb_stdlog, "gdbarch_core_read_description called\n"); | |
3779 | return gdbarch->core_read_description (gdbarch, target, abfd); | |
3780 | } | |
3781 | ||
3782 | void | |
3783 | set_gdbarch_core_read_description (struct gdbarch *gdbarch, | |
3784 | gdbarch_core_read_description_ftype core_read_description) | |
3785 | { | |
3786 | gdbarch->core_read_description = core_read_description; | |
3787 | } | |
3788 | ||
149ad273 UW |
3789 | int |
3790 | gdbarch_static_transform_name_p (struct gdbarch *gdbarch) | |
3791 | { | |
3792 | gdb_assert (gdbarch != NULL); | |
3793 | return gdbarch->static_transform_name != NULL; | |
3794 | } | |
3795 | ||
0d5cff50 DE |
3796 | const char * |
3797 | gdbarch_static_transform_name (struct gdbarch *gdbarch, const char *name) | |
149ad273 UW |
3798 | { |
3799 | gdb_assert (gdbarch != NULL); | |
3800 | gdb_assert (gdbarch->static_transform_name != NULL); | |
3801 | if (gdbarch_debug >= 2) | |
3802 | fprintf_unfiltered (gdb_stdlog, "gdbarch_static_transform_name called\n"); | |
3803 | return gdbarch->static_transform_name (name); | |
3804 | } | |
3805 | ||
3806 | void | |
3807 | set_gdbarch_static_transform_name (struct gdbarch *gdbarch, | |
3808 | gdbarch_static_transform_name_ftype static_transform_name) | |
3809 | { | |
3810 | gdbarch->static_transform_name = static_transform_name; | |
3811 | } | |
3812 | ||
203c3895 UW |
3813 | int |
3814 | gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch) | |
3815 | { | |
3816 | gdb_assert (gdbarch != NULL); | |
3817 | /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */ | |
3818 | if (gdbarch_debug >= 2) | |
3819 | fprintf_unfiltered (gdb_stdlog, "gdbarch_sofun_address_maybe_missing called\n"); | |
3820 | return gdbarch->sofun_address_maybe_missing; | |
3821 | } | |
3822 | ||
3823 | void | |
3824 | set_gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch, | |
3825 | int sofun_address_maybe_missing) | |
3826 | { | |
3827 | gdbarch->sofun_address_maybe_missing = sofun_address_maybe_missing; | |
3828 | } | |
3829 | ||
0508c3ec HZ |
3830 | int |
3831 | gdbarch_process_record_p (struct gdbarch *gdbarch) | |
3832 | { | |
3833 | gdb_assert (gdbarch != NULL); | |
3834 | return gdbarch->process_record != NULL; | |
3835 | } | |
3836 | ||
3837 | int | |
3838 | gdbarch_process_record (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR addr) | |
3839 | { | |
3840 | gdb_assert (gdbarch != NULL); | |
3841 | gdb_assert (gdbarch->process_record != NULL); | |
3842 | if (gdbarch_debug >= 2) | |
3843 | fprintf_unfiltered (gdb_stdlog, "gdbarch_process_record called\n"); | |
3844 | return gdbarch->process_record (gdbarch, regcache, addr); | |
3845 | } | |
3846 | ||
3847 | void | |
3848 | set_gdbarch_process_record (struct gdbarch *gdbarch, | |
3849 | gdbarch_process_record_ftype process_record) | |
3850 | { | |
3851 | gdbarch->process_record = process_record; | |
3852 | } | |
3853 | ||
3846b520 HZ |
3854 | int |
3855 | gdbarch_process_record_signal_p (struct gdbarch *gdbarch) | |
3856 | { | |
3857 | gdb_assert (gdbarch != NULL); | |
3858 | return gdbarch->process_record_signal != NULL; | |
3859 | } | |
3860 | ||
3861 | int | |
2ea28649 | 3862 | gdbarch_process_record_signal (struct gdbarch *gdbarch, struct regcache *regcache, enum gdb_signal signal) |
3846b520 HZ |
3863 | { |
3864 | gdb_assert (gdbarch != NULL); | |
3865 | gdb_assert (gdbarch->process_record_signal != NULL); | |
3866 | if (gdbarch_debug >= 2) | |
3867 | fprintf_unfiltered (gdb_stdlog, "gdbarch_process_record_signal called\n"); | |
3868 | return gdbarch->process_record_signal (gdbarch, regcache, signal); | |
3869 | } | |
3870 | ||
3871 | void | |
3872 | set_gdbarch_process_record_signal (struct gdbarch *gdbarch, | |
3873 | gdbarch_process_record_signal_ftype process_record_signal) | |
3874 | { | |
3875 | gdbarch->process_record_signal = process_record_signal; | |
3876 | } | |
3877 | ||
1f8cf220 PA |
3878 | int |
3879 | gdbarch_gdb_signal_from_target_p (struct gdbarch *gdbarch) | |
3880 | { | |
3881 | gdb_assert (gdbarch != NULL); | |
3882 | return gdbarch->gdb_signal_from_target != NULL; | |
3883 | } | |
3884 | ||
2ea28649 | 3885 | enum gdb_signal |
22203bbf | 3886 | gdbarch_gdb_signal_from_target (struct gdbarch *gdbarch, int signo) |
1cded358 AR |
3887 | { |
3888 | gdb_assert (gdbarch != NULL); | |
22203bbf | 3889 | gdb_assert (gdbarch->gdb_signal_from_target != NULL); |
1cded358 | 3890 | if (gdbarch_debug >= 2) |
22203bbf PA |
3891 | fprintf_unfiltered (gdb_stdlog, "gdbarch_gdb_signal_from_target called\n"); |
3892 | return gdbarch->gdb_signal_from_target (gdbarch, signo); | |
1cded358 AR |
3893 | } |
3894 | ||
3895 | void | |
22203bbf PA |
3896 | set_gdbarch_gdb_signal_from_target (struct gdbarch *gdbarch, |
3897 | gdbarch_gdb_signal_from_target_ftype gdb_signal_from_target) | |
1cded358 | 3898 | { |
22203bbf | 3899 | gdbarch->gdb_signal_from_target = gdb_signal_from_target; |
1cded358 AR |
3900 | } |
3901 | ||
4aa995e1 PA |
3902 | int |
3903 | gdbarch_get_siginfo_type_p (struct gdbarch *gdbarch) | |
3904 | { | |
3905 | gdb_assert (gdbarch != NULL); | |
3906 | return gdbarch->get_siginfo_type != NULL; | |
3907 | } | |
3908 | ||
3909 | struct type * | |
3910 | gdbarch_get_siginfo_type (struct gdbarch *gdbarch) | |
3911 | { | |
3912 | gdb_assert (gdbarch != NULL); | |
3913 | gdb_assert (gdbarch->get_siginfo_type != NULL); | |
3914 | if (gdbarch_debug >= 2) | |
3915 | fprintf_unfiltered (gdb_stdlog, "gdbarch_get_siginfo_type called\n"); | |
3916 | return gdbarch->get_siginfo_type (gdbarch); | |
3917 | } | |
3918 | ||
3919 | void | |
3920 | set_gdbarch_get_siginfo_type (struct gdbarch *gdbarch, | |
3921 | gdbarch_get_siginfo_type_ftype get_siginfo_type) | |
3922 | { | |
3923 | gdbarch->get_siginfo_type = get_siginfo_type; | |
3924 | } | |
3925 | ||
60c5725c DJ |
3926 | int |
3927 | gdbarch_record_special_symbol_p (struct gdbarch *gdbarch) | |
3928 | { | |
3929 | gdb_assert (gdbarch != NULL); | |
3930 | return gdbarch->record_special_symbol != NULL; | |
3931 | } | |
3932 | ||
3933 | void | |
3934 | gdbarch_record_special_symbol (struct gdbarch *gdbarch, struct objfile *objfile, asymbol *sym) | |
3935 | { | |
3936 | gdb_assert (gdbarch != NULL); | |
3937 | gdb_assert (gdbarch->record_special_symbol != NULL); | |
3938 | if (gdbarch_debug >= 2) | |
3939 | fprintf_unfiltered (gdb_stdlog, "gdbarch_record_special_symbol called\n"); | |
3940 | gdbarch->record_special_symbol (gdbarch, objfile, sym); | |
3941 | } | |
3942 | ||
3943 | void | |
3944 | set_gdbarch_record_special_symbol (struct gdbarch *gdbarch, | |
3945 | gdbarch_record_special_symbol_ftype record_special_symbol) | |
3946 | { | |
3947 | gdbarch->record_special_symbol = record_special_symbol; | |
3948 | } | |
3949 | ||
a96d9b2e SDJ |
3950 | int |
3951 | gdbarch_get_syscall_number_p (struct gdbarch *gdbarch) | |
3952 | { | |
3953 | gdb_assert (gdbarch != NULL); | |
3954 | return gdbarch->get_syscall_number != NULL; | |
3955 | } | |
3956 | ||
3957 | LONGEST | |
3958 | gdbarch_get_syscall_number (struct gdbarch *gdbarch, ptid_t ptid) | |
3959 | { | |
3960 | gdb_assert (gdbarch != NULL); | |
3961 | gdb_assert (gdbarch->get_syscall_number != NULL); | |
3962 | if (gdbarch_debug >= 2) | |
3963 | fprintf_unfiltered (gdb_stdlog, "gdbarch_get_syscall_number called\n"); | |
3964 | return gdbarch->get_syscall_number (gdbarch, ptid); | |
3965 | } | |
3966 | ||
3967 | void | |
3968 | set_gdbarch_get_syscall_number (struct gdbarch *gdbarch, | |
3969 | gdbarch_get_syscall_number_ftype get_syscall_number) | |
3970 | { | |
3971 | gdbarch->get_syscall_number = get_syscall_number; | |
3972 | } | |
3973 | ||
55aa24fb SDJ |
3974 | const char * |
3975 | gdbarch_stap_integer_prefix (struct gdbarch *gdbarch) | |
3976 | { | |
3977 | gdb_assert (gdbarch != NULL); | |
3978 | /* Skip verify of stap_integer_prefix, invalid_p == 0 */ | |
3979 | if (gdbarch_debug >= 2) | |
3980 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_integer_prefix called\n"); | |
3981 | return gdbarch->stap_integer_prefix; | |
3982 | } | |
3983 | ||
3984 | void | |
3985 | set_gdbarch_stap_integer_prefix (struct gdbarch *gdbarch, | |
3986 | const char * stap_integer_prefix) | |
3987 | { | |
3988 | gdbarch->stap_integer_prefix = stap_integer_prefix; | |
3989 | } | |
3990 | ||
3991 | const char * | |
3992 | gdbarch_stap_integer_suffix (struct gdbarch *gdbarch) | |
3993 | { | |
3994 | gdb_assert (gdbarch != NULL); | |
3995 | /* Skip verify of stap_integer_suffix, invalid_p == 0 */ | |
3996 | if (gdbarch_debug >= 2) | |
3997 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_integer_suffix called\n"); | |
3998 | return gdbarch->stap_integer_suffix; | |
3999 | } | |
4000 | ||
4001 | void | |
4002 | set_gdbarch_stap_integer_suffix (struct gdbarch *gdbarch, | |
4003 | const char * stap_integer_suffix) | |
4004 | { | |
4005 | gdbarch->stap_integer_suffix = stap_integer_suffix; | |
4006 | } | |
4007 | ||
4008 | const char * | |
4009 | gdbarch_stap_register_prefix (struct gdbarch *gdbarch) | |
4010 | { | |
4011 | gdb_assert (gdbarch != NULL); | |
4012 | /* Skip verify of stap_register_prefix, invalid_p == 0 */ | |
4013 | if (gdbarch_debug >= 2) | |
4014 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_prefix called\n"); | |
4015 | return gdbarch->stap_register_prefix; | |
4016 | } | |
4017 | ||
4018 | void | |
4019 | set_gdbarch_stap_register_prefix (struct gdbarch *gdbarch, | |
4020 | const char * stap_register_prefix) | |
4021 | { | |
4022 | gdbarch->stap_register_prefix = stap_register_prefix; | |
4023 | } | |
4024 | ||
4025 | const char * | |
4026 | gdbarch_stap_register_suffix (struct gdbarch *gdbarch) | |
4027 | { | |
4028 | gdb_assert (gdbarch != NULL); | |
4029 | /* Skip verify of stap_register_suffix, invalid_p == 0 */ | |
4030 | if (gdbarch_debug >= 2) | |
4031 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_suffix called\n"); | |
4032 | return gdbarch->stap_register_suffix; | |
4033 | } | |
4034 | ||
4035 | void | |
4036 | set_gdbarch_stap_register_suffix (struct gdbarch *gdbarch, | |
4037 | const char * stap_register_suffix) | |
4038 | { | |
4039 | gdbarch->stap_register_suffix = stap_register_suffix; | |
4040 | } | |
4041 | ||
4042 | const char * | |
4043 | gdbarch_stap_register_indirection_prefix (struct gdbarch *gdbarch) | |
4044 | { | |
4045 | gdb_assert (gdbarch != NULL); | |
4046 | /* Skip verify of stap_register_indirection_prefix, invalid_p == 0 */ | |
4047 | if (gdbarch_debug >= 2) | |
4048 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_indirection_prefix called\n"); | |
4049 | return gdbarch->stap_register_indirection_prefix; | |
4050 | } | |
4051 | ||
4052 | void | |
4053 | set_gdbarch_stap_register_indirection_prefix (struct gdbarch *gdbarch, | |
4054 | const char * stap_register_indirection_prefix) | |
4055 | { | |
4056 | gdbarch->stap_register_indirection_prefix = stap_register_indirection_prefix; | |
4057 | } | |
4058 | ||
4059 | const char * | |
4060 | gdbarch_stap_register_indirection_suffix (struct gdbarch *gdbarch) | |
4061 | { | |
4062 | gdb_assert (gdbarch != NULL); | |
4063 | /* Skip verify of stap_register_indirection_suffix, invalid_p == 0 */ | |
4064 | if (gdbarch_debug >= 2) | |
4065 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_indirection_suffix called\n"); | |
4066 | return gdbarch->stap_register_indirection_suffix; | |
4067 | } | |
4068 | ||
4069 | void | |
4070 | set_gdbarch_stap_register_indirection_suffix (struct gdbarch *gdbarch, | |
4071 | const char * stap_register_indirection_suffix) | |
4072 | { | |
4073 | gdbarch->stap_register_indirection_suffix = stap_register_indirection_suffix; | |
4074 | } | |
4075 | ||
4076 | const char * | |
4077 | gdbarch_stap_gdb_register_prefix (struct gdbarch *gdbarch) | |
4078 | { | |
4079 | gdb_assert (gdbarch != NULL); | |
4080 | /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */ | |
4081 | if (gdbarch_debug >= 2) | |
4082 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_gdb_register_prefix called\n"); | |
4083 | return gdbarch->stap_gdb_register_prefix; | |
4084 | } | |
4085 | ||
4086 | void | |
4087 | set_gdbarch_stap_gdb_register_prefix (struct gdbarch *gdbarch, | |
4088 | const char * stap_gdb_register_prefix) | |
4089 | { | |
4090 | gdbarch->stap_gdb_register_prefix = stap_gdb_register_prefix; | |
4091 | } | |
4092 | ||
4093 | const char * | |
4094 | gdbarch_stap_gdb_register_suffix (struct gdbarch *gdbarch) | |
4095 | { | |
4096 | gdb_assert (gdbarch != NULL); | |
4097 | /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */ | |
4098 | if (gdbarch_debug >= 2) | |
4099 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_gdb_register_suffix called\n"); | |
4100 | return gdbarch->stap_gdb_register_suffix; | |
4101 | } | |
4102 | ||
4103 | void | |
4104 | set_gdbarch_stap_gdb_register_suffix (struct gdbarch *gdbarch, | |
4105 | const char * stap_gdb_register_suffix) | |
4106 | { | |
4107 | gdbarch->stap_gdb_register_suffix = stap_gdb_register_suffix; | |
4108 | } | |
4109 | ||
4110 | int | |
4111 | gdbarch_stap_is_single_operand_p (struct gdbarch *gdbarch) | |
4112 | { | |
4113 | gdb_assert (gdbarch != NULL); | |
4114 | return gdbarch->stap_is_single_operand != NULL; | |
4115 | } | |
4116 | ||
4117 | int | |
4118 | gdbarch_stap_is_single_operand (struct gdbarch *gdbarch, const char *s) | |
4119 | { | |
4120 | gdb_assert (gdbarch != NULL); | |
4121 | gdb_assert (gdbarch->stap_is_single_operand != NULL); | |
4122 | if (gdbarch_debug >= 2) | |
4123 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_is_single_operand called\n"); | |
4124 | return gdbarch->stap_is_single_operand (gdbarch, s); | |
4125 | } | |
4126 | ||
4127 | void | |
4128 | set_gdbarch_stap_is_single_operand (struct gdbarch *gdbarch, | |
4129 | gdbarch_stap_is_single_operand_ftype stap_is_single_operand) | |
4130 | { | |
4131 | gdbarch->stap_is_single_operand = stap_is_single_operand; | |
4132 | } | |
4133 | ||
4134 | int | |
4135 | gdbarch_stap_parse_special_token_p (struct gdbarch *gdbarch) | |
4136 | { | |
4137 | gdb_assert (gdbarch != NULL); | |
4138 | return gdbarch->stap_parse_special_token != NULL; | |
4139 | } | |
4140 | ||
4141 | int | |
4142 | gdbarch_stap_parse_special_token (struct gdbarch *gdbarch, struct stap_parse_info *p) | |
4143 | { | |
4144 | gdb_assert (gdbarch != NULL); | |
4145 | gdb_assert (gdbarch->stap_parse_special_token != NULL); | |
4146 | if (gdbarch_debug >= 2) | |
4147 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_parse_special_token called\n"); | |
4148 | return gdbarch->stap_parse_special_token (gdbarch, p); | |
4149 | } | |
4150 | ||
4151 | void | |
4152 | set_gdbarch_stap_parse_special_token (struct gdbarch *gdbarch, | |
4153 | gdbarch_stap_parse_special_token_ftype stap_parse_special_token) | |
4154 | { | |
4155 | gdbarch->stap_parse_special_token = stap_parse_special_token; | |
4156 | } | |
4157 | ||
50c71eaf PA |
4158 | int |
4159 | gdbarch_has_global_solist (struct gdbarch *gdbarch) | |
4160 | { | |
4161 | gdb_assert (gdbarch != NULL); | |
4162 | /* Skip verify of has_global_solist, invalid_p == 0 */ | |
4163 | if (gdbarch_debug >= 2) | |
4164 | fprintf_unfiltered (gdb_stdlog, "gdbarch_has_global_solist called\n"); | |
4165 | return gdbarch->has_global_solist; | |
4166 | } | |
4167 | ||
4168 | void | |
4169 | set_gdbarch_has_global_solist (struct gdbarch *gdbarch, | |
4170 | int has_global_solist) | |
4171 | { | |
4172 | gdbarch->has_global_solist = has_global_solist; | |
4173 | } | |
4174 | ||
2567c7d9 PA |
4175 | int |
4176 | gdbarch_has_global_breakpoints (struct gdbarch *gdbarch) | |
4177 | { | |
4178 | gdb_assert (gdbarch != NULL); | |
4179 | /* Skip verify of has_global_breakpoints, invalid_p == 0 */ | |
4180 | if (gdbarch_debug >= 2) | |
4181 | fprintf_unfiltered (gdb_stdlog, "gdbarch_has_global_breakpoints called\n"); | |
4182 | return gdbarch->has_global_breakpoints; | |
4183 | } | |
4184 | ||
4185 | void | |
4186 | set_gdbarch_has_global_breakpoints (struct gdbarch *gdbarch, | |
4187 | int has_global_breakpoints) | |
4188 | { | |
4189 | gdbarch->has_global_breakpoints = has_global_breakpoints; | |
4190 | } | |
4191 | ||
6c95b8df PA |
4192 | int |
4193 | gdbarch_has_shared_address_space (struct gdbarch *gdbarch) | |
4194 | { | |
4195 | gdb_assert (gdbarch != NULL); | |
4196 | gdb_assert (gdbarch->has_shared_address_space != NULL); | |
4197 | if (gdbarch_debug >= 2) | |
4198 | fprintf_unfiltered (gdb_stdlog, "gdbarch_has_shared_address_space called\n"); | |
4199 | return gdbarch->has_shared_address_space (gdbarch); | |
4200 | } | |
4201 | ||
4202 | void | |
4203 | set_gdbarch_has_shared_address_space (struct gdbarch *gdbarch, | |
4204 | gdbarch_has_shared_address_space_ftype has_shared_address_space) | |
4205 | { | |
4206 | gdbarch->has_shared_address_space = has_shared_address_space; | |
4207 | } | |
4208 | ||
7a697b8d SS |
4209 | int |
4210 | gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch, CORE_ADDR addr, int *isize, char **msg) | |
4211 | { | |
4212 | gdb_assert (gdbarch != NULL); | |
4213 | gdb_assert (gdbarch->fast_tracepoint_valid_at != NULL); | |
4214 | if (gdbarch_debug >= 2) | |
4215 | fprintf_unfiltered (gdb_stdlog, "gdbarch_fast_tracepoint_valid_at called\n"); | |
4216 | return gdbarch->fast_tracepoint_valid_at (gdbarch, addr, isize, msg); | |
4217 | } | |
4218 | ||
4219 | void | |
4220 | set_gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch, | |
4221 | gdbarch_fast_tracepoint_valid_at_ftype fast_tracepoint_valid_at) | |
4222 | { | |
4223 | gdbarch->fast_tracepoint_valid_at = fast_tracepoint_valid_at; | |
4224 | } | |
4225 | ||
f870a310 TT |
4226 | const char * |
4227 | gdbarch_auto_charset (struct gdbarch *gdbarch) | |
4228 | { | |
4229 | gdb_assert (gdbarch != NULL); | |
4230 | gdb_assert (gdbarch->auto_charset != NULL); | |
4231 | if (gdbarch_debug >= 2) | |
4232 | fprintf_unfiltered (gdb_stdlog, "gdbarch_auto_charset called\n"); | |
4233 | return gdbarch->auto_charset (); | |
4234 | } | |
4235 | ||
4236 | void | |
4237 | set_gdbarch_auto_charset (struct gdbarch *gdbarch, | |
4238 | gdbarch_auto_charset_ftype auto_charset) | |
4239 | { | |
4240 | gdbarch->auto_charset = auto_charset; | |
4241 | } | |
4242 | ||
4243 | const char * | |
4244 | gdbarch_auto_wide_charset (struct gdbarch *gdbarch) | |
4245 | { | |
4246 | gdb_assert (gdbarch != NULL); | |
4247 | gdb_assert (gdbarch->auto_wide_charset != NULL); | |
4248 | if (gdbarch_debug >= 2) | |
4249 | fprintf_unfiltered (gdb_stdlog, "gdbarch_auto_wide_charset called\n"); | |
4250 | return gdbarch->auto_wide_charset (); | |
4251 | } | |
4252 | ||
4253 | void | |
4254 | set_gdbarch_auto_wide_charset (struct gdbarch *gdbarch, | |
4255 | gdbarch_auto_wide_charset_ftype auto_wide_charset) | |
4256 | { | |
4257 | gdbarch->auto_wide_charset = auto_wide_charset; | |
4258 | } | |
4259 | ||
08105857 PA |
4260 | const char * |
4261 | gdbarch_solib_symbols_extension (struct gdbarch *gdbarch) | |
4262 | { | |
4263 | gdb_assert (gdbarch != NULL); | |
4264 | if (gdbarch_debug >= 2) | |
4265 | fprintf_unfiltered (gdb_stdlog, "gdbarch_solib_symbols_extension called\n"); | |
4266 | return gdbarch->solib_symbols_extension; | |
4267 | } | |
4268 | ||
4269 | void | |
4270 | set_gdbarch_solib_symbols_extension (struct gdbarch *gdbarch, | |
4271 | const char * solib_symbols_extension) | |
4272 | { | |
4273 | gdbarch->solib_symbols_extension = solib_symbols_extension; | |
4274 | } | |
4275 | ||
ab38a727 PA |
4276 | int |
4277 | gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch) | |
4278 | { | |
4279 | gdb_assert (gdbarch != NULL); | |
4280 | /* Skip verify of has_dos_based_file_system, invalid_p == 0 */ | |
4281 | if (gdbarch_debug >= 2) | |
4282 | fprintf_unfiltered (gdb_stdlog, "gdbarch_has_dos_based_file_system called\n"); | |
4283 | return gdbarch->has_dos_based_file_system; | |
4284 | } | |
4285 | ||
4286 | void | |
4287 | set_gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch, | |
4288 | int has_dos_based_file_system) | |
4289 | { | |
4290 | gdbarch->has_dos_based_file_system = has_dos_based_file_system; | |
4291 | } | |
4292 | ||
6710bf39 SS |
4293 | void |
4294 | gdbarch_gen_return_address (struct gdbarch *gdbarch, struct agent_expr *ax, struct axs_value *value, CORE_ADDR scope) | |
4295 | { | |
4296 | gdb_assert (gdbarch != NULL); | |
4297 | gdb_assert (gdbarch->gen_return_address != NULL); | |
4298 | if (gdbarch_debug >= 2) | |
4299 | fprintf_unfiltered (gdb_stdlog, "gdbarch_gen_return_address called\n"); | |
4300 | gdbarch->gen_return_address (gdbarch, ax, value, scope); | |
4301 | } | |
4302 | ||
4303 | void | |
4304 | set_gdbarch_gen_return_address (struct gdbarch *gdbarch, | |
4305 | gdbarch_gen_return_address_ftype gen_return_address) | |
4306 | { | |
4307 | gdbarch->gen_return_address = gen_return_address; | |
4308 | } | |
4309 | ||
3030c96e UW |
4310 | int |
4311 | gdbarch_info_proc_p (struct gdbarch *gdbarch) | |
4312 | { | |
4313 | gdb_assert (gdbarch != NULL); | |
4314 | return gdbarch->info_proc != NULL; | |
4315 | } | |
4316 | ||
4317 | void | |
4318 | gdbarch_info_proc (struct gdbarch *gdbarch, char *args, enum info_proc_what what) | |
4319 | { | |
4320 | gdb_assert (gdbarch != NULL); | |
4321 | gdb_assert (gdbarch->info_proc != NULL); | |
4322 | if (gdbarch_debug >= 2) | |
4323 | fprintf_unfiltered (gdb_stdlog, "gdbarch_info_proc called\n"); | |
4324 | gdbarch->info_proc (gdbarch, args, what); | |
4325 | } | |
4326 | ||
4327 | void | |
4328 | set_gdbarch_info_proc (struct gdbarch *gdbarch, | |
4329 | gdbarch_info_proc_ftype info_proc) | |
4330 | { | |
4331 | gdbarch->info_proc = info_proc; | |
4332 | } | |
4333 | ||
451b7c33 TT |
4334 | int |
4335 | gdbarch_core_info_proc_p (struct gdbarch *gdbarch) | |
4336 | { | |
4337 | gdb_assert (gdbarch != NULL); | |
4338 | return gdbarch->core_info_proc != NULL; | |
4339 | } | |
4340 | ||
4341 | void | |
4342 | gdbarch_core_info_proc (struct gdbarch *gdbarch, char *args, enum info_proc_what what) | |
4343 | { | |
4344 | gdb_assert (gdbarch != NULL); | |
4345 | gdb_assert (gdbarch->core_info_proc != NULL); | |
4346 | if (gdbarch_debug >= 2) | |
4347 | fprintf_unfiltered (gdb_stdlog, "gdbarch_core_info_proc called\n"); | |
4348 | gdbarch->core_info_proc (gdbarch, args, what); | |
4349 | } | |
4350 | ||
4351 | void | |
4352 | set_gdbarch_core_info_proc (struct gdbarch *gdbarch, | |
4353 | gdbarch_core_info_proc_ftype core_info_proc) | |
4354 | { | |
4355 | gdbarch->core_info_proc = core_info_proc; | |
4356 | } | |
4357 | ||
19630284 JB |
4358 | void |
4359 | gdbarch_iterate_over_objfiles_in_search_order (struct gdbarch *gdbarch, iterate_over_objfiles_in_search_order_cb_ftype *cb, void *cb_data, struct objfile *current_objfile) | |
4360 | { | |
4361 | gdb_assert (gdbarch != NULL); | |
4362 | gdb_assert (gdbarch->iterate_over_objfiles_in_search_order != NULL); | |
4363 | if (gdbarch_debug >= 2) | |
4364 | fprintf_unfiltered (gdb_stdlog, "gdbarch_iterate_over_objfiles_in_search_order called\n"); | |
4365 | gdbarch->iterate_over_objfiles_in_search_order (gdbarch, cb, cb_data, current_objfile); | |
4366 | } | |
4367 | ||
4368 | void | |
4369 | set_gdbarch_iterate_over_objfiles_in_search_order (struct gdbarch *gdbarch, | |
4370 | gdbarch_iterate_over_objfiles_in_search_order_ftype iterate_over_objfiles_in_search_order) | |
4371 | { | |
4372 | gdbarch->iterate_over_objfiles_in_search_order = iterate_over_objfiles_in_search_order; | |
4373 | } | |
4374 | ||
7e35103a JB |
4375 | struct ravenscar_arch_ops * |
4376 | gdbarch_ravenscar_ops (struct gdbarch *gdbarch) | |
4377 | { | |
4378 | gdb_assert (gdbarch != NULL); | |
4379 | /* Skip verify of ravenscar_ops, invalid_p == 0 */ | |
4380 | if (gdbarch_debug >= 2) | |
4381 | fprintf_unfiltered (gdb_stdlog, "gdbarch_ravenscar_ops called\n"); | |
4382 | return gdbarch->ravenscar_ops; | |
4383 | } | |
4384 | ||
4385 | void | |
4386 | set_gdbarch_ravenscar_ops (struct gdbarch *gdbarch, | |
4387 | struct ravenscar_arch_ops * ravenscar_ops) | |
4388 | { | |
4389 | gdbarch->ravenscar_ops = ravenscar_ops; | |
4390 | } | |
4391 | ||
0f71a2f6 | 4392 | |
be5a57e1 | 4393 | /* Keep a registry of per-architecture data-pointers required by GDB |
0963b4bd | 4394 | modules. */ |
0f71a2f6 JM |
4395 | |
4396 | struct gdbarch_data | |
4397 | { | |
95160752 | 4398 | unsigned index; |
76860b5f | 4399 | int init_p; |
030f20e1 AC |
4400 | gdbarch_data_pre_init_ftype *pre_init; |
4401 | gdbarch_data_post_init_ftype *post_init; | |
0f71a2f6 JM |
4402 | }; |
4403 | ||
4404 | struct gdbarch_data_registration | |
adf40b2e | 4405 | { |
adf40b2e JM |
4406 | struct gdbarch_data *data; |
4407 | struct gdbarch_data_registration *next; | |
4408 | }; | |
0f71a2f6 | 4409 | |
be5a57e1 | 4410 | struct gdbarch_data_registry |
adf40b2e | 4411 | { |
95160752 | 4412 | unsigned nr; |
adf40b2e JM |
4413 | struct gdbarch_data_registration *registrations; |
4414 | }; | |
0f71a2f6 | 4415 | |
be5a57e1 | 4416 | struct gdbarch_data_registry gdbarch_data_registry = |
0f71a2f6 JM |
4417 | { |
4418 | 0, NULL, | |
4419 | }; | |
4420 | ||
030f20e1 AC |
4421 | static struct gdbarch_data * |
4422 | gdbarch_data_register (gdbarch_data_pre_init_ftype *pre_init, | |
4423 | gdbarch_data_post_init_ftype *post_init) | |
0f71a2f6 JM |
4424 | { |
4425 | struct gdbarch_data_registration **curr; | |
05c547f6 MS |
4426 | |
4427 | /* Append the new registration. */ | |
be5a57e1 | 4428 | for (curr = &gdbarch_data_registry.registrations; |
0f71a2f6 JM |
4429 | (*curr) != NULL; |
4430 | curr = &(*curr)->next); | |
4431 | (*curr) = XMALLOC (struct gdbarch_data_registration); | |
4432 | (*curr)->next = NULL; | |
0f71a2f6 | 4433 | (*curr)->data = XMALLOC (struct gdbarch_data); |
be5a57e1 | 4434 | (*curr)->data->index = gdbarch_data_registry.nr++; |
030f20e1 AC |
4435 | (*curr)->data->pre_init = pre_init; |
4436 | (*curr)->data->post_init = post_init; | |
76860b5f | 4437 | (*curr)->data->init_p = 1; |
0f71a2f6 JM |
4438 | return (*curr)->data; |
4439 | } | |
4440 | ||
030f20e1 AC |
4441 | struct gdbarch_data * |
4442 | gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype *pre_init) | |
4443 | { | |
4444 | return gdbarch_data_register (pre_init, NULL); | |
4445 | } | |
4446 | ||
4447 | struct gdbarch_data * | |
4448 | gdbarch_data_register_post_init (gdbarch_data_post_init_ftype *post_init) | |
4449 | { | |
4450 | return gdbarch_data_register (NULL, post_init); | |
4451 | } | |
0f71a2f6 | 4452 | |
0963b4bd | 4453 | /* Create/delete the gdbarch data vector. */ |
95160752 AC |
4454 | |
4455 | static void | |
b3cc3077 | 4456 | alloc_gdbarch_data (struct gdbarch *gdbarch) |
95160752 | 4457 | { |
b3cc3077 JB |
4458 | gdb_assert (gdbarch->data == NULL); |
4459 | gdbarch->nr_data = gdbarch_data_registry.nr; | |
aebd7893 | 4460 | gdbarch->data = GDBARCH_OBSTACK_CALLOC (gdbarch, gdbarch->nr_data, void *); |
0f71a2f6 JM |
4461 | } |
4462 | ||
76860b5f | 4463 | /* Initialize the current value of the specified per-architecture |
0963b4bd | 4464 | data-pointer. */ |
b3cc3077 | 4465 | |
95160752 | 4466 | void |
030f20e1 AC |
4467 | deprecated_set_gdbarch_data (struct gdbarch *gdbarch, |
4468 | struct gdbarch_data *data, | |
4469 | void *pointer) | |
95160752 AC |
4470 | { |
4471 | gdb_assert (data->index < gdbarch->nr_data); | |
aebd7893 | 4472 | gdb_assert (gdbarch->data[data->index] == NULL); |
030f20e1 | 4473 | gdb_assert (data->pre_init == NULL); |
95160752 AC |
4474 | gdbarch->data[data->index] = pointer; |
4475 | } | |
4476 | ||
0f71a2f6 | 4477 | /* Return the current value of the specified per-architecture |
0963b4bd | 4478 | data-pointer. */ |
0f71a2f6 JM |
4479 | |
4480 | void * | |
451fbdda | 4481 | gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data) |
0f71a2f6 | 4482 | { |
451fbdda | 4483 | gdb_assert (data->index < gdbarch->nr_data); |
030f20e1 | 4484 | if (gdbarch->data[data->index] == NULL) |
76860b5f | 4485 | { |
030f20e1 AC |
4486 | /* The data-pointer isn't initialized, call init() to get a |
4487 | value. */ | |
4488 | if (data->pre_init != NULL) | |
4489 | /* Mid architecture creation: pass just the obstack, and not | |
4490 | the entire architecture, as that way it isn't possible for | |
4491 | pre-init code to refer to undefined architecture | |
4492 | fields. */ | |
4493 | gdbarch->data[data->index] = data->pre_init (gdbarch->obstack); | |
4494 | else if (gdbarch->initialized_p | |
4495 | && data->post_init != NULL) | |
4496 | /* Post architecture creation: pass the entire architecture | |
4497 | (as all fields are valid), but be careful to also detect | |
4498 | recursive references. */ | |
4499 | { | |
4500 | gdb_assert (data->init_p); | |
4501 | data->init_p = 0; | |
4502 | gdbarch->data[data->index] = data->post_init (gdbarch); | |
4503 | data->init_p = 1; | |
4504 | } | |
4505 | else | |
4506 | /* The architecture initialization hasn't completed - punt - | |
4507 | hope that the caller knows what they are doing. Once | |
4508 | deprecated_set_gdbarch_data has been initialized, this can be | |
4509 | changed to an internal error. */ | |
4510 | return NULL; | |
76860b5f AC |
4511 | gdb_assert (gdbarch->data[data->index] != NULL); |
4512 | } | |
451fbdda | 4513 | return gdbarch->data[data->index]; |
0f71a2f6 JM |
4514 | } |
4515 | ||
4516 | ||
0963b4bd | 4517 | /* Keep a registry of the architectures known by GDB. */ |
0f71a2f6 | 4518 | |
4b9b3959 | 4519 | struct gdbarch_registration |
0f71a2f6 JM |
4520 | { |
4521 | enum bfd_architecture bfd_architecture; | |
4522 | gdbarch_init_ftype *init; | |
4b9b3959 | 4523 | gdbarch_dump_tdep_ftype *dump_tdep; |
0f71a2f6 | 4524 | struct gdbarch_list *arches; |
4b9b3959 | 4525 | struct gdbarch_registration *next; |
0f71a2f6 JM |
4526 | }; |
4527 | ||
be5a57e1 | 4528 | static struct gdbarch_registration *gdbarch_registry = NULL; |
0f71a2f6 | 4529 | |
b4a20239 AC |
4530 | static void |
4531 | append_name (const char ***buf, int *nr, const char *name) | |
4532 | { | |
4533 | *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1)); | |
4534 | (*buf)[*nr] = name; | |
4535 | *nr += 1; | |
4536 | } | |
4537 | ||
4538 | const char ** | |
4539 | gdbarch_printable_names (void) | |
4540 | { | |
7996bcec | 4541 | /* Accumulate a list of names based on the registed list of |
0963b4bd | 4542 | architectures. */ |
7996bcec AC |
4543 | int nr_arches = 0; |
4544 | const char **arches = NULL; | |
4545 | struct gdbarch_registration *rego; | |
05c547f6 | 4546 | |
7996bcec AC |
4547 | for (rego = gdbarch_registry; |
4548 | rego != NULL; | |
4549 | rego = rego->next) | |
b4a20239 | 4550 | { |
7996bcec AC |
4551 | const struct bfd_arch_info *ap; |
4552 | ap = bfd_lookup_arch (rego->bfd_architecture, 0); | |
4553 | if (ap == NULL) | |
4554 | internal_error (__FILE__, __LINE__, | |
e2e0b3e5 | 4555 | _("gdbarch_architecture_names: multi-arch unknown")); |
7996bcec AC |
4556 | do |
4557 | { | |
4558 | append_name (&arches, &nr_arches, ap->printable_name); | |
4559 | ap = ap->next; | |
4560 | } | |
4561 | while (ap != NULL); | |
b4a20239 | 4562 | } |
7996bcec AC |
4563 | append_name (&arches, &nr_arches, NULL); |
4564 | return arches; | |
b4a20239 AC |
4565 | } |
4566 | ||
4567 | ||
0f71a2f6 | 4568 | void |
4b9b3959 AC |
4569 | gdbarch_register (enum bfd_architecture bfd_architecture, |
4570 | gdbarch_init_ftype *init, | |
4571 | gdbarch_dump_tdep_ftype *dump_tdep) | |
0f71a2f6 | 4572 | { |
4b9b3959 | 4573 | struct gdbarch_registration **curr; |
0f71a2f6 | 4574 | const struct bfd_arch_info *bfd_arch_info; |
05c547f6 | 4575 | |
ec3d358c | 4576 | /* Check that BFD recognizes this architecture */ |
0f71a2f6 JM |
4577 | bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0); |
4578 | if (bfd_arch_info == NULL) | |
4579 | { | |
8e65ff28 | 4580 | internal_error (__FILE__, __LINE__, |
0963b4bd MS |
4581 | _("gdbarch: Attempt to register " |
4582 | "unknown architecture (%d)"), | |
8e65ff28 | 4583 | bfd_architecture); |
0f71a2f6 | 4584 | } |
0963b4bd | 4585 | /* Check that we haven't seen this architecture before. */ |
be5a57e1 | 4586 | for (curr = &gdbarch_registry; |
0f71a2f6 JM |
4587 | (*curr) != NULL; |
4588 | curr = &(*curr)->next) | |
4589 | { | |
4590 | if (bfd_architecture == (*curr)->bfd_architecture) | |
8e65ff28 | 4591 | internal_error (__FILE__, __LINE__, |
64b9b334 | 4592 | _("gdbarch: Duplicate registration " |
0963b4bd | 4593 | "of architecture (%s)"), |
8e65ff28 | 4594 | bfd_arch_info->printable_name); |
0f71a2f6 JM |
4595 | } |
4596 | /* log it */ | |
4597 | if (gdbarch_debug) | |
30737ed9 | 4598 | fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, %s)\n", |
0f71a2f6 | 4599 | bfd_arch_info->printable_name, |
30737ed9 | 4600 | host_address_to_string (init)); |
0f71a2f6 | 4601 | /* Append it */ |
4b9b3959 | 4602 | (*curr) = XMALLOC (struct gdbarch_registration); |
0f71a2f6 JM |
4603 | (*curr)->bfd_architecture = bfd_architecture; |
4604 | (*curr)->init = init; | |
4b9b3959 | 4605 | (*curr)->dump_tdep = dump_tdep; |
0f71a2f6 JM |
4606 | (*curr)->arches = NULL; |
4607 | (*curr)->next = NULL; | |
4b9b3959 AC |
4608 | } |
4609 | ||
4610 | void | |
4611 | register_gdbarch_init (enum bfd_architecture bfd_architecture, | |
4612 | gdbarch_init_ftype *init) | |
4613 | { | |
4614 | gdbarch_register (bfd_architecture, init, NULL); | |
0f71a2f6 | 4615 | } |
0f71a2f6 JM |
4616 | |
4617 | ||
424163ea | 4618 | /* Look for an architecture using gdbarch_info. */ |
0f71a2f6 JM |
4619 | |
4620 | struct gdbarch_list * | |
104c1213 JM |
4621 | gdbarch_list_lookup_by_info (struct gdbarch_list *arches, |
4622 | const struct gdbarch_info *info) | |
0f71a2f6 JM |
4623 | { |
4624 | for (; arches != NULL; arches = arches->next) | |
4625 | { | |
4626 | if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info) | |
4627 | continue; | |
4628 | if (info->byte_order != arches->gdbarch->byte_order) | |
4629 | continue; | |
4be87837 DJ |
4630 | if (info->osabi != arches->gdbarch->osabi) |
4631 | continue; | |
424163ea DJ |
4632 | if (info->target_desc != arches->gdbarch->target_desc) |
4633 | continue; | |
0f71a2f6 JM |
4634 | return arches; |
4635 | } | |
4636 | return NULL; | |
4637 | } | |
4638 | ||
4639 | ||
ebdba546 | 4640 | /* Find an architecture that matches the specified INFO. Create a new |
59837fe0 | 4641 | architecture if needed. Return that new architecture. */ |
0f71a2f6 | 4642 | |
59837fe0 UW |
4643 | struct gdbarch * |
4644 | gdbarch_find_by_info (struct gdbarch_info info) | |
0f71a2f6 JM |
4645 | { |
4646 | struct gdbarch *new_gdbarch; | |
4b9b3959 | 4647 | struct gdbarch_registration *rego; |
0f71a2f6 | 4648 | |
b732d07d | 4649 | /* Fill in missing parts of the INFO struct using a number of |
7a107747 DJ |
4650 | sources: "set ..."; INFOabfd supplied; and the global |
4651 | defaults. */ | |
4652 | gdbarch_info_fill (&info); | |
4be87837 | 4653 | |
0963b4bd | 4654 | /* Must have found some sort of architecture. */ |
b732d07d | 4655 | gdb_assert (info.bfd_arch_info != NULL); |
0f71a2f6 JM |
4656 | |
4657 | if (gdbarch_debug) | |
4658 | { | |
0f71a2f6 | 4659 | fprintf_unfiltered (gdb_stdlog, |
59837fe0 | 4660 | "gdbarch_find_by_info: info.bfd_arch_info %s\n", |
0f71a2f6 JM |
4661 | (info.bfd_arch_info != NULL |
4662 | ? info.bfd_arch_info->printable_name | |
4663 | : "(null)")); | |
4664 | fprintf_unfiltered (gdb_stdlog, | |
59837fe0 | 4665 | "gdbarch_find_by_info: info.byte_order %d (%s)\n", |
0f71a2f6 | 4666 | info.byte_order, |
d7449b42 | 4667 | (info.byte_order == BFD_ENDIAN_BIG ? "big" |
778eb05e | 4668 | : info.byte_order == BFD_ENDIAN_LITTLE ? "little" |
0f71a2f6 | 4669 | : "default")); |
4be87837 | 4670 | fprintf_unfiltered (gdb_stdlog, |
59837fe0 | 4671 | "gdbarch_find_by_info: info.osabi %d (%s)\n", |
4be87837 | 4672 | info.osabi, gdbarch_osabi_name (info.osabi)); |
0f71a2f6 | 4673 | fprintf_unfiltered (gdb_stdlog, |
59837fe0 | 4674 | "gdbarch_find_by_info: info.abfd %s\n", |
30737ed9 | 4675 | host_address_to_string (info.abfd)); |
0f71a2f6 | 4676 | fprintf_unfiltered (gdb_stdlog, |
59837fe0 | 4677 | "gdbarch_find_by_info: info.tdep_info %s\n", |
30737ed9 | 4678 | host_address_to_string (info.tdep_info)); |
0f71a2f6 JM |
4679 | } |
4680 | ||
ebdba546 | 4681 | /* Find the tdep code that knows about this architecture. */ |
b732d07d AC |
4682 | for (rego = gdbarch_registry; |
4683 | rego != NULL; | |
4684 | rego = rego->next) | |
4685 | if (rego->bfd_architecture == info.bfd_arch_info->arch) | |
4686 | break; | |
4687 | if (rego == NULL) | |
4688 | { | |
4689 | if (gdbarch_debug) | |
59837fe0 | 4690 | fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: " |
ebdba546 | 4691 | "No matching architecture\n"); |
b732d07d AC |
4692 | return 0; |
4693 | } | |
4694 | ||
ebdba546 | 4695 | /* Ask the tdep code for an architecture that matches "info". */ |
0f71a2f6 JM |
4696 | new_gdbarch = rego->init (info, rego->arches); |
4697 | ||
ebdba546 AC |
4698 | /* Did the tdep code like it? No. Reject the change and revert to |
4699 | the old architecture. */ | |
0f71a2f6 JM |
4700 | if (new_gdbarch == NULL) |
4701 | { | |
4702 | if (gdbarch_debug) | |
59837fe0 | 4703 | fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: " |
ebdba546 AC |
4704 | "Target rejected architecture\n"); |
4705 | return NULL; | |
0f71a2f6 JM |
4706 | } |
4707 | ||
ebdba546 AC |
4708 | /* Is this a pre-existing architecture (as determined by already |
4709 | being initialized)? Move it to the front of the architecture | |
4710 | list (keeping the list sorted Most Recently Used). */ | |
4711 | if (new_gdbarch->initialized_p) | |
0f71a2f6 | 4712 | { |
ebdba546 AC |
4713 | struct gdbarch_list **list; |
4714 | struct gdbarch_list *this; | |
0f71a2f6 | 4715 | if (gdbarch_debug) |
59837fe0 | 4716 | fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: " |
30737ed9 JB |
4717 | "Previous architecture %s (%s) selected\n", |
4718 | host_address_to_string (new_gdbarch), | |
0f71a2f6 | 4719 | new_gdbarch->bfd_arch_info->printable_name); |
ebdba546 AC |
4720 | /* Find the existing arch in the list. */ |
4721 | for (list = ®o->arches; | |
4722 | (*list) != NULL && (*list)->gdbarch != new_gdbarch; | |
4723 | list = &(*list)->next); | |
4724 | /* It had better be in the list of architectures. */ | |
4725 | gdb_assert ((*list) != NULL && (*list)->gdbarch == new_gdbarch); | |
4726 | /* Unlink THIS. */ | |
4727 | this = (*list); | |
4728 | (*list) = this->next; | |
4729 | /* Insert THIS at the front. */ | |
4730 | this->next = rego->arches; | |
4731 | rego->arches = this; | |
4732 | /* Return it. */ | |
4733 | return new_gdbarch; | |
0f71a2f6 JM |
4734 | } |
4735 | ||
ebdba546 AC |
4736 | /* It's a new architecture. */ |
4737 | if (gdbarch_debug) | |
59837fe0 | 4738 | fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: " |
30737ed9 JB |
4739 | "New architecture %s (%s) selected\n", |
4740 | host_address_to_string (new_gdbarch), | |
ebdba546 AC |
4741 | new_gdbarch->bfd_arch_info->printable_name); |
4742 | ||
4743 | /* Insert the new architecture into the front of the architecture | |
4744 | list (keep the list sorted Most Recently Used). */ | |
0f79675b AC |
4745 | { |
4746 | struct gdbarch_list *this = XMALLOC (struct gdbarch_list); | |
4747 | this->next = rego->arches; | |
4748 | this->gdbarch = new_gdbarch; | |
4749 | rego->arches = this; | |
4750 | } | |
0f71a2f6 | 4751 | |
4b9b3959 AC |
4752 | /* Check that the newly installed architecture is valid. Plug in |
4753 | any post init values. */ | |
4754 | new_gdbarch->dump_tdep = rego->dump_tdep; | |
0f71a2f6 | 4755 | verify_gdbarch (new_gdbarch); |
ebdba546 | 4756 | new_gdbarch->initialized_p = 1; |
0f71a2f6 | 4757 | |
4b9b3959 | 4758 | if (gdbarch_debug) |
ebdba546 | 4759 | gdbarch_dump (new_gdbarch, gdb_stdlog); |
4b9b3959 | 4760 | |
ebdba546 | 4761 | return new_gdbarch; |
0f71a2f6 | 4762 | } |
c906108c | 4763 | |
e487cc15 | 4764 | /* Make the specified architecture current. */ |
ebdba546 AC |
4765 | |
4766 | void | |
aff68abb | 4767 | set_target_gdbarch (struct gdbarch *new_gdbarch) |
ebdba546 AC |
4768 | { |
4769 | gdb_assert (new_gdbarch != NULL); | |
ebdba546 | 4770 | gdb_assert (new_gdbarch->initialized_p); |
6ecd4729 | 4771 | current_inferior ()->gdbarch = new_gdbarch; |
383f836e | 4772 | observer_notify_architecture_changed (new_gdbarch); |
a3ecef73 | 4773 | registers_changed (); |
ebdba546 | 4774 | } |
c906108c | 4775 | |
f5656ead | 4776 | /* Return the current inferior's arch. */ |
6ecd4729 PA |
4777 | |
4778 | struct gdbarch * | |
f5656ead | 4779 | target_gdbarch (void) |
6ecd4729 PA |
4780 | { |
4781 | return current_inferior ()->gdbarch; | |
4782 | } | |
4783 | ||
104c1213 | 4784 | extern void _initialize_gdbarch (void); |
b4a20239 | 4785 | |
c906108c | 4786 | void |
7c7651b2 | 4787 | _initialize_gdbarch (void) |
c906108c | 4788 | { |
ccce17b0 | 4789 | add_setshow_zuinteger_cmd ("arch", class_maintenance, &gdbarch_debug, _("\ |
85c07804 AC |
4790 | Set architecture debugging."), _("\ |
4791 | Show architecture debugging."), _("\ | |
4792 | When non-zero, architecture debugging is enabled."), | |
4793 | NULL, | |
920d2a44 | 4794 | show_gdbarch_debug, |
85c07804 | 4795 | &setdebuglist, &showdebuglist); |
c906108c | 4796 | } |