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