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 | |
3666a048 | 6 | Copyright (C) 1998-2021 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. |
618f726f | 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. | |
618f726f | 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 | |
41a77cba | 23 | /* This file was created with the aid of ``gdbarch.sh''. */ |
c906108c | 24 | |
c906108c SS |
25 | |
26 | #include "defs.h" | |
1ad03bde | 27 | #include "arch-utils.h" |
c906108c | 28 | |
0f71a2f6 | 29 | #include "gdbcmd.h" |
faaf634c | 30 | #include "inferior.h" |
7a292a7a | 31 | #include "symcat.h" |
c906108c | 32 | |
f0d4cc9e | 33 | #include "floatformat.h" |
b59ff9d5 | 34 | #include "reggroups.h" |
4be87837 | 35 | #include "osabi.h" |
aebd7893 | 36 | #include "gdb_obstack.h" |
76727919 | 37 | #include "observable.h" |
a3ecef73 | 38 | #include "regcache.h" |
19630284 | 39 | #include "objfiles.h" |
2faa3447 | 40 | #include "auxv.h" |
8bcb5208 AB |
41 | #include "frame-unwind.h" |
42 | #include "dummy-frame.h" | |
95160752 | 43 | |
104c1213 JM |
44 | /* Static function declarations */ |
45 | ||
b3cc3077 | 46 | static void alloc_gdbarch_data (struct gdbarch *); |
104c1213 | 47 | |
0f71a2f6 JM |
48 | /* Non-zero if we want to trace architecture code. */ |
49 | ||
50 | #ifndef GDBARCH_DEBUG | |
51 | #define GDBARCH_DEBUG 0 | |
52 | #endif | |
ccce17b0 | 53 | unsigned int gdbarch_debug = GDBARCH_DEBUG; |
920d2a44 AC |
54 | static void |
55 | show_gdbarch_debug (struct ui_file *file, int from_tty, | |
dda83cd7 | 56 | struct cmd_list_element *c, const char *value) |
920d2a44 AC |
57 | { |
58 | fprintf_filtered (file, _("Architecture debugging is %s.\n"), value); | |
59 | } | |
0f71a2f6 | 60 | |
456fcf94 | 61 | static const char * |
8da61cc4 | 62 | pformat (const struct floatformat **format) |
456fcf94 AC |
63 | { |
64 | if (format == NULL) | |
65 | return "(null)"; | |
66 | else | |
8da61cc4 DJ |
67 | /* Just print out one of them - this is only for diagnostics. */ |
68 | return format[0]->name; | |
456fcf94 AC |
69 | } |
70 | ||
08105857 PA |
71 | static const char * |
72 | pstring (const char *string) | |
73 | { | |
74 | if (string == NULL) | |
75 | return "(null)"; | |
76 | return string; | |
77 | } | |
78 | ||
a121b7c1 | 79 | static const char * |
f7bb4e3a PB |
80 | pstring_ptr (char **string) |
81 | { | |
82 | if (string == NULL || *string == NULL) | |
83 | return "(null)"; | |
84 | return *string; | |
85 | } | |
86 | ||
05c0465e SDJ |
87 | /* Helper function to print a list of strings, represented as "const |
88 | char *const *". The list is printed comma-separated. */ | |
89 | ||
a121b7c1 | 90 | static const char * |
05c0465e SDJ |
91 | pstring_list (const char *const *list) |
92 | { | |
93 | static char ret[100]; | |
94 | const char *const *p; | |
95 | size_t offset = 0; | |
96 | ||
97 | if (list == NULL) | |
98 | return "(null)"; | |
99 | ||
100 | ret[0] = '\0'; | |
101 | for (p = list; *p != NULL && offset < sizeof (ret); ++p) | |
102 | { | |
103 | size_t s = xsnprintf (ret + offset, sizeof (ret) - offset, "%s, ", *p); | |
104 | offset += 2 + s; | |
105 | } | |
106 | ||
107 | if (offset > 0) | |
108 | { | |
109 | gdb_assert (offset - 2 < sizeof (ret)); | |
110 | ret[offset - 2] = '\0'; | |
111 | } | |
112 | ||
113 | return ret; | |
114 | } | |
115 | ||
0f71a2f6 | 116 | |
0963b4bd | 117 | /* Maintain the struct gdbarch object. */ |
0f71a2f6 JM |
118 | |
119 | struct gdbarch | |
adf40b2e | 120 | { |
76860b5f AC |
121 | /* Has this architecture been fully initialized? */ |
122 | int initialized_p; | |
aebd7893 AC |
123 | |
124 | /* An obstack bound to the lifetime of the architecture. */ | |
125 | struct obstack *obstack; | |
126 | ||
0963b4bd | 127 | /* basic architectural information. */ |
adf40b2e | 128 | const struct bfd_arch_info * bfd_arch_info; |
94123b4f YQ |
129 | enum bfd_endian byte_order; |
130 | enum bfd_endian byte_order_for_code; | |
4be87837 | 131 | enum gdb_osabi osabi; |
424163ea | 132 | const struct target_desc * target_desc; |
0f71a2f6 | 133 | |
0963b4bd | 134 | /* target specific vector. */ |
adf40b2e | 135 | struct gdbarch_tdep *tdep; |
4b9b3959 | 136 | gdbarch_dump_tdep_ftype *dump_tdep; |
0f71a2f6 | 137 | |
0963b4bd | 138 | /* per-architecture data-pointers. */ |
95160752 | 139 | unsigned nr_data; |
adf40b2e | 140 | void **data; |
0f71a2f6 | 141 | |
adf40b2e | 142 | /* Multi-arch values. |
0f71a2f6 | 143 | |
adf40b2e | 144 | When extending this structure you must: |
0f71a2f6 | 145 | |
adf40b2e | 146 | Add the field below. |
0f71a2f6 | 147 | |
adf40b2e JM |
148 | Declare set/get functions and define the corresponding |
149 | macro in gdbarch.h. | |
0f71a2f6 | 150 | |
adf40b2e JM |
151 | gdbarch_alloc(): If zero/NULL is not a suitable default, |
152 | initialize the new field. | |
0f71a2f6 | 153 | |
adf40b2e JM |
154 | verify_gdbarch(): Confirm that the target updated the field |
155 | correctly. | |
0f71a2f6 | 156 | |
7e73cedf | 157 | gdbarch_dump(): Add a fprintf_unfiltered call so that the new |
adf40b2e | 158 | field is dumped out |
0f71a2f6 | 159 | |
adf40b2e JM |
160 | get_gdbarch(): Implement the set/get functions (probably using |
161 | the macro's as shortcuts). | |
0f71a2f6 JM |
162 | |
163 | */ | |
164 | ||
adf40b2e JM |
165 | int short_bit; |
166 | int int_bit; | |
167 | int long_bit; | |
168 | int long_long_bit; | |
2a67f09d FW |
169 | int bfloat16_bit; |
170 | const struct floatformat ** bfloat16_format; | |
f9e9243a UW |
171 | int half_bit; |
172 | const struct floatformat ** half_format; | |
adf40b2e | 173 | int float_bit; |
8da61cc4 | 174 | const struct floatformat ** float_format; |
adf40b2e | 175 | int double_bit; |
8da61cc4 | 176 | const struct floatformat ** double_format; |
adf40b2e | 177 | int long_double_bit; |
8da61cc4 | 178 | const struct floatformat ** long_double_format; |
53375380 PA |
179 | int wchar_bit; |
180 | int wchar_signed; | |
9b790ce7 | 181 | gdbarch_floatformat_for_type_ftype *floatformat_for_type; |
66b43ecb | 182 | int ptr_bit; |
52204a0b | 183 | int addr_bit; |
8da614df | 184 | int dwarf2_addr_size; |
4e409299 | 185 | int char_signed; |
adf40b2e JM |
186 | gdbarch_read_pc_ftype *read_pc; |
187 | gdbarch_write_pc_ftype *write_pc; | |
39d4ef09 | 188 | gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer; |
d8124050 | 189 | gdbarch_pseudo_register_read_ftype *pseudo_register_read; |
3543a589 | 190 | gdbarch_pseudo_register_read_value_ftype *pseudo_register_read_value; |
d8124050 | 191 | gdbarch_pseudo_register_write_ftype *pseudo_register_write; |
adf40b2e | 192 | int num_regs; |
0aba1244 | 193 | int num_pseudo_regs; |
175ff332 HZ |
194 | gdbarch_ax_pseudo_register_collect_ftype *ax_pseudo_register_collect; |
195 | gdbarch_ax_pseudo_register_push_stack_ftype *ax_pseudo_register_push_stack; | |
272bb05c | 196 | gdbarch_report_signal_info_ftype *report_signal_info; |
adf40b2e | 197 | int sp_regnum; |
adf40b2e | 198 | int pc_regnum; |
c2169756 | 199 | int ps_regnum; |
60054393 | 200 | int fp0_regnum; |
88c72b7d AC |
201 | gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum; |
202 | gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum; | |
88c72b7d AC |
203 | gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum; |
204 | gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum; | |
adf40b2e | 205 | gdbarch_register_name_ftype *register_name; |
9c04cab7 | 206 | gdbarch_register_type_ftype *register_type; |
669fac23 | 207 | gdbarch_dummy_id_ftype *dummy_id; |
f3be58bc | 208 | int deprecated_fp_regnum; |
b8de8283 | 209 | gdbarch_push_dummy_call_ftype *push_dummy_call; |
adf40b2e | 210 | int call_dummy_location; |
7043d8dc | 211 | gdbarch_push_dummy_code_ftype *push_dummy_code; |
7eb89530 | 212 | gdbarch_code_of_frame_writable_ftype *code_of_frame_writable; |
b8de8283 AC |
213 | gdbarch_print_registers_info_ftype *print_registers_info; |
214 | gdbarch_print_float_info_ftype *print_float_info; | |
215 | gdbarch_print_vector_info_ftype *print_vector_info; | |
216 | gdbarch_register_sim_regno_ftype *register_sim_regno; | |
b8de8283 AC |
217 | gdbarch_cannot_fetch_register_ftype *cannot_fetch_register; |
218 | gdbarch_cannot_store_register_ftype *cannot_store_register; | |
219 | gdbarch_get_longjmp_target_ftype *get_longjmp_target; | |
adf40b2e | 220 | int believe_pcc_promotion; |
13d01224 AC |
221 | gdbarch_convert_register_p_ftype *convert_register_p; |
222 | gdbarch_register_to_value_ftype *register_to_value; | |
223 | gdbarch_value_to_register_ftype *value_to_register; | |
9acbedc0 | 224 | gdbarch_value_from_register_ftype *value_from_register; |
4478b372 JB |
225 | gdbarch_pointer_to_address_ftype *pointer_to_address; |
226 | gdbarch_address_to_pointer_ftype *address_to_pointer; | |
fc0c74b1 | 227 | gdbarch_integer_to_address_ftype *integer_to_address; |
92ad9cd9 | 228 | gdbarch_return_value_ftype *return_value; |
18648a37 | 229 | gdbarch_return_in_first_hidden_param_p_ftype *return_in_first_hidden_param_p; |
adf40b2e | 230 | gdbarch_skip_prologue_ftype *skip_prologue; |
4309257c | 231 | gdbarch_skip_main_prologue_ftype *skip_main_prologue; |
591a12a1 | 232 | gdbarch_skip_entrypoint_ftype *skip_entrypoint; |
adf40b2e JM |
233 | gdbarch_inner_than_ftype *inner_than; |
234 | gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc; | |
cd6c3b4f YQ |
235 | gdbarch_breakpoint_kind_from_pc_ftype *breakpoint_kind_from_pc; |
236 | gdbarch_sw_breakpoint_from_kind_ftype *sw_breakpoint_from_kind; | |
833b7ab5 | 237 | gdbarch_breakpoint_kind_from_current_state_ftype *breakpoint_kind_from_current_state; |
a1131521 | 238 | gdbarch_adjust_breakpoint_address_ftype *adjust_breakpoint_address; |
917317f4 JM |
239 | gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint; |
240 | gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint; | |
adf40b2e | 241 | CORE_ADDR decr_pc_after_break; |
782263ab | 242 | CORE_ADDR deprecated_function_start_offset; |
123dc839 | 243 | gdbarch_remote_register_number_ftype *remote_register_number; |
b2756930 | 244 | gdbarch_fetch_tls_load_module_address_ftype *fetch_tls_load_module_address; |
6e056c81 | 245 | gdbarch_get_thread_local_address_ftype *get_thread_local_address; |
adf40b2e | 246 | CORE_ADDR frame_args_skip; |
12cc2063 | 247 | gdbarch_unwind_pc_ftype *unwind_pc; |
a9e5fdc2 | 248 | gdbarch_unwind_sp_ftype *unwind_sp; |
adf40b2e | 249 | gdbarch_frame_num_args_ftype *frame_num_args; |
dc604539 | 250 | gdbarch_frame_align_ftype *frame_align; |
192cb3d4 | 251 | gdbarch_stabs_argument_has_addr_ftype *stabs_argument_has_addr; |
8b148df9 | 252 | int frame_red_zone_size; |
f517ea4e | 253 | gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr; |
875e1767 | 254 | gdbarch_addr_bits_remove_ftype *addr_bits_remove; |
a738ea1d | 255 | int significant_addr_bit; |
64c4637f | 256 | gdbarch_software_single_step_ftype *software_single_step; |
3352ef37 | 257 | gdbarch_single_step_through_delay_ftype *single_step_through_delay; |
2bf0cb65 | 258 | gdbarch_print_insn_ftype *print_insn; |
bdcd319a | 259 | gdbarch_skip_trampoline_code_ftype *skip_trampoline_code; |
dea0c52f | 260 | gdbarch_skip_solib_resolver_ftype *skip_solib_resolver; |
d50355b6 | 261 | gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline; |
1d509aa6 | 262 | gdbarch_in_indirect_branch_thunk_ftype *in_indirect_branch_thunk; |
c9cf6e20 | 263 | gdbarch_stack_frame_destroyed_p_ftype *stack_frame_destroyed_p; |
a2cf933a EZ |
264 | gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special; |
265 | gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special; | |
3e29f34a MR |
266 | gdbarch_make_symbol_special_ftype *make_symbol_special; |
267 | gdbarch_adjust_dwarf2_addr_ftype *adjust_dwarf2_addr; | |
268 | gdbarch_adjust_dwarf2_line_ftype *adjust_dwarf2_line; | |
c4ed33b9 | 269 | int cannot_step_breakpoint; |
f74fa174 | 270 | int have_nonsteppable_watchpoint; |
8b2dbe47 KB |
271 | gdbarch_address_class_type_flags_ftype *address_class_type_flags; |
272 | gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name; | |
b41c5a85 | 273 | gdbarch_execute_dwarf_cfa_vendor_op_ftype *execute_dwarf_cfa_vendor_op; |
8b2dbe47 | 274 | gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags; |
b59ff9d5 | 275 | gdbarch_register_reggroup_p_ftype *register_reggroup_p; |
143985b7 | 276 | gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument; |
5aa82d05 | 277 | gdbarch_iterate_over_regset_sections_ftype *iterate_over_regset_sections; |
6432734d | 278 | gdbarch_make_corefile_notes_ftype *make_corefile_notes; |
35c2fab7 | 279 | gdbarch_find_memory_regions_ftype *find_memory_regions; |
de584861 | 280 | gdbarch_core_xfer_shared_libraries_ftype *core_xfer_shared_libraries; |
356a5233 | 281 | gdbarch_core_xfer_shared_libraries_aix_ftype *core_xfer_shared_libraries_aix; |
28439f5e | 282 | gdbarch_core_pid_to_str_ftype *core_pid_to_str; |
4dfc5dbc | 283 | gdbarch_core_thread_name_ftype *core_thread_name; |
382b69bb | 284 | gdbarch_core_xfer_siginfo_ftype *core_xfer_siginfo; |
a78c2d62 | 285 | const char * gcore_bfd_target; |
0d5de010 DJ |
286 | int vtable_function_descriptors; |
287 | int vbit_in_delta; | |
6d350bb5 | 288 | gdbarch_skip_permanent_breakpoint_ftype *skip_permanent_breakpoint; |
237fc4c9 PA |
289 | ULONGEST max_insn_length; |
290 | gdbarch_displaced_step_copy_insn_ftype *displaced_step_copy_insn; | |
99e40580 | 291 | gdbarch_displaced_step_hw_singlestep_ftype *displaced_step_hw_singlestep; |
237fc4c9 | 292 | gdbarch_displaced_step_fixup_ftype *displaced_step_fixup; |
187b041e SM |
293 | gdbarch_displaced_step_prepare_ftype *displaced_step_prepare; |
294 | gdbarch_displaced_step_finish_ftype *displaced_step_finish; | |
295 | gdbarch_displaced_step_copy_insn_closure_by_addr_ftype *displaced_step_copy_insn_closure_by_addr; | |
296 | gdbarch_displaced_step_restore_all_in_ptid_ftype *displaced_step_restore_all_in_ptid; | |
dde08ee1 | 297 | gdbarch_relocate_instruction_ftype *relocate_instruction; |
1c772458 | 298 | gdbarch_overlay_update_ftype *overlay_update; |
4eb0ad19 | 299 | gdbarch_core_read_description_ftype *core_read_description; |
203c3895 | 300 | int sofun_address_maybe_missing; |
0508c3ec | 301 | gdbarch_process_record_ftype *process_record; |
3846b520 | 302 | gdbarch_process_record_signal_ftype *process_record_signal; |
22203bbf | 303 | gdbarch_gdb_signal_from_target_ftype *gdb_signal_from_target; |
eb14d406 | 304 | gdbarch_gdb_signal_to_target_ftype *gdb_signal_to_target; |
4aa995e1 | 305 | gdbarch_get_siginfo_type_ftype *get_siginfo_type; |
60c5725c | 306 | gdbarch_record_special_symbol_ftype *record_special_symbol; |
a96d9b2e | 307 | gdbarch_get_syscall_number_ftype *get_syscall_number; |
458c8db8 SDJ |
308 | const char * xml_syscall_file; |
309 | struct syscalls_info * syscalls_info; | |
05c0465e SDJ |
310 | const char *const * stap_integer_prefixes; |
311 | const char *const * stap_integer_suffixes; | |
312 | const char *const * stap_register_prefixes; | |
313 | const char *const * stap_register_suffixes; | |
314 | const char *const * stap_register_indirection_prefixes; | |
315 | const char *const * stap_register_indirection_suffixes; | |
55aa24fb SDJ |
316 | const char * stap_gdb_register_prefix; |
317 | const char * stap_gdb_register_suffix; | |
318 | gdbarch_stap_is_single_operand_ftype *stap_is_single_operand; | |
319 | gdbarch_stap_parse_special_token_ftype *stap_parse_special_token; | |
7d7571f0 | 320 | gdbarch_stap_adjust_register_ftype *stap_adjust_register; |
8b367e17 JM |
321 | gdbarch_dtrace_parse_probe_argument_ftype *dtrace_parse_probe_argument; |
322 | gdbarch_dtrace_probe_is_enabled_ftype *dtrace_probe_is_enabled; | |
323 | gdbarch_dtrace_enable_probe_ftype *dtrace_enable_probe; | |
324 | gdbarch_dtrace_disable_probe_ftype *dtrace_disable_probe; | |
50c71eaf | 325 | int has_global_solist; |
2567c7d9 | 326 | int has_global_breakpoints; |
6c95b8df | 327 | gdbarch_has_shared_address_space_ftype *has_shared_address_space; |
7a697b8d | 328 | gdbarch_fast_tracepoint_valid_at_ftype *fast_tracepoint_valid_at; |
5f034a78 | 329 | gdbarch_guess_tracepoint_registers_ftype *guess_tracepoint_registers; |
f870a310 TT |
330 | gdbarch_auto_charset_ftype *auto_charset; |
331 | gdbarch_auto_wide_charset_ftype *auto_wide_charset; | |
08105857 | 332 | const char * solib_symbols_extension; |
ab38a727 | 333 | int has_dos_based_file_system; |
6710bf39 | 334 | gdbarch_gen_return_address_ftype *gen_return_address; |
3030c96e | 335 | gdbarch_info_proc_ftype *info_proc; |
451b7c33 | 336 | gdbarch_core_info_proc_ftype *core_info_proc; |
19630284 | 337 | gdbarch_iterate_over_objfiles_in_search_order_ftype *iterate_over_objfiles_in_search_order; |
7e35103a | 338 | struct ravenscar_arch_ops * ravenscar_ops; |
c2170eef MM |
339 | gdbarch_insn_is_call_ftype *insn_is_call; |
340 | gdbarch_insn_is_ret_ftype *insn_is_ret; | |
341 | gdbarch_insn_is_jump_ftype *insn_is_jump; | |
5133a315 | 342 | gdbarch_program_breakpoint_here_p_ftype *program_breakpoint_here_p; |
27a48a92 | 343 | gdbarch_auxv_parse_ftype *auxv_parse; |
2faa3447 | 344 | gdbarch_print_auxv_entry_ftype *print_auxv_entry; |
3437254d | 345 | gdbarch_vsyscall_range_ftype *vsyscall_range; |
f208eee0 | 346 | gdbarch_infcall_mmap_ftype *infcall_mmap; |
7f361056 | 347 | gdbarch_infcall_munmap_ftype *infcall_munmap; |
f208eee0 | 348 | gdbarch_gcc_target_options_ftype *gcc_target_options; |
ac04f72b | 349 | gdbarch_gnu_triplet_regexp_ftype *gnu_triplet_regexp; |
3374165f | 350 | gdbarch_addressable_memory_unit_size_ftype *addressable_memory_unit_size; |
471b9d15 | 351 | const char * disassembler_options_implicit; |
65b48a81 | 352 | char ** disassembler_options; |
471b9d15 | 353 | const disasm_options_and_args_t * valid_disassembler_options; |
2b4424c3 | 354 | gdbarch_type_align_ftype *type_align; |
aa7ca1bb | 355 | gdbarch_get_pc_address_flags_ftype *get_pc_address_flags; |
7e183d27 | 356 | gdbarch_read_core_file_mappings_ftype *read_core_file_mappings; |
adf40b2e | 357 | }; |
0f71a2f6 | 358 | |
66b43ecb | 359 | /* Create a new ``struct gdbarch'' based on information provided by |
0963b4bd | 360 | ``struct gdbarch_info''. */ |
0f71a2f6 JM |
361 | |
362 | struct gdbarch * | |
104c1213 | 363 | gdbarch_alloc (const struct gdbarch_info *info, |
dda83cd7 | 364 | struct gdbarch_tdep *tdep) |
0f71a2f6 | 365 | { |
be7811ad | 366 | struct gdbarch *gdbarch; |
aebd7893 AC |
367 | |
368 | /* Create an obstack for allocating all the per-architecture memory, | |
369 | then use that to allocate the architecture vector. */ | |
70ba0933 | 370 | struct obstack *obstack = XNEW (struct obstack); |
aebd7893 | 371 | obstack_init (obstack); |
8d749320 | 372 | gdbarch = XOBNEW (obstack, struct gdbarch); |
be7811ad MD |
373 | memset (gdbarch, 0, sizeof (*gdbarch)); |
374 | gdbarch->obstack = obstack; | |
0f71a2f6 | 375 | |
be7811ad | 376 | alloc_gdbarch_data (gdbarch); |
b3cc3077 | 377 | |
be7811ad | 378 | gdbarch->tdep = tdep; |
0f71a2f6 | 379 | |
be7811ad MD |
380 | gdbarch->bfd_arch_info = info->bfd_arch_info; |
381 | gdbarch->byte_order = info->byte_order; | |
9d4fde75 | 382 | gdbarch->byte_order_for_code = info->byte_order_for_code; |
be7811ad MD |
383 | gdbarch->osabi = info->osabi; |
384 | gdbarch->target_desc = info->target_desc; | |
0f71a2f6 | 385 | |
0963b4bd | 386 | /* Force the explicit initialization of these. */ |
be7811ad MD |
387 | gdbarch->short_bit = 2*TARGET_CHAR_BIT; |
388 | gdbarch->int_bit = 4*TARGET_CHAR_BIT; | |
389 | gdbarch->long_bit = 4*TARGET_CHAR_BIT; | |
390 | gdbarch->long_long_bit = 2*gdbarch->long_bit; | |
2a67f09d | 391 | gdbarch->bfloat16_bit = 2*TARGET_CHAR_BIT; |
f9e9243a | 392 | gdbarch->half_bit = 2*TARGET_CHAR_BIT; |
be7811ad MD |
393 | gdbarch->float_bit = 4*TARGET_CHAR_BIT; |
394 | gdbarch->double_bit = 8*TARGET_CHAR_BIT; | |
395 | gdbarch->long_double_bit = 8*TARGET_CHAR_BIT; | |
53375380 PA |
396 | gdbarch->wchar_bit = 4*TARGET_CHAR_BIT; |
397 | gdbarch->wchar_signed = -1; | |
9b790ce7 | 398 | gdbarch->floatformat_for_type = default_floatformat_for_type; |
be7811ad MD |
399 | gdbarch->ptr_bit = gdbarch->int_bit; |
400 | gdbarch->char_signed = -1; | |
401 | gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer; | |
402 | gdbarch->num_regs = -1; | |
403 | gdbarch->sp_regnum = -1; | |
404 | gdbarch->pc_regnum = -1; | |
405 | gdbarch->ps_regnum = -1; | |
406 | gdbarch->fp0_regnum = -1; | |
407 | gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum; | |
408 | gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum; | |
be7811ad MD |
409 | gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum; |
410 | gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum; | |
8bcb5208 | 411 | gdbarch->dummy_id = default_dummy_id; |
be7811ad MD |
412 | gdbarch->deprecated_fp_regnum = -1; |
413 | gdbarch->call_dummy_location = AT_ENTRY_POINT; | |
7eb89530 | 414 | gdbarch->code_of_frame_writable = default_code_of_frame_writable; |
be7811ad | 415 | gdbarch->print_registers_info = default_print_registers_info; |
cc86d1cb | 416 | gdbarch->print_float_info = default_print_float_info; |
be7811ad MD |
417 | gdbarch->register_sim_regno = legacy_register_sim_regno; |
418 | gdbarch->cannot_fetch_register = cannot_register_not; | |
419 | gdbarch->cannot_store_register = cannot_register_not; | |
420 | gdbarch->convert_register_p = generic_convert_register_p; | |
421 | gdbarch->value_from_register = default_value_from_register; | |
422 | gdbarch->pointer_to_address = unsigned_pointer_to_address; | |
423 | gdbarch->address_to_pointer = unsigned_address_to_pointer; | |
18648a37 | 424 | gdbarch->return_in_first_hidden_param_p = default_return_in_first_hidden_param_p; |
22f13eb8 | 425 | gdbarch->breakpoint_from_pc = default_breakpoint_from_pc; |
cd6c3b4f | 426 | gdbarch->sw_breakpoint_from_kind = NULL; |
833b7ab5 | 427 | gdbarch->breakpoint_kind_from_current_state = default_breakpoint_kind_from_current_state; |
be7811ad MD |
428 | gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint; |
429 | gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint; | |
430 | gdbarch->remote_register_number = default_remote_register_number; | |
8bcb5208 AB |
431 | gdbarch->unwind_pc = default_unwind_pc; |
432 | gdbarch->unwind_sp = default_unwind_sp; | |
be7811ad MD |
433 | gdbarch->stabs_argument_has_addr = default_stabs_argument_has_addr; |
434 | gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr_identity; | |
435 | gdbarch->addr_bits_remove = core_addr_identity; | |
39503f82 | 436 | gdbarch->print_insn = default_print_insn; |
be7811ad MD |
437 | gdbarch->skip_trampoline_code = generic_skip_trampoline_code; |
438 | gdbarch->skip_solib_resolver = generic_skip_solib_resolver; | |
439 | gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline; | |
1d509aa6 | 440 | gdbarch->in_indirect_branch_thunk = default_in_indirect_branch_thunk; |
c9cf6e20 | 441 | gdbarch->stack_frame_destroyed_p = generic_stack_frame_destroyed_p; |
be7811ad | 442 | gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special; |
3e29f34a MR |
443 | gdbarch->make_symbol_special = default_make_symbol_special; |
444 | gdbarch->adjust_dwarf2_addr = default_adjust_dwarf2_addr; | |
445 | gdbarch->adjust_dwarf2_line = default_adjust_dwarf2_line; | |
b41c5a85 | 446 | gdbarch->execute_dwarf_cfa_vendor_op = default_execute_dwarf_cfa_vendor_op; |
be7811ad | 447 | gdbarch->register_reggroup_p = default_register_reggroup_p; |
ae9bb220 | 448 | gdbarch->skip_permanent_breakpoint = default_skip_permanent_breakpoint; |
99e40580 | 449 | gdbarch->displaced_step_hw_singlestep = default_displaced_step_hw_singlestep; |
237fc4c9 | 450 | gdbarch->displaced_step_fixup = NULL; |
187b041e | 451 | gdbarch->displaced_step_finish = NULL; |
dde08ee1 | 452 | gdbarch->relocate_instruction = NULL; |
6c95b8df | 453 | gdbarch->has_shared_address_space = default_has_shared_address_space; |
7a697b8d | 454 | gdbarch->fast_tracepoint_valid_at = default_fast_tracepoint_valid_at; |
5f034a78 | 455 | gdbarch->guess_tracepoint_registers = default_guess_tracepoint_registers; |
f870a310 TT |
456 | gdbarch->auto_charset = default_auto_charset; |
457 | gdbarch->auto_wide_charset = default_auto_wide_charset; | |
6710bf39 | 458 | gdbarch->gen_return_address = default_gen_return_address; |
19630284 | 459 | gdbarch->iterate_over_objfiles_in_search_order = default_iterate_over_objfiles_in_search_order; |
7e35103a | 460 | gdbarch->ravenscar_ops = NULL; |
c2170eef MM |
461 | gdbarch->insn_is_call = default_insn_is_call; |
462 | gdbarch->insn_is_ret = default_insn_is_ret; | |
463 | gdbarch->insn_is_jump = default_insn_is_jump; | |
5133a315 | 464 | gdbarch->program_breakpoint_here_p = default_program_breakpoint_here_p; |
2faa3447 | 465 | gdbarch->print_auxv_entry = default_print_auxv_entry; |
3437254d | 466 | gdbarch->vsyscall_range = default_vsyscall_range; |
f208eee0 | 467 | gdbarch->infcall_mmap = default_infcall_mmap; |
7f361056 | 468 | gdbarch->infcall_munmap = default_infcall_munmap; |
f208eee0 | 469 | gdbarch->gcc_target_options = default_gcc_target_options; |
ac04f72b | 470 | gdbarch->gnu_triplet_regexp = default_gnu_triplet_regexp; |
3374165f | 471 | gdbarch->addressable_memory_unit_size = default_addressable_memory_unit_size; |
2b4424c3 | 472 | gdbarch->type_align = default_type_align; |
aa7ca1bb | 473 | gdbarch->get_pc_address_flags = default_get_pc_address_flags; |
7e183d27 | 474 | gdbarch->read_core_file_mappings = default_read_core_file_mappings; |
0f71a2f6 JM |
475 | /* gdbarch_alloc() */ |
476 | ||
be7811ad | 477 | return gdbarch; |
0f71a2f6 JM |
478 | } |
479 | ||
480 | ||
aebd7893 | 481 | |
284a0e3c | 482 | obstack *gdbarch_obstack (gdbarch *arch) |
aebd7893 | 483 | { |
284a0e3c | 484 | return arch->obstack; |
aebd7893 AC |
485 | } |
486 | ||
6c214e7c PP |
487 | /* See gdbarch.h. */ |
488 | ||
489 | char * | |
490 | gdbarch_obstack_strdup (struct gdbarch *arch, const char *string) | |
491 | { | |
492 | return obstack_strdup (arch->obstack, string); | |
493 | } | |
494 | ||
aebd7893 | 495 | |
058f20d5 JB |
496 | /* Free a gdbarch struct. This should never happen in normal |
497 | operation --- once you've created a gdbarch, you keep it around. | |
498 | However, if an architecture's init function encounters an error | |
499 | building the structure, it may need to clean up a partially | |
500 | constructed gdbarch. */ | |
4b9b3959 | 501 | |
058f20d5 JB |
502 | void |
503 | gdbarch_free (struct gdbarch *arch) | |
504 | { | |
aebd7893 | 505 | struct obstack *obstack; |
05c547f6 | 506 | |
95160752 | 507 | gdb_assert (arch != NULL); |
aebd7893 AC |
508 | gdb_assert (!arch->initialized_p); |
509 | obstack = arch->obstack; | |
510 | obstack_free (obstack, 0); /* Includes the ARCH. */ | |
511 | xfree (obstack); | |
058f20d5 JB |
512 | } |
513 | ||
514 | ||
db446970 AC |
515 | /* Ensure that all values in a GDBARCH are reasonable. */ |
516 | ||
0f71a2f6 | 517 | static void |
be7811ad | 518 | verify_gdbarch (struct gdbarch *gdbarch) |
0f71a2f6 | 519 | { |
d7e74731 | 520 | string_file log; |
05c547f6 | 521 | |
0f71a2f6 | 522 | /* fundamental */ |
be7811ad | 523 | if (gdbarch->byte_order == BFD_ENDIAN_UNKNOWN) |
d7e74731 | 524 | log.puts ("\n\tbyte-order"); |
be7811ad | 525 | if (gdbarch->bfd_arch_info == NULL) |
d7e74731 | 526 | log.puts ("\n\tbfd_arch_info"); |
0963b4bd | 527 | /* Check those that need to be defined for the given multi-arch level. */ |
66b43ecb AC |
528 | /* Skip verify of short_bit, invalid_p == 0 */ |
529 | /* Skip verify of int_bit, invalid_p == 0 */ | |
530 | /* Skip verify of long_bit, invalid_p == 0 */ | |
531 | /* Skip verify of long_long_bit, invalid_p == 0 */ | |
2a67f09d FW |
532 | /* Skip verify of bfloat16_bit, invalid_p == 0 */ |
533 | if (gdbarch->bfloat16_format == 0) | |
534 | gdbarch->bfloat16_format = floatformats_bfloat16; | |
f9e9243a UW |
535 | /* Skip verify of half_bit, invalid_p == 0 */ |
536 | if (gdbarch->half_format == 0) | |
537 | gdbarch->half_format = floatformats_ieee_half; | |
66b43ecb | 538 | /* Skip verify of float_bit, invalid_p == 0 */ |
be7811ad MD |
539 | if (gdbarch->float_format == 0) |
540 | gdbarch->float_format = floatformats_ieee_single; | |
66b43ecb | 541 | /* Skip verify of double_bit, invalid_p == 0 */ |
be7811ad MD |
542 | if (gdbarch->double_format == 0) |
543 | gdbarch->double_format = floatformats_ieee_double; | |
66b43ecb | 544 | /* Skip verify of long_double_bit, invalid_p == 0 */ |
be7811ad MD |
545 | if (gdbarch->long_double_format == 0) |
546 | gdbarch->long_double_format = floatformats_ieee_double; | |
53375380 PA |
547 | /* Skip verify of wchar_bit, invalid_p == 0 */ |
548 | if (gdbarch->wchar_signed == -1) | |
549 | gdbarch->wchar_signed = 1; | |
9b790ce7 | 550 | /* Skip verify of floatformat_for_type, invalid_p == 0 */ |
66b43ecb | 551 | /* Skip verify of ptr_bit, invalid_p == 0 */ |
be7811ad MD |
552 | if (gdbarch->addr_bit == 0) |
553 | gdbarch->addr_bit = gdbarch_ptr_bit (gdbarch); | |
8da614df CV |
554 | if (gdbarch->dwarf2_addr_size == 0) |
555 | gdbarch->dwarf2_addr_size = gdbarch_ptr_bit (gdbarch) / TARGET_CHAR_BIT; | |
be7811ad MD |
556 | if (gdbarch->char_signed == -1) |
557 | gdbarch->char_signed = 1; | |
0963b4bd MS |
558 | /* Skip verify of read_pc, has predicate. */ |
559 | /* Skip verify of write_pc, has predicate. */ | |
39d4ef09 | 560 | /* Skip verify of virtual_frame_pointer, invalid_p == 0 */ |
0963b4bd | 561 | /* Skip verify of pseudo_register_read, has predicate. */ |
3543a589 | 562 | /* Skip verify of pseudo_register_read_value, has predicate. */ |
0963b4bd | 563 | /* Skip verify of pseudo_register_write, has predicate. */ |
be7811ad | 564 | if (gdbarch->num_regs == -1) |
d7e74731 | 565 | log.puts ("\n\tnum_regs"); |
0aba1244 | 566 | /* Skip verify of num_pseudo_regs, invalid_p == 0 */ |
0963b4bd MS |
567 | /* Skip verify of ax_pseudo_register_collect, has predicate. */ |
568 | /* Skip verify of ax_pseudo_register_push_stack, has predicate. */ | |
272bb05c | 569 | /* Skip verify of report_signal_info, has predicate. */ |
1200cd6e | 570 | /* Skip verify of sp_regnum, invalid_p == 0 */ |
1200cd6e | 571 | /* Skip verify of pc_regnum, invalid_p == 0 */ |
c2169756 | 572 | /* Skip verify of ps_regnum, invalid_p == 0 */ |
60054393 | 573 | /* Skip verify of fp0_regnum, invalid_p == 0 */ |
88c72b7d AC |
574 | /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */ |
575 | /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */ | |
88c72b7d AC |
576 | /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */ |
577 | /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */ | |
be7811ad | 578 | if (gdbarch->register_name == 0) |
d7e74731 | 579 | log.puts ("\n\tregister_name"); |
0963b4bd | 580 | /* Skip verify of register_type, has predicate. */ |
8bcb5208 | 581 | /* Skip verify of dummy_id, invalid_p == 0 */ |
f3be58bc | 582 | /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */ |
0963b4bd | 583 | /* Skip verify of push_dummy_call, has predicate. */ |
b8de8283 | 584 | /* Skip verify of call_dummy_location, invalid_p == 0 */ |
0963b4bd | 585 | /* Skip verify of push_dummy_code, has predicate. */ |
7eb89530 | 586 | /* Skip verify of code_of_frame_writable, invalid_p == 0 */ |
0ab7a791 | 587 | /* Skip verify of print_registers_info, invalid_p == 0 */ |
cc86d1cb | 588 | /* Skip verify of print_float_info, invalid_p == 0 */ |
0963b4bd | 589 | /* Skip verify of print_vector_info, has predicate. */ |
7c7651b2 | 590 | /* Skip verify of register_sim_regno, invalid_p == 0 */ |
01fb7433 AC |
591 | /* Skip verify of cannot_fetch_register, invalid_p == 0 */ |
592 | /* Skip verify of cannot_store_register, invalid_p == 0 */ | |
0963b4bd | 593 | /* Skip verify of get_longjmp_target, has predicate. */ |
13d01224 | 594 | /* Skip verify of convert_register_p, invalid_p == 0 */ |
9acbedc0 | 595 | /* Skip verify of value_from_register, invalid_p == 0 */ |
4478b372 JB |
596 | /* Skip verify of pointer_to_address, invalid_p == 0 */ |
597 | /* Skip verify of address_to_pointer, invalid_p == 0 */ | |
0963b4bd MS |
598 | /* Skip verify of integer_to_address, has predicate. */ |
599 | /* Skip verify of return_value, has predicate. */ | |
18648a37 | 600 | /* Skip verify of return_in_first_hidden_param_p, invalid_p == 0 */ |
be7811ad | 601 | if (gdbarch->skip_prologue == 0) |
d7e74731 | 602 | log.puts ("\n\tskip_prologue"); |
0963b4bd | 603 | /* Skip verify of skip_main_prologue, has predicate. */ |
591a12a1 | 604 | /* Skip verify of skip_entrypoint, has predicate. */ |
be7811ad | 605 | if (gdbarch->inner_than == 0) |
d7e74731 | 606 | log.puts ("\n\tinner_than"); |
22f13eb8 | 607 | /* Skip verify of breakpoint_from_pc, invalid_p == 0 */ |
cd6c3b4f | 608 | if (gdbarch->breakpoint_kind_from_pc == 0) |
d7e74731 | 609 | log.puts ("\n\tbreakpoint_kind_from_pc"); |
cd6c3b4f | 610 | /* Skip verify of sw_breakpoint_from_kind, invalid_p == 0 */ |
833b7ab5 | 611 | /* Skip verify of breakpoint_kind_from_current_state, invalid_p == 0 */ |
0963b4bd | 612 | /* Skip verify of adjust_breakpoint_address, has predicate. */ |
c0e8c252 AC |
613 | /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */ |
614 | /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */ | |
71bd6bd4 | 615 | /* Skip verify of decr_pc_after_break, invalid_p == 0 */ |
782263ab | 616 | /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */ |
123dc839 | 617 | /* Skip verify of remote_register_number, invalid_p == 0 */ |
0963b4bd | 618 | /* Skip verify of fetch_tls_load_module_address, has predicate. */ |
6e056c81 | 619 | /* Skip verify of get_thread_local_address, has predicate. */ |
5867a2fb | 620 | /* Skip verify of frame_args_skip, invalid_p == 0 */ |
8bcb5208 AB |
621 | /* Skip verify of unwind_pc, invalid_p == 0 */ |
622 | /* Skip verify of unwind_sp, invalid_p == 0 */ | |
0963b4bd MS |
623 | /* Skip verify of frame_num_args, has predicate. */ |
624 | /* Skip verify of frame_align, has predicate. */ | |
192cb3d4 | 625 | /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */ |
f517ea4e | 626 | /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */ |
875e1767 | 627 | /* Skip verify of addr_bits_remove, invalid_p == 0 */ |
5969f0db | 628 | /* Skip verify of significant_addr_bit, invalid_p == 0 */ |
0963b4bd MS |
629 | /* Skip verify of software_single_step, has predicate. */ |
630 | /* Skip verify of single_step_through_delay, has predicate. */ | |
39503f82 | 631 | /* Skip verify of print_insn, invalid_p == 0 */ |
bdcd319a | 632 | /* Skip verify of skip_trampoline_code, invalid_p == 0 */ |
dea0c52f | 633 | /* Skip verify of skip_solib_resolver, invalid_p == 0 */ |
d50355b6 | 634 | /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */ |
1d509aa6 | 635 | /* Skip verify of in_indirect_branch_thunk, invalid_p == 0 */ |
c9cf6e20 | 636 | /* Skip verify of stack_frame_destroyed_p, invalid_p == 0 */ |
3e29f34a | 637 | /* Skip verify of elf_make_msymbol_special, has predicate. */ |
a2cf933a | 638 | /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */ |
3e29f34a MR |
639 | /* Skip verify of make_symbol_special, invalid_p == 0 */ |
640 | /* Skip verify of adjust_dwarf2_addr, invalid_p == 0 */ | |
641 | /* Skip verify of adjust_dwarf2_line, invalid_p == 0 */ | |
c4ed33b9 | 642 | /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */ |
f74fa174 | 643 | /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */ |
0963b4bd MS |
644 | /* Skip verify of address_class_type_flags, has predicate. */ |
645 | /* Skip verify of address_class_type_flags_to_name, has predicate. */ | |
b41c5a85 | 646 | /* Skip verify of execute_dwarf_cfa_vendor_op, invalid_p == 0 */ |
0963b4bd | 647 | /* Skip verify of address_class_name_to_type_flags, has predicate. */ |
7e20f3fb | 648 | /* Skip verify of register_reggroup_p, invalid_p == 0 */ |
0963b4bd | 649 | /* Skip verify of fetch_pointer_argument, has predicate. */ |
5aa82d05 | 650 | /* Skip verify of iterate_over_regset_sections, has predicate. */ |
6432734d | 651 | /* Skip verify of make_corefile_notes, has predicate. */ |
35c2fab7 | 652 | /* Skip verify of find_memory_regions, has predicate. */ |
0963b4bd | 653 | /* Skip verify of core_xfer_shared_libraries, has predicate. */ |
356a5233 | 654 | /* Skip verify of core_xfer_shared_libraries_aix, has predicate. */ |
0963b4bd | 655 | /* Skip verify of core_pid_to_str, has predicate. */ |
4dfc5dbc | 656 | /* Skip verify of core_thread_name, has predicate. */ |
382b69bb | 657 | /* Skip verify of core_xfer_siginfo, has predicate. */ |
0963b4bd | 658 | /* Skip verify of gcore_bfd_target, has predicate. */ |
0d5de010 DJ |
659 | /* Skip verify of vtable_function_descriptors, invalid_p == 0 */ |
660 | /* Skip verify of vbit_in_delta, invalid_p == 0 */ | |
ae9bb220 | 661 | /* Skip verify of skip_permanent_breakpoint, invalid_p == 0 */ |
0963b4bd MS |
662 | /* Skip verify of max_insn_length, has predicate. */ |
663 | /* Skip verify of displaced_step_copy_insn, has predicate. */ | |
99e40580 | 664 | /* Skip verify of displaced_step_hw_singlestep, invalid_p == 0 */ |
0963b4bd | 665 | /* Skip verify of displaced_step_fixup, has predicate. */ |
187b041e SM |
666 | /* Skip verify of displaced_step_prepare, has predicate. */ |
667 | if ((! gdbarch->displaced_step_finish) != (! gdbarch->displaced_step_prepare)) | |
668 | log.puts ("\n\tdisplaced_step_finish"); | |
669 | /* Skip verify of displaced_step_copy_insn_closure_by_addr, has predicate. */ | |
0963b4bd MS |
670 | /* Skip verify of relocate_instruction, has predicate. */ |
671 | /* Skip verify of overlay_update, has predicate. */ | |
672 | /* Skip verify of core_read_description, has predicate. */ | |
203c3895 | 673 | /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */ |
0963b4bd MS |
674 | /* Skip verify of process_record, has predicate. */ |
675 | /* Skip verify of process_record_signal, has predicate. */ | |
1f8cf220 | 676 | /* Skip verify of gdb_signal_from_target, has predicate. */ |
eb14d406 | 677 | /* Skip verify of gdb_signal_to_target, has predicate. */ |
0963b4bd MS |
678 | /* Skip verify of get_siginfo_type, has predicate. */ |
679 | /* Skip verify of record_special_symbol, has predicate. */ | |
680 | /* Skip verify of get_syscall_number, has predicate. */ | |
458c8db8 SDJ |
681 | /* Skip verify of xml_syscall_file, invalid_p == 0 */ |
682 | /* Skip verify of syscalls_info, invalid_p == 0 */ | |
05c0465e SDJ |
683 | /* Skip verify of stap_integer_prefixes, invalid_p == 0 */ |
684 | /* Skip verify of stap_integer_suffixes, invalid_p == 0 */ | |
685 | /* Skip verify of stap_register_prefixes, invalid_p == 0 */ | |
686 | /* Skip verify of stap_register_suffixes, invalid_p == 0 */ | |
687 | /* Skip verify of stap_register_indirection_prefixes, invalid_p == 0 */ | |
688 | /* Skip verify of stap_register_indirection_suffixes, invalid_p == 0 */ | |
55aa24fb SDJ |
689 | /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */ |
690 | /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */ | |
691 | /* Skip verify of stap_is_single_operand, has predicate. */ | |
692 | /* Skip verify of stap_parse_special_token, has predicate. */ | |
7d7571f0 | 693 | /* Skip verify of stap_adjust_register, has predicate. */ |
8b367e17 JM |
694 | /* Skip verify of dtrace_parse_probe_argument, has predicate. */ |
695 | /* Skip verify of dtrace_probe_is_enabled, has predicate. */ | |
696 | /* Skip verify of dtrace_enable_probe, has predicate. */ | |
697 | /* Skip verify of dtrace_disable_probe, has predicate. */ | |
50c71eaf | 698 | /* Skip verify of has_global_solist, invalid_p == 0 */ |
2567c7d9 | 699 | /* Skip verify of has_global_breakpoints, invalid_p == 0 */ |
6c95b8df | 700 | /* Skip verify of has_shared_address_space, invalid_p == 0 */ |
7a697b8d | 701 | /* Skip verify of fast_tracepoint_valid_at, invalid_p == 0 */ |
5f034a78 | 702 | /* Skip verify of guess_tracepoint_registers, invalid_p == 0 */ |
f870a310 TT |
703 | /* Skip verify of auto_charset, invalid_p == 0 */ |
704 | /* Skip verify of auto_wide_charset, invalid_p == 0 */ | |
ab38a727 | 705 | /* Skip verify of has_dos_based_file_system, invalid_p == 0 */ |
6710bf39 | 706 | /* Skip verify of gen_return_address, invalid_p == 0 */ |
3030c96e | 707 | /* Skip verify of info_proc, has predicate. */ |
451b7c33 | 708 | /* Skip verify of core_info_proc, has predicate. */ |
19630284 | 709 | /* Skip verify of iterate_over_objfiles_in_search_order, invalid_p == 0 */ |
7e35103a | 710 | /* Skip verify of ravenscar_ops, invalid_p == 0 */ |
c2170eef MM |
711 | /* Skip verify of insn_is_call, invalid_p == 0 */ |
712 | /* Skip verify of insn_is_ret, invalid_p == 0 */ | |
713 | /* Skip verify of insn_is_jump, invalid_p == 0 */ | |
5133a315 | 714 | /* Skip verify of program_breakpoint_here_p, invalid_p == 0 */ |
27a48a92 | 715 | /* Skip verify of auxv_parse, has predicate. */ |
2faa3447 | 716 | /* Skip verify of print_auxv_entry, invalid_p == 0 */ |
3437254d | 717 | /* Skip verify of vsyscall_range, invalid_p == 0 */ |
f208eee0 | 718 | /* Skip verify of infcall_mmap, invalid_p == 0 */ |
7f361056 | 719 | /* Skip verify of infcall_munmap, invalid_p == 0 */ |
f208eee0 | 720 | /* Skip verify of gcc_target_options, invalid_p == 0 */ |
ac04f72b | 721 | /* Skip verify of gnu_triplet_regexp, invalid_p == 0 */ |
3374165f | 722 | /* Skip verify of addressable_memory_unit_size, invalid_p == 0 */ |
471b9d15 | 723 | /* Skip verify of disassembler_options_implicit, invalid_p == 0 */ |
65b48a81 PB |
724 | /* Skip verify of disassembler_options, invalid_p == 0 */ |
725 | /* Skip verify of valid_disassembler_options, invalid_p == 0 */ | |
2b4424c3 | 726 | /* Skip verify of type_align, invalid_p == 0 */ |
aa7ca1bb | 727 | /* Skip verify of get_pc_address_flags, invalid_p == 0 */ |
7e183d27 | 728 | /* Skip verify of read_core_file_mappings, invalid_p == 0 */ |
d7e74731 | 729 | if (!log.empty ()) |
f16a1923 | 730 | internal_error (__FILE__, __LINE__, |
dda83cd7 SM |
731 | _("verify_gdbarch: the following are invalid ...%s"), |
732 | log.c_str ()); | |
0f71a2f6 JM |
733 | } |
734 | ||
735 | ||
0963b4bd | 736 | /* Print out the details of the current architecture. */ |
0f71a2f6 JM |
737 | |
738 | void | |
be7811ad | 739 | gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) |
0f71a2f6 | 740 | { |
b78960be | 741 | const char *gdb_nm_file = "<not-defined>"; |
05c547f6 | 742 | |
b78960be AC |
743 | #if defined (GDB_NM_FILE) |
744 | gdb_nm_file = GDB_NM_FILE; | |
745 | #endif | |
746 | fprintf_unfiltered (file, | |
dda83cd7 SM |
747 | "gdbarch_dump: GDB_NM_FILE = %s\n", |
748 | gdb_nm_file); | |
48f7351b AC |
749 | fprintf_unfiltered (file, |
750 | "gdbarch_dump: addr_bit = %s\n", | |
623d3eb1 | 751 | plongest (gdbarch->addr_bit)); |
48f7351b | 752 | fprintf_unfiltered (file, |
30737ed9 JB |
753 | "gdbarch_dump: addr_bits_remove = <%s>\n", |
754 | host_address_to_string (gdbarch->addr_bits_remove)); | |
7996bcec AC |
755 | fprintf_unfiltered (file, |
756 | "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n", | |
be7811ad | 757 | gdbarch_address_class_name_to_type_flags_p (gdbarch)); |
7996bcec | 758 | fprintf_unfiltered (file, |
30737ed9 JB |
759 | "gdbarch_dump: address_class_name_to_type_flags = <%s>\n", |
760 | host_address_to_string (gdbarch->address_class_name_to_type_flags)); | |
48f7351b AC |
761 | fprintf_unfiltered (file, |
762 | "gdbarch_dump: gdbarch_address_class_type_flags_p() = %d\n", | |
be7811ad | 763 | gdbarch_address_class_type_flags_p (gdbarch)); |
48f7351b | 764 | fprintf_unfiltered (file, |
30737ed9 JB |
765 | "gdbarch_dump: address_class_type_flags = <%s>\n", |
766 | host_address_to_string (gdbarch->address_class_type_flags)); | |
7996bcec AC |
767 | fprintf_unfiltered (file, |
768 | "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n", | |
be7811ad | 769 | gdbarch_address_class_type_flags_to_name_p (gdbarch)); |
7996bcec | 770 | fprintf_unfiltered (file, |
30737ed9 JB |
771 | "gdbarch_dump: address_class_type_flags_to_name = <%s>\n", |
772 | host_address_to_string (gdbarch->address_class_type_flags_to_name)); | |
48f7351b | 773 | fprintf_unfiltered (file, |
30737ed9 JB |
774 | "gdbarch_dump: address_to_pointer = <%s>\n", |
775 | host_address_to_string (gdbarch->address_to_pointer)); | |
3374165f SM |
776 | fprintf_unfiltered (file, |
777 | "gdbarch_dump: addressable_memory_unit_size = <%s>\n", | |
778 | host_address_to_string (gdbarch->addressable_memory_unit_size)); | |
a1131521 KB |
779 | fprintf_unfiltered (file, |
780 | "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n", | |
be7811ad | 781 | gdbarch_adjust_breakpoint_address_p (gdbarch)); |
a1131521 | 782 | fprintf_unfiltered (file, |
30737ed9 JB |
783 | "gdbarch_dump: adjust_breakpoint_address = <%s>\n", |
784 | host_address_to_string (gdbarch->adjust_breakpoint_address)); | |
3e29f34a MR |
785 | fprintf_unfiltered (file, |
786 | "gdbarch_dump: adjust_dwarf2_addr = <%s>\n", | |
787 | host_address_to_string (gdbarch->adjust_dwarf2_addr)); | |
788 | fprintf_unfiltered (file, | |
789 | "gdbarch_dump: adjust_dwarf2_line = <%s>\n", | |
790 | host_address_to_string (gdbarch->adjust_dwarf2_line)); | |
f870a310 TT |
791 | fprintf_unfiltered (file, |
792 | "gdbarch_dump: auto_charset = <%s>\n", | |
793 | host_address_to_string (gdbarch->auto_charset)); | |
794 | fprintf_unfiltered (file, | |
795 | "gdbarch_dump: auto_wide_charset = <%s>\n", | |
796 | host_address_to_string (gdbarch->auto_wide_charset)); | |
27a48a92 MK |
797 | fprintf_unfiltered (file, |
798 | "gdbarch_dump: gdbarch_auxv_parse_p() = %d\n", | |
799 | gdbarch_auxv_parse_p (gdbarch)); | |
800 | fprintf_unfiltered (file, | |
801 | "gdbarch_dump: auxv_parse = <%s>\n", | |
802 | host_address_to_string (gdbarch->auxv_parse)); | |
175ff332 HZ |
803 | fprintf_unfiltered (file, |
804 | "gdbarch_dump: gdbarch_ax_pseudo_register_collect_p() = %d\n", | |
805 | gdbarch_ax_pseudo_register_collect_p (gdbarch)); | |
806 | fprintf_unfiltered (file, | |
807 | "gdbarch_dump: ax_pseudo_register_collect = <%s>\n", | |
808 | host_address_to_string (gdbarch->ax_pseudo_register_collect)); | |
809 | fprintf_unfiltered (file, | |
810 | "gdbarch_dump: gdbarch_ax_pseudo_register_push_stack_p() = %d\n", | |
811 | gdbarch_ax_pseudo_register_push_stack_p (gdbarch)); | |
812 | fprintf_unfiltered (file, | |
813 | "gdbarch_dump: ax_pseudo_register_push_stack = <%s>\n", | |
814 | host_address_to_string (gdbarch->ax_pseudo_register_push_stack)); | |
48f7351b AC |
815 | fprintf_unfiltered (file, |
816 | "gdbarch_dump: believe_pcc_promotion = %s\n", | |
623d3eb1 | 817 | plongest (gdbarch->believe_pcc_promotion)); |
283354d8 | 818 | fprintf_unfiltered (file, |
48f7351b | 819 | "gdbarch_dump: bfd_arch_info = %s\n", |
be7811ad | 820 | gdbarch_bfd_arch_info (gdbarch)->printable_name); |
2a67f09d FW |
821 | fprintf_unfiltered (file, |
822 | "gdbarch_dump: bfloat16_bit = %s\n", | |
823 | plongest (gdbarch->bfloat16_bit)); | |
824 | fprintf_unfiltered (file, | |
825 | "gdbarch_dump: bfloat16_format = %s\n", | |
826 | pformat (gdbarch->bfloat16_format)); | |
48f7351b | 827 | fprintf_unfiltered (file, |
30737ed9 JB |
828 | "gdbarch_dump: breakpoint_from_pc = <%s>\n", |
829 | host_address_to_string (gdbarch->breakpoint_from_pc)); | |
833b7ab5 YQ |
830 | fprintf_unfiltered (file, |
831 | "gdbarch_dump: breakpoint_kind_from_current_state = <%s>\n", | |
832 | host_address_to_string (gdbarch->breakpoint_kind_from_current_state)); | |
cd6c3b4f YQ |
833 | fprintf_unfiltered (file, |
834 | "gdbarch_dump: breakpoint_kind_from_pc = <%s>\n", | |
835 | host_address_to_string (gdbarch->breakpoint_kind_from_pc)); | |
48f7351b AC |
836 | fprintf_unfiltered (file, |
837 | "gdbarch_dump: byte_order = %s\n", | |
623d3eb1 | 838 | plongest (gdbarch->byte_order)); |
9d4fde75 SS |
839 | fprintf_unfiltered (file, |
840 | "gdbarch_dump: byte_order_for_code = %s\n", | |
623d3eb1 | 841 | plongest (gdbarch->byte_order_for_code)); |
48f7351b AC |
842 | fprintf_unfiltered (file, |
843 | "gdbarch_dump: call_dummy_location = %s\n", | |
623d3eb1 | 844 | plongest (gdbarch->call_dummy_location)); |
48f7351b | 845 | fprintf_unfiltered (file, |
30737ed9 JB |
846 | "gdbarch_dump: cannot_fetch_register = <%s>\n", |
847 | host_address_to_string (gdbarch->cannot_fetch_register)); | |
48f7351b AC |
848 | fprintf_unfiltered (file, |
849 | "gdbarch_dump: cannot_step_breakpoint = %s\n", | |
623d3eb1 | 850 | plongest (gdbarch->cannot_step_breakpoint)); |
48f7351b | 851 | fprintf_unfiltered (file, |
30737ed9 JB |
852 | "gdbarch_dump: cannot_store_register = <%s>\n", |
853 | host_address_to_string (gdbarch->cannot_store_register)); | |
48f7351b AC |
854 | fprintf_unfiltered (file, |
855 | "gdbarch_dump: char_signed = %s\n", | |
623d3eb1 | 856 | plongest (gdbarch->char_signed)); |
7eb89530 YQ |
857 | fprintf_unfiltered (file, |
858 | "gdbarch_dump: code_of_frame_writable = <%s>\n", | |
859 | host_address_to_string (gdbarch->code_of_frame_writable)); | |
7996bcec | 860 | fprintf_unfiltered (file, |
30737ed9 JB |
861 | "gdbarch_dump: coff_make_msymbol_special = <%s>\n", |
862 | host_address_to_string (gdbarch->coff_make_msymbol_special)); | |
a2428dbe | 863 | fprintf_unfiltered (file, |
30737ed9 JB |
864 | "gdbarch_dump: convert_from_func_ptr_addr = <%s>\n", |
865 | host_address_to_string (gdbarch->convert_from_func_ptr_addr)); | |
48f7351b | 866 | fprintf_unfiltered (file, |
30737ed9 JB |
867 | "gdbarch_dump: convert_register_p = <%s>\n", |
868 | host_address_to_string (gdbarch->convert_register_p)); | |
451b7c33 TT |
869 | fprintf_unfiltered (file, |
870 | "gdbarch_dump: gdbarch_core_info_proc_p() = %d\n", | |
871 | gdbarch_core_info_proc_p (gdbarch)); | |
872 | fprintf_unfiltered (file, | |
873 | "gdbarch_dump: core_info_proc = <%s>\n", | |
874 | host_address_to_string (gdbarch->core_info_proc)); | |
28439f5e PA |
875 | fprintf_unfiltered (file, |
876 | "gdbarch_dump: gdbarch_core_pid_to_str_p() = %d\n", | |
877 | gdbarch_core_pid_to_str_p (gdbarch)); | |
878 | fprintf_unfiltered (file, | |
879 | "gdbarch_dump: core_pid_to_str = <%s>\n", | |
880 | host_address_to_string (gdbarch->core_pid_to_str)); | |
4eb0ad19 DJ |
881 | fprintf_unfiltered (file, |
882 | "gdbarch_dump: gdbarch_core_read_description_p() = %d\n", | |
be7811ad | 883 | gdbarch_core_read_description_p (gdbarch)); |
4eb0ad19 | 884 | fprintf_unfiltered (file, |
30737ed9 JB |
885 | "gdbarch_dump: core_read_description = <%s>\n", |
886 | host_address_to_string (gdbarch->core_read_description)); | |
4dfc5dbc JB |
887 | fprintf_unfiltered (file, |
888 | "gdbarch_dump: gdbarch_core_thread_name_p() = %d\n", | |
889 | gdbarch_core_thread_name_p (gdbarch)); | |
890 | fprintf_unfiltered (file, | |
891 | "gdbarch_dump: core_thread_name = <%s>\n", | |
892 | host_address_to_string (gdbarch->core_thread_name)); | |
de584861 PA |
893 | fprintf_unfiltered (file, |
894 | "gdbarch_dump: gdbarch_core_xfer_shared_libraries_p() = %d\n", | |
be7811ad | 895 | gdbarch_core_xfer_shared_libraries_p (gdbarch)); |
de584861 | 896 | fprintf_unfiltered (file, |
30737ed9 JB |
897 | "gdbarch_dump: core_xfer_shared_libraries = <%s>\n", |
898 | host_address_to_string (gdbarch->core_xfer_shared_libraries)); | |
356a5233 JB |
899 | fprintf_unfiltered (file, |
900 | "gdbarch_dump: gdbarch_core_xfer_shared_libraries_aix_p() = %d\n", | |
901 | gdbarch_core_xfer_shared_libraries_aix_p (gdbarch)); | |
902 | fprintf_unfiltered (file, | |
903 | "gdbarch_dump: core_xfer_shared_libraries_aix = <%s>\n", | |
904 | host_address_to_string (gdbarch->core_xfer_shared_libraries_aix)); | |
382b69bb JB |
905 | fprintf_unfiltered (file, |
906 | "gdbarch_dump: gdbarch_core_xfer_siginfo_p() = %d\n", | |
907 | gdbarch_core_xfer_siginfo_p (gdbarch)); | |
908 | fprintf_unfiltered (file, | |
909 | "gdbarch_dump: core_xfer_siginfo = <%s>\n", | |
910 | host_address_to_string (gdbarch->core_xfer_siginfo)); | |
48f7351b | 911 | fprintf_unfiltered (file, |
0b1553bc UW |
912 | "gdbarch_dump: decr_pc_after_break = %s\n", |
913 | core_addr_to_string_nz (gdbarch->decr_pc_after_break)); | |
48f7351b AC |
914 | fprintf_unfiltered (file, |
915 | "gdbarch_dump: deprecated_fp_regnum = %s\n", | |
623d3eb1 | 916 | plongest (gdbarch->deprecated_fp_regnum)); |
48f7351b | 917 | fprintf_unfiltered (file, |
0b1553bc UW |
918 | "gdbarch_dump: deprecated_function_start_offset = %s\n", |
919 | core_addr_to_string_nz (gdbarch->deprecated_function_start_offset)); | |
65b48a81 PB |
920 | fprintf_unfiltered (file, |
921 | "gdbarch_dump: disassembler_options = %s\n", | |
f7bb4e3a | 922 | pstring_ptr (gdbarch->disassembler_options)); |
471b9d15 MR |
923 | fprintf_unfiltered (file, |
924 | "gdbarch_dump: disassembler_options_implicit = %s\n", | |
925 | pstring (gdbarch->disassembler_options_implicit)); | |
237fc4c9 PA |
926 | fprintf_unfiltered (file, |
927 | "gdbarch_dump: gdbarch_displaced_step_copy_insn_p() = %d\n", | |
928 | gdbarch_displaced_step_copy_insn_p (gdbarch)); | |
929 | fprintf_unfiltered (file, | |
30737ed9 JB |
930 | "gdbarch_dump: displaced_step_copy_insn = <%s>\n", |
931 | host_address_to_string (gdbarch->displaced_step_copy_insn)); | |
187b041e SM |
932 | fprintf_unfiltered (file, |
933 | "gdbarch_dump: gdbarch_displaced_step_copy_insn_closure_by_addr_p() = %d\n", | |
934 | gdbarch_displaced_step_copy_insn_closure_by_addr_p (gdbarch)); | |
935 | fprintf_unfiltered (file, | |
936 | "gdbarch_dump: displaced_step_copy_insn_closure_by_addr = <%s>\n", | |
937 | host_address_to_string (gdbarch->displaced_step_copy_insn_closure_by_addr)); | |
938 | fprintf_unfiltered (file, | |
939 | "gdbarch_dump: displaced_step_finish = <%s>\n", | |
940 | host_address_to_string (gdbarch->displaced_step_finish)); | |
237fc4c9 PA |
941 | fprintf_unfiltered (file, |
942 | "gdbarch_dump: gdbarch_displaced_step_fixup_p() = %d\n", | |
943 | gdbarch_displaced_step_fixup_p (gdbarch)); | |
944 | fprintf_unfiltered (file, | |
30737ed9 JB |
945 | "gdbarch_dump: displaced_step_fixup = <%s>\n", |
946 | host_address_to_string (gdbarch->displaced_step_fixup)); | |
99e40580 UW |
947 | fprintf_unfiltered (file, |
948 | "gdbarch_dump: displaced_step_hw_singlestep = <%s>\n", | |
949 | host_address_to_string (gdbarch->displaced_step_hw_singlestep)); | |
237fc4c9 | 950 | fprintf_unfiltered (file, |
187b041e SM |
951 | "gdbarch_dump: gdbarch_displaced_step_prepare_p() = %d\n", |
952 | gdbarch_displaced_step_prepare_p (gdbarch)); | |
953 | fprintf_unfiltered (file, | |
954 | "gdbarch_dump: displaced_step_prepare = <%s>\n", | |
955 | host_address_to_string (gdbarch->displaced_step_prepare)); | |
956 | fprintf_unfiltered (file, | |
957 | "gdbarch_dump: displaced_step_restore_all_in_ptid = <%s>\n", | |
958 | host_address_to_string (gdbarch->displaced_step_restore_all_in_ptid)); | |
48f7351b AC |
959 | fprintf_unfiltered (file, |
960 | "gdbarch_dump: double_bit = %s\n", | |
623d3eb1 | 961 | plongest (gdbarch->double_bit)); |
a2428dbe | 962 | fprintf_unfiltered (file, |
48f7351b | 963 | "gdbarch_dump: double_format = %s\n", |
be7811ad | 964 | pformat (gdbarch->double_format)); |
8b367e17 JM |
965 | fprintf_unfiltered (file, |
966 | "gdbarch_dump: gdbarch_dtrace_disable_probe_p() = %d\n", | |
967 | gdbarch_dtrace_disable_probe_p (gdbarch)); | |
968 | fprintf_unfiltered (file, | |
969 | "gdbarch_dump: dtrace_disable_probe = <%s>\n", | |
970 | host_address_to_string (gdbarch->dtrace_disable_probe)); | |
971 | fprintf_unfiltered (file, | |
972 | "gdbarch_dump: gdbarch_dtrace_enable_probe_p() = %d\n", | |
973 | gdbarch_dtrace_enable_probe_p (gdbarch)); | |
974 | fprintf_unfiltered (file, | |
975 | "gdbarch_dump: dtrace_enable_probe = <%s>\n", | |
976 | host_address_to_string (gdbarch->dtrace_enable_probe)); | |
977 | fprintf_unfiltered (file, | |
978 | "gdbarch_dump: gdbarch_dtrace_parse_probe_argument_p() = %d\n", | |
979 | gdbarch_dtrace_parse_probe_argument_p (gdbarch)); | |
980 | fprintf_unfiltered (file, | |
981 | "gdbarch_dump: dtrace_parse_probe_argument = <%s>\n", | |
982 | host_address_to_string (gdbarch->dtrace_parse_probe_argument)); | |
983 | fprintf_unfiltered (file, | |
984 | "gdbarch_dump: gdbarch_dtrace_probe_is_enabled_p() = %d\n", | |
985 | gdbarch_dtrace_probe_is_enabled_p (gdbarch)); | |
986 | fprintf_unfiltered (file, | |
987 | "gdbarch_dump: dtrace_probe_is_enabled = <%s>\n", | |
988 | host_address_to_string (gdbarch->dtrace_probe_is_enabled)); | |
669fac23 | 989 | fprintf_unfiltered (file, |
30737ed9 JB |
990 | "gdbarch_dump: dummy_id = <%s>\n", |
991 | host_address_to_string (gdbarch->dummy_id)); | |
8da614df CV |
992 | fprintf_unfiltered (file, |
993 | "gdbarch_dump: dwarf2_addr_size = %s\n", | |
994 | plongest (gdbarch->dwarf2_addr_size)); | |
48f7351b | 995 | fprintf_unfiltered (file, |
30737ed9 JB |
996 | "gdbarch_dump: dwarf2_reg_to_regnum = <%s>\n", |
997 | host_address_to_string (gdbarch->dwarf2_reg_to_regnum)); | |
48f7351b | 998 | fprintf_unfiltered (file, |
30737ed9 JB |
999 | "gdbarch_dump: ecoff_reg_to_regnum = <%s>\n", |
1000 | host_address_to_string (gdbarch->ecoff_reg_to_regnum)); | |
3e29f34a MR |
1001 | fprintf_unfiltered (file, |
1002 | "gdbarch_dump: gdbarch_elf_make_msymbol_special_p() = %d\n", | |
1003 | gdbarch_elf_make_msymbol_special_p (gdbarch)); | |
48f7351b | 1004 | fprintf_unfiltered (file, |
30737ed9 JB |
1005 | "gdbarch_dump: elf_make_msymbol_special = <%s>\n", |
1006 | host_address_to_string (gdbarch->elf_make_msymbol_special)); | |
b41c5a85 JW |
1007 | fprintf_unfiltered (file, |
1008 | "gdbarch_dump: execute_dwarf_cfa_vendor_op = <%s>\n", | |
1009 | host_address_to_string (gdbarch->execute_dwarf_cfa_vendor_op)); | |
7a697b8d SS |
1010 | fprintf_unfiltered (file, |
1011 | "gdbarch_dump: fast_tracepoint_valid_at = <%s>\n", | |
1012 | host_address_to_string (gdbarch->fast_tracepoint_valid_at)); | |
48f7351b AC |
1013 | fprintf_unfiltered (file, |
1014 | "gdbarch_dump: gdbarch_fetch_pointer_argument_p() = %d\n", | |
be7811ad | 1015 | gdbarch_fetch_pointer_argument_p (gdbarch)); |
48f7351b | 1016 | fprintf_unfiltered (file, |
30737ed9 JB |
1017 | "gdbarch_dump: fetch_pointer_argument = <%s>\n", |
1018 | host_address_to_string (gdbarch->fetch_pointer_argument)); | |
b2756930 KB |
1019 | fprintf_unfiltered (file, |
1020 | "gdbarch_dump: gdbarch_fetch_tls_load_module_address_p() = %d\n", | |
be7811ad | 1021 | gdbarch_fetch_tls_load_module_address_p (gdbarch)); |
b2756930 | 1022 | fprintf_unfiltered (file, |
30737ed9 JB |
1023 | "gdbarch_dump: fetch_tls_load_module_address = <%s>\n", |
1024 | host_address_to_string (gdbarch->fetch_tls_load_module_address)); | |
35c2fab7 UW |
1025 | fprintf_unfiltered (file, |
1026 | "gdbarch_dump: gdbarch_find_memory_regions_p() = %d\n", | |
1027 | gdbarch_find_memory_regions_p (gdbarch)); | |
1028 | fprintf_unfiltered (file, | |
1029 | "gdbarch_dump: find_memory_regions = <%s>\n", | |
1030 | host_address_to_string (gdbarch->find_memory_regions)); | |
48f7351b AC |
1031 | fprintf_unfiltered (file, |
1032 | "gdbarch_dump: float_bit = %s\n", | |
623d3eb1 | 1033 | plongest (gdbarch->float_bit)); |
a2428dbe | 1034 | fprintf_unfiltered (file, |
48f7351b | 1035 | "gdbarch_dump: float_format = %s\n", |
be7811ad | 1036 | pformat (gdbarch->float_format)); |
9b790ce7 UW |
1037 | fprintf_unfiltered (file, |
1038 | "gdbarch_dump: floatformat_for_type = <%s>\n", | |
1039 | host_address_to_string (gdbarch->floatformat_for_type)); | |
48f7351b AC |
1040 | fprintf_unfiltered (file, |
1041 | "gdbarch_dump: fp0_regnum = %s\n", | |
623d3eb1 | 1042 | plongest (gdbarch->fp0_regnum)); |
a2428dbe AC |
1043 | fprintf_unfiltered (file, |
1044 | "gdbarch_dump: gdbarch_frame_align_p() = %d\n", | |
be7811ad | 1045 | gdbarch_frame_align_p (gdbarch)); |
a2428dbe | 1046 | fprintf_unfiltered (file, |
30737ed9 JB |
1047 | "gdbarch_dump: frame_align = <%s>\n", |
1048 | host_address_to_string (gdbarch->frame_align)); | |
48f7351b | 1049 | fprintf_unfiltered (file, |
0b1553bc UW |
1050 | "gdbarch_dump: frame_args_skip = %s\n", |
1051 | core_addr_to_string_nz (gdbarch->frame_args_skip)); | |
48f7351b AC |
1052 | fprintf_unfiltered (file, |
1053 | "gdbarch_dump: gdbarch_frame_num_args_p() = %d\n", | |
be7811ad | 1054 | gdbarch_frame_num_args_p (gdbarch)); |
48f7351b | 1055 | fprintf_unfiltered (file, |
30737ed9 JB |
1056 | "gdbarch_dump: frame_num_args = <%s>\n", |
1057 | host_address_to_string (gdbarch->frame_num_args)); | |
48f7351b AC |
1058 | fprintf_unfiltered (file, |
1059 | "gdbarch_dump: frame_red_zone_size = %s\n", | |
623d3eb1 | 1060 | plongest (gdbarch->frame_red_zone_size)); |
f208eee0 JK |
1061 | fprintf_unfiltered (file, |
1062 | "gdbarch_dump: gcc_target_options = <%s>\n", | |
1063 | host_address_to_string (gdbarch->gcc_target_options)); | |
a78c2d62 UW |
1064 | fprintf_unfiltered (file, |
1065 | "gdbarch_dump: gdbarch_gcore_bfd_target_p() = %d\n", | |
1066 | gdbarch_gcore_bfd_target_p (gdbarch)); | |
1067 | fprintf_unfiltered (file, | |
1068 | "gdbarch_dump: gcore_bfd_target = %s\n", | |
86ba1042 | 1069 | pstring (gdbarch->gcore_bfd_target)); |
1f8cf220 PA |
1070 | fprintf_unfiltered (file, |
1071 | "gdbarch_dump: gdbarch_gdb_signal_from_target_p() = %d\n", | |
1072 | gdbarch_gdb_signal_from_target_p (gdbarch)); | |
2ea28649 | 1073 | fprintf_unfiltered (file, |
22203bbf PA |
1074 | "gdbarch_dump: gdb_signal_from_target = <%s>\n", |
1075 | host_address_to_string (gdbarch->gdb_signal_from_target)); | |
eb14d406 SDJ |
1076 | fprintf_unfiltered (file, |
1077 | "gdbarch_dump: gdbarch_gdb_signal_to_target_p() = %d\n", | |
1078 | gdbarch_gdb_signal_to_target_p (gdbarch)); | |
1079 | fprintf_unfiltered (file, | |
1080 | "gdbarch_dump: gdb_signal_to_target = <%s>\n", | |
1081 | host_address_to_string (gdbarch->gdb_signal_to_target)); | |
6710bf39 SS |
1082 | fprintf_unfiltered (file, |
1083 | "gdbarch_dump: gen_return_address = <%s>\n", | |
1084 | host_address_to_string (gdbarch->gen_return_address)); | |
48f7351b AC |
1085 | fprintf_unfiltered (file, |
1086 | "gdbarch_dump: gdbarch_get_longjmp_target_p() = %d\n", | |
be7811ad | 1087 | gdbarch_get_longjmp_target_p (gdbarch)); |
48f7351b | 1088 | fprintf_unfiltered (file, |
30737ed9 JB |
1089 | "gdbarch_dump: get_longjmp_target = <%s>\n", |
1090 | host_address_to_string (gdbarch->get_longjmp_target)); | |
aa7ca1bb AH |
1091 | fprintf_unfiltered (file, |
1092 | "gdbarch_dump: get_pc_address_flags = <%s>\n", | |
1093 | host_address_to_string (gdbarch->get_pc_address_flags)); | |
4aa995e1 PA |
1094 | fprintf_unfiltered (file, |
1095 | "gdbarch_dump: gdbarch_get_siginfo_type_p() = %d\n", | |
1096 | gdbarch_get_siginfo_type_p (gdbarch)); | |
1097 | fprintf_unfiltered (file, | |
315aef0a PA |
1098 | "gdbarch_dump: get_siginfo_type = <%s>\n", |
1099 | host_address_to_string (gdbarch->get_siginfo_type)); | |
a96d9b2e SDJ |
1100 | fprintf_unfiltered (file, |
1101 | "gdbarch_dump: gdbarch_get_syscall_number_p() = %d\n", | |
1102 | gdbarch_get_syscall_number_p (gdbarch)); | |
1103 | fprintf_unfiltered (file, | |
1104 | "gdbarch_dump: get_syscall_number = <%s>\n", | |
1105 | host_address_to_string (gdbarch->get_syscall_number)); | |
6e056c81 JB |
1106 | fprintf_unfiltered (file, |
1107 | "gdbarch_dump: gdbarch_get_thread_local_address_p() = %d\n", | |
1108 | gdbarch_get_thread_local_address_p (gdbarch)); | |
1109 | fprintf_unfiltered (file, | |
1110 | "gdbarch_dump: get_thread_local_address = <%s>\n", | |
1111 | host_address_to_string (gdbarch->get_thread_local_address)); | |
ac04f72b TT |
1112 | fprintf_unfiltered (file, |
1113 | "gdbarch_dump: gnu_triplet_regexp = <%s>\n", | |
1114 | host_address_to_string (gdbarch->gnu_triplet_regexp)); | |
5f034a78 MK |
1115 | fprintf_unfiltered (file, |
1116 | "gdbarch_dump: guess_tracepoint_registers = <%s>\n", | |
1117 | host_address_to_string (gdbarch->guess_tracepoint_registers)); | |
f9e9243a UW |
1118 | fprintf_unfiltered (file, |
1119 | "gdbarch_dump: half_bit = %s\n", | |
1120 | plongest (gdbarch->half_bit)); | |
1121 | fprintf_unfiltered (file, | |
1122 | "gdbarch_dump: half_format = %s\n", | |
1123 | pformat (gdbarch->half_format)); | |
ab38a727 PA |
1124 | fprintf_unfiltered (file, |
1125 | "gdbarch_dump: has_dos_based_file_system = %s\n", | |
1126 | plongest (gdbarch->has_dos_based_file_system)); | |
2567c7d9 PA |
1127 | fprintf_unfiltered (file, |
1128 | "gdbarch_dump: has_global_breakpoints = %s\n", | |
1129 | plongest (gdbarch->has_global_breakpoints)); | |
50c71eaf PA |
1130 | fprintf_unfiltered (file, |
1131 | "gdbarch_dump: has_global_solist = %s\n", | |
1132 | plongest (gdbarch->has_global_solist)); | |
6c95b8df PA |
1133 | fprintf_unfiltered (file, |
1134 | "gdbarch_dump: has_shared_address_space = <%s>\n", | |
1135 | host_address_to_string (gdbarch->has_shared_address_space)); | |
a2428dbe | 1136 | fprintf_unfiltered (file, |
48f7351b | 1137 | "gdbarch_dump: have_nonsteppable_watchpoint = %s\n", |
623d3eb1 | 1138 | plongest (gdbarch->have_nonsteppable_watchpoint)); |
1d509aa6 MM |
1139 | fprintf_unfiltered (file, |
1140 | "gdbarch_dump: in_indirect_branch_thunk = <%s>\n", | |
1141 | host_address_to_string (gdbarch->in_indirect_branch_thunk)); | |
48f7351b | 1142 | fprintf_unfiltered (file, |
30737ed9 JB |
1143 | "gdbarch_dump: in_solib_return_trampoline = <%s>\n", |
1144 | host_address_to_string (gdbarch->in_solib_return_trampoline)); | |
f208eee0 JK |
1145 | fprintf_unfiltered (file, |
1146 | "gdbarch_dump: infcall_mmap = <%s>\n", | |
1147 | host_address_to_string (gdbarch->infcall_mmap)); | |
7f361056 JK |
1148 | fprintf_unfiltered (file, |
1149 | "gdbarch_dump: infcall_munmap = <%s>\n", | |
1150 | host_address_to_string (gdbarch->infcall_munmap)); | |
3030c96e UW |
1151 | fprintf_unfiltered (file, |
1152 | "gdbarch_dump: gdbarch_info_proc_p() = %d\n", | |
1153 | gdbarch_info_proc_p (gdbarch)); | |
1154 | fprintf_unfiltered (file, | |
1155 | "gdbarch_dump: info_proc = <%s>\n", | |
1156 | host_address_to_string (gdbarch->info_proc)); | |
48f7351b | 1157 | fprintf_unfiltered (file, |
30737ed9 JB |
1158 | "gdbarch_dump: inner_than = <%s>\n", |
1159 | host_address_to_string (gdbarch->inner_than)); | |
c2170eef MM |
1160 | fprintf_unfiltered (file, |
1161 | "gdbarch_dump: insn_is_call = <%s>\n", | |
1162 | host_address_to_string (gdbarch->insn_is_call)); | |
1163 | fprintf_unfiltered (file, | |
1164 | "gdbarch_dump: insn_is_jump = <%s>\n", | |
1165 | host_address_to_string (gdbarch->insn_is_jump)); | |
1166 | fprintf_unfiltered (file, | |
1167 | "gdbarch_dump: insn_is_ret = <%s>\n", | |
1168 | host_address_to_string (gdbarch->insn_is_ret)); | |
48f7351b AC |
1169 | fprintf_unfiltered (file, |
1170 | "gdbarch_dump: int_bit = %s\n", | |
623d3eb1 | 1171 | plongest (gdbarch->int_bit)); |
48f7351b AC |
1172 | fprintf_unfiltered (file, |
1173 | "gdbarch_dump: gdbarch_integer_to_address_p() = %d\n", | |
be7811ad | 1174 | gdbarch_integer_to_address_p (gdbarch)); |
48f7351b | 1175 | fprintf_unfiltered (file, |
30737ed9 JB |
1176 | "gdbarch_dump: integer_to_address = <%s>\n", |
1177 | host_address_to_string (gdbarch->integer_to_address)); | |
19630284 JB |
1178 | fprintf_unfiltered (file, |
1179 | "gdbarch_dump: iterate_over_objfiles_in_search_order = <%s>\n", | |
1180 | host_address_to_string (gdbarch->iterate_over_objfiles_in_search_order)); | |
5aa82d05 AA |
1181 | fprintf_unfiltered (file, |
1182 | "gdbarch_dump: gdbarch_iterate_over_regset_sections_p() = %d\n", | |
1183 | gdbarch_iterate_over_regset_sections_p (gdbarch)); | |
1184 | fprintf_unfiltered (file, | |
1185 | "gdbarch_dump: iterate_over_regset_sections = <%s>\n", | |
1186 | host_address_to_string (gdbarch->iterate_over_regset_sections)); | |
48f7351b AC |
1187 | fprintf_unfiltered (file, |
1188 | "gdbarch_dump: long_bit = %s\n", | |
623d3eb1 | 1189 | plongest (gdbarch->long_bit)); |
48f7351b AC |
1190 | fprintf_unfiltered (file, |
1191 | "gdbarch_dump: long_double_bit = %s\n", | |
623d3eb1 | 1192 | plongest (gdbarch->long_double_bit)); |
a2428dbe | 1193 | fprintf_unfiltered (file, |
48f7351b | 1194 | "gdbarch_dump: long_double_format = %s\n", |
be7811ad | 1195 | pformat (gdbarch->long_double_format)); |
48f7351b AC |
1196 | fprintf_unfiltered (file, |
1197 | "gdbarch_dump: long_long_bit = %s\n", | |
623d3eb1 | 1198 | plongest (gdbarch->long_long_bit)); |
6432734d UW |
1199 | fprintf_unfiltered (file, |
1200 | "gdbarch_dump: gdbarch_make_corefile_notes_p() = %d\n", | |
1201 | gdbarch_make_corefile_notes_p (gdbarch)); | |
1202 | fprintf_unfiltered (file, | |
1203 | "gdbarch_dump: make_corefile_notes = <%s>\n", | |
1204 | host_address_to_string (gdbarch->make_corefile_notes)); | |
3e29f34a MR |
1205 | fprintf_unfiltered (file, |
1206 | "gdbarch_dump: make_symbol_special = <%s>\n", | |
1207 | host_address_to_string (gdbarch->make_symbol_special)); | |
237fc4c9 PA |
1208 | fprintf_unfiltered (file, |
1209 | "gdbarch_dump: gdbarch_max_insn_length_p() = %d\n", | |
1210 | gdbarch_max_insn_length_p (gdbarch)); | |
1211 | fprintf_unfiltered (file, | |
1212 | "gdbarch_dump: max_insn_length = %s\n", | |
623d3eb1 | 1213 | plongest (gdbarch->max_insn_length)); |
48f7351b | 1214 | fprintf_unfiltered (file, |
30737ed9 JB |
1215 | "gdbarch_dump: memory_insert_breakpoint = <%s>\n", |
1216 | host_address_to_string (gdbarch->memory_insert_breakpoint)); | |
48f7351b | 1217 | fprintf_unfiltered (file, |
30737ed9 JB |
1218 | "gdbarch_dump: memory_remove_breakpoint = <%s>\n", |
1219 | host_address_to_string (gdbarch->memory_remove_breakpoint)); | |
48f7351b AC |
1220 | fprintf_unfiltered (file, |
1221 | "gdbarch_dump: num_pseudo_regs = %s\n", | |
623d3eb1 | 1222 | plongest (gdbarch->num_pseudo_regs)); |
48f7351b AC |
1223 | fprintf_unfiltered (file, |
1224 | "gdbarch_dump: num_regs = %s\n", | |
623d3eb1 | 1225 | plongest (gdbarch->num_regs)); |
48f7351b AC |
1226 | fprintf_unfiltered (file, |
1227 | "gdbarch_dump: osabi = %s\n", | |
623d3eb1 | 1228 | plongest (gdbarch->osabi)); |
1c772458 UW |
1229 | fprintf_unfiltered (file, |
1230 | "gdbarch_dump: gdbarch_overlay_update_p() = %d\n", | |
be7811ad | 1231 | gdbarch_overlay_update_p (gdbarch)); |
1c772458 | 1232 | fprintf_unfiltered (file, |
30737ed9 JB |
1233 | "gdbarch_dump: overlay_update = <%s>\n", |
1234 | host_address_to_string (gdbarch->overlay_update)); | |
48f7351b AC |
1235 | fprintf_unfiltered (file, |
1236 | "gdbarch_dump: pc_regnum = %s\n", | |
623d3eb1 | 1237 | plongest (gdbarch->pc_regnum)); |
48f7351b | 1238 | fprintf_unfiltered (file, |
30737ed9 JB |
1239 | "gdbarch_dump: pointer_to_address = <%s>\n", |
1240 | host_address_to_string (gdbarch->pointer_to_address)); | |
2faa3447 JB |
1241 | fprintf_unfiltered (file, |
1242 | "gdbarch_dump: print_auxv_entry = <%s>\n", | |
1243 | host_address_to_string (gdbarch->print_auxv_entry)); | |
7996bcec | 1244 | fprintf_unfiltered (file, |
30737ed9 JB |
1245 | "gdbarch_dump: print_float_info = <%s>\n", |
1246 | host_address_to_string (gdbarch->print_float_info)); | |
7996bcec | 1247 | fprintf_unfiltered (file, |
30737ed9 JB |
1248 | "gdbarch_dump: print_insn = <%s>\n", |
1249 | host_address_to_string (gdbarch->print_insn)); | |
48f7351b | 1250 | fprintf_unfiltered (file, |
30737ed9 JB |
1251 | "gdbarch_dump: print_registers_info = <%s>\n", |
1252 | host_address_to_string (gdbarch->print_registers_info)); | |
7996bcec AC |
1253 | fprintf_unfiltered (file, |
1254 | "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n", | |
be7811ad | 1255 | gdbarch_print_vector_info_p (gdbarch)); |
7996bcec | 1256 | fprintf_unfiltered (file, |
30737ed9 JB |
1257 | "gdbarch_dump: print_vector_info = <%s>\n", |
1258 | host_address_to_string (gdbarch->print_vector_info)); | |
0508c3ec HZ |
1259 | fprintf_unfiltered (file, |
1260 | "gdbarch_dump: gdbarch_process_record_p() = %d\n", | |
1261 | gdbarch_process_record_p (gdbarch)); | |
1262 | fprintf_unfiltered (file, | |
1263 | "gdbarch_dump: process_record = <%s>\n", | |
1264 | host_address_to_string (gdbarch->process_record)); | |
3846b520 HZ |
1265 | fprintf_unfiltered (file, |
1266 | "gdbarch_dump: gdbarch_process_record_signal_p() = %d\n", | |
1267 | gdbarch_process_record_signal_p (gdbarch)); | |
1268 | fprintf_unfiltered (file, | |
1269 | "gdbarch_dump: process_record_signal = <%s>\n", | |
1270 | host_address_to_string (gdbarch->process_record_signal)); | |
5133a315 LM |
1271 | fprintf_unfiltered (file, |
1272 | "gdbarch_dump: program_breakpoint_here_p = <%s>\n", | |
1273 | host_address_to_string (gdbarch->program_breakpoint_here_p)); | |
48f7351b AC |
1274 | fprintf_unfiltered (file, |
1275 | "gdbarch_dump: ps_regnum = %s\n", | |
623d3eb1 | 1276 | plongest (gdbarch->ps_regnum)); |
a2428dbe AC |
1277 | fprintf_unfiltered (file, |
1278 | "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n", | |
be7811ad | 1279 | gdbarch_pseudo_register_read_p (gdbarch)); |
a2428dbe | 1280 | fprintf_unfiltered (file, |
30737ed9 JB |
1281 | "gdbarch_dump: pseudo_register_read = <%s>\n", |
1282 | host_address_to_string (gdbarch->pseudo_register_read)); | |
3543a589 TT |
1283 | fprintf_unfiltered (file, |
1284 | "gdbarch_dump: gdbarch_pseudo_register_read_value_p() = %d\n", | |
1285 | gdbarch_pseudo_register_read_value_p (gdbarch)); | |
1286 | fprintf_unfiltered (file, | |
1287 | "gdbarch_dump: pseudo_register_read_value = <%s>\n", | |
1288 | host_address_to_string (gdbarch->pseudo_register_read_value)); | |
a2428dbe AC |
1289 | fprintf_unfiltered (file, |
1290 | "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n", | |
be7811ad | 1291 | gdbarch_pseudo_register_write_p (gdbarch)); |
a2428dbe | 1292 | fprintf_unfiltered (file, |
30737ed9 JB |
1293 | "gdbarch_dump: pseudo_register_write = <%s>\n", |
1294 | host_address_to_string (gdbarch->pseudo_register_write)); | |
48f7351b AC |
1295 | fprintf_unfiltered (file, |
1296 | "gdbarch_dump: ptr_bit = %s\n", | |
623d3eb1 | 1297 | plongest (gdbarch->ptr_bit)); |
7996bcec AC |
1298 | fprintf_unfiltered (file, |
1299 | "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n", | |
be7811ad | 1300 | gdbarch_push_dummy_call_p (gdbarch)); |
7996bcec | 1301 | fprintf_unfiltered (file, |
30737ed9 JB |
1302 | "gdbarch_dump: push_dummy_call = <%s>\n", |
1303 | host_address_to_string (gdbarch->push_dummy_call)); | |
7996bcec AC |
1304 | fprintf_unfiltered (file, |
1305 | "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n", | |
be7811ad | 1306 | gdbarch_push_dummy_code_p (gdbarch)); |
7996bcec | 1307 | fprintf_unfiltered (file, |
30737ed9 JB |
1308 | "gdbarch_dump: push_dummy_code = <%s>\n", |
1309 | host_address_to_string (gdbarch->push_dummy_code)); | |
7e35103a JB |
1310 | fprintf_unfiltered (file, |
1311 | "gdbarch_dump: ravenscar_ops = %s\n", | |
1312 | host_address_to_string (gdbarch->ravenscar_ops)); | |
7e183d27 KB |
1313 | fprintf_unfiltered (file, |
1314 | "gdbarch_dump: read_core_file_mappings = <%s>\n", | |
1315 | host_address_to_string (gdbarch->read_core_file_mappings)); | |
48f7351b AC |
1316 | fprintf_unfiltered (file, |
1317 | "gdbarch_dump: gdbarch_read_pc_p() = %d\n", | |
be7811ad | 1318 | gdbarch_read_pc_p (gdbarch)); |
48f7351b | 1319 | fprintf_unfiltered (file, |
30737ed9 JB |
1320 | "gdbarch_dump: read_pc = <%s>\n", |
1321 | host_address_to_string (gdbarch->read_pc)); | |
60c5725c DJ |
1322 | fprintf_unfiltered (file, |
1323 | "gdbarch_dump: gdbarch_record_special_symbol_p() = %d\n", | |
1324 | gdbarch_record_special_symbol_p (gdbarch)); | |
1325 | fprintf_unfiltered (file, | |
30737ed9 JB |
1326 | "gdbarch_dump: record_special_symbol = <%s>\n", |
1327 | host_address_to_string (gdbarch->record_special_symbol)); | |
a2428dbe | 1328 | fprintf_unfiltered (file, |
30737ed9 JB |
1329 | "gdbarch_dump: register_name = <%s>\n", |
1330 | host_address_to_string (gdbarch->register_name)); | |
48f7351b | 1331 | fprintf_unfiltered (file, |
30737ed9 JB |
1332 | "gdbarch_dump: register_reggroup_p = <%s>\n", |
1333 | host_address_to_string (gdbarch->register_reggroup_p)); | |
48f7351b | 1334 | fprintf_unfiltered (file, |
30737ed9 JB |
1335 | "gdbarch_dump: register_sim_regno = <%s>\n", |
1336 | host_address_to_string (gdbarch->register_sim_regno)); | |
48f7351b | 1337 | fprintf_unfiltered (file, |
30737ed9 JB |
1338 | "gdbarch_dump: register_to_value = <%s>\n", |
1339 | host_address_to_string (gdbarch->register_to_value)); | |
7996bcec AC |
1340 | fprintf_unfiltered (file, |
1341 | "gdbarch_dump: gdbarch_register_type_p() = %d\n", | |
be7811ad | 1342 | gdbarch_register_type_p (gdbarch)); |
7996bcec | 1343 | fprintf_unfiltered (file, |
30737ed9 JB |
1344 | "gdbarch_dump: register_type = <%s>\n", |
1345 | host_address_to_string (gdbarch->register_type)); | |
dde08ee1 PA |
1346 | fprintf_unfiltered (file, |
1347 | "gdbarch_dump: gdbarch_relocate_instruction_p() = %d\n", | |
1348 | gdbarch_relocate_instruction_p (gdbarch)); | |
1349 | fprintf_unfiltered (file, | |
1350 | "gdbarch_dump: relocate_instruction = <%s>\n", | |
1351 | host_address_to_string (gdbarch->relocate_instruction)); | |
123dc839 | 1352 | fprintf_unfiltered (file, |
30737ed9 JB |
1353 | "gdbarch_dump: remote_register_number = <%s>\n", |
1354 | host_address_to_string (gdbarch->remote_register_number)); | |
272bb05c JB |
1355 | fprintf_unfiltered (file, |
1356 | "gdbarch_dump: gdbarch_report_signal_info_p() = %d\n", | |
1357 | gdbarch_report_signal_info_p (gdbarch)); | |
1358 | fprintf_unfiltered (file, | |
1359 | "gdbarch_dump: report_signal_info = <%s>\n", | |
1360 | host_address_to_string (gdbarch->report_signal_info)); | |
18648a37 YQ |
1361 | fprintf_unfiltered (file, |
1362 | "gdbarch_dump: return_in_first_hidden_param_p = <%s>\n", | |
1363 | host_address_to_string (gdbarch->return_in_first_hidden_param_p)); | |
a2428dbe AC |
1364 | fprintf_unfiltered (file, |
1365 | "gdbarch_dump: gdbarch_return_value_p() = %d\n", | |
be7811ad | 1366 | gdbarch_return_value_p (gdbarch)); |
a2428dbe | 1367 | fprintf_unfiltered (file, |
30737ed9 JB |
1368 | "gdbarch_dump: return_value = <%s>\n", |
1369 | host_address_to_string (gdbarch->return_value)); | |
48f7351b | 1370 | fprintf_unfiltered (file, |
30737ed9 JB |
1371 | "gdbarch_dump: sdb_reg_to_regnum = <%s>\n", |
1372 | host_address_to_string (gdbarch->sdb_reg_to_regnum)); | |
48f7351b AC |
1373 | fprintf_unfiltered (file, |
1374 | "gdbarch_dump: short_bit = %s\n", | |
623d3eb1 | 1375 | plongest (gdbarch->short_bit)); |
a738ea1d YQ |
1376 | fprintf_unfiltered (file, |
1377 | "gdbarch_dump: significant_addr_bit = %s\n", | |
1378 | plongest (gdbarch->significant_addr_bit)); | |
3352ef37 AC |
1379 | fprintf_unfiltered (file, |
1380 | "gdbarch_dump: gdbarch_single_step_through_delay_p() = %d\n", | |
be7811ad | 1381 | gdbarch_single_step_through_delay_p (gdbarch)); |
3352ef37 | 1382 | fprintf_unfiltered (file, |
30737ed9 JB |
1383 | "gdbarch_dump: single_step_through_delay = <%s>\n", |
1384 | host_address_to_string (gdbarch->single_step_through_delay)); | |
591a12a1 UW |
1385 | fprintf_unfiltered (file, |
1386 | "gdbarch_dump: gdbarch_skip_entrypoint_p() = %d\n", | |
1387 | gdbarch_skip_entrypoint_p (gdbarch)); | |
1388 | fprintf_unfiltered (file, | |
1389 | "gdbarch_dump: skip_entrypoint = <%s>\n", | |
1390 | host_address_to_string (gdbarch->skip_entrypoint)); | |
4309257c PM |
1391 | fprintf_unfiltered (file, |
1392 | "gdbarch_dump: gdbarch_skip_main_prologue_p() = %d\n", | |
1393 | gdbarch_skip_main_prologue_p (gdbarch)); | |
1394 | fprintf_unfiltered (file, | |
30737ed9 JB |
1395 | "gdbarch_dump: skip_main_prologue = <%s>\n", |
1396 | host_address_to_string (gdbarch->skip_main_prologue)); | |
6d350bb5 | 1397 | fprintf_unfiltered (file, |
30737ed9 JB |
1398 | "gdbarch_dump: skip_permanent_breakpoint = <%s>\n", |
1399 | host_address_to_string (gdbarch->skip_permanent_breakpoint)); | |
dea0c52f | 1400 | fprintf_unfiltered (file, |
30737ed9 JB |
1401 | "gdbarch_dump: skip_prologue = <%s>\n", |
1402 | host_address_to_string (gdbarch->skip_prologue)); | |
48f7351b | 1403 | fprintf_unfiltered (file, |
30737ed9 JB |
1404 | "gdbarch_dump: skip_solib_resolver = <%s>\n", |
1405 | host_address_to_string (gdbarch->skip_solib_resolver)); | |
48f7351b | 1406 | fprintf_unfiltered (file, |
30737ed9 JB |
1407 | "gdbarch_dump: skip_trampoline_code = <%s>\n", |
1408 | host_address_to_string (gdbarch->skip_trampoline_code)); | |
48f7351b AC |
1409 | fprintf_unfiltered (file, |
1410 | "gdbarch_dump: gdbarch_software_single_step_p() = %d\n", | |
be7811ad | 1411 | gdbarch_software_single_step_p (gdbarch)); |
48f7351b | 1412 | fprintf_unfiltered (file, |
30737ed9 JB |
1413 | "gdbarch_dump: software_single_step = <%s>\n", |
1414 | host_address_to_string (gdbarch->software_single_step)); | |
203c3895 UW |
1415 | fprintf_unfiltered (file, |
1416 | "gdbarch_dump: sofun_address_maybe_missing = %s\n", | |
623d3eb1 | 1417 | plongest (gdbarch->sofun_address_maybe_missing)); |
08105857 PA |
1418 | fprintf_unfiltered (file, |
1419 | "gdbarch_dump: solib_symbols_extension = %s\n", | |
1420 | pstring (gdbarch->solib_symbols_extension)); | |
48f7351b AC |
1421 | fprintf_unfiltered (file, |
1422 | "gdbarch_dump: sp_regnum = %s\n", | |
623d3eb1 | 1423 | plongest (gdbarch->sp_regnum)); |
a2428dbe | 1424 | fprintf_unfiltered (file, |
30737ed9 JB |
1425 | "gdbarch_dump: stab_reg_to_regnum = <%s>\n", |
1426 | host_address_to_string (gdbarch->stab_reg_to_regnum)); | |
48f7351b | 1427 | fprintf_unfiltered (file, |
30737ed9 JB |
1428 | "gdbarch_dump: stabs_argument_has_addr = <%s>\n", |
1429 | host_address_to_string (gdbarch->stabs_argument_has_addr)); | |
5b74bf7d YQ |
1430 | fprintf_unfiltered (file, |
1431 | "gdbarch_dump: stack_frame_destroyed_p = <%s>\n", | |
1432 | host_address_to_string (gdbarch->stack_frame_destroyed_p)); | |
7d7571f0 SDJ |
1433 | fprintf_unfiltered (file, |
1434 | "gdbarch_dump: gdbarch_stap_adjust_register_p() = %d\n", | |
1435 | gdbarch_stap_adjust_register_p (gdbarch)); | |
1436 | fprintf_unfiltered (file, | |
1437 | "gdbarch_dump: stap_adjust_register = <%s>\n", | |
1438 | host_address_to_string (gdbarch->stap_adjust_register)); | |
55aa24fb SDJ |
1439 | fprintf_unfiltered (file, |
1440 | "gdbarch_dump: stap_gdb_register_prefix = %s\n", | |
08af7a40 | 1441 | pstring (gdbarch->stap_gdb_register_prefix)); |
55aa24fb SDJ |
1442 | fprintf_unfiltered (file, |
1443 | "gdbarch_dump: stap_gdb_register_suffix = %s\n", | |
08af7a40 | 1444 | pstring (gdbarch->stap_gdb_register_suffix)); |
55aa24fb | 1445 | fprintf_unfiltered (file, |
05c0465e SDJ |
1446 | "gdbarch_dump: stap_integer_prefixes = %s\n", |
1447 | pstring_list (gdbarch->stap_integer_prefixes)); | |
55aa24fb | 1448 | fprintf_unfiltered (file, |
05c0465e SDJ |
1449 | "gdbarch_dump: stap_integer_suffixes = %s\n", |
1450 | pstring_list (gdbarch->stap_integer_suffixes)); | |
55aa24fb SDJ |
1451 | fprintf_unfiltered (file, |
1452 | "gdbarch_dump: gdbarch_stap_is_single_operand_p() = %d\n", | |
1453 | gdbarch_stap_is_single_operand_p (gdbarch)); | |
1454 | fprintf_unfiltered (file, | |
1455 | "gdbarch_dump: stap_is_single_operand = <%s>\n", | |
1456 | host_address_to_string (gdbarch->stap_is_single_operand)); | |
1457 | fprintf_unfiltered (file, | |
1458 | "gdbarch_dump: gdbarch_stap_parse_special_token_p() = %d\n", | |
1459 | gdbarch_stap_parse_special_token_p (gdbarch)); | |
1460 | fprintf_unfiltered (file, | |
1461 | "gdbarch_dump: stap_parse_special_token = <%s>\n", | |
1462 | host_address_to_string (gdbarch->stap_parse_special_token)); | |
1463 | fprintf_unfiltered (file, | |
05c0465e SDJ |
1464 | "gdbarch_dump: stap_register_indirection_prefixes = %s\n", |
1465 | pstring_list (gdbarch->stap_register_indirection_prefixes)); | |
55aa24fb | 1466 | fprintf_unfiltered (file, |
05c0465e SDJ |
1467 | "gdbarch_dump: stap_register_indirection_suffixes = %s\n", |
1468 | pstring_list (gdbarch->stap_register_indirection_suffixes)); | |
55aa24fb | 1469 | fprintf_unfiltered (file, |
05c0465e SDJ |
1470 | "gdbarch_dump: stap_register_prefixes = %s\n", |
1471 | pstring_list (gdbarch->stap_register_prefixes)); | |
55aa24fb | 1472 | fprintf_unfiltered (file, |
05c0465e SDJ |
1473 | "gdbarch_dump: stap_register_suffixes = %s\n", |
1474 | pstring_list (gdbarch->stap_register_suffixes)); | |
cd6c3b4f YQ |
1475 | fprintf_unfiltered (file, |
1476 | "gdbarch_dump: sw_breakpoint_from_kind = <%s>\n", | |
1477 | host_address_to_string (gdbarch->sw_breakpoint_from_kind)); | |
458c8db8 SDJ |
1478 | fprintf_unfiltered (file, |
1479 | "gdbarch_dump: syscalls_info = %s\n", | |
1480 | host_address_to_string (gdbarch->syscalls_info)); | |
424163ea DJ |
1481 | fprintf_unfiltered (file, |
1482 | "gdbarch_dump: target_desc = %s\n", | |
30737ed9 | 1483 | host_address_to_string (gdbarch->target_desc)); |
2b4424c3 TT |
1484 | fprintf_unfiltered (file, |
1485 | "gdbarch_dump: type_align = <%s>\n", | |
1486 | host_address_to_string (gdbarch->type_align)); | |
7996bcec | 1487 | fprintf_unfiltered (file, |
30737ed9 JB |
1488 | "gdbarch_dump: unwind_pc = <%s>\n", |
1489 | host_address_to_string (gdbarch->unwind_pc)); | |
bd1ce8ba | 1490 | fprintf_unfiltered (file, |
30737ed9 JB |
1491 | "gdbarch_dump: unwind_sp = <%s>\n", |
1492 | host_address_to_string (gdbarch->unwind_sp)); | |
65b48a81 PB |
1493 | fprintf_unfiltered (file, |
1494 | "gdbarch_dump: valid_disassembler_options = %s\n", | |
f7bb4e3a | 1495 | host_address_to_string (gdbarch->valid_disassembler_options)); |
9acbedc0 | 1496 | fprintf_unfiltered (file, |
30737ed9 JB |
1497 | "gdbarch_dump: value_from_register = <%s>\n", |
1498 | host_address_to_string (gdbarch->value_from_register)); | |
48f7351b | 1499 | fprintf_unfiltered (file, |
30737ed9 JB |
1500 | "gdbarch_dump: value_to_register = <%s>\n", |
1501 | host_address_to_string (gdbarch->value_to_register)); | |
0d5de010 DJ |
1502 | fprintf_unfiltered (file, |
1503 | "gdbarch_dump: vbit_in_delta = %s\n", | |
623d3eb1 | 1504 | plongest (gdbarch->vbit_in_delta)); |
48f7351b | 1505 | fprintf_unfiltered (file, |
30737ed9 JB |
1506 | "gdbarch_dump: virtual_frame_pointer = <%s>\n", |
1507 | host_address_to_string (gdbarch->virtual_frame_pointer)); | |
3437254d PA |
1508 | fprintf_unfiltered (file, |
1509 | "gdbarch_dump: vsyscall_range = <%s>\n", | |
1510 | host_address_to_string (gdbarch->vsyscall_range)); | |
0d5de010 DJ |
1511 | fprintf_unfiltered (file, |
1512 | "gdbarch_dump: vtable_function_descriptors = %s\n", | |
623d3eb1 | 1513 | plongest (gdbarch->vtable_function_descriptors)); |
53375380 PA |
1514 | fprintf_unfiltered (file, |
1515 | "gdbarch_dump: wchar_bit = %s\n", | |
1516 | plongest (gdbarch->wchar_bit)); | |
1517 | fprintf_unfiltered (file, | |
1518 | "gdbarch_dump: wchar_signed = %s\n", | |
1519 | plongest (gdbarch->wchar_signed)); | |
4b9b3959 | 1520 | fprintf_unfiltered (file, |
61a1198a | 1521 | "gdbarch_dump: gdbarch_write_pc_p() = %d\n", |
be7811ad | 1522 | gdbarch_write_pc_p (gdbarch)); |
48f7351b | 1523 | fprintf_unfiltered (file, |
30737ed9 JB |
1524 | "gdbarch_dump: write_pc = <%s>\n", |
1525 | host_address_to_string (gdbarch->write_pc)); | |
458c8db8 SDJ |
1526 | fprintf_unfiltered (file, |
1527 | "gdbarch_dump: xml_syscall_file = %s\n", | |
1528 | pstring (gdbarch->xml_syscall_file)); | |
be7811ad MD |
1529 | if (gdbarch->dump_tdep != NULL) |
1530 | gdbarch->dump_tdep (gdbarch, file); | |
0f71a2f6 JM |
1531 | } |
1532 | ||
1533 | struct gdbarch_tdep * | |
104c1213 | 1534 | gdbarch_tdep (struct gdbarch *gdbarch) |
0f71a2f6 JM |
1535 | { |
1536 | if (gdbarch_debug >= 2) | |
0f71a2f6 JM |
1537 | fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n"); |
1538 | return gdbarch->tdep; | |
1539 | } | |
1540 | ||
1541 | ||
1542 | const struct bfd_arch_info * | |
104c1213 | 1543 | gdbarch_bfd_arch_info (struct gdbarch *gdbarch) |
0f71a2f6 | 1544 | { |
8de9bdc4 | 1545 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 1546 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
1547 | fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n"); |
1548 | return gdbarch->bfd_arch_info; | |
1549 | } | |
1550 | ||
94123b4f | 1551 | enum bfd_endian |
104c1213 | 1552 | gdbarch_byte_order (struct gdbarch *gdbarch) |
0f71a2f6 | 1553 | { |
8de9bdc4 | 1554 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 1555 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
1556 | fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n"); |
1557 | return gdbarch->byte_order; | |
1558 | } | |
1559 | ||
94123b4f | 1560 | enum bfd_endian |
9d4fde75 SS |
1561 | gdbarch_byte_order_for_code (struct gdbarch *gdbarch) |
1562 | { | |
1563 | gdb_assert (gdbarch != NULL); | |
1564 | if (gdbarch_debug >= 2) | |
1565 | fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order_for_code called\n"); | |
1566 | return gdbarch->byte_order_for_code; | |
1567 | } | |
1568 | ||
4be87837 DJ |
1569 | enum gdb_osabi |
1570 | gdbarch_osabi (struct gdbarch *gdbarch) | |
1571 | { | |
1572 | gdb_assert (gdbarch != NULL); | |
1573 | if (gdbarch_debug >= 2) | |
1574 | fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n"); | |
1575 | return gdbarch->osabi; | |
1576 | } | |
1577 | ||
424163ea DJ |
1578 | const struct target_desc * |
1579 | gdbarch_target_desc (struct gdbarch *gdbarch) | |
1580 | { | |
1581 | gdb_assert (gdbarch != NULL); | |
1582 | if (gdbarch_debug >= 2) | |
1583 | fprintf_unfiltered (gdb_stdlog, "gdbarch_target_desc called\n"); | |
1584 | return gdbarch->target_desc; | |
1585 | } | |
1586 | ||
0f71a2f6 | 1587 | int |
104c1213 | 1588 | gdbarch_short_bit (struct gdbarch *gdbarch) |
0f71a2f6 | 1589 | { |
8de9bdc4 | 1590 | gdb_assert (gdbarch != NULL); |
66b43ecb | 1591 | /* Skip verify of short_bit, invalid_p == 0 */ |
0f71a2f6 | 1592 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
1593 | fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n"); |
1594 | return gdbarch->short_bit; | |
1595 | } | |
1596 | ||
1597 | void | |
104c1213 JM |
1598 | set_gdbarch_short_bit (struct gdbarch *gdbarch, |
1599 | int short_bit) | |
0f71a2f6 JM |
1600 | { |
1601 | gdbarch->short_bit = short_bit; | |
1602 | } | |
1603 | ||
1604 | int | |
104c1213 | 1605 | gdbarch_int_bit (struct gdbarch *gdbarch) |
0f71a2f6 | 1606 | { |
8de9bdc4 | 1607 | gdb_assert (gdbarch != NULL); |
66b43ecb | 1608 | /* Skip verify of int_bit, invalid_p == 0 */ |
0f71a2f6 | 1609 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
1610 | fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n"); |
1611 | return gdbarch->int_bit; | |
1612 | } | |
1613 | ||
1614 | void | |
104c1213 JM |
1615 | set_gdbarch_int_bit (struct gdbarch *gdbarch, |
1616 | int int_bit) | |
0f71a2f6 JM |
1617 | { |
1618 | gdbarch->int_bit = int_bit; | |
1619 | } | |
1620 | ||
1621 | int | |
104c1213 | 1622 | gdbarch_long_bit (struct gdbarch *gdbarch) |
0f71a2f6 | 1623 | { |
8de9bdc4 | 1624 | gdb_assert (gdbarch != NULL); |
66b43ecb | 1625 | /* Skip verify of long_bit, invalid_p == 0 */ |
0f71a2f6 | 1626 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
1627 | fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n"); |
1628 | return gdbarch->long_bit; | |
1629 | } | |
1630 | ||
1631 | void | |
104c1213 JM |
1632 | set_gdbarch_long_bit (struct gdbarch *gdbarch, |
1633 | int long_bit) | |
0f71a2f6 JM |
1634 | { |
1635 | gdbarch->long_bit = long_bit; | |
1636 | } | |
1637 | ||
1638 | int | |
104c1213 | 1639 | gdbarch_long_long_bit (struct gdbarch *gdbarch) |
0f71a2f6 | 1640 | { |
8de9bdc4 | 1641 | gdb_assert (gdbarch != NULL); |
66b43ecb | 1642 | /* Skip verify of long_long_bit, invalid_p == 0 */ |
0f71a2f6 | 1643 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
1644 | fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n"); |
1645 | return gdbarch->long_long_bit; | |
1646 | } | |
1647 | ||
1648 | void | |
104c1213 JM |
1649 | set_gdbarch_long_long_bit (struct gdbarch *gdbarch, |
1650 | int long_long_bit) | |
0f71a2f6 JM |
1651 | { |
1652 | gdbarch->long_long_bit = long_long_bit; | |
1653 | } | |
1654 | ||
2a67f09d FW |
1655 | int |
1656 | gdbarch_bfloat16_bit (struct gdbarch *gdbarch) | |
1657 | { | |
1658 | gdb_assert (gdbarch != NULL); | |
1659 | /* Skip verify of bfloat16_bit, invalid_p == 0 */ | |
1660 | if (gdbarch_debug >= 2) | |
1661 | fprintf_unfiltered (gdb_stdlog, "gdbarch_bfloat16_bit called\n"); | |
1662 | return gdbarch->bfloat16_bit; | |
1663 | } | |
1664 | ||
1665 | void | |
1666 | set_gdbarch_bfloat16_bit (struct gdbarch *gdbarch, | |
1667 | int bfloat16_bit) | |
1668 | { | |
1669 | gdbarch->bfloat16_bit = bfloat16_bit; | |
1670 | } | |
1671 | ||
1672 | const struct floatformat ** | |
1673 | gdbarch_bfloat16_format (struct gdbarch *gdbarch) | |
1674 | { | |
1675 | gdb_assert (gdbarch != NULL); | |
1676 | if (gdbarch_debug >= 2) | |
1677 | fprintf_unfiltered (gdb_stdlog, "gdbarch_bfloat16_format called\n"); | |
1678 | return gdbarch->bfloat16_format; | |
1679 | } | |
1680 | ||
1681 | void | |
1682 | set_gdbarch_bfloat16_format (struct gdbarch *gdbarch, | |
1683 | const struct floatformat ** bfloat16_format) | |
1684 | { | |
1685 | gdbarch->bfloat16_format = bfloat16_format; | |
1686 | } | |
1687 | ||
f9e9243a UW |
1688 | int |
1689 | gdbarch_half_bit (struct gdbarch *gdbarch) | |
1690 | { | |
1691 | gdb_assert (gdbarch != NULL); | |
1692 | /* Skip verify of half_bit, invalid_p == 0 */ | |
1693 | if (gdbarch_debug >= 2) | |
1694 | fprintf_unfiltered (gdb_stdlog, "gdbarch_half_bit called\n"); | |
1695 | return gdbarch->half_bit; | |
1696 | } | |
1697 | ||
1698 | void | |
1699 | set_gdbarch_half_bit (struct gdbarch *gdbarch, | |
1700 | int half_bit) | |
1701 | { | |
1702 | gdbarch->half_bit = half_bit; | |
1703 | } | |
1704 | ||
1705 | const struct floatformat ** | |
1706 | gdbarch_half_format (struct gdbarch *gdbarch) | |
1707 | { | |
1708 | gdb_assert (gdbarch != NULL); | |
1709 | if (gdbarch_debug >= 2) | |
1710 | fprintf_unfiltered (gdb_stdlog, "gdbarch_half_format called\n"); | |
1711 | return gdbarch->half_format; | |
1712 | } | |
1713 | ||
1714 | void | |
1715 | set_gdbarch_half_format (struct gdbarch *gdbarch, | |
1716 | const struct floatformat ** half_format) | |
1717 | { | |
1718 | gdbarch->half_format = half_format; | |
1719 | } | |
1720 | ||
0f71a2f6 | 1721 | int |
104c1213 | 1722 | gdbarch_float_bit (struct gdbarch *gdbarch) |
0f71a2f6 | 1723 | { |
8de9bdc4 | 1724 | gdb_assert (gdbarch != NULL); |
66b43ecb | 1725 | /* Skip verify of float_bit, invalid_p == 0 */ |
0f71a2f6 | 1726 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
1727 | fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n"); |
1728 | return gdbarch->float_bit; | |
1729 | } | |
1730 | ||
1731 | void | |
104c1213 JM |
1732 | set_gdbarch_float_bit (struct gdbarch *gdbarch, |
1733 | int float_bit) | |
0f71a2f6 JM |
1734 | { |
1735 | gdbarch->float_bit = float_bit; | |
1736 | } | |
1737 | ||
8da61cc4 | 1738 | const struct floatformat ** |
456fcf94 AC |
1739 | gdbarch_float_format (struct gdbarch *gdbarch) |
1740 | { | |
1741 | gdb_assert (gdbarch != NULL); | |
1742 | if (gdbarch_debug >= 2) | |
1743 | fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n"); | |
1744 | return gdbarch->float_format; | |
1745 | } | |
1746 | ||
1747 | void | |
1748 | set_gdbarch_float_format (struct gdbarch *gdbarch, | |
8da61cc4 | 1749 | const struct floatformat ** float_format) |
456fcf94 AC |
1750 | { |
1751 | gdbarch->float_format = float_format; | |
1752 | } | |
1753 | ||
0f71a2f6 | 1754 | int |
104c1213 | 1755 | gdbarch_double_bit (struct gdbarch *gdbarch) |
0f71a2f6 | 1756 | { |
8de9bdc4 | 1757 | gdb_assert (gdbarch != NULL); |
66b43ecb | 1758 | /* Skip verify of double_bit, invalid_p == 0 */ |
0f71a2f6 | 1759 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
1760 | fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n"); |
1761 | return gdbarch->double_bit; | |
1762 | } | |
1763 | ||
1764 | void | |
104c1213 JM |
1765 | set_gdbarch_double_bit (struct gdbarch *gdbarch, |
1766 | int double_bit) | |
0f71a2f6 JM |
1767 | { |
1768 | gdbarch->double_bit = double_bit; | |
1769 | } | |
1770 | ||
8da61cc4 | 1771 | const struct floatformat ** |
456fcf94 AC |
1772 | gdbarch_double_format (struct gdbarch *gdbarch) |
1773 | { | |
1774 | gdb_assert (gdbarch != NULL); | |
1775 | if (gdbarch_debug >= 2) | |
1776 | fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n"); | |
1777 | return gdbarch->double_format; | |
1778 | } | |
1779 | ||
1780 | void | |
1781 | set_gdbarch_double_format (struct gdbarch *gdbarch, | |
8da61cc4 | 1782 | const struct floatformat ** double_format) |
456fcf94 AC |
1783 | { |
1784 | gdbarch->double_format = double_format; | |
1785 | } | |
1786 | ||
0f71a2f6 | 1787 | int |
104c1213 | 1788 | gdbarch_long_double_bit (struct gdbarch *gdbarch) |
0f71a2f6 | 1789 | { |
8de9bdc4 | 1790 | gdb_assert (gdbarch != NULL); |
66b43ecb | 1791 | /* Skip verify of long_double_bit, invalid_p == 0 */ |
0f71a2f6 | 1792 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
1793 | fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n"); |
1794 | return gdbarch->long_double_bit; | |
1795 | } | |
1796 | ||
1797 | void | |
104c1213 JM |
1798 | set_gdbarch_long_double_bit (struct gdbarch *gdbarch, |
1799 | int long_double_bit) | |
0f71a2f6 JM |
1800 | { |
1801 | gdbarch->long_double_bit = long_double_bit; | |
1802 | } | |
1803 | ||
8da61cc4 | 1804 | const struct floatformat ** |
456fcf94 AC |
1805 | gdbarch_long_double_format (struct gdbarch *gdbarch) |
1806 | { | |
1807 | gdb_assert (gdbarch != NULL); | |
1808 | if (gdbarch_debug >= 2) | |
1809 | fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n"); | |
1810 | return gdbarch->long_double_format; | |
1811 | } | |
1812 | ||
1813 | void | |
1814 | set_gdbarch_long_double_format (struct gdbarch *gdbarch, | |
8da61cc4 | 1815 | const struct floatformat ** long_double_format) |
456fcf94 AC |
1816 | { |
1817 | gdbarch->long_double_format = long_double_format; | |
1818 | } | |
1819 | ||
53375380 PA |
1820 | int |
1821 | gdbarch_wchar_bit (struct gdbarch *gdbarch) | |
1822 | { | |
1823 | gdb_assert (gdbarch != NULL); | |
1824 | /* Skip verify of wchar_bit, invalid_p == 0 */ | |
1825 | if (gdbarch_debug >= 2) | |
1826 | fprintf_unfiltered (gdb_stdlog, "gdbarch_wchar_bit called\n"); | |
1827 | return gdbarch->wchar_bit; | |
1828 | } | |
1829 | ||
1830 | void | |
1831 | set_gdbarch_wchar_bit (struct gdbarch *gdbarch, | |
1832 | int wchar_bit) | |
1833 | { | |
1834 | gdbarch->wchar_bit = wchar_bit; | |
1835 | } | |
1836 | ||
1837 | int | |
1838 | gdbarch_wchar_signed (struct gdbarch *gdbarch) | |
1839 | { | |
1840 | gdb_assert (gdbarch != NULL); | |
1841 | /* Check variable changed from pre-default. */ | |
1842 | gdb_assert (gdbarch->wchar_signed != -1); | |
1843 | if (gdbarch_debug >= 2) | |
1844 | fprintf_unfiltered (gdb_stdlog, "gdbarch_wchar_signed called\n"); | |
1845 | return gdbarch->wchar_signed; | |
1846 | } | |
1847 | ||
1848 | void | |
1849 | set_gdbarch_wchar_signed (struct gdbarch *gdbarch, | |
1850 | int wchar_signed) | |
1851 | { | |
1852 | gdbarch->wchar_signed = wchar_signed; | |
1853 | } | |
1854 | ||
9b790ce7 UW |
1855 | const struct floatformat ** |
1856 | gdbarch_floatformat_for_type (struct gdbarch *gdbarch, const char *name, int length) | |
1857 | { | |
1858 | gdb_assert (gdbarch != NULL); | |
1859 | gdb_assert (gdbarch->floatformat_for_type != NULL); | |
1860 | if (gdbarch_debug >= 2) | |
1861 | fprintf_unfiltered (gdb_stdlog, "gdbarch_floatformat_for_type called\n"); | |
1862 | return gdbarch->floatformat_for_type (gdbarch, name, length); | |
1863 | } | |
1864 | ||
1865 | void | |
1866 | set_gdbarch_floatformat_for_type (struct gdbarch *gdbarch, | |
1867 | gdbarch_floatformat_for_type_ftype floatformat_for_type) | |
1868 | { | |
1869 | gdbarch->floatformat_for_type = floatformat_for_type; | |
1870 | } | |
1871 | ||
66b43ecb AC |
1872 | int |
1873 | gdbarch_ptr_bit (struct gdbarch *gdbarch) | |
1874 | { | |
8de9bdc4 | 1875 | gdb_assert (gdbarch != NULL); |
66b43ecb AC |
1876 | /* Skip verify of ptr_bit, invalid_p == 0 */ |
1877 | if (gdbarch_debug >= 2) | |
1878 | fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n"); | |
1879 | return gdbarch->ptr_bit; | |
1880 | } | |
1881 | ||
1882 | void | |
1883 | set_gdbarch_ptr_bit (struct gdbarch *gdbarch, | |
1884 | int ptr_bit) | |
1885 | { | |
1886 | gdbarch->ptr_bit = ptr_bit; | |
1887 | } | |
1888 | ||
52204a0b DT |
1889 | int |
1890 | gdbarch_addr_bit (struct gdbarch *gdbarch) | |
1891 | { | |
8de9bdc4 | 1892 | gdb_assert (gdbarch != NULL); |
956ac328 AC |
1893 | /* Check variable changed from pre-default. */ |
1894 | gdb_assert (gdbarch->addr_bit != 0); | |
52204a0b DT |
1895 | if (gdbarch_debug >= 2) |
1896 | fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n"); | |
1897 | return gdbarch->addr_bit; | |
1898 | } | |
1899 | ||
1900 | void | |
1901 | set_gdbarch_addr_bit (struct gdbarch *gdbarch, | |
1902 | int addr_bit) | |
1903 | { | |
1904 | gdbarch->addr_bit = addr_bit; | |
1905 | } | |
1906 | ||
8da614df CV |
1907 | int |
1908 | gdbarch_dwarf2_addr_size (struct gdbarch *gdbarch) | |
1909 | { | |
1910 | gdb_assert (gdbarch != NULL); | |
1911 | /* Check variable changed from pre-default. */ | |
1912 | gdb_assert (gdbarch->dwarf2_addr_size != 0); | |
1913 | if (gdbarch_debug >= 2) | |
1914 | fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_addr_size called\n"); | |
1915 | return gdbarch->dwarf2_addr_size; | |
1916 | } | |
1917 | ||
1918 | void | |
1919 | set_gdbarch_dwarf2_addr_size (struct gdbarch *gdbarch, | |
1920 | int dwarf2_addr_size) | |
1921 | { | |
1922 | gdbarch->dwarf2_addr_size = dwarf2_addr_size; | |
1923 | } | |
1924 | ||
4e409299 JB |
1925 | int |
1926 | gdbarch_char_signed (struct gdbarch *gdbarch) | |
1927 | { | |
8de9bdc4 | 1928 | gdb_assert (gdbarch != NULL); |
956ac328 AC |
1929 | /* Check variable changed from pre-default. */ |
1930 | gdb_assert (gdbarch->char_signed != -1); | |
4e409299 JB |
1931 | if (gdbarch_debug >= 2) |
1932 | fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n"); | |
1933 | return gdbarch->char_signed; | |
1934 | } | |
1935 | ||
1936 | void | |
1937 | set_gdbarch_char_signed (struct gdbarch *gdbarch, | |
1938 | int char_signed) | |
1939 | { | |
1940 | gdbarch->char_signed = char_signed; | |
1941 | } | |
1942 | ||
39535193 | 1943 | bool |
cde9ea48 AC |
1944 | gdbarch_read_pc_p (struct gdbarch *gdbarch) |
1945 | { | |
1946 | gdb_assert (gdbarch != NULL); | |
956ac328 | 1947 | return gdbarch->read_pc != NULL; |
cde9ea48 AC |
1948 | } |
1949 | ||
0f71a2f6 | 1950 | CORE_ADDR |
c113ed0c | 1951 | gdbarch_read_pc (struct gdbarch *gdbarch, readable_regcache *regcache) |
0f71a2f6 | 1952 | { |
8de9bdc4 | 1953 | gdb_assert (gdbarch != NULL); |
956ac328 | 1954 | gdb_assert (gdbarch->read_pc != NULL); |
0f71a2f6 | 1955 | if (gdbarch_debug >= 2) |
0f71a2f6 | 1956 | fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n"); |
61a1198a | 1957 | return gdbarch->read_pc (regcache); |
0f71a2f6 JM |
1958 | } |
1959 | ||
1960 | void | |
104c1213 JM |
1961 | set_gdbarch_read_pc (struct gdbarch *gdbarch, |
1962 | gdbarch_read_pc_ftype read_pc) | |
0f71a2f6 JM |
1963 | { |
1964 | gdbarch->read_pc = read_pc; | |
1965 | } | |
1966 | ||
39535193 | 1967 | bool |
61a1198a UW |
1968 | gdbarch_write_pc_p (struct gdbarch *gdbarch) |
1969 | { | |
1970 | gdb_assert (gdbarch != NULL); | |
1971 | return gdbarch->write_pc != NULL; | |
1972 | } | |
1973 | ||
0f71a2f6 | 1974 | void |
61a1198a | 1975 | gdbarch_write_pc (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR val) |
0f71a2f6 | 1976 | { |
8de9bdc4 | 1977 | gdb_assert (gdbarch != NULL); |
956ac328 | 1978 | gdb_assert (gdbarch->write_pc != NULL); |
0f71a2f6 | 1979 | if (gdbarch_debug >= 2) |
0f71a2f6 | 1980 | fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n"); |
61a1198a | 1981 | gdbarch->write_pc (regcache, val); |
0f71a2f6 JM |
1982 | } |
1983 | ||
1984 | void | |
104c1213 JM |
1985 | set_gdbarch_write_pc (struct gdbarch *gdbarch, |
1986 | gdbarch_write_pc_ftype write_pc) | |
0f71a2f6 JM |
1987 | { |
1988 | gdbarch->write_pc = write_pc; | |
1989 | } | |
1990 | ||
39d4ef09 AC |
1991 | void |
1992 | gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset) | |
1993 | { | |
8de9bdc4 | 1994 | gdb_assert (gdbarch != NULL); |
956ac328 | 1995 | gdb_assert (gdbarch->virtual_frame_pointer != NULL); |
39d4ef09 AC |
1996 | if (gdbarch_debug >= 2) |
1997 | fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n"); | |
a54fba4c | 1998 | gdbarch->virtual_frame_pointer (gdbarch, pc, frame_regnum, frame_offset); |
39d4ef09 AC |
1999 | } |
2000 | ||
2001 | void | |
2002 | set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, | |
2003 | gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer) | |
2004 | { | |
2005 | gdbarch->virtual_frame_pointer = virtual_frame_pointer; | |
2006 | } | |
2007 | ||
39535193 | 2008 | bool |
d8124050 | 2009 | gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch) |
61a0eb5b | 2010 | { |
8de9bdc4 | 2011 | gdb_assert (gdbarch != NULL); |
956ac328 | 2012 | return gdbarch->pseudo_register_read != NULL; |
61a0eb5b AC |
2013 | } |
2014 | ||
05d1431c | 2015 | enum register_status |
849d0ba8 | 2016 | gdbarch_pseudo_register_read (struct gdbarch *gdbarch, readable_regcache *regcache, int cookednum, gdb_byte *buf) |
61a0eb5b | 2017 | { |
8de9bdc4 | 2018 | gdb_assert (gdbarch != NULL); |
956ac328 | 2019 | gdb_assert (gdbarch->pseudo_register_read != NULL); |
61a0eb5b | 2020 | if (gdbarch_debug >= 2) |
d8124050 | 2021 | fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n"); |
05d1431c | 2022 | return gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf); |
61a0eb5b AC |
2023 | } |
2024 | ||
2025 | void | |
d8124050 AC |
2026 | set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch, |
2027 | gdbarch_pseudo_register_read_ftype pseudo_register_read) | |
61a0eb5b | 2028 | { |
d8124050 | 2029 | gdbarch->pseudo_register_read = pseudo_register_read; |
61a0eb5b AC |
2030 | } |
2031 | ||
39535193 | 2032 | bool |
3543a589 TT |
2033 | gdbarch_pseudo_register_read_value_p (struct gdbarch *gdbarch) |
2034 | { | |
2035 | gdb_assert (gdbarch != NULL); | |
2036 | return gdbarch->pseudo_register_read_value != NULL; | |
2037 | } | |
2038 | ||
2039 | struct value * | |
849d0ba8 | 2040 | gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch, readable_regcache *regcache, int cookednum) |
3543a589 TT |
2041 | { |
2042 | gdb_assert (gdbarch != NULL); | |
2043 | gdb_assert (gdbarch->pseudo_register_read_value != NULL); | |
2044 | if (gdbarch_debug >= 2) | |
2045 | fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read_value called\n"); | |
2046 | return gdbarch->pseudo_register_read_value (gdbarch, regcache, cookednum); | |
2047 | } | |
2048 | ||
2049 | void | |
2050 | set_gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch, | |
2051 | gdbarch_pseudo_register_read_value_ftype pseudo_register_read_value) | |
2052 | { | |
2053 | gdbarch->pseudo_register_read_value = pseudo_register_read_value; | |
2054 | } | |
2055 | ||
39535193 | 2056 | bool |
d8124050 | 2057 | gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch) |
61a0eb5b | 2058 | { |
8de9bdc4 | 2059 | gdb_assert (gdbarch != NULL); |
956ac328 | 2060 | return gdbarch->pseudo_register_write != NULL; |
61a0eb5b AC |
2061 | } |
2062 | ||
2063 | void | |
b60c417a | 2064 | gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const gdb_byte *buf) |
61a0eb5b | 2065 | { |
8de9bdc4 | 2066 | gdb_assert (gdbarch != NULL); |
956ac328 | 2067 | gdb_assert (gdbarch->pseudo_register_write != NULL); |
61a0eb5b | 2068 | if (gdbarch_debug >= 2) |
d8124050 AC |
2069 | fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n"); |
2070 | gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf); | |
61a0eb5b AC |
2071 | } |
2072 | ||
2073 | void | |
d8124050 AC |
2074 | set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch, |
2075 | gdbarch_pseudo_register_write_ftype pseudo_register_write) | |
61a0eb5b | 2076 | { |
d8124050 | 2077 | gdbarch->pseudo_register_write = pseudo_register_write; |
61a0eb5b AC |
2078 | } |
2079 | ||
0f71a2f6 | 2080 | int |
104c1213 | 2081 | gdbarch_num_regs (struct gdbarch *gdbarch) |
0f71a2f6 | 2082 | { |
8de9bdc4 | 2083 | gdb_assert (gdbarch != NULL); |
956ac328 AC |
2084 | /* Check variable changed from pre-default. */ |
2085 | gdb_assert (gdbarch->num_regs != -1); | |
0f71a2f6 | 2086 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2087 | fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n"); |
2088 | return gdbarch->num_regs; | |
2089 | } | |
2090 | ||
2091 | void | |
104c1213 JM |
2092 | set_gdbarch_num_regs (struct gdbarch *gdbarch, |
2093 | int num_regs) | |
0f71a2f6 JM |
2094 | { |
2095 | gdbarch->num_regs = num_regs; | |
2096 | } | |
2097 | ||
0aba1244 EZ |
2098 | int |
2099 | gdbarch_num_pseudo_regs (struct gdbarch *gdbarch) | |
2100 | { | |
8de9bdc4 | 2101 | gdb_assert (gdbarch != NULL); |
0aba1244 EZ |
2102 | /* Skip verify of num_pseudo_regs, invalid_p == 0 */ |
2103 | if (gdbarch_debug >= 2) | |
2104 | fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n"); | |
2105 | return gdbarch->num_pseudo_regs; | |
2106 | } | |
2107 | ||
2108 | void | |
2109 | set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch, | |
2110 | int num_pseudo_regs) | |
2111 | { | |
2112 | gdbarch->num_pseudo_regs = num_pseudo_regs; | |
2113 | } | |
2114 | ||
39535193 | 2115 | bool |
175ff332 HZ |
2116 | gdbarch_ax_pseudo_register_collect_p (struct gdbarch *gdbarch) |
2117 | { | |
2118 | gdb_assert (gdbarch != NULL); | |
2119 | return gdbarch->ax_pseudo_register_collect != NULL; | |
2120 | } | |
2121 | ||
2122 | int | |
2123 | gdbarch_ax_pseudo_register_collect (struct gdbarch *gdbarch, struct agent_expr *ax, int reg) | |
2124 | { | |
2125 | gdb_assert (gdbarch != NULL); | |
2126 | gdb_assert (gdbarch->ax_pseudo_register_collect != NULL); | |
2127 | if (gdbarch_debug >= 2) | |
2128 | fprintf_unfiltered (gdb_stdlog, "gdbarch_ax_pseudo_register_collect called\n"); | |
2129 | return gdbarch->ax_pseudo_register_collect (gdbarch, ax, reg); | |
2130 | } | |
2131 | ||
2132 | void | |
2133 | set_gdbarch_ax_pseudo_register_collect (struct gdbarch *gdbarch, | |
2134 | gdbarch_ax_pseudo_register_collect_ftype ax_pseudo_register_collect) | |
2135 | { | |
2136 | gdbarch->ax_pseudo_register_collect = ax_pseudo_register_collect; | |
2137 | } | |
2138 | ||
39535193 | 2139 | bool |
175ff332 HZ |
2140 | gdbarch_ax_pseudo_register_push_stack_p (struct gdbarch *gdbarch) |
2141 | { | |
2142 | gdb_assert (gdbarch != NULL); | |
2143 | return gdbarch->ax_pseudo_register_push_stack != NULL; | |
2144 | } | |
2145 | ||
2146 | int | |
2147 | gdbarch_ax_pseudo_register_push_stack (struct gdbarch *gdbarch, struct agent_expr *ax, int reg) | |
2148 | { | |
2149 | gdb_assert (gdbarch != NULL); | |
2150 | gdb_assert (gdbarch->ax_pseudo_register_push_stack != NULL); | |
2151 | if (gdbarch_debug >= 2) | |
2152 | fprintf_unfiltered (gdb_stdlog, "gdbarch_ax_pseudo_register_push_stack called\n"); | |
2153 | return gdbarch->ax_pseudo_register_push_stack (gdbarch, ax, reg); | |
2154 | } | |
2155 | ||
2156 | void | |
2157 | set_gdbarch_ax_pseudo_register_push_stack (struct gdbarch *gdbarch, | |
2158 | gdbarch_ax_pseudo_register_push_stack_ftype ax_pseudo_register_push_stack) | |
2159 | { | |
2160 | gdbarch->ax_pseudo_register_push_stack = ax_pseudo_register_push_stack; | |
2161 | } | |
2162 | ||
39535193 | 2163 | bool |
272bb05c JB |
2164 | gdbarch_report_signal_info_p (struct gdbarch *gdbarch) |
2165 | { | |
2166 | gdb_assert (gdbarch != NULL); | |
2167 | return gdbarch->report_signal_info != NULL; | |
2168 | } | |
2169 | ||
2170 | void | |
2171 | gdbarch_report_signal_info (struct gdbarch *gdbarch, struct ui_out *uiout, enum gdb_signal siggnal) | |
2172 | { | |
2173 | gdb_assert (gdbarch != NULL); | |
2174 | gdb_assert (gdbarch->report_signal_info != NULL); | |
2175 | if (gdbarch_debug >= 2) | |
2176 | fprintf_unfiltered (gdb_stdlog, "gdbarch_report_signal_info called\n"); | |
2177 | gdbarch->report_signal_info (gdbarch, uiout, siggnal); | |
2178 | } | |
2179 | ||
2180 | void | |
2181 | set_gdbarch_report_signal_info (struct gdbarch *gdbarch, | |
2182 | gdbarch_report_signal_info_ftype report_signal_info) | |
2183 | { | |
2184 | gdbarch->report_signal_info = report_signal_info; | |
2185 | } | |
2186 | ||
0f71a2f6 | 2187 | int |
104c1213 | 2188 | gdbarch_sp_regnum (struct gdbarch *gdbarch) |
0f71a2f6 | 2189 | { |
8de9bdc4 | 2190 | gdb_assert (gdbarch != NULL); |
1200cd6e | 2191 | /* Skip verify of sp_regnum, invalid_p == 0 */ |
0f71a2f6 | 2192 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2193 | fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n"); |
2194 | return gdbarch->sp_regnum; | |
2195 | } | |
2196 | ||
2197 | void | |
104c1213 JM |
2198 | set_gdbarch_sp_regnum (struct gdbarch *gdbarch, |
2199 | int sp_regnum) | |
0f71a2f6 JM |
2200 | { |
2201 | gdbarch->sp_regnum = sp_regnum; | |
2202 | } | |
2203 | ||
0f71a2f6 | 2204 | int |
104c1213 | 2205 | gdbarch_pc_regnum (struct gdbarch *gdbarch) |
0f71a2f6 | 2206 | { |
8de9bdc4 | 2207 | gdb_assert (gdbarch != NULL); |
1200cd6e | 2208 | /* Skip verify of pc_regnum, invalid_p == 0 */ |
0f71a2f6 | 2209 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2210 | fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n"); |
2211 | return gdbarch->pc_regnum; | |
2212 | } | |
2213 | ||
2214 | void | |
104c1213 JM |
2215 | set_gdbarch_pc_regnum (struct gdbarch *gdbarch, |
2216 | int pc_regnum) | |
0f71a2f6 JM |
2217 | { |
2218 | gdbarch->pc_regnum = pc_regnum; | |
2219 | } | |
2220 | ||
c2169756 AC |
2221 | int |
2222 | gdbarch_ps_regnum (struct gdbarch *gdbarch) | |
2223 | { | |
8de9bdc4 | 2224 | gdb_assert (gdbarch != NULL); |
c2169756 AC |
2225 | /* Skip verify of ps_regnum, invalid_p == 0 */ |
2226 | if (gdbarch_debug >= 2) | |
2227 | fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n"); | |
2228 | return gdbarch->ps_regnum; | |
2229 | } | |
2230 | ||
2231 | void | |
2232 | set_gdbarch_ps_regnum (struct gdbarch *gdbarch, | |
2233 | int ps_regnum) | |
2234 | { | |
2235 | gdbarch->ps_regnum = ps_regnum; | |
2236 | } | |
2237 | ||
60054393 MS |
2238 | int |
2239 | gdbarch_fp0_regnum (struct gdbarch *gdbarch) | |
2240 | { | |
8de9bdc4 | 2241 | gdb_assert (gdbarch != NULL); |
60054393 MS |
2242 | /* Skip verify of fp0_regnum, invalid_p == 0 */ |
2243 | if (gdbarch_debug >= 2) | |
2244 | fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n"); | |
2245 | return gdbarch->fp0_regnum; | |
2246 | } | |
2247 | ||
2248 | void | |
2249 | set_gdbarch_fp0_regnum (struct gdbarch *gdbarch, | |
2250 | int fp0_regnum) | |
2251 | { | |
2252 | gdbarch->fp0_regnum = fp0_regnum; | |
2253 | } | |
2254 | ||
88c72b7d AC |
2255 | int |
2256 | gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr) | |
2257 | { | |
8de9bdc4 | 2258 | gdb_assert (gdbarch != NULL); |
956ac328 | 2259 | gdb_assert (gdbarch->stab_reg_to_regnum != NULL); |
88c72b7d AC |
2260 | if (gdbarch_debug >= 2) |
2261 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n"); | |
d3f73121 | 2262 | return gdbarch->stab_reg_to_regnum (gdbarch, stab_regnr); |
88c72b7d AC |
2263 | } |
2264 | ||
2265 | void | |
2266 | set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, | |
2267 | gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum) | |
2268 | { | |
2269 | gdbarch->stab_reg_to_regnum = stab_reg_to_regnum; | |
2270 | } | |
2271 | ||
2272 | int | |
2273 | gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr) | |
2274 | { | |
8de9bdc4 | 2275 | gdb_assert (gdbarch != NULL); |
956ac328 | 2276 | gdb_assert (gdbarch->ecoff_reg_to_regnum != NULL); |
88c72b7d AC |
2277 | if (gdbarch_debug >= 2) |
2278 | fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n"); | |
d3f73121 | 2279 | return gdbarch->ecoff_reg_to_regnum (gdbarch, ecoff_regnr); |
88c72b7d AC |
2280 | } |
2281 | ||
2282 | void | |
2283 | set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, | |
2284 | gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum) | |
2285 | { | |
2286 | gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum; | |
2287 | } | |
2288 | ||
88c72b7d AC |
2289 | int |
2290 | gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr) | |
2291 | { | |
8de9bdc4 | 2292 | gdb_assert (gdbarch != NULL); |
956ac328 | 2293 | gdb_assert (gdbarch->sdb_reg_to_regnum != NULL); |
88c72b7d AC |
2294 | if (gdbarch_debug >= 2) |
2295 | fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n"); | |
d3f73121 | 2296 | return gdbarch->sdb_reg_to_regnum (gdbarch, sdb_regnr); |
88c72b7d AC |
2297 | } |
2298 | ||
2299 | void | |
2300 | set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, | |
2301 | gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum) | |
2302 | { | |
2303 | gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum; | |
2304 | } | |
2305 | ||
2306 | int | |
2307 | gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr) | |
2308 | { | |
8de9bdc4 | 2309 | gdb_assert (gdbarch != NULL); |
956ac328 | 2310 | gdb_assert (gdbarch->dwarf2_reg_to_regnum != NULL); |
88c72b7d AC |
2311 | if (gdbarch_debug >= 2) |
2312 | fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n"); | |
d3f73121 | 2313 | return gdbarch->dwarf2_reg_to_regnum (gdbarch, dwarf2_regnr); |
88c72b7d AC |
2314 | } |
2315 | ||
2316 | void | |
2317 | set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, | |
2318 | gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum) | |
2319 | { | |
2320 | gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum; | |
2321 | } | |
2322 | ||
fa88f677 | 2323 | const char * |
0f71a2f6 JM |
2324 | gdbarch_register_name (struct gdbarch *gdbarch, int regnr) |
2325 | { | |
8de9bdc4 | 2326 | gdb_assert (gdbarch != NULL); |
956ac328 | 2327 | gdb_assert (gdbarch->register_name != NULL); |
0f71a2f6 | 2328 | if (gdbarch_debug >= 2) |
0f71a2f6 | 2329 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n"); |
d93859e2 | 2330 | return gdbarch->register_name (gdbarch, regnr); |
0f71a2f6 JM |
2331 | } |
2332 | ||
2333 | void | |
104c1213 JM |
2334 | set_gdbarch_register_name (struct gdbarch *gdbarch, |
2335 | gdbarch_register_name_ftype register_name) | |
0f71a2f6 JM |
2336 | { |
2337 | gdbarch->register_name = register_name; | |
2338 | } | |
2339 | ||
39535193 | 2340 | bool |
9c04cab7 | 2341 | gdbarch_register_type_p (struct gdbarch *gdbarch) |
0f71a2f6 | 2342 | { |
8de9bdc4 | 2343 | gdb_assert (gdbarch != NULL); |
956ac328 | 2344 | return gdbarch->register_type != NULL; |
9c04cab7 AC |
2345 | } |
2346 | ||
2347 | struct type * | |
2348 | gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr) | |
2349 | { | |
2350 | gdb_assert (gdbarch != NULL); | |
956ac328 | 2351 | gdb_assert (gdbarch->register_type != NULL); |
0f71a2f6 | 2352 | if (gdbarch_debug >= 2) |
9c04cab7 AC |
2353 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n"); |
2354 | return gdbarch->register_type (gdbarch, reg_nr); | |
0f71a2f6 JM |
2355 | } |
2356 | ||
2357 | void | |
9c04cab7 AC |
2358 | set_gdbarch_register_type (struct gdbarch *gdbarch, |
2359 | gdbarch_register_type_ftype register_type) | |
0f71a2f6 | 2360 | { |
9c04cab7 | 2361 | gdbarch->register_type = register_type; |
0f71a2f6 JM |
2362 | } |
2363 | ||
f3be58bc | 2364 | struct frame_id |
669fac23 | 2365 | gdbarch_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame) |
f3be58bc AC |
2366 | { |
2367 | gdb_assert (gdbarch != NULL); | |
669fac23 | 2368 | gdb_assert (gdbarch->dummy_id != NULL); |
f3be58bc | 2369 | if (gdbarch_debug >= 2) |
669fac23 DJ |
2370 | fprintf_unfiltered (gdb_stdlog, "gdbarch_dummy_id called\n"); |
2371 | return gdbarch->dummy_id (gdbarch, this_frame); | |
f3be58bc AC |
2372 | } |
2373 | ||
2374 | void | |
669fac23 DJ |
2375 | set_gdbarch_dummy_id (struct gdbarch *gdbarch, |
2376 | gdbarch_dummy_id_ftype dummy_id) | |
f3be58bc | 2377 | { |
669fac23 | 2378 | gdbarch->dummy_id = dummy_id; |
f3be58bc AC |
2379 | } |
2380 | ||
f3be58bc AC |
2381 | int |
2382 | gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch) | |
2383 | { | |
2384 | gdb_assert (gdbarch != NULL); | |
2385 | /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */ | |
2386 | if (gdbarch_debug >= 2) | |
2387 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n"); | |
2388 | return gdbarch->deprecated_fp_regnum; | |
2389 | } | |
2390 | ||
2391 | void | |
2392 | set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch, | |
2393 | int deprecated_fp_regnum) | |
2394 | { | |
2395 | gdbarch->deprecated_fp_regnum = deprecated_fp_regnum; | |
2396 | } | |
2397 | ||
39535193 | 2398 | bool |
b8de8283 | 2399 | gdbarch_push_dummy_call_p (struct gdbarch *gdbarch) |
0ab7a791 AC |
2400 | { |
2401 | gdb_assert (gdbarch != NULL); | |
956ac328 | 2402 | return gdbarch->push_dummy_call != NULL; |
0ab7a791 AC |
2403 | } |
2404 | ||
b8de8283 | 2405 | CORE_ADDR |
cf84fa6b | 2406 | 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, function_call_return_method return_method, CORE_ADDR struct_addr) |
666e11c5 | 2407 | { |
8de9bdc4 | 2408 | gdb_assert (gdbarch != NULL); |
956ac328 | 2409 | gdb_assert (gdbarch->push_dummy_call != NULL); |
666e11c5 | 2410 | if (gdbarch_debug >= 2) |
b8de8283 | 2411 | fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n"); |
cf84fa6b | 2412 | return gdbarch->push_dummy_call (gdbarch, function, regcache, bp_addr, nargs, args, sp, return_method, struct_addr); |
666e11c5 EZ |
2413 | } |
2414 | ||
2415 | void | |
b8de8283 AC |
2416 | set_gdbarch_push_dummy_call (struct gdbarch *gdbarch, |
2417 | gdbarch_push_dummy_call_ftype push_dummy_call) | |
666e11c5 | 2418 | { |
b8de8283 | 2419 | gdbarch->push_dummy_call = push_dummy_call; |
666e11c5 EZ |
2420 | } |
2421 | ||
2649061d | 2422 | int |
b8de8283 | 2423 | gdbarch_call_dummy_location (struct gdbarch *gdbarch) |
2649061d | 2424 | { |
8de9bdc4 | 2425 | gdb_assert (gdbarch != NULL); |
b8de8283 AC |
2426 | /* Skip verify of call_dummy_location, invalid_p == 0 */ |
2427 | if (gdbarch_debug >= 2) | |
2428 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n"); | |
2429 | return gdbarch->call_dummy_location; | |
2649061d AC |
2430 | } |
2431 | ||
b8de8283 AC |
2432 | void |
2433 | set_gdbarch_call_dummy_location (struct gdbarch *gdbarch, | |
2434 | int call_dummy_location) | |
2435 | { | |
2436 | gdbarch->call_dummy_location = call_dummy_location; | |
2437 | } | |
2438 | ||
39535193 | 2439 | bool |
b8de8283 | 2440 | gdbarch_push_dummy_code_p (struct gdbarch *gdbarch) |
0f71a2f6 | 2441 | { |
8de9bdc4 | 2442 | gdb_assert (gdbarch != NULL); |
956ac328 | 2443 | return gdbarch->push_dummy_code != NULL; |
b8de8283 AC |
2444 | } |
2445 | ||
2446 | CORE_ADDR | |
82585c72 | 2447 | 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 |
2448 | { |
2449 | gdb_assert (gdbarch != NULL); | |
956ac328 | 2450 | gdb_assert (gdbarch->push_dummy_code != NULL); |
0f71a2f6 | 2451 | if (gdbarch_debug >= 2) |
b8de8283 | 2452 | fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n"); |
82585c72 | 2453 | return gdbarch->push_dummy_code (gdbarch, sp, funaddr, args, nargs, value_type, real_pc, bp_addr, regcache); |
0f71a2f6 JM |
2454 | } |
2455 | ||
2456 | void | |
b8de8283 AC |
2457 | set_gdbarch_push_dummy_code (struct gdbarch *gdbarch, |
2458 | gdbarch_push_dummy_code_ftype push_dummy_code) | |
0f71a2f6 | 2459 | { |
b8de8283 | 2460 | gdbarch->push_dummy_code = push_dummy_code; |
0f71a2f6 JM |
2461 | } |
2462 | ||
7eb89530 YQ |
2463 | int |
2464 | gdbarch_code_of_frame_writable (struct gdbarch *gdbarch, struct frame_info *frame) | |
2465 | { | |
2466 | gdb_assert (gdbarch != NULL); | |
2467 | gdb_assert (gdbarch->code_of_frame_writable != NULL); | |
2468 | if (gdbarch_debug >= 2) | |
2469 | fprintf_unfiltered (gdb_stdlog, "gdbarch_code_of_frame_writable called\n"); | |
2470 | return gdbarch->code_of_frame_writable (gdbarch, frame); | |
2471 | } | |
2472 | ||
2473 | void | |
2474 | set_gdbarch_code_of_frame_writable (struct gdbarch *gdbarch, | |
2475 | gdbarch_code_of_frame_writable_ftype code_of_frame_writable) | |
2476 | { | |
2477 | gdbarch->code_of_frame_writable = code_of_frame_writable; | |
2478 | } | |
2479 | ||
b8de8283 AC |
2480 | void |
2481 | gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all) | |
2482 | { | |
2483 | gdb_assert (gdbarch != NULL); | |
956ac328 | 2484 | gdb_assert (gdbarch->print_registers_info != NULL); |
b8de8283 AC |
2485 | if (gdbarch_debug >= 2) |
2486 | fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n"); | |
2487 | gdbarch->print_registers_info (gdbarch, file, frame, regnum, all); | |
2488 | } | |
2489 | ||
2490 | void | |
2491 | set_gdbarch_print_registers_info (struct gdbarch *gdbarch, | |
2492 | gdbarch_print_registers_info_ftype print_registers_info) | |
2493 | { | |
2494 | gdbarch->print_registers_info = print_registers_info; | |
0f71a2f6 JM |
2495 | } |
2496 | ||
b8de8283 AC |
2497 | void |
2498 | gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args) | |
0f71a2f6 | 2499 | { |
8de9bdc4 | 2500 | gdb_assert (gdbarch != NULL); |
956ac328 | 2501 | gdb_assert (gdbarch->print_float_info != NULL); |
0f71a2f6 | 2502 | if (gdbarch_debug >= 2) |
b8de8283 AC |
2503 | fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n"); |
2504 | gdbarch->print_float_info (gdbarch, file, frame, args); | |
0f71a2f6 JM |
2505 | } |
2506 | ||
2507 | void | |
b8de8283 AC |
2508 | set_gdbarch_print_float_info (struct gdbarch *gdbarch, |
2509 | gdbarch_print_float_info_ftype print_float_info) | |
0f71a2f6 | 2510 | { |
b8de8283 AC |
2511 | gdbarch->print_float_info = print_float_info; |
2512 | } | |
2513 | ||
39535193 | 2514 | bool |
b8de8283 AC |
2515 | gdbarch_print_vector_info_p (struct gdbarch *gdbarch) |
2516 | { | |
2517 | gdb_assert (gdbarch != NULL); | |
956ac328 | 2518 | return gdbarch->print_vector_info != NULL; |
b8de8283 AC |
2519 | } |
2520 | ||
2521 | void | |
2522 | gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args) | |
2523 | { | |
2524 | gdb_assert (gdbarch != NULL); | |
956ac328 | 2525 | gdb_assert (gdbarch->print_vector_info != NULL); |
b8de8283 AC |
2526 | if (gdbarch_debug >= 2) |
2527 | fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n"); | |
2528 | gdbarch->print_vector_info (gdbarch, file, frame, args); | |
0f71a2f6 JM |
2529 | } |
2530 | ||
b8de8283 AC |
2531 | void |
2532 | set_gdbarch_print_vector_info (struct gdbarch *gdbarch, | |
2533 | gdbarch_print_vector_info_ftype print_vector_info) | |
ae45cd16 | 2534 | { |
b8de8283 | 2535 | gdbarch->print_vector_info = print_vector_info; |
ae45cd16 AC |
2536 | } |
2537 | ||
2538 | int | |
b8de8283 | 2539 | gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr) |
0f71a2f6 | 2540 | { |
8de9bdc4 | 2541 | gdb_assert (gdbarch != NULL); |
956ac328 | 2542 | gdb_assert (gdbarch->register_sim_regno != NULL); |
0f71a2f6 | 2543 | if (gdbarch_debug >= 2) |
b8de8283 | 2544 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n"); |
e7faf938 | 2545 | return gdbarch->register_sim_regno (gdbarch, reg_nr); |
0f71a2f6 JM |
2546 | } |
2547 | ||
2548 | void | |
b8de8283 AC |
2549 | set_gdbarch_register_sim_regno (struct gdbarch *gdbarch, |
2550 | gdbarch_register_sim_regno_ftype register_sim_regno) | |
0f71a2f6 | 2551 | { |
b8de8283 | 2552 | gdbarch->register_sim_regno = register_sim_regno; |
0f71a2f6 JM |
2553 | } |
2554 | ||
0f71a2f6 | 2555 | int |
b8de8283 | 2556 | gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum) |
0f71a2f6 | 2557 | { |
8de9bdc4 | 2558 | gdb_assert (gdbarch != NULL); |
956ac328 | 2559 | gdb_assert (gdbarch->cannot_fetch_register != NULL); |
b8de8283 AC |
2560 | if (gdbarch_debug >= 2) |
2561 | fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n"); | |
64a3914f | 2562 | return gdbarch->cannot_fetch_register (gdbarch, regnum); |
b8de8283 AC |
2563 | } |
2564 | ||
2565 | void | |
2566 | set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, | |
2567 | gdbarch_cannot_fetch_register_ftype cannot_fetch_register) | |
2568 | { | |
2569 | gdbarch->cannot_fetch_register = cannot_fetch_register; | |
0f71a2f6 JM |
2570 | } |
2571 | ||
2572 | int | |
b8de8283 | 2573 | gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum) |
0f71a2f6 | 2574 | { |
8de9bdc4 | 2575 | gdb_assert (gdbarch != NULL); |
956ac328 | 2576 | gdb_assert (gdbarch->cannot_store_register != NULL); |
0f71a2f6 | 2577 | if (gdbarch_debug >= 2) |
b8de8283 | 2578 | fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n"); |
64a3914f | 2579 | return gdbarch->cannot_store_register (gdbarch, regnum); |
0f71a2f6 JM |
2580 | } |
2581 | ||
2582 | void | |
b8de8283 AC |
2583 | set_gdbarch_cannot_store_register (struct gdbarch *gdbarch, |
2584 | gdbarch_cannot_store_register_ftype cannot_store_register) | |
0f71a2f6 | 2585 | { |
b8de8283 | 2586 | gdbarch->cannot_store_register = cannot_store_register; |
0f71a2f6 JM |
2587 | } |
2588 | ||
39535193 | 2589 | bool |
b8de8283 | 2590 | gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch) |
e8ab51f7 AC |
2591 | { |
2592 | gdb_assert (gdbarch != NULL); | |
956ac328 | 2593 | return gdbarch->get_longjmp_target != NULL; |
e8ab51f7 AC |
2594 | } |
2595 | ||
b8de8283 | 2596 | int |
60ade65d | 2597 | gdbarch_get_longjmp_target (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR *pc) |
0f71a2f6 | 2598 | { |
8de9bdc4 | 2599 | gdb_assert (gdbarch != NULL); |
956ac328 | 2600 | gdb_assert (gdbarch->get_longjmp_target != NULL); |
0f71a2f6 | 2601 | if (gdbarch_debug >= 2) |
b8de8283 | 2602 | fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n"); |
60ade65d | 2603 | return gdbarch->get_longjmp_target (frame, pc); |
0f71a2f6 JM |
2604 | } |
2605 | ||
2606 | void | |
b8de8283 AC |
2607 | set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch, |
2608 | gdbarch_get_longjmp_target_ftype get_longjmp_target) | |
0f71a2f6 | 2609 | { |
b8de8283 | 2610 | gdbarch->get_longjmp_target = get_longjmp_target; |
0f71a2f6 JM |
2611 | } |
2612 | ||
2613 | int | |
104c1213 | 2614 | gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch) |
0f71a2f6 | 2615 | { |
8de9bdc4 | 2616 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 2617 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2618 | fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n"); |
2619 | return gdbarch->believe_pcc_promotion; | |
2620 | } | |
2621 | ||
2622 | void | |
104c1213 JM |
2623 | set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch, |
2624 | int believe_pcc_promotion) | |
0f71a2f6 JM |
2625 | { |
2626 | gdbarch->believe_pcc_promotion = believe_pcc_promotion; | |
2627 | } | |
2628 | ||
13d01224 | 2629 | int |
ff2e87ac | 2630 | gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type) |
13d01224 AC |
2631 | { |
2632 | gdb_assert (gdbarch != NULL); | |
956ac328 | 2633 | gdb_assert (gdbarch->convert_register_p != NULL); |
13d01224 AC |
2634 | if (gdbarch_debug >= 2) |
2635 | fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n"); | |
0abe36f5 | 2636 | return gdbarch->convert_register_p (gdbarch, regnum, type); |
13d01224 AC |
2637 | } |
2638 | ||
2639 | void | |
2640 | set_gdbarch_convert_register_p (struct gdbarch *gdbarch, | |
2641 | gdbarch_convert_register_p_ftype convert_register_p) | |
2642 | { | |
2643 | gdbarch->convert_register_p = convert_register_p; | |
2644 | } | |
2645 | ||
8dccd430 PA |
2646 | int |
2647 | 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 |
2648 | { |
2649 | gdb_assert (gdbarch != NULL); | |
956ac328 | 2650 | gdb_assert (gdbarch->register_to_value != NULL); |
13d01224 AC |
2651 | if (gdbarch_debug >= 2) |
2652 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n"); | |
8dccd430 | 2653 | return gdbarch->register_to_value (frame, regnum, type, buf, optimizedp, unavailablep); |
13d01224 AC |
2654 | } |
2655 | ||
2656 | void | |
2657 | set_gdbarch_register_to_value (struct gdbarch *gdbarch, | |
2658 | gdbarch_register_to_value_ftype register_to_value) | |
2659 | { | |
2660 | gdbarch->register_to_value = register_to_value; | |
2661 | } | |
2662 | ||
2663 | void | |
b60c417a | 2664 | gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const gdb_byte *buf) |
13d01224 AC |
2665 | { |
2666 | gdb_assert (gdbarch != NULL); | |
956ac328 | 2667 | gdb_assert (gdbarch->value_to_register != NULL); |
13d01224 AC |
2668 | if (gdbarch_debug >= 2) |
2669 | fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n"); | |
ff2e87ac | 2670 | gdbarch->value_to_register (frame, regnum, type, buf); |
13d01224 AC |
2671 | } |
2672 | ||
2673 | void | |
2674 | set_gdbarch_value_to_register (struct gdbarch *gdbarch, | |
2675 | gdbarch_value_to_register_ftype value_to_register) | |
2676 | { | |
2677 | gdbarch->value_to_register = value_to_register; | |
2678 | } | |
2679 | ||
9acbedc0 | 2680 | struct value * |
2ed3c037 | 2681 | gdbarch_value_from_register (struct gdbarch *gdbarch, struct type *type, int regnum, struct frame_id frame_id) |
9acbedc0 UW |
2682 | { |
2683 | gdb_assert (gdbarch != NULL); | |
2684 | gdb_assert (gdbarch->value_from_register != NULL); | |
2685 | if (gdbarch_debug >= 2) | |
2686 | fprintf_unfiltered (gdb_stdlog, "gdbarch_value_from_register called\n"); | |
2ed3c037 | 2687 | return gdbarch->value_from_register (gdbarch, type, regnum, frame_id); |
9acbedc0 UW |
2688 | } |
2689 | ||
2690 | void | |
2691 | set_gdbarch_value_from_register (struct gdbarch *gdbarch, | |
2692 | gdbarch_value_from_register_ftype value_from_register) | |
2693 | { | |
2694 | gdbarch->value_from_register = value_from_register; | |
2695 | } | |
2696 | ||
4478b372 | 2697 | CORE_ADDR |
b60c417a | 2698 | gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf) |
4478b372 | 2699 | { |
8de9bdc4 | 2700 | gdb_assert (gdbarch != NULL); |
956ac328 | 2701 | gdb_assert (gdbarch->pointer_to_address != NULL); |
4478b372 JB |
2702 | if (gdbarch_debug >= 2) |
2703 | fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n"); | |
9898f801 | 2704 | return gdbarch->pointer_to_address (gdbarch, type, buf); |
4478b372 JB |
2705 | } |
2706 | ||
2707 | void | |
2708 | set_gdbarch_pointer_to_address (struct gdbarch *gdbarch, | |
2709 | gdbarch_pointer_to_address_ftype pointer_to_address) | |
2710 | { | |
2711 | gdbarch->pointer_to_address = pointer_to_address; | |
2712 | } | |
2713 | ||
2714 | void | |
b60c417a | 2715 | gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, gdb_byte *buf, CORE_ADDR addr) |
4478b372 | 2716 | { |
8de9bdc4 | 2717 | gdb_assert (gdbarch != NULL); |
956ac328 | 2718 | gdb_assert (gdbarch->address_to_pointer != NULL); |
4478b372 JB |
2719 | if (gdbarch_debug >= 2) |
2720 | fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n"); | |
9898f801 | 2721 | gdbarch->address_to_pointer (gdbarch, type, buf, addr); |
4478b372 JB |
2722 | } |
2723 | ||
2724 | void | |
2725 | set_gdbarch_address_to_pointer (struct gdbarch *gdbarch, | |
2726 | gdbarch_address_to_pointer_ftype address_to_pointer) | |
2727 | { | |
2728 | gdbarch->address_to_pointer = address_to_pointer; | |
2729 | } | |
2730 | ||
39535193 | 2731 | bool |
fc0c74b1 AC |
2732 | gdbarch_integer_to_address_p (struct gdbarch *gdbarch) |
2733 | { | |
8de9bdc4 | 2734 | gdb_assert (gdbarch != NULL); |
956ac328 | 2735 | return gdbarch->integer_to_address != NULL; |
fc0c74b1 AC |
2736 | } |
2737 | ||
2738 | CORE_ADDR | |
fc1a4b47 | 2739 | gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf) |
fc0c74b1 | 2740 | { |
8de9bdc4 | 2741 | gdb_assert (gdbarch != NULL); |
956ac328 | 2742 | gdb_assert (gdbarch->integer_to_address != NULL); |
fc0c74b1 AC |
2743 | if (gdbarch_debug >= 2) |
2744 | fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n"); | |
79dd2d24 | 2745 | return gdbarch->integer_to_address (gdbarch, type, buf); |
fc0c74b1 AC |
2746 | } |
2747 | ||
2748 | void | |
2749 | set_gdbarch_integer_to_address (struct gdbarch *gdbarch, | |
2750 | gdbarch_integer_to_address_ftype integer_to_address) | |
2751 | { | |
2752 | gdbarch->integer_to_address = integer_to_address; | |
2753 | } | |
2754 | ||
39535193 | 2755 | bool |
92ad9cd9 AC |
2756 | gdbarch_return_value_p (struct gdbarch *gdbarch) |
2757 | { | |
2758 | gdb_assert (gdbarch != NULL); | |
c1874924 | 2759 | return gdbarch->return_value != NULL; |
92ad9cd9 AC |
2760 | } |
2761 | ||
2762 | enum return_value_convention | |
6a3a010b | 2763 | gdbarch_return_value (struct gdbarch *gdbarch, struct value *function, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf) |
92ad9cd9 AC |
2764 | { |
2765 | gdb_assert (gdbarch != NULL); | |
2766 | gdb_assert (gdbarch->return_value != NULL); | |
2767 | if (gdbarch_debug >= 2) | |
2768 | fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value called\n"); | |
6a3a010b | 2769 | return gdbarch->return_value (gdbarch, function, valtype, regcache, readbuf, writebuf); |
92ad9cd9 AC |
2770 | } |
2771 | ||
2772 | void | |
2773 | set_gdbarch_return_value (struct gdbarch *gdbarch, | |
2774 | gdbarch_return_value_ftype return_value) | |
2775 | { | |
2776 | gdbarch->return_value = return_value; | |
2777 | } | |
2778 | ||
18648a37 YQ |
2779 | int |
2780 | gdbarch_return_in_first_hidden_param_p (struct gdbarch *gdbarch, struct type *type) | |
2781 | { | |
2782 | gdb_assert (gdbarch != NULL); | |
2783 | gdb_assert (gdbarch->return_in_first_hidden_param_p != NULL); | |
2784 | if (gdbarch_debug >= 2) | |
2785 | fprintf_unfiltered (gdb_stdlog, "gdbarch_return_in_first_hidden_param_p called\n"); | |
2786 | return gdbarch->return_in_first_hidden_param_p (gdbarch, type); | |
2787 | } | |
2788 | ||
2789 | void | |
2790 | set_gdbarch_return_in_first_hidden_param_p (struct gdbarch *gdbarch, | |
2791 | gdbarch_return_in_first_hidden_param_p_ftype return_in_first_hidden_param_p) | |
2792 | { | |
2793 | gdbarch->return_in_first_hidden_param_p = return_in_first_hidden_param_p; | |
2794 | } | |
2795 | ||
0f71a2f6 JM |
2796 | CORE_ADDR |
2797 | gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip) | |
2798 | { | |
8de9bdc4 | 2799 | gdb_assert (gdbarch != NULL); |
956ac328 | 2800 | gdb_assert (gdbarch->skip_prologue != NULL); |
0f71a2f6 | 2801 | if (gdbarch_debug >= 2) |
0f71a2f6 | 2802 | fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n"); |
6093d2eb | 2803 | return gdbarch->skip_prologue (gdbarch, ip); |
0f71a2f6 JM |
2804 | } |
2805 | ||
2806 | void | |
104c1213 JM |
2807 | set_gdbarch_skip_prologue (struct gdbarch *gdbarch, |
2808 | gdbarch_skip_prologue_ftype skip_prologue) | |
0f71a2f6 JM |
2809 | { |
2810 | gdbarch->skip_prologue = skip_prologue; | |
2811 | } | |
2812 | ||
39535193 | 2813 | bool |
4309257c PM |
2814 | gdbarch_skip_main_prologue_p (struct gdbarch *gdbarch) |
2815 | { | |
2816 | gdb_assert (gdbarch != NULL); | |
2817 | return gdbarch->skip_main_prologue != NULL; | |
2818 | } | |
2819 | ||
2820 | CORE_ADDR | |
2821 | gdbarch_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR ip) | |
2822 | { | |
2823 | gdb_assert (gdbarch != NULL); | |
2824 | gdb_assert (gdbarch->skip_main_prologue != NULL); | |
2825 | if (gdbarch_debug >= 2) | |
2826 | fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_main_prologue called\n"); | |
2827 | return gdbarch->skip_main_prologue (gdbarch, ip); | |
2828 | } | |
2829 | ||
2830 | void | |
2831 | set_gdbarch_skip_main_prologue (struct gdbarch *gdbarch, | |
cfd8ab24 | 2832 | gdbarch_skip_main_prologue_ftype skip_main_prologue) |
4309257c PM |
2833 | { |
2834 | gdbarch->skip_main_prologue = skip_main_prologue; | |
2835 | } | |
2836 | ||
39535193 | 2837 | bool |
591a12a1 UW |
2838 | gdbarch_skip_entrypoint_p (struct gdbarch *gdbarch) |
2839 | { | |
2840 | gdb_assert (gdbarch != NULL); | |
2841 | return gdbarch->skip_entrypoint != NULL; | |
2842 | } | |
2843 | ||
2844 | CORE_ADDR | |
2845 | gdbarch_skip_entrypoint (struct gdbarch *gdbarch, CORE_ADDR ip) | |
2846 | { | |
2847 | gdb_assert (gdbarch != NULL); | |
2848 | gdb_assert (gdbarch->skip_entrypoint != NULL); | |
2849 | if (gdbarch_debug >= 2) | |
2850 | fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_entrypoint called\n"); | |
2851 | return gdbarch->skip_entrypoint (gdbarch, ip); | |
2852 | } | |
2853 | ||
2854 | void | |
2855 | set_gdbarch_skip_entrypoint (struct gdbarch *gdbarch, | |
2856 | gdbarch_skip_entrypoint_ftype skip_entrypoint) | |
2857 | { | |
2858 | gdbarch->skip_entrypoint = skip_entrypoint; | |
2859 | } | |
2860 | ||
0f71a2f6 JM |
2861 | int |
2862 | gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs) | |
2863 | { | |
8de9bdc4 | 2864 | gdb_assert (gdbarch != NULL); |
956ac328 | 2865 | gdb_assert (gdbarch->inner_than != NULL); |
0f71a2f6 | 2866 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2867 | fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n"); |
2868 | return gdbarch->inner_than (lhs, rhs); | |
2869 | } | |
2870 | ||
2871 | void | |
104c1213 JM |
2872 | set_gdbarch_inner_than (struct gdbarch *gdbarch, |
2873 | gdbarch_inner_than_ftype inner_than) | |
0f71a2f6 JM |
2874 | { |
2875 | gdbarch->inner_than = inner_than; | |
2876 | } | |
2877 | ||
fc1a4b47 | 2878 | const gdb_byte * |
adf40b2e | 2879 | gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr) |
0f71a2f6 | 2880 | { |
8de9bdc4 | 2881 | gdb_assert (gdbarch != NULL); |
956ac328 | 2882 | gdb_assert (gdbarch->breakpoint_from_pc != NULL); |
0f71a2f6 | 2883 | if (gdbarch_debug >= 2) |
0f71a2f6 | 2884 | fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n"); |
67d57894 | 2885 | return gdbarch->breakpoint_from_pc (gdbarch, pcptr, lenptr); |
0f71a2f6 JM |
2886 | } |
2887 | ||
2888 | void | |
104c1213 JM |
2889 | set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, |
2890 | gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc) | |
0f71a2f6 JM |
2891 | { |
2892 | gdbarch->breakpoint_from_pc = breakpoint_from_pc; | |
2893 | } | |
2894 | ||
cd6c3b4f YQ |
2895 | int |
2896 | gdbarch_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr) | |
2897 | { | |
2898 | gdb_assert (gdbarch != NULL); | |
2899 | gdb_assert (gdbarch->breakpoint_kind_from_pc != NULL); | |
2900 | if (gdbarch_debug >= 2) | |
2901 | fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_kind_from_pc called\n"); | |
2902 | return gdbarch->breakpoint_kind_from_pc (gdbarch, pcptr); | |
2903 | } | |
2904 | ||
2905 | void | |
2906 | set_gdbarch_breakpoint_kind_from_pc (struct gdbarch *gdbarch, | |
2907 | gdbarch_breakpoint_kind_from_pc_ftype breakpoint_kind_from_pc) | |
2908 | { | |
2909 | gdbarch->breakpoint_kind_from_pc = breakpoint_kind_from_pc; | |
2910 | } | |
2911 | ||
2912 | const gdb_byte * | |
2913 | gdbarch_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size) | |
2914 | { | |
2915 | gdb_assert (gdbarch != NULL); | |
2916 | gdb_assert (gdbarch->sw_breakpoint_from_kind != NULL); | |
2917 | if (gdbarch_debug >= 2) | |
2918 | fprintf_unfiltered (gdb_stdlog, "gdbarch_sw_breakpoint_from_kind called\n"); | |
2919 | return gdbarch->sw_breakpoint_from_kind (gdbarch, kind, size); | |
2920 | } | |
2921 | ||
2922 | void | |
2923 | set_gdbarch_sw_breakpoint_from_kind (struct gdbarch *gdbarch, | |
2924 | gdbarch_sw_breakpoint_from_kind_ftype sw_breakpoint_from_kind) | |
2925 | { | |
2926 | gdbarch->sw_breakpoint_from_kind = sw_breakpoint_from_kind; | |
2927 | } | |
2928 | ||
833b7ab5 YQ |
2929 | int |
2930 | gdbarch_breakpoint_kind_from_current_state (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR *pcptr) | |
2931 | { | |
2932 | gdb_assert (gdbarch != NULL); | |
2933 | gdb_assert (gdbarch->breakpoint_kind_from_current_state != NULL); | |
2934 | if (gdbarch_debug >= 2) | |
2935 | fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_kind_from_current_state called\n"); | |
2936 | return gdbarch->breakpoint_kind_from_current_state (gdbarch, regcache, pcptr); | |
2937 | } | |
2938 | ||
2939 | void | |
2940 | set_gdbarch_breakpoint_kind_from_current_state (struct gdbarch *gdbarch, | |
2941 | gdbarch_breakpoint_kind_from_current_state_ftype breakpoint_kind_from_current_state) | |
2942 | { | |
2943 | gdbarch->breakpoint_kind_from_current_state = breakpoint_kind_from_current_state; | |
2944 | } | |
2945 | ||
39535193 | 2946 | bool |
a1131521 KB |
2947 | gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch) |
2948 | { | |
2949 | gdb_assert (gdbarch != NULL); | |
2950 | return gdbarch->adjust_breakpoint_address != NULL; | |
2951 | } | |
2952 | ||
2953 | CORE_ADDR | |
2954 | gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr) | |
2955 | { | |
2956 | gdb_assert (gdbarch != NULL); | |
2957 | gdb_assert (gdbarch->adjust_breakpoint_address != NULL); | |
2958 | if (gdbarch_debug >= 2) | |
2959 | fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_breakpoint_address called\n"); | |
2960 | return gdbarch->adjust_breakpoint_address (gdbarch, bpaddr); | |
2961 | } | |
2962 | ||
2963 | void | |
2964 | set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, | |
2965 | gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address) | |
2966 | { | |
2967 | gdbarch->adjust_breakpoint_address = adjust_breakpoint_address; | |
2968 | } | |
2969 | ||
917317f4 | 2970 | int |
8181d85f | 2971 | gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt) |
917317f4 | 2972 | { |
8de9bdc4 | 2973 | gdb_assert (gdbarch != NULL); |
956ac328 | 2974 | gdb_assert (gdbarch->memory_insert_breakpoint != NULL); |
917317f4 | 2975 | if (gdbarch_debug >= 2) |
917317f4 | 2976 | fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n"); |
ae4b2284 | 2977 | return gdbarch->memory_insert_breakpoint (gdbarch, bp_tgt); |
917317f4 JM |
2978 | } |
2979 | ||
2980 | void | |
2981 | set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, | |
2982 | gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint) | |
2983 | { | |
2984 | gdbarch->memory_insert_breakpoint = memory_insert_breakpoint; | |
2985 | } | |
2986 | ||
2987 | int | |
8181d85f | 2988 | gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt) |
917317f4 | 2989 | { |
8de9bdc4 | 2990 | gdb_assert (gdbarch != NULL); |
956ac328 | 2991 | gdb_assert (gdbarch->memory_remove_breakpoint != NULL); |
917317f4 | 2992 | if (gdbarch_debug >= 2) |
917317f4 | 2993 | fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n"); |
ae4b2284 | 2994 | return gdbarch->memory_remove_breakpoint (gdbarch, bp_tgt); |
917317f4 JM |
2995 | } |
2996 | ||
2997 | void | |
2998 | set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, | |
2999 | gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint) | |
3000 | { | |
3001 | gdbarch->memory_remove_breakpoint = memory_remove_breakpoint; | |
3002 | } | |
3003 | ||
0f71a2f6 | 3004 | CORE_ADDR |
104c1213 | 3005 | gdbarch_decr_pc_after_break (struct gdbarch *gdbarch) |
0f71a2f6 | 3006 | { |
8de9bdc4 | 3007 | gdb_assert (gdbarch != NULL); |
71bd6bd4 | 3008 | /* Skip verify of decr_pc_after_break, invalid_p == 0 */ |
0f71a2f6 | 3009 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3010 | fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n"); |
3011 | return gdbarch->decr_pc_after_break; | |
3012 | } | |
3013 | ||
3014 | void | |
104c1213 JM |
3015 | set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch, |
3016 | CORE_ADDR decr_pc_after_break) | |
0f71a2f6 JM |
3017 | { |
3018 | gdbarch->decr_pc_after_break = decr_pc_after_break; | |
3019 | } | |
3020 | ||
3021 | CORE_ADDR | |
782263ab | 3022 | gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch) |
0f71a2f6 | 3023 | { |
8de9bdc4 | 3024 | gdb_assert (gdbarch != NULL); |
782263ab | 3025 | /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */ |
0f71a2f6 | 3026 | if (gdbarch_debug >= 2) |
782263ab AC |
3027 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_function_start_offset called\n"); |
3028 | return gdbarch->deprecated_function_start_offset; | |
0f71a2f6 JM |
3029 | } |
3030 | ||
3031 | void | |
782263ab AC |
3032 | set_gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch, |
3033 | CORE_ADDR deprecated_function_start_offset) | |
0f71a2f6 | 3034 | { |
782263ab | 3035 | gdbarch->deprecated_function_start_offset = deprecated_function_start_offset; |
0f71a2f6 JM |
3036 | } |
3037 | ||
123dc839 DJ |
3038 | int |
3039 | gdbarch_remote_register_number (struct gdbarch *gdbarch, int regno) | |
3040 | { | |
3041 | gdb_assert (gdbarch != NULL); | |
3042 | gdb_assert (gdbarch->remote_register_number != NULL); | |
3043 | if (gdbarch_debug >= 2) | |
3044 | fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_register_number called\n"); | |
3045 | return gdbarch->remote_register_number (gdbarch, regno); | |
3046 | } | |
3047 | ||
3048 | void | |
3049 | set_gdbarch_remote_register_number (struct gdbarch *gdbarch, | |
3050 | gdbarch_remote_register_number_ftype remote_register_number) | |
3051 | { | |
3052 | gdbarch->remote_register_number = remote_register_number; | |
3053 | } | |
3054 | ||
39535193 | 3055 | bool |
b2756930 KB |
3056 | gdbarch_fetch_tls_load_module_address_p (struct gdbarch *gdbarch) |
3057 | { | |
3058 | gdb_assert (gdbarch != NULL); | |
3059 | return gdbarch->fetch_tls_load_module_address != NULL; | |
3060 | } | |
3061 | ||
3062 | CORE_ADDR | |
3063 | gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch, struct objfile *objfile) | |
3064 | { | |
3065 | gdb_assert (gdbarch != NULL); | |
3066 | gdb_assert (gdbarch->fetch_tls_load_module_address != NULL); | |
3067 | if (gdbarch_debug >= 2) | |
3068 | fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_tls_load_module_address called\n"); | |
3069 | return gdbarch->fetch_tls_load_module_address (objfile); | |
3070 | } | |
3071 | ||
3072 | void | |
3073 | set_gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch, | |
3074 | gdbarch_fetch_tls_load_module_address_ftype fetch_tls_load_module_address) | |
3075 | { | |
3076 | gdbarch->fetch_tls_load_module_address = fetch_tls_load_module_address; | |
3077 | } | |
3078 | ||
39535193 | 3079 | bool |
6e056c81 JB |
3080 | gdbarch_get_thread_local_address_p (struct gdbarch *gdbarch) |
3081 | { | |
3082 | gdb_assert (gdbarch != NULL); | |
3083 | return gdbarch->get_thread_local_address != NULL; | |
3084 | } | |
3085 | ||
3086 | CORE_ADDR | |
3087 | gdbarch_get_thread_local_address (struct gdbarch *gdbarch, ptid_t ptid, CORE_ADDR lm_addr, CORE_ADDR offset) | |
3088 | { | |
3089 | gdb_assert (gdbarch != NULL); | |
3090 | gdb_assert (gdbarch->get_thread_local_address != NULL); | |
3091 | if (gdbarch_debug >= 2) | |
3092 | fprintf_unfiltered (gdb_stdlog, "gdbarch_get_thread_local_address called\n"); | |
3093 | return gdbarch->get_thread_local_address (gdbarch, ptid, lm_addr, offset); | |
3094 | } | |
3095 | ||
3096 | void | |
3097 | set_gdbarch_get_thread_local_address (struct gdbarch *gdbarch, | |
3098 | gdbarch_get_thread_local_address_ftype get_thread_local_address) | |
3099 | { | |
3100 | gdbarch->get_thread_local_address = get_thread_local_address; | |
3101 | } | |
3102 | ||
0f71a2f6 | 3103 | CORE_ADDR |
104c1213 | 3104 | gdbarch_frame_args_skip (struct gdbarch *gdbarch) |
0f71a2f6 | 3105 | { |
8de9bdc4 | 3106 | gdb_assert (gdbarch != NULL); |
5867a2fb | 3107 | /* Skip verify of frame_args_skip, invalid_p == 0 */ |
0f71a2f6 | 3108 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3109 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n"); |
3110 | return gdbarch->frame_args_skip; | |
3111 | } | |
3112 | ||
3113 | void | |
104c1213 JM |
3114 | set_gdbarch_frame_args_skip (struct gdbarch *gdbarch, |
3115 | CORE_ADDR frame_args_skip) | |
0f71a2f6 JM |
3116 | { |
3117 | gdbarch->frame_args_skip = frame_args_skip; | |
3118 | } | |
3119 | ||
12cc2063 AC |
3120 | CORE_ADDR |
3121 | gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) | |
3122 | { | |
3123 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3124 | gdb_assert (gdbarch->unwind_pc != NULL); |
12cc2063 AC |
3125 | if (gdbarch_debug >= 2) |
3126 | fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n"); | |
3127 | return gdbarch->unwind_pc (gdbarch, next_frame); | |
3128 | } | |
3129 | ||
3130 | void | |
3131 | set_gdbarch_unwind_pc (struct gdbarch *gdbarch, | |
3132 | gdbarch_unwind_pc_ftype unwind_pc) | |
3133 | { | |
3134 | gdbarch->unwind_pc = unwind_pc; | |
3135 | } | |
3136 | ||
a9e5fdc2 AC |
3137 | CORE_ADDR |
3138 | gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame) | |
3139 | { | |
3140 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3141 | gdb_assert (gdbarch->unwind_sp != NULL); |
a9e5fdc2 AC |
3142 | if (gdbarch_debug >= 2) |
3143 | fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_sp called\n"); | |
3144 | return gdbarch->unwind_sp (gdbarch, next_frame); | |
3145 | } | |
3146 | ||
3147 | void | |
3148 | set_gdbarch_unwind_sp (struct gdbarch *gdbarch, | |
3149 | gdbarch_unwind_sp_ftype unwind_sp) | |
3150 | { | |
3151 | gdbarch->unwind_sp = unwind_sp; | |
3152 | } | |
3153 | ||
39535193 | 3154 | bool |
983a287a AC |
3155 | gdbarch_frame_num_args_p (struct gdbarch *gdbarch) |
3156 | { | |
3157 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3158 | return gdbarch->frame_num_args != NULL; |
983a287a AC |
3159 | } |
3160 | ||
0f71a2f6 JM |
3161 | int |
3162 | gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame) | |
3163 | { | |
8de9bdc4 | 3164 | gdb_assert (gdbarch != NULL); |
956ac328 | 3165 | gdb_assert (gdbarch->frame_num_args != NULL); |
0f71a2f6 | 3166 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3167 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n"); |
3168 | return gdbarch->frame_num_args (frame); | |
3169 | } | |
3170 | ||
3171 | void | |
104c1213 JM |
3172 | set_gdbarch_frame_num_args (struct gdbarch *gdbarch, |
3173 | gdbarch_frame_num_args_ftype frame_num_args) | |
0f71a2f6 JM |
3174 | { |
3175 | gdbarch->frame_num_args = frame_num_args; | |
3176 | } | |
3177 | ||
39535193 | 3178 | bool |
dc604539 AC |
3179 | gdbarch_frame_align_p (struct gdbarch *gdbarch) |
3180 | { | |
3181 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3182 | return gdbarch->frame_align != NULL; |
dc604539 AC |
3183 | } |
3184 | ||
3185 | CORE_ADDR | |
3186 | gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address) | |
3187 | { | |
3188 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3189 | gdb_assert (gdbarch->frame_align != NULL); |
dc604539 AC |
3190 | if (gdbarch_debug >= 2) |
3191 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n"); | |
3192 | return gdbarch->frame_align (gdbarch, address); | |
3193 | } | |
3194 | ||
3195 | void | |
3196 | set_gdbarch_frame_align (struct gdbarch *gdbarch, | |
3197 | gdbarch_frame_align_ftype frame_align) | |
3198 | { | |
3199 | gdbarch->frame_align = frame_align; | |
3200 | } | |
3201 | ||
192cb3d4 MK |
3202 | int |
3203 | gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type) | |
3204 | { | |
3205 | gdb_assert (gdbarch != NULL); | |
3206 | gdb_assert (gdbarch->stabs_argument_has_addr != NULL); | |
3207 | if (gdbarch_debug >= 2) | |
3208 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stabs_argument_has_addr called\n"); | |
3209 | return gdbarch->stabs_argument_has_addr (gdbarch, type); | |
3210 | } | |
3211 | ||
3212 | void | |
3213 | set_gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, | |
3214 | gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr) | |
3215 | { | |
3216 | gdbarch->stabs_argument_has_addr = stabs_argument_has_addr; | |
3217 | } | |
3218 | ||
8b148df9 AC |
3219 | int |
3220 | gdbarch_frame_red_zone_size (struct gdbarch *gdbarch) | |
3221 | { | |
3222 | gdb_assert (gdbarch != NULL); | |
3223 | if (gdbarch_debug >= 2) | |
3224 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_red_zone_size called\n"); | |
3225 | return gdbarch->frame_red_zone_size; | |
3226 | } | |
3227 | ||
3228 | void | |
3229 | set_gdbarch_frame_red_zone_size (struct gdbarch *gdbarch, | |
3230 | int frame_red_zone_size) | |
3231 | { | |
3232 | gdbarch->frame_red_zone_size = frame_red_zone_size; | |
3233 | } | |
3234 | ||
f517ea4e | 3235 | CORE_ADDR |
e2d0e7eb | 3236 | gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ) |
f517ea4e | 3237 | { |
8de9bdc4 | 3238 | gdb_assert (gdbarch != NULL); |
956ac328 | 3239 | gdb_assert (gdbarch->convert_from_func_ptr_addr != NULL); |
f517ea4e PS |
3240 | if (gdbarch_debug >= 2) |
3241 | fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n"); | |
e2d0e7eb | 3242 | return gdbarch->convert_from_func_ptr_addr (gdbarch, addr, targ); |
f517ea4e PS |
3243 | } |
3244 | ||
3245 | void | |
3246 | set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, | |
3247 | gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr) | |
3248 | { | |
3249 | gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr; | |
3250 | } | |
3251 | ||
875e1767 AC |
3252 | CORE_ADDR |
3253 | gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr) | |
3254 | { | |
8de9bdc4 | 3255 | gdb_assert (gdbarch != NULL); |
956ac328 | 3256 | gdb_assert (gdbarch->addr_bits_remove != NULL); |
875e1767 AC |
3257 | if (gdbarch_debug >= 2) |
3258 | fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n"); | |
24568a2c | 3259 | return gdbarch->addr_bits_remove (gdbarch, addr); |
875e1767 AC |
3260 | } |
3261 | ||
3262 | void | |
3263 | set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch, | |
3264 | gdbarch_addr_bits_remove_ftype addr_bits_remove) | |
3265 | { | |
3266 | gdbarch->addr_bits_remove = addr_bits_remove; | |
3267 | } | |
3268 | ||
a738ea1d YQ |
3269 | int |
3270 | gdbarch_significant_addr_bit (struct gdbarch *gdbarch) | |
3271 | { | |
3272 | gdb_assert (gdbarch != NULL); | |
5969f0db | 3273 | /* Skip verify of significant_addr_bit, invalid_p == 0 */ |
a738ea1d YQ |
3274 | if (gdbarch_debug >= 2) |
3275 | fprintf_unfiltered (gdb_stdlog, "gdbarch_significant_addr_bit called\n"); | |
3276 | return gdbarch->significant_addr_bit; | |
3277 | } | |
3278 | ||
3279 | void | |
3280 | set_gdbarch_significant_addr_bit (struct gdbarch *gdbarch, | |
3281 | int significant_addr_bit) | |
3282 | { | |
3283 | gdbarch->significant_addr_bit = significant_addr_bit; | |
3284 | } | |
3285 | ||
39535193 | 3286 | bool |
64c4637f AC |
3287 | gdbarch_software_single_step_p (struct gdbarch *gdbarch) |
3288 | { | |
8de9bdc4 | 3289 | gdb_assert (gdbarch != NULL); |
956ac328 | 3290 | return gdbarch->software_single_step != NULL; |
64c4637f AC |
3291 | } |
3292 | ||
a0ff9e1a | 3293 | std::vector<CORE_ADDR> |
f5ea389a | 3294 | gdbarch_software_single_step (struct gdbarch *gdbarch, struct regcache *regcache) |
64c4637f | 3295 | { |
8de9bdc4 | 3296 | gdb_assert (gdbarch != NULL); |
956ac328 | 3297 | gdb_assert (gdbarch->software_single_step != NULL); |
64c4637f AC |
3298 | if (gdbarch_debug >= 2) |
3299 | fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n"); | |
f5ea389a | 3300 | return gdbarch->software_single_step (regcache); |
64c4637f AC |
3301 | } |
3302 | ||
3303 | void | |
3304 | set_gdbarch_software_single_step (struct gdbarch *gdbarch, | |
3305 | gdbarch_software_single_step_ftype software_single_step) | |
3306 | { | |
3307 | gdbarch->software_single_step = software_single_step; | |
3308 | } | |
3309 | ||
39535193 | 3310 | bool |
3352ef37 AC |
3311 | gdbarch_single_step_through_delay_p (struct gdbarch *gdbarch) |
3312 | { | |
3313 | gdb_assert (gdbarch != NULL); | |
3314 | return gdbarch->single_step_through_delay != NULL; | |
3315 | } | |
3316 | ||
3317 | int | |
3318 | gdbarch_single_step_through_delay (struct gdbarch *gdbarch, struct frame_info *frame) | |
3319 | { | |
3320 | gdb_assert (gdbarch != NULL); | |
3321 | gdb_assert (gdbarch->single_step_through_delay != NULL); | |
3322 | if (gdbarch_debug >= 2) | |
3323 | fprintf_unfiltered (gdb_stdlog, "gdbarch_single_step_through_delay called\n"); | |
3324 | return gdbarch->single_step_through_delay (gdbarch, frame); | |
3325 | } | |
3326 | ||
3327 | void | |
3328 | set_gdbarch_single_step_through_delay (struct gdbarch *gdbarch, | |
3329 | gdbarch_single_step_through_delay_ftype single_step_through_delay) | |
3330 | { | |
3331 | gdbarch->single_step_through_delay = single_step_through_delay; | |
3332 | } | |
3333 | ||
2bf0cb65 | 3334 | int |
a89aa300 | 3335 | gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info) |
2bf0cb65 | 3336 | { |
8de9bdc4 | 3337 | gdb_assert (gdbarch != NULL); |
956ac328 | 3338 | gdb_assert (gdbarch->print_insn != NULL); |
2bf0cb65 EZ |
3339 | if (gdbarch_debug >= 2) |
3340 | fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n"); | |
3341 | return gdbarch->print_insn (vma, info); | |
3342 | } | |
3343 | ||
3344 | void | |
3345 | set_gdbarch_print_insn (struct gdbarch *gdbarch, | |
3346 | gdbarch_print_insn_ftype print_insn) | |
3347 | { | |
3348 | gdbarch->print_insn = print_insn; | |
3349 | } | |
3350 | ||
bdcd319a | 3351 | CORE_ADDR |
52f729a7 | 3352 | gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR pc) |
bdcd319a | 3353 | { |
8de9bdc4 | 3354 | gdb_assert (gdbarch != NULL); |
956ac328 | 3355 | gdb_assert (gdbarch->skip_trampoline_code != NULL); |
bdcd319a CV |
3356 | if (gdbarch_debug >= 2) |
3357 | fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n"); | |
52f729a7 | 3358 | return gdbarch->skip_trampoline_code (frame, pc); |
bdcd319a CV |
3359 | } |
3360 | ||
3361 | void | |
3362 | set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, | |
3363 | gdbarch_skip_trampoline_code_ftype skip_trampoline_code) | |
3364 | { | |
3365 | gdbarch->skip_trampoline_code = skip_trampoline_code; | |
3366 | } | |
3367 | ||
dea0c52f MK |
3368 | CORE_ADDR |
3369 | gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc) | |
3370 | { | |
3371 | gdb_assert (gdbarch != NULL); | |
3372 | gdb_assert (gdbarch->skip_solib_resolver != NULL); | |
3373 | if (gdbarch_debug >= 2) | |
3374 | fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_solib_resolver called\n"); | |
4c8c40e6 | 3375 | return gdbarch->skip_solib_resolver (gdbarch, pc); |
dea0c52f MK |
3376 | } |
3377 | ||
3378 | void | |
3379 | set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, | |
3380 | gdbarch_skip_solib_resolver_ftype skip_solib_resolver) | |
3381 | { | |
3382 | gdbarch->skip_solib_resolver = skip_solib_resolver; | |
3383 | } | |
3384 | ||
d50355b6 | 3385 | int |
2c02bd72 | 3386 | gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, const char *name) |
d50355b6 MS |
3387 | { |
3388 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3389 | gdb_assert (gdbarch->in_solib_return_trampoline != NULL); |
d50355b6 MS |
3390 | if (gdbarch_debug >= 2) |
3391 | fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n"); | |
e17a4113 | 3392 | return gdbarch->in_solib_return_trampoline (gdbarch, pc, name); |
d50355b6 MS |
3393 | } |
3394 | ||
3395 | void | |
3396 | set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, | |
3397 | gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline) | |
3398 | { | |
3399 | gdbarch->in_solib_return_trampoline = in_solib_return_trampoline; | |
3400 | } | |
3401 | ||
1d509aa6 MM |
3402 | bool |
3403 | gdbarch_in_indirect_branch_thunk (struct gdbarch *gdbarch, CORE_ADDR pc) | |
3404 | { | |
3405 | gdb_assert (gdbarch != NULL); | |
3406 | gdb_assert (gdbarch->in_indirect_branch_thunk != NULL); | |
3407 | if (gdbarch_debug >= 2) | |
3408 | fprintf_unfiltered (gdb_stdlog, "gdbarch_in_indirect_branch_thunk called\n"); | |
3409 | return gdbarch->in_indirect_branch_thunk (gdbarch, pc); | |
3410 | } | |
3411 | ||
3412 | void | |
3413 | set_gdbarch_in_indirect_branch_thunk (struct gdbarch *gdbarch, | |
3414 | gdbarch_in_indirect_branch_thunk_ftype in_indirect_branch_thunk) | |
3415 | { | |
3416 | gdbarch->in_indirect_branch_thunk = in_indirect_branch_thunk; | |
3417 | } | |
3418 | ||
c12260ac | 3419 | int |
c9cf6e20 | 3420 | gdbarch_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR addr) |
c12260ac | 3421 | { |
8de9bdc4 | 3422 | gdb_assert (gdbarch != NULL); |
c9cf6e20 | 3423 | gdb_assert (gdbarch->stack_frame_destroyed_p != NULL); |
c12260ac | 3424 | if (gdbarch_debug >= 2) |
c9cf6e20 MG |
3425 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stack_frame_destroyed_p called\n"); |
3426 | return gdbarch->stack_frame_destroyed_p (gdbarch, addr); | |
c12260ac CV |
3427 | } |
3428 | ||
3429 | void | |
c9cf6e20 MG |
3430 | set_gdbarch_stack_frame_destroyed_p (struct gdbarch *gdbarch, |
3431 | gdbarch_stack_frame_destroyed_p_ftype stack_frame_destroyed_p) | |
c12260ac | 3432 | { |
c9cf6e20 | 3433 | gdbarch->stack_frame_destroyed_p = stack_frame_destroyed_p; |
c12260ac CV |
3434 | } |
3435 | ||
39535193 | 3436 | bool |
3e29f34a MR |
3437 | gdbarch_elf_make_msymbol_special_p (struct gdbarch *gdbarch) |
3438 | { | |
3439 | gdb_assert (gdbarch != NULL); | |
3440 | return gdbarch->elf_make_msymbol_special != NULL; | |
3441 | } | |
3442 | ||
a2cf933a EZ |
3443 | void |
3444 | gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym) | |
3445 | { | |
8de9bdc4 | 3446 | gdb_assert (gdbarch != NULL); |
956ac328 | 3447 | gdb_assert (gdbarch->elf_make_msymbol_special != NULL); |
a2cf933a EZ |
3448 | if (gdbarch_debug >= 2) |
3449 | fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n"); | |
3450 | gdbarch->elf_make_msymbol_special (sym, msym); | |
3451 | } | |
3452 | ||
3453 | void | |
3454 | set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, | |
3455 | gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special) | |
3456 | { | |
3457 | gdbarch->elf_make_msymbol_special = elf_make_msymbol_special; | |
3458 | } | |
3459 | ||
3460 | void | |
3461 | gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym) | |
3462 | { | |
8de9bdc4 | 3463 | gdb_assert (gdbarch != NULL); |
956ac328 | 3464 | gdb_assert (gdbarch->coff_make_msymbol_special != NULL); |
a2cf933a EZ |
3465 | if (gdbarch_debug >= 2) |
3466 | fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n"); | |
3467 | gdbarch->coff_make_msymbol_special (val, msym); | |
3468 | } | |
3469 | ||
3470 | void | |
3471 | set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, | |
3472 | gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special) | |
3473 | { | |
3474 | gdbarch->coff_make_msymbol_special = coff_make_msymbol_special; | |
3475 | } | |
3476 | ||
3e29f34a MR |
3477 | void |
3478 | gdbarch_make_symbol_special (struct gdbarch *gdbarch, struct symbol *sym, struct objfile *objfile) | |
3479 | { | |
3480 | gdb_assert (gdbarch != NULL); | |
3481 | gdb_assert (gdbarch->make_symbol_special != NULL); | |
3482 | if (gdbarch_debug >= 2) | |
3483 | fprintf_unfiltered (gdb_stdlog, "gdbarch_make_symbol_special called\n"); | |
3484 | gdbarch->make_symbol_special (sym, objfile); | |
3485 | } | |
3486 | ||
3487 | void | |
3488 | set_gdbarch_make_symbol_special (struct gdbarch *gdbarch, | |
3489 | gdbarch_make_symbol_special_ftype make_symbol_special) | |
3490 | { | |
3491 | gdbarch->make_symbol_special = make_symbol_special; | |
3492 | } | |
3493 | ||
3494 | CORE_ADDR | |
3495 | gdbarch_adjust_dwarf2_addr (struct gdbarch *gdbarch, CORE_ADDR pc) | |
3496 | { | |
3497 | gdb_assert (gdbarch != NULL); | |
3498 | gdb_assert (gdbarch->adjust_dwarf2_addr != NULL); | |
3499 | if (gdbarch_debug >= 2) | |
3500 | fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_dwarf2_addr called\n"); | |
3501 | return gdbarch->adjust_dwarf2_addr (pc); | |
3502 | } | |
3503 | ||
3504 | void | |
3505 | set_gdbarch_adjust_dwarf2_addr (struct gdbarch *gdbarch, | |
3506 | gdbarch_adjust_dwarf2_addr_ftype adjust_dwarf2_addr) | |
3507 | { | |
3508 | gdbarch->adjust_dwarf2_addr = adjust_dwarf2_addr; | |
3509 | } | |
3510 | ||
3511 | CORE_ADDR | |
3512 | gdbarch_adjust_dwarf2_line (struct gdbarch *gdbarch, CORE_ADDR addr, int rel) | |
3513 | { | |
3514 | gdb_assert (gdbarch != NULL); | |
3515 | gdb_assert (gdbarch->adjust_dwarf2_line != NULL); | |
3516 | if (gdbarch_debug >= 2) | |
3517 | fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_dwarf2_line called\n"); | |
3518 | return gdbarch->adjust_dwarf2_line (addr, rel); | |
3519 | } | |
3520 | ||
3521 | void | |
3522 | set_gdbarch_adjust_dwarf2_line (struct gdbarch *gdbarch, | |
3523 | gdbarch_adjust_dwarf2_line_ftype adjust_dwarf2_line) | |
3524 | { | |
3525 | gdbarch->adjust_dwarf2_line = adjust_dwarf2_line; | |
3526 | } | |
3527 | ||
c4ed33b9 AC |
3528 | int |
3529 | gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch) | |
3530 | { | |
3531 | gdb_assert (gdbarch != NULL); | |
3532 | /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */ | |
3533 | if (gdbarch_debug >= 2) | |
3534 | fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n"); | |
3535 | return gdbarch->cannot_step_breakpoint; | |
3536 | } | |
3537 | ||
3538 | void | |
3539 | set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch, | |
3540 | int cannot_step_breakpoint) | |
3541 | { | |
3542 | gdbarch->cannot_step_breakpoint = cannot_step_breakpoint; | |
3543 | } | |
3544 | ||
f74fa174 MM |
3545 | int |
3546 | gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch) | |
3547 | { | |
3548 | gdb_assert (gdbarch != NULL); | |
3549 | /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */ | |
3550 | if (gdbarch_debug >= 2) | |
3551 | fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n"); | |
3552 | return gdbarch->have_nonsteppable_watchpoint; | |
3553 | } | |
3554 | ||
3555 | void | |
3556 | set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch, | |
967c0d83 | 3557 | int have_nonsteppable_watchpoint) |
f74fa174 MM |
3558 | { |
3559 | gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint; | |
3560 | } | |
3561 | ||
39535193 | 3562 | bool |
8b2dbe47 KB |
3563 | gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch) |
3564 | { | |
3565 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3566 | return gdbarch->address_class_type_flags != NULL; |
8b2dbe47 KB |
3567 | } |
3568 | ||
314ad88d | 3569 | type_instance_flags |
8b2dbe47 KB |
3570 | gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class) |
3571 | { | |
3572 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3573 | gdb_assert (gdbarch->address_class_type_flags != NULL); |
8b2dbe47 KB |
3574 | if (gdbarch_debug >= 2) |
3575 | fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n"); | |
3576 | return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class); | |
3577 | } | |
3578 | ||
3579 | void | |
3580 | set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch, | |
3581 | gdbarch_address_class_type_flags_ftype address_class_type_flags) | |
3582 | { | |
3583 | gdbarch->address_class_type_flags = address_class_type_flags; | |
3584 | } | |
3585 | ||
39535193 | 3586 | bool |
8b2dbe47 KB |
3587 | gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch) |
3588 | { | |
3589 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3590 | return gdbarch->address_class_type_flags_to_name != NULL; |
8b2dbe47 KB |
3591 | } |
3592 | ||
321432c0 | 3593 | const char * |
314ad88d | 3594 | gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, type_instance_flags type_flags) |
8b2dbe47 KB |
3595 | { |
3596 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3597 | gdb_assert (gdbarch->address_class_type_flags_to_name != NULL); |
8b2dbe47 KB |
3598 | if (gdbarch_debug >= 2) |
3599 | fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n"); | |
5f11f355 | 3600 | return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags); |
8b2dbe47 KB |
3601 | } |
3602 | ||
3603 | void | |
3604 | set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, | |
3605 | gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name) | |
3606 | { | |
3607 | gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name; | |
3608 | } | |
3609 | ||
b41c5a85 JW |
3610 | bool |
3611 | gdbarch_execute_dwarf_cfa_vendor_op (struct gdbarch *gdbarch, gdb_byte op, struct dwarf2_frame_state *fs) | |
3612 | { | |
3613 | gdb_assert (gdbarch != NULL); | |
3614 | gdb_assert (gdbarch->execute_dwarf_cfa_vendor_op != NULL); | |
3615 | if (gdbarch_debug >= 2) | |
3616 | fprintf_unfiltered (gdb_stdlog, "gdbarch_execute_dwarf_cfa_vendor_op called\n"); | |
3617 | return gdbarch->execute_dwarf_cfa_vendor_op (gdbarch, op, fs); | |
3618 | } | |
3619 | ||
3620 | void | |
3621 | set_gdbarch_execute_dwarf_cfa_vendor_op (struct gdbarch *gdbarch, | |
3622 | gdbarch_execute_dwarf_cfa_vendor_op_ftype execute_dwarf_cfa_vendor_op) | |
3623 | { | |
3624 | gdbarch->execute_dwarf_cfa_vendor_op = execute_dwarf_cfa_vendor_op; | |
3625 | } | |
3626 | ||
39535193 | 3627 | bool |
8b2dbe47 KB |
3628 | gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch) |
3629 | { | |
3630 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3631 | return gdbarch->address_class_name_to_type_flags != NULL; |
8b2dbe47 KB |
3632 | } |
3633 | ||
314ad88d PA |
3634 | bool |
3635 | gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, type_instance_flags *type_flags_ptr) | |
8b2dbe47 KB |
3636 | { |
3637 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3638 | gdb_assert (gdbarch->address_class_name_to_type_flags != NULL); |
8b2dbe47 KB |
3639 | if (gdbarch_debug >= 2) |
3640 | fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n"); | |
5f11f355 | 3641 | return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr); |
8b2dbe47 KB |
3642 | } |
3643 | ||
3644 | void | |
3645 | set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, | |
3646 | gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags) | |
3647 | { | |
3648 | gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags; | |
3649 | } | |
3650 | ||
b59ff9d5 AC |
3651 | int |
3652 | gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup) | |
3653 | { | |
3654 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3655 | gdb_assert (gdbarch->register_reggroup_p != NULL); |
b59ff9d5 AC |
3656 | if (gdbarch_debug >= 2) |
3657 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n"); | |
3658 | return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup); | |
3659 | } | |
3660 | ||
3661 | void | |
3662 | set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch, | |
3663 | gdbarch_register_reggroup_p_ftype register_reggroup_p) | |
3664 | { | |
3665 | gdbarch->register_reggroup_p = register_reggroup_p; | |
3666 | } | |
3667 | ||
39535193 | 3668 | bool |
143985b7 AF |
3669 | gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch) |
3670 | { | |
3671 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3672 | return gdbarch->fetch_pointer_argument != NULL; |
143985b7 AF |
3673 | } |
3674 | ||
3675 | CORE_ADDR | |
3676 | gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type) | |
3677 | { | |
3678 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3679 | gdb_assert (gdbarch->fetch_pointer_argument != NULL); |
143985b7 AF |
3680 | if (gdbarch_debug >= 2) |
3681 | fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n"); | |
3682 | return gdbarch->fetch_pointer_argument (frame, argi, type); | |
3683 | } | |
3684 | ||
3685 | void | |
3686 | set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, | |
3687 | gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument) | |
3688 | { | |
3689 | gdbarch->fetch_pointer_argument = fetch_pointer_argument; | |
3690 | } | |
3691 | ||
39535193 | 3692 | bool |
5aa82d05 AA |
3693 | gdbarch_iterate_over_regset_sections_p (struct gdbarch *gdbarch) |
3694 | { | |
3695 | gdb_assert (gdbarch != NULL); | |
3696 | return gdbarch->iterate_over_regset_sections != NULL; | |
3697 | } | |
3698 | ||
3699 | void | |
3700 | gdbarch_iterate_over_regset_sections (struct gdbarch *gdbarch, iterate_over_regset_sections_cb *cb, void *cb_data, const struct regcache *regcache) | |
17ea7499 CES |
3701 | { |
3702 | gdb_assert (gdbarch != NULL); | |
5aa82d05 | 3703 | gdb_assert (gdbarch->iterate_over_regset_sections != NULL); |
17ea7499 | 3704 | if (gdbarch_debug >= 2) |
5aa82d05 AA |
3705 | fprintf_unfiltered (gdb_stdlog, "gdbarch_iterate_over_regset_sections called\n"); |
3706 | gdbarch->iterate_over_regset_sections (gdbarch, cb, cb_data, regcache); | |
17ea7499 CES |
3707 | } |
3708 | ||
3709 | void | |
5aa82d05 AA |
3710 | set_gdbarch_iterate_over_regset_sections (struct gdbarch *gdbarch, |
3711 | gdbarch_iterate_over_regset_sections_ftype iterate_over_regset_sections) | |
17ea7499 | 3712 | { |
5aa82d05 | 3713 | gdbarch->iterate_over_regset_sections = iterate_over_regset_sections; |
17ea7499 CES |
3714 | } |
3715 | ||
39535193 | 3716 | bool |
6432734d UW |
3717 | gdbarch_make_corefile_notes_p (struct gdbarch *gdbarch) |
3718 | { | |
3719 | gdb_assert (gdbarch != NULL); | |
3720 | return gdbarch->make_corefile_notes != NULL; | |
3721 | } | |
3722 | ||
c21f37a8 | 3723 | gdb::unique_xmalloc_ptr<char> |
6432734d UW |
3724 | gdbarch_make_corefile_notes (struct gdbarch *gdbarch, bfd *obfd, int *note_size) |
3725 | { | |
3726 | gdb_assert (gdbarch != NULL); | |
3727 | gdb_assert (gdbarch->make_corefile_notes != NULL); | |
3728 | if (gdbarch_debug >= 2) | |
3729 | fprintf_unfiltered (gdb_stdlog, "gdbarch_make_corefile_notes called\n"); | |
3730 | return gdbarch->make_corefile_notes (gdbarch, obfd, note_size); | |
3731 | } | |
3732 | ||
3733 | void | |
3734 | set_gdbarch_make_corefile_notes (struct gdbarch *gdbarch, | |
3735 | gdbarch_make_corefile_notes_ftype make_corefile_notes) | |
3736 | { | |
3737 | gdbarch->make_corefile_notes = make_corefile_notes; | |
3738 | } | |
3739 | ||
39535193 | 3740 | bool |
35c2fab7 UW |
3741 | gdbarch_find_memory_regions_p (struct gdbarch *gdbarch) |
3742 | { | |
3743 | gdb_assert (gdbarch != NULL); | |
3744 | return gdbarch->find_memory_regions != NULL; | |
3745 | } | |
3746 | ||
3747 | int | |
3748 | gdbarch_find_memory_regions (struct gdbarch *gdbarch, find_memory_region_ftype func, void *data) | |
3749 | { | |
3750 | gdb_assert (gdbarch != NULL); | |
3751 | gdb_assert (gdbarch->find_memory_regions != NULL); | |
3752 | if (gdbarch_debug >= 2) | |
3753 | fprintf_unfiltered (gdb_stdlog, "gdbarch_find_memory_regions called\n"); | |
3754 | return gdbarch->find_memory_regions (gdbarch, func, data); | |
3755 | } | |
3756 | ||
3757 | void | |
3758 | set_gdbarch_find_memory_regions (struct gdbarch *gdbarch, | |
3759 | gdbarch_find_memory_regions_ftype find_memory_regions) | |
3760 | { | |
3761 | gdbarch->find_memory_regions = find_memory_regions; | |
3762 | } | |
3763 | ||
39535193 | 3764 | bool |
de584861 PA |
3765 | gdbarch_core_xfer_shared_libraries_p (struct gdbarch *gdbarch) |
3766 | { | |
3767 | gdb_assert (gdbarch != NULL); | |
3768 | return gdbarch->core_xfer_shared_libraries != NULL; | |
3769 | } | |
3770 | ||
c09f20e4 | 3771 | ULONGEST |
7ec1862d | 3772 | gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len) |
de584861 PA |
3773 | { |
3774 | gdb_assert (gdbarch != NULL); | |
3775 | gdb_assert (gdbarch->core_xfer_shared_libraries != NULL); | |
3776 | if (gdbarch_debug >= 2) | |
3777 | fprintf_unfiltered (gdb_stdlog, "gdbarch_core_xfer_shared_libraries called\n"); | |
3778 | return gdbarch->core_xfer_shared_libraries (gdbarch, readbuf, offset, len); | |
3779 | } | |
3780 | ||
3781 | void | |
3782 | set_gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch, | |
3783 | gdbarch_core_xfer_shared_libraries_ftype core_xfer_shared_libraries) | |
3784 | { | |
3785 | gdbarch->core_xfer_shared_libraries = core_xfer_shared_libraries; | |
3786 | } | |
3787 | ||
39535193 | 3788 | bool |
356a5233 JB |
3789 | gdbarch_core_xfer_shared_libraries_aix_p (struct gdbarch *gdbarch) |
3790 | { | |
3791 | gdb_assert (gdbarch != NULL); | |
3792 | return gdbarch->core_xfer_shared_libraries_aix != NULL; | |
3793 | } | |
3794 | ||
c09f20e4 | 3795 | ULONGEST |
7ec1862d | 3796 | gdbarch_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len) |
356a5233 JB |
3797 | { |
3798 | gdb_assert (gdbarch != NULL); | |
3799 | gdb_assert (gdbarch->core_xfer_shared_libraries_aix != NULL); | |
3800 | if (gdbarch_debug >= 2) | |
3801 | fprintf_unfiltered (gdb_stdlog, "gdbarch_core_xfer_shared_libraries_aix called\n"); | |
3802 | return gdbarch->core_xfer_shared_libraries_aix (gdbarch, readbuf, offset, len); | |
3803 | } | |
3804 | ||
3805 | void | |
3806 | set_gdbarch_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch, | |
3807 | gdbarch_core_xfer_shared_libraries_aix_ftype core_xfer_shared_libraries_aix) | |
3808 | { | |
3809 | gdbarch->core_xfer_shared_libraries_aix = core_xfer_shared_libraries_aix; | |
3810 | } | |
3811 | ||
39535193 | 3812 | bool |
28439f5e PA |
3813 | gdbarch_core_pid_to_str_p (struct gdbarch *gdbarch) |
3814 | { | |
3815 | gdb_assert (gdbarch != NULL); | |
3816 | return gdbarch->core_pid_to_str != NULL; | |
3817 | } | |
3818 | ||
a068643d | 3819 | std::string |
28439f5e PA |
3820 | gdbarch_core_pid_to_str (struct gdbarch *gdbarch, ptid_t ptid) |
3821 | { | |
3822 | gdb_assert (gdbarch != NULL); | |
3823 | gdb_assert (gdbarch->core_pid_to_str != NULL); | |
3824 | if (gdbarch_debug >= 2) | |
3825 | fprintf_unfiltered (gdb_stdlog, "gdbarch_core_pid_to_str called\n"); | |
3826 | return gdbarch->core_pid_to_str (gdbarch, ptid); | |
3827 | } | |
3828 | ||
3829 | void | |
3830 | set_gdbarch_core_pid_to_str (struct gdbarch *gdbarch, | |
3831 | gdbarch_core_pid_to_str_ftype core_pid_to_str) | |
3832 | { | |
3833 | gdbarch->core_pid_to_str = core_pid_to_str; | |
3834 | } | |
3835 | ||
39535193 | 3836 | bool |
4dfc5dbc JB |
3837 | gdbarch_core_thread_name_p (struct gdbarch *gdbarch) |
3838 | { | |
3839 | gdb_assert (gdbarch != NULL); | |
3840 | return gdbarch->core_thread_name != NULL; | |
3841 | } | |
3842 | ||
3843 | const char * | |
3844 | gdbarch_core_thread_name (struct gdbarch *gdbarch, struct thread_info *thr) | |
3845 | { | |
3846 | gdb_assert (gdbarch != NULL); | |
3847 | gdb_assert (gdbarch->core_thread_name != NULL); | |
3848 | if (gdbarch_debug >= 2) | |
3849 | fprintf_unfiltered (gdb_stdlog, "gdbarch_core_thread_name called\n"); | |
3850 | return gdbarch->core_thread_name (gdbarch, thr); | |
3851 | } | |
3852 | ||
3853 | void | |
3854 | set_gdbarch_core_thread_name (struct gdbarch *gdbarch, | |
3855 | gdbarch_core_thread_name_ftype core_thread_name) | |
3856 | { | |
3857 | gdbarch->core_thread_name = core_thread_name; | |
3858 | } | |
3859 | ||
39535193 | 3860 | bool |
382b69bb JB |
3861 | gdbarch_core_xfer_siginfo_p (struct gdbarch *gdbarch) |
3862 | { | |
3863 | gdb_assert (gdbarch != NULL); | |
3864 | return gdbarch->core_xfer_siginfo != NULL; | |
3865 | } | |
3866 | ||
3867 | LONGEST | |
3868 | gdbarch_core_xfer_siginfo (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len) | |
3869 | { | |
3870 | gdb_assert (gdbarch != NULL); | |
3871 | gdb_assert (gdbarch->core_xfer_siginfo != NULL); | |
3872 | if (gdbarch_debug >= 2) | |
3873 | fprintf_unfiltered (gdb_stdlog, "gdbarch_core_xfer_siginfo called\n"); | |
3874 | return gdbarch->core_xfer_siginfo (gdbarch, readbuf, offset, len); | |
3875 | } | |
3876 | ||
3877 | void | |
3878 | set_gdbarch_core_xfer_siginfo (struct gdbarch *gdbarch, | |
3879 | gdbarch_core_xfer_siginfo_ftype core_xfer_siginfo) | |
3880 | { | |
3881 | gdbarch->core_xfer_siginfo = core_xfer_siginfo; | |
3882 | } | |
3883 | ||
39535193 | 3884 | bool |
a78c2d62 UW |
3885 | gdbarch_gcore_bfd_target_p (struct gdbarch *gdbarch) |
3886 | { | |
3887 | gdb_assert (gdbarch != NULL); | |
3888 | return gdbarch->gcore_bfd_target != 0; | |
3889 | } | |
3890 | ||
3891 | const char * | |
3892 | gdbarch_gcore_bfd_target (struct gdbarch *gdbarch) | |
3893 | { | |
3894 | gdb_assert (gdbarch != NULL); | |
3895 | /* Check variable changed from pre-default. */ | |
3896 | gdb_assert (gdbarch->gcore_bfd_target != 0); | |
3897 | if (gdbarch_debug >= 2) | |
3898 | fprintf_unfiltered (gdb_stdlog, "gdbarch_gcore_bfd_target called\n"); | |
3899 | return gdbarch->gcore_bfd_target; | |
3900 | } | |
3901 | ||
3902 | void | |
3903 | set_gdbarch_gcore_bfd_target (struct gdbarch *gdbarch, | |
3904 | const char * gcore_bfd_target) | |
3905 | { | |
3906 | gdbarch->gcore_bfd_target = gcore_bfd_target; | |
3907 | } | |
3908 | ||
0d5de010 DJ |
3909 | int |
3910 | gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch) | |
3911 | { | |
3912 | gdb_assert (gdbarch != NULL); | |
3913 | /* Skip verify of vtable_function_descriptors, invalid_p == 0 */ | |
3914 | if (gdbarch_debug >= 2) | |
3915 | fprintf_unfiltered (gdb_stdlog, "gdbarch_vtable_function_descriptors called\n"); | |
3916 | return gdbarch->vtable_function_descriptors; | |
3917 | } | |
3918 | ||
3919 | void | |
3920 | set_gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch, | |
3921 | int vtable_function_descriptors) | |
3922 | { | |
3923 | gdbarch->vtable_function_descriptors = vtable_function_descriptors; | |
3924 | } | |
3925 | ||
3926 | int | |
3927 | gdbarch_vbit_in_delta (struct gdbarch *gdbarch) | |
3928 | { | |
3929 | gdb_assert (gdbarch != NULL); | |
3930 | /* Skip verify of vbit_in_delta, invalid_p == 0 */ | |
3931 | if (gdbarch_debug >= 2) | |
3932 | fprintf_unfiltered (gdb_stdlog, "gdbarch_vbit_in_delta called\n"); | |
3933 | return gdbarch->vbit_in_delta; | |
3934 | } | |
3935 | ||
3936 | void | |
3937 | set_gdbarch_vbit_in_delta (struct gdbarch *gdbarch, | |
3938 | int vbit_in_delta) | |
3939 | { | |
3940 | gdbarch->vbit_in_delta = vbit_in_delta; | |
3941 | } | |
3942 | ||
6d350bb5 UW |
3943 | void |
3944 | gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch, struct regcache *regcache) | |
3945 | { | |
3946 | gdb_assert (gdbarch != NULL); | |
3947 | gdb_assert (gdbarch->skip_permanent_breakpoint != NULL); | |
3948 | if (gdbarch_debug >= 2) | |
3949 | fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_permanent_breakpoint called\n"); | |
3950 | gdbarch->skip_permanent_breakpoint (regcache); | |
3951 | } | |
3952 | ||
3953 | void | |
3954 | set_gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch, | |
3955 | gdbarch_skip_permanent_breakpoint_ftype skip_permanent_breakpoint) | |
3956 | { | |
3957 | gdbarch->skip_permanent_breakpoint = skip_permanent_breakpoint; | |
3958 | } | |
3959 | ||
39535193 | 3960 | bool |
237fc4c9 PA |
3961 | gdbarch_max_insn_length_p (struct gdbarch *gdbarch) |
3962 | { | |
3963 | gdb_assert (gdbarch != NULL); | |
3964 | return gdbarch->max_insn_length != 0; | |
3965 | } | |
3966 | ||
3967 | ULONGEST | |
3968 | gdbarch_max_insn_length (struct gdbarch *gdbarch) | |
3969 | { | |
3970 | gdb_assert (gdbarch != NULL); | |
3971 | /* Check variable changed from pre-default. */ | |
3972 | gdb_assert (gdbarch->max_insn_length != 0); | |
3973 | if (gdbarch_debug >= 2) | |
3974 | fprintf_unfiltered (gdb_stdlog, "gdbarch_max_insn_length called\n"); | |
3975 | return gdbarch->max_insn_length; | |
3976 | } | |
3977 | ||
3978 | void | |
3979 | set_gdbarch_max_insn_length (struct gdbarch *gdbarch, | |
3980 | ULONGEST max_insn_length) | |
3981 | { | |
3982 | gdbarch->max_insn_length = max_insn_length; | |
3983 | } | |
3984 | ||
39535193 | 3985 | bool |
237fc4c9 PA |
3986 | gdbarch_displaced_step_copy_insn_p (struct gdbarch *gdbarch) |
3987 | { | |
3988 | gdb_assert (gdbarch != NULL); | |
3989 | return gdbarch->displaced_step_copy_insn != NULL; | |
3990 | } | |
3991 | ||
1152d984 | 3992 | displaced_step_copy_insn_closure_up |
237fc4c9 PA |
3993 | gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch, CORE_ADDR from, CORE_ADDR to, struct regcache *regs) |
3994 | { | |
3995 | gdb_assert (gdbarch != NULL); | |
3996 | gdb_assert (gdbarch->displaced_step_copy_insn != NULL); | |
3997 | if (gdbarch_debug >= 2) | |
3998 | fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_copy_insn called\n"); | |
3999 | return gdbarch->displaced_step_copy_insn (gdbarch, from, to, regs); | |
4000 | } | |
4001 | ||
4002 | void | |
4003 | set_gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch, | |
4004 | gdbarch_displaced_step_copy_insn_ftype displaced_step_copy_insn) | |
4005 | { | |
4006 | gdbarch->displaced_step_copy_insn = displaced_step_copy_insn; | |
4007 | } | |
4008 | ||
07fbbd01 | 4009 | bool |
40a53766 | 4010 | gdbarch_displaced_step_hw_singlestep (struct gdbarch *gdbarch) |
99e40580 UW |
4011 | { |
4012 | gdb_assert (gdbarch != NULL); | |
4013 | gdb_assert (gdbarch->displaced_step_hw_singlestep != NULL); | |
4014 | if (gdbarch_debug >= 2) | |
4015 | fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_hw_singlestep called\n"); | |
40a53766 | 4016 | return gdbarch->displaced_step_hw_singlestep (gdbarch); |
99e40580 UW |
4017 | } |
4018 | ||
4019 | void | |
4020 | set_gdbarch_displaced_step_hw_singlestep (struct gdbarch *gdbarch, | |
4021 | gdbarch_displaced_step_hw_singlestep_ftype displaced_step_hw_singlestep) | |
4022 | { | |
4023 | gdbarch->displaced_step_hw_singlestep = displaced_step_hw_singlestep; | |
4024 | } | |
4025 | ||
39535193 | 4026 | bool |
237fc4c9 PA |
4027 | gdbarch_displaced_step_fixup_p (struct gdbarch *gdbarch) |
4028 | { | |
4029 | gdb_assert (gdbarch != NULL); | |
4030 | return gdbarch->displaced_step_fixup != NULL; | |
4031 | } | |
4032 | ||
4033 | void | |
1152d984 | 4034 | gdbarch_displaced_step_fixup (struct gdbarch *gdbarch, struct displaced_step_copy_insn_closure *closure, CORE_ADDR from, CORE_ADDR to, struct regcache *regs) |
237fc4c9 PA |
4035 | { |
4036 | gdb_assert (gdbarch != NULL); | |
4037 | gdb_assert (gdbarch->displaced_step_fixup != NULL); | |
4038 | /* Do not check predicate: gdbarch->displaced_step_fixup != NULL, allow call. */ | |
4039 | if (gdbarch_debug >= 2) | |
4040 | fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_fixup called\n"); | |
4041 | gdbarch->displaced_step_fixup (gdbarch, closure, from, to, regs); | |
4042 | } | |
4043 | ||
4044 | void | |
4045 | set_gdbarch_displaced_step_fixup (struct gdbarch *gdbarch, | |
4046 | gdbarch_displaced_step_fixup_ftype displaced_step_fixup) | |
4047 | { | |
4048 | gdbarch->displaced_step_fixup = displaced_step_fixup; | |
4049 | } | |
4050 | ||
187b041e SM |
4051 | bool |
4052 | gdbarch_displaced_step_prepare_p (struct gdbarch *gdbarch) | |
4053 | { | |
4054 | gdb_assert (gdbarch != NULL); | |
4055 | return gdbarch->displaced_step_prepare != NULL; | |
4056 | } | |
4057 | ||
4058 | displaced_step_prepare_status | |
4059 | gdbarch_displaced_step_prepare (struct gdbarch *gdbarch, thread_info *thread, CORE_ADDR &displaced_pc) | |
4060 | { | |
4061 | gdb_assert (gdbarch != NULL); | |
4062 | gdb_assert (gdbarch->displaced_step_prepare != NULL); | |
4063 | if (gdbarch_debug >= 2) | |
4064 | fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_prepare called\n"); | |
4065 | return gdbarch->displaced_step_prepare (gdbarch, thread, displaced_pc); | |
4066 | } | |
4067 | ||
4068 | void | |
4069 | set_gdbarch_displaced_step_prepare (struct gdbarch *gdbarch, | |
4070 | gdbarch_displaced_step_prepare_ftype displaced_step_prepare) | |
4071 | { | |
4072 | gdbarch->displaced_step_prepare = displaced_step_prepare; | |
4073 | } | |
4074 | ||
4075 | displaced_step_finish_status | |
4076 | gdbarch_displaced_step_finish (struct gdbarch *gdbarch, thread_info *thread, gdb_signal sig) | |
4077 | { | |
4078 | gdb_assert (gdbarch != NULL); | |
4079 | gdb_assert (gdbarch->displaced_step_finish != NULL); | |
4080 | if (gdbarch_debug >= 2) | |
4081 | fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_finish called\n"); | |
4082 | return gdbarch->displaced_step_finish (gdbarch, thread, sig); | |
4083 | } | |
4084 | ||
4085 | void | |
4086 | set_gdbarch_displaced_step_finish (struct gdbarch *gdbarch, | |
4087 | gdbarch_displaced_step_finish_ftype displaced_step_finish) | |
4088 | { | |
4089 | gdbarch->displaced_step_finish = displaced_step_finish; | |
4090 | } | |
4091 | ||
4092 | bool | |
4093 | gdbarch_displaced_step_copy_insn_closure_by_addr_p (struct gdbarch *gdbarch) | |
4094 | { | |
4095 | gdb_assert (gdbarch != NULL); | |
4096 | return gdbarch->displaced_step_copy_insn_closure_by_addr != NULL; | |
4097 | } | |
4098 | ||
4099 | const displaced_step_copy_insn_closure * | |
4100 | gdbarch_displaced_step_copy_insn_closure_by_addr (struct gdbarch *gdbarch, inferior *inf, CORE_ADDR addr) | |
4101 | { | |
4102 | gdb_assert (gdbarch != NULL); | |
4103 | gdb_assert (gdbarch->displaced_step_copy_insn_closure_by_addr != NULL); | |
4104 | if (gdbarch_debug >= 2) | |
4105 | fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_copy_insn_closure_by_addr called\n"); | |
4106 | return gdbarch->displaced_step_copy_insn_closure_by_addr (inf, addr); | |
4107 | } | |
4108 | ||
4109 | void | |
4110 | set_gdbarch_displaced_step_copy_insn_closure_by_addr (struct gdbarch *gdbarch, | |
4111 | gdbarch_displaced_step_copy_insn_closure_by_addr_ftype displaced_step_copy_insn_closure_by_addr) | |
4112 | { | |
4113 | gdbarch->displaced_step_copy_insn_closure_by_addr = displaced_step_copy_insn_closure_by_addr; | |
4114 | } | |
4115 | ||
4116 | void | |
4117 | gdbarch_displaced_step_restore_all_in_ptid (struct gdbarch *gdbarch, inferior *parent_inf, ptid_t child_ptid) | |
237fc4c9 PA |
4118 | { |
4119 | gdb_assert (gdbarch != NULL); | |
187b041e | 4120 | gdb_assert (gdbarch->displaced_step_restore_all_in_ptid != NULL); |
237fc4c9 | 4121 | if (gdbarch_debug >= 2) |
187b041e SM |
4122 | fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_restore_all_in_ptid called\n"); |
4123 | gdbarch->displaced_step_restore_all_in_ptid (parent_inf, child_ptid); | |
237fc4c9 PA |
4124 | } |
4125 | ||
4126 | void | |
187b041e SM |
4127 | set_gdbarch_displaced_step_restore_all_in_ptid (struct gdbarch *gdbarch, |
4128 | gdbarch_displaced_step_restore_all_in_ptid_ftype displaced_step_restore_all_in_ptid) | |
237fc4c9 | 4129 | { |
187b041e | 4130 | gdbarch->displaced_step_restore_all_in_ptid = displaced_step_restore_all_in_ptid; |
237fc4c9 PA |
4131 | } |
4132 | ||
39535193 | 4133 | bool |
dde08ee1 PA |
4134 | gdbarch_relocate_instruction_p (struct gdbarch *gdbarch) |
4135 | { | |
4136 | gdb_assert (gdbarch != NULL); | |
4137 | return gdbarch->relocate_instruction != NULL; | |
4138 | } | |
4139 | ||
4140 | void | |
4141 | gdbarch_relocate_instruction (struct gdbarch *gdbarch, CORE_ADDR *to, CORE_ADDR from) | |
4142 | { | |
4143 | gdb_assert (gdbarch != NULL); | |
4144 | gdb_assert (gdbarch->relocate_instruction != NULL); | |
4145 | /* Do not check predicate: gdbarch->relocate_instruction != NULL, allow call. */ | |
4146 | if (gdbarch_debug >= 2) | |
4147 | fprintf_unfiltered (gdb_stdlog, "gdbarch_relocate_instruction called\n"); | |
4148 | gdbarch->relocate_instruction (gdbarch, to, from); | |
4149 | } | |
4150 | ||
4151 | void | |
4152 | set_gdbarch_relocate_instruction (struct gdbarch *gdbarch, | |
4153 | gdbarch_relocate_instruction_ftype relocate_instruction) | |
4154 | { | |
4155 | gdbarch->relocate_instruction = relocate_instruction; | |
4156 | } | |
4157 | ||
39535193 | 4158 | bool |
1c772458 UW |
4159 | gdbarch_overlay_update_p (struct gdbarch *gdbarch) |
4160 | { | |
4161 | gdb_assert (gdbarch != NULL); | |
4162 | return gdbarch->overlay_update != NULL; | |
4163 | } | |
4164 | ||
4165 | void | |
4166 | gdbarch_overlay_update (struct gdbarch *gdbarch, struct obj_section *osect) | |
4167 | { | |
4168 | gdb_assert (gdbarch != NULL); | |
4169 | gdb_assert (gdbarch->overlay_update != NULL); | |
4170 | if (gdbarch_debug >= 2) | |
4171 | fprintf_unfiltered (gdb_stdlog, "gdbarch_overlay_update called\n"); | |
4172 | gdbarch->overlay_update (osect); | |
4173 | } | |
4174 | ||
4175 | void | |
4176 | set_gdbarch_overlay_update (struct gdbarch *gdbarch, | |
4177 | gdbarch_overlay_update_ftype overlay_update) | |
4178 | { | |
4179 | gdbarch->overlay_update = overlay_update; | |
4180 | } | |
4181 | ||
39535193 | 4182 | bool |
4eb0ad19 DJ |
4183 | gdbarch_core_read_description_p (struct gdbarch *gdbarch) |
4184 | { | |
4185 | gdb_assert (gdbarch != NULL); | |
4186 | return gdbarch->core_read_description != NULL; | |
4187 | } | |
4188 | ||
4189 | const struct target_desc * | |
4190 | gdbarch_core_read_description (struct gdbarch *gdbarch, struct target_ops *target, bfd *abfd) | |
4191 | { | |
4192 | gdb_assert (gdbarch != NULL); | |
4193 | gdb_assert (gdbarch->core_read_description != NULL); | |
4194 | if (gdbarch_debug >= 2) | |
4195 | fprintf_unfiltered (gdb_stdlog, "gdbarch_core_read_description called\n"); | |
4196 | return gdbarch->core_read_description (gdbarch, target, abfd); | |
4197 | } | |
4198 | ||
4199 | void | |
4200 | set_gdbarch_core_read_description (struct gdbarch *gdbarch, | |
4201 | gdbarch_core_read_description_ftype core_read_description) | |
4202 | { | |
4203 | gdbarch->core_read_description = core_read_description; | |
4204 | } | |
4205 | ||
203c3895 UW |
4206 | int |
4207 | gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch) | |
4208 | { | |
4209 | gdb_assert (gdbarch != NULL); | |
4210 | /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */ | |
4211 | if (gdbarch_debug >= 2) | |
4212 | fprintf_unfiltered (gdb_stdlog, "gdbarch_sofun_address_maybe_missing called\n"); | |
4213 | return gdbarch->sofun_address_maybe_missing; | |
4214 | } | |
4215 | ||
4216 | void | |
4217 | set_gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch, | |
4218 | int sofun_address_maybe_missing) | |
4219 | { | |
4220 | gdbarch->sofun_address_maybe_missing = sofun_address_maybe_missing; | |
4221 | } | |
4222 | ||
39535193 | 4223 | bool |
0508c3ec HZ |
4224 | gdbarch_process_record_p (struct gdbarch *gdbarch) |
4225 | { | |
4226 | gdb_assert (gdbarch != NULL); | |
4227 | return gdbarch->process_record != NULL; | |
4228 | } | |
4229 | ||
4230 | int | |
4231 | gdbarch_process_record (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR addr) | |
4232 | { | |
4233 | gdb_assert (gdbarch != NULL); | |
4234 | gdb_assert (gdbarch->process_record != NULL); | |
4235 | if (gdbarch_debug >= 2) | |
4236 | fprintf_unfiltered (gdb_stdlog, "gdbarch_process_record called\n"); | |
4237 | return gdbarch->process_record (gdbarch, regcache, addr); | |
4238 | } | |
4239 | ||
4240 | void | |
4241 | set_gdbarch_process_record (struct gdbarch *gdbarch, | |
4242 | gdbarch_process_record_ftype process_record) | |
4243 | { | |
4244 | gdbarch->process_record = process_record; | |
4245 | } | |
4246 | ||
39535193 | 4247 | bool |
3846b520 HZ |
4248 | gdbarch_process_record_signal_p (struct gdbarch *gdbarch) |
4249 | { | |
4250 | gdb_assert (gdbarch != NULL); | |
4251 | return gdbarch->process_record_signal != NULL; | |
4252 | } | |
4253 | ||
4254 | int | |
2ea28649 | 4255 | gdbarch_process_record_signal (struct gdbarch *gdbarch, struct regcache *regcache, enum gdb_signal signal) |
3846b520 HZ |
4256 | { |
4257 | gdb_assert (gdbarch != NULL); | |
4258 | gdb_assert (gdbarch->process_record_signal != NULL); | |
4259 | if (gdbarch_debug >= 2) | |
4260 | fprintf_unfiltered (gdb_stdlog, "gdbarch_process_record_signal called\n"); | |
4261 | return gdbarch->process_record_signal (gdbarch, regcache, signal); | |
4262 | } | |
4263 | ||
4264 | void | |
4265 | set_gdbarch_process_record_signal (struct gdbarch *gdbarch, | |
4266 | gdbarch_process_record_signal_ftype process_record_signal) | |
4267 | { | |
4268 | gdbarch->process_record_signal = process_record_signal; | |
4269 | } | |
4270 | ||
39535193 | 4271 | bool |
1f8cf220 PA |
4272 | gdbarch_gdb_signal_from_target_p (struct gdbarch *gdbarch) |
4273 | { | |
4274 | gdb_assert (gdbarch != NULL); | |
4275 | return gdbarch->gdb_signal_from_target != NULL; | |
4276 | } | |
4277 | ||
2ea28649 | 4278 | enum gdb_signal |
22203bbf | 4279 | gdbarch_gdb_signal_from_target (struct gdbarch *gdbarch, int signo) |
1cded358 AR |
4280 | { |
4281 | gdb_assert (gdbarch != NULL); | |
22203bbf | 4282 | gdb_assert (gdbarch->gdb_signal_from_target != NULL); |
1cded358 | 4283 | if (gdbarch_debug >= 2) |
22203bbf PA |
4284 | fprintf_unfiltered (gdb_stdlog, "gdbarch_gdb_signal_from_target called\n"); |
4285 | return gdbarch->gdb_signal_from_target (gdbarch, signo); | |
1cded358 AR |
4286 | } |
4287 | ||
4288 | void | |
22203bbf PA |
4289 | set_gdbarch_gdb_signal_from_target (struct gdbarch *gdbarch, |
4290 | gdbarch_gdb_signal_from_target_ftype gdb_signal_from_target) | |
1cded358 | 4291 | { |
22203bbf | 4292 | gdbarch->gdb_signal_from_target = gdb_signal_from_target; |
1cded358 AR |
4293 | } |
4294 | ||
39535193 | 4295 | bool |
eb14d406 SDJ |
4296 | gdbarch_gdb_signal_to_target_p (struct gdbarch *gdbarch) |
4297 | { | |
4298 | gdb_assert (gdbarch != NULL); | |
4299 | return gdbarch->gdb_signal_to_target != NULL; | |
4300 | } | |
4301 | ||
4302 | int | |
4303 | gdbarch_gdb_signal_to_target (struct gdbarch *gdbarch, enum gdb_signal signal) | |
4304 | { | |
4305 | gdb_assert (gdbarch != NULL); | |
4306 | gdb_assert (gdbarch->gdb_signal_to_target != NULL); | |
4307 | if (gdbarch_debug >= 2) | |
4308 | fprintf_unfiltered (gdb_stdlog, "gdbarch_gdb_signal_to_target called\n"); | |
4309 | return gdbarch->gdb_signal_to_target (gdbarch, signal); | |
4310 | } | |
4311 | ||
4312 | void | |
4313 | set_gdbarch_gdb_signal_to_target (struct gdbarch *gdbarch, | |
4314 | gdbarch_gdb_signal_to_target_ftype gdb_signal_to_target) | |
4315 | { | |
4316 | gdbarch->gdb_signal_to_target = gdb_signal_to_target; | |
4317 | } | |
4318 | ||
39535193 | 4319 | bool |
4aa995e1 PA |
4320 | gdbarch_get_siginfo_type_p (struct gdbarch *gdbarch) |
4321 | { | |
4322 | gdb_assert (gdbarch != NULL); | |
4323 | return gdbarch->get_siginfo_type != NULL; | |
4324 | } | |
4325 | ||
4326 | struct type * | |
4327 | gdbarch_get_siginfo_type (struct gdbarch *gdbarch) | |
4328 | { | |
4329 | gdb_assert (gdbarch != NULL); | |
4330 | gdb_assert (gdbarch->get_siginfo_type != NULL); | |
4331 | if (gdbarch_debug >= 2) | |
4332 | fprintf_unfiltered (gdb_stdlog, "gdbarch_get_siginfo_type called\n"); | |
4333 | return gdbarch->get_siginfo_type (gdbarch); | |
4334 | } | |
4335 | ||
4336 | void | |
4337 | set_gdbarch_get_siginfo_type (struct gdbarch *gdbarch, | |
4338 | gdbarch_get_siginfo_type_ftype get_siginfo_type) | |
4339 | { | |
4340 | gdbarch->get_siginfo_type = get_siginfo_type; | |
4341 | } | |
4342 | ||
39535193 | 4343 | bool |
60c5725c DJ |
4344 | gdbarch_record_special_symbol_p (struct gdbarch *gdbarch) |
4345 | { | |
4346 | gdb_assert (gdbarch != NULL); | |
4347 | return gdbarch->record_special_symbol != NULL; | |
4348 | } | |
4349 | ||
4350 | void | |
4351 | gdbarch_record_special_symbol (struct gdbarch *gdbarch, struct objfile *objfile, asymbol *sym) | |
4352 | { | |
4353 | gdb_assert (gdbarch != NULL); | |
4354 | gdb_assert (gdbarch->record_special_symbol != NULL); | |
4355 | if (gdbarch_debug >= 2) | |
4356 | fprintf_unfiltered (gdb_stdlog, "gdbarch_record_special_symbol called\n"); | |
4357 | gdbarch->record_special_symbol (gdbarch, objfile, sym); | |
4358 | } | |
4359 | ||
4360 | void | |
4361 | set_gdbarch_record_special_symbol (struct gdbarch *gdbarch, | |
4362 | gdbarch_record_special_symbol_ftype record_special_symbol) | |
4363 | { | |
4364 | gdbarch->record_special_symbol = record_special_symbol; | |
4365 | } | |
4366 | ||
39535193 | 4367 | bool |
a96d9b2e SDJ |
4368 | gdbarch_get_syscall_number_p (struct gdbarch *gdbarch) |
4369 | { | |
4370 | gdb_assert (gdbarch != NULL); | |
4371 | return gdbarch->get_syscall_number != NULL; | |
4372 | } | |
4373 | ||
4374 | LONGEST | |
00431a78 | 4375 | gdbarch_get_syscall_number (struct gdbarch *gdbarch, thread_info *thread) |
a96d9b2e SDJ |
4376 | { |
4377 | gdb_assert (gdbarch != NULL); | |
4378 | gdb_assert (gdbarch->get_syscall_number != NULL); | |
4379 | if (gdbarch_debug >= 2) | |
4380 | fprintf_unfiltered (gdb_stdlog, "gdbarch_get_syscall_number called\n"); | |
00431a78 | 4381 | return gdbarch->get_syscall_number (gdbarch, thread); |
a96d9b2e SDJ |
4382 | } |
4383 | ||
4384 | void | |
4385 | set_gdbarch_get_syscall_number (struct gdbarch *gdbarch, | |
4386 | gdbarch_get_syscall_number_ftype get_syscall_number) | |
4387 | { | |
4388 | gdbarch->get_syscall_number = get_syscall_number; | |
4389 | } | |
4390 | ||
458c8db8 SDJ |
4391 | const char * |
4392 | gdbarch_xml_syscall_file (struct gdbarch *gdbarch) | |
4393 | { | |
4394 | gdb_assert (gdbarch != NULL); | |
4395 | /* Skip verify of xml_syscall_file, invalid_p == 0 */ | |
4396 | if (gdbarch_debug >= 2) | |
4397 | fprintf_unfiltered (gdb_stdlog, "gdbarch_xml_syscall_file called\n"); | |
4398 | return gdbarch->xml_syscall_file; | |
4399 | } | |
4400 | ||
4401 | void | |
4402 | set_gdbarch_xml_syscall_file (struct gdbarch *gdbarch, | |
4403 | const char * xml_syscall_file) | |
4404 | { | |
4405 | gdbarch->xml_syscall_file = xml_syscall_file; | |
4406 | } | |
4407 | ||
4408 | struct syscalls_info * | |
4409 | gdbarch_syscalls_info (struct gdbarch *gdbarch) | |
4410 | { | |
4411 | gdb_assert (gdbarch != NULL); | |
4412 | /* Skip verify of syscalls_info, invalid_p == 0 */ | |
4413 | if (gdbarch_debug >= 2) | |
4414 | fprintf_unfiltered (gdb_stdlog, "gdbarch_syscalls_info called\n"); | |
4415 | return gdbarch->syscalls_info; | |
4416 | } | |
4417 | ||
4418 | void | |
4419 | set_gdbarch_syscalls_info (struct gdbarch *gdbarch, | |
4420 | struct syscalls_info * syscalls_info) | |
4421 | { | |
4422 | gdbarch->syscalls_info = syscalls_info; | |
4423 | } | |
4424 | ||
05c0465e SDJ |
4425 | const char *const * |
4426 | gdbarch_stap_integer_prefixes (struct gdbarch *gdbarch) | |
55aa24fb SDJ |
4427 | { |
4428 | gdb_assert (gdbarch != NULL); | |
05c0465e | 4429 | /* Skip verify of stap_integer_prefixes, invalid_p == 0 */ |
55aa24fb | 4430 | if (gdbarch_debug >= 2) |
05c0465e SDJ |
4431 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_integer_prefixes called\n"); |
4432 | return gdbarch->stap_integer_prefixes; | |
55aa24fb SDJ |
4433 | } |
4434 | ||
4435 | void | |
05c0465e SDJ |
4436 | set_gdbarch_stap_integer_prefixes (struct gdbarch *gdbarch, |
4437 | const char *const * stap_integer_prefixes) | |
55aa24fb | 4438 | { |
05c0465e | 4439 | gdbarch->stap_integer_prefixes = stap_integer_prefixes; |
55aa24fb SDJ |
4440 | } |
4441 | ||
05c0465e SDJ |
4442 | const char *const * |
4443 | gdbarch_stap_integer_suffixes (struct gdbarch *gdbarch) | |
55aa24fb SDJ |
4444 | { |
4445 | gdb_assert (gdbarch != NULL); | |
05c0465e | 4446 | /* Skip verify of stap_integer_suffixes, invalid_p == 0 */ |
55aa24fb | 4447 | if (gdbarch_debug >= 2) |
05c0465e SDJ |
4448 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_integer_suffixes called\n"); |
4449 | return gdbarch->stap_integer_suffixes; | |
55aa24fb SDJ |
4450 | } |
4451 | ||
4452 | void | |
05c0465e SDJ |
4453 | set_gdbarch_stap_integer_suffixes (struct gdbarch *gdbarch, |
4454 | const char *const * stap_integer_suffixes) | |
55aa24fb | 4455 | { |
05c0465e | 4456 | gdbarch->stap_integer_suffixes = stap_integer_suffixes; |
55aa24fb SDJ |
4457 | } |
4458 | ||
05c0465e SDJ |
4459 | const char *const * |
4460 | gdbarch_stap_register_prefixes (struct gdbarch *gdbarch) | |
55aa24fb SDJ |
4461 | { |
4462 | gdb_assert (gdbarch != NULL); | |
05c0465e | 4463 | /* Skip verify of stap_register_prefixes, invalid_p == 0 */ |
55aa24fb | 4464 | if (gdbarch_debug >= 2) |
05c0465e SDJ |
4465 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_prefixes called\n"); |
4466 | return gdbarch->stap_register_prefixes; | |
55aa24fb SDJ |
4467 | } |
4468 | ||
4469 | void | |
05c0465e SDJ |
4470 | set_gdbarch_stap_register_prefixes (struct gdbarch *gdbarch, |
4471 | const char *const * stap_register_prefixes) | |
55aa24fb | 4472 | { |
05c0465e | 4473 | gdbarch->stap_register_prefixes = stap_register_prefixes; |
55aa24fb SDJ |
4474 | } |
4475 | ||
05c0465e SDJ |
4476 | const char *const * |
4477 | gdbarch_stap_register_suffixes (struct gdbarch *gdbarch) | |
55aa24fb SDJ |
4478 | { |
4479 | gdb_assert (gdbarch != NULL); | |
05c0465e | 4480 | /* Skip verify of stap_register_suffixes, invalid_p == 0 */ |
55aa24fb | 4481 | if (gdbarch_debug >= 2) |
05c0465e SDJ |
4482 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_suffixes called\n"); |
4483 | return gdbarch->stap_register_suffixes; | |
55aa24fb SDJ |
4484 | } |
4485 | ||
4486 | void | |
05c0465e SDJ |
4487 | set_gdbarch_stap_register_suffixes (struct gdbarch *gdbarch, |
4488 | const char *const * stap_register_suffixes) | |
55aa24fb | 4489 | { |
05c0465e | 4490 | gdbarch->stap_register_suffixes = stap_register_suffixes; |
55aa24fb SDJ |
4491 | } |
4492 | ||
05c0465e SDJ |
4493 | const char *const * |
4494 | gdbarch_stap_register_indirection_prefixes (struct gdbarch *gdbarch) | |
55aa24fb SDJ |
4495 | { |
4496 | gdb_assert (gdbarch != NULL); | |
05c0465e | 4497 | /* Skip verify of stap_register_indirection_prefixes, invalid_p == 0 */ |
55aa24fb | 4498 | if (gdbarch_debug >= 2) |
05c0465e SDJ |
4499 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_indirection_prefixes called\n"); |
4500 | return gdbarch->stap_register_indirection_prefixes; | |
55aa24fb SDJ |
4501 | } |
4502 | ||
4503 | void | |
05c0465e SDJ |
4504 | set_gdbarch_stap_register_indirection_prefixes (struct gdbarch *gdbarch, |
4505 | const char *const * stap_register_indirection_prefixes) | |
55aa24fb | 4506 | { |
05c0465e | 4507 | gdbarch->stap_register_indirection_prefixes = stap_register_indirection_prefixes; |
55aa24fb SDJ |
4508 | } |
4509 | ||
05c0465e SDJ |
4510 | const char *const * |
4511 | gdbarch_stap_register_indirection_suffixes (struct gdbarch *gdbarch) | |
55aa24fb SDJ |
4512 | { |
4513 | gdb_assert (gdbarch != NULL); | |
05c0465e | 4514 | /* Skip verify of stap_register_indirection_suffixes, invalid_p == 0 */ |
55aa24fb | 4515 | if (gdbarch_debug >= 2) |
05c0465e SDJ |
4516 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_indirection_suffixes called\n"); |
4517 | return gdbarch->stap_register_indirection_suffixes; | |
55aa24fb SDJ |
4518 | } |
4519 | ||
4520 | void | |
05c0465e SDJ |
4521 | set_gdbarch_stap_register_indirection_suffixes (struct gdbarch *gdbarch, |
4522 | const char *const * stap_register_indirection_suffixes) | |
55aa24fb | 4523 | { |
05c0465e | 4524 | gdbarch->stap_register_indirection_suffixes = stap_register_indirection_suffixes; |
55aa24fb SDJ |
4525 | } |
4526 | ||
4527 | const char * | |
4528 | gdbarch_stap_gdb_register_prefix (struct gdbarch *gdbarch) | |
4529 | { | |
4530 | gdb_assert (gdbarch != NULL); | |
4531 | /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */ | |
4532 | if (gdbarch_debug >= 2) | |
4533 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_gdb_register_prefix called\n"); | |
4534 | return gdbarch->stap_gdb_register_prefix; | |
4535 | } | |
4536 | ||
4537 | void | |
4538 | set_gdbarch_stap_gdb_register_prefix (struct gdbarch *gdbarch, | |
4539 | const char * stap_gdb_register_prefix) | |
4540 | { | |
4541 | gdbarch->stap_gdb_register_prefix = stap_gdb_register_prefix; | |
4542 | } | |
4543 | ||
4544 | const char * | |
4545 | gdbarch_stap_gdb_register_suffix (struct gdbarch *gdbarch) | |
4546 | { | |
4547 | gdb_assert (gdbarch != NULL); | |
4548 | /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */ | |
4549 | if (gdbarch_debug >= 2) | |
4550 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_gdb_register_suffix called\n"); | |
4551 | return gdbarch->stap_gdb_register_suffix; | |
4552 | } | |
4553 | ||
4554 | void | |
4555 | set_gdbarch_stap_gdb_register_suffix (struct gdbarch *gdbarch, | |
4556 | const char * stap_gdb_register_suffix) | |
4557 | { | |
4558 | gdbarch->stap_gdb_register_suffix = stap_gdb_register_suffix; | |
4559 | } | |
4560 | ||
39535193 | 4561 | bool |
55aa24fb SDJ |
4562 | gdbarch_stap_is_single_operand_p (struct gdbarch *gdbarch) |
4563 | { | |
4564 | gdb_assert (gdbarch != NULL); | |
4565 | return gdbarch->stap_is_single_operand != NULL; | |
4566 | } | |
4567 | ||
4568 | int | |
4569 | gdbarch_stap_is_single_operand (struct gdbarch *gdbarch, const char *s) | |
4570 | { | |
4571 | gdb_assert (gdbarch != NULL); | |
4572 | gdb_assert (gdbarch->stap_is_single_operand != NULL); | |
4573 | if (gdbarch_debug >= 2) | |
4574 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_is_single_operand called\n"); | |
4575 | return gdbarch->stap_is_single_operand (gdbarch, s); | |
4576 | } | |
4577 | ||
4578 | void | |
4579 | set_gdbarch_stap_is_single_operand (struct gdbarch *gdbarch, | |
4580 | gdbarch_stap_is_single_operand_ftype stap_is_single_operand) | |
4581 | { | |
4582 | gdbarch->stap_is_single_operand = stap_is_single_operand; | |
4583 | } | |
4584 | ||
39535193 | 4585 | bool |
55aa24fb SDJ |
4586 | gdbarch_stap_parse_special_token_p (struct gdbarch *gdbarch) |
4587 | { | |
4588 | gdb_assert (gdbarch != NULL); | |
4589 | return gdbarch->stap_parse_special_token != NULL; | |
4590 | } | |
4591 | ||
4592 | int | |
4593 | gdbarch_stap_parse_special_token (struct gdbarch *gdbarch, struct stap_parse_info *p) | |
4594 | { | |
4595 | gdb_assert (gdbarch != NULL); | |
4596 | gdb_assert (gdbarch->stap_parse_special_token != NULL); | |
4597 | if (gdbarch_debug >= 2) | |
4598 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_parse_special_token called\n"); | |
4599 | return gdbarch->stap_parse_special_token (gdbarch, p); | |
4600 | } | |
4601 | ||
4602 | void | |
4603 | set_gdbarch_stap_parse_special_token (struct gdbarch *gdbarch, | |
4604 | gdbarch_stap_parse_special_token_ftype stap_parse_special_token) | |
4605 | { | |
4606 | gdbarch->stap_parse_special_token = stap_parse_special_token; | |
4607 | } | |
4608 | ||
39535193 | 4609 | bool |
7d7571f0 SDJ |
4610 | gdbarch_stap_adjust_register_p (struct gdbarch *gdbarch) |
4611 | { | |
4612 | gdb_assert (gdbarch != NULL); | |
4613 | return gdbarch->stap_adjust_register != NULL; | |
4614 | } | |
4615 | ||
6b78c3f8 AB |
4616 | std::string |
4617 | gdbarch_stap_adjust_register (struct gdbarch *gdbarch, struct stap_parse_info *p, const std::string ®name, int regnum) | |
7d7571f0 SDJ |
4618 | { |
4619 | gdb_assert (gdbarch != NULL); | |
4620 | gdb_assert (gdbarch->stap_adjust_register != NULL); | |
4621 | if (gdbarch_debug >= 2) | |
4622 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_adjust_register called\n"); | |
6b78c3f8 | 4623 | return gdbarch->stap_adjust_register (gdbarch, p, regname, regnum); |
7d7571f0 SDJ |
4624 | } |
4625 | ||
4626 | void | |
4627 | set_gdbarch_stap_adjust_register (struct gdbarch *gdbarch, | |
4628 | gdbarch_stap_adjust_register_ftype stap_adjust_register) | |
4629 | { | |
4630 | gdbarch->stap_adjust_register = stap_adjust_register; | |
4631 | } | |
4632 | ||
39535193 | 4633 | bool |
8b367e17 JM |
4634 | gdbarch_dtrace_parse_probe_argument_p (struct gdbarch *gdbarch) |
4635 | { | |
4636 | gdb_assert (gdbarch != NULL); | |
4637 | return gdbarch->dtrace_parse_probe_argument != NULL; | |
4638 | } | |
4639 | ||
4640 | void | |
37eedb39 | 4641 | gdbarch_dtrace_parse_probe_argument (struct gdbarch *gdbarch, struct expr_builder *builder, int narg) |
8b367e17 JM |
4642 | { |
4643 | gdb_assert (gdbarch != NULL); | |
4644 | gdb_assert (gdbarch->dtrace_parse_probe_argument != NULL); | |
4645 | if (gdbarch_debug >= 2) | |
4646 | fprintf_unfiltered (gdb_stdlog, "gdbarch_dtrace_parse_probe_argument called\n"); | |
37eedb39 | 4647 | gdbarch->dtrace_parse_probe_argument (gdbarch, builder, narg); |
8b367e17 JM |
4648 | } |
4649 | ||
4650 | void | |
4651 | set_gdbarch_dtrace_parse_probe_argument (struct gdbarch *gdbarch, | |
4652 | gdbarch_dtrace_parse_probe_argument_ftype dtrace_parse_probe_argument) | |
4653 | { | |
4654 | gdbarch->dtrace_parse_probe_argument = dtrace_parse_probe_argument; | |
4655 | } | |
4656 | ||
39535193 | 4657 | bool |
8b367e17 JM |
4658 | gdbarch_dtrace_probe_is_enabled_p (struct gdbarch *gdbarch) |
4659 | { | |
4660 | gdb_assert (gdbarch != NULL); | |
4661 | return gdbarch->dtrace_probe_is_enabled != NULL; | |
4662 | } | |
4663 | ||
4664 | int | |
4665 | gdbarch_dtrace_probe_is_enabled (struct gdbarch *gdbarch, CORE_ADDR addr) | |
4666 | { | |
4667 | gdb_assert (gdbarch != NULL); | |
4668 | gdb_assert (gdbarch->dtrace_probe_is_enabled != NULL); | |
4669 | if (gdbarch_debug >= 2) | |
4670 | fprintf_unfiltered (gdb_stdlog, "gdbarch_dtrace_probe_is_enabled called\n"); | |
4671 | return gdbarch->dtrace_probe_is_enabled (gdbarch, addr); | |
4672 | } | |
4673 | ||
4674 | void | |
4675 | set_gdbarch_dtrace_probe_is_enabled (struct gdbarch *gdbarch, | |
4676 | gdbarch_dtrace_probe_is_enabled_ftype dtrace_probe_is_enabled) | |
4677 | { | |
4678 | gdbarch->dtrace_probe_is_enabled = dtrace_probe_is_enabled; | |
4679 | } | |
4680 | ||
39535193 | 4681 | bool |
8b367e17 JM |
4682 | gdbarch_dtrace_enable_probe_p (struct gdbarch *gdbarch) |
4683 | { | |
4684 | gdb_assert (gdbarch != NULL); | |
4685 | return gdbarch->dtrace_enable_probe != NULL; | |
4686 | } | |
4687 | ||
4688 | void | |
4689 | gdbarch_dtrace_enable_probe (struct gdbarch *gdbarch, CORE_ADDR addr) | |
4690 | { | |
4691 | gdb_assert (gdbarch != NULL); | |
4692 | gdb_assert (gdbarch->dtrace_enable_probe != NULL); | |
4693 | if (gdbarch_debug >= 2) | |
4694 | fprintf_unfiltered (gdb_stdlog, "gdbarch_dtrace_enable_probe called\n"); | |
4695 | gdbarch->dtrace_enable_probe (gdbarch, addr); | |
4696 | } | |
4697 | ||
4698 | void | |
4699 | set_gdbarch_dtrace_enable_probe (struct gdbarch *gdbarch, | |
4700 | gdbarch_dtrace_enable_probe_ftype dtrace_enable_probe) | |
4701 | { | |
4702 | gdbarch->dtrace_enable_probe = dtrace_enable_probe; | |
4703 | } | |
4704 | ||
39535193 | 4705 | bool |
8b367e17 JM |
4706 | gdbarch_dtrace_disable_probe_p (struct gdbarch *gdbarch) |
4707 | { | |
4708 | gdb_assert (gdbarch != NULL); | |
4709 | return gdbarch->dtrace_disable_probe != NULL; | |
4710 | } | |
4711 | ||
4712 | void | |
4713 | gdbarch_dtrace_disable_probe (struct gdbarch *gdbarch, CORE_ADDR addr) | |
4714 | { | |
4715 | gdb_assert (gdbarch != NULL); | |
4716 | gdb_assert (gdbarch->dtrace_disable_probe != NULL); | |
4717 | if (gdbarch_debug >= 2) | |
4718 | fprintf_unfiltered (gdb_stdlog, "gdbarch_dtrace_disable_probe called\n"); | |
4719 | gdbarch->dtrace_disable_probe (gdbarch, addr); | |
4720 | } | |
4721 | ||
4722 | void | |
4723 | set_gdbarch_dtrace_disable_probe (struct gdbarch *gdbarch, | |
4724 | gdbarch_dtrace_disable_probe_ftype dtrace_disable_probe) | |
4725 | { | |
4726 | gdbarch->dtrace_disable_probe = dtrace_disable_probe; | |
4727 | } | |
4728 | ||
50c71eaf PA |
4729 | int |
4730 | gdbarch_has_global_solist (struct gdbarch *gdbarch) | |
4731 | { | |
4732 | gdb_assert (gdbarch != NULL); | |
4733 | /* Skip verify of has_global_solist, invalid_p == 0 */ | |
4734 | if (gdbarch_debug >= 2) | |
4735 | fprintf_unfiltered (gdb_stdlog, "gdbarch_has_global_solist called\n"); | |
4736 | return gdbarch->has_global_solist; | |
4737 | } | |
4738 | ||
4739 | void | |
4740 | set_gdbarch_has_global_solist (struct gdbarch *gdbarch, | |
4741 | int has_global_solist) | |
4742 | { | |
4743 | gdbarch->has_global_solist = has_global_solist; | |
4744 | } | |
4745 | ||
2567c7d9 PA |
4746 | int |
4747 | gdbarch_has_global_breakpoints (struct gdbarch *gdbarch) | |
4748 | { | |
4749 | gdb_assert (gdbarch != NULL); | |
4750 | /* Skip verify of has_global_breakpoints, invalid_p == 0 */ | |
4751 | if (gdbarch_debug >= 2) | |
4752 | fprintf_unfiltered (gdb_stdlog, "gdbarch_has_global_breakpoints called\n"); | |
4753 | return gdbarch->has_global_breakpoints; | |
4754 | } | |
4755 | ||
4756 | void | |
4757 | set_gdbarch_has_global_breakpoints (struct gdbarch *gdbarch, | |
4758 | int has_global_breakpoints) | |
4759 | { | |
4760 | gdbarch->has_global_breakpoints = has_global_breakpoints; | |
4761 | } | |
4762 | ||
6c95b8df PA |
4763 | int |
4764 | gdbarch_has_shared_address_space (struct gdbarch *gdbarch) | |
4765 | { | |
4766 | gdb_assert (gdbarch != NULL); | |
4767 | gdb_assert (gdbarch->has_shared_address_space != NULL); | |
4768 | if (gdbarch_debug >= 2) | |
4769 | fprintf_unfiltered (gdb_stdlog, "gdbarch_has_shared_address_space called\n"); | |
4770 | return gdbarch->has_shared_address_space (gdbarch); | |
4771 | } | |
4772 | ||
4773 | void | |
4774 | set_gdbarch_has_shared_address_space (struct gdbarch *gdbarch, | |
4775 | gdbarch_has_shared_address_space_ftype has_shared_address_space) | |
4776 | { | |
4777 | gdbarch->has_shared_address_space = has_shared_address_space; | |
4778 | } | |
4779 | ||
7a697b8d | 4780 | int |
281d762b | 4781 | gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch, CORE_ADDR addr, std::string *msg) |
7a697b8d SS |
4782 | { |
4783 | gdb_assert (gdbarch != NULL); | |
4784 | gdb_assert (gdbarch->fast_tracepoint_valid_at != NULL); | |
4785 | if (gdbarch_debug >= 2) | |
4786 | fprintf_unfiltered (gdb_stdlog, "gdbarch_fast_tracepoint_valid_at called\n"); | |
6b940e6a | 4787 | return gdbarch->fast_tracepoint_valid_at (gdbarch, addr, msg); |
7a697b8d SS |
4788 | } |
4789 | ||
4790 | void | |
4791 | set_gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch, | |
4792 | gdbarch_fast_tracepoint_valid_at_ftype fast_tracepoint_valid_at) | |
4793 | { | |
4794 | gdbarch->fast_tracepoint_valid_at = fast_tracepoint_valid_at; | |
4795 | } | |
4796 | ||
5f034a78 MK |
4797 | void |
4798 | gdbarch_guess_tracepoint_registers (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR addr) | |
4799 | { | |
4800 | gdb_assert (gdbarch != NULL); | |
4801 | gdb_assert (gdbarch->guess_tracepoint_registers != NULL); | |
4802 | if (gdbarch_debug >= 2) | |
4803 | fprintf_unfiltered (gdb_stdlog, "gdbarch_guess_tracepoint_registers called\n"); | |
4804 | gdbarch->guess_tracepoint_registers (gdbarch, regcache, addr); | |
4805 | } | |
4806 | ||
4807 | void | |
4808 | set_gdbarch_guess_tracepoint_registers (struct gdbarch *gdbarch, | |
4809 | gdbarch_guess_tracepoint_registers_ftype guess_tracepoint_registers) | |
4810 | { | |
4811 | gdbarch->guess_tracepoint_registers = guess_tracepoint_registers; | |
4812 | } | |
4813 | ||
f870a310 TT |
4814 | const char * |
4815 | gdbarch_auto_charset (struct gdbarch *gdbarch) | |
4816 | { | |
4817 | gdb_assert (gdbarch != NULL); | |
4818 | gdb_assert (gdbarch->auto_charset != NULL); | |
4819 | if (gdbarch_debug >= 2) | |
4820 | fprintf_unfiltered (gdb_stdlog, "gdbarch_auto_charset called\n"); | |
4821 | return gdbarch->auto_charset (); | |
4822 | } | |
4823 | ||
4824 | void | |
4825 | set_gdbarch_auto_charset (struct gdbarch *gdbarch, | |
4826 | gdbarch_auto_charset_ftype auto_charset) | |
4827 | { | |
4828 | gdbarch->auto_charset = auto_charset; | |
4829 | } | |
4830 | ||
4831 | const char * | |
4832 | gdbarch_auto_wide_charset (struct gdbarch *gdbarch) | |
4833 | { | |
4834 | gdb_assert (gdbarch != NULL); | |
4835 | gdb_assert (gdbarch->auto_wide_charset != NULL); | |
4836 | if (gdbarch_debug >= 2) | |
4837 | fprintf_unfiltered (gdb_stdlog, "gdbarch_auto_wide_charset called\n"); | |
4838 | return gdbarch->auto_wide_charset (); | |
4839 | } | |
4840 | ||
4841 | void | |
4842 | set_gdbarch_auto_wide_charset (struct gdbarch *gdbarch, | |
4843 | gdbarch_auto_wide_charset_ftype auto_wide_charset) | |
4844 | { | |
4845 | gdbarch->auto_wide_charset = auto_wide_charset; | |
4846 | } | |
4847 | ||
08105857 PA |
4848 | const char * |
4849 | gdbarch_solib_symbols_extension (struct gdbarch *gdbarch) | |
4850 | { | |
4851 | gdb_assert (gdbarch != NULL); | |
4852 | if (gdbarch_debug >= 2) | |
4853 | fprintf_unfiltered (gdb_stdlog, "gdbarch_solib_symbols_extension called\n"); | |
4854 | return gdbarch->solib_symbols_extension; | |
4855 | } | |
4856 | ||
4857 | void | |
4858 | set_gdbarch_solib_symbols_extension (struct gdbarch *gdbarch, | |
4859 | const char * solib_symbols_extension) | |
4860 | { | |
4861 | gdbarch->solib_symbols_extension = solib_symbols_extension; | |
4862 | } | |
4863 | ||
ab38a727 PA |
4864 | int |
4865 | gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch) | |
4866 | { | |
4867 | gdb_assert (gdbarch != NULL); | |
4868 | /* Skip verify of has_dos_based_file_system, invalid_p == 0 */ | |
4869 | if (gdbarch_debug >= 2) | |
4870 | fprintf_unfiltered (gdb_stdlog, "gdbarch_has_dos_based_file_system called\n"); | |
4871 | return gdbarch->has_dos_based_file_system; | |
4872 | } | |
4873 | ||
4874 | void | |
4875 | set_gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch, | |
4876 | int has_dos_based_file_system) | |
4877 | { | |
4878 | gdbarch->has_dos_based_file_system = has_dos_based_file_system; | |
4879 | } | |
4880 | ||
6710bf39 SS |
4881 | void |
4882 | gdbarch_gen_return_address (struct gdbarch *gdbarch, struct agent_expr *ax, struct axs_value *value, CORE_ADDR scope) | |
4883 | { | |
4884 | gdb_assert (gdbarch != NULL); | |
4885 | gdb_assert (gdbarch->gen_return_address != NULL); | |
4886 | if (gdbarch_debug >= 2) | |
4887 | fprintf_unfiltered (gdb_stdlog, "gdbarch_gen_return_address called\n"); | |
4888 | gdbarch->gen_return_address (gdbarch, ax, value, scope); | |
4889 | } | |
4890 | ||
4891 | void | |
4892 | set_gdbarch_gen_return_address (struct gdbarch *gdbarch, | |
4893 | gdbarch_gen_return_address_ftype gen_return_address) | |
4894 | { | |
4895 | gdbarch->gen_return_address = gen_return_address; | |
4896 | } | |
4897 | ||
39535193 | 4898 | bool |
3030c96e UW |
4899 | gdbarch_info_proc_p (struct gdbarch *gdbarch) |
4900 | { | |
4901 | gdb_assert (gdbarch != NULL); | |
4902 | return gdbarch->info_proc != NULL; | |
4903 | } | |
4904 | ||
4905 | void | |
7bc112c1 | 4906 | gdbarch_info_proc (struct gdbarch *gdbarch, const char *args, enum info_proc_what what) |
3030c96e UW |
4907 | { |
4908 | gdb_assert (gdbarch != NULL); | |
4909 | gdb_assert (gdbarch->info_proc != NULL); | |
4910 | if (gdbarch_debug >= 2) | |
4911 | fprintf_unfiltered (gdb_stdlog, "gdbarch_info_proc called\n"); | |
4912 | gdbarch->info_proc (gdbarch, args, what); | |
4913 | } | |
4914 | ||
4915 | void | |
4916 | set_gdbarch_info_proc (struct gdbarch *gdbarch, | |
4917 | gdbarch_info_proc_ftype info_proc) | |
4918 | { | |
4919 | gdbarch->info_proc = info_proc; | |
4920 | } | |
4921 | ||
39535193 | 4922 | bool |
451b7c33 TT |
4923 | gdbarch_core_info_proc_p (struct gdbarch *gdbarch) |
4924 | { | |
4925 | gdb_assert (gdbarch != NULL); | |
4926 | return gdbarch->core_info_proc != NULL; | |
4927 | } | |
4928 | ||
4929 | void | |
7bc112c1 | 4930 | gdbarch_core_info_proc (struct gdbarch *gdbarch, const char *args, enum info_proc_what what) |
451b7c33 TT |
4931 | { |
4932 | gdb_assert (gdbarch != NULL); | |
4933 | gdb_assert (gdbarch->core_info_proc != NULL); | |
4934 | if (gdbarch_debug >= 2) | |
4935 | fprintf_unfiltered (gdb_stdlog, "gdbarch_core_info_proc called\n"); | |
4936 | gdbarch->core_info_proc (gdbarch, args, what); | |
4937 | } | |
4938 | ||
4939 | void | |
4940 | set_gdbarch_core_info_proc (struct gdbarch *gdbarch, | |
4941 | gdbarch_core_info_proc_ftype core_info_proc) | |
4942 | { | |
4943 | gdbarch->core_info_proc = core_info_proc; | |
4944 | } | |
4945 | ||
19630284 JB |
4946 | void |
4947 | 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) | |
4948 | { | |
4949 | gdb_assert (gdbarch != NULL); | |
4950 | gdb_assert (gdbarch->iterate_over_objfiles_in_search_order != NULL); | |
4951 | if (gdbarch_debug >= 2) | |
4952 | fprintf_unfiltered (gdb_stdlog, "gdbarch_iterate_over_objfiles_in_search_order called\n"); | |
4953 | gdbarch->iterate_over_objfiles_in_search_order (gdbarch, cb, cb_data, current_objfile); | |
4954 | } | |
4955 | ||
4956 | void | |
4957 | set_gdbarch_iterate_over_objfiles_in_search_order (struct gdbarch *gdbarch, | |
4958 | gdbarch_iterate_over_objfiles_in_search_order_ftype iterate_over_objfiles_in_search_order) | |
4959 | { | |
4960 | gdbarch->iterate_over_objfiles_in_search_order = iterate_over_objfiles_in_search_order; | |
4961 | } | |
4962 | ||
7e35103a JB |
4963 | struct ravenscar_arch_ops * |
4964 | gdbarch_ravenscar_ops (struct gdbarch *gdbarch) | |
4965 | { | |
4966 | gdb_assert (gdbarch != NULL); | |
4967 | /* Skip verify of ravenscar_ops, invalid_p == 0 */ | |
4968 | if (gdbarch_debug >= 2) | |
4969 | fprintf_unfiltered (gdb_stdlog, "gdbarch_ravenscar_ops called\n"); | |
4970 | return gdbarch->ravenscar_ops; | |
4971 | } | |
4972 | ||
4973 | void | |
4974 | set_gdbarch_ravenscar_ops (struct gdbarch *gdbarch, | |
4975 | struct ravenscar_arch_ops * ravenscar_ops) | |
4976 | { | |
4977 | gdbarch->ravenscar_ops = ravenscar_ops; | |
4978 | } | |
4979 | ||
c2170eef MM |
4980 | int |
4981 | gdbarch_insn_is_call (struct gdbarch *gdbarch, CORE_ADDR addr) | |
4982 | { | |
4983 | gdb_assert (gdbarch != NULL); | |
4984 | gdb_assert (gdbarch->insn_is_call != NULL); | |
4985 | if (gdbarch_debug >= 2) | |
4986 | fprintf_unfiltered (gdb_stdlog, "gdbarch_insn_is_call called\n"); | |
4987 | return gdbarch->insn_is_call (gdbarch, addr); | |
4988 | } | |
4989 | ||
4990 | void | |
4991 | set_gdbarch_insn_is_call (struct gdbarch *gdbarch, | |
4992 | gdbarch_insn_is_call_ftype insn_is_call) | |
4993 | { | |
4994 | gdbarch->insn_is_call = insn_is_call; | |
4995 | } | |
4996 | ||
4997 | int | |
4998 | gdbarch_insn_is_ret (struct gdbarch *gdbarch, CORE_ADDR addr) | |
4999 | { | |
5000 | gdb_assert (gdbarch != NULL); | |
5001 | gdb_assert (gdbarch->insn_is_ret != NULL); | |
5002 | if (gdbarch_debug >= 2) | |
5003 | fprintf_unfiltered (gdb_stdlog, "gdbarch_insn_is_ret called\n"); | |
5004 | return gdbarch->insn_is_ret (gdbarch, addr); | |
5005 | } | |
5006 | ||
5007 | void | |
5008 | set_gdbarch_insn_is_ret (struct gdbarch *gdbarch, | |
5009 | gdbarch_insn_is_ret_ftype insn_is_ret) | |
5010 | { | |
5011 | gdbarch->insn_is_ret = insn_is_ret; | |
5012 | } | |
5013 | ||
5014 | int | |
5015 | gdbarch_insn_is_jump (struct gdbarch *gdbarch, CORE_ADDR addr) | |
5016 | { | |
5017 | gdb_assert (gdbarch != NULL); | |
5018 | gdb_assert (gdbarch->insn_is_jump != NULL); | |
5019 | if (gdbarch_debug >= 2) | |
5020 | fprintf_unfiltered (gdb_stdlog, "gdbarch_insn_is_jump called\n"); | |
5021 | return gdbarch->insn_is_jump (gdbarch, addr); | |
5022 | } | |
5023 | ||
5024 | void | |
5025 | set_gdbarch_insn_is_jump (struct gdbarch *gdbarch, | |
5026 | gdbarch_insn_is_jump_ftype insn_is_jump) | |
5027 | { | |
5028 | gdbarch->insn_is_jump = insn_is_jump; | |
5029 | } | |
5030 | ||
5133a315 LM |
5031 | bool |
5032 | gdbarch_program_breakpoint_here_p (struct gdbarch *gdbarch, CORE_ADDR address) | |
5033 | { | |
5034 | gdb_assert (gdbarch != NULL); | |
5035 | gdb_assert (gdbarch->program_breakpoint_here_p != NULL); | |
5036 | if (gdbarch_debug >= 2) | |
5037 | fprintf_unfiltered (gdb_stdlog, "gdbarch_program_breakpoint_here_p called\n"); | |
5038 | return gdbarch->program_breakpoint_here_p (gdbarch, address); | |
5039 | } | |
5040 | ||
5041 | void | |
5042 | set_gdbarch_program_breakpoint_here_p (struct gdbarch *gdbarch, | |
5043 | gdbarch_program_breakpoint_here_p_ftype program_breakpoint_here_p) | |
5044 | { | |
5045 | gdbarch->program_breakpoint_here_p = program_breakpoint_here_p; | |
5046 | } | |
5047 | ||
39535193 | 5048 | bool |
27a48a92 MK |
5049 | gdbarch_auxv_parse_p (struct gdbarch *gdbarch) |
5050 | { | |
5051 | gdb_assert (gdbarch != NULL); | |
5052 | return gdbarch->auxv_parse != NULL; | |
5053 | } | |
5054 | ||
5055 | int | |
5056 | gdbarch_auxv_parse (struct gdbarch *gdbarch, gdb_byte **readptr, gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp) | |
5057 | { | |
5058 | gdb_assert (gdbarch != NULL); | |
5059 | gdb_assert (gdbarch->auxv_parse != NULL); | |
5060 | if (gdbarch_debug >= 2) | |
5061 | fprintf_unfiltered (gdb_stdlog, "gdbarch_auxv_parse called\n"); | |
5062 | return gdbarch->auxv_parse (gdbarch, readptr, endptr, typep, valp); | |
5063 | } | |
5064 | ||
5065 | void | |
5066 | set_gdbarch_auxv_parse (struct gdbarch *gdbarch, | |
5067 | gdbarch_auxv_parse_ftype auxv_parse) | |
5068 | { | |
5069 | gdbarch->auxv_parse = auxv_parse; | |
5070 | } | |
5071 | ||
2faa3447 JB |
5072 | void |
5073 | gdbarch_print_auxv_entry (struct gdbarch *gdbarch, struct ui_file *file, CORE_ADDR type, CORE_ADDR val) | |
5074 | { | |
5075 | gdb_assert (gdbarch != NULL); | |
5076 | gdb_assert (gdbarch->print_auxv_entry != NULL); | |
5077 | if (gdbarch_debug >= 2) | |
5078 | fprintf_unfiltered (gdb_stdlog, "gdbarch_print_auxv_entry called\n"); | |
5079 | gdbarch->print_auxv_entry (gdbarch, file, type, val); | |
5080 | } | |
5081 | ||
5082 | void | |
5083 | set_gdbarch_print_auxv_entry (struct gdbarch *gdbarch, | |
5084 | gdbarch_print_auxv_entry_ftype print_auxv_entry) | |
5085 | { | |
5086 | gdbarch->print_auxv_entry = print_auxv_entry; | |
5087 | } | |
5088 | ||
3437254d PA |
5089 | int |
5090 | gdbarch_vsyscall_range (struct gdbarch *gdbarch, struct mem_range *range) | |
5091 | { | |
5092 | gdb_assert (gdbarch != NULL); | |
5093 | gdb_assert (gdbarch->vsyscall_range != NULL); | |
5094 | if (gdbarch_debug >= 2) | |
5095 | fprintf_unfiltered (gdb_stdlog, "gdbarch_vsyscall_range called\n"); | |
5096 | return gdbarch->vsyscall_range (gdbarch, range); | |
5097 | } | |
5098 | ||
5099 | void | |
5100 | set_gdbarch_vsyscall_range (struct gdbarch *gdbarch, | |
5101 | gdbarch_vsyscall_range_ftype vsyscall_range) | |
5102 | { | |
5103 | gdbarch->vsyscall_range = vsyscall_range; | |
5104 | } | |
5105 | ||
f208eee0 JK |
5106 | CORE_ADDR |
5107 | gdbarch_infcall_mmap (struct gdbarch *gdbarch, CORE_ADDR size, unsigned prot) | |
5108 | { | |
5109 | gdb_assert (gdbarch != NULL); | |
5110 | gdb_assert (gdbarch->infcall_mmap != NULL); | |
5111 | if (gdbarch_debug >= 2) | |
5112 | fprintf_unfiltered (gdb_stdlog, "gdbarch_infcall_mmap called\n"); | |
5113 | return gdbarch->infcall_mmap (size, prot); | |
5114 | } | |
5115 | ||
5116 | void | |
5117 | set_gdbarch_infcall_mmap (struct gdbarch *gdbarch, | |
5118 | gdbarch_infcall_mmap_ftype infcall_mmap) | |
5119 | { | |
5120 | gdbarch->infcall_mmap = infcall_mmap; | |
5121 | } | |
5122 | ||
7f361056 JK |
5123 | void |
5124 | gdbarch_infcall_munmap (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR size) | |
5125 | { | |
5126 | gdb_assert (gdbarch != NULL); | |
5127 | gdb_assert (gdbarch->infcall_munmap != NULL); | |
5128 | if (gdbarch_debug >= 2) | |
5129 | fprintf_unfiltered (gdb_stdlog, "gdbarch_infcall_munmap called\n"); | |
5130 | gdbarch->infcall_munmap (addr, size); | |
5131 | } | |
5132 | ||
5133 | void | |
5134 | set_gdbarch_infcall_munmap (struct gdbarch *gdbarch, | |
5135 | gdbarch_infcall_munmap_ftype infcall_munmap) | |
5136 | { | |
5137 | gdbarch->infcall_munmap = infcall_munmap; | |
5138 | } | |
5139 | ||
953cff56 | 5140 | std::string |
f208eee0 JK |
5141 | gdbarch_gcc_target_options (struct gdbarch *gdbarch) |
5142 | { | |
5143 | gdb_assert (gdbarch != NULL); | |
5144 | gdb_assert (gdbarch->gcc_target_options != NULL); | |
5145 | if (gdbarch_debug >= 2) | |
5146 | fprintf_unfiltered (gdb_stdlog, "gdbarch_gcc_target_options called\n"); | |
5147 | return gdbarch->gcc_target_options (gdbarch); | |
5148 | } | |
5149 | ||
5150 | void | |
5151 | set_gdbarch_gcc_target_options (struct gdbarch *gdbarch, | |
5152 | gdbarch_gcc_target_options_ftype gcc_target_options) | |
5153 | { | |
5154 | gdbarch->gcc_target_options = gcc_target_options; | |
5155 | } | |
5156 | ||
ac04f72b TT |
5157 | const char * |
5158 | gdbarch_gnu_triplet_regexp (struct gdbarch *gdbarch) | |
5159 | { | |
5160 | gdb_assert (gdbarch != NULL); | |
5161 | gdb_assert (gdbarch->gnu_triplet_regexp != NULL); | |
5162 | if (gdbarch_debug >= 2) | |
5163 | fprintf_unfiltered (gdb_stdlog, "gdbarch_gnu_triplet_regexp called\n"); | |
5164 | return gdbarch->gnu_triplet_regexp (gdbarch); | |
5165 | } | |
5166 | ||
5167 | void | |
5168 | set_gdbarch_gnu_triplet_regexp (struct gdbarch *gdbarch, | |
5169 | gdbarch_gnu_triplet_regexp_ftype gnu_triplet_regexp) | |
5170 | { | |
5171 | gdbarch->gnu_triplet_regexp = gnu_triplet_regexp; | |
5172 | } | |
5173 | ||
3374165f SM |
5174 | int |
5175 | gdbarch_addressable_memory_unit_size (struct gdbarch *gdbarch) | |
5176 | { | |
5177 | gdb_assert (gdbarch != NULL); | |
5178 | gdb_assert (gdbarch->addressable_memory_unit_size != NULL); | |
5179 | if (gdbarch_debug >= 2) | |
5180 | fprintf_unfiltered (gdb_stdlog, "gdbarch_addressable_memory_unit_size called\n"); | |
5181 | return gdbarch->addressable_memory_unit_size (gdbarch); | |
5182 | } | |
5183 | ||
5184 | void | |
5185 | set_gdbarch_addressable_memory_unit_size (struct gdbarch *gdbarch, | |
5186 | gdbarch_addressable_memory_unit_size_ftype addressable_memory_unit_size) | |
5187 | { | |
5188 | gdbarch->addressable_memory_unit_size = addressable_memory_unit_size; | |
5189 | } | |
5190 | ||
471b9d15 MR |
5191 | const char * |
5192 | gdbarch_disassembler_options_implicit (struct gdbarch *gdbarch) | |
5193 | { | |
5194 | gdb_assert (gdbarch != NULL); | |
5195 | /* Skip verify of disassembler_options_implicit, invalid_p == 0 */ | |
5196 | if (gdbarch_debug >= 2) | |
5197 | fprintf_unfiltered (gdb_stdlog, "gdbarch_disassembler_options_implicit called\n"); | |
5198 | return gdbarch->disassembler_options_implicit; | |
5199 | } | |
5200 | ||
5201 | void | |
5202 | set_gdbarch_disassembler_options_implicit (struct gdbarch *gdbarch, | |
5203 | const char * disassembler_options_implicit) | |
5204 | { | |
5205 | gdbarch->disassembler_options_implicit = disassembler_options_implicit; | |
5206 | } | |
5207 | ||
65b48a81 PB |
5208 | char ** |
5209 | gdbarch_disassembler_options (struct gdbarch *gdbarch) | |
5210 | { | |
5211 | gdb_assert (gdbarch != NULL); | |
5212 | /* Skip verify of disassembler_options, invalid_p == 0 */ | |
5213 | if (gdbarch_debug >= 2) | |
5214 | fprintf_unfiltered (gdb_stdlog, "gdbarch_disassembler_options called\n"); | |
5215 | return gdbarch->disassembler_options; | |
5216 | } | |
5217 | ||
5218 | void | |
5219 | set_gdbarch_disassembler_options (struct gdbarch *gdbarch, | |
5220 | char ** disassembler_options) | |
5221 | { | |
5222 | gdbarch->disassembler_options = disassembler_options; | |
5223 | } | |
5224 | ||
471b9d15 | 5225 | const disasm_options_and_args_t * |
65b48a81 PB |
5226 | gdbarch_valid_disassembler_options (struct gdbarch *gdbarch) |
5227 | { | |
5228 | gdb_assert (gdbarch != NULL); | |
5229 | /* Skip verify of valid_disassembler_options, invalid_p == 0 */ | |
5230 | if (gdbarch_debug >= 2) | |
5231 | fprintf_unfiltered (gdb_stdlog, "gdbarch_valid_disassembler_options called\n"); | |
5232 | return gdbarch->valid_disassembler_options; | |
5233 | } | |
5234 | ||
5235 | void | |
5236 | set_gdbarch_valid_disassembler_options (struct gdbarch *gdbarch, | |
471b9d15 | 5237 | const disasm_options_and_args_t * valid_disassembler_options) |
65b48a81 PB |
5238 | { |
5239 | gdbarch->valid_disassembler_options = valid_disassembler_options; | |
5240 | } | |
5241 | ||
2b4424c3 TT |
5242 | ULONGEST |
5243 | gdbarch_type_align (struct gdbarch *gdbarch, struct type *type) | |
5244 | { | |
5245 | gdb_assert (gdbarch != NULL); | |
5246 | gdb_assert (gdbarch->type_align != NULL); | |
5247 | if (gdbarch_debug >= 2) | |
5248 | fprintf_unfiltered (gdb_stdlog, "gdbarch_type_align called\n"); | |
5249 | return gdbarch->type_align (gdbarch, type); | |
5250 | } | |
5251 | ||
5252 | void | |
5253 | set_gdbarch_type_align (struct gdbarch *gdbarch, | |
5254 | gdbarch_type_align_ftype type_align) | |
5255 | { | |
5256 | gdbarch->type_align = type_align; | |
5257 | } | |
5258 | ||
aa7ca1bb AH |
5259 | std::string |
5260 | gdbarch_get_pc_address_flags (struct gdbarch *gdbarch, frame_info *frame, CORE_ADDR pc) | |
5261 | { | |
5262 | gdb_assert (gdbarch != NULL); | |
5263 | gdb_assert (gdbarch->get_pc_address_flags != NULL); | |
5264 | if (gdbarch_debug >= 2) | |
5265 | fprintf_unfiltered (gdb_stdlog, "gdbarch_get_pc_address_flags called\n"); | |
5266 | return gdbarch->get_pc_address_flags (frame, pc); | |
5267 | } | |
5268 | ||
5269 | void | |
5270 | set_gdbarch_get_pc_address_flags (struct gdbarch *gdbarch, | |
5271 | gdbarch_get_pc_address_flags_ftype get_pc_address_flags) | |
5272 | { | |
5273 | gdbarch->get_pc_address_flags = get_pc_address_flags; | |
5274 | } | |
5275 | ||
7e183d27 | 5276 | void |
70125a45 | 5277 | gdbarch_read_core_file_mappings (struct gdbarch *gdbarch, struct bfd *cbfd, gdb::function_view<void (ULONGEST count)> pre_loop_cb, gdb::function_view<void (int num, ULONGEST start, ULONGEST end, ULONGEST file_ofs, const char *filename)> loop_cb) |
7e183d27 KB |
5278 | { |
5279 | gdb_assert (gdbarch != NULL); | |
5280 | gdb_assert (gdbarch->read_core_file_mappings != NULL); | |
5281 | if (gdbarch_debug >= 2) | |
5282 | fprintf_unfiltered (gdb_stdlog, "gdbarch_read_core_file_mappings called\n"); | |
5283 | gdbarch->read_core_file_mappings (gdbarch, cbfd, pre_loop_cb, loop_cb); | |
5284 | } | |
5285 | ||
5286 | void | |
5287 | set_gdbarch_read_core_file_mappings (struct gdbarch *gdbarch, | |
5288 | gdbarch_read_core_file_mappings_ftype read_core_file_mappings) | |
5289 | { | |
5290 | gdbarch->read_core_file_mappings = read_core_file_mappings; | |
5291 | } | |
5292 | ||
0f71a2f6 | 5293 | |
be5a57e1 | 5294 | /* Keep a registry of per-architecture data-pointers required by GDB |
0963b4bd | 5295 | modules. */ |
0f71a2f6 JM |
5296 | |
5297 | struct gdbarch_data | |
5298 | { | |
95160752 | 5299 | unsigned index; |
76860b5f | 5300 | int init_p; |
030f20e1 AC |
5301 | gdbarch_data_pre_init_ftype *pre_init; |
5302 | gdbarch_data_post_init_ftype *post_init; | |
0f71a2f6 JM |
5303 | }; |
5304 | ||
5305 | struct gdbarch_data_registration | |
adf40b2e | 5306 | { |
adf40b2e JM |
5307 | struct gdbarch_data *data; |
5308 | struct gdbarch_data_registration *next; | |
5309 | }; | |
0f71a2f6 | 5310 | |
be5a57e1 | 5311 | struct gdbarch_data_registry |
adf40b2e | 5312 | { |
95160752 | 5313 | unsigned nr; |
adf40b2e JM |
5314 | struct gdbarch_data_registration *registrations; |
5315 | }; | |
0f71a2f6 | 5316 | |
6bd434d6 | 5317 | static struct gdbarch_data_registry gdbarch_data_registry = |
0f71a2f6 JM |
5318 | { |
5319 | 0, NULL, | |
5320 | }; | |
5321 | ||
030f20e1 AC |
5322 | static struct gdbarch_data * |
5323 | gdbarch_data_register (gdbarch_data_pre_init_ftype *pre_init, | |
5324 | gdbarch_data_post_init_ftype *post_init) | |
0f71a2f6 JM |
5325 | { |
5326 | struct gdbarch_data_registration **curr; | |
05c547f6 MS |
5327 | |
5328 | /* Append the new registration. */ | |
be5a57e1 | 5329 | for (curr = &gdbarch_data_registry.registrations; |
0f71a2f6 JM |
5330 | (*curr) != NULL; |
5331 | curr = &(*curr)->next); | |
70ba0933 | 5332 | (*curr) = XNEW (struct gdbarch_data_registration); |
0f71a2f6 | 5333 | (*curr)->next = NULL; |
70ba0933 | 5334 | (*curr)->data = XNEW (struct gdbarch_data); |
be5a57e1 | 5335 | (*curr)->data->index = gdbarch_data_registry.nr++; |
030f20e1 AC |
5336 | (*curr)->data->pre_init = pre_init; |
5337 | (*curr)->data->post_init = post_init; | |
76860b5f | 5338 | (*curr)->data->init_p = 1; |
0f71a2f6 JM |
5339 | return (*curr)->data; |
5340 | } | |
5341 | ||
030f20e1 AC |
5342 | struct gdbarch_data * |
5343 | gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype *pre_init) | |
5344 | { | |
5345 | return gdbarch_data_register (pre_init, NULL); | |
5346 | } | |
5347 | ||
5348 | struct gdbarch_data * | |
5349 | gdbarch_data_register_post_init (gdbarch_data_post_init_ftype *post_init) | |
5350 | { | |
5351 | return gdbarch_data_register (NULL, post_init); | |
5352 | } | |
0f71a2f6 | 5353 | |
0963b4bd | 5354 | /* Create/delete the gdbarch data vector. */ |
95160752 AC |
5355 | |
5356 | static void | |
b3cc3077 | 5357 | alloc_gdbarch_data (struct gdbarch *gdbarch) |
95160752 | 5358 | { |
b3cc3077 JB |
5359 | gdb_assert (gdbarch->data == NULL); |
5360 | gdbarch->nr_data = gdbarch_data_registry.nr; | |
aebd7893 | 5361 | gdbarch->data = GDBARCH_OBSTACK_CALLOC (gdbarch, gdbarch->nr_data, void *); |
0f71a2f6 JM |
5362 | } |
5363 | ||
0f71a2f6 | 5364 | /* Return the current value of the specified per-architecture |
0963b4bd | 5365 | data-pointer. */ |
0f71a2f6 JM |
5366 | |
5367 | void * | |
451fbdda | 5368 | gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data) |
0f71a2f6 | 5369 | { |
451fbdda | 5370 | gdb_assert (data->index < gdbarch->nr_data); |
030f20e1 | 5371 | if (gdbarch->data[data->index] == NULL) |
76860b5f | 5372 | { |
030f20e1 AC |
5373 | /* The data-pointer isn't initialized, call init() to get a |
5374 | value. */ | |
5375 | if (data->pre_init != NULL) | |
5376 | /* Mid architecture creation: pass just the obstack, and not | |
5377 | the entire architecture, as that way it isn't possible for | |
5378 | pre-init code to refer to undefined architecture | |
5379 | fields. */ | |
5380 | gdbarch->data[data->index] = data->pre_init (gdbarch->obstack); | |
5381 | else if (gdbarch->initialized_p | |
5382 | && data->post_init != NULL) | |
5383 | /* Post architecture creation: pass the entire architecture | |
5384 | (as all fields are valid), but be careful to also detect | |
5385 | recursive references. */ | |
5386 | { | |
5387 | gdb_assert (data->init_p); | |
5388 | data->init_p = 0; | |
5389 | gdbarch->data[data->index] = data->post_init (gdbarch); | |
5390 | data->init_p = 1; | |
5391 | } | |
5392 | else | |
3bc98c0c AB |
5393 | internal_error (__FILE__, __LINE__, |
5394 | _("gdbarch post-init data field can only be used " | |
5395 | "after gdbarch is fully initialised")); | |
76860b5f AC |
5396 | gdb_assert (gdbarch->data[data->index] != NULL); |
5397 | } | |
451fbdda | 5398 | return gdbarch->data[data->index]; |
0f71a2f6 JM |
5399 | } |
5400 | ||
5401 | ||
0963b4bd | 5402 | /* Keep a registry of the architectures known by GDB. */ |
0f71a2f6 | 5403 | |
4b9b3959 | 5404 | struct gdbarch_registration |
0f71a2f6 JM |
5405 | { |
5406 | enum bfd_architecture bfd_architecture; | |
5407 | gdbarch_init_ftype *init; | |
4b9b3959 | 5408 | gdbarch_dump_tdep_ftype *dump_tdep; |
0f71a2f6 | 5409 | struct gdbarch_list *arches; |
4b9b3959 | 5410 | struct gdbarch_registration *next; |
0f71a2f6 JM |
5411 | }; |
5412 | ||
be5a57e1 | 5413 | static struct gdbarch_registration *gdbarch_registry = NULL; |
0f71a2f6 | 5414 | |
b4a20239 AC |
5415 | static void |
5416 | append_name (const char ***buf, int *nr, const char *name) | |
5417 | { | |
1dc7a623 | 5418 | *buf = XRESIZEVEC (const char *, *buf, *nr + 1); |
b4a20239 AC |
5419 | (*buf)[*nr] = name; |
5420 | *nr += 1; | |
5421 | } | |
5422 | ||
5423 | const char ** | |
5424 | gdbarch_printable_names (void) | |
5425 | { | |
7996bcec | 5426 | /* Accumulate a list of names based on the registed list of |
0963b4bd | 5427 | architectures. */ |
7996bcec AC |
5428 | int nr_arches = 0; |
5429 | const char **arches = NULL; | |
5430 | struct gdbarch_registration *rego; | |
05c547f6 | 5431 | |
7996bcec AC |
5432 | for (rego = gdbarch_registry; |
5433 | rego != NULL; | |
5434 | rego = rego->next) | |
b4a20239 | 5435 | { |
7996bcec AC |
5436 | const struct bfd_arch_info *ap; |
5437 | ap = bfd_lookup_arch (rego->bfd_architecture, 0); | |
5438 | if (ap == NULL) | |
dda83cd7 SM |
5439 | internal_error (__FILE__, __LINE__, |
5440 | _("gdbarch_architecture_names: multi-arch unknown")); | |
7996bcec | 5441 | do |
dda83cd7 SM |
5442 | { |
5443 | append_name (&arches, &nr_arches, ap->printable_name); | |
5444 | ap = ap->next; | |
5445 | } | |
7996bcec | 5446 | while (ap != NULL); |
b4a20239 | 5447 | } |
7996bcec AC |
5448 | append_name (&arches, &nr_arches, NULL); |
5449 | return arches; | |
b4a20239 AC |
5450 | } |
5451 | ||
5452 | ||
0f71a2f6 | 5453 | void |
4b9b3959 | 5454 | gdbarch_register (enum bfd_architecture bfd_architecture, |
dda83cd7 | 5455 | gdbarch_init_ftype *init, |
4b9b3959 | 5456 | gdbarch_dump_tdep_ftype *dump_tdep) |
0f71a2f6 | 5457 | { |
4b9b3959 | 5458 | struct gdbarch_registration **curr; |
0f71a2f6 | 5459 | const struct bfd_arch_info *bfd_arch_info; |
05c547f6 | 5460 | |
ec3d358c | 5461 | /* Check that BFD recognizes this architecture */ |
0f71a2f6 JM |
5462 | bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0); |
5463 | if (bfd_arch_info == NULL) | |
5464 | { | |
8e65ff28 | 5465 | internal_error (__FILE__, __LINE__, |
dda83cd7 | 5466 | _("gdbarch: Attempt to register " |
0963b4bd | 5467 | "unknown architecture (%d)"), |
dda83cd7 | 5468 | bfd_architecture); |
0f71a2f6 | 5469 | } |
0963b4bd | 5470 | /* Check that we haven't seen this architecture before. */ |
be5a57e1 | 5471 | for (curr = &gdbarch_registry; |
0f71a2f6 JM |
5472 | (*curr) != NULL; |
5473 | curr = &(*curr)->next) | |
5474 | { | |
5475 | if (bfd_architecture == (*curr)->bfd_architecture) | |
8e65ff28 | 5476 | internal_error (__FILE__, __LINE__, |
dda83cd7 | 5477 | _("gdbarch: Duplicate registration " |
0963b4bd | 5478 | "of architecture (%s)"), |
dda83cd7 | 5479 | bfd_arch_info->printable_name); |
0f71a2f6 JM |
5480 | } |
5481 | /* log it */ | |
5482 | if (gdbarch_debug) | |
30737ed9 | 5483 | fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, %s)\n", |
0f71a2f6 | 5484 | bfd_arch_info->printable_name, |
30737ed9 | 5485 | host_address_to_string (init)); |
0f71a2f6 | 5486 | /* Append it */ |
70ba0933 | 5487 | (*curr) = XNEW (struct gdbarch_registration); |
0f71a2f6 JM |
5488 | (*curr)->bfd_architecture = bfd_architecture; |
5489 | (*curr)->init = init; | |
4b9b3959 | 5490 | (*curr)->dump_tdep = dump_tdep; |
0f71a2f6 JM |
5491 | (*curr)->arches = NULL; |
5492 | (*curr)->next = NULL; | |
4b9b3959 AC |
5493 | } |
5494 | ||
5495 | void | |
5496 | register_gdbarch_init (enum bfd_architecture bfd_architecture, | |
5497 | gdbarch_init_ftype *init) | |
5498 | { | |
5499 | gdbarch_register (bfd_architecture, init, NULL); | |
0f71a2f6 | 5500 | } |
0f71a2f6 JM |
5501 | |
5502 | ||
424163ea | 5503 | /* Look for an architecture using gdbarch_info. */ |
0f71a2f6 JM |
5504 | |
5505 | struct gdbarch_list * | |
104c1213 | 5506 | gdbarch_list_lookup_by_info (struct gdbarch_list *arches, |
dda83cd7 | 5507 | const struct gdbarch_info *info) |
0f71a2f6 JM |
5508 | { |
5509 | for (; arches != NULL; arches = arches->next) | |
5510 | { | |
5511 | if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info) | |
5512 | continue; | |
5513 | if (info->byte_order != arches->gdbarch->byte_order) | |
5514 | continue; | |
4be87837 DJ |
5515 | if (info->osabi != arches->gdbarch->osabi) |
5516 | continue; | |
424163ea DJ |
5517 | if (info->target_desc != arches->gdbarch->target_desc) |
5518 | continue; | |
0f71a2f6 JM |
5519 | return arches; |
5520 | } | |
5521 | return NULL; | |
5522 | } | |
5523 | ||
5524 | ||
ebdba546 | 5525 | /* Find an architecture that matches the specified INFO. Create a new |
59837fe0 | 5526 | architecture if needed. Return that new architecture. */ |
0f71a2f6 | 5527 | |
59837fe0 UW |
5528 | struct gdbarch * |
5529 | gdbarch_find_by_info (struct gdbarch_info info) | |
0f71a2f6 JM |
5530 | { |
5531 | struct gdbarch *new_gdbarch; | |
4b9b3959 | 5532 | struct gdbarch_registration *rego; |
0f71a2f6 | 5533 | |
b732d07d | 5534 | /* Fill in missing parts of the INFO struct using a number of |
7a107747 DJ |
5535 | sources: "set ..."; INFOabfd supplied; and the global |
5536 | defaults. */ | |
5537 | gdbarch_info_fill (&info); | |
4be87837 | 5538 | |
0963b4bd | 5539 | /* Must have found some sort of architecture. */ |
b732d07d | 5540 | gdb_assert (info.bfd_arch_info != NULL); |
0f71a2f6 JM |
5541 | |
5542 | if (gdbarch_debug) | |
5543 | { | |
0f71a2f6 | 5544 | fprintf_unfiltered (gdb_stdlog, |
59837fe0 | 5545 | "gdbarch_find_by_info: info.bfd_arch_info %s\n", |
0f71a2f6 JM |
5546 | (info.bfd_arch_info != NULL |
5547 | ? info.bfd_arch_info->printable_name | |
5548 | : "(null)")); | |
5549 | fprintf_unfiltered (gdb_stdlog, | |
59837fe0 | 5550 | "gdbarch_find_by_info: info.byte_order %d (%s)\n", |
0f71a2f6 | 5551 | info.byte_order, |
d7449b42 | 5552 | (info.byte_order == BFD_ENDIAN_BIG ? "big" |
778eb05e | 5553 | : info.byte_order == BFD_ENDIAN_LITTLE ? "little" |
0f71a2f6 | 5554 | : "default")); |
4be87837 | 5555 | fprintf_unfiltered (gdb_stdlog, |
59837fe0 | 5556 | "gdbarch_find_by_info: info.osabi %d (%s)\n", |
4be87837 | 5557 | info.osabi, gdbarch_osabi_name (info.osabi)); |
0f71a2f6 | 5558 | fprintf_unfiltered (gdb_stdlog, |
59837fe0 | 5559 | "gdbarch_find_by_info: info.abfd %s\n", |
30737ed9 | 5560 | host_address_to_string (info.abfd)); |
0f71a2f6 | 5561 | fprintf_unfiltered (gdb_stdlog, |
59837fe0 | 5562 | "gdbarch_find_by_info: info.tdep_info %s\n", |
30737ed9 | 5563 | host_address_to_string (info.tdep_info)); |
0f71a2f6 JM |
5564 | } |
5565 | ||
ebdba546 | 5566 | /* Find the tdep code that knows about this architecture. */ |
b732d07d AC |
5567 | for (rego = gdbarch_registry; |
5568 | rego != NULL; | |
5569 | rego = rego->next) | |
5570 | if (rego->bfd_architecture == info.bfd_arch_info->arch) | |
5571 | break; | |
5572 | if (rego == NULL) | |
5573 | { | |
5574 | if (gdbarch_debug) | |
59837fe0 | 5575 | fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: " |
ebdba546 | 5576 | "No matching architecture\n"); |
b732d07d AC |
5577 | return 0; |
5578 | } | |
5579 | ||
ebdba546 | 5580 | /* Ask the tdep code for an architecture that matches "info". */ |
0f71a2f6 JM |
5581 | new_gdbarch = rego->init (info, rego->arches); |
5582 | ||
ebdba546 AC |
5583 | /* Did the tdep code like it? No. Reject the change and revert to |
5584 | the old architecture. */ | |
0f71a2f6 JM |
5585 | if (new_gdbarch == NULL) |
5586 | { | |
5587 | if (gdbarch_debug) | |
59837fe0 | 5588 | fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: " |
ebdba546 AC |
5589 | "Target rejected architecture\n"); |
5590 | return NULL; | |
0f71a2f6 JM |
5591 | } |
5592 | ||
ebdba546 AC |
5593 | /* Is this a pre-existing architecture (as determined by already |
5594 | being initialized)? Move it to the front of the architecture | |
5595 | list (keeping the list sorted Most Recently Used). */ | |
5596 | if (new_gdbarch->initialized_p) | |
0f71a2f6 | 5597 | { |
ebdba546 | 5598 | struct gdbarch_list **list; |
fe978cb0 | 5599 | struct gdbarch_list *self; |
0f71a2f6 | 5600 | if (gdbarch_debug) |
59837fe0 | 5601 | fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: " |
30737ed9 JB |
5602 | "Previous architecture %s (%s) selected\n", |
5603 | host_address_to_string (new_gdbarch), | |
0f71a2f6 | 5604 | new_gdbarch->bfd_arch_info->printable_name); |
ebdba546 AC |
5605 | /* Find the existing arch in the list. */ |
5606 | for (list = ®o->arches; | |
5607 | (*list) != NULL && (*list)->gdbarch != new_gdbarch; | |
5608 | list = &(*list)->next); | |
5609 | /* It had better be in the list of architectures. */ | |
5610 | gdb_assert ((*list) != NULL && (*list)->gdbarch == new_gdbarch); | |
fe978cb0 PA |
5611 | /* Unlink SELF. */ |
5612 | self = (*list); | |
5613 | (*list) = self->next; | |
5614 | /* Insert SELF at the front. */ | |
5615 | self->next = rego->arches; | |
5616 | rego->arches = self; | |
ebdba546 AC |
5617 | /* Return it. */ |
5618 | return new_gdbarch; | |
0f71a2f6 JM |
5619 | } |
5620 | ||
ebdba546 AC |
5621 | /* It's a new architecture. */ |
5622 | if (gdbarch_debug) | |
59837fe0 | 5623 | fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: " |
30737ed9 JB |
5624 | "New architecture %s (%s) selected\n", |
5625 | host_address_to_string (new_gdbarch), | |
ebdba546 AC |
5626 | new_gdbarch->bfd_arch_info->printable_name); |
5627 | ||
5628 | /* Insert the new architecture into the front of the architecture | |
5629 | list (keep the list sorted Most Recently Used). */ | |
0f79675b | 5630 | { |
fe978cb0 PA |
5631 | struct gdbarch_list *self = XNEW (struct gdbarch_list); |
5632 | self->next = rego->arches; | |
5633 | self->gdbarch = new_gdbarch; | |
5634 | rego->arches = self; | |
0f79675b | 5635 | } |
0f71a2f6 | 5636 | |
4b9b3959 AC |
5637 | /* Check that the newly installed architecture is valid. Plug in |
5638 | any post init values. */ | |
5639 | new_gdbarch->dump_tdep = rego->dump_tdep; | |
0f71a2f6 | 5640 | verify_gdbarch (new_gdbarch); |
ebdba546 | 5641 | new_gdbarch->initialized_p = 1; |
0f71a2f6 | 5642 | |
4b9b3959 | 5643 | if (gdbarch_debug) |
ebdba546 | 5644 | gdbarch_dump (new_gdbarch, gdb_stdlog); |
4b9b3959 | 5645 | |
ebdba546 | 5646 | return new_gdbarch; |
0f71a2f6 | 5647 | } |
c906108c | 5648 | |
e487cc15 | 5649 | /* Make the specified architecture current. */ |
ebdba546 AC |
5650 | |
5651 | void | |
aff68abb | 5652 | set_target_gdbarch (struct gdbarch *new_gdbarch) |
ebdba546 AC |
5653 | { |
5654 | gdb_assert (new_gdbarch != NULL); | |
ebdba546 | 5655 | gdb_assert (new_gdbarch->initialized_p); |
6ecd4729 | 5656 | current_inferior ()->gdbarch = new_gdbarch; |
76727919 | 5657 | gdb::observers::architecture_changed.notify (new_gdbarch); |
a3ecef73 | 5658 | registers_changed (); |
ebdba546 | 5659 | } |
c906108c | 5660 | |
f5656ead | 5661 | /* Return the current inferior's arch. */ |
6ecd4729 PA |
5662 | |
5663 | struct gdbarch * | |
f5656ead | 5664 | target_gdbarch (void) |
6ecd4729 PA |
5665 | { |
5666 | return current_inferior ()->gdbarch; | |
5667 | } | |
5668 | ||
6c265988 | 5669 | void _initialize_gdbarch (); |
c906108c | 5670 | void |
6c265988 | 5671 | _initialize_gdbarch () |
c906108c | 5672 | { |
ccce17b0 | 5673 | add_setshow_zuinteger_cmd ("arch", class_maintenance, &gdbarch_debug, _("\ |
85c07804 AC |
5674 | Set architecture debugging."), _("\ |
5675 | Show architecture debugging."), _("\ | |
5676 | When non-zero, architecture debugging is enabled."), | |
dda83cd7 SM |
5677 | NULL, |
5678 | show_gdbarch_debug, | |
5679 | &setdebuglist, &showdebuglist); | |
c906108c | 5680 | } |