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