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