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