Automatic date update in version.in
[binutils-gdb.git] / gdb / gdbarch.c
bloba588bdef61ab72a10a3465deb43b7b5fb67c6e3b
1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED -*- buffer-read-only: t -*- */
2 /* vi:set ro: */
4 /* Dynamic architecture support for GDB, the GNU debugger.
6 Copyright (C) 1998-2022 Free Software Foundation, Inc.
8 This file is part of GDB.
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.
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.
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/>. */
23 /* To regenerate this file, run:
24 ./gdbarch.py
28 /* Maintain the struct gdbarch object. */
30 struct gdbarch
32 /* Has this architecture been fully initialized? */
33 int initialized_p;
35 /* An obstack bound to the lifetime of the architecture. */
36 struct obstack *obstack;
38 /* basic architectural information. */
39 const struct bfd_arch_info * bfd_arch_info;
40 enum bfd_endian byte_order;
41 enum bfd_endian byte_order_for_code;
42 enum gdb_osabi osabi;
43 const struct target_desc * target_desc;
45 /* target specific vector. */
46 struct gdbarch_tdep *tdep;
47 gdbarch_dump_tdep_ftype *dump_tdep;
49 /* per-architecture data-pointers. */
50 unsigned nr_data;
51 void **data;
53 int short_bit;
54 int int_bit;
55 int long_bit;
56 int long_long_bit;
57 int bfloat16_bit;
58 const struct floatformat ** bfloat16_format;
59 int half_bit;
60 const struct floatformat ** half_format;
61 int float_bit;
62 const struct floatformat ** float_format;
63 int double_bit;
64 const struct floatformat ** double_format;
65 int long_double_bit;
66 const struct floatformat ** long_double_format;
67 int wchar_bit;
68 int wchar_signed;
69 gdbarch_floatformat_for_type_ftype *floatformat_for_type;
70 int ptr_bit;
71 int addr_bit;
72 int dwarf2_addr_size;
73 int char_signed;
74 gdbarch_read_pc_ftype *read_pc;
75 gdbarch_write_pc_ftype *write_pc;
76 gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer;
77 gdbarch_pseudo_register_read_ftype *pseudo_register_read;
78 gdbarch_pseudo_register_read_value_ftype *pseudo_register_read_value;
79 gdbarch_pseudo_register_write_ftype *pseudo_register_write;
80 int num_regs;
81 int num_pseudo_regs;
82 gdbarch_ax_pseudo_register_collect_ftype *ax_pseudo_register_collect;
83 gdbarch_ax_pseudo_register_push_stack_ftype *ax_pseudo_register_push_stack;
84 gdbarch_report_signal_info_ftype *report_signal_info;
85 int sp_regnum;
86 int pc_regnum;
87 int ps_regnum;
88 int fp0_regnum;
89 gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum;
90 gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum;
91 gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum;
92 gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum;
93 gdbarch_register_name_ftype *register_name;
94 gdbarch_register_type_ftype *register_type;
95 gdbarch_dummy_id_ftype *dummy_id;
96 int deprecated_fp_regnum;
97 gdbarch_push_dummy_call_ftype *push_dummy_call;
98 int call_dummy_location;
99 gdbarch_push_dummy_code_ftype *push_dummy_code;
100 gdbarch_code_of_frame_writable_ftype *code_of_frame_writable;
101 gdbarch_print_registers_info_ftype *print_registers_info;
102 gdbarch_print_float_info_ftype *print_float_info;
103 gdbarch_print_vector_info_ftype *print_vector_info;
104 gdbarch_register_sim_regno_ftype *register_sim_regno;
105 gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
106 gdbarch_cannot_store_register_ftype *cannot_store_register;
107 gdbarch_get_longjmp_target_ftype *get_longjmp_target;
108 int believe_pcc_promotion;
109 gdbarch_convert_register_p_ftype *convert_register_p;
110 gdbarch_register_to_value_ftype *register_to_value;
111 gdbarch_value_to_register_ftype *value_to_register;
112 gdbarch_value_from_register_ftype *value_from_register;
113 gdbarch_pointer_to_address_ftype *pointer_to_address;
114 gdbarch_address_to_pointer_ftype *address_to_pointer;
115 gdbarch_integer_to_address_ftype *integer_to_address;
116 gdbarch_return_value_ftype *return_value;
117 gdbarch_return_in_first_hidden_param_p_ftype *return_in_first_hidden_param_p;
118 gdbarch_skip_prologue_ftype *skip_prologue;
119 gdbarch_skip_main_prologue_ftype *skip_main_prologue;
120 gdbarch_skip_entrypoint_ftype *skip_entrypoint;
121 gdbarch_inner_than_ftype *inner_than;
122 gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
123 gdbarch_breakpoint_kind_from_pc_ftype *breakpoint_kind_from_pc;
124 gdbarch_sw_breakpoint_from_kind_ftype *sw_breakpoint_from_kind;
125 gdbarch_breakpoint_kind_from_current_state_ftype *breakpoint_kind_from_current_state;
126 gdbarch_adjust_breakpoint_address_ftype *adjust_breakpoint_address;
127 gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
128 gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
129 CORE_ADDR decr_pc_after_break;
130 CORE_ADDR deprecated_function_start_offset;
131 gdbarch_remote_register_number_ftype *remote_register_number;
132 gdbarch_fetch_tls_load_module_address_ftype *fetch_tls_load_module_address;
133 gdbarch_get_thread_local_address_ftype *get_thread_local_address;
134 CORE_ADDR frame_args_skip;
135 gdbarch_unwind_pc_ftype *unwind_pc;
136 gdbarch_unwind_sp_ftype *unwind_sp;
137 gdbarch_frame_num_args_ftype *frame_num_args;
138 gdbarch_frame_align_ftype *frame_align;
139 gdbarch_stabs_argument_has_addr_ftype *stabs_argument_has_addr;
140 int frame_red_zone_size;
141 gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
142 gdbarch_addr_bits_remove_ftype *addr_bits_remove;
143 int significant_addr_bit;
144 gdbarch_memtag_to_string_ftype *memtag_to_string;
145 gdbarch_tagged_address_p_ftype *tagged_address_p;
146 gdbarch_memtag_matches_p_ftype *memtag_matches_p;
147 gdbarch_set_memtags_ftype *set_memtags;
148 gdbarch_get_memtag_ftype *get_memtag;
149 CORE_ADDR memtag_granule_size;
150 gdbarch_software_single_step_ftype *software_single_step;
151 gdbarch_single_step_through_delay_ftype *single_step_through_delay;
152 gdbarch_print_insn_ftype *print_insn;
153 gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
154 gdbarch_skip_solib_resolver_ftype *skip_solib_resolver;
155 gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
156 gdbarch_in_indirect_branch_thunk_ftype *in_indirect_branch_thunk;
157 gdbarch_stack_frame_destroyed_p_ftype *stack_frame_destroyed_p;
158 gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
159 gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
160 gdbarch_make_symbol_special_ftype *make_symbol_special;
161 gdbarch_adjust_dwarf2_addr_ftype *adjust_dwarf2_addr;
162 gdbarch_adjust_dwarf2_line_ftype *adjust_dwarf2_line;
163 int cannot_step_breakpoint;
164 int have_nonsteppable_watchpoint;
165 gdbarch_address_class_type_flags_ftype *address_class_type_flags;
166 gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name;
167 gdbarch_execute_dwarf_cfa_vendor_op_ftype *execute_dwarf_cfa_vendor_op;
168 gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
169 gdbarch_register_reggroup_p_ftype *register_reggroup_p;
170 gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument;
171 gdbarch_iterate_over_regset_sections_ftype *iterate_over_regset_sections;
172 gdbarch_make_corefile_notes_ftype *make_corefile_notes;
173 gdbarch_find_memory_regions_ftype *find_memory_regions;
174 gdbarch_core_xfer_shared_libraries_ftype *core_xfer_shared_libraries;
175 gdbarch_core_xfer_shared_libraries_aix_ftype *core_xfer_shared_libraries_aix;
176 gdbarch_core_pid_to_str_ftype *core_pid_to_str;
177 gdbarch_core_thread_name_ftype *core_thread_name;
178 gdbarch_core_xfer_siginfo_ftype *core_xfer_siginfo;
179 const char * gcore_bfd_target;
180 int vtable_function_descriptors;
181 int vbit_in_delta;
182 gdbarch_skip_permanent_breakpoint_ftype *skip_permanent_breakpoint;
183 ULONGEST max_insn_length;
184 gdbarch_displaced_step_copy_insn_ftype *displaced_step_copy_insn;
185 gdbarch_displaced_step_hw_singlestep_ftype *displaced_step_hw_singlestep;
186 gdbarch_displaced_step_fixup_ftype *displaced_step_fixup;
187 gdbarch_displaced_step_prepare_ftype *displaced_step_prepare;
188 gdbarch_displaced_step_finish_ftype *displaced_step_finish;
189 gdbarch_displaced_step_copy_insn_closure_by_addr_ftype *displaced_step_copy_insn_closure_by_addr;
190 gdbarch_displaced_step_restore_all_in_ptid_ftype *displaced_step_restore_all_in_ptid;
191 gdbarch_relocate_instruction_ftype *relocate_instruction;
192 gdbarch_overlay_update_ftype *overlay_update;
193 gdbarch_core_read_description_ftype *core_read_description;
194 int sofun_address_maybe_missing;
195 gdbarch_process_record_ftype *process_record;
196 gdbarch_process_record_signal_ftype *process_record_signal;
197 gdbarch_gdb_signal_from_target_ftype *gdb_signal_from_target;
198 gdbarch_gdb_signal_to_target_ftype *gdb_signal_to_target;
199 gdbarch_get_siginfo_type_ftype *get_siginfo_type;
200 gdbarch_record_special_symbol_ftype *record_special_symbol;
201 gdbarch_get_syscall_number_ftype *get_syscall_number;
202 const char * xml_syscall_file;
203 struct syscalls_info * syscalls_info;
204 const char *const * stap_integer_prefixes;
205 const char *const * stap_integer_suffixes;
206 const char *const * stap_register_prefixes;
207 const char *const * stap_register_suffixes;
208 const char *const * stap_register_indirection_prefixes;
209 const char *const * stap_register_indirection_suffixes;
210 const char * stap_gdb_register_prefix;
211 const char * stap_gdb_register_suffix;
212 gdbarch_stap_is_single_operand_ftype *stap_is_single_operand;
213 gdbarch_stap_parse_special_token_ftype *stap_parse_special_token;
214 gdbarch_stap_adjust_register_ftype *stap_adjust_register;
215 gdbarch_dtrace_parse_probe_argument_ftype *dtrace_parse_probe_argument;
216 gdbarch_dtrace_probe_is_enabled_ftype *dtrace_probe_is_enabled;
217 gdbarch_dtrace_enable_probe_ftype *dtrace_enable_probe;
218 gdbarch_dtrace_disable_probe_ftype *dtrace_disable_probe;
219 int has_global_solist;
220 int has_global_breakpoints;
221 gdbarch_has_shared_address_space_ftype *has_shared_address_space;
222 gdbarch_fast_tracepoint_valid_at_ftype *fast_tracepoint_valid_at;
223 gdbarch_guess_tracepoint_registers_ftype *guess_tracepoint_registers;
224 gdbarch_auto_charset_ftype *auto_charset;
225 gdbarch_auto_wide_charset_ftype *auto_wide_charset;
226 const char * solib_symbols_extension;
227 int has_dos_based_file_system;
228 gdbarch_gen_return_address_ftype *gen_return_address;
229 gdbarch_info_proc_ftype *info_proc;
230 gdbarch_core_info_proc_ftype *core_info_proc;
231 gdbarch_iterate_over_objfiles_in_search_order_ftype *iterate_over_objfiles_in_search_order;
232 struct ravenscar_arch_ops * ravenscar_ops;
233 gdbarch_insn_is_call_ftype *insn_is_call;
234 gdbarch_insn_is_ret_ftype *insn_is_ret;
235 gdbarch_insn_is_jump_ftype *insn_is_jump;
236 gdbarch_program_breakpoint_here_p_ftype *program_breakpoint_here_p;
237 gdbarch_auxv_parse_ftype *auxv_parse;
238 gdbarch_print_auxv_entry_ftype *print_auxv_entry;
239 gdbarch_vsyscall_range_ftype *vsyscall_range;
240 gdbarch_infcall_mmap_ftype *infcall_mmap;
241 gdbarch_infcall_munmap_ftype *infcall_munmap;
242 gdbarch_gcc_target_options_ftype *gcc_target_options;
243 gdbarch_gnu_triplet_regexp_ftype *gnu_triplet_regexp;
244 gdbarch_addressable_memory_unit_size_ftype *addressable_memory_unit_size;
245 const char * disassembler_options_implicit;
246 char ** disassembler_options;
247 const disasm_options_and_args_t * valid_disassembler_options;
248 gdbarch_type_align_ftype *type_align;
249 gdbarch_get_pc_address_flags_ftype *get_pc_address_flags;
250 gdbarch_read_core_file_mappings_ftype *read_core_file_mappings;
253 /* Create a new ``struct gdbarch'' based on information provided by
254 ``struct gdbarch_info''. */
256 struct gdbarch *
257 gdbarch_alloc (const struct gdbarch_info *info,
258 struct gdbarch_tdep *tdep)
260 struct gdbarch *gdbarch;
262 /* Create an obstack for allocating all the per-architecture memory,
263 then use that to allocate the architecture vector. */
264 struct obstack *obstack = XNEW (struct obstack);
265 obstack_init (obstack);
266 gdbarch = XOBNEW (obstack, struct gdbarch);
267 memset (gdbarch, 0, sizeof (*gdbarch));
268 gdbarch->obstack = obstack;
270 alloc_gdbarch_data (gdbarch);
272 gdbarch->tdep = tdep;
274 gdbarch->bfd_arch_info = info->bfd_arch_info;
275 gdbarch->byte_order = info->byte_order;
276 gdbarch->byte_order_for_code = info->byte_order_for_code;
277 gdbarch->osabi = info->osabi;
278 gdbarch->target_desc = info->target_desc;
280 /* Force the explicit initialization of these. */
281 gdbarch->short_bit = 2*TARGET_CHAR_BIT;
282 gdbarch->int_bit = 4*TARGET_CHAR_BIT;
283 gdbarch->long_bit = 4*TARGET_CHAR_BIT;
284 gdbarch->long_long_bit = 2*gdbarch->long_bit;
285 gdbarch->bfloat16_bit = 2*TARGET_CHAR_BIT;
286 gdbarch->half_bit = 2*TARGET_CHAR_BIT;
287 gdbarch->float_bit = 4*TARGET_CHAR_BIT;
288 gdbarch->double_bit = 8*TARGET_CHAR_BIT;
289 gdbarch->long_double_bit = 8*TARGET_CHAR_BIT;
290 gdbarch->wchar_bit = 4*TARGET_CHAR_BIT;
291 gdbarch->wchar_signed = -1;
292 gdbarch->floatformat_for_type = default_floatformat_for_type;
293 gdbarch->ptr_bit = gdbarch->int_bit;
294 gdbarch->char_signed = -1;
295 gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
296 gdbarch->num_regs = -1;
297 gdbarch->sp_regnum = -1;
298 gdbarch->pc_regnum = -1;
299 gdbarch->ps_regnum = -1;
300 gdbarch->fp0_regnum = -1;
301 gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
302 gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
303 gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
304 gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
305 gdbarch->dummy_id = default_dummy_id;
306 gdbarch->deprecated_fp_regnum = -1;
307 gdbarch->call_dummy_location = AT_ENTRY_POINT;
308 gdbarch->code_of_frame_writable = default_code_of_frame_writable;
309 gdbarch->print_registers_info = default_print_registers_info;
310 gdbarch->print_float_info = default_print_float_info;
311 gdbarch->register_sim_regno = legacy_register_sim_regno;
312 gdbarch->cannot_fetch_register = cannot_register_not;
313 gdbarch->cannot_store_register = cannot_register_not;
314 gdbarch->convert_register_p = generic_convert_register_p;
315 gdbarch->value_from_register = default_value_from_register;
316 gdbarch->pointer_to_address = unsigned_pointer_to_address;
317 gdbarch->address_to_pointer = unsigned_address_to_pointer;
318 gdbarch->return_in_first_hidden_param_p = default_return_in_first_hidden_param_p;
319 gdbarch->breakpoint_from_pc = default_breakpoint_from_pc;
320 gdbarch->sw_breakpoint_from_kind = NULL;
321 gdbarch->breakpoint_kind_from_current_state = default_breakpoint_kind_from_current_state;
322 gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
323 gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
324 gdbarch->remote_register_number = default_remote_register_number;
325 gdbarch->unwind_pc = default_unwind_pc;
326 gdbarch->unwind_sp = default_unwind_sp;
327 gdbarch->stabs_argument_has_addr = default_stabs_argument_has_addr;
328 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr_identity;
329 gdbarch->addr_bits_remove = core_addr_identity;
330 gdbarch->memtag_to_string = default_memtag_to_string;
331 gdbarch->tagged_address_p = default_tagged_address_p;
332 gdbarch->memtag_matches_p = default_memtag_matches_p;
333 gdbarch->set_memtags = default_set_memtags;
334 gdbarch->get_memtag = default_get_memtag;
335 gdbarch->print_insn = default_print_insn;
336 gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
337 gdbarch->skip_solib_resolver = generic_skip_solib_resolver;
338 gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
339 gdbarch->in_indirect_branch_thunk = default_in_indirect_branch_thunk;
340 gdbarch->stack_frame_destroyed_p = generic_stack_frame_destroyed_p;
341 gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
342 gdbarch->make_symbol_special = default_make_symbol_special;
343 gdbarch->adjust_dwarf2_addr = default_adjust_dwarf2_addr;
344 gdbarch->adjust_dwarf2_line = default_adjust_dwarf2_line;
345 gdbarch->execute_dwarf_cfa_vendor_op = default_execute_dwarf_cfa_vendor_op;
346 gdbarch->register_reggroup_p = default_register_reggroup_p;
347 gdbarch->skip_permanent_breakpoint = default_skip_permanent_breakpoint;
348 gdbarch->displaced_step_hw_singlestep = default_displaced_step_hw_singlestep;
349 gdbarch->displaced_step_fixup = NULL;
350 gdbarch->displaced_step_finish = NULL;
351 gdbarch->relocate_instruction = NULL;
352 gdbarch->has_shared_address_space = default_has_shared_address_space;
353 gdbarch->fast_tracepoint_valid_at = default_fast_tracepoint_valid_at;
354 gdbarch->guess_tracepoint_registers = default_guess_tracepoint_registers;
355 gdbarch->auto_charset = default_auto_charset;
356 gdbarch->auto_wide_charset = default_auto_wide_charset;
357 gdbarch->gen_return_address = default_gen_return_address;
358 gdbarch->iterate_over_objfiles_in_search_order = default_iterate_over_objfiles_in_search_order;
359 gdbarch->ravenscar_ops = NULL;
360 gdbarch->insn_is_call = default_insn_is_call;
361 gdbarch->insn_is_ret = default_insn_is_ret;
362 gdbarch->insn_is_jump = default_insn_is_jump;
363 gdbarch->program_breakpoint_here_p = default_program_breakpoint_here_p;
364 gdbarch->print_auxv_entry = default_print_auxv_entry;
365 gdbarch->vsyscall_range = default_vsyscall_range;
366 gdbarch->infcall_mmap = default_infcall_mmap;
367 gdbarch->infcall_munmap = default_infcall_munmap;
368 gdbarch->gcc_target_options = default_gcc_target_options;
369 gdbarch->gnu_triplet_regexp = default_gnu_triplet_regexp;
370 gdbarch->addressable_memory_unit_size = default_addressable_memory_unit_size;
371 gdbarch->type_align = default_type_align;
372 gdbarch->get_pc_address_flags = default_get_pc_address_flags;
373 gdbarch->read_core_file_mappings = default_read_core_file_mappings;
374 /* gdbarch_alloc() */
376 return gdbarch;
381 /* Ensure that all values in a GDBARCH are reasonable. */
383 static void
384 verify_gdbarch (struct gdbarch *gdbarch)
386 string_file log;
388 /* fundamental */
389 if (gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
390 log.puts ("\n\tbyte-order");
391 if (gdbarch->bfd_arch_info == NULL)
392 log.puts ("\n\tbfd_arch_info");
393 /* Check those that need to be defined for the given multi-arch level. */
394 /* Skip verify of short_bit, invalid_p == 0 */
395 /* Skip verify of int_bit, invalid_p == 0 */
396 /* Skip verify of long_bit, invalid_p == 0 */
397 /* Skip verify of long_long_bit, invalid_p == 0 */
398 /* Skip verify of bfloat16_bit, invalid_p == 0 */
399 if (gdbarch->bfloat16_format == 0)
400 gdbarch->bfloat16_format = floatformats_bfloat16;
401 /* Skip verify of half_bit, invalid_p == 0 */
402 if (gdbarch->half_format == 0)
403 gdbarch->half_format = floatformats_ieee_half;
404 /* Skip verify of float_bit, invalid_p == 0 */
405 if (gdbarch->float_format == 0)
406 gdbarch->float_format = floatformats_ieee_single;
407 /* Skip verify of double_bit, invalid_p == 0 */
408 if (gdbarch->double_format == 0)
409 gdbarch->double_format = floatformats_ieee_double;
410 /* Skip verify of long_double_bit, invalid_p == 0 */
411 if (gdbarch->long_double_format == 0)
412 gdbarch->long_double_format = floatformats_ieee_double;
413 /* Skip verify of wchar_bit, invalid_p == 0 */
414 if (gdbarch->wchar_signed == -1)
415 gdbarch->wchar_signed = 1;
416 /* Skip verify of floatformat_for_type, invalid_p == 0 */
417 /* Skip verify of ptr_bit, invalid_p == 0 */
418 if (gdbarch->addr_bit == 0)
419 gdbarch->addr_bit = gdbarch_ptr_bit (gdbarch);
420 if (gdbarch->dwarf2_addr_size == 0)
421 gdbarch->dwarf2_addr_size = gdbarch_ptr_bit (gdbarch) / TARGET_CHAR_BIT;
422 if (gdbarch->char_signed == -1)
423 gdbarch->char_signed = 1;
424 /* Skip verify of read_pc, has predicate. */
425 /* Skip verify of write_pc, has predicate. */
426 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
427 /* Skip verify of pseudo_register_read, has predicate. */
428 /* Skip verify of pseudo_register_read_value, has predicate. */
429 /* Skip verify of pseudo_register_write, has predicate. */
430 if (gdbarch->num_regs == -1)
431 log.puts ("\n\tnum_regs");
432 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
433 /* Skip verify of ax_pseudo_register_collect, has predicate. */
434 /* Skip verify of ax_pseudo_register_push_stack, has predicate. */
435 /* Skip verify of report_signal_info, has predicate. */
436 /* Skip verify of sp_regnum, invalid_p == 0 */
437 /* Skip verify of pc_regnum, invalid_p == 0 */
438 /* Skip verify of ps_regnum, invalid_p == 0 */
439 /* Skip verify of fp0_regnum, invalid_p == 0 */
440 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
441 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
442 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
443 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
444 if (gdbarch->register_name == 0)
445 log.puts ("\n\tregister_name");
446 if (gdbarch->register_type == 0)
447 log.puts ("\n\tregister_type");
448 /* Skip verify of dummy_id, invalid_p == 0 */
449 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
450 /* Skip verify of push_dummy_call, has predicate. */
451 /* Skip verify of call_dummy_location, invalid_p == 0 */
452 /* Skip verify of push_dummy_code, has predicate. */
453 /* Skip verify of code_of_frame_writable, invalid_p == 0 */
454 /* Skip verify of print_registers_info, invalid_p == 0 */
455 /* Skip verify of print_float_info, invalid_p == 0 */
456 /* Skip verify of print_vector_info, has predicate. */
457 /* Skip verify of register_sim_regno, invalid_p == 0 */
458 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
459 /* Skip verify of cannot_store_register, invalid_p == 0 */
460 /* Skip verify of get_longjmp_target, has predicate. */
461 /* Skip verify of believe_pcc_promotion, invalid_p == 0 */
462 /* Skip verify of convert_register_p, invalid_p == 0 */
463 /* Skip verify of register_to_value, invalid_p == 0 */
464 /* Skip verify of value_to_register, invalid_p == 0 */
465 /* Skip verify of value_from_register, invalid_p == 0 */
466 /* Skip verify of pointer_to_address, invalid_p == 0 */
467 /* Skip verify of address_to_pointer, invalid_p == 0 */
468 /* Skip verify of integer_to_address, has predicate. */
469 /* Skip verify of return_value, has predicate. */
470 /* Skip verify of return_in_first_hidden_param_p, invalid_p == 0 */
471 if (gdbarch->skip_prologue == 0)
472 log.puts ("\n\tskip_prologue");
473 /* Skip verify of skip_main_prologue, has predicate. */
474 /* Skip verify of skip_entrypoint, has predicate. */
475 if (gdbarch->inner_than == 0)
476 log.puts ("\n\tinner_than");
477 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
478 if (gdbarch->breakpoint_kind_from_pc == 0)
479 log.puts ("\n\tbreakpoint_kind_from_pc");
480 /* Skip verify of sw_breakpoint_from_kind, invalid_p == 0 */
481 /* Skip verify of breakpoint_kind_from_current_state, invalid_p == 0 */
482 /* Skip verify of adjust_breakpoint_address, has predicate. */
483 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
484 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
485 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
486 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
487 /* Skip verify of remote_register_number, invalid_p == 0 */
488 /* Skip verify of fetch_tls_load_module_address, has predicate. */
489 /* Skip verify of get_thread_local_address, has predicate. */
490 /* Skip verify of frame_args_skip, invalid_p == 0 */
491 /* Skip verify of unwind_pc, invalid_p == 0 */
492 /* Skip verify of unwind_sp, invalid_p == 0 */
493 /* Skip verify of frame_num_args, has predicate. */
494 /* Skip verify of frame_align, has predicate. */
495 /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
496 /* Skip verify of frame_red_zone_size, invalid_p == 0 */
497 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
498 /* Skip verify of addr_bits_remove, invalid_p == 0 */
499 /* Skip verify of significant_addr_bit, invalid_p == 0 */
500 /* Skip verify of memtag_to_string, invalid_p == 0 */
501 /* Skip verify of tagged_address_p, invalid_p == 0 */
502 /* Skip verify of memtag_matches_p, invalid_p == 0 */
503 /* Skip verify of set_memtags, invalid_p == 0 */
504 /* Skip verify of get_memtag, invalid_p == 0 */
505 /* Skip verify of memtag_granule_size, invalid_p == 0 */
506 /* Skip verify of software_single_step, has predicate. */
507 /* Skip verify of single_step_through_delay, has predicate. */
508 /* Skip verify of print_insn, invalid_p == 0 */
509 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
510 /* Skip verify of skip_solib_resolver, invalid_p == 0 */
511 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
512 /* Skip verify of in_indirect_branch_thunk, invalid_p == 0 */
513 /* Skip verify of stack_frame_destroyed_p, invalid_p == 0 */
514 /* Skip verify of elf_make_msymbol_special, has predicate. */
515 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
516 /* Skip verify of make_symbol_special, invalid_p == 0 */
517 /* Skip verify of adjust_dwarf2_addr, invalid_p == 0 */
518 /* Skip verify of adjust_dwarf2_line, invalid_p == 0 */
519 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
520 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
521 /* Skip verify of address_class_type_flags, has predicate. */
522 /* Skip verify of address_class_type_flags_to_name, has predicate. */
523 /* Skip verify of execute_dwarf_cfa_vendor_op, invalid_p == 0 */
524 /* Skip verify of address_class_name_to_type_flags, has predicate. */
525 /* Skip verify of register_reggroup_p, invalid_p == 0 */
526 /* Skip verify of fetch_pointer_argument, has predicate. */
527 /* Skip verify of iterate_over_regset_sections, has predicate. */
528 /* Skip verify of make_corefile_notes, has predicate. */
529 /* Skip verify of find_memory_regions, has predicate. */
530 /* Skip verify of core_xfer_shared_libraries, has predicate. */
531 /* Skip verify of core_xfer_shared_libraries_aix, has predicate. */
532 /* Skip verify of core_pid_to_str, has predicate. */
533 /* Skip verify of core_thread_name, has predicate. */
534 /* Skip verify of core_xfer_siginfo, has predicate. */
535 /* Skip verify of gcore_bfd_target, has predicate. */
536 /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
537 /* Skip verify of vbit_in_delta, invalid_p == 0 */
538 /* Skip verify of skip_permanent_breakpoint, invalid_p == 0 */
539 /* Skip verify of max_insn_length, has predicate. */
540 /* Skip verify of displaced_step_copy_insn, has predicate. */
541 /* Skip verify of displaced_step_hw_singlestep, invalid_p == 0 */
542 /* Skip verify of displaced_step_fixup, has predicate. */
543 /* Skip verify of displaced_step_prepare, has predicate. */
544 if ((! gdbarch->displaced_step_finish) != (! gdbarch->displaced_step_prepare))
545 log.puts ("\n\tdisplaced_step_finish");
546 /* Skip verify of displaced_step_copy_insn_closure_by_addr, has predicate. */
547 /* Skip verify of displaced_step_restore_all_in_ptid, invalid_p == 0 */
548 /* Skip verify of relocate_instruction, has predicate. */
549 /* Skip verify of overlay_update, has predicate. */
550 /* Skip verify of core_read_description, has predicate. */
551 /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
552 /* Skip verify of process_record, has predicate. */
553 /* Skip verify of process_record_signal, has predicate. */
554 /* Skip verify of gdb_signal_from_target, has predicate. */
555 /* Skip verify of gdb_signal_to_target, has predicate. */
556 /* Skip verify of get_siginfo_type, has predicate. */
557 /* Skip verify of record_special_symbol, has predicate. */
558 /* Skip verify of get_syscall_number, has predicate. */
559 /* Skip verify of xml_syscall_file, invalid_p == 0 */
560 /* Skip verify of syscalls_info, invalid_p == 0 */
561 /* Skip verify of stap_integer_prefixes, invalid_p == 0 */
562 /* Skip verify of stap_integer_suffixes, invalid_p == 0 */
563 /* Skip verify of stap_register_prefixes, invalid_p == 0 */
564 /* Skip verify of stap_register_suffixes, invalid_p == 0 */
565 /* Skip verify of stap_register_indirection_prefixes, invalid_p == 0 */
566 /* Skip verify of stap_register_indirection_suffixes, invalid_p == 0 */
567 /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */
568 /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */
569 /* Skip verify of stap_is_single_operand, has predicate. */
570 /* Skip verify of stap_parse_special_token, has predicate. */
571 /* Skip verify of stap_adjust_register, has predicate. */
572 /* Skip verify of dtrace_parse_probe_argument, has predicate. */
573 /* Skip verify of dtrace_probe_is_enabled, has predicate. */
574 /* Skip verify of dtrace_enable_probe, has predicate. */
575 /* Skip verify of dtrace_disable_probe, has predicate. */
576 /* Skip verify of has_global_solist, invalid_p == 0 */
577 /* Skip verify of has_global_breakpoints, invalid_p == 0 */
578 /* Skip verify of has_shared_address_space, invalid_p == 0 */
579 /* Skip verify of fast_tracepoint_valid_at, invalid_p == 0 */
580 /* Skip verify of guess_tracepoint_registers, invalid_p == 0 */
581 /* Skip verify of auto_charset, invalid_p == 0 */
582 /* Skip verify of auto_wide_charset, invalid_p == 0 */
583 /* Skip verify of solib_symbols_extension, invalid_p == 0 */
584 /* Skip verify of has_dos_based_file_system, invalid_p == 0 */
585 /* Skip verify of gen_return_address, invalid_p == 0 */
586 /* Skip verify of info_proc, has predicate. */
587 /* Skip verify of core_info_proc, has predicate. */
588 /* Skip verify of iterate_over_objfiles_in_search_order, invalid_p == 0 */
589 /* Skip verify of ravenscar_ops, invalid_p == 0 */
590 /* Skip verify of insn_is_call, invalid_p == 0 */
591 /* Skip verify of insn_is_ret, invalid_p == 0 */
592 /* Skip verify of insn_is_jump, invalid_p == 0 */
593 /* Skip verify of program_breakpoint_here_p, invalid_p == 0 */
594 /* Skip verify of auxv_parse, has predicate. */
595 /* Skip verify of print_auxv_entry, invalid_p == 0 */
596 /* Skip verify of vsyscall_range, invalid_p == 0 */
597 /* Skip verify of infcall_mmap, invalid_p == 0 */
598 /* Skip verify of infcall_munmap, invalid_p == 0 */
599 /* Skip verify of gcc_target_options, invalid_p == 0 */
600 /* Skip verify of gnu_triplet_regexp, invalid_p == 0 */
601 /* Skip verify of addressable_memory_unit_size, invalid_p == 0 */
602 /* Skip verify of disassembler_options_implicit, invalid_p == 0 */
603 /* Skip verify of disassembler_options, invalid_p == 0 */
604 /* Skip verify of valid_disassembler_options, invalid_p == 0 */
605 /* Skip verify of type_align, invalid_p == 0 */
606 /* Skip verify of get_pc_address_flags, invalid_p == 0 */
607 /* Skip verify of read_core_file_mappings, invalid_p == 0 */
608 if (!log.empty ())
609 internal_error (__FILE__, __LINE__,
610 _("verify_gdbarch: the following are invalid ...%s"),
611 log.c_str ());
615 /* Print out the details of the current architecture. */
617 void
618 gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
620 const char *gdb_nm_file = "<not-defined>";
622 #if defined (GDB_NM_FILE)
623 gdb_nm_file = GDB_NM_FILE;
624 #endif
625 gdb_printf (file,
626 "gdbarch_dump: GDB_NM_FILE = %s\n",
627 gdb_nm_file);
628 gdb_printf (file,
629 "gdbarch_dump: bfd_arch_info = %s\n",
630 gdbarch_bfd_arch_info (gdbarch)->printable_name);
631 gdb_printf (file,
632 "gdbarch_dump: byte_order = %s\n",
633 plongest (gdbarch->byte_order));
634 gdb_printf (file,
635 "gdbarch_dump: byte_order_for_code = %s\n",
636 plongest (gdbarch->byte_order_for_code));
637 gdb_printf (file,
638 "gdbarch_dump: osabi = %s\n",
639 plongest (gdbarch->osabi));
640 gdb_printf (file,
641 "gdbarch_dump: target_desc = %s\n",
642 host_address_to_string (gdbarch->target_desc));
643 gdb_printf (file,
644 "gdbarch_dump: short_bit = %s\n",
645 plongest (gdbarch->short_bit));
646 gdb_printf (file,
647 "gdbarch_dump: int_bit = %s\n",
648 plongest (gdbarch->int_bit));
649 gdb_printf (file,
650 "gdbarch_dump: long_bit = %s\n",
651 plongest (gdbarch->long_bit));
652 gdb_printf (file,
653 "gdbarch_dump: long_long_bit = %s\n",
654 plongest (gdbarch->long_long_bit));
655 gdb_printf (file,
656 "gdbarch_dump: bfloat16_bit = %s\n",
657 plongest (gdbarch->bfloat16_bit));
658 gdb_printf (file,
659 "gdbarch_dump: bfloat16_format = %s\n",
660 pformat (gdbarch->bfloat16_format));
661 gdb_printf (file,
662 "gdbarch_dump: half_bit = %s\n",
663 plongest (gdbarch->half_bit));
664 gdb_printf (file,
665 "gdbarch_dump: half_format = %s\n",
666 pformat (gdbarch->half_format));
667 gdb_printf (file,
668 "gdbarch_dump: float_bit = %s\n",
669 plongest (gdbarch->float_bit));
670 gdb_printf (file,
671 "gdbarch_dump: float_format = %s\n",
672 pformat (gdbarch->float_format));
673 gdb_printf (file,
674 "gdbarch_dump: double_bit = %s\n",
675 plongest (gdbarch->double_bit));
676 gdb_printf (file,
677 "gdbarch_dump: double_format = %s\n",
678 pformat (gdbarch->double_format));
679 gdb_printf (file,
680 "gdbarch_dump: long_double_bit = %s\n",
681 plongest (gdbarch->long_double_bit));
682 gdb_printf (file,
683 "gdbarch_dump: long_double_format = %s\n",
684 pformat (gdbarch->long_double_format));
685 gdb_printf (file,
686 "gdbarch_dump: wchar_bit = %s\n",
687 plongest (gdbarch->wchar_bit));
688 gdb_printf (file,
689 "gdbarch_dump: wchar_signed = %s\n",
690 plongest (gdbarch->wchar_signed));
691 gdb_printf (file,
692 "gdbarch_dump: floatformat_for_type = <%s>\n",
693 host_address_to_string (gdbarch->floatformat_for_type));
694 gdb_printf (file,
695 "gdbarch_dump: ptr_bit = %s\n",
696 plongest (gdbarch->ptr_bit));
697 gdb_printf (file,
698 "gdbarch_dump: addr_bit = %s\n",
699 plongest (gdbarch->addr_bit));
700 gdb_printf (file,
701 "gdbarch_dump: dwarf2_addr_size = %s\n",
702 plongest (gdbarch->dwarf2_addr_size));
703 gdb_printf (file,
704 "gdbarch_dump: char_signed = %s\n",
705 plongest (gdbarch->char_signed));
706 gdb_printf (file,
707 "gdbarch_dump: gdbarch_read_pc_p() = %d\n",
708 gdbarch_read_pc_p (gdbarch));
709 gdb_printf (file,
710 "gdbarch_dump: read_pc = <%s>\n",
711 host_address_to_string (gdbarch->read_pc));
712 gdb_printf (file,
713 "gdbarch_dump: gdbarch_write_pc_p() = %d\n",
714 gdbarch_write_pc_p (gdbarch));
715 gdb_printf (file,
716 "gdbarch_dump: write_pc = <%s>\n",
717 host_address_to_string (gdbarch->write_pc));
718 gdb_printf (file,
719 "gdbarch_dump: virtual_frame_pointer = <%s>\n",
720 host_address_to_string (gdbarch->virtual_frame_pointer));
721 gdb_printf (file,
722 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
723 gdbarch_pseudo_register_read_p (gdbarch));
724 gdb_printf (file,
725 "gdbarch_dump: pseudo_register_read = <%s>\n",
726 host_address_to_string (gdbarch->pseudo_register_read));
727 gdb_printf (file,
728 "gdbarch_dump: gdbarch_pseudo_register_read_value_p() = %d\n",
729 gdbarch_pseudo_register_read_value_p (gdbarch));
730 gdb_printf (file,
731 "gdbarch_dump: pseudo_register_read_value = <%s>\n",
732 host_address_to_string (gdbarch->pseudo_register_read_value));
733 gdb_printf (file,
734 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
735 gdbarch_pseudo_register_write_p (gdbarch));
736 gdb_printf (file,
737 "gdbarch_dump: pseudo_register_write = <%s>\n",
738 host_address_to_string (gdbarch->pseudo_register_write));
739 gdb_printf (file,
740 "gdbarch_dump: num_regs = %s\n",
741 plongest (gdbarch->num_regs));
742 gdb_printf (file,
743 "gdbarch_dump: num_pseudo_regs = %s\n",
744 plongest (gdbarch->num_pseudo_regs));
745 gdb_printf (file,
746 "gdbarch_dump: gdbarch_ax_pseudo_register_collect_p() = %d\n",
747 gdbarch_ax_pseudo_register_collect_p (gdbarch));
748 gdb_printf (file,
749 "gdbarch_dump: ax_pseudo_register_collect = <%s>\n",
750 host_address_to_string (gdbarch->ax_pseudo_register_collect));
751 gdb_printf (file,
752 "gdbarch_dump: gdbarch_ax_pseudo_register_push_stack_p() = %d\n",
753 gdbarch_ax_pseudo_register_push_stack_p (gdbarch));
754 gdb_printf (file,
755 "gdbarch_dump: ax_pseudo_register_push_stack = <%s>\n",
756 host_address_to_string (gdbarch->ax_pseudo_register_push_stack));
757 gdb_printf (file,
758 "gdbarch_dump: gdbarch_report_signal_info_p() = %d\n",
759 gdbarch_report_signal_info_p (gdbarch));
760 gdb_printf (file,
761 "gdbarch_dump: report_signal_info = <%s>\n",
762 host_address_to_string (gdbarch->report_signal_info));
763 gdb_printf (file,
764 "gdbarch_dump: sp_regnum = %s\n",
765 plongest (gdbarch->sp_regnum));
766 gdb_printf (file,
767 "gdbarch_dump: pc_regnum = %s\n",
768 plongest (gdbarch->pc_regnum));
769 gdb_printf (file,
770 "gdbarch_dump: ps_regnum = %s\n",
771 plongest (gdbarch->ps_regnum));
772 gdb_printf (file,
773 "gdbarch_dump: fp0_regnum = %s\n",
774 plongest (gdbarch->fp0_regnum));
775 gdb_printf (file,
776 "gdbarch_dump: stab_reg_to_regnum = <%s>\n",
777 host_address_to_string (gdbarch->stab_reg_to_regnum));
778 gdb_printf (file,
779 "gdbarch_dump: ecoff_reg_to_regnum = <%s>\n",
780 host_address_to_string (gdbarch->ecoff_reg_to_regnum));
781 gdb_printf (file,
782 "gdbarch_dump: sdb_reg_to_regnum = <%s>\n",
783 host_address_to_string (gdbarch->sdb_reg_to_regnum));
784 gdb_printf (file,
785 "gdbarch_dump: dwarf2_reg_to_regnum = <%s>\n",
786 host_address_to_string (gdbarch->dwarf2_reg_to_regnum));
787 gdb_printf (file,
788 "gdbarch_dump: register_name = <%s>\n",
789 host_address_to_string (gdbarch->register_name));
790 gdb_printf (file,
791 "gdbarch_dump: register_type = <%s>\n",
792 host_address_to_string (gdbarch->register_type));
793 gdb_printf (file,
794 "gdbarch_dump: dummy_id = <%s>\n",
795 host_address_to_string (gdbarch->dummy_id));
796 gdb_printf (file,
797 "gdbarch_dump: deprecated_fp_regnum = %s\n",
798 plongest (gdbarch->deprecated_fp_regnum));
799 gdb_printf (file,
800 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
801 gdbarch_push_dummy_call_p (gdbarch));
802 gdb_printf (file,
803 "gdbarch_dump: push_dummy_call = <%s>\n",
804 host_address_to_string (gdbarch->push_dummy_call));
805 gdb_printf (file,
806 "gdbarch_dump: call_dummy_location = %s\n",
807 plongest (gdbarch->call_dummy_location));
808 gdb_printf (file,
809 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
810 gdbarch_push_dummy_code_p (gdbarch));
811 gdb_printf (file,
812 "gdbarch_dump: push_dummy_code = <%s>\n",
813 host_address_to_string (gdbarch->push_dummy_code));
814 gdb_printf (file,
815 "gdbarch_dump: code_of_frame_writable = <%s>\n",
816 host_address_to_string (gdbarch->code_of_frame_writable));
817 gdb_printf (file,
818 "gdbarch_dump: print_registers_info = <%s>\n",
819 host_address_to_string (gdbarch->print_registers_info));
820 gdb_printf (file,
821 "gdbarch_dump: print_float_info = <%s>\n",
822 host_address_to_string (gdbarch->print_float_info));
823 gdb_printf (file,
824 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
825 gdbarch_print_vector_info_p (gdbarch));
826 gdb_printf (file,
827 "gdbarch_dump: print_vector_info = <%s>\n",
828 host_address_to_string (gdbarch->print_vector_info));
829 gdb_printf (file,
830 "gdbarch_dump: register_sim_regno = <%s>\n",
831 host_address_to_string (gdbarch->register_sim_regno));
832 gdb_printf (file,
833 "gdbarch_dump: cannot_fetch_register = <%s>\n",
834 host_address_to_string (gdbarch->cannot_fetch_register));
835 gdb_printf (file,
836 "gdbarch_dump: cannot_store_register = <%s>\n",
837 host_address_to_string (gdbarch->cannot_store_register));
838 gdb_printf (file,
839 "gdbarch_dump: gdbarch_get_longjmp_target_p() = %d\n",
840 gdbarch_get_longjmp_target_p (gdbarch));
841 gdb_printf (file,
842 "gdbarch_dump: get_longjmp_target = <%s>\n",
843 host_address_to_string (gdbarch->get_longjmp_target));
844 gdb_printf (file,
845 "gdbarch_dump: believe_pcc_promotion = %s\n",
846 plongest (gdbarch->believe_pcc_promotion));
847 gdb_printf (file,
848 "gdbarch_dump: convert_register_p = <%s>\n",
849 host_address_to_string (gdbarch->convert_register_p));
850 gdb_printf (file,
851 "gdbarch_dump: register_to_value = <%s>\n",
852 host_address_to_string (gdbarch->register_to_value));
853 gdb_printf (file,
854 "gdbarch_dump: value_to_register = <%s>\n",
855 host_address_to_string (gdbarch->value_to_register));
856 gdb_printf (file,
857 "gdbarch_dump: value_from_register = <%s>\n",
858 host_address_to_string (gdbarch->value_from_register));
859 gdb_printf (file,
860 "gdbarch_dump: pointer_to_address = <%s>\n",
861 host_address_to_string (gdbarch->pointer_to_address));
862 gdb_printf (file,
863 "gdbarch_dump: address_to_pointer = <%s>\n",
864 host_address_to_string (gdbarch->address_to_pointer));
865 gdb_printf (file,
866 "gdbarch_dump: gdbarch_integer_to_address_p() = %d\n",
867 gdbarch_integer_to_address_p (gdbarch));
868 gdb_printf (file,
869 "gdbarch_dump: integer_to_address = <%s>\n",
870 host_address_to_string (gdbarch->integer_to_address));
871 gdb_printf (file,
872 "gdbarch_dump: gdbarch_return_value_p() = %d\n",
873 gdbarch_return_value_p (gdbarch));
874 gdb_printf (file,
875 "gdbarch_dump: return_value = <%s>\n",
876 host_address_to_string (gdbarch->return_value));
877 gdb_printf (file,
878 "gdbarch_dump: return_in_first_hidden_param_p = <%s>\n",
879 host_address_to_string (gdbarch->return_in_first_hidden_param_p));
880 gdb_printf (file,
881 "gdbarch_dump: skip_prologue = <%s>\n",
882 host_address_to_string (gdbarch->skip_prologue));
883 gdb_printf (file,
884 "gdbarch_dump: gdbarch_skip_main_prologue_p() = %d\n",
885 gdbarch_skip_main_prologue_p (gdbarch));
886 gdb_printf (file,
887 "gdbarch_dump: skip_main_prologue = <%s>\n",
888 host_address_to_string (gdbarch->skip_main_prologue));
889 gdb_printf (file,
890 "gdbarch_dump: gdbarch_skip_entrypoint_p() = %d\n",
891 gdbarch_skip_entrypoint_p (gdbarch));
892 gdb_printf (file,
893 "gdbarch_dump: skip_entrypoint = <%s>\n",
894 host_address_to_string (gdbarch->skip_entrypoint));
895 gdb_printf (file,
896 "gdbarch_dump: inner_than = <%s>\n",
897 host_address_to_string (gdbarch->inner_than));
898 gdb_printf (file,
899 "gdbarch_dump: breakpoint_from_pc = <%s>\n",
900 host_address_to_string (gdbarch->breakpoint_from_pc));
901 gdb_printf (file,
902 "gdbarch_dump: breakpoint_kind_from_pc = <%s>\n",
903 host_address_to_string (gdbarch->breakpoint_kind_from_pc));
904 gdb_printf (file,
905 "gdbarch_dump: sw_breakpoint_from_kind = <%s>\n",
906 host_address_to_string (gdbarch->sw_breakpoint_from_kind));
907 gdb_printf (file,
908 "gdbarch_dump: breakpoint_kind_from_current_state = <%s>\n",
909 host_address_to_string (gdbarch->breakpoint_kind_from_current_state));
910 gdb_printf (file,
911 "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n",
912 gdbarch_adjust_breakpoint_address_p (gdbarch));
913 gdb_printf (file,
914 "gdbarch_dump: adjust_breakpoint_address = <%s>\n",
915 host_address_to_string (gdbarch->adjust_breakpoint_address));
916 gdb_printf (file,
917 "gdbarch_dump: memory_insert_breakpoint = <%s>\n",
918 host_address_to_string (gdbarch->memory_insert_breakpoint));
919 gdb_printf (file,
920 "gdbarch_dump: memory_remove_breakpoint = <%s>\n",
921 host_address_to_string (gdbarch->memory_remove_breakpoint));
922 gdb_printf (file,
923 "gdbarch_dump: decr_pc_after_break = %s\n",
924 core_addr_to_string_nz (gdbarch->decr_pc_after_break));
925 gdb_printf (file,
926 "gdbarch_dump: deprecated_function_start_offset = %s\n",
927 core_addr_to_string_nz (gdbarch->deprecated_function_start_offset));
928 gdb_printf (file,
929 "gdbarch_dump: remote_register_number = <%s>\n",
930 host_address_to_string (gdbarch->remote_register_number));
931 gdb_printf (file,
932 "gdbarch_dump: gdbarch_fetch_tls_load_module_address_p() = %d\n",
933 gdbarch_fetch_tls_load_module_address_p (gdbarch));
934 gdb_printf (file,
935 "gdbarch_dump: fetch_tls_load_module_address = <%s>\n",
936 host_address_to_string (gdbarch->fetch_tls_load_module_address));
937 gdb_printf (file,
938 "gdbarch_dump: gdbarch_get_thread_local_address_p() = %d\n",
939 gdbarch_get_thread_local_address_p (gdbarch));
940 gdb_printf (file,
941 "gdbarch_dump: get_thread_local_address = <%s>\n",
942 host_address_to_string (gdbarch->get_thread_local_address));
943 gdb_printf (file,
944 "gdbarch_dump: frame_args_skip = %s\n",
945 core_addr_to_string_nz (gdbarch->frame_args_skip));
946 gdb_printf (file,
947 "gdbarch_dump: unwind_pc = <%s>\n",
948 host_address_to_string (gdbarch->unwind_pc));
949 gdb_printf (file,
950 "gdbarch_dump: unwind_sp = <%s>\n",
951 host_address_to_string (gdbarch->unwind_sp));
952 gdb_printf (file,
953 "gdbarch_dump: gdbarch_frame_num_args_p() = %d\n",
954 gdbarch_frame_num_args_p (gdbarch));
955 gdb_printf (file,
956 "gdbarch_dump: frame_num_args = <%s>\n",
957 host_address_to_string (gdbarch->frame_num_args));
958 gdb_printf (file,
959 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
960 gdbarch_frame_align_p (gdbarch));
961 gdb_printf (file,
962 "gdbarch_dump: frame_align = <%s>\n",
963 host_address_to_string (gdbarch->frame_align));
964 gdb_printf (file,
965 "gdbarch_dump: stabs_argument_has_addr = <%s>\n",
966 host_address_to_string (gdbarch->stabs_argument_has_addr));
967 gdb_printf (file,
968 "gdbarch_dump: frame_red_zone_size = %s\n",
969 plongest (gdbarch->frame_red_zone_size));
970 gdb_printf (file,
971 "gdbarch_dump: convert_from_func_ptr_addr = <%s>\n",
972 host_address_to_string (gdbarch->convert_from_func_ptr_addr));
973 gdb_printf (file,
974 "gdbarch_dump: addr_bits_remove = <%s>\n",
975 host_address_to_string (gdbarch->addr_bits_remove));
976 gdb_printf (file,
977 "gdbarch_dump: significant_addr_bit = %s\n",
978 plongest (gdbarch->significant_addr_bit));
979 gdb_printf (file,
980 "gdbarch_dump: memtag_to_string = <%s>\n",
981 host_address_to_string (gdbarch->memtag_to_string));
982 gdb_printf (file,
983 "gdbarch_dump: tagged_address_p = <%s>\n",
984 host_address_to_string (gdbarch->tagged_address_p));
985 gdb_printf (file,
986 "gdbarch_dump: memtag_matches_p = <%s>\n",
987 host_address_to_string (gdbarch->memtag_matches_p));
988 gdb_printf (file,
989 "gdbarch_dump: set_memtags = <%s>\n",
990 host_address_to_string (gdbarch->set_memtags));
991 gdb_printf (file,
992 "gdbarch_dump: get_memtag = <%s>\n",
993 host_address_to_string (gdbarch->get_memtag));
994 gdb_printf (file,
995 "gdbarch_dump: memtag_granule_size = %s\n",
996 core_addr_to_string_nz (gdbarch->memtag_granule_size));
997 gdb_printf (file,
998 "gdbarch_dump: gdbarch_software_single_step_p() = %d\n",
999 gdbarch_software_single_step_p (gdbarch));
1000 gdb_printf (file,
1001 "gdbarch_dump: software_single_step = <%s>\n",
1002 host_address_to_string (gdbarch->software_single_step));
1003 gdb_printf (file,
1004 "gdbarch_dump: gdbarch_single_step_through_delay_p() = %d\n",
1005 gdbarch_single_step_through_delay_p (gdbarch));
1006 gdb_printf (file,
1007 "gdbarch_dump: single_step_through_delay = <%s>\n",
1008 host_address_to_string (gdbarch->single_step_through_delay));
1009 gdb_printf (file,
1010 "gdbarch_dump: print_insn = <%s>\n",
1011 host_address_to_string (gdbarch->print_insn));
1012 gdb_printf (file,
1013 "gdbarch_dump: skip_trampoline_code = <%s>\n",
1014 host_address_to_string (gdbarch->skip_trampoline_code));
1015 gdb_printf (file,
1016 "gdbarch_dump: skip_solib_resolver = <%s>\n",
1017 host_address_to_string (gdbarch->skip_solib_resolver));
1018 gdb_printf (file,
1019 "gdbarch_dump: in_solib_return_trampoline = <%s>\n",
1020 host_address_to_string (gdbarch->in_solib_return_trampoline));
1021 gdb_printf (file,
1022 "gdbarch_dump: in_indirect_branch_thunk = <%s>\n",
1023 host_address_to_string (gdbarch->in_indirect_branch_thunk));
1024 gdb_printf (file,
1025 "gdbarch_dump: stack_frame_destroyed_p = <%s>\n",
1026 host_address_to_string (gdbarch->stack_frame_destroyed_p));
1027 gdb_printf (file,
1028 "gdbarch_dump: gdbarch_elf_make_msymbol_special_p() = %d\n",
1029 gdbarch_elf_make_msymbol_special_p (gdbarch));
1030 gdb_printf (file,
1031 "gdbarch_dump: elf_make_msymbol_special = <%s>\n",
1032 host_address_to_string (gdbarch->elf_make_msymbol_special));
1033 gdb_printf (file,
1034 "gdbarch_dump: coff_make_msymbol_special = <%s>\n",
1035 host_address_to_string (gdbarch->coff_make_msymbol_special));
1036 gdb_printf (file,
1037 "gdbarch_dump: make_symbol_special = <%s>\n",
1038 host_address_to_string (gdbarch->make_symbol_special));
1039 gdb_printf (file,
1040 "gdbarch_dump: adjust_dwarf2_addr = <%s>\n",
1041 host_address_to_string (gdbarch->adjust_dwarf2_addr));
1042 gdb_printf (file,
1043 "gdbarch_dump: adjust_dwarf2_line = <%s>\n",
1044 host_address_to_string (gdbarch->adjust_dwarf2_line));
1045 gdb_printf (file,
1046 "gdbarch_dump: cannot_step_breakpoint = %s\n",
1047 plongest (gdbarch->cannot_step_breakpoint));
1048 gdb_printf (file,
1049 "gdbarch_dump: have_nonsteppable_watchpoint = %s\n",
1050 plongest (gdbarch->have_nonsteppable_watchpoint));
1051 gdb_printf (file,
1052 "gdbarch_dump: gdbarch_address_class_type_flags_p() = %d\n",
1053 gdbarch_address_class_type_flags_p (gdbarch));
1054 gdb_printf (file,
1055 "gdbarch_dump: address_class_type_flags = <%s>\n",
1056 host_address_to_string (gdbarch->address_class_type_flags));
1057 gdb_printf (file,
1058 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
1059 gdbarch_address_class_type_flags_to_name_p (gdbarch));
1060 gdb_printf (file,
1061 "gdbarch_dump: address_class_type_flags_to_name = <%s>\n",
1062 host_address_to_string (gdbarch->address_class_type_flags_to_name));
1063 gdb_printf (file,
1064 "gdbarch_dump: execute_dwarf_cfa_vendor_op = <%s>\n",
1065 host_address_to_string (gdbarch->execute_dwarf_cfa_vendor_op));
1066 gdb_printf (file,
1067 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
1068 gdbarch_address_class_name_to_type_flags_p (gdbarch));
1069 gdb_printf (file,
1070 "gdbarch_dump: address_class_name_to_type_flags = <%s>\n",
1071 host_address_to_string (gdbarch->address_class_name_to_type_flags));
1072 gdb_printf (file,
1073 "gdbarch_dump: register_reggroup_p = <%s>\n",
1074 host_address_to_string (gdbarch->register_reggroup_p));
1075 gdb_printf (file,
1076 "gdbarch_dump: gdbarch_fetch_pointer_argument_p() = %d\n",
1077 gdbarch_fetch_pointer_argument_p (gdbarch));
1078 gdb_printf (file,
1079 "gdbarch_dump: fetch_pointer_argument = <%s>\n",
1080 host_address_to_string (gdbarch->fetch_pointer_argument));
1081 gdb_printf (file,
1082 "gdbarch_dump: gdbarch_iterate_over_regset_sections_p() = %d\n",
1083 gdbarch_iterate_over_regset_sections_p (gdbarch));
1084 gdb_printf (file,
1085 "gdbarch_dump: iterate_over_regset_sections = <%s>\n",
1086 host_address_to_string (gdbarch->iterate_over_regset_sections));
1087 gdb_printf (file,
1088 "gdbarch_dump: gdbarch_make_corefile_notes_p() = %d\n",
1089 gdbarch_make_corefile_notes_p (gdbarch));
1090 gdb_printf (file,
1091 "gdbarch_dump: make_corefile_notes = <%s>\n",
1092 host_address_to_string (gdbarch->make_corefile_notes));
1093 gdb_printf (file,
1094 "gdbarch_dump: gdbarch_find_memory_regions_p() = %d\n",
1095 gdbarch_find_memory_regions_p (gdbarch));
1096 gdb_printf (file,
1097 "gdbarch_dump: find_memory_regions = <%s>\n",
1098 host_address_to_string (gdbarch->find_memory_regions));
1099 gdb_printf (file,
1100 "gdbarch_dump: gdbarch_core_xfer_shared_libraries_p() = %d\n",
1101 gdbarch_core_xfer_shared_libraries_p (gdbarch));
1102 gdb_printf (file,
1103 "gdbarch_dump: core_xfer_shared_libraries = <%s>\n",
1104 host_address_to_string (gdbarch->core_xfer_shared_libraries));
1105 gdb_printf (file,
1106 "gdbarch_dump: gdbarch_core_xfer_shared_libraries_aix_p() = %d\n",
1107 gdbarch_core_xfer_shared_libraries_aix_p (gdbarch));
1108 gdb_printf (file,
1109 "gdbarch_dump: core_xfer_shared_libraries_aix = <%s>\n",
1110 host_address_to_string (gdbarch->core_xfer_shared_libraries_aix));
1111 gdb_printf (file,
1112 "gdbarch_dump: gdbarch_core_pid_to_str_p() = %d\n",
1113 gdbarch_core_pid_to_str_p (gdbarch));
1114 gdb_printf (file,
1115 "gdbarch_dump: core_pid_to_str = <%s>\n",
1116 host_address_to_string (gdbarch->core_pid_to_str));
1117 gdb_printf (file,
1118 "gdbarch_dump: gdbarch_core_thread_name_p() = %d\n",
1119 gdbarch_core_thread_name_p (gdbarch));
1120 gdb_printf (file,
1121 "gdbarch_dump: core_thread_name = <%s>\n",
1122 host_address_to_string (gdbarch->core_thread_name));
1123 gdb_printf (file,
1124 "gdbarch_dump: gdbarch_core_xfer_siginfo_p() = %d\n",
1125 gdbarch_core_xfer_siginfo_p (gdbarch));
1126 gdb_printf (file,
1127 "gdbarch_dump: core_xfer_siginfo = <%s>\n",
1128 host_address_to_string (gdbarch->core_xfer_siginfo));
1129 gdb_printf (file,
1130 "gdbarch_dump: gdbarch_gcore_bfd_target_p() = %d\n",
1131 gdbarch_gcore_bfd_target_p (gdbarch));
1132 gdb_printf (file,
1133 "gdbarch_dump: gcore_bfd_target = %s\n",
1134 pstring (gdbarch->gcore_bfd_target));
1135 gdb_printf (file,
1136 "gdbarch_dump: vtable_function_descriptors = %s\n",
1137 plongest (gdbarch->vtable_function_descriptors));
1138 gdb_printf (file,
1139 "gdbarch_dump: vbit_in_delta = %s\n",
1140 plongest (gdbarch->vbit_in_delta));
1141 gdb_printf (file,
1142 "gdbarch_dump: skip_permanent_breakpoint = <%s>\n",
1143 host_address_to_string (gdbarch->skip_permanent_breakpoint));
1144 gdb_printf (file,
1145 "gdbarch_dump: gdbarch_max_insn_length_p() = %d\n",
1146 gdbarch_max_insn_length_p (gdbarch));
1147 gdb_printf (file,
1148 "gdbarch_dump: max_insn_length = %s\n",
1149 plongest (gdbarch->max_insn_length));
1150 gdb_printf (file,
1151 "gdbarch_dump: gdbarch_displaced_step_copy_insn_p() = %d\n",
1152 gdbarch_displaced_step_copy_insn_p (gdbarch));
1153 gdb_printf (file,
1154 "gdbarch_dump: displaced_step_copy_insn = <%s>\n",
1155 host_address_to_string (gdbarch->displaced_step_copy_insn));
1156 gdb_printf (file,
1157 "gdbarch_dump: displaced_step_hw_singlestep = <%s>\n",
1158 host_address_to_string (gdbarch->displaced_step_hw_singlestep));
1159 gdb_printf (file,
1160 "gdbarch_dump: gdbarch_displaced_step_fixup_p() = %d\n",
1161 gdbarch_displaced_step_fixup_p (gdbarch));
1162 gdb_printf (file,
1163 "gdbarch_dump: displaced_step_fixup = <%s>\n",
1164 host_address_to_string (gdbarch->displaced_step_fixup));
1165 gdb_printf (file,
1166 "gdbarch_dump: gdbarch_displaced_step_prepare_p() = %d\n",
1167 gdbarch_displaced_step_prepare_p (gdbarch));
1168 gdb_printf (file,
1169 "gdbarch_dump: displaced_step_prepare = <%s>\n",
1170 host_address_to_string (gdbarch->displaced_step_prepare));
1171 gdb_printf (file,
1172 "gdbarch_dump: displaced_step_finish = <%s>\n",
1173 host_address_to_string (gdbarch->displaced_step_finish));
1174 gdb_printf (file,
1175 "gdbarch_dump: gdbarch_displaced_step_copy_insn_closure_by_addr_p() = %d\n",
1176 gdbarch_displaced_step_copy_insn_closure_by_addr_p (gdbarch));
1177 gdb_printf (file,
1178 "gdbarch_dump: displaced_step_copy_insn_closure_by_addr = <%s>\n",
1179 host_address_to_string (gdbarch->displaced_step_copy_insn_closure_by_addr));
1180 gdb_printf (file,
1181 "gdbarch_dump: displaced_step_restore_all_in_ptid = <%s>\n",
1182 host_address_to_string (gdbarch->displaced_step_restore_all_in_ptid));
1183 gdb_printf (file,
1184 "gdbarch_dump: gdbarch_relocate_instruction_p() = %d\n",
1185 gdbarch_relocate_instruction_p (gdbarch));
1186 gdb_printf (file,
1187 "gdbarch_dump: relocate_instruction = <%s>\n",
1188 host_address_to_string (gdbarch->relocate_instruction));
1189 gdb_printf (file,
1190 "gdbarch_dump: gdbarch_overlay_update_p() = %d\n",
1191 gdbarch_overlay_update_p (gdbarch));
1192 gdb_printf (file,
1193 "gdbarch_dump: overlay_update = <%s>\n",
1194 host_address_to_string (gdbarch->overlay_update));
1195 gdb_printf (file,
1196 "gdbarch_dump: gdbarch_core_read_description_p() = %d\n",
1197 gdbarch_core_read_description_p (gdbarch));
1198 gdb_printf (file,
1199 "gdbarch_dump: core_read_description = <%s>\n",
1200 host_address_to_string (gdbarch->core_read_description));
1201 gdb_printf (file,
1202 "gdbarch_dump: sofun_address_maybe_missing = %s\n",
1203 plongest (gdbarch->sofun_address_maybe_missing));
1204 gdb_printf (file,
1205 "gdbarch_dump: gdbarch_process_record_p() = %d\n",
1206 gdbarch_process_record_p (gdbarch));
1207 gdb_printf (file,
1208 "gdbarch_dump: process_record = <%s>\n",
1209 host_address_to_string (gdbarch->process_record));
1210 gdb_printf (file,
1211 "gdbarch_dump: gdbarch_process_record_signal_p() = %d\n",
1212 gdbarch_process_record_signal_p (gdbarch));
1213 gdb_printf (file,
1214 "gdbarch_dump: process_record_signal = <%s>\n",
1215 host_address_to_string (gdbarch->process_record_signal));
1216 gdb_printf (file,
1217 "gdbarch_dump: gdbarch_gdb_signal_from_target_p() = %d\n",
1218 gdbarch_gdb_signal_from_target_p (gdbarch));
1219 gdb_printf (file,
1220 "gdbarch_dump: gdb_signal_from_target = <%s>\n",
1221 host_address_to_string (gdbarch->gdb_signal_from_target));
1222 gdb_printf (file,
1223 "gdbarch_dump: gdbarch_gdb_signal_to_target_p() = %d\n",
1224 gdbarch_gdb_signal_to_target_p (gdbarch));
1225 gdb_printf (file,
1226 "gdbarch_dump: gdb_signal_to_target = <%s>\n",
1227 host_address_to_string (gdbarch->gdb_signal_to_target));
1228 gdb_printf (file,
1229 "gdbarch_dump: gdbarch_get_siginfo_type_p() = %d\n",
1230 gdbarch_get_siginfo_type_p (gdbarch));
1231 gdb_printf (file,
1232 "gdbarch_dump: get_siginfo_type = <%s>\n",
1233 host_address_to_string (gdbarch->get_siginfo_type));
1234 gdb_printf (file,
1235 "gdbarch_dump: gdbarch_record_special_symbol_p() = %d\n",
1236 gdbarch_record_special_symbol_p (gdbarch));
1237 gdb_printf (file,
1238 "gdbarch_dump: record_special_symbol = <%s>\n",
1239 host_address_to_string (gdbarch->record_special_symbol));
1240 gdb_printf (file,
1241 "gdbarch_dump: gdbarch_get_syscall_number_p() = %d\n",
1242 gdbarch_get_syscall_number_p (gdbarch));
1243 gdb_printf (file,
1244 "gdbarch_dump: get_syscall_number = <%s>\n",
1245 host_address_to_string (gdbarch->get_syscall_number));
1246 gdb_printf (file,
1247 "gdbarch_dump: xml_syscall_file = %s\n",
1248 pstring (gdbarch->xml_syscall_file));
1249 gdb_printf (file,
1250 "gdbarch_dump: syscalls_info = %s\n",
1251 host_address_to_string (gdbarch->syscalls_info));
1252 gdb_printf (file,
1253 "gdbarch_dump: stap_integer_prefixes = %s\n",
1254 pstring_list (gdbarch->stap_integer_prefixes));
1255 gdb_printf (file,
1256 "gdbarch_dump: stap_integer_suffixes = %s\n",
1257 pstring_list (gdbarch->stap_integer_suffixes));
1258 gdb_printf (file,
1259 "gdbarch_dump: stap_register_prefixes = %s\n",
1260 pstring_list (gdbarch->stap_register_prefixes));
1261 gdb_printf (file,
1262 "gdbarch_dump: stap_register_suffixes = %s\n",
1263 pstring_list (gdbarch->stap_register_suffixes));
1264 gdb_printf (file,
1265 "gdbarch_dump: stap_register_indirection_prefixes = %s\n",
1266 pstring_list (gdbarch->stap_register_indirection_prefixes));
1267 gdb_printf (file,
1268 "gdbarch_dump: stap_register_indirection_suffixes = %s\n",
1269 pstring_list (gdbarch->stap_register_indirection_suffixes));
1270 gdb_printf (file,
1271 "gdbarch_dump: stap_gdb_register_prefix = %s\n",
1272 pstring (gdbarch->stap_gdb_register_prefix));
1273 gdb_printf (file,
1274 "gdbarch_dump: stap_gdb_register_suffix = %s\n",
1275 pstring (gdbarch->stap_gdb_register_suffix));
1276 gdb_printf (file,
1277 "gdbarch_dump: gdbarch_stap_is_single_operand_p() = %d\n",
1278 gdbarch_stap_is_single_operand_p (gdbarch));
1279 gdb_printf (file,
1280 "gdbarch_dump: stap_is_single_operand = <%s>\n",
1281 host_address_to_string (gdbarch->stap_is_single_operand));
1282 gdb_printf (file,
1283 "gdbarch_dump: gdbarch_stap_parse_special_token_p() = %d\n",
1284 gdbarch_stap_parse_special_token_p (gdbarch));
1285 gdb_printf (file,
1286 "gdbarch_dump: stap_parse_special_token = <%s>\n",
1287 host_address_to_string (gdbarch->stap_parse_special_token));
1288 gdb_printf (file,
1289 "gdbarch_dump: gdbarch_stap_adjust_register_p() = %d\n",
1290 gdbarch_stap_adjust_register_p (gdbarch));
1291 gdb_printf (file,
1292 "gdbarch_dump: stap_adjust_register = <%s>\n",
1293 host_address_to_string (gdbarch->stap_adjust_register));
1294 gdb_printf (file,
1295 "gdbarch_dump: gdbarch_dtrace_parse_probe_argument_p() = %d\n",
1296 gdbarch_dtrace_parse_probe_argument_p (gdbarch));
1297 gdb_printf (file,
1298 "gdbarch_dump: dtrace_parse_probe_argument = <%s>\n",
1299 host_address_to_string (gdbarch->dtrace_parse_probe_argument));
1300 gdb_printf (file,
1301 "gdbarch_dump: gdbarch_dtrace_probe_is_enabled_p() = %d\n",
1302 gdbarch_dtrace_probe_is_enabled_p (gdbarch));
1303 gdb_printf (file,
1304 "gdbarch_dump: dtrace_probe_is_enabled = <%s>\n",
1305 host_address_to_string (gdbarch->dtrace_probe_is_enabled));
1306 gdb_printf (file,
1307 "gdbarch_dump: gdbarch_dtrace_enable_probe_p() = %d\n",
1308 gdbarch_dtrace_enable_probe_p (gdbarch));
1309 gdb_printf (file,
1310 "gdbarch_dump: dtrace_enable_probe = <%s>\n",
1311 host_address_to_string (gdbarch->dtrace_enable_probe));
1312 gdb_printf (file,
1313 "gdbarch_dump: gdbarch_dtrace_disable_probe_p() = %d\n",
1314 gdbarch_dtrace_disable_probe_p (gdbarch));
1315 gdb_printf (file,
1316 "gdbarch_dump: dtrace_disable_probe = <%s>\n",
1317 host_address_to_string (gdbarch->dtrace_disable_probe));
1318 gdb_printf (file,
1319 "gdbarch_dump: has_global_solist = %s\n",
1320 plongest (gdbarch->has_global_solist));
1321 gdb_printf (file,
1322 "gdbarch_dump: has_global_breakpoints = %s\n",
1323 plongest (gdbarch->has_global_breakpoints));
1324 gdb_printf (file,
1325 "gdbarch_dump: has_shared_address_space = <%s>\n",
1326 host_address_to_string (gdbarch->has_shared_address_space));
1327 gdb_printf (file,
1328 "gdbarch_dump: fast_tracepoint_valid_at = <%s>\n",
1329 host_address_to_string (gdbarch->fast_tracepoint_valid_at));
1330 gdb_printf (file,
1331 "gdbarch_dump: guess_tracepoint_registers = <%s>\n",
1332 host_address_to_string (gdbarch->guess_tracepoint_registers));
1333 gdb_printf (file,
1334 "gdbarch_dump: auto_charset = <%s>\n",
1335 host_address_to_string (gdbarch->auto_charset));
1336 gdb_printf (file,
1337 "gdbarch_dump: auto_wide_charset = <%s>\n",
1338 host_address_to_string (gdbarch->auto_wide_charset));
1339 gdb_printf (file,
1340 "gdbarch_dump: solib_symbols_extension = %s\n",
1341 pstring (gdbarch->solib_symbols_extension));
1342 gdb_printf (file,
1343 "gdbarch_dump: has_dos_based_file_system = %s\n",
1344 plongest (gdbarch->has_dos_based_file_system));
1345 gdb_printf (file,
1346 "gdbarch_dump: gen_return_address = <%s>\n",
1347 host_address_to_string (gdbarch->gen_return_address));
1348 gdb_printf (file,
1349 "gdbarch_dump: gdbarch_info_proc_p() = %d\n",
1350 gdbarch_info_proc_p (gdbarch));
1351 gdb_printf (file,
1352 "gdbarch_dump: info_proc = <%s>\n",
1353 host_address_to_string (gdbarch->info_proc));
1354 gdb_printf (file,
1355 "gdbarch_dump: gdbarch_core_info_proc_p() = %d\n",
1356 gdbarch_core_info_proc_p (gdbarch));
1357 gdb_printf (file,
1358 "gdbarch_dump: core_info_proc = <%s>\n",
1359 host_address_to_string (gdbarch->core_info_proc));
1360 gdb_printf (file,
1361 "gdbarch_dump: iterate_over_objfiles_in_search_order = <%s>\n",
1362 host_address_to_string (gdbarch->iterate_over_objfiles_in_search_order));
1363 gdb_printf (file,
1364 "gdbarch_dump: ravenscar_ops = %s\n",
1365 host_address_to_string (gdbarch->ravenscar_ops));
1366 gdb_printf (file,
1367 "gdbarch_dump: insn_is_call = <%s>\n",
1368 host_address_to_string (gdbarch->insn_is_call));
1369 gdb_printf (file,
1370 "gdbarch_dump: insn_is_ret = <%s>\n",
1371 host_address_to_string (gdbarch->insn_is_ret));
1372 gdb_printf (file,
1373 "gdbarch_dump: insn_is_jump = <%s>\n",
1374 host_address_to_string (gdbarch->insn_is_jump));
1375 gdb_printf (file,
1376 "gdbarch_dump: program_breakpoint_here_p = <%s>\n",
1377 host_address_to_string (gdbarch->program_breakpoint_here_p));
1378 gdb_printf (file,
1379 "gdbarch_dump: gdbarch_auxv_parse_p() = %d\n",
1380 gdbarch_auxv_parse_p (gdbarch));
1381 gdb_printf (file,
1382 "gdbarch_dump: auxv_parse = <%s>\n",
1383 host_address_to_string (gdbarch->auxv_parse));
1384 gdb_printf (file,
1385 "gdbarch_dump: print_auxv_entry = <%s>\n",
1386 host_address_to_string (gdbarch->print_auxv_entry));
1387 gdb_printf (file,
1388 "gdbarch_dump: vsyscall_range = <%s>\n",
1389 host_address_to_string (gdbarch->vsyscall_range));
1390 gdb_printf (file,
1391 "gdbarch_dump: infcall_mmap = <%s>\n",
1392 host_address_to_string (gdbarch->infcall_mmap));
1393 gdb_printf (file,
1394 "gdbarch_dump: infcall_munmap = <%s>\n",
1395 host_address_to_string (gdbarch->infcall_munmap));
1396 gdb_printf (file,
1397 "gdbarch_dump: gcc_target_options = <%s>\n",
1398 host_address_to_string (gdbarch->gcc_target_options));
1399 gdb_printf (file,
1400 "gdbarch_dump: gnu_triplet_regexp = <%s>\n",
1401 host_address_to_string (gdbarch->gnu_triplet_regexp));
1402 gdb_printf (file,
1403 "gdbarch_dump: addressable_memory_unit_size = <%s>\n",
1404 host_address_to_string (gdbarch->addressable_memory_unit_size));
1405 gdb_printf (file,
1406 "gdbarch_dump: disassembler_options_implicit = %s\n",
1407 pstring (gdbarch->disassembler_options_implicit));
1408 gdb_printf (file,
1409 "gdbarch_dump: disassembler_options = %s\n",
1410 pstring_ptr (gdbarch->disassembler_options));
1411 gdb_printf (file,
1412 "gdbarch_dump: valid_disassembler_options = %s\n",
1413 host_address_to_string (gdbarch->valid_disassembler_options));
1414 gdb_printf (file,
1415 "gdbarch_dump: type_align = <%s>\n",
1416 host_address_to_string (gdbarch->type_align));
1417 gdb_printf (file,
1418 "gdbarch_dump: get_pc_address_flags = <%s>\n",
1419 host_address_to_string (gdbarch->get_pc_address_flags));
1420 gdb_printf (file,
1421 "gdbarch_dump: read_core_file_mappings = <%s>\n",
1422 host_address_to_string (gdbarch->read_core_file_mappings));
1423 if (gdbarch->dump_tdep != NULL)
1424 gdbarch->dump_tdep (gdbarch, file);
1428 const struct bfd_arch_info *
1429 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
1431 gdb_assert (gdbarch != NULL);
1432 if (gdbarch_debug >= 2)
1433 gdb_printf (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
1434 return gdbarch->bfd_arch_info;
1437 enum bfd_endian
1438 gdbarch_byte_order (struct gdbarch *gdbarch)
1440 gdb_assert (gdbarch != NULL);
1441 if (gdbarch_debug >= 2)
1442 gdb_printf (gdb_stdlog, "gdbarch_byte_order called\n");
1443 return gdbarch->byte_order;
1446 enum bfd_endian
1447 gdbarch_byte_order_for_code (struct gdbarch *gdbarch)
1449 gdb_assert (gdbarch != NULL);
1450 if (gdbarch_debug >= 2)
1451 gdb_printf (gdb_stdlog, "gdbarch_byte_order_for_code called\n");
1452 return gdbarch->byte_order_for_code;
1455 enum gdb_osabi
1456 gdbarch_osabi (struct gdbarch *gdbarch)
1458 gdb_assert (gdbarch != NULL);
1459 if (gdbarch_debug >= 2)
1460 gdb_printf (gdb_stdlog, "gdbarch_osabi called\n");
1461 return gdbarch->osabi;
1464 const struct target_desc *
1465 gdbarch_target_desc (struct gdbarch *gdbarch)
1467 gdb_assert (gdbarch != NULL);
1468 if (gdbarch_debug >= 2)
1469 gdb_printf (gdb_stdlog, "gdbarch_target_desc called\n");
1470 return gdbarch->target_desc;
1474 gdbarch_short_bit (struct gdbarch *gdbarch)
1476 gdb_assert (gdbarch != NULL);
1477 /* Skip verify of short_bit, invalid_p == 0 */
1478 if (gdbarch_debug >= 2)
1479 gdb_printf (gdb_stdlog, "gdbarch_short_bit called\n");
1480 return gdbarch->short_bit;
1483 void
1484 set_gdbarch_short_bit (struct gdbarch *gdbarch,
1485 int short_bit)
1487 gdbarch->short_bit = short_bit;
1491 gdbarch_int_bit (struct gdbarch *gdbarch)
1493 gdb_assert (gdbarch != NULL);
1494 /* Skip verify of int_bit, invalid_p == 0 */
1495 if (gdbarch_debug >= 2)
1496 gdb_printf (gdb_stdlog, "gdbarch_int_bit called\n");
1497 return gdbarch->int_bit;
1500 void
1501 set_gdbarch_int_bit (struct gdbarch *gdbarch,
1502 int int_bit)
1504 gdbarch->int_bit = int_bit;
1508 gdbarch_long_bit (struct gdbarch *gdbarch)
1510 gdb_assert (gdbarch != NULL);
1511 /* Skip verify of long_bit, invalid_p == 0 */
1512 if (gdbarch_debug >= 2)
1513 gdb_printf (gdb_stdlog, "gdbarch_long_bit called\n");
1514 return gdbarch->long_bit;
1517 void
1518 set_gdbarch_long_bit (struct gdbarch *gdbarch,
1519 int long_bit)
1521 gdbarch->long_bit = long_bit;
1525 gdbarch_long_long_bit (struct gdbarch *gdbarch)
1527 gdb_assert (gdbarch != NULL);
1528 /* Skip verify of long_long_bit, invalid_p == 0 */
1529 if (gdbarch_debug >= 2)
1530 gdb_printf (gdb_stdlog, "gdbarch_long_long_bit called\n");
1531 return gdbarch->long_long_bit;
1534 void
1535 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
1536 int long_long_bit)
1538 gdbarch->long_long_bit = long_long_bit;
1542 gdbarch_bfloat16_bit (struct gdbarch *gdbarch)
1544 gdb_assert (gdbarch != NULL);
1545 /* Skip verify of bfloat16_bit, invalid_p == 0 */
1546 if (gdbarch_debug >= 2)
1547 gdb_printf (gdb_stdlog, "gdbarch_bfloat16_bit called\n");
1548 return gdbarch->bfloat16_bit;
1551 void
1552 set_gdbarch_bfloat16_bit (struct gdbarch *gdbarch,
1553 int bfloat16_bit)
1555 gdbarch->bfloat16_bit = bfloat16_bit;
1558 const struct floatformat **
1559 gdbarch_bfloat16_format (struct gdbarch *gdbarch)
1561 gdb_assert (gdbarch != NULL);
1562 if (gdbarch_debug >= 2)
1563 gdb_printf (gdb_stdlog, "gdbarch_bfloat16_format called\n");
1564 return gdbarch->bfloat16_format;
1567 void
1568 set_gdbarch_bfloat16_format (struct gdbarch *gdbarch,
1569 const struct floatformat ** bfloat16_format)
1571 gdbarch->bfloat16_format = bfloat16_format;
1575 gdbarch_half_bit (struct gdbarch *gdbarch)
1577 gdb_assert (gdbarch != NULL);
1578 /* Skip verify of half_bit, invalid_p == 0 */
1579 if (gdbarch_debug >= 2)
1580 gdb_printf (gdb_stdlog, "gdbarch_half_bit called\n");
1581 return gdbarch->half_bit;
1584 void
1585 set_gdbarch_half_bit (struct gdbarch *gdbarch,
1586 int half_bit)
1588 gdbarch->half_bit = half_bit;
1591 const struct floatformat **
1592 gdbarch_half_format (struct gdbarch *gdbarch)
1594 gdb_assert (gdbarch != NULL);
1595 if (gdbarch_debug >= 2)
1596 gdb_printf (gdb_stdlog, "gdbarch_half_format called\n");
1597 return gdbarch->half_format;
1600 void
1601 set_gdbarch_half_format (struct gdbarch *gdbarch,
1602 const struct floatformat ** half_format)
1604 gdbarch->half_format = half_format;
1608 gdbarch_float_bit (struct gdbarch *gdbarch)
1610 gdb_assert (gdbarch != NULL);
1611 /* Skip verify of float_bit, invalid_p == 0 */
1612 if (gdbarch_debug >= 2)
1613 gdb_printf (gdb_stdlog, "gdbarch_float_bit called\n");
1614 return gdbarch->float_bit;
1617 void
1618 set_gdbarch_float_bit (struct gdbarch *gdbarch,
1619 int float_bit)
1621 gdbarch->float_bit = float_bit;
1624 const struct floatformat **
1625 gdbarch_float_format (struct gdbarch *gdbarch)
1627 gdb_assert (gdbarch != NULL);
1628 if (gdbarch_debug >= 2)
1629 gdb_printf (gdb_stdlog, "gdbarch_float_format called\n");
1630 return gdbarch->float_format;
1633 void
1634 set_gdbarch_float_format (struct gdbarch *gdbarch,
1635 const struct floatformat ** float_format)
1637 gdbarch->float_format = float_format;
1641 gdbarch_double_bit (struct gdbarch *gdbarch)
1643 gdb_assert (gdbarch != NULL);
1644 /* Skip verify of double_bit, invalid_p == 0 */
1645 if (gdbarch_debug >= 2)
1646 gdb_printf (gdb_stdlog, "gdbarch_double_bit called\n");
1647 return gdbarch->double_bit;
1650 void
1651 set_gdbarch_double_bit (struct gdbarch *gdbarch,
1652 int double_bit)
1654 gdbarch->double_bit = double_bit;
1657 const struct floatformat **
1658 gdbarch_double_format (struct gdbarch *gdbarch)
1660 gdb_assert (gdbarch != NULL);
1661 if (gdbarch_debug >= 2)
1662 gdb_printf (gdb_stdlog, "gdbarch_double_format called\n");
1663 return gdbarch->double_format;
1666 void
1667 set_gdbarch_double_format (struct gdbarch *gdbarch,
1668 const struct floatformat ** double_format)
1670 gdbarch->double_format = double_format;
1674 gdbarch_long_double_bit (struct gdbarch *gdbarch)
1676 gdb_assert (gdbarch != NULL);
1677 /* Skip verify of long_double_bit, invalid_p == 0 */
1678 if (gdbarch_debug >= 2)
1679 gdb_printf (gdb_stdlog, "gdbarch_long_double_bit called\n");
1680 return gdbarch->long_double_bit;
1683 void
1684 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
1685 int long_double_bit)
1687 gdbarch->long_double_bit = long_double_bit;
1690 const struct floatformat **
1691 gdbarch_long_double_format (struct gdbarch *gdbarch)
1693 gdb_assert (gdbarch != NULL);
1694 if (gdbarch_debug >= 2)
1695 gdb_printf (gdb_stdlog, "gdbarch_long_double_format called\n");
1696 return gdbarch->long_double_format;
1699 void
1700 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
1701 const struct floatformat ** long_double_format)
1703 gdbarch->long_double_format = long_double_format;
1707 gdbarch_wchar_bit (struct gdbarch *gdbarch)
1709 gdb_assert (gdbarch != NULL);
1710 /* Skip verify of wchar_bit, invalid_p == 0 */
1711 if (gdbarch_debug >= 2)
1712 gdb_printf (gdb_stdlog, "gdbarch_wchar_bit called\n");
1713 return gdbarch->wchar_bit;
1716 void
1717 set_gdbarch_wchar_bit (struct gdbarch *gdbarch,
1718 int wchar_bit)
1720 gdbarch->wchar_bit = wchar_bit;
1724 gdbarch_wchar_signed (struct gdbarch *gdbarch)
1726 gdb_assert (gdbarch != NULL);
1727 /* Check variable changed from pre-default. */
1728 gdb_assert (gdbarch->wchar_signed != -1);
1729 if (gdbarch_debug >= 2)
1730 gdb_printf (gdb_stdlog, "gdbarch_wchar_signed called\n");
1731 return gdbarch->wchar_signed;
1734 void
1735 set_gdbarch_wchar_signed (struct gdbarch *gdbarch,
1736 int wchar_signed)
1738 gdbarch->wchar_signed = wchar_signed;
1741 const struct floatformat **
1742 gdbarch_floatformat_for_type (struct gdbarch *gdbarch, const char *name, int length)
1744 gdb_assert (gdbarch != NULL);
1745 gdb_assert (gdbarch->floatformat_for_type != NULL);
1746 if (gdbarch_debug >= 2)
1747 gdb_printf (gdb_stdlog, "gdbarch_floatformat_for_type called\n");
1748 return gdbarch->floatformat_for_type (gdbarch, name, length);
1751 void
1752 set_gdbarch_floatformat_for_type (struct gdbarch *gdbarch,
1753 gdbarch_floatformat_for_type_ftype floatformat_for_type)
1755 gdbarch->floatformat_for_type = floatformat_for_type;
1759 gdbarch_ptr_bit (struct gdbarch *gdbarch)
1761 gdb_assert (gdbarch != NULL);
1762 /* Skip verify of ptr_bit, invalid_p == 0 */
1763 if (gdbarch_debug >= 2)
1764 gdb_printf (gdb_stdlog, "gdbarch_ptr_bit called\n");
1765 return gdbarch->ptr_bit;
1768 void
1769 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
1770 int ptr_bit)
1772 gdbarch->ptr_bit = ptr_bit;
1776 gdbarch_addr_bit (struct gdbarch *gdbarch)
1778 gdb_assert (gdbarch != NULL);
1779 /* Check variable changed from pre-default. */
1780 gdb_assert (gdbarch->addr_bit != 0);
1781 if (gdbarch_debug >= 2)
1782 gdb_printf (gdb_stdlog, "gdbarch_addr_bit called\n");
1783 return gdbarch->addr_bit;
1786 void
1787 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
1788 int addr_bit)
1790 gdbarch->addr_bit = addr_bit;
1794 gdbarch_dwarf2_addr_size (struct gdbarch *gdbarch)
1796 gdb_assert (gdbarch != NULL);
1797 /* Check variable changed from pre-default. */
1798 gdb_assert (gdbarch->dwarf2_addr_size != 0);
1799 if (gdbarch_debug >= 2)
1800 gdb_printf (gdb_stdlog, "gdbarch_dwarf2_addr_size called\n");
1801 return gdbarch->dwarf2_addr_size;
1804 void
1805 set_gdbarch_dwarf2_addr_size (struct gdbarch *gdbarch,
1806 int dwarf2_addr_size)
1808 gdbarch->dwarf2_addr_size = dwarf2_addr_size;
1812 gdbarch_char_signed (struct gdbarch *gdbarch)
1814 gdb_assert (gdbarch != NULL);
1815 /* Check variable changed from pre-default. */
1816 gdb_assert (gdbarch->char_signed != -1);
1817 if (gdbarch_debug >= 2)
1818 gdb_printf (gdb_stdlog, "gdbarch_char_signed called\n");
1819 return gdbarch->char_signed;
1822 void
1823 set_gdbarch_char_signed (struct gdbarch *gdbarch,
1824 int char_signed)
1826 gdbarch->char_signed = char_signed;
1829 bool
1830 gdbarch_read_pc_p (struct gdbarch *gdbarch)
1832 gdb_assert (gdbarch != NULL);
1833 return gdbarch->read_pc != NULL;
1836 CORE_ADDR
1837 gdbarch_read_pc (struct gdbarch *gdbarch, readable_regcache *regcache)
1839 gdb_assert (gdbarch != NULL);
1840 gdb_assert (gdbarch->read_pc != NULL);
1841 if (gdbarch_debug >= 2)
1842 gdb_printf (gdb_stdlog, "gdbarch_read_pc called\n");
1843 return gdbarch->read_pc (regcache);
1846 void
1847 set_gdbarch_read_pc (struct gdbarch *gdbarch,
1848 gdbarch_read_pc_ftype read_pc)
1850 gdbarch->read_pc = read_pc;
1853 bool
1854 gdbarch_write_pc_p (struct gdbarch *gdbarch)
1856 gdb_assert (gdbarch != NULL);
1857 return gdbarch->write_pc != NULL;
1860 void
1861 gdbarch_write_pc (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR val)
1863 gdb_assert (gdbarch != NULL);
1864 gdb_assert (gdbarch->write_pc != NULL);
1865 if (gdbarch_debug >= 2)
1866 gdb_printf (gdb_stdlog, "gdbarch_write_pc called\n");
1867 gdbarch->write_pc (regcache, val);
1870 void
1871 set_gdbarch_write_pc (struct gdbarch *gdbarch,
1872 gdbarch_write_pc_ftype write_pc)
1874 gdbarch->write_pc = write_pc;
1877 void
1878 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
1880 gdb_assert (gdbarch != NULL);
1881 gdb_assert (gdbarch->virtual_frame_pointer != NULL);
1882 if (gdbarch_debug >= 2)
1883 gdb_printf (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
1884 gdbarch->virtual_frame_pointer (gdbarch, pc, frame_regnum, frame_offset);
1887 void
1888 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
1889 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
1891 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
1894 bool
1895 gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
1897 gdb_assert (gdbarch != NULL);
1898 return gdbarch->pseudo_register_read != NULL;
1901 enum register_status
1902 gdbarch_pseudo_register_read (struct gdbarch *gdbarch, readable_regcache *regcache, int cookednum, gdb_byte *buf)
1904 gdb_assert (gdbarch != NULL);
1905 gdb_assert (gdbarch->pseudo_register_read != NULL);
1906 if (gdbarch_debug >= 2)
1907 gdb_printf (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
1908 return gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
1911 void
1912 set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
1913 gdbarch_pseudo_register_read_ftype pseudo_register_read)
1915 gdbarch->pseudo_register_read = pseudo_register_read;
1918 bool
1919 gdbarch_pseudo_register_read_value_p (struct gdbarch *gdbarch)
1921 gdb_assert (gdbarch != NULL);
1922 return gdbarch->pseudo_register_read_value != NULL;
1925 struct value *
1926 gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch, readable_regcache *regcache, int cookednum)
1928 gdb_assert (gdbarch != NULL);
1929 gdb_assert (gdbarch->pseudo_register_read_value != NULL);
1930 if (gdbarch_debug >= 2)
1931 gdb_printf (gdb_stdlog, "gdbarch_pseudo_register_read_value called\n");
1932 return gdbarch->pseudo_register_read_value (gdbarch, regcache, cookednum);
1935 void
1936 set_gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch,
1937 gdbarch_pseudo_register_read_value_ftype pseudo_register_read_value)
1939 gdbarch->pseudo_register_read_value = pseudo_register_read_value;
1942 bool
1943 gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
1945 gdb_assert (gdbarch != NULL);
1946 return gdbarch->pseudo_register_write != NULL;
1949 void
1950 gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const gdb_byte *buf)
1952 gdb_assert (gdbarch != NULL);
1953 gdb_assert (gdbarch->pseudo_register_write != NULL);
1954 if (gdbarch_debug >= 2)
1955 gdb_printf (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
1956 gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
1959 void
1960 set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
1961 gdbarch_pseudo_register_write_ftype pseudo_register_write)
1963 gdbarch->pseudo_register_write = pseudo_register_write;
1967 gdbarch_num_regs (struct gdbarch *gdbarch)
1969 gdb_assert (gdbarch != NULL);
1970 /* Check variable changed from pre-default. */
1971 gdb_assert (gdbarch->num_regs != -1);
1972 if (gdbarch_debug >= 2)
1973 gdb_printf (gdb_stdlog, "gdbarch_num_regs called\n");
1974 return gdbarch->num_regs;
1977 void
1978 set_gdbarch_num_regs (struct gdbarch *gdbarch,
1979 int num_regs)
1981 gdbarch->num_regs = num_regs;
1985 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
1987 gdb_assert (gdbarch != NULL);
1988 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
1989 if (gdbarch_debug >= 2)
1990 gdb_printf (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
1991 return gdbarch->num_pseudo_regs;
1994 void
1995 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
1996 int num_pseudo_regs)
1998 gdbarch->num_pseudo_regs = num_pseudo_regs;
2001 bool
2002 gdbarch_ax_pseudo_register_collect_p (struct gdbarch *gdbarch)
2004 gdb_assert (gdbarch != NULL);
2005 return gdbarch->ax_pseudo_register_collect != NULL;
2009 gdbarch_ax_pseudo_register_collect (struct gdbarch *gdbarch, struct agent_expr *ax, int reg)
2011 gdb_assert (gdbarch != NULL);
2012 gdb_assert (gdbarch->ax_pseudo_register_collect != NULL);
2013 if (gdbarch_debug >= 2)
2014 gdb_printf (gdb_stdlog, "gdbarch_ax_pseudo_register_collect called\n");
2015 return gdbarch->ax_pseudo_register_collect (gdbarch, ax, reg);
2018 void
2019 set_gdbarch_ax_pseudo_register_collect (struct gdbarch *gdbarch,
2020 gdbarch_ax_pseudo_register_collect_ftype ax_pseudo_register_collect)
2022 gdbarch->ax_pseudo_register_collect = ax_pseudo_register_collect;
2025 bool
2026 gdbarch_ax_pseudo_register_push_stack_p (struct gdbarch *gdbarch)
2028 gdb_assert (gdbarch != NULL);
2029 return gdbarch->ax_pseudo_register_push_stack != NULL;
2033 gdbarch_ax_pseudo_register_push_stack (struct gdbarch *gdbarch, struct agent_expr *ax, int reg)
2035 gdb_assert (gdbarch != NULL);
2036 gdb_assert (gdbarch->ax_pseudo_register_push_stack != NULL);
2037 if (gdbarch_debug >= 2)
2038 gdb_printf (gdb_stdlog, "gdbarch_ax_pseudo_register_push_stack called\n");
2039 return gdbarch->ax_pseudo_register_push_stack (gdbarch, ax, reg);
2042 void
2043 set_gdbarch_ax_pseudo_register_push_stack (struct gdbarch *gdbarch,
2044 gdbarch_ax_pseudo_register_push_stack_ftype ax_pseudo_register_push_stack)
2046 gdbarch->ax_pseudo_register_push_stack = ax_pseudo_register_push_stack;
2049 bool
2050 gdbarch_report_signal_info_p (struct gdbarch *gdbarch)
2052 gdb_assert (gdbarch != NULL);
2053 return gdbarch->report_signal_info != NULL;
2056 void
2057 gdbarch_report_signal_info (struct gdbarch *gdbarch, struct ui_out *uiout, enum gdb_signal siggnal)
2059 gdb_assert (gdbarch != NULL);
2060 gdb_assert (gdbarch->report_signal_info != NULL);
2061 if (gdbarch_debug >= 2)
2062 gdb_printf (gdb_stdlog, "gdbarch_report_signal_info called\n");
2063 gdbarch->report_signal_info (gdbarch, uiout, siggnal);
2066 void
2067 set_gdbarch_report_signal_info (struct gdbarch *gdbarch,
2068 gdbarch_report_signal_info_ftype report_signal_info)
2070 gdbarch->report_signal_info = report_signal_info;
2074 gdbarch_sp_regnum (struct gdbarch *gdbarch)
2076 gdb_assert (gdbarch != NULL);
2077 /* Skip verify of sp_regnum, invalid_p == 0 */
2078 if (gdbarch_debug >= 2)
2079 gdb_printf (gdb_stdlog, "gdbarch_sp_regnum called\n");
2080 return gdbarch->sp_regnum;
2083 void
2084 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
2085 int sp_regnum)
2087 gdbarch->sp_regnum = sp_regnum;
2091 gdbarch_pc_regnum (struct gdbarch *gdbarch)
2093 gdb_assert (gdbarch != NULL);
2094 /* Skip verify of pc_regnum, invalid_p == 0 */
2095 if (gdbarch_debug >= 2)
2096 gdb_printf (gdb_stdlog, "gdbarch_pc_regnum called\n");
2097 return gdbarch->pc_regnum;
2100 void
2101 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
2102 int pc_regnum)
2104 gdbarch->pc_regnum = pc_regnum;
2108 gdbarch_ps_regnum (struct gdbarch *gdbarch)
2110 gdb_assert (gdbarch != NULL);
2111 /* Skip verify of ps_regnum, invalid_p == 0 */
2112 if (gdbarch_debug >= 2)
2113 gdb_printf (gdb_stdlog, "gdbarch_ps_regnum called\n");
2114 return gdbarch->ps_regnum;
2117 void
2118 set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
2119 int ps_regnum)
2121 gdbarch->ps_regnum = ps_regnum;
2125 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
2127 gdb_assert (gdbarch != NULL);
2128 /* Skip verify of fp0_regnum, invalid_p == 0 */
2129 if (gdbarch_debug >= 2)
2130 gdb_printf (gdb_stdlog, "gdbarch_fp0_regnum called\n");
2131 return gdbarch->fp0_regnum;
2134 void
2135 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
2136 int fp0_regnum)
2138 gdbarch->fp0_regnum = fp0_regnum;
2142 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
2144 gdb_assert (gdbarch != NULL);
2145 gdb_assert (gdbarch->stab_reg_to_regnum != NULL);
2146 if (gdbarch_debug >= 2)
2147 gdb_printf (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
2148 return gdbarch->stab_reg_to_regnum (gdbarch, stab_regnr);
2151 void
2152 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
2153 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
2155 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
2159 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
2161 gdb_assert (gdbarch != NULL);
2162 gdb_assert (gdbarch->ecoff_reg_to_regnum != NULL);
2163 if (gdbarch_debug >= 2)
2164 gdb_printf (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
2165 return gdbarch->ecoff_reg_to_regnum (gdbarch, ecoff_regnr);
2168 void
2169 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
2170 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
2172 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
2176 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
2178 gdb_assert (gdbarch != NULL);
2179 gdb_assert (gdbarch->sdb_reg_to_regnum != NULL);
2180 if (gdbarch_debug >= 2)
2181 gdb_printf (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
2182 return gdbarch->sdb_reg_to_regnum (gdbarch, sdb_regnr);
2185 void
2186 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
2187 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
2189 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
2193 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
2195 gdb_assert (gdbarch != NULL);
2196 gdb_assert (gdbarch->dwarf2_reg_to_regnum != NULL);
2197 if (gdbarch_debug >= 2)
2198 gdb_printf (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
2199 return gdbarch->dwarf2_reg_to_regnum (gdbarch, dwarf2_regnr);
2202 void
2203 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
2204 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
2206 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
2209 const char *
2210 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
2212 gdb_assert (gdbarch != NULL);
2213 gdb_assert (gdbarch->register_name != NULL);
2214 if (gdbarch_debug >= 2)
2215 gdb_printf (gdb_stdlog, "gdbarch_register_name called\n");
2216 return gdbarch->register_name (gdbarch, regnr);
2219 void
2220 set_gdbarch_register_name (struct gdbarch *gdbarch,
2221 gdbarch_register_name_ftype register_name)
2223 gdbarch->register_name = register_name;
2226 struct type *
2227 gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
2229 gdb_assert (gdbarch != NULL);
2230 gdb_assert (gdbarch->register_type != NULL);
2231 if (gdbarch_debug >= 2)
2232 gdb_printf (gdb_stdlog, "gdbarch_register_type called\n");
2233 return gdbarch->register_type (gdbarch, reg_nr);
2236 void
2237 set_gdbarch_register_type (struct gdbarch *gdbarch,
2238 gdbarch_register_type_ftype register_type)
2240 gdbarch->register_type = register_type;
2243 struct frame_id
2244 gdbarch_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
2246 gdb_assert (gdbarch != NULL);
2247 gdb_assert (gdbarch->dummy_id != NULL);
2248 if (gdbarch_debug >= 2)
2249 gdb_printf (gdb_stdlog, "gdbarch_dummy_id called\n");
2250 return gdbarch->dummy_id (gdbarch, this_frame);
2253 void
2254 set_gdbarch_dummy_id (struct gdbarch *gdbarch,
2255 gdbarch_dummy_id_ftype dummy_id)
2257 gdbarch->dummy_id = dummy_id;
2261 gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch)
2263 gdb_assert (gdbarch != NULL);
2264 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
2265 if (gdbarch_debug >= 2)
2266 gdb_printf (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n");
2267 return gdbarch->deprecated_fp_regnum;
2270 void
2271 set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch,
2272 int deprecated_fp_regnum)
2274 gdbarch->deprecated_fp_regnum = deprecated_fp_regnum;
2277 bool
2278 gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
2280 gdb_assert (gdbarch != NULL);
2281 return gdbarch->push_dummy_call != NULL;
2284 CORE_ADDR
2285 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 gdb_assert (gdbarch != NULL);
2288 gdb_assert (gdbarch->push_dummy_call != NULL);
2289 if (gdbarch_debug >= 2)
2290 gdb_printf (gdb_stdlog, "gdbarch_push_dummy_call called\n");
2291 return gdbarch->push_dummy_call (gdbarch, function, regcache, bp_addr, nargs, args, sp, return_method, struct_addr);
2294 void
2295 set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
2296 gdbarch_push_dummy_call_ftype push_dummy_call)
2298 gdbarch->push_dummy_call = push_dummy_call;
2302 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
2304 gdb_assert (gdbarch != NULL);
2305 /* Skip verify of call_dummy_location, invalid_p == 0 */
2306 if (gdbarch_debug >= 2)
2307 gdb_printf (gdb_stdlog, "gdbarch_call_dummy_location called\n");
2308 return gdbarch->call_dummy_location;
2311 void
2312 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
2313 int call_dummy_location)
2315 gdbarch->call_dummy_location = call_dummy_location;
2318 bool
2319 gdbarch_push_dummy_code_p (struct gdbarch *gdbarch)
2321 gdb_assert (gdbarch != NULL);
2322 return gdbarch->push_dummy_code != NULL;
2325 CORE_ADDR
2326 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 gdb_assert (gdbarch != NULL);
2329 gdb_assert (gdbarch->push_dummy_code != NULL);
2330 if (gdbarch_debug >= 2)
2331 gdb_printf (gdb_stdlog, "gdbarch_push_dummy_code called\n");
2332 return gdbarch->push_dummy_code (gdbarch, sp, funaddr, args, nargs, value_type, real_pc, bp_addr, regcache);
2335 void
2336 set_gdbarch_push_dummy_code (struct gdbarch *gdbarch,
2337 gdbarch_push_dummy_code_ftype push_dummy_code)
2339 gdbarch->push_dummy_code = push_dummy_code;
2343 gdbarch_code_of_frame_writable (struct gdbarch *gdbarch, struct frame_info *frame)
2345 gdb_assert (gdbarch != NULL);
2346 gdb_assert (gdbarch->code_of_frame_writable != NULL);
2347 if (gdbarch_debug >= 2)
2348 gdb_printf (gdb_stdlog, "gdbarch_code_of_frame_writable called\n");
2349 return gdbarch->code_of_frame_writable (gdbarch, frame);
2352 void
2353 set_gdbarch_code_of_frame_writable (struct gdbarch *gdbarch,
2354 gdbarch_code_of_frame_writable_ftype code_of_frame_writable)
2356 gdbarch->code_of_frame_writable = code_of_frame_writable;
2359 void
2360 gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
2362 gdb_assert (gdbarch != NULL);
2363 gdb_assert (gdbarch->print_registers_info != NULL);
2364 if (gdbarch_debug >= 2)
2365 gdb_printf (gdb_stdlog, "gdbarch_print_registers_info called\n");
2366 gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
2369 void
2370 set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
2371 gdbarch_print_registers_info_ftype print_registers_info)
2373 gdbarch->print_registers_info = print_registers_info;
2376 void
2377 gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
2379 gdb_assert (gdbarch != NULL);
2380 gdb_assert (gdbarch->print_float_info != NULL);
2381 if (gdbarch_debug >= 2)
2382 gdb_printf (gdb_stdlog, "gdbarch_print_float_info called\n");
2383 gdbarch->print_float_info (gdbarch, file, frame, args);
2386 void
2387 set_gdbarch_print_float_info (struct gdbarch *gdbarch,
2388 gdbarch_print_float_info_ftype print_float_info)
2390 gdbarch->print_float_info = print_float_info;
2393 bool
2394 gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
2396 gdb_assert (gdbarch != NULL);
2397 return gdbarch->print_vector_info != NULL;
2400 void
2401 gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
2403 gdb_assert (gdbarch != NULL);
2404 gdb_assert (gdbarch->print_vector_info != NULL);
2405 if (gdbarch_debug >= 2)
2406 gdb_printf (gdb_stdlog, "gdbarch_print_vector_info called\n");
2407 gdbarch->print_vector_info (gdbarch, file, frame, args);
2410 void
2411 set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
2412 gdbarch_print_vector_info_ftype print_vector_info)
2414 gdbarch->print_vector_info = print_vector_info;
2418 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
2420 gdb_assert (gdbarch != NULL);
2421 gdb_assert (gdbarch->register_sim_regno != NULL);
2422 if (gdbarch_debug >= 2)
2423 gdb_printf (gdb_stdlog, "gdbarch_register_sim_regno called\n");
2424 return gdbarch->register_sim_regno (gdbarch, reg_nr);
2427 void
2428 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
2429 gdbarch_register_sim_regno_ftype register_sim_regno)
2431 gdbarch->register_sim_regno = register_sim_regno;
2435 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
2437 gdb_assert (gdbarch != NULL);
2438 gdb_assert (gdbarch->cannot_fetch_register != NULL);
2439 if (gdbarch_debug >= 2)
2440 gdb_printf (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
2441 return gdbarch->cannot_fetch_register (gdbarch, regnum);
2444 void
2445 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
2446 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
2448 gdbarch->cannot_fetch_register = cannot_fetch_register;
2452 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
2454 gdb_assert (gdbarch != NULL);
2455 gdb_assert (gdbarch->cannot_store_register != NULL);
2456 if (gdbarch_debug >= 2)
2457 gdb_printf (gdb_stdlog, "gdbarch_cannot_store_register called\n");
2458 return gdbarch->cannot_store_register (gdbarch, regnum);
2461 void
2462 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
2463 gdbarch_cannot_store_register_ftype cannot_store_register)
2465 gdbarch->cannot_store_register = cannot_store_register;
2468 bool
2469 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
2471 gdb_assert (gdbarch != NULL);
2472 return gdbarch->get_longjmp_target != NULL;
2476 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR *pc)
2478 gdb_assert (gdbarch != NULL);
2479 gdb_assert (gdbarch->get_longjmp_target != NULL);
2480 if (gdbarch_debug >= 2)
2481 gdb_printf (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
2482 return gdbarch->get_longjmp_target (frame, pc);
2485 void
2486 set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
2487 gdbarch_get_longjmp_target_ftype get_longjmp_target)
2489 gdbarch->get_longjmp_target = get_longjmp_target;
2493 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
2495 gdb_assert (gdbarch != NULL);
2496 /* Skip verify of believe_pcc_promotion, invalid_p == 0 */
2497 if (gdbarch_debug >= 2)
2498 gdb_printf (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
2499 return gdbarch->believe_pcc_promotion;
2502 void
2503 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
2504 int believe_pcc_promotion)
2506 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
2510 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
2512 gdb_assert (gdbarch != NULL);
2513 gdb_assert (gdbarch->convert_register_p != NULL);
2514 if (gdbarch_debug >= 2)
2515 gdb_printf (gdb_stdlog, "gdbarch_convert_register_p called\n");
2516 return gdbarch->convert_register_p (gdbarch, regnum, type);
2519 void
2520 set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
2521 gdbarch_convert_register_p_ftype convert_register_p)
2523 gdbarch->convert_register_p = convert_register_p;
2527 gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, gdb_byte *buf, int *optimizedp, int *unavailablep)
2529 gdb_assert (gdbarch != NULL);
2530 gdb_assert (gdbarch->register_to_value != NULL);
2531 if (gdbarch_debug >= 2)
2532 gdb_printf (gdb_stdlog, "gdbarch_register_to_value called\n");
2533 return gdbarch->register_to_value (frame, regnum, type, buf, optimizedp, unavailablep);
2536 void
2537 set_gdbarch_register_to_value (struct gdbarch *gdbarch,
2538 gdbarch_register_to_value_ftype register_to_value)
2540 gdbarch->register_to_value = register_to_value;
2543 void
2544 gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const gdb_byte *buf)
2546 gdb_assert (gdbarch != NULL);
2547 gdb_assert (gdbarch->value_to_register != NULL);
2548 if (gdbarch_debug >= 2)
2549 gdb_printf (gdb_stdlog, "gdbarch_value_to_register called\n");
2550 gdbarch->value_to_register (frame, regnum, type, buf);
2553 void
2554 set_gdbarch_value_to_register (struct gdbarch *gdbarch,
2555 gdbarch_value_to_register_ftype value_to_register)
2557 gdbarch->value_to_register = value_to_register;
2560 struct value *
2561 gdbarch_value_from_register (struct gdbarch *gdbarch, struct type *type, int regnum, struct frame_id frame_id)
2563 gdb_assert (gdbarch != NULL);
2564 gdb_assert (gdbarch->value_from_register != NULL);
2565 if (gdbarch_debug >= 2)
2566 gdb_printf (gdb_stdlog, "gdbarch_value_from_register called\n");
2567 return gdbarch->value_from_register (gdbarch, type, regnum, frame_id);
2570 void
2571 set_gdbarch_value_from_register (struct gdbarch *gdbarch,
2572 gdbarch_value_from_register_ftype value_from_register)
2574 gdbarch->value_from_register = value_from_register;
2577 CORE_ADDR
2578 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
2580 gdb_assert (gdbarch != NULL);
2581 gdb_assert (gdbarch->pointer_to_address != NULL);
2582 if (gdbarch_debug >= 2)
2583 gdb_printf (gdb_stdlog, "gdbarch_pointer_to_address called\n");
2584 return gdbarch->pointer_to_address (gdbarch, type, buf);
2587 void
2588 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
2589 gdbarch_pointer_to_address_ftype pointer_to_address)
2591 gdbarch->pointer_to_address = pointer_to_address;
2594 void
2595 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, gdb_byte *buf, CORE_ADDR addr)
2597 gdb_assert (gdbarch != NULL);
2598 gdb_assert (gdbarch->address_to_pointer != NULL);
2599 if (gdbarch_debug >= 2)
2600 gdb_printf (gdb_stdlog, "gdbarch_address_to_pointer called\n");
2601 gdbarch->address_to_pointer (gdbarch, type, buf, addr);
2604 void
2605 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
2606 gdbarch_address_to_pointer_ftype address_to_pointer)
2608 gdbarch->address_to_pointer = address_to_pointer;
2611 bool
2612 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
2614 gdb_assert (gdbarch != NULL);
2615 return gdbarch->integer_to_address != NULL;
2618 CORE_ADDR
2619 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
2621 gdb_assert (gdbarch != NULL);
2622 gdb_assert (gdbarch->integer_to_address != NULL);
2623 if (gdbarch_debug >= 2)
2624 gdb_printf (gdb_stdlog, "gdbarch_integer_to_address called\n");
2625 return gdbarch->integer_to_address (gdbarch, type, buf);
2628 void
2629 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
2630 gdbarch_integer_to_address_ftype integer_to_address)
2632 gdbarch->integer_to_address = integer_to_address;
2635 bool
2636 gdbarch_return_value_p (struct gdbarch *gdbarch)
2638 gdb_assert (gdbarch != NULL);
2639 return gdbarch->return_value != NULL;
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)
2645 gdb_assert (gdbarch != NULL);
2646 gdb_assert (gdbarch->return_value != NULL);
2647 if (gdbarch_debug >= 2)
2648 gdb_printf (gdb_stdlog, "gdbarch_return_value called\n");
2649 return gdbarch->return_value (gdbarch, function, valtype, regcache, readbuf, writebuf);
2652 void
2653 set_gdbarch_return_value (struct gdbarch *gdbarch,
2654 gdbarch_return_value_ftype return_value)
2656 gdbarch->return_value = return_value;
2660 gdbarch_return_in_first_hidden_param_p (struct gdbarch *gdbarch, struct type *type)
2662 gdb_assert (gdbarch != NULL);
2663 gdb_assert (gdbarch->return_in_first_hidden_param_p != NULL);
2664 if (gdbarch_debug >= 2)
2665 gdb_printf (gdb_stdlog, "gdbarch_return_in_first_hidden_param_p called\n");
2666 return gdbarch->return_in_first_hidden_param_p (gdbarch, type);
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)
2673 gdbarch->return_in_first_hidden_param_p = return_in_first_hidden_param_p;
2676 CORE_ADDR
2677 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
2679 gdb_assert (gdbarch != NULL);
2680 gdb_assert (gdbarch->skip_prologue != NULL);
2681 if (gdbarch_debug >= 2)
2682 gdb_printf (gdb_stdlog, "gdbarch_skip_prologue called\n");
2683 return gdbarch->skip_prologue (gdbarch, ip);
2686 void
2687 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
2688 gdbarch_skip_prologue_ftype skip_prologue)
2690 gdbarch->skip_prologue = skip_prologue;
2693 bool
2694 gdbarch_skip_main_prologue_p (struct gdbarch *gdbarch)
2696 gdb_assert (gdbarch != NULL);
2697 return gdbarch->skip_main_prologue != NULL;
2700 CORE_ADDR
2701 gdbarch_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
2703 gdb_assert (gdbarch != NULL);
2704 gdb_assert (gdbarch->skip_main_prologue != NULL);
2705 if (gdbarch_debug >= 2)
2706 gdb_printf (gdb_stdlog, "gdbarch_skip_main_prologue called\n");
2707 return gdbarch->skip_main_prologue (gdbarch, ip);
2710 void
2711 set_gdbarch_skip_main_prologue (struct gdbarch *gdbarch,
2712 gdbarch_skip_main_prologue_ftype skip_main_prologue)
2714 gdbarch->skip_main_prologue = skip_main_prologue;
2717 bool
2718 gdbarch_skip_entrypoint_p (struct gdbarch *gdbarch)
2720 gdb_assert (gdbarch != NULL);
2721 return gdbarch->skip_entrypoint != NULL;
2724 CORE_ADDR
2725 gdbarch_skip_entrypoint (struct gdbarch *gdbarch, CORE_ADDR ip)
2727 gdb_assert (gdbarch != NULL);
2728 gdb_assert (gdbarch->skip_entrypoint != NULL);
2729 if (gdbarch_debug >= 2)
2730 gdb_printf (gdb_stdlog, "gdbarch_skip_entrypoint called\n");
2731 return gdbarch->skip_entrypoint (gdbarch, ip);
2734 void
2735 set_gdbarch_skip_entrypoint (struct gdbarch *gdbarch,
2736 gdbarch_skip_entrypoint_ftype skip_entrypoint)
2738 gdbarch->skip_entrypoint = skip_entrypoint;
2742 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
2744 gdb_assert (gdbarch != NULL);
2745 gdb_assert (gdbarch->inner_than != NULL);
2746 if (gdbarch_debug >= 2)
2747 gdb_printf (gdb_stdlog, "gdbarch_inner_than called\n");
2748 return gdbarch->inner_than (lhs, rhs);
2751 void
2752 set_gdbarch_inner_than (struct gdbarch *gdbarch,
2753 gdbarch_inner_than_ftype inner_than)
2755 gdbarch->inner_than = inner_than;
2758 const gdb_byte *
2759 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
2761 gdb_assert (gdbarch != NULL);
2762 gdb_assert (gdbarch->breakpoint_from_pc != NULL);
2763 if (gdbarch_debug >= 2)
2764 gdb_printf (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
2765 return gdbarch->breakpoint_from_pc (gdbarch, pcptr, lenptr);
2768 void
2769 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
2770 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
2772 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
2776 gdbarch_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
2778 gdb_assert (gdbarch != NULL);
2779 gdb_assert (gdbarch->breakpoint_kind_from_pc != NULL);
2780 if (gdbarch_debug >= 2)
2781 gdb_printf (gdb_stdlog, "gdbarch_breakpoint_kind_from_pc called\n");
2782 return gdbarch->breakpoint_kind_from_pc (gdbarch, pcptr);
2785 void
2786 set_gdbarch_breakpoint_kind_from_pc (struct gdbarch *gdbarch,
2787 gdbarch_breakpoint_kind_from_pc_ftype breakpoint_kind_from_pc)
2789 gdbarch->breakpoint_kind_from_pc = breakpoint_kind_from_pc;
2792 const gdb_byte *
2793 gdbarch_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
2795 gdb_assert (gdbarch != NULL);
2796 gdb_assert (gdbarch->sw_breakpoint_from_kind != NULL);
2797 if (gdbarch_debug >= 2)
2798 gdb_printf (gdb_stdlog, "gdbarch_sw_breakpoint_from_kind called\n");
2799 return gdbarch->sw_breakpoint_from_kind (gdbarch, kind, size);
2802 void
2803 set_gdbarch_sw_breakpoint_from_kind (struct gdbarch *gdbarch,
2804 gdbarch_sw_breakpoint_from_kind_ftype sw_breakpoint_from_kind)
2806 gdbarch->sw_breakpoint_from_kind = sw_breakpoint_from_kind;
2810 gdbarch_breakpoint_kind_from_current_state (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR *pcptr)
2812 gdb_assert (gdbarch != NULL);
2813 gdb_assert (gdbarch->breakpoint_kind_from_current_state != NULL);
2814 if (gdbarch_debug >= 2)
2815 gdb_printf (gdb_stdlog, "gdbarch_breakpoint_kind_from_current_state called\n");
2816 return gdbarch->breakpoint_kind_from_current_state (gdbarch, regcache, pcptr);
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)
2823 gdbarch->breakpoint_kind_from_current_state = breakpoint_kind_from_current_state;
2826 bool
2827 gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch)
2829 gdb_assert (gdbarch != NULL);
2830 return gdbarch->adjust_breakpoint_address != NULL;
2833 CORE_ADDR
2834 gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr)
2836 gdb_assert (gdbarch != NULL);
2837 gdb_assert (gdbarch->adjust_breakpoint_address != NULL);
2838 if (gdbarch_debug >= 2)
2839 gdb_printf (gdb_stdlog, "gdbarch_adjust_breakpoint_address called\n");
2840 return gdbarch->adjust_breakpoint_address (gdbarch, bpaddr);
2843 void
2844 set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch,
2845 gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address)
2847 gdbarch->adjust_breakpoint_address = adjust_breakpoint_address;
2851 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
2853 gdb_assert (gdbarch != NULL);
2854 gdb_assert (gdbarch->memory_insert_breakpoint != NULL);
2855 if (gdbarch_debug >= 2)
2856 gdb_printf (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
2857 return gdbarch->memory_insert_breakpoint (gdbarch, bp_tgt);
2860 void
2861 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
2862 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
2864 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
2868 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
2870 gdb_assert (gdbarch != NULL);
2871 gdb_assert (gdbarch->memory_remove_breakpoint != NULL);
2872 if (gdbarch_debug >= 2)
2873 gdb_printf (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
2874 return gdbarch->memory_remove_breakpoint (gdbarch, bp_tgt);
2877 void
2878 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
2879 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
2881 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
2884 CORE_ADDR
2885 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
2887 gdb_assert (gdbarch != NULL);
2888 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
2889 if (gdbarch_debug >= 2)
2890 gdb_printf (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
2891 return gdbarch->decr_pc_after_break;
2894 void
2895 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
2896 CORE_ADDR decr_pc_after_break)
2898 gdbarch->decr_pc_after_break = decr_pc_after_break;
2901 CORE_ADDR
2902 gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch)
2904 gdb_assert (gdbarch != NULL);
2905 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
2906 if (gdbarch_debug >= 2)
2907 gdb_printf (gdb_stdlog, "gdbarch_deprecated_function_start_offset called\n");
2908 return gdbarch->deprecated_function_start_offset;
2911 void
2912 set_gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch,
2913 CORE_ADDR deprecated_function_start_offset)
2915 gdbarch->deprecated_function_start_offset = deprecated_function_start_offset;
2919 gdbarch_remote_register_number (struct gdbarch *gdbarch, int regno)
2921 gdb_assert (gdbarch != NULL);
2922 gdb_assert (gdbarch->remote_register_number != NULL);
2923 if (gdbarch_debug >= 2)
2924 gdb_printf (gdb_stdlog, "gdbarch_remote_register_number called\n");
2925 return gdbarch->remote_register_number (gdbarch, regno);
2928 void
2929 set_gdbarch_remote_register_number (struct gdbarch *gdbarch,
2930 gdbarch_remote_register_number_ftype remote_register_number)
2932 gdbarch->remote_register_number = remote_register_number;
2935 bool
2936 gdbarch_fetch_tls_load_module_address_p (struct gdbarch *gdbarch)
2938 gdb_assert (gdbarch != NULL);
2939 return gdbarch->fetch_tls_load_module_address != NULL;
2942 CORE_ADDR
2943 gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch, struct objfile *objfile)
2945 gdb_assert (gdbarch != NULL);
2946 gdb_assert (gdbarch->fetch_tls_load_module_address != NULL);
2947 if (gdbarch_debug >= 2)
2948 gdb_printf (gdb_stdlog, "gdbarch_fetch_tls_load_module_address called\n");
2949 return gdbarch->fetch_tls_load_module_address (objfile);
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)
2956 gdbarch->fetch_tls_load_module_address = fetch_tls_load_module_address;
2959 bool
2960 gdbarch_get_thread_local_address_p (struct gdbarch *gdbarch)
2962 gdb_assert (gdbarch != NULL);
2963 return gdbarch->get_thread_local_address != NULL;
2966 CORE_ADDR
2967 gdbarch_get_thread_local_address (struct gdbarch *gdbarch, ptid_t ptid, CORE_ADDR lm_addr, CORE_ADDR offset)
2969 gdb_assert (gdbarch != NULL);
2970 gdb_assert (gdbarch->get_thread_local_address != NULL);
2971 if (gdbarch_debug >= 2)
2972 gdb_printf (gdb_stdlog, "gdbarch_get_thread_local_address called\n");
2973 return gdbarch->get_thread_local_address (gdbarch, ptid, lm_addr, offset);
2976 void
2977 set_gdbarch_get_thread_local_address (struct gdbarch *gdbarch,
2978 gdbarch_get_thread_local_address_ftype get_thread_local_address)
2980 gdbarch->get_thread_local_address = get_thread_local_address;
2983 CORE_ADDR
2984 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
2986 gdb_assert (gdbarch != NULL);
2987 /* Skip verify of frame_args_skip, invalid_p == 0 */
2988 if (gdbarch_debug >= 2)
2989 gdb_printf (gdb_stdlog, "gdbarch_frame_args_skip called\n");
2990 return gdbarch->frame_args_skip;
2993 void
2994 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
2995 CORE_ADDR frame_args_skip)
2997 gdbarch->frame_args_skip = frame_args_skip;
3000 CORE_ADDR
3001 gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
3003 gdb_assert (gdbarch != NULL);
3004 gdb_assert (gdbarch->unwind_pc != NULL);
3005 if (gdbarch_debug >= 2)
3006 gdb_printf (gdb_stdlog, "gdbarch_unwind_pc called\n");
3007 return gdbarch->unwind_pc (gdbarch, next_frame);
3010 void
3011 set_gdbarch_unwind_pc (struct gdbarch *gdbarch,
3012 gdbarch_unwind_pc_ftype unwind_pc)
3014 gdbarch->unwind_pc = unwind_pc;
3017 CORE_ADDR
3018 gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
3020 gdb_assert (gdbarch != NULL);
3021 gdb_assert (gdbarch->unwind_sp != NULL);
3022 if (gdbarch_debug >= 2)
3023 gdb_printf (gdb_stdlog, "gdbarch_unwind_sp called\n");
3024 return gdbarch->unwind_sp (gdbarch, next_frame);
3027 void
3028 set_gdbarch_unwind_sp (struct gdbarch *gdbarch,
3029 gdbarch_unwind_sp_ftype unwind_sp)
3031 gdbarch->unwind_sp = unwind_sp;
3034 bool
3035 gdbarch_frame_num_args_p (struct gdbarch *gdbarch)
3037 gdb_assert (gdbarch != NULL);
3038 return gdbarch->frame_num_args != NULL;
3042 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
3044 gdb_assert (gdbarch != NULL);
3045 gdb_assert (gdbarch->frame_num_args != NULL);
3046 if (gdbarch_debug >= 2)
3047 gdb_printf (gdb_stdlog, "gdbarch_frame_num_args called\n");
3048 return gdbarch->frame_num_args (frame);
3051 void
3052 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
3053 gdbarch_frame_num_args_ftype frame_num_args)
3055 gdbarch->frame_num_args = frame_num_args;
3058 bool
3059 gdbarch_frame_align_p (struct gdbarch *gdbarch)
3061 gdb_assert (gdbarch != NULL);
3062 return gdbarch->frame_align != NULL;
3065 CORE_ADDR
3066 gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
3068 gdb_assert (gdbarch != NULL);
3069 gdb_assert (gdbarch->frame_align != NULL);
3070 if (gdbarch_debug >= 2)
3071 gdb_printf (gdb_stdlog, "gdbarch_frame_align called\n");
3072 return gdbarch->frame_align (gdbarch, address);
3075 void
3076 set_gdbarch_frame_align (struct gdbarch *gdbarch,
3077 gdbarch_frame_align_ftype frame_align)
3079 gdbarch->frame_align = frame_align;
3083 gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type)
3085 gdb_assert (gdbarch != NULL);
3086 gdb_assert (gdbarch->stabs_argument_has_addr != NULL);
3087 if (gdbarch_debug >= 2)
3088 gdb_printf (gdb_stdlog, "gdbarch_stabs_argument_has_addr called\n");
3089 return gdbarch->stabs_argument_has_addr (gdbarch, type);
3092 void
3093 set_gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch,
3094 gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr)
3096 gdbarch->stabs_argument_has_addr = stabs_argument_has_addr;
3100 gdbarch_frame_red_zone_size (struct gdbarch *gdbarch)
3102 gdb_assert (gdbarch != NULL);
3103 /* Skip verify of frame_red_zone_size, invalid_p == 0 */
3104 if (gdbarch_debug >= 2)
3105 gdb_printf (gdb_stdlog, "gdbarch_frame_red_zone_size called\n");
3106 return gdbarch->frame_red_zone_size;
3109 void
3110 set_gdbarch_frame_red_zone_size (struct gdbarch *gdbarch,
3111 int frame_red_zone_size)
3113 gdbarch->frame_red_zone_size = frame_red_zone_size;
3116 CORE_ADDR
3117 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
3119 gdb_assert (gdbarch != NULL);
3120 gdb_assert (gdbarch->convert_from_func_ptr_addr != NULL);
3121 if (gdbarch_debug >= 2)
3122 gdb_printf (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
3123 return gdbarch->convert_from_func_ptr_addr (gdbarch, addr, targ);
3126 void
3127 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
3128 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
3130 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
3133 CORE_ADDR
3134 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
3136 gdb_assert (gdbarch != NULL);
3137 gdb_assert (gdbarch->addr_bits_remove != NULL);
3138 if (gdbarch_debug >= 2)
3139 gdb_printf (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
3140 return gdbarch->addr_bits_remove (gdbarch, addr);
3143 void
3144 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
3145 gdbarch_addr_bits_remove_ftype addr_bits_remove)
3147 gdbarch->addr_bits_remove = addr_bits_remove;
3151 gdbarch_significant_addr_bit (struct gdbarch *gdbarch)
3153 gdb_assert (gdbarch != NULL);
3154 /* Skip verify of significant_addr_bit, invalid_p == 0 */
3155 if (gdbarch_debug >= 2)
3156 gdb_printf (gdb_stdlog, "gdbarch_significant_addr_bit called\n");
3157 return gdbarch->significant_addr_bit;
3160 void
3161 set_gdbarch_significant_addr_bit (struct gdbarch *gdbarch,
3162 int significant_addr_bit)
3164 gdbarch->significant_addr_bit = significant_addr_bit;
3167 std::string
3168 gdbarch_memtag_to_string (struct gdbarch *gdbarch, struct value *tag)
3170 gdb_assert (gdbarch != NULL);
3171 gdb_assert (gdbarch->memtag_to_string != NULL);
3172 if (gdbarch_debug >= 2)
3173 gdb_printf (gdb_stdlog, "gdbarch_memtag_to_string called\n");
3174 return gdbarch->memtag_to_string (gdbarch, tag);
3177 void
3178 set_gdbarch_memtag_to_string (struct gdbarch *gdbarch,
3179 gdbarch_memtag_to_string_ftype memtag_to_string)
3181 gdbarch->memtag_to_string = memtag_to_string;
3184 bool
3185 gdbarch_tagged_address_p (struct gdbarch *gdbarch, struct value *address)
3187 gdb_assert (gdbarch != NULL);
3188 gdb_assert (gdbarch->tagged_address_p != NULL);
3189 if (gdbarch_debug >= 2)
3190 gdb_printf (gdb_stdlog, "gdbarch_tagged_address_p called\n");
3191 return gdbarch->tagged_address_p (gdbarch, address);
3194 void
3195 set_gdbarch_tagged_address_p (struct gdbarch *gdbarch,
3196 gdbarch_tagged_address_p_ftype tagged_address_p)
3198 gdbarch->tagged_address_p = tagged_address_p;
3201 bool
3202 gdbarch_memtag_matches_p (struct gdbarch *gdbarch, struct value *address)
3204 gdb_assert (gdbarch != NULL);
3205 gdb_assert (gdbarch->memtag_matches_p != NULL);
3206 if (gdbarch_debug >= 2)
3207 gdb_printf (gdb_stdlog, "gdbarch_memtag_matches_p called\n");
3208 return gdbarch->memtag_matches_p (gdbarch, address);
3211 void
3212 set_gdbarch_memtag_matches_p (struct gdbarch *gdbarch,
3213 gdbarch_memtag_matches_p_ftype memtag_matches_p)
3215 gdbarch->memtag_matches_p = memtag_matches_p;
3218 bool
3219 gdbarch_set_memtags (struct gdbarch *gdbarch, struct value *address, size_t length, const gdb::byte_vector &tags, memtag_type tag_type)
3221 gdb_assert (gdbarch != NULL);
3222 gdb_assert (gdbarch->set_memtags != NULL);
3223 if (gdbarch_debug >= 2)
3224 gdb_printf (gdb_stdlog, "gdbarch_set_memtags called\n");
3225 return gdbarch->set_memtags (gdbarch, address, length, tags, tag_type);
3228 void
3229 set_gdbarch_set_memtags (struct gdbarch *gdbarch,
3230 gdbarch_set_memtags_ftype set_memtags)
3232 gdbarch->set_memtags = set_memtags;
3235 struct value *
3236 gdbarch_get_memtag (struct gdbarch *gdbarch, struct value *address, memtag_type tag_type)
3238 gdb_assert (gdbarch != NULL);
3239 gdb_assert (gdbarch->get_memtag != NULL);
3240 if (gdbarch_debug >= 2)
3241 gdb_printf (gdb_stdlog, "gdbarch_get_memtag called\n");
3242 return gdbarch->get_memtag (gdbarch, address, tag_type);
3245 void
3246 set_gdbarch_get_memtag (struct gdbarch *gdbarch,
3247 gdbarch_get_memtag_ftype get_memtag)
3249 gdbarch->get_memtag = get_memtag;
3252 CORE_ADDR
3253 gdbarch_memtag_granule_size (struct gdbarch *gdbarch)
3255 gdb_assert (gdbarch != NULL);
3256 /* Skip verify of memtag_granule_size, invalid_p == 0 */
3257 if (gdbarch_debug >= 2)
3258 gdb_printf (gdb_stdlog, "gdbarch_memtag_granule_size called\n");
3259 return gdbarch->memtag_granule_size;
3262 void
3263 set_gdbarch_memtag_granule_size (struct gdbarch *gdbarch,
3264 CORE_ADDR memtag_granule_size)
3266 gdbarch->memtag_granule_size = memtag_granule_size;
3269 bool
3270 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
3272 gdb_assert (gdbarch != NULL);
3273 return gdbarch->software_single_step != NULL;
3276 std::vector<CORE_ADDR>
3277 gdbarch_software_single_step (struct gdbarch *gdbarch, struct regcache *regcache)
3279 gdb_assert (gdbarch != NULL);
3280 gdb_assert (gdbarch->software_single_step != NULL);
3281 if (gdbarch_debug >= 2)
3282 gdb_printf (gdb_stdlog, "gdbarch_software_single_step called\n");
3283 return gdbarch->software_single_step (regcache);
3286 void
3287 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
3288 gdbarch_software_single_step_ftype software_single_step)
3290 gdbarch->software_single_step = software_single_step;
3293 bool
3294 gdbarch_single_step_through_delay_p (struct gdbarch *gdbarch)
3296 gdb_assert (gdbarch != NULL);
3297 return gdbarch->single_step_through_delay != NULL;
3301 gdbarch_single_step_through_delay (struct gdbarch *gdbarch, struct frame_info *frame)
3303 gdb_assert (gdbarch != NULL);
3304 gdb_assert (gdbarch->single_step_through_delay != NULL);
3305 if (gdbarch_debug >= 2)
3306 gdb_printf (gdb_stdlog, "gdbarch_single_step_through_delay called\n");
3307 return gdbarch->single_step_through_delay (gdbarch, frame);
3310 void
3311 set_gdbarch_single_step_through_delay (struct gdbarch *gdbarch,
3312 gdbarch_single_step_through_delay_ftype single_step_through_delay)
3314 gdbarch->single_step_through_delay = single_step_through_delay;
3318 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info)
3320 gdb_assert (gdbarch != NULL);
3321 gdb_assert (gdbarch->print_insn != NULL);
3322 if (gdbarch_debug >= 2)
3323 gdb_printf (gdb_stdlog, "gdbarch_print_insn called\n");
3324 return gdbarch->print_insn (vma, info);
3327 void
3328 set_gdbarch_print_insn (struct gdbarch *gdbarch,
3329 gdbarch_print_insn_ftype print_insn)
3331 gdbarch->print_insn = print_insn;
3334 CORE_ADDR
3335 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR pc)
3337 gdb_assert (gdbarch != NULL);
3338 gdb_assert (gdbarch->skip_trampoline_code != NULL);
3339 if (gdbarch_debug >= 2)
3340 gdb_printf (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
3341 return gdbarch->skip_trampoline_code (frame, pc);
3344 void
3345 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
3346 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
3348 gdbarch->skip_trampoline_code = skip_trampoline_code;
3351 CORE_ADDR
3352 gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
3354 gdb_assert (gdbarch != NULL);
3355 gdb_assert (gdbarch->skip_solib_resolver != NULL);
3356 if (gdbarch_debug >= 2)
3357 gdb_printf (gdb_stdlog, "gdbarch_skip_solib_resolver called\n");
3358 return gdbarch->skip_solib_resolver (gdbarch, pc);
3361 void
3362 set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch,
3363 gdbarch_skip_solib_resolver_ftype skip_solib_resolver)
3365 gdbarch->skip_solib_resolver = skip_solib_resolver;
3369 gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, const char *name)
3371 gdb_assert (gdbarch != NULL);
3372 gdb_assert (gdbarch->in_solib_return_trampoline != NULL);
3373 if (gdbarch_debug >= 2)
3374 gdb_printf (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
3375 return gdbarch->in_solib_return_trampoline (gdbarch, pc, name);
3378 void
3379 set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
3380 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
3382 gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
3385 bool
3386 gdbarch_in_indirect_branch_thunk (struct gdbarch *gdbarch, CORE_ADDR pc)
3388 gdb_assert (gdbarch != NULL);
3389 gdb_assert (gdbarch->in_indirect_branch_thunk != NULL);
3390 if (gdbarch_debug >= 2)
3391 gdb_printf (gdb_stdlog, "gdbarch_in_indirect_branch_thunk called\n");
3392 return gdbarch->in_indirect_branch_thunk (gdbarch, pc);
3395 void
3396 set_gdbarch_in_indirect_branch_thunk (struct gdbarch *gdbarch,
3397 gdbarch_in_indirect_branch_thunk_ftype in_indirect_branch_thunk)
3399 gdbarch->in_indirect_branch_thunk = in_indirect_branch_thunk;
3403 gdbarch_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR addr)
3405 gdb_assert (gdbarch != NULL);
3406 gdb_assert (gdbarch->stack_frame_destroyed_p != NULL);
3407 if (gdbarch_debug >= 2)
3408 gdb_printf (gdb_stdlog, "gdbarch_stack_frame_destroyed_p called\n");
3409 return gdbarch->stack_frame_destroyed_p (gdbarch, addr);
3412 void
3413 set_gdbarch_stack_frame_destroyed_p (struct gdbarch *gdbarch,
3414 gdbarch_stack_frame_destroyed_p_ftype stack_frame_destroyed_p)
3416 gdbarch->stack_frame_destroyed_p = stack_frame_destroyed_p;
3419 bool
3420 gdbarch_elf_make_msymbol_special_p (struct gdbarch *gdbarch)
3422 gdb_assert (gdbarch != NULL);
3423 return gdbarch->elf_make_msymbol_special != NULL;
3426 void
3427 gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
3429 gdb_assert (gdbarch != NULL);
3430 gdb_assert (gdbarch->elf_make_msymbol_special != NULL);
3431 if (gdbarch_debug >= 2)
3432 gdb_printf (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
3433 gdbarch->elf_make_msymbol_special (sym, msym);
3436 void
3437 set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
3438 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
3440 gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
3443 void
3444 gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
3446 gdb_assert (gdbarch != NULL);
3447 gdb_assert (gdbarch->coff_make_msymbol_special != NULL);
3448 if (gdbarch_debug >= 2)
3449 gdb_printf (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
3450 gdbarch->coff_make_msymbol_special (val, msym);
3453 void
3454 set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
3455 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
3457 gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
3460 void
3461 gdbarch_make_symbol_special (struct gdbarch *gdbarch, struct symbol *sym, struct objfile *objfile)
3463 gdb_assert (gdbarch != NULL);
3464 gdb_assert (gdbarch->make_symbol_special != NULL);
3465 if (gdbarch_debug >= 2)
3466 gdb_printf (gdb_stdlog, "gdbarch_make_symbol_special called\n");
3467 gdbarch->make_symbol_special (sym, objfile);
3470 void
3471 set_gdbarch_make_symbol_special (struct gdbarch *gdbarch,
3472 gdbarch_make_symbol_special_ftype make_symbol_special)
3474 gdbarch->make_symbol_special = make_symbol_special;
3477 CORE_ADDR
3478 gdbarch_adjust_dwarf2_addr (struct gdbarch *gdbarch, CORE_ADDR pc)
3480 gdb_assert (gdbarch != NULL);
3481 gdb_assert (gdbarch->adjust_dwarf2_addr != NULL);
3482 if (gdbarch_debug >= 2)
3483 gdb_printf (gdb_stdlog, "gdbarch_adjust_dwarf2_addr called\n");
3484 return gdbarch->adjust_dwarf2_addr (pc);
3487 void
3488 set_gdbarch_adjust_dwarf2_addr (struct gdbarch *gdbarch,
3489 gdbarch_adjust_dwarf2_addr_ftype adjust_dwarf2_addr)
3491 gdbarch->adjust_dwarf2_addr = adjust_dwarf2_addr;
3494 CORE_ADDR
3495 gdbarch_adjust_dwarf2_line (struct gdbarch *gdbarch, CORE_ADDR addr, int rel)
3497 gdb_assert (gdbarch != NULL);
3498 gdb_assert (gdbarch->adjust_dwarf2_line != NULL);
3499 if (gdbarch_debug >= 2)
3500 gdb_printf (gdb_stdlog, "gdbarch_adjust_dwarf2_line called\n");
3501 return gdbarch->adjust_dwarf2_line (addr, rel);
3504 void
3505 set_gdbarch_adjust_dwarf2_line (struct gdbarch *gdbarch,
3506 gdbarch_adjust_dwarf2_line_ftype adjust_dwarf2_line)
3508 gdbarch->adjust_dwarf2_line = adjust_dwarf2_line;
3512 gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
3514 gdb_assert (gdbarch != NULL);
3515 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
3516 if (gdbarch_debug >= 2)
3517 gdb_printf (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
3518 return gdbarch->cannot_step_breakpoint;
3521 void
3522 set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
3523 int cannot_step_breakpoint)
3525 gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
3529 gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
3531 gdb_assert (gdbarch != NULL);
3532 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
3533 if (gdbarch_debug >= 2)
3534 gdb_printf (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
3535 return gdbarch->have_nonsteppable_watchpoint;
3538 void
3539 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
3540 int have_nonsteppable_watchpoint)
3542 gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
3545 bool
3546 gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
3548 gdb_assert (gdbarch != NULL);
3549 return gdbarch->address_class_type_flags != NULL;
3552 type_instance_flags
3553 gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
3555 gdb_assert (gdbarch != NULL);
3556 gdb_assert (gdbarch->address_class_type_flags != NULL);
3557 if (gdbarch_debug >= 2)
3558 gdb_printf (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
3559 return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
3562 void
3563 set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
3564 gdbarch_address_class_type_flags_ftype address_class_type_flags)
3566 gdbarch->address_class_type_flags = address_class_type_flags;
3569 bool
3570 gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
3572 gdb_assert (gdbarch != NULL);
3573 return gdbarch->address_class_type_flags_to_name != NULL;
3576 const char *
3577 gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, type_instance_flags type_flags)
3579 gdb_assert (gdbarch != NULL);
3580 gdb_assert (gdbarch->address_class_type_flags_to_name != NULL);
3581 if (gdbarch_debug >= 2)
3582 gdb_printf (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
3583 return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
3586 void
3587 set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
3588 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
3590 gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
3593 bool
3594 gdbarch_execute_dwarf_cfa_vendor_op (struct gdbarch *gdbarch, gdb_byte op, struct dwarf2_frame_state *fs)
3596 gdb_assert (gdbarch != NULL);
3597 gdb_assert (gdbarch->execute_dwarf_cfa_vendor_op != NULL);
3598 if (gdbarch_debug >= 2)
3599 gdb_printf (gdb_stdlog, "gdbarch_execute_dwarf_cfa_vendor_op called\n");
3600 return gdbarch->execute_dwarf_cfa_vendor_op (gdbarch, op, fs);
3603 void
3604 set_gdbarch_execute_dwarf_cfa_vendor_op (struct gdbarch *gdbarch,
3605 gdbarch_execute_dwarf_cfa_vendor_op_ftype execute_dwarf_cfa_vendor_op)
3607 gdbarch->execute_dwarf_cfa_vendor_op = execute_dwarf_cfa_vendor_op;
3610 bool
3611 gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
3613 gdb_assert (gdbarch != NULL);
3614 return gdbarch->address_class_name_to_type_flags != NULL;
3617 bool
3618 gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, type_instance_flags *type_flags_ptr)
3620 gdb_assert (gdbarch != NULL);
3621 gdb_assert (gdbarch->address_class_name_to_type_flags != NULL);
3622 if (gdbarch_debug >= 2)
3623 gdb_printf (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
3624 return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
3627 void
3628 set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
3629 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
3631 gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
3635 gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, const struct reggroup *reggroup)
3637 gdb_assert (gdbarch != NULL);
3638 gdb_assert (gdbarch->register_reggroup_p != NULL);
3639 if (gdbarch_debug >= 2)
3640 gdb_printf (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
3641 return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
3644 void
3645 set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
3646 gdbarch_register_reggroup_p_ftype register_reggroup_p)
3648 gdbarch->register_reggroup_p = register_reggroup_p;
3651 bool
3652 gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch)
3654 gdb_assert (gdbarch != NULL);
3655 return gdbarch->fetch_pointer_argument != NULL;
3658 CORE_ADDR
3659 gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type)
3661 gdb_assert (gdbarch != NULL);
3662 gdb_assert (gdbarch->fetch_pointer_argument != NULL);
3663 if (gdbarch_debug >= 2)
3664 gdb_printf (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n");
3665 return gdbarch->fetch_pointer_argument (frame, argi, type);
3668 void
3669 set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch,
3670 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument)
3672 gdbarch->fetch_pointer_argument = fetch_pointer_argument;
3675 bool
3676 gdbarch_iterate_over_regset_sections_p (struct gdbarch *gdbarch)
3678 gdb_assert (gdbarch != NULL);
3679 return gdbarch->iterate_over_regset_sections != NULL;
3682 void
3683 gdbarch_iterate_over_regset_sections (struct gdbarch *gdbarch, iterate_over_regset_sections_cb *cb, void *cb_data, const struct regcache *regcache)
3685 gdb_assert (gdbarch != NULL);
3686 gdb_assert (gdbarch->iterate_over_regset_sections != NULL);
3687 if (gdbarch_debug >= 2)
3688 gdb_printf (gdb_stdlog, "gdbarch_iterate_over_regset_sections called\n");
3689 gdbarch->iterate_over_regset_sections (gdbarch, cb, cb_data, regcache);
3692 void
3693 set_gdbarch_iterate_over_regset_sections (struct gdbarch *gdbarch,
3694 gdbarch_iterate_over_regset_sections_ftype iterate_over_regset_sections)
3696 gdbarch->iterate_over_regset_sections = iterate_over_regset_sections;
3699 bool
3700 gdbarch_make_corefile_notes_p (struct gdbarch *gdbarch)
3702 gdb_assert (gdbarch != NULL);
3703 return gdbarch->make_corefile_notes != NULL;
3706 gdb::unique_xmalloc_ptr<char>
3707 gdbarch_make_corefile_notes (struct gdbarch *gdbarch, bfd *obfd, int *note_size)
3709 gdb_assert (gdbarch != NULL);
3710 gdb_assert (gdbarch->make_corefile_notes != NULL);
3711 if (gdbarch_debug >= 2)
3712 gdb_printf (gdb_stdlog, "gdbarch_make_corefile_notes called\n");
3713 return gdbarch->make_corefile_notes (gdbarch, obfd, note_size);
3716 void
3717 set_gdbarch_make_corefile_notes (struct gdbarch *gdbarch,
3718 gdbarch_make_corefile_notes_ftype make_corefile_notes)
3720 gdbarch->make_corefile_notes = make_corefile_notes;
3723 bool
3724 gdbarch_find_memory_regions_p (struct gdbarch *gdbarch)
3726 gdb_assert (gdbarch != NULL);
3727 return gdbarch->find_memory_regions != NULL;
3731 gdbarch_find_memory_regions (struct gdbarch *gdbarch, find_memory_region_ftype func, void *data)
3733 gdb_assert (gdbarch != NULL);
3734 gdb_assert (gdbarch->find_memory_regions != NULL);
3735 if (gdbarch_debug >= 2)
3736 gdb_printf (gdb_stdlog, "gdbarch_find_memory_regions called\n");
3737 return gdbarch->find_memory_regions (gdbarch, func, data);
3740 void
3741 set_gdbarch_find_memory_regions (struct gdbarch *gdbarch,
3742 gdbarch_find_memory_regions_ftype find_memory_regions)
3744 gdbarch->find_memory_regions = find_memory_regions;
3747 bool
3748 gdbarch_core_xfer_shared_libraries_p (struct gdbarch *gdbarch)
3750 gdb_assert (gdbarch != NULL);
3751 return gdbarch->core_xfer_shared_libraries != NULL;
3754 ULONGEST
3755 gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len)
3757 gdb_assert (gdbarch != NULL);
3758 gdb_assert (gdbarch->core_xfer_shared_libraries != NULL);
3759 if (gdbarch_debug >= 2)
3760 gdb_printf (gdb_stdlog, "gdbarch_core_xfer_shared_libraries called\n");
3761 return gdbarch->core_xfer_shared_libraries (gdbarch, readbuf, offset, len);
3764 void
3765 set_gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch,
3766 gdbarch_core_xfer_shared_libraries_ftype core_xfer_shared_libraries)
3768 gdbarch->core_xfer_shared_libraries = core_xfer_shared_libraries;
3771 bool
3772 gdbarch_core_xfer_shared_libraries_aix_p (struct gdbarch *gdbarch)
3774 gdb_assert (gdbarch != NULL);
3775 return gdbarch->core_xfer_shared_libraries_aix != NULL;
3778 ULONGEST
3779 gdbarch_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len)
3781 gdb_assert (gdbarch != NULL);
3782 gdb_assert (gdbarch->core_xfer_shared_libraries_aix != NULL);
3783 if (gdbarch_debug >= 2)
3784 gdb_printf (gdb_stdlog, "gdbarch_core_xfer_shared_libraries_aix called\n");
3785 return gdbarch->core_xfer_shared_libraries_aix (gdbarch, readbuf, offset, len);
3788 void
3789 set_gdbarch_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch,
3790 gdbarch_core_xfer_shared_libraries_aix_ftype core_xfer_shared_libraries_aix)
3792 gdbarch->core_xfer_shared_libraries_aix = core_xfer_shared_libraries_aix;
3795 bool
3796 gdbarch_core_pid_to_str_p (struct gdbarch *gdbarch)
3798 gdb_assert (gdbarch != NULL);
3799 return gdbarch->core_pid_to_str != NULL;
3802 std::string
3803 gdbarch_core_pid_to_str (struct gdbarch *gdbarch, ptid_t ptid)
3805 gdb_assert (gdbarch != NULL);
3806 gdb_assert (gdbarch->core_pid_to_str != NULL);
3807 if (gdbarch_debug >= 2)
3808 gdb_printf (gdb_stdlog, "gdbarch_core_pid_to_str called\n");
3809 return gdbarch->core_pid_to_str (gdbarch, ptid);
3812 void
3813 set_gdbarch_core_pid_to_str (struct gdbarch *gdbarch,
3814 gdbarch_core_pid_to_str_ftype core_pid_to_str)
3816 gdbarch->core_pid_to_str = core_pid_to_str;
3819 bool
3820 gdbarch_core_thread_name_p (struct gdbarch *gdbarch)
3822 gdb_assert (gdbarch != NULL);
3823 return gdbarch->core_thread_name != NULL;
3826 const char *
3827 gdbarch_core_thread_name (struct gdbarch *gdbarch, struct thread_info *thr)
3829 gdb_assert (gdbarch != NULL);
3830 gdb_assert (gdbarch->core_thread_name != NULL);
3831 if (gdbarch_debug >= 2)
3832 gdb_printf (gdb_stdlog, "gdbarch_core_thread_name called\n");
3833 return gdbarch->core_thread_name (gdbarch, thr);
3836 void
3837 set_gdbarch_core_thread_name (struct gdbarch *gdbarch,
3838 gdbarch_core_thread_name_ftype core_thread_name)
3840 gdbarch->core_thread_name = core_thread_name;
3843 bool
3844 gdbarch_core_xfer_siginfo_p (struct gdbarch *gdbarch)
3846 gdb_assert (gdbarch != NULL);
3847 return gdbarch->core_xfer_siginfo != NULL;
3850 LONGEST
3851 gdbarch_core_xfer_siginfo (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len)
3853 gdb_assert (gdbarch != NULL);
3854 gdb_assert (gdbarch->core_xfer_siginfo != NULL);
3855 if (gdbarch_debug >= 2)
3856 gdb_printf (gdb_stdlog, "gdbarch_core_xfer_siginfo called\n");
3857 return gdbarch->core_xfer_siginfo (gdbarch, readbuf, offset, len);
3860 void
3861 set_gdbarch_core_xfer_siginfo (struct gdbarch *gdbarch,
3862 gdbarch_core_xfer_siginfo_ftype core_xfer_siginfo)
3864 gdbarch->core_xfer_siginfo = core_xfer_siginfo;
3867 bool
3868 gdbarch_gcore_bfd_target_p (struct gdbarch *gdbarch)
3870 gdb_assert (gdbarch != NULL);
3871 return gdbarch->gcore_bfd_target != 0;
3874 const char *
3875 gdbarch_gcore_bfd_target (struct gdbarch *gdbarch)
3877 gdb_assert (gdbarch != NULL);
3878 /* Check variable changed from pre-default. */
3879 gdb_assert (gdbarch->gcore_bfd_target != 0);
3880 if (gdbarch_debug >= 2)
3881 gdb_printf (gdb_stdlog, "gdbarch_gcore_bfd_target called\n");
3882 return gdbarch->gcore_bfd_target;
3885 void
3886 set_gdbarch_gcore_bfd_target (struct gdbarch *gdbarch,
3887 const char * gcore_bfd_target)
3889 gdbarch->gcore_bfd_target = gcore_bfd_target;
3893 gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch)
3895 gdb_assert (gdbarch != NULL);
3896 /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
3897 if (gdbarch_debug >= 2)
3898 gdb_printf (gdb_stdlog, "gdbarch_vtable_function_descriptors called\n");
3899 return gdbarch->vtable_function_descriptors;
3902 void
3903 set_gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch,
3904 int vtable_function_descriptors)
3906 gdbarch->vtable_function_descriptors = vtable_function_descriptors;
3910 gdbarch_vbit_in_delta (struct gdbarch *gdbarch)
3912 gdb_assert (gdbarch != NULL);
3913 /* Skip verify of vbit_in_delta, invalid_p == 0 */
3914 if (gdbarch_debug >= 2)
3915 gdb_printf (gdb_stdlog, "gdbarch_vbit_in_delta called\n");
3916 return gdbarch->vbit_in_delta;
3919 void
3920 set_gdbarch_vbit_in_delta (struct gdbarch *gdbarch,
3921 int vbit_in_delta)
3923 gdbarch->vbit_in_delta = vbit_in_delta;
3926 void
3927 gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch, struct regcache *regcache)
3929 gdb_assert (gdbarch != NULL);
3930 gdb_assert (gdbarch->skip_permanent_breakpoint != NULL);
3931 if (gdbarch_debug >= 2)
3932 gdb_printf (gdb_stdlog, "gdbarch_skip_permanent_breakpoint called\n");
3933 gdbarch->skip_permanent_breakpoint (regcache);
3936 void
3937 set_gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch,
3938 gdbarch_skip_permanent_breakpoint_ftype skip_permanent_breakpoint)
3940 gdbarch->skip_permanent_breakpoint = skip_permanent_breakpoint;
3943 bool
3944 gdbarch_max_insn_length_p (struct gdbarch *gdbarch)
3946 gdb_assert (gdbarch != NULL);
3947 return gdbarch->max_insn_length != 0;
3950 ULONGEST
3951 gdbarch_max_insn_length (struct gdbarch *gdbarch)
3953 gdb_assert (gdbarch != NULL);
3954 /* Check variable changed from pre-default. */
3955 gdb_assert (gdbarch->max_insn_length != 0);
3956 if (gdbarch_debug >= 2)
3957 gdb_printf (gdb_stdlog, "gdbarch_max_insn_length called\n");
3958 return gdbarch->max_insn_length;
3961 void
3962 set_gdbarch_max_insn_length (struct gdbarch *gdbarch,
3963 ULONGEST max_insn_length)
3965 gdbarch->max_insn_length = max_insn_length;
3968 bool
3969 gdbarch_displaced_step_copy_insn_p (struct gdbarch *gdbarch)
3971 gdb_assert (gdbarch != NULL);
3972 return gdbarch->displaced_step_copy_insn != NULL;
3975 displaced_step_copy_insn_closure_up
3976 gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch, CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
3978 gdb_assert (gdbarch != NULL);
3979 gdb_assert (gdbarch->displaced_step_copy_insn != NULL);
3980 if (gdbarch_debug >= 2)
3981 gdb_printf (gdb_stdlog, "gdbarch_displaced_step_copy_insn called\n");
3982 return gdbarch->displaced_step_copy_insn (gdbarch, from, to, regs);
3985 void
3986 set_gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch,
3987 gdbarch_displaced_step_copy_insn_ftype displaced_step_copy_insn)
3989 gdbarch->displaced_step_copy_insn = displaced_step_copy_insn;
3992 bool
3993 gdbarch_displaced_step_hw_singlestep (struct gdbarch *gdbarch)
3995 gdb_assert (gdbarch != NULL);
3996 gdb_assert (gdbarch->displaced_step_hw_singlestep != NULL);
3997 if (gdbarch_debug >= 2)
3998 gdb_printf (gdb_stdlog, "gdbarch_displaced_step_hw_singlestep called\n");
3999 return gdbarch->displaced_step_hw_singlestep (gdbarch);
4002 void
4003 set_gdbarch_displaced_step_hw_singlestep (struct gdbarch *gdbarch,
4004 gdbarch_displaced_step_hw_singlestep_ftype displaced_step_hw_singlestep)
4006 gdbarch->displaced_step_hw_singlestep = displaced_step_hw_singlestep;
4009 bool
4010 gdbarch_displaced_step_fixup_p (struct gdbarch *gdbarch)
4012 gdb_assert (gdbarch != NULL);
4013 return gdbarch->displaced_step_fixup != NULL;
4016 void
4017 gdbarch_displaced_step_fixup (struct gdbarch *gdbarch, struct displaced_step_copy_insn_closure *closure, CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
4019 gdb_assert (gdbarch != NULL);
4020 gdb_assert (gdbarch->displaced_step_fixup != NULL);
4021 /* Do not check predicate: gdbarch->displaced_step_fixup != NULL, allow call. */
4022 if (gdbarch_debug >= 2)
4023 gdb_printf (gdb_stdlog, "gdbarch_displaced_step_fixup called\n");
4024 gdbarch->displaced_step_fixup (gdbarch, closure, from, to, regs);
4027 void
4028 set_gdbarch_displaced_step_fixup (struct gdbarch *gdbarch,
4029 gdbarch_displaced_step_fixup_ftype displaced_step_fixup)
4031 gdbarch->displaced_step_fixup = displaced_step_fixup;
4034 bool
4035 gdbarch_displaced_step_prepare_p (struct gdbarch *gdbarch)
4037 gdb_assert (gdbarch != NULL);
4038 return gdbarch->displaced_step_prepare != NULL;
4041 displaced_step_prepare_status
4042 gdbarch_displaced_step_prepare (struct gdbarch *gdbarch, thread_info *thread, CORE_ADDR &displaced_pc)
4044 gdb_assert (gdbarch != NULL);
4045 gdb_assert (gdbarch->displaced_step_prepare != NULL);
4046 if (gdbarch_debug >= 2)
4047 gdb_printf (gdb_stdlog, "gdbarch_displaced_step_prepare called\n");
4048 return gdbarch->displaced_step_prepare (gdbarch, thread, displaced_pc);
4051 void
4052 set_gdbarch_displaced_step_prepare (struct gdbarch *gdbarch,
4053 gdbarch_displaced_step_prepare_ftype displaced_step_prepare)
4055 gdbarch->displaced_step_prepare = displaced_step_prepare;
4058 displaced_step_finish_status
4059 gdbarch_displaced_step_finish (struct gdbarch *gdbarch, thread_info *thread, gdb_signal sig)
4061 gdb_assert (gdbarch != NULL);
4062 gdb_assert (gdbarch->displaced_step_finish != NULL);
4063 if (gdbarch_debug >= 2)
4064 gdb_printf (gdb_stdlog, "gdbarch_displaced_step_finish called\n");
4065 return gdbarch->displaced_step_finish (gdbarch, thread, sig);
4068 void
4069 set_gdbarch_displaced_step_finish (struct gdbarch *gdbarch,
4070 gdbarch_displaced_step_finish_ftype displaced_step_finish)
4072 gdbarch->displaced_step_finish = displaced_step_finish;
4075 bool
4076 gdbarch_displaced_step_copy_insn_closure_by_addr_p (struct gdbarch *gdbarch)
4078 gdb_assert (gdbarch != NULL);
4079 return gdbarch->displaced_step_copy_insn_closure_by_addr != NULL;
4082 const displaced_step_copy_insn_closure *
4083 gdbarch_displaced_step_copy_insn_closure_by_addr (struct gdbarch *gdbarch, inferior *inf, CORE_ADDR addr)
4085 gdb_assert (gdbarch != NULL);
4086 gdb_assert (gdbarch->displaced_step_copy_insn_closure_by_addr != NULL);
4087 if (gdbarch_debug >= 2)
4088 gdb_printf (gdb_stdlog, "gdbarch_displaced_step_copy_insn_closure_by_addr called\n");
4089 return gdbarch->displaced_step_copy_insn_closure_by_addr (inf, addr);
4092 void
4093 set_gdbarch_displaced_step_copy_insn_closure_by_addr (struct gdbarch *gdbarch,
4094 gdbarch_displaced_step_copy_insn_closure_by_addr_ftype displaced_step_copy_insn_closure_by_addr)
4096 gdbarch->displaced_step_copy_insn_closure_by_addr = displaced_step_copy_insn_closure_by_addr;
4099 void
4100 gdbarch_displaced_step_restore_all_in_ptid (struct gdbarch *gdbarch, inferior *parent_inf, ptid_t child_ptid)
4102 gdb_assert (gdbarch != NULL);
4103 gdb_assert (gdbarch->displaced_step_restore_all_in_ptid != NULL);
4104 if (gdbarch_debug >= 2)
4105 gdb_printf (gdb_stdlog, "gdbarch_displaced_step_restore_all_in_ptid called\n");
4106 gdbarch->displaced_step_restore_all_in_ptid (parent_inf, child_ptid);
4109 void
4110 set_gdbarch_displaced_step_restore_all_in_ptid (struct gdbarch *gdbarch,
4111 gdbarch_displaced_step_restore_all_in_ptid_ftype displaced_step_restore_all_in_ptid)
4113 gdbarch->displaced_step_restore_all_in_ptid = displaced_step_restore_all_in_ptid;
4116 bool
4117 gdbarch_relocate_instruction_p (struct gdbarch *gdbarch)
4119 gdb_assert (gdbarch != NULL);
4120 return gdbarch->relocate_instruction != NULL;
4123 void
4124 gdbarch_relocate_instruction (struct gdbarch *gdbarch, CORE_ADDR *to, CORE_ADDR from)
4126 gdb_assert (gdbarch != NULL);
4127 gdb_assert (gdbarch->relocate_instruction != NULL);
4128 /* Do not check predicate: gdbarch->relocate_instruction != NULL, allow call. */
4129 if (gdbarch_debug >= 2)
4130 gdb_printf (gdb_stdlog, "gdbarch_relocate_instruction called\n");
4131 gdbarch->relocate_instruction (gdbarch, to, from);
4134 void
4135 set_gdbarch_relocate_instruction (struct gdbarch *gdbarch,
4136 gdbarch_relocate_instruction_ftype relocate_instruction)
4138 gdbarch->relocate_instruction = relocate_instruction;
4141 bool
4142 gdbarch_overlay_update_p (struct gdbarch *gdbarch)
4144 gdb_assert (gdbarch != NULL);
4145 return gdbarch->overlay_update != NULL;
4148 void
4149 gdbarch_overlay_update (struct gdbarch *gdbarch, struct obj_section *osect)
4151 gdb_assert (gdbarch != NULL);
4152 gdb_assert (gdbarch->overlay_update != NULL);
4153 if (gdbarch_debug >= 2)
4154 gdb_printf (gdb_stdlog, "gdbarch_overlay_update called\n");
4155 gdbarch->overlay_update (osect);
4158 void
4159 set_gdbarch_overlay_update (struct gdbarch *gdbarch,
4160 gdbarch_overlay_update_ftype overlay_update)
4162 gdbarch->overlay_update = overlay_update;
4165 bool
4166 gdbarch_core_read_description_p (struct gdbarch *gdbarch)
4168 gdb_assert (gdbarch != NULL);
4169 return gdbarch->core_read_description != NULL;
4172 const struct target_desc *
4173 gdbarch_core_read_description (struct gdbarch *gdbarch, struct target_ops *target, bfd *abfd)
4175 gdb_assert (gdbarch != NULL);
4176 gdb_assert (gdbarch->core_read_description != NULL);
4177 if (gdbarch_debug >= 2)
4178 gdb_printf (gdb_stdlog, "gdbarch_core_read_description called\n");
4179 return gdbarch->core_read_description (gdbarch, target, abfd);
4182 void
4183 set_gdbarch_core_read_description (struct gdbarch *gdbarch,
4184 gdbarch_core_read_description_ftype core_read_description)
4186 gdbarch->core_read_description = core_read_description;
4190 gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch)
4192 gdb_assert (gdbarch != NULL);
4193 /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
4194 if (gdbarch_debug >= 2)
4195 gdb_printf (gdb_stdlog, "gdbarch_sofun_address_maybe_missing called\n");
4196 return gdbarch->sofun_address_maybe_missing;
4199 void
4200 set_gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch,
4201 int sofun_address_maybe_missing)
4203 gdbarch->sofun_address_maybe_missing = sofun_address_maybe_missing;
4206 bool
4207 gdbarch_process_record_p (struct gdbarch *gdbarch)
4209 gdb_assert (gdbarch != NULL);
4210 return gdbarch->process_record != NULL;
4214 gdbarch_process_record (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR addr)
4216 gdb_assert (gdbarch != NULL);
4217 gdb_assert (gdbarch->process_record != NULL);
4218 if (gdbarch_debug >= 2)
4219 gdb_printf (gdb_stdlog, "gdbarch_process_record called\n");
4220 return gdbarch->process_record (gdbarch, regcache, addr);
4223 void
4224 set_gdbarch_process_record (struct gdbarch *gdbarch,
4225 gdbarch_process_record_ftype process_record)
4227 gdbarch->process_record = process_record;
4230 bool
4231 gdbarch_process_record_signal_p (struct gdbarch *gdbarch)
4233 gdb_assert (gdbarch != NULL);
4234 return gdbarch->process_record_signal != NULL;
4238 gdbarch_process_record_signal (struct gdbarch *gdbarch, struct regcache *regcache, enum gdb_signal signal)
4240 gdb_assert (gdbarch != NULL);
4241 gdb_assert (gdbarch->process_record_signal != NULL);
4242 if (gdbarch_debug >= 2)
4243 gdb_printf (gdb_stdlog, "gdbarch_process_record_signal called\n");
4244 return gdbarch->process_record_signal (gdbarch, regcache, signal);
4247 void
4248 set_gdbarch_process_record_signal (struct gdbarch *gdbarch,
4249 gdbarch_process_record_signal_ftype process_record_signal)
4251 gdbarch->process_record_signal = process_record_signal;
4254 bool
4255 gdbarch_gdb_signal_from_target_p (struct gdbarch *gdbarch)
4257 gdb_assert (gdbarch != NULL);
4258 return gdbarch->gdb_signal_from_target != NULL;
4261 enum gdb_signal
4262 gdbarch_gdb_signal_from_target (struct gdbarch *gdbarch, int signo)
4264 gdb_assert (gdbarch != NULL);
4265 gdb_assert (gdbarch->gdb_signal_from_target != NULL);
4266 if (gdbarch_debug >= 2)
4267 gdb_printf (gdb_stdlog, "gdbarch_gdb_signal_from_target called\n");
4268 return gdbarch->gdb_signal_from_target (gdbarch, signo);
4271 void
4272 set_gdbarch_gdb_signal_from_target (struct gdbarch *gdbarch,
4273 gdbarch_gdb_signal_from_target_ftype gdb_signal_from_target)
4275 gdbarch->gdb_signal_from_target = gdb_signal_from_target;
4278 bool
4279 gdbarch_gdb_signal_to_target_p (struct gdbarch *gdbarch)
4281 gdb_assert (gdbarch != NULL);
4282 return gdbarch->gdb_signal_to_target != NULL;
4286 gdbarch_gdb_signal_to_target (struct gdbarch *gdbarch, enum gdb_signal signal)
4288 gdb_assert (gdbarch != NULL);
4289 gdb_assert (gdbarch->gdb_signal_to_target != NULL);
4290 if (gdbarch_debug >= 2)
4291 gdb_printf (gdb_stdlog, "gdbarch_gdb_signal_to_target called\n");
4292 return gdbarch->gdb_signal_to_target (gdbarch, signal);
4295 void
4296 set_gdbarch_gdb_signal_to_target (struct gdbarch *gdbarch,
4297 gdbarch_gdb_signal_to_target_ftype gdb_signal_to_target)
4299 gdbarch->gdb_signal_to_target = gdb_signal_to_target;
4302 bool
4303 gdbarch_get_siginfo_type_p (struct gdbarch *gdbarch)
4305 gdb_assert (gdbarch != NULL);
4306 return gdbarch->get_siginfo_type != NULL;
4309 struct type *
4310 gdbarch_get_siginfo_type (struct gdbarch *gdbarch)
4312 gdb_assert (gdbarch != NULL);
4313 gdb_assert (gdbarch->get_siginfo_type != NULL);
4314 if (gdbarch_debug >= 2)
4315 gdb_printf (gdb_stdlog, "gdbarch_get_siginfo_type called\n");
4316 return gdbarch->get_siginfo_type (gdbarch);
4319 void
4320 set_gdbarch_get_siginfo_type (struct gdbarch *gdbarch,
4321 gdbarch_get_siginfo_type_ftype get_siginfo_type)
4323 gdbarch->get_siginfo_type = get_siginfo_type;
4326 bool
4327 gdbarch_record_special_symbol_p (struct gdbarch *gdbarch)
4329 gdb_assert (gdbarch != NULL);
4330 return gdbarch->record_special_symbol != NULL;
4333 void
4334 gdbarch_record_special_symbol (struct gdbarch *gdbarch, struct objfile *objfile, asymbol *sym)
4336 gdb_assert (gdbarch != NULL);
4337 gdb_assert (gdbarch->record_special_symbol != NULL);
4338 if (gdbarch_debug >= 2)
4339 gdb_printf (gdb_stdlog, "gdbarch_record_special_symbol called\n");
4340 gdbarch->record_special_symbol (gdbarch, objfile, sym);
4343 void
4344 set_gdbarch_record_special_symbol (struct gdbarch *gdbarch,
4345 gdbarch_record_special_symbol_ftype record_special_symbol)
4347 gdbarch->record_special_symbol = record_special_symbol;
4350 bool
4351 gdbarch_get_syscall_number_p (struct gdbarch *gdbarch)
4353 gdb_assert (gdbarch != NULL);
4354 return gdbarch->get_syscall_number != NULL;
4357 LONGEST
4358 gdbarch_get_syscall_number (struct gdbarch *gdbarch, thread_info *thread)
4360 gdb_assert (gdbarch != NULL);
4361 gdb_assert (gdbarch->get_syscall_number != NULL);
4362 if (gdbarch_debug >= 2)
4363 gdb_printf (gdb_stdlog, "gdbarch_get_syscall_number called\n");
4364 return gdbarch->get_syscall_number (gdbarch, thread);
4367 void
4368 set_gdbarch_get_syscall_number (struct gdbarch *gdbarch,
4369 gdbarch_get_syscall_number_ftype get_syscall_number)
4371 gdbarch->get_syscall_number = get_syscall_number;
4374 const char *
4375 gdbarch_xml_syscall_file (struct gdbarch *gdbarch)
4377 gdb_assert (gdbarch != NULL);
4378 /* Skip verify of xml_syscall_file, invalid_p == 0 */
4379 if (gdbarch_debug >= 2)
4380 gdb_printf (gdb_stdlog, "gdbarch_xml_syscall_file called\n");
4381 return gdbarch->xml_syscall_file;
4384 void
4385 set_gdbarch_xml_syscall_file (struct gdbarch *gdbarch,
4386 const char * xml_syscall_file)
4388 gdbarch->xml_syscall_file = xml_syscall_file;
4391 struct syscalls_info *
4392 gdbarch_syscalls_info (struct gdbarch *gdbarch)
4394 gdb_assert (gdbarch != NULL);
4395 /* Skip verify of syscalls_info, invalid_p == 0 */
4396 if (gdbarch_debug >= 2)
4397 gdb_printf (gdb_stdlog, "gdbarch_syscalls_info called\n");
4398 return gdbarch->syscalls_info;
4401 void
4402 set_gdbarch_syscalls_info (struct gdbarch *gdbarch,
4403 struct syscalls_info * syscalls_info)
4405 gdbarch->syscalls_info = syscalls_info;
4408 const char *const *
4409 gdbarch_stap_integer_prefixes (struct gdbarch *gdbarch)
4411 gdb_assert (gdbarch != NULL);
4412 /* Skip verify of stap_integer_prefixes, invalid_p == 0 */
4413 if (gdbarch_debug >= 2)
4414 gdb_printf (gdb_stdlog, "gdbarch_stap_integer_prefixes called\n");
4415 return gdbarch->stap_integer_prefixes;
4418 void
4419 set_gdbarch_stap_integer_prefixes (struct gdbarch *gdbarch,
4420 const char *const * stap_integer_prefixes)
4422 gdbarch->stap_integer_prefixes = stap_integer_prefixes;
4425 const char *const *
4426 gdbarch_stap_integer_suffixes (struct gdbarch *gdbarch)
4428 gdb_assert (gdbarch != NULL);
4429 /* Skip verify of stap_integer_suffixes, invalid_p == 0 */
4430 if (gdbarch_debug >= 2)
4431 gdb_printf (gdb_stdlog, "gdbarch_stap_integer_suffixes called\n");
4432 return gdbarch->stap_integer_suffixes;
4435 void
4436 set_gdbarch_stap_integer_suffixes (struct gdbarch *gdbarch,
4437 const char *const * stap_integer_suffixes)
4439 gdbarch->stap_integer_suffixes = stap_integer_suffixes;
4442 const char *const *
4443 gdbarch_stap_register_prefixes (struct gdbarch *gdbarch)
4445 gdb_assert (gdbarch != NULL);
4446 /* Skip verify of stap_register_prefixes, invalid_p == 0 */
4447 if (gdbarch_debug >= 2)
4448 gdb_printf (gdb_stdlog, "gdbarch_stap_register_prefixes called\n");
4449 return gdbarch->stap_register_prefixes;
4452 void
4453 set_gdbarch_stap_register_prefixes (struct gdbarch *gdbarch,
4454 const char *const * stap_register_prefixes)
4456 gdbarch->stap_register_prefixes = stap_register_prefixes;
4459 const char *const *
4460 gdbarch_stap_register_suffixes (struct gdbarch *gdbarch)
4462 gdb_assert (gdbarch != NULL);
4463 /* Skip verify of stap_register_suffixes, invalid_p == 0 */
4464 if (gdbarch_debug >= 2)
4465 gdb_printf (gdb_stdlog, "gdbarch_stap_register_suffixes called\n");
4466 return gdbarch->stap_register_suffixes;
4469 void
4470 set_gdbarch_stap_register_suffixes (struct gdbarch *gdbarch,
4471 const char *const * stap_register_suffixes)
4473 gdbarch->stap_register_suffixes = stap_register_suffixes;
4476 const char *const *
4477 gdbarch_stap_register_indirection_prefixes (struct gdbarch *gdbarch)
4479 gdb_assert (gdbarch != NULL);
4480 /* Skip verify of stap_register_indirection_prefixes, invalid_p == 0 */
4481 if (gdbarch_debug >= 2)
4482 gdb_printf (gdb_stdlog, "gdbarch_stap_register_indirection_prefixes called\n");
4483 return gdbarch->stap_register_indirection_prefixes;
4486 void
4487 set_gdbarch_stap_register_indirection_prefixes (struct gdbarch *gdbarch,
4488 const char *const * stap_register_indirection_prefixes)
4490 gdbarch->stap_register_indirection_prefixes = stap_register_indirection_prefixes;
4493 const char *const *
4494 gdbarch_stap_register_indirection_suffixes (struct gdbarch *gdbarch)
4496 gdb_assert (gdbarch != NULL);
4497 /* Skip verify of stap_register_indirection_suffixes, invalid_p == 0 */
4498 if (gdbarch_debug >= 2)
4499 gdb_printf (gdb_stdlog, "gdbarch_stap_register_indirection_suffixes called\n");
4500 return gdbarch->stap_register_indirection_suffixes;
4503 void
4504 set_gdbarch_stap_register_indirection_suffixes (struct gdbarch *gdbarch,
4505 const char *const * stap_register_indirection_suffixes)
4507 gdbarch->stap_register_indirection_suffixes = stap_register_indirection_suffixes;
4510 const char *
4511 gdbarch_stap_gdb_register_prefix (struct gdbarch *gdbarch)
4513 gdb_assert (gdbarch != NULL);
4514 /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */
4515 if (gdbarch_debug >= 2)
4516 gdb_printf (gdb_stdlog, "gdbarch_stap_gdb_register_prefix called\n");
4517 return gdbarch->stap_gdb_register_prefix;
4520 void
4521 set_gdbarch_stap_gdb_register_prefix (struct gdbarch *gdbarch,
4522 const char * stap_gdb_register_prefix)
4524 gdbarch->stap_gdb_register_prefix = stap_gdb_register_prefix;
4527 const char *
4528 gdbarch_stap_gdb_register_suffix (struct gdbarch *gdbarch)
4530 gdb_assert (gdbarch != NULL);
4531 /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */
4532 if (gdbarch_debug >= 2)
4533 gdb_printf (gdb_stdlog, "gdbarch_stap_gdb_register_suffix called\n");
4534 return gdbarch->stap_gdb_register_suffix;
4537 void
4538 set_gdbarch_stap_gdb_register_suffix (struct gdbarch *gdbarch,
4539 const char * stap_gdb_register_suffix)
4541 gdbarch->stap_gdb_register_suffix = stap_gdb_register_suffix;
4544 bool
4545 gdbarch_stap_is_single_operand_p (struct gdbarch *gdbarch)
4547 gdb_assert (gdbarch != NULL);
4548 return gdbarch->stap_is_single_operand != NULL;
4552 gdbarch_stap_is_single_operand (struct gdbarch *gdbarch, const char *s)
4554 gdb_assert (gdbarch != NULL);
4555 gdb_assert (gdbarch->stap_is_single_operand != NULL);
4556 if (gdbarch_debug >= 2)
4557 gdb_printf (gdb_stdlog, "gdbarch_stap_is_single_operand called\n");
4558 return gdbarch->stap_is_single_operand (gdbarch, s);
4561 void
4562 set_gdbarch_stap_is_single_operand (struct gdbarch *gdbarch,
4563 gdbarch_stap_is_single_operand_ftype stap_is_single_operand)
4565 gdbarch->stap_is_single_operand = stap_is_single_operand;
4568 bool
4569 gdbarch_stap_parse_special_token_p (struct gdbarch *gdbarch)
4571 gdb_assert (gdbarch != NULL);
4572 return gdbarch->stap_parse_special_token != NULL;
4575 expr::operation_up
4576 gdbarch_stap_parse_special_token (struct gdbarch *gdbarch, struct stap_parse_info *p)
4578 gdb_assert (gdbarch != NULL);
4579 gdb_assert (gdbarch->stap_parse_special_token != NULL);
4580 if (gdbarch_debug >= 2)
4581 gdb_printf (gdb_stdlog, "gdbarch_stap_parse_special_token called\n");
4582 return gdbarch->stap_parse_special_token (gdbarch, p);
4585 void
4586 set_gdbarch_stap_parse_special_token (struct gdbarch *gdbarch,
4587 gdbarch_stap_parse_special_token_ftype stap_parse_special_token)
4589 gdbarch->stap_parse_special_token = stap_parse_special_token;
4592 bool
4593 gdbarch_stap_adjust_register_p (struct gdbarch *gdbarch)
4595 gdb_assert (gdbarch != NULL);
4596 return gdbarch->stap_adjust_register != NULL;
4599 std::string
4600 gdbarch_stap_adjust_register (struct gdbarch *gdbarch, struct stap_parse_info *p, const std::string &regname, int regnum)
4602 gdb_assert (gdbarch != NULL);
4603 gdb_assert (gdbarch->stap_adjust_register != NULL);
4604 if (gdbarch_debug >= 2)
4605 gdb_printf (gdb_stdlog, "gdbarch_stap_adjust_register called\n");
4606 return gdbarch->stap_adjust_register (gdbarch, p, regname, regnum);
4609 void
4610 set_gdbarch_stap_adjust_register (struct gdbarch *gdbarch,
4611 gdbarch_stap_adjust_register_ftype stap_adjust_register)
4613 gdbarch->stap_adjust_register = stap_adjust_register;
4616 bool
4617 gdbarch_dtrace_parse_probe_argument_p (struct gdbarch *gdbarch)
4619 gdb_assert (gdbarch != NULL);
4620 return gdbarch->dtrace_parse_probe_argument != NULL;
4623 expr::operation_up
4624 gdbarch_dtrace_parse_probe_argument (struct gdbarch *gdbarch, int narg)
4626 gdb_assert (gdbarch != NULL);
4627 gdb_assert (gdbarch->dtrace_parse_probe_argument != NULL);
4628 if (gdbarch_debug >= 2)
4629 gdb_printf (gdb_stdlog, "gdbarch_dtrace_parse_probe_argument called\n");
4630 return gdbarch->dtrace_parse_probe_argument (gdbarch, narg);
4633 void
4634 set_gdbarch_dtrace_parse_probe_argument (struct gdbarch *gdbarch,
4635 gdbarch_dtrace_parse_probe_argument_ftype dtrace_parse_probe_argument)
4637 gdbarch->dtrace_parse_probe_argument = dtrace_parse_probe_argument;
4640 bool
4641 gdbarch_dtrace_probe_is_enabled_p (struct gdbarch *gdbarch)
4643 gdb_assert (gdbarch != NULL);
4644 return gdbarch->dtrace_probe_is_enabled != NULL;
4648 gdbarch_dtrace_probe_is_enabled (struct gdbarch *gdbarch, CORE_ADDR addr)
4650 gdb_assert (gdbarch != NULL);
4651 gdb_assert (gdbarch->dtrace_probe_is_enabled != NULL);
4652 if (gdbarch_debug >= 2)
4653 gdb_printf (gdb_stdlog, "gdbarch_dtrace_probe_is_enabled called\n");
4654 return gdbarch->dtrace_probe_is_enabled (gdbarch, addr);
4657 void
4658 set_gdbarch_dtrace_probe_is_enabled (struct gdbarch *gdbarch,
4659 gdbarch_dtrace_probe_is_enabled_ftype dtrace_probe_is_enabled)
4661 gdbarch->dtrace_probe_is_enabled = dtrace_probe_is_enabled;
4664 bool
4665 gdbarch_dtrace_enable_probe_p (struct gdbarch *gdbarch)
4667 gdb_assert (gdbarch != NULL);
4668 return gdbarch->dtrace_enable_probe != NULL;
4671 void
4672 gdbarch_dtrace_enable_probe (struct gdbarch *gdbarch, CORE_ADDR addr)
4674 gdb_assert (gdbarch != NULL);
4675 gdb_assert (gdbarch->dtrace_enable_probe != NULL);
4676 if (gdbarch_debug >= 2)
4677 gdb_printf (gdb_stdlog, "gdbarch_dtrace_enable_probe called\n");
4678 gdbarch->dtrace_enable_probe (gdbarch, addr);
4681 void
4682 set_gdbarch_dtrace_enable_probe (struct gdbarch *gdbarch,
4683 gdbarch_dtrace_enable_probe_ftype dtrace_enable_probe)
4685 gdbarch->dtrace_enable_probe = dtrace_enable_probe;
4688 bool
4689 gdbarch_dtrace_disable_probe_p (struct gdbarch *gdbarch)
4691 gdb_assert (gdbarch != NULL);
4692 return gdbarch->dtrace_disable_probe != NULL;
4695 void
4696 gdbarch_dtrace_disable_probe (struct gdbarch *gdbarch, CORE_ADDR addr)
4698 gdb_assert (gdbarch != NULL);
4699 gdb_assert (gdbarch->dtrace_disable_probe != NULL);
4700 if (gdbarch_debug >= 2)
4701 gdb_printf (gdb_stdlog, "gdbarch_dtrace_disable_probe called\n");
4702 gdbarch->dtrace_disable_probe (gdbarch, addr);
4705 void
4706 set_gdbarch_dtrace_disable_probe (struct gdbarch *gdbarch,
4707 gdbarch_dtrace_disable_probe_ftype dtrace_disable_probe)
4709 gdbarch->dtrace_disable_probe = dtrace_disable_probe;
4713 gdbarch_has_global_solist (struct gdbarch *gdbarch)
4715 gdb_assert (gdbarch != NULL);
4716 /* Skip verify of has_global_solist, invalid_p == 0 */
4717 if (gdbarch_debug >= 2)
4718 gdb_printf (gdb_stdlog, "gdbarch_has_global_solist called\n");
4719 return gdbarch->has_global_solist;
4722 void
4723 set_gdbarch_has_global_solist (struct gdbarch *gdbarch,
4724 int has_global_solist)
4726 gdbarch->has_global_solist = has_global_solist;
4730 gdbarch_has_global_breakpoints (struct gdbarch *gdbarch)
4732 gdb_assert (gdbarch != NULL);
4733 /* Skip verify of has_global_breakpoints, invalid_p == 0 */
4734 if (gdbarch_debug >= 2)
4735 gdb_printf (gdb_stdlog, "gdbarch_has_global_breakpoints called\n");
4736 return gdbarch->has_global_breakpoints;
4739 void
4740 set_gdbarch_has_global_breakpoints (struct gdbarch *gdbarch,
4741 int has_global_breakpoints)
4743 gdbarch->has_global_breakpoints = has_global_breakpoints;
4747 gdbarch_has_shared_address_space (struct gdbarch *gdbarch)
4749 gdb_assert (gdbarch != NULL);
4750 gdb_assert (gdbarch->has_shared_address_space != NULL);
4751 if (gdbarch_debug >= 2)
4752 gdb_printf (gdb_stdlog, "gdbarch_has_shared_address_space called\n");
4753 return gdbarch->has_shared_address_space (gdbarch);
4756 void
4757 set_gdbarch_has_shared_address_space (struct gdbarch *gdbarch,
4758 gdbarch_has_shared_address_space_ftype has_shared_address_space)
4760 gdbarch->has_shared_address_space = has_shared_address_space;
4764 gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch, CORE_ADDR addr, std::string *msg)
4766 gdb_assert (gdbarch != NULL);
4767 gdb_assert (gdbarch->fast_tracepoint_valid_at != NULL);
4768 if (gdbarch_debug >= 2)
4769 gdb_printf (gdb_stdlog, "gdbarch_fast_tracepoint_valid_at called\n");
4770 return gdbarch->fast_tracepoint_valid_at (gdbarch, addr, msg);
4773 void
4774 set_gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch,
4775 gdbarch_fast_tracepoint_valid_at_ftype fast_tracepoint_valid_at)
4777 gdbarch->fast_tracepoint_valid_at = fast_tracepoint_valid_at;
4780 void
4781 gdbarch_guess_tracepoint_registers (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR addr)
4783 gdb_assert (gdbarch != NULL);
4784 gdb_assert (gdbarch->guess_tracepoint_registers != NULL);
4785 if (gdbarch_debug >= 2)
4786 gdb_printf (gdb_stdlog, "gdbarch_guess_tracepoint_registers called\n");
4787 gdbarch->guess_tracepoint_registers (gdbarch, regcache, addr);
4790 void
4791 set_gdbarch_guess_tracepoint_registers (struct gdbarch *gdbarch,
4792 gdbarch_guess_tracepoint_registers_ftype guess_tracepoint_registers)
4794 gdbarch->guess_tracepoint_registers = guess_tracepoint_registers;
4797 const char *
4798 gdbarch_auto_charset (struct gdbarch *gdbarch)
4800 gdb_assert (gdbarch != NULL);
4801 gdb_assert (gdbarch->auto_charset != NULL);
4802 if (gdbarch_debug >= 2)
4803 gdb_printf (gdb_stdlog, "gdbarch_auto_charset called\n");
4804 return gdbarch->auto_charset ();
4807 void
4808 set_gdbarch_auto_charset (struct gdbarch *gdbarch,
4809 gdbarch_auto_charset_ftype auto_charset)
4811 gdbarch->auto_charset = auto_charset;
4814 const char *
4815 gdbarch_auto_wide_charset (struct gdbarch *gdbarch)
4817 gdb_assert (gdbarch != NULL);
4818 gdb_assert (gdbarch->auto_wide_charset != NULL);
4819 if (gdbarch_debug >= 2)
4820 gdb_printf (gdb_stdlog, "gdbarch_auto_wide_charset called\n");
4821 return gdbarch->auto_wide_charset ();
4824 void
4825 set_gdbarch_auto_wide_charset (struct gdbarch *gdbarch,
4826 gdbarch_auto_wide_charset_ftype auto_wide_charset)
4828 gdbarch->auto_wide_charset = auto_wide_charset;
4831 const char *
4832 gdbarch_solib_symbols_extension (struct gdbarch *gdbarch)
4834 gdb_assert (gdbarch != NULL);
4835 /* Skip verify of solib_symbols_extension, invalid_p == 0 */
4836 if (gdbarch_debug >= 2)
4837 gdb_printf (gdb_stdlog, "gdbarch_solib_symbols_extension called\n");
4838 return gdbarch->solib_symbols_extension;
4841 void
4842 set_gdbarch_solib_symbols_extension (struct gdbarch *gdbarch,
4843 const char * solib_symbols_extension)
4845 gdbarch->solib_symbols_extension = solib_symbols_extension;
4849 gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch)
4851 gdb_assert (gdbarch != NULL);
4852 /* Skip verify of has_dos_based_file_system, invalid_p == 0 */
4853 if (gdbarch_debug >= 2)
4854 gdb_printf (gdb_stdlog, "gdbarch_has_dos_based_file_system called\n");
4855 return gdbarch->has_dos_based_file_system;
4858 void
4859 set_gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch,
4860 int has_dos_based_file_system)
4862 gdbarch->has_dos_based_file_system = has_dos_based_file_system;
4865 void
4866 gdbarch_gen_return_address (struct gdbarch *gdbarch, struct agent_expr *ax, struct axs_value *value, CORE_ADDR scope)
4868 gdb_assert (gdbarch != NULL);
4869 gdb_assert (gdbarch->gen_return_address != NULL);
4870 if (gdbarch_debug >= 2)
4871 gdb_printf (gdb_stdlog, "gdbarch_gen_return_address called\n");
4872 gdbarch->gen_return_address (gdbarch, ax, value, scope);
4875 void
4876 set_gdbarch_gen_return_address (struct gdbarch *gdbarch,
4877 gdbarch_gen_return_address_ftype gen_return_address)
4879 gdbarch->gen_return_address = gen_return_address;
4882 bool
4883 gdbarch_info_proc_p (struct gdbarch *gdbarch)
4885 gdb_assert (gdbarch != NULL);
4886 return gdbarch->info_proc != NULL;
4889 void
4890 gdbarch_info_proc (struct gdbarch *gdbarch, const char *args, enum info_proc_what what)
4892 gdb_assert (gdbarch != NULL);
4893 gdb_assert (gdbarch->info_proc != NULL);
4894 if (gdbarch_debug >= 2)
4895 gdb_printf (gdb_stdlog, "gdbarch_info_proc called\n");
4896 gdbarch->info_proc (gdbarch, args, what);
4899 void
4900 set_gdbarch_info_proc (struct gdbarch *gdbarch,
4901 gdbarch_info_proc_ftype info_proc)
4903 gdbarch->info_proc = info_proc;
4906 bool
4907 gdbarch_core_info_proc_p (struct gdbarch *gdbarch)
4909 gdb_assert (gdbarch != NULL);
4910 return gdbarch->core_info_proc != NULL;
4913 void
4914 gdbarch_core_info_proc (struct gdbarch *gdbarch, const char *args, enum info_proc_what what)
4916 gdb_assert (gdbarch != NULL);
4917 gdb_assert (gdbarch->core_info_proc != NULL);
4918 if (gdbarch_debug >= 2)
4919 gdb_printf (gdb_stdlog, "gdbarch_core_info_proc called\n");
4920 gdbarch->core_info_proc (gdbarch, args, what);
4923 void
4924 set_gdbarch_core_info_proc (struct gdbarch *gdbarch,
4925 gdbarch_core_info_proc_ftype core_info_proc)
4927 gdbarch->core_info_proc = core_info_proc;
4930 void
4931 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)
4933 gdb_assert (gdbarch != NULL);
4934 gdb_assert (gdbarch->iterate_over_objfiles_in_search_order != NULL);
4935 if (gdbarch_debug >= 2)
4936 gdb_printf (gdb_stdlog, "gdbarch_iterate_over_objfiles_in_search_order called\n");
4937 gdbarch->iterate_over_objfiles_in_search_order (gdbarch, cb, cb_data, current_objfile);
4940 void
4941 set_gdbarch_iterate_over_objfiles_in_search_order (struct gdbarch *gdbarch,
4942 gdbarch_iterate_over_objfiles_in_search_order_ftype iterate_over_objfiles_in_search_order)
4944 gdbarch->iterate_over_objfiles_in_search_order = iterate_over_objfiles_in_search_order;
4947 struct ravenscar_arch_ops *
4948 gdbarch_ravenscar_ops (struct gdbarch *gdbarch)
4950 gdb_assert (gdbarch != NULL);
4951 /* Skip verify of ravenscar_ops, invalid_p == 0 */
4952 if (gdbarch_debug >= 2)
4953 gdb_printf (gdb_stdlog, "gdbarch_ravenscar_ops called\n");
4954 return gdbarch->ravenscar_ops;
4957 void
4958 set_gdbarch_ravenscar_ops (struct gdbarch *gdbarch,
4959 struct ravenscar_arch_ops * ravenscar_ops)
4961 gdbarch->ravenscar_ops = ravenscar_ops;
4965 gdbarch_insn_is_call (struct gdbarch *gdbarch, CORE_ADDR addr)
4967 gdb_assert (gdbarch != NULL);
4968 gdb_assert (gdbarch->insn_is_call != NULL);
4969 if (gdbarch_debug >= 2)
4970 gdb_printf (gdb_stdlog, "gdbarch_insn_is_call called\n");
4971 return gdbarch->insn_is_call (gdbarch, addr);
4974 void
4975 set_gdbarch_insn_is_call (struct gdbarch *gdbarch,
4976 gdbarch_insn_is_call_ftype insn_is_call)
4978 gdbarch->insn_is_call = insn_is_call;
4982 gdbarch_insn_is_ret (struct gdbarch *gdbarch, CORE_ADDR addr)
4984 gdb_assert (gdbarch != NULL);
4985 gdb_assert (gdbarch->insn_is_ret != NULL);
4986 if (gdbarch_debug >= 2)
4987 gdb_printf (gdb_stdlog, "gdbarch_insn_is_ret called\n");
4988 return gdbarch->insn_is_ret (gdbarch, addr);
4991 void
4992 set_gdbarch_insn_is_ret (struct gdbarch *gdbarch,
4993 gdbarch_insn_is_ret_ftype insn_is_ret)
4995 gdbarch->insn_is_ret = insn_is_ret;
4999 gdbarch_insn_is_jump (struct gdbarch *gdbarch, CORE_ADDR addr)
5001 gdb_assert (gdbarch != NULL);
5002 gdb_assert (gdbarch->insn_is_jump != NULL);
5003 if (gdbarch_debug >= 2)
5004 gdb_printf (gdb_stdlog, "gdbarch_insn_is_jump called\n");
5005 return gdbarch->insn_is_jump (gdbarch, addr);
5008 void
5009 set_gdbarch_insn_is_jump (struct gdbarch *gdbarch,
5010 gdbarch_insn_is_jump_ftype insn_is_jump)
5012 gdbarch->insn_is_jump = insn_is_jump;
5015 bool
5016 gdbarch_program_breakpoint_here_p (struct gdbarch *gdbarch, CORE_ADDR address)
5018 gdb_assert (gdbarch != NULL);
5019 gdb_assert (gdbarch->program_breakpoint_here_p != NULL);
5020 if (gdbarch_debug >= 2)
5021 gdb_printf (gdb_stdlog, "gdbarch_program_breakpoint_here_p called\n");
5022 return gdbarch->program_breakpoint_here_p (gdbarch, address);
5025 void
5026 set_gdbarch_program_breakpoint_here_p (struct gdbarch *gdbarch,
5027 gdbarch_program_breakpoint_here_p_ftype program_breakpoint_here_p)
5029 gdbarch->program_breakpoint_here_p = program_breakpoint_here_p;
5032 bool
5033 gdbarch_auxv_parse_p (struct gdbarch *gdbarch)
5035 gdb_assert (gdbarch != NULL);
5036 return gdbarch->auxv_parse != NULL;
5040 gdbarch_auxv_parse (struct gdbarch *gdbarch, gdb_byte **readptr, gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp)
5042 gdb_assert (gdbarch != NULL);
5043 gdb_assert (gdbarch->auxv_parse != NULL);
5044 if (gdbarch_debug >= 2)
5045 gdb_printf (gdb_stdlog, "gdbarch_auxv_parse called\n");
5046 return gdbarch->auxv_parse (gdbarch, readptr, endptr, typep, valp);
5049 void
5050 set_gdbarch_auxv_parse (struct gdbarch *gdbarch,
5051 gdbarch_auxv_parse_ftype auxv_parse)
5053 gdbarch->auxv_parse = auxv_parse;
5056 void
5057 gdbarch_print_auxv_entry (struct gdbarch *gdbarch, struct ui_file *file, CORE_ADDR type, CORE_ADDR val)
5059 gdb_assert (gdbarch != NULL);
5060 gdb_assert (gdbarch->print_auxv_entry != NULL);
5061 if (gdbarch_debug >= 2)
5062 gdb_printf (gdb_stdlog, "gdbarch_print_auxv_entry called\n");
5063 gdbarch->print_auxv_entry (gdbarch, file, type, val);
5066 void
5067 set_gdbarch_print_auxv_entry (struct gdbarch *gdbarch,
5068 gdbarch_print_auxv_entry_ftype print_auxv_entry)
5070 gdbarch->print_auxv_entry = print_auxv_entry;
5074 gdbarch_vsyscall_range (struct gdbarch *gdbarch, struct mem_range *range)
5076 gdb_assert (gdbarch != NULL);
5077 gdb_assert (gdbarch->vsyscall_range != NULL);
5078 if (gdbarch_debug >= 2)
5079 gdb_printf (gdb_stdlog, "gdbarch_vsyscall_range called\n");
5080 return gdbarch->vsyscall_range (gdbarch, range);
5083 void
5084 set_gdbarch_vsyscall_range (struct gdbarch *gdbarch,
5085 gdbarch_vsyscall_range_ftype vsyscall_range)
5087 gdbarch->vsyscall_range = vsyscall_range;
5090 CORE_ADDR
5091 gdbarch_infcall_mmap (struct gdbarch *gdbarch, CORE_ADDR size, unsigned prot)
5093 gdb_assert (gdbarch != NULL);
5094 gdb_assert (gdbarch->infcall_mmap != NULL);
5095 if (gdbarch_debug >= 2)
5096 gdb_printf (gdb_stdlog, "gdbarch_infcall_mmap called\n");
5097 return gdbarch->infcall_mmap (size, prot);
5100 void
5101 set_gdbarch_infcall_mmap (struct gdbarch *gdbarch,
5102 gdbarch_infcall_mmap_ftype infcall_mmap)
5104 gdbarch->infcall_mmap = infcall_mmap;
5107 void
5108 gdbarch_infcall_munmap (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR size)
5110 gdb_assert (gdbarch != NULL);
5111 gdb_assert (gdbarch->infcall_munmap != NULL);
5112 if (gdbarch_debug >= 2)
5113 gdb_printf (gdb_stdlog, "gdbarch_infcall_munmap called\n");
5114 gdbarch->infcall_munmap (addr, size);
5117 void
5118 set_gdbarch_infcall_munmap (struct gdbarch *gdbarch,
5119 gdbarch_infcall_munmap_ftype infcall_munmap)
5121 gdbarch->infcall_munmap = infcall_munmap;
5124 std::string
5125 gdbarch_gcc_target_options (struct gdbarch *gdbarch)
5127 gdb_assert (gdbarch != NULL);
5128 gdb_assert (gdbarch->gcc_target_options != NULL);
5129 if (gdbarch_debug >= 2)
5130 gdb_printf (gdb_stdlog, "gdbarch_gcc_target_options called\n");
5131 return gdbarch->gcc_target_options (gdbarch);
5134 void
5135 set_gdbarch_gcc_target_options (struct gdbarch *gdbarch,
5136 gdbarch_gcc_target_options_ftype gcc_target_options)
5138 gdbarch->gcc_target_options = gcc_target_options;
5141 const char *
5142 gdbarch_gnu_triplet_regexp (struct gdbarch *gdbarch)
5144 gdb_assert (gdbarch != NULL);
5145 gdb_assert (gdbarch->gnu_triplet_regexp != NULL);
5146 if (gdbarch_debug >= 2)
5147 gdb_printf (gdb_stdlog, "gdbarch_gnu_triplet_regexp called\n");
5148 return gdbarch->gnu_triplet_regexp (gdbarch);
5151 void
5152 set_gdbarch_gnu_triplet_regexp (struct gdbarch *gdbarch,
5153 gdbarch_gnu_triplet_regexp_ftype gnu_triplet_regexp)
5155 gdbarch->gnu_triplet_regexp = gnu_triplet_regexp;
5159 gdbarch_addressable_memory_unit_size (struct gdbarch *gdbarch)
5161 gdb_assert (gdbarch != NULL);
5162 gdb_assert (gdbarch->addressable_memory_unit_size != NULL);
5163 if (gdbarch_debug >= 2)
5164 gdb_printf (gdb_stdlog, "gdbarch_addressable_memory_unit_size called\n");
5165 return gdbarch->addressable_memory_unit_size (gdbarch);
5168 void
5169 set_gdbarch_addressable_memory_unit_size (struct gdbarch *gdbarch,
5170 gdbarch_addressable_memory_unit_size_ftype addressable_memory_unit_size)
5172 gdbarch->addressable_memory_unit_size = addressable_memory_unit_size;
5175 const char *
5176 gdbarch_disassembler_options_implicit (struct gdbarch *gdbarch)
5178 gdb_assert (gdbarch != NULL);
5179 /* Skip verify of disassembler_options_implicit, invalid_p == 0 */
5180 if (gdbarch_debug >= 2)
5181 gdb_printf (gdb_stdlog, "gdbarch_disassembler_options_implicit called\n");
5182 return gdbarch->disassembler_options_implicit;
5185 void
5186 set_gdbarch_disassembler_options_implicit (struct gdbarch *gdbarch,
5187 const char * disassembler_options_implicit)
5189 gdbarch->disassembler_options_implicit = disassembler_options_implicit;
5192 char **
5193 gdbarch_disassembler_options (struct gdbarch *gdbarch)
5195 gdb_assert (gdbarch != NULL);
5196 /* Skip verify of disassembler_options, invalid_p == 0 */
5197 if (gdbarch_debug >= 2)
5198 gdb_printf (gdb_stdlog, "gdbarch_disassembler_options called\n");
5199 return gdbarch->disassembler_options;
5202 void
5203 set_gdbarch_disassembler_options (struct gdbarch *gdbarch,
5204 char ** disassembler_options)
5206 gdbarch->disassembler_options = disassembler_options;
5209 const disasm_options_and_args_t *
5210 gdbarch_valid_disassembler_options (struct gdbarch *gdbarch)
5212 gdb_assert (gdbarch != NULL);
5213 /* Skip verify of valid_disassembler_options, invalid_p == 0 */
5214 if (gdbarch_debug >= 2)
5215 gdb_printf (gdb_stdlog, "gdbarch_valid_disassembler_options called\n");
5216 return gdbarch->valid_disassembler_options;
5219 void
5220 set_gdbarch_valid_disassembler_options (struct gdbarch *gdbarch,
5221 const disasm_options_and_args_t * valid_disassembler_options)
5223 gdbarch->valid_disassembler_options = valid_disassembler_options;
5226 ULONGEST
5227 gdbarch_type_align (struct gdbarch *gdbarch, struct type *type)
5229 gdb_assert (gdbarch != NULL);
5230 gdb_assert (gdbarch->type_align != NULL);
5231 if (gdbarch_debug >= 2)
5232 gdb_printf (gdb_stdlog, "gdbarch_type_align called\n");
5233 return gdbarch->type_align (gdbarch, type);
5236 void
5237 set_gdbarch_type_align (struct gdbarch *gdbarch,
5238 gdbarch_type_align_ftype type_align)
5240 gdbarch->type_align = type_align;
5243 std::string
5244 gdbarch_get_pc_address_flags (struct gdbarch *gdbarch, frame_info *frame, CORE_ADDR pc)
5246 gdb_assert (gdbarch != NULL);
5247 gdb_assert (gdbarch->get_pc_address_flags != NULL);
5248 if (gdbarch_debug >= 2)
5249 gdb_printf (gdb_stdlog, "gdbarch_get_pc_address_flags called\n");
5250 return gdbarch->get_pc_address_flags (frame, pc);
5253 void
5254 set_gdbarch_get_pc_address_flags (struct gdbarch *gdbarch,
5255 gdbarch_get_pc_address_flags_ftype get_pc_address_flags)
5257 gdbarch->get_pc_address_flags = get_pc_address_flags;
5260 void
5261 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)
5263 gdb_assert (gdbarch != NULL);
5264 gdb_assert (gdbarch->read_core_file_mappings != NULL);
5265 if (gdbarch_debug >= 2)
5266 gdb_printf (gdb_stdlog, "gdbarch_read_core_file_mappings called\n");
5267 gdbarch->read_core_file_mappings (gdbarch, cbfd, pre_loop_cb, loop_cb);
5270 void
5271 set_gdbarch_read_core_file_mappings (struct gdbarch *gdbarch,
5272 gdbarch_read_core_file_mappings_ftype read_core_file_mappings)
5274 gdbarch->read_core_file_mappings = read_core_file_mappings;