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