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