gdb: make gdbarch_register_reggroup_p take a const reggroup *
[binutils-gdb.git] / gdb / gdbarch.c
1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED -*- buffer-read-only: t -*- */
2 /* vi:set ro: */
3
4 /* Dynamic architecture support for GDB, the GNU debugger.
5
6 Copyright (C) 1998-2022 Free Software Foundation, Inc.
7
8 This file is part of GDB.
9
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 3 of the License, or
13 (at your option) any later version.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program. If not, see <http://www.gnu.org/licenses/>. */
22
23 /* To regenerate this file, run:
24 ./gdbarch.py
25 */
26
27
28 /* Maintain the struct gdbarch object. */
29
30 struct gdbarch
31 {
32 /* Has this architecture been fully initialized? */
33 int initialized_p;
34
35 /* An obstack bound to the lifetime of the architecture. */
36 struct obstack *obstack;
37
38 /* basic architectural information. */
39 const struct bfd_arch_info * bfd_arch_info;
40 enum bfd_endian byte_order;
41 enum bfd_endian byte_order_for_code;
42 enum gdb_osabi osabi;
43 const struct target_desc * target_desc;
44
45 /* target specific vector. */
46 struct gdbarch_tdep *tdep;
47 gdbarch_dump_tdep_ftype *dump_tdep;
48
49 /* per-architecture data-pointers. */
50 unsigned nr_data;
51 void **data;
52
53 int short_bit;
54 int int_bit;
55 int long_bit;
56 int long_long_bit;
57 int bfloat16_bit;
58 const struct floatformat ** bfloat16_format;
59 int half_bit;
60 const struct floatformat ** half_format;
61 int float_bit;
62 const struct floatformat ** float_format;
63 int double_bit;
64 const struct floatformat ** double_format;
65 int long_double_bit;
66 const struct floatformat ** long_double_format;
67 int wchar_bit;
68 int wchar_signed;
69 gdbarch_floatformat_for_type_ftype *floatformat_for_type;
70 int ptr_bit;
71 int addr_bit;
72 int dwarf2_addr_size;
73 int char_signed;
74 gdbarch_read_pc_ftype *read_pc;
75 gdbarch_write_pc_ftype *write_pc;
76 gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer;
77 gdbarch_pseudo_register_read_ftype *pseudo_register_read;
78 gdbarch_pseudo_register_read_value_ftype *pseudo_register_read_value;
79 gdbarch_pseudo_register_write_ftype *pseudo_register_write;
80 int num_regs;
81 int num_pseudo_regs;
82 gdbarch_ax_pseudo_register_collect_ftype *ax_pseudo_register_collect;
83 gdbarch_ax_pseudo_register_push_stack_ftype *ax_pseudo_register_push_stack;
84 gdbarch_report_signal_info_ftype *report_signal_info;
85 int sp_regnum;
86 int pc_regnum;
87 int ps_regnum;
88 int fp0_regnum;
89 gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum;
90 gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum;
91 gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum;
92 gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum;
93 gdbarch_register_name_ftype *register_name;
94 gdbarch_register_type_ftype *register_type;
95 gdbarch_dummy_id_ftype *dummy_id;
96 int deprecated_fp_regnum;
97 gdbarch_push_dummy_call_ftype *push_dummy_call;
98 int call_dummy_location;
99 gdbarch_push_dummy_code_ftype *push_dummy_code;
100 gdbarch_code_of_frame_writable_ftype *code_of_frame_writable;
101 gdbarch_print_registers_info_ftype *print_registers_info;
102 gdbarch_print_float_info_ftype *print_float_info;
103 gdbarch_print_vector_info_ftype *print_vector_info;
104 gdbarch_register_sim_regno_ftype *register_sim_regno;
105 gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
106 gdbarch_cannot_store_register_ftype *cannot_store_register;
107 gdbarch_get_longjmp_target_ftype *get_longjmp_target;
108 int believe_pcc_promotion;
109 gdbarch_convert_register_p_ftype *convert_register_p;
110 gdbarch_register_to_value_ftype *register_to_value;
111 gdbarch_value_to_register_ftype *value_to_register;
112 gdbarch_value_from_register_ftype *value_from_register;
113 gdbarch_pointer_to_address_ftype *pointer_to_address;
114 gdbarch_address_to_pointer_ftype *address_to_pointer;
115 gdbarch_integer_to_address_ftype *integer_to_address;
116 gdbarch_return_value_ftype *return_value;
117 gdbarch_return_in_first_hidden_param_p_ftype *return_in_first_hidden_param_p;
118 gdbarch_skip_prologue_ftype *skip_prologue;
119 gdbarch_skip_main_prologue_ftype *skip_main_prologue;
120 gdbarch_skip_entrypoint_ftype *skip_entrypoint;
121 gdbarch_inner_than_ftype *inner_than;
122 gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
123 gdbarch_breakpoint_kind_from_pc_ftype *breakpoint_kind_from_pc;
124 gdbarch_sw_breakpoint_from_kind_ftype *sw_breakpoint_from_kind;
125 gdbarch_breakpoint_kind_from_current_state_ftype *breakpoint_kind_from_current_state;
126 gdbarch_adjust_breakpoint_address_ftype *adjust_breakpoint_address;
127 gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
128 gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
129 CORE_ADDR decr_pc_after_break;
130 CORE_ADDR deprecated_function_start_offset;
131 gdbarch_remote_register_number_ftype *remote_register_number;
132 gdbarch_fetch_tls_load_module_address_ftype *fetch_tls_load_module_address;
133 gdbarch_get_thread_local_address_ftype *get_thread_local_address;
134 CORE_ADDR frame_args_skip;
135 gdbarch_unwind_pc_ftype *unwind_pc;
136 gdbarch_unwind_sp_ftype *unwind_sp;
137 gdbarch_frame_num_args_ftype *frame_num_args;
138 gdbarch_frame_align_ftype *frame_align;
139 gdbarch_stabs_argument_has_addr_ftype *stabs_argument_has_addr;
140 int frame_red_zone_size;
141 gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
142 gdbarch_addr_bits_remove_ftype *addr_bits_remove;
143 int significant_addr_bit;
144 gdbarch_memtag_to_string_ftype *memtag_to_string;
145 gdbarch_tagged_address_p_ftype *tagged_address_p;
146 gdbarch_memtag_matches_p_ftype *memtag_matches_p;
147 gdbarch_set_memtags_ftype *set_memtags;
148 gdbarch_get_memtag_ftype *get_memtag;
149 CORE_ADDR memtag_granule_size;
150 gdbarch_software_single_step_ftype *software_single_step;
151 gdbarch_single_step_through_delay_ftype *single_step_through_delay;
152 gdbarch_print_insn_ftype *print_insn;
153 gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
154 gdbarch_skip_solib_resolver_ftype *skip_solib_resolver;
155 gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
156 gdbarch_in_indirect_branch_thunk_ftype *in_indirect_branch_thunk;
157 gdbarch_stack_frame_destroyed_p_ftype *stack_frame_destroyed_p;
158 gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
159 gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
160 gdbarch_make_symbol_special_ftype *make_symbol_special;
161 gdbarch_adjust_dwarf2_addr_ftype *adjust_dwarf2_addr;
162 gdbarch_adjust_dwarf2_line_ftype *adjust_dwarf2_line;
163 int cannot_step_breakpoint;
164 int have_nonsteppable_watchpoint;
165 gdbarch_address_class_type_flags_ftype *address_class_type_flags;
166 gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name;
167 gdbarch_execute_dwarf_cfa_vendor_op_ftype *execute_dwarf_cfa_vendor_op;
168 gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
169 gdbarch_register_reggroup_p_ftype *register_reggroup_p;
170 gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument;
171 gdbarch_iterate_over_regset_sections_ftype *iterate_over_regset_sections;
172 gdbarch_make_corefile_notes_ftype *make_corefile_notes;
173 gdbarch_find_memory_regions_ftype *find_memory_regions;
174 gdbarch_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;
251 };
252
253 /* Create a new ``struct gdbarch'' based on information provided by
254 ``struct gdbarch_info''. */
255
256 struct gdbarch *
257 gdbarch_alloc (const struct gdbarch_info *info,
258 struct gdbarch_tdep *tdep)
259 {
260 struct gdbarch *gdbarch;
261
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;
269
270 alloc_gdbarch_data (gdbarch);
271
272 gdbarch->tdep = tdep;
273
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;
279
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() */
375
376 return gdbarch;
377 }
378
379
380
381 /* Ensure that all values in a GDBARCH are reasonable. */
382
383 static void
384 verify_gdbarch (struct gdbarch *gdbarch)
385 {
386 string_file log;
387
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 ());
612 }
613
614
615 /* Print out the details of the current architecture. */
616
617 void
618 gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
619 {
620 const char *gdb_nm_file = "<not-defined>";
621
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);
1425 }
1426
1427
1428 const struct bfd_arch_info *
1429 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
1430 {
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;
1435 }
1436
1437 enum bfd_endian
1438 gdbarch_byte_order (struct gdbarch *gdbarch)
1439 {
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;
1444 }
1445
1446 enum bfd_endian
1447 gdbarch_byte_order_for_code (struct gdbarch *gdbarch)
1448 {
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;
1453 }
1454
1455 enum gdb_osabi
1456 gdbarch_osabi (struct gdbarch *gdbarch)
1457 {
1458 gdb_assert (gdbarch != NULL);
1459 if (gdbarch_debug >= 2)
1460 gdb_printf (gdb_stdlog, "gdbarch_osabi called\n");
1461 return gdbarch->osabi;
1462 }
1463
1464 const struct target_desc *
1465 gdbarch_target_desc (struct gdbarch *gdbarch)
1466 {
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;
1471 }
1472
1473 int
1474 gdbarch_short_bit (struct gdbarch *gdbarch)
1475 {
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;
1481 }
1482
1483 void
1484 set_gdbarch_short_bit (struct gdbarch *gdbarch,
1485 int short_bit)
1486 {
1487 gdbarch->short_bit = short_bit;
1488 }
1489
1490 int
1491 gdbarch_int_bit (struct gdbarch *gdbarch)
1492 {
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;
1498 }
1499
1500 void
1501 set_gdbarch_int_bit (struct gdbarch *gdbarch,
1502 int int_bit)
1503 {
1504 gdbarch->int_bit = int_bit;
1505 }
1506
1507 int
1508 gdbarch_long_bit (struct gdbarch *gdbarch)
1509 {
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;
1515 }
1516
1517 void
1518 set_gdbarch_long_bit (struct gdbarch *gdbarch,
1519 int long_bit)
1520 {
1521 gdbarch->long_bit = long_bit;
1522 }
1523
1524 int
1525 gdbarch_long_long_bit (struct gdbarch *gdbarch)
1526 {
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;
1532 }
1533
1534 void
1535 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
1536 int long_long_bit)
1537 {
1538 gdbarch->long_long_bit = long_long_bit;
1539 }
1540
1541 int
1542 gdbarch_bfloat16_bit (struct gdbarch *gdbarch)
1543 {
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;
1549 }
1550
1551 void
1552 set_gdbarch_bfloat16_bit (struct gdbarch *gdbarch,
1553 int bfloat16_bit)
1554 {
1555 gdbarch->bfloat16_bit = bfloat16_bit;
1556 }
1557
1558 const struct floatformat **
1559 gdbarch_bfloat16_format (struct gdbarch *gdbarch)
1560 {
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;
1565 }
1566
1567 void
1568 set_gdbarch_bfloat16_format (struct gdbarch *gdbarch,
1569 const struct floatformat ** bfloat16_format)
1570 {
1571 gdbarch->bfloat16_format = bfloat16_format;
1572 }
1573
1574 int
1575 gdbarch_half_bit (struct gdbarch *gdbarch)
1576 {
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;
1582 }
1583
1584 void
1585 set_gdbarch_half_bit (struct gdbarch *gdbarch,
1586 int half_bit)
1587 {
1588 gdbarch->half_bit = half_bit;
1589 }
1590
1591 const struct floatformat **
1592 gdbarch_half_format (struct gdbarch *gdbarch)
1593 {
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;
1598 }
1599
1600 void
1601 set_gdbarch_half_format (struct gdbarch *gdbarch,
1602 const struct floatformat ** half_format)
1603 {
1604 gdbarch->half_format = half_format;
1605 }
1606
1607 int
1608 gdbarch_float_bit (struct gdbarch *gdbarch)
1609 {
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;
1615 }
1616
1617 void
1618 set_gdbarch_float_bit (struct gdbarch *gdbarch,
1619 int float_bit)
1620 {
1621 gdbarch->float_bit = float_bit;
1622 }
1623
1624 const struct floatformat **
1625 gdbarch_float_format (struct gdbarch *gdbarch)
1626 {
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;
1631 }
1632
1633 void
1634 set_gdbarch_float_format (struct gdbarch *gdbarch,
1635 const struct floatformat ** float_format)
1636 {
1637 gdbarch->float_format = float_format;
1638 }
1639
1640 int
1641 gdbarch_double_bit (struct gdbarch *gdbarch)
1642 {
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;
1648 }
1649
1650 void
1651 set_gdbarch_double_bit (struct gdbarch *gdbarch,
1652 int double_bit)
1653 {
1654 gdbarch->double_bit = double_bit;
1655 }
1656
1657 const struct floatformat **
1658 gdbarch_double_format (struct gdbarch *gdbarch)
1659 {
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;
1664 }
1665
1666 void
1667 set_gdbarch_double_format (struct gdbarch *gdbarch,
1668 const struct floatformat ** double_format)
1669 {
1670 gdbarch->double_format = double_format;
1671 }
1672
1673 int
1674 gdbarch_long_double_bit (struct gdbarch *gdbarch)
1675 {
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;
1681 }
1682
1683 void
1684 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
1685 int long_double_bit)
1686 {
1687 gdbarch->long_double_bit = long_double_bit;
1688 }
1689
1690 const struct floatformat **
1691 gdbarch_long_double_format (struct gdbarch *gdbarch)
1692 {
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;
1697 }
1698
1699 void
1700 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
1701 const struct floatformat ** long_double_format)
1702 {
1703 gdbarch->long_double_format = long_double_format;
1704 }
1705
1706 int
1707 gdbarch_wchar_bit (struct gdbarch *gdbarch)
1708 {
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;
1714 }
1715
1716 void
1717 set_gdbarch_wchar_bit (struct gdbarch *gdbarch,
1718 int wchar_bit)
1719 {
1720 gdbarch->wchar_bit = wchar_bit;
1721 }
1722
1723 int
1724 gdbarch_wchar_signed (struct gdbarch *gdbarch)
1725 {
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;
1732 }
1733
1734 void
1735 set_gdbarch_wchar_signed (struct gdbarch *gdbarch,
1736 int wchar_signed)
1737 {
1738 gdbarch->wchar_signed = wchar_signed;
1739 }
1740
1741 const struct floatformat **
1742 gdbarch_floatformat_for_type (struct gdbarch *gdbarch, const char *name, int length)
1743 {
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);
1749 }
1750
1751 void
1752 set_gdbarch_floatformat_for_type (struct gdbarch *gdbarch,
1753 gdbarch_floatformat_for_type_ftype floatformat_for_type)
1754 {
1755 gdbarch->floatformat_for_type = floatformat_for_type;
1756 }
1757
1758 int
1759 gdbarch_ptr_bit (struct gdbarch *gdbarch)
1760 {
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;
1766 }
1767
1768 void
1769 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
1770 int ptr_bit)
1771 {
1772 gdbarch->ptr_bit = ptr_bit;
1773 }
1774
1775 int
1776 gdbarch_addr_bit (struct gdbarch *gdbarch)
1777 {
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;
1784 }
1785
1786 void
1787 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
1788 int addr_bit)
1789 {
1790 gdbarch->addr_bit = addr_bit;
1791 }
1792
1793 int
1794 gdbarch_dwarf2_addr_size (struct gdbarch *gdbarch)
1795 {
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;
1802 }
1803
1804 void
1805 set_gdbarch_dwarf2_addr_size (struct gdbarch *gdbarch,
1806 int dwarf2_addr_size)
1807 {
1808 gdbarch->dwarf2_addr_size = dwarf2_addr_size;
1809 }
1810
1811 int
1812 gdbarch_char_signed (struct gdbarch *gdbarch)
1813 {
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;
1820 }
1821
1822 void
1823 set_gdbarch_char_signed (struct gdbarch *gdbarch,
1824 int char_signed)
1825 {
1826 gdbarch->char_signed = char_signed;
1827 }
1828
1829 bool
1830 gdbarch_read_pc_p (struct gdbarch *gdbarch)
1831 {
1832 gdb_assert (gdbarch != NULL);
1833 return gdbarch->read_pc != NULL;
1834 }
1835
1836 CORE_ADDR
1837 gdbarch_read_pc (struct gdbarch *gdbarch, readable_regcache *regcache)
1838 {
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);
1844 }
1845
1846 void
1847 set_gdbarch_read_pc (struct gdbarch *gdbarch,
1848 gdbarch_read_pc_ftype read_pc)
1849 {
1850 gdbarch->read_pc = read_pc;
1851 }
1852
1853 bool
1854 gdbarch_write_pc_p (struct gdbarch *gdbarch)
1855 {
1856 gdb_assert (gdbarch != NULL);
1857 return gdbarch->write_pc != NULL;
1858 }
1859
1860 void
1861 gdbarch_write_pc (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR val)
1862 {
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);
1868 }
1869
1870 void
1871 set_gdbarch_write_pc (struct gdbarch *gdbarch,
1872 gdbarch_write_pc_ftype write_pc)
1873 {
1874 gdbarch->write_pc = write_pc;
1875 }
1876
1877 void
1878 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
1879 {
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);
1885 }
1886
1887 void
1888 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
1889 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
1890 {
1891 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
1892 }
1893
1894 bool
1895 gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
1896 {
1897 gdb_assert (gdbarch != NULL);
1898 return gdbarch->pseudo_register_read != NULL;
1899 }
1900
1901 enum register_status
1902 gdbarch_pseudo_register_read (struct gdbarch *gdbarch, readable_regcache *regcache, int cookednum, gdb_byte *buf)
1903 {
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);
1909 }
1910
1911 void
1912 set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
1913 gdbarch_pseudo_register_read_ftype pseudo_register_read)
1914 {
1915 gdbarch->pseudo_register_read = pseudo_register_read;
1916 }
1917
1918 bool
1919 gdbarch_pseudo_register_read_value_p (struct gdbarch *gdbarch)
1920 {
1921 gdb_assert (gdbarch != NULL);
1922 return gdbarch->pseudo_register_read_value != NULL;
1923 }
1924
1925 struct value *
1926 gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch, readable_regcache *regcache, int cookednum)
1927 {
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);
1933 }
1934
1935 void
1936 set_gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch,
1937 gdbarch_pseudo_register_read_value_ftype pseudo_register_read_value)
1938 {
1939 gdbarch->pseudo_register_read_value = pseudo_register_read_value;
1940 }
1941
1942 bool
1943 gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
1944 {
1945 gdb_assert (gdbarch != NULL);
1946 return gdbarch->pseudo_register_write != NULL;
1947 }
1948
1949 void
1950 gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const gdb_byte *buf)
1951 {
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);
1957 }
1958
1959 void
1960 set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
1961 gdbarch_pseudo_register_write_ftype pseudo_register_write)
1962 {
1963 gdbarch->pseudo_register_write = pseudo_register_write;
1964 }
1965
1966 int
1967 gdbarch_num_regs (struct gdbarch *gdbarch)
1968 {
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;
1975 }
1976
1977 void
1978 set_gdbarch_num_regs (struct gdbarch *gdbarch,
1979 int num_regs)
1980 {
1981 gdbarch->num_regs = num_regs;
1982 }
1983
1984 int
1985 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
1986 {
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;
1992 }
1993
1994 void
1995 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
1996 int num_pseudo_regs)
1997 {
1998 gdbarch->num_pseudo_regs = num_pseudo_regs;
1999 }
2000
2001 bool
2002 gdbarch_ax_pseudo_register_collect_p (struct gdbarch *gdbarch)
2003 {
2004 gdb_assert (gdbarch != NULL);
2005 return gdbarch->ax_pseudo_register_collect != NULL;
2006 }
2007
2008 int
2009 gdbarch_ax_pseudo_register_collect (struct gdbarch *gdbarch, struct agent_expr *ax, int reg)
2010 {
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);
2016 }
2017
2018 void
2019 set_gdbarch_ax_pseudo_register_collect (struct gdbarch *gdbarch,
2020 gdbarch_ax_pseudo_register_collect_ftype ax_pseudo_register_collect)
2021 {
2022 gdbarch->ax_pseudo_register_collect = ax_pseudo_register_collect;
2023 }
2024
2025 bool
2026 gdbarch_ax_pseudo_register_push_stack_p (struct gdbarch *gdbarch)
2027 {
2028 gdb_assert (gdbarch != NULL);
2029 return gdbarch->ax_pseudo_register_push_stack != NULL;
2030 }
2031
2032 int
2033 gdbarch_ax_pseudo_register_push_stack (struct gdbarch *gdbarch, struct agent_expr *ax, int reg)
2034 {
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);
2040 }
2041
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)
2045 {
2046 gdbarch->ax_pseudo_register_push_stack = ax_pseudo_register_push_stack;
2047 }
2048
2049 bool
2050 gdbarch_report_signal_info_p (struct gdbarch *gdbarch)
2051 {
2052 gdb_assert (gdbarch != NULL);
2053 return gdbarch->report_signal_info != NULL;
2054 }
2055
2056 void
2057 gdbarch_report_signal_info (struct gdbarch *gdbarch, struct ui_out *uiout, enum gdb_signal siggnal)
2058 {
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);
2064 }
2065
2066 void
2067 set_gdbarch_report_signal_info (struct gdbarch *gdbarch,
2068 gdbarch_report_signal_info_ftype report_signal_info)
2069 {
2070 gdbarch->report_signal_info = report_signal_info;
2071 }
2072
2073 int
2074 gdbarch_sp_regnum (struct gdbarch *gdbarch)
2075 {
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;
2081 }
2082
2083 void
2084 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
2085 int sp_regnum)
2086 {
2087 gdbarch->sp_regnum = sp_regnum;
2088 }
2089
2090 int
2091 gdbarch_pc_regnum (struct gdbarch *gdbarch)
2092 {
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;
2098 }
2099
2100 void
2101 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
2102 int pc_regnum)
2103 {
2104 gdbarch->pc_regnum = pc_regnum;
2105 }
2106
2107 int
2108 gdbarch_ps_regnum (struct gdbarch *gdbarch)
2109 {
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;
2115 }
2116
2117 void
2118 set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
2119 int ps_regnum)
2120 {
2121 gdbarch->ps_regnum = ps_regnum;
2122 }
2123
2124 int
2125 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
2126 {
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;
2132 }
2133
2134 void
2135 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
2136 int fp0_regnum)
2137 {
2138 gdbarch->fp0_regnum = fp0_regnum;
2139 }
2140
2141 int
2142 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
2143 {
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);
2149 }
2150
2151 void
2152 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
2153 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
2154 {
2155 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
2156 }
2157
2158 int
2159 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
2160 {
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);
2166 }
2167
2168 void
2169 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
2170 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
2171 {
2172 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
2173 }
2174
2175 int
2176 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
2177 {
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);
2183 }
2184
2185 void
2186 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
2187 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
2188 {
2189 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
2190 }
2191
2192 int
2193 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
2194 {
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);
2200 }
2201
2202 void
2203 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
2204 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
2205 {
2206 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
2207 }
2208
2209 const char *
2210 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
2211 {
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);
2217 }
2218
2219 void
2220 set_gdbarch_register_name (struct gdbarch *gdbarch,
2221 gdbarch_register_name_ftype register_name)
2222 {
2223 gdbarch->register_name = register_name;
2224 }
2225
2226 struct type *
2227 gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
2228 {
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);
2234 }
2235
2236 void
2237 set_gdbarch_register_type (struct gdbarch *gdbarch,
2238 gdbarch_register_type_ftype register_type)
2239 {
2240 gdbarch->register_type = register_type;
2241 }
2242
2243 struct frame_id
2244 gdbarch_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
2245 {
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);
2251 }
2252
2253 void
2254 set_gdbarch_dummy_id (struct gdbarch *gdbarch,
2255 gdbarch_dummy_id_ftype dummy_id)
2256 {
2257 gdbarch->dummy_id = dummy_id;
2258 }
2259
2260 int
2261 gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch)
2262 {
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;
2268 }
2269
2270 void
2271 set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch,
2272 int deprecated_fp_regnum)
2273 {
2274 gdbarch->deprecated_fp_regnum = deprecated_fp_regnum;
2275 }
2276
2277 bool
2278 gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
2279 {
2280 gdb_assert (gdbarch != NULL);
2281 return gdbarch->push_dummy_call != NULL;
2282 }
2283
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)
2286 {
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);
2292 }
2293
2294 void
2295 set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
2296 gdbarch_push_dummy_call_ftype push_dummy_call)
2297 {
2298 gdbarch->push_dummy_call = push_dummy_call;
2299 }
2300
2301 int
2302 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
2303 {
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;
2309 }
2310
2311 void
2312 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
2313 int call_dummy_location)
2314 {
2315 gdbarch->call_dummy_location = call_dummy_location;
2316 }
2317
2318 bool
2319 gdbarch_push_dummy_code_p (struct gdbarch *gdbarch)
2320 {
2321 gdb_assert (gdbarch != NULL);
2322 return gdbarch->push_dummy_code != NULL;
2323 }
2324
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)
2327 {
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);
2333 }
2334
2335 void
2336 set_gdbarch_push_dummy_code (struct gdbarch *gdbarch,
2337 gdbarch_push_dummy_code_ftype push_dummy_code)
2338 {
2339 gdbarch->push_dummy_code = push_dummy_code;
2340 }
2341
2342 int
2343 gdbarch_code_of_frame_writable (struct gdbarch *gdbarch, struct frame_info *frame)
2344 {
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);
2350 }
2351
2352 void
2353 set_gdbarch_code_of_frame_writable (struct gdbarch *gdbarch,
2354 gdbarch_code_of_frame_writable_ftype code_of_frame_writable)
2355 {
2356 gdbarch->code_of_frame_writable = code_of_frame_writable;
2357 }
2358
2359 void
2360 gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
2361 {
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);
2367 }
2368
2369 void
2370 set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
2371 gdbarch_print_registers_info_ftype print_registers_info)
2372 {
2373 gdbarch->print_registers_info = print_registers_info;
2374 }
2375
2376 void
2377 gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
2378 {
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);
2384 }
2385
2386 void
2387 set_gdbarch_print_float_info (struct gdbarch *gdbarch,
2388 gdbarch_print_float_info_ftype print_float_info)
2389 {
2390 gdbarch->print_float_info = print_float_info;
2391 }
2392
2393 bool
2394 gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
2395 {
2396 gdb_assert (gdbarch != NULL);
2397 return gdbarch->print_vector_info != NULL;
2398 }
2399
2400 void
2401 gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
2402 {
2403 gdb_assert (gdbarch != NULL);
2404 gdb_assert (gdbarch->print_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);
2408 }
2409
2410 void
2411 set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
2412 gdbarch_print_vector_info_ftype print_vector_info)
2413 {
2414 gdbarch->print_vector_info = print_vector_info;
2415 }
2416
2417 int
2418 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
2419 {
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);
2425 }
2426
2427 void
2428 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
2429 gdbarch_register_sim_regno_ftype register_sim_regno)
2430 {
2431 gdbarch->register_sim_regno = register_sim_regno;
2432 }
2433
2434 int
2435 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
2436 {
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);
2442 }
2443
2444 void
2445 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
2446 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
2447 {
2448 gdbarch->cannot_fetch_register = cannot_fetch_register;
2449 }
2450
2451 int
2452 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
2453 {
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);
2459 }
2460
2461 void
2462 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
2463 gdbarch_cannot_store_register_ftype cannot_store_register)
2464 {
2465 gdbarch->cannot_store_register = cannot_store_register;
2466 }
2467
2468 bool
2469 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
2470 {
2471 gdb_assert (gdbarch != NULL);
2472 return gdbarch->get_longjmp_target != NULL;
2473 }
2474
2475 int
2476 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR *pc)
2477 {
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);
2483 }
2484
2485 void
2486 set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
2487 gdbarch_get_longjmp_target_ftype get_longjmp_target)
2488 {
2489 gdbarch->get_longjmp_target = get_longjmp_target;
2490 }
2491
2492 int
2493 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
2494 {
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;
2500 }
2501
2502 void
2503 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
2504 int believe_pcc_promotion)
2505 {
2506 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
2507 }
2508
2509 int
2510 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
2511 {
2512 gdb_assert (gdbarch != NULL);
2513 gdb_assert (gdbarch->convert_register_p != NULL);
2514 if (gdbarch_debug >= 2)
2515 gdb_printf (gdb_stdlog, "gdbarch_convert_register_p called\n");
2516 return gdbarch->convert_register_p (gdbarch, regnum, type);
2517 }
2518
2519 void
2520 set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
2521 gdbarch_convert_register_p_ftype convert_register_p)
2522 {
2523 gdbarch->convert_register_p = convert_register_p;
2524 }
2525
2526 int
2527 gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, gdb_byte *buf, int *optimizedp, int *unavailablep)
2528 {
2529 gdb_assert (gdbarch != NULL);
2530 gdb_assert (gdbarch->register_to_value != NULL);
2531 if (gdbarch_debug >= 2)
2532 gdb_printf (gdb_stdlog, "gdbarch_register_to_value called\n");
2533 return gdbarch->register_to_value (frame, regnum, type, buf, optimizedp, unavailablep);
2534 }
2535
2536 void
2537 set_gdbarch_register_to_value (struct gdbarch *gdbarch,
2538 gdbarch_register_to_value_ftype register_to_value)
2539 {
2540 gdbarch->register_to_value = register_to_value;
2541 }
2542
2543 void
2544 gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const gdb_byte *buf)
2545 {
2546 gdb_assert (gdbarch != NULL);
2547 gdb_assert (gdbarch->value_to_register != NULL);
2548 if (gdbarch_debug >= 2)
2549 gdb_printf (gdb_stdlog, "gdbarch_value_to_register called\n");
2550 gdbarch->value_to_register (frame, regnum, type, buf);
2551 }
2552
2553 void
2554 set_gdbarch_value_to_register (struct gdbarch *gdbarch,
2555 gdbarch_value_to_register_ftype value_to_register)
2556 {
2557 gdbarch->value_to_register = value_to_register;
2558 }
2559
2560 struct value *
2561 gdbarch_value_from_register (struct gdbarch *gdbarch, struct type *type, int regnum, struct frame_id frame_id)
2562 {
2563 gdb_assert (gdbarch != NULL);
2564 gdb_assert (gdbarch->value_from_register != NULL);
2565 if (gdbarch_debug >= 2)
2566 gdb_printf (gdb_stdlog, "gdbarch_value_from_register called\n");
2567 return gdbarch->value_from_register (gdbarch, type, regnum, frame_id);
2568 }
2569
2570 void
2571 set_gdbarch_value_from_register (struct gdbarch *gdbarch,
2572 gdbarch_value_from_register_ftype value_from_register)
2573 {
2574 gdbarch->value_from_register = value_from_register;
2575 }
2576
2577 CORE_ADDR
2578 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
2579 {
2580 gdb_assert (gdbarch != NULL);
2581 gdb_assert (gdbarch->pointer_to_address != NULL);
2582 if (gdbarch_debug >= 2)
2583 gdb_printf (gdb_stdlog, "gdbarch_pointer_to_address called\n");
2584 return gdbarch->pointer_to_address (gdbarch, type, buf);
2585 }
2586
2587 void
2588 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
2589 gdbarch_pointer_to_address_ftype pointer_to_address)
2590 {
2591 gdbarch->pointer_to_address = pointer_to_address;
2592 }
2593
2594 void
2595 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, gdb_byte *buf, CORE_ADDR addr)
2596 {
2597 gdb_assert (gdbarch != NULL);
2598 gdb_assert (gdbarch->address_to_pointer != NULL);
2599 if (gdbarch_debug >= 2)
2600 gdb_printf (gdb_stdlog, "gdbarch_address_to_pointer called\n");
2601 gdbarch->address_to_pointer (gdbarch, type, buf, addr);
2602 }
2603
2604 void
2605 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
2606 gdbarch_address_to_pointer_ftype address_to_pointer)
2607 {
2608 gdbarch->address_to_pointer = address_to_pointer;
2609 }
2610
2611 bool
2612 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
2613 {
2614 gdb_assert (gdbarch != NULL);
2615 return gdbarch->integer_to_address != NULL;
2616 }
2617
2618 CORE_ADDR
2619 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
2620 {
2621 gdb_assert (gdbarch != NULL);
2622 gdb_assert (gdbarch->integer_to_address != NULL);
2623 if (gdbarch_debug >= 2)
2624 gdb_printf (gdb_stdlog, "gdbarch_integer_to_address called\n");
2625 return gdbarch->integer_to_address (gdbarch, type, buf);
2626 }
2627
2628 void
2629 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
2630 gdbarch_integer_to_address_ftype integer_to_address)
2631 {
2632 gdbarch->integer_to_address = integer_to_address;
2633 }
2634
2635 bool
2636 gdbarch_return_value_p (struct gdbarch *gdbarch)
2637 {
2638 gdb_assert (gdbarch != NULL);
2639 return gdbarch->return_value != NULL;
2640 }
2641
2642 enum return_value_convention
2643 gdbarch_return_value (struct gdbarch *gdbarch, struct value *function, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
2644 {
2645 gdb_assert (gdbarch != NULL);
2646 gdb_assert (gdbarch->return_value != NULL);
2647 if (gdbarch_debug >= 2)
2648 gdb_printf (gdb_stdlog, "gdbarch_return_value called\n");
2649 return gdbarch->return_value (gdbarch, function, valtype, regcache, readbuf, writebuf);
2650 }
2651
2652 void
2653 set_gdbarch_return_value (struct gdbarch *gdbarch,
2654 gdbarch_return_value_ftype return_value)
2655 {
2656 gdbarch->return_value = return_value;
2657 }
2658
2659 int
2660 gdbarch_return_in_first_hidden_param_p (struct gdbarch *gdbarch, struct type *type)
2661 {
2662 gdb_assert (gdbarch != NULL);
2663 gdb_assert (gdbarch->return_in_first_hidden_param_p != NULL);
2664 if (gdbarch_debug >= 2)
2665 gdb_printf (gdb_stdlog, "gdbarch_return_in_first_hidden_param_p called\n");
2666 return gdbarch->return_in_first_hidden_param_p (gdbarch, type);
2667 }
2668
2669 void
2670 set_gdbarch_return_in_first_hidden_param_p (struct gdbarch *gdbarch,
2671 gdbarch_return_in_first_hidden_param_p_ftype return_in_first_hidden_param_p)
2672 {
2673 gdbarch->return_in_first_hidden_param_p = return_in_first_hidden_param_p;
2674 }
2675
2676 CORE_ADDR
2677 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
2678 {
2679 gdb_assert (gdbarch != NULL);
2680 gdb_assert (gdbarch->skip_prologue != NULL);
2681 if (gdbarch_debug >= 2)
2682 gdb_printf (gdb_stdlog, "gdbarch_skip_prologue called\n");
2683 return gdbarch->skip_prologue (gdbarch, ip);
2684 }
2685
2686 void
2687 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
2688 gdbarch_skip_prologue_ftype skip_prologue)
2689 {
2690 gdbarch->skip_prologue = skip_prologue;
2691 }
2692
2693 bool
2694 gdbarch_skip_main_prologue_p (struct gdbarch *gdbarch)
2695 {
2696 gdb_assert (gdbarch != NULL);
2697 return gdbarch->skip_main_prologue != NULL;
2698 }
2699
2700 CORE_ADDR
2701 gdbarch_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
2702 {
2703 gdb_assert (gdbarch != NULL);
2704 gdb_assert (gdbarch->skip_main_prologue != NULL);
2705 if (gdbarch_debug >= 2)
2706 gdb_printf (gdb_stdlog, "gdbarch_skip_main_prologue called\n");
2707 return gdbarch->skip_main_prologue (gdbarch, ip);
2708 }
2709
2710 void
2711 set_gdbarch_skip_main_prologue (struct gdbarch *gdbarch,
2712 gdbarch_skip_main_prologue_ftype skip_main_prologue)
2713 {
2714 gdbarch->skip_main_prologue = skip_main_prologue;
2715 }
2716
2717 bool
2718 gdbarch_skip_entrypoint_p (struct gdbarch *gdbarch)
2719 {
2720 gdb_assert (gdbarch != NULL);
2721 return gdbarch->skip_entrypoint != NULL;
2722 }
2723
2724 CORE_ADDR
2725 gdbarch_skip_entrypoint (struct gdbarch *gdbarch, CORE_ADDR ip)
2726 {
2727 gdb_assert (gdbarch != NULL);
2728 gdb_assert (gdbarch->skip_entrypoint != NULL);
2729 if (gdbarch_debug >= 2)
2730 gdb_printf (gdb_stdlog, "gdbarch_skip_entrypoint called\n");
2731 return gdbarch->skip_entrypoint (gdbarch, ip);
2732 }
2733
2734 void
2735 set_gdbarch_skip_entrypoint (struct gdbarch *gdbarch,
2736 gdbarch_skip_entrypoint_ftype skip_entrypoint)
2737 {
2738 gdbarch->skip_entrypoint = skip_entrypoint;
2739 }
2740
2741 int
2742 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
2743 {
2744 gdb_assert (gdbarch != NULL);
2745 gdb_assert (gdbarch->inner_than != NULL);
2746 if (gdbarch_debug >= 2)
2747 gdb_printf (gdb_stdlog, "gdbarch_inner_than called\n");
2748 return gdbarch->inner_than (lhs, rhs);
2749 }
2750
2751 void
2752 set_gdbarch_inner_than (struct gdbarch *gdbarch,
2753 gdbarch_inner_than_ftype inner_than)
2754 {
2755 gdbarch->inner_than = inner_than;
2756 }
2757
2758 const gdb_byte *
2759 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
2760 {
2761 gdb_assert (gdbarch != NULL);
2762 gdb_assert (gdbarch->breakpoint_from_pc != NULL);
2763 if (gdbarch_debug >= 2)
2764 gdb_printf (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
2765 return gdbarch->breakpoint_from_pc (gdbarch, pcptr, lenptr);
2766 }
2767
2768 void
2769 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
2770 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
2771 {
2772 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
2773 }
2774
2775 int
2776 gdbarch_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
2777 {
2778 gdb_assert (gdbarch != NULL);
2779 gdb_assert (gdbarch->breakpoint_kind_from_pc != NULL);
2780 if (gdbarch_debug >= 2)
2781 gdb_printf (gdb_stdlog, "gdbarch_breakpoint_kind_from_pc called\n");
2782 return gdbarch->breakpoint_kind_from_pc (gdbarch, pcptr);
2783 }
2784
2785 void
2786 set_gdbarch_breakpoint_kind_from_pc (struct gdbarch *gdbarch,
2787 gdbarch_breakpoint_kind_from_pc_ftype breakpoint_kind_from_pc)
2788 {
2789 gdbarch->breakpoint_kind_from_pc = breakpoint_kind_from_pc;
2790 }
2791
2792 const gdb_byte *
2793 gdbarch_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
2794 {
2795 gdb_assert (gdbarch != NULL);
2796 gdb_assert (gdbarch->sw_breakpoint_from_kind != NULL);
2797 if (gdbarch_debug >= 2)
2798 gdb_printf (gdb_stdlog, "gdbarch_sw_breakpoint_from_kind called\n");
2799 return gdbarch->sw_breakpoint_from_kind (gdbarch, kind, size);
2800 }
2801
2802 void
2803 set_gdbarch_sw_breakpoint_from_kind (struct gdbarch *gdbarch,
2804 gdbarch_sw_breakpoint_from_kind_ftype sw_breakpoint_from_kind)
2805 {
2806 gdbarch->sw_breakpoint_from_kind = sw_breakpoint_from_kind;
2807 }
2808
2809 int
2810 gdbarch_breakpoint_kind_from_current_state (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR *pcptr)
2811 {
2812 gdb_assert (gdbarch != NULL);
2813 gdb_assert (gdbarch->breakpoint_kind_from_current_state != NULL);
2814 if (gdbarch_debug >= 2)
2815 gdb_printf (gdb_stdlog, "gdbarch_breakpoint_kind_from_current_state called\n");
2816 return gdbarch->breakpoint_kind_from_current_state (gdbarch, regcache, pcptr);
2817 }
2818
2819 void
2820 set_gdbarch_breakpoint_kind_from_current_state (struct gdbarch *gdbarch,
2821 gdbarch_breakpoint_kind_from_current_state_ftype breakpoint_kind_from_current_state)
2822 {
2823 gdbarch->breakpoint_kind_from_current_state = breakpoint_kind_from_current_state;
2824 }
2825
2826 bool
2827 gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch)
2828 {
2829 gdb_assert (gdbarch != NULL);
2830 return gdbarch->adjust_breakpoint_address != NULL;
2831 }
2832
2833 CORE_ADDR
2834 gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr)
2835 {
2836 gdb_assert (gdbarch != NULL);
2837 gdb_assert (gdbarch->adjust_breakpoint_address != NULL);
2838 if (gdbarch_debug >= 2)
2839 gdb_printf (gdb_stdlog, "gdbarch_adjust_breakpoint_address called\n");
2840 return gdbarch->adjust_breakpoint_address (gdbarch, bpaddr);
2841 }
2842
2843 void
2844 set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch,
2845 gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address)
2846 {
2847 gdbarch->adjust_breakpoint_address = adjust_breakpoint_address;
2848 }
2849
2850 int
2851 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
2852 {
2853 gdb_assert (gdbarch != NULL);
2854 gdb_assert (gdbarch->memory_insert_breakpoint != NULL);
2855 if (gdbarch_debug >= 2)
2856 gdb_printf (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
2857 return gdbarch->memory_insert_breakpoint (gdbarch, bp_tgt);
2858 }
2859
2860 void
2861 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
2862 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
2863 {
2864 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
2865 }
2866
2867 int
2868 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
2869 {
2870 gdb_assert (gdbarch != NULL);
2871 gdb_assert (gdbarch->memory_remove_breakpoint != NULL);
2872 if (gdbarch_debug >= 2)
2873 gdb_printf (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
2874 return gdbarch->memory_remove_breakpoint (gdbarch, bp_tgt);
2875 }
2876
2877 void
2878 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
2879 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
2880 {
2881 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
2882 }
2883
2884 CORE_ADDR
2885 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
2886 {
2887 gdb_assert (gdbarch != NULL);
2888 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
2889 if (gdbarch_debug >= 2)
2890 gdb_printf (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
2891 return gdbarch->decr_pc_after_break;
2892 }
2893
2894 void
2895 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
2896 CORE_ADDR decr_pc_after_break)
2897 {
2898 gdbarch->decr_pc_after_break = decr_pc_after_break;
2899 }
2900
2901 CORE_ADDR
2902 gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch)
2903 {
2904 gdb_assert (gdbarch != NULL);
2905 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
2906 if (gdbarch_debug >= 2)
2907 gdb_printf (gdb_stdlog, "gdbarch_deprecated_function_start_offset called\n");
2908 return gdbarch->deprecated_function_start_offset;
2909 }
2910
2911 void
2912 set_gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch,
2913 CORE_ADDR deprecated_function_start_offset)
2914 {
2915 gdbarch->deprecated_function_start_offset = deprecated_function_start_offset;
2916 }
2917
2918 int
2919 gdbarch_remote_register_number (struct gdbarch *gdbarch, int regno)
2920 {
2921 gdb_assert (gdbarch != NULL);
2922 gdb_assert (gdbarch->remote_register_number != NULL);
2923 if (gdbarch_debug >= 2)
2924 gdb_printf (gdb_stdlog, "gdbarch_remote_register_number called\n");
2925 return gdbarch->remote_register_number (gdbarch, regno);
2926 }
2927
2928 void
2929 set_gdbarch_remote_register_number (struct gdbarch *gdbarch,
2930 gdbarch_remote_register_number_ftype remote_register_number)
2931 {
2932 gdbarch->remote_register_number = remote_register_number;
2933 }
2934
2935 bool
2936 gdbarch_fetch_tls_load_module_address_p (struct gdbarch *gdbarch)
2937 {
2938 gdb_assert (gdbarch != NULL);
2939 return gdbarch->fetch_tls_load_module_address != NULL;
2940 }
2941
2942 CORE_ADDR
2943 gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch, struct objfile *objfile)
2944 {
2945 gdb_assert (gdbarch != NULL);
2946 gdb_assert (gdbarch->fetch_tls_load_module_address != NULL);
2947 if (gdbarch_debug >= 2)
2948 gdb_printf (gdb_stdlog, "gdbarch_fetch_tls_load_module_address called\n");
2949 return gdbarch->fetch_tls_load_module_address (objfile);
2950 }
2951
2952 void
2953 set_gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch,
2954 gdbarch_fetch_tls_load_module_address_ftype fetch_tls_load_module_address)
2955 {
2956 gdbarch->fetch_tls_load_module_address = fetch_tls_load_module_address;
2957 }
2958
2959 bool
2960 gdbarch_get_thread_local_address_p (struct gdbarch *gdbarch)
2961 {
2962 gdb_assert (gdbarch != NULL);
2963 return gdbarch->get_thread_local_address != NULL;
2964 }
2965
2966 CORE_ADDR
2967 gdbarch_get_thread_local_address (struct gdbarch *gdbarch, ptid_t ptid, CORE_ADDR lm_addr, CORE_ADDR offset)
2968 {
2969 gdb_assert (gdbarch != NULL);
2970 gdb_assert (gdbarch->get_thread_local_address != NULL);
2971 if (gdbarch_debug >= 2)
2972 gdb_printf (gdb_stdlog, "gdbarch_get_thread_local_address called\n");
2973 return gdbarch->get_thread_local_address (gdbarch, ptid, lm_addr, offset);
2974 }
2975
2976 void
2977 set_gdbarch_get_thread_local_address (struct gdbarch *gdbarch,
2978 gdbarch_get_thread_local_address_ftype get_thread_local_address)
2979 {
2980 gdbarch->get_thread_local_address = get_thread_local_address;
2981 }
2982
2983 CORE_ADDR
2984 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
2985 {
2986 gdb_assert (gdbarch != NULL);
2987 /* Skip verify of frame_args_skip, invalid_p == 0 */
2988 if (gdbarch_debug >= 2)
2989 gdb_printf (gdb_stdlog, "gdbarch_frame_args_skip called\n");
2990 return gdbarch->frame_args_skip;
2991 }
2992
2993 void
2994 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
2995 CORE_ADDR frame_args_skip)
2996 {
2997 gdbarch->frame_args_skip = frame_args_skip;
2998 }
2999
3000 CORE_ADDR
3001 gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
3002 {
3003 gdb_assert (gdbarch != NULL);
3004 gdb_assert (gdbarch->unwind_pc != NULL);
3005 if (gdbarch_debug >= 2)
3006 gdb_printf (gdb_stdlog, "gdbarch_unwind_pc called\n");
3007 return gdbarch->unwind_pc (gdbarch, next_frame);
3008 }
3009
3010 void
3011 set_gdbarch_unwind_pc (struct gdbarch *gdbarch,
3012 gdbarch_unwind_pc_ftype unwind_pc)
3013 {
3014 gdbarch->unwind_pc = unwind_pc;
3015 }
3016
3017 CORE_ADDR
3018 gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
3019 {
3020 gdb_assert (gdbarch != NULL);
3021 gdb_assert (gdbarch->unwind_sp != NULL);
3022 if (gdbarch_debug >= 2)
3023 gdb_printf (gdb_stdlog, "gdbarch_unwind_sp called\n");
3024 return gdbarch->unwind_sp (gdbarch, next_frame);
3025 }
3026
3027 void
3028 set_gdbarch_unwind_sp (struct gdbarch *gdbarch,
3029 gdbarch_unwind_sp_ftype unwind_sp)
3030 {
3031 gdbarch->unwind_sp = unwind_sp;
3032 }
3033
3034 bool
3035 gdbarch_frame_num_args_p (struct gdbarch *gdbarch)
3036 {
3037 gdb_assert (gdbarch != NULL);
3038 return gdbarch->frame_num_args != NULL;
3039 }
3040
3041 int
3042 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
3043 {
3044 gdb_assert (gdbarch != NULL);
3045 gdb_assert (gdbarch->frame_num_args != NULL);
3046 if (gdbarch_debug >= 2)
3047 gdb_printf (gdb_stdlog, "gdbarch_frame_num_args called\n");
3048 return gdbarch->frame_num_args (frame);
3049 }
3050
3051 void
3052 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
3053 gdbarch_frame_num_args_ftype frame_num_args)
3054 {
3055 gdbarch->frame_num_args = frame_num_args;
3056 }
3057
3058 bool
3059 gdbarch_frame_align_p (struct gdbarch *gdbarch)
3060 {
3061 gdb_assert (gdbarch != NULL);
3062 return gdbarch->frame_align != NULL;
3063 }
3064
3065 CORE_ADDR
3066 gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
3067 {
3068 gdb_assert (gdbarch != NULL);
3069 gdb_assert (gdbarch->frame_align != NULL);
3070 if (gdbarch_debug >= 2)
3071 gdb_printf (gdb_stdlog, "gdbarch_frame_align called\n");
3072 return gdbarch->frame_align (gdbarch, address);
3073 }
3074
3075 void
3076 set_gdbarch_frame_align (struct gdbarch *gdbarch,
3077 gdbarch_frame_align_ftype frame_align)
3078 {
3079 gdbarch->frame_align = frame_align;
3080 }
3081
3082 int
3083 gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type)
3084 {
3085 gdb_assert (gdbarch != NULL);
3086 gdb_assert (gdbarch->stabs_argument_has_addr != NULL);
3087 if (gdbarch_debug >= 2)
3088 gdb_printf (gdb_stdlog, "gdbarch_stabs_argument_has_addr called\n");
3089 return gdbarch->stabs_argument_has_addr (gdbarch, type);
3090 }
3091
3092 void
3093 set_gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch,
3094 gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr)
3095 {
3096 gdbarch->stabs_argument_has_addr = stabs_argument_has_addr;
3097 }
3098
3099 int
3100 gdbarch_frame_red_zone_size (struct gdbarch *gdbarch)
3101 {
3102 gdb_assert (gdbarch != NULL);
3103 /* 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;
3107 }
3108
3109 void
3110 set_gdbarch_frame_red_zone_size (struct gdbarch *gdbarch,
3111 int frame_red_zone_size)
3112 {
3113 gdbarch->frame_red_zone_size = frame_red_zone_size;
3114 }
3115
3116 CORE_ADDR
3117 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
3118 {
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);
3124 }
3125
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)
3129 {
3130 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
3131 }
3132
3133 CORE_ADDR
3134 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
3135 {
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);
3141 }
3142
3143 void
3144 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
3145 gdbarch_addr_bits_remove_ftype addr_bits_remove)
3146 {
3147 gdbarch->addr_bits_remove = addr_bits_remove;
3148 }
3149
3150 int
3151 gdbarch_significant_addr_bit (struct gdbarch *gdbarch)
3152 {
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;
3158 }
3159
3160 void
3161 set_gdbarch_significant_addr_bit (struct gdbarch *gdbarch,
3162 int significant_addr_bit)
3163 {
3164 gdbarch->significant_addr_bit = significant_addr_bit;
3165 }
3166
3167 std::string
3168 gdbarch_memtag_to_string (struct gdbarch *gdbarch, struct value *tag)
3169 {
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);
3175 }
3176
3177 void
3178 set_gdbarch_memtag_to_string (struct gdbarch *gdbarch,
3179 gdbarch_memtag_to_string_ftype memtag_to_string)
3180 {
3181 gdbarch->memtag_to_string = memtag_to_string;
3182 }
3183
3184 bool
3185 gdbarch_tagged_address_p (struct gdbarch *gdbarch, struct value *address)
3186 {
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);
3192 }
3193
3194 void
3195 set_gdbarch_tagged_address_p (struct gdbarch *gdbarch,
3196 gdbarch_tagged_address_p_ftype tagged_address_p)
3197 {
3198 gdbarch->tagged_address_p = tagged_address_p;
3199 }
3200
3201 bool
3202 gdbarch_memtag_matches_p (struct gdbarch *gdbarch, struct value *address)
3203 {
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);
3209 }
3210
3211 void
3212 set_gdbarch_memtag_matches_p (struct gdbarch *gdbarch,
3213 gdbarch_memtag_matches_p_ftype memtag_matches_p)
3214 {
3215 gdbarch->memtag_matches_p = memtag_matches_p;
3216 }
3217
3218 bool
3219 gdbarch_set_memtags (struct gdbarch *gdbarch, struct value *address, size_t length, const gdb::byte_vector &tags, memtag_type tag_type)
3220 {
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);
3226 }
3227
3228 void
3229 set_gdbarch_set_memtags (struct gdbarch *gdbarch,
3230 gdbarch_set_memtags_ftype set_memtags)
3231 {
3232 gdbarch->set_memtags = set_memtags;
3233 }
3234
3235 struct value *
3236 gdbarch_get_memtag (struct gdbarch *gdbarch, struct value *address, memtag_type tag_type)
3237 {
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);
3243 }
3244
3245 void
3246 set_gdbarch_get_memtag (struct gdbarch *gdbarch,
3247 gdbarch_get_memtag_ftype get_memtag)
3248 {
3249 gdbarch->get_memtag = get_memtag;
3250 }
3251
3252 CORE_ADDR
3253 gdbarch_memtag_granule_size (struct gdbarch *gdbarch)
3254 {
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;
3260 }
3261
3262 void
3263 set_gdbarch_memtag_granule_size (struct gdbarch *gdbarch,
3264 CORE_ADDR memtag_granule_size)
3265 {
3266 gdbarch->memtag_granule_size = memtag_granule_size;
3267 }
3268
3269 bool
3270 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
3271 {
3272 gdb_assert (gdbarch != NULL);
3273 return gdbarch->software_single_step != NULL;
3274 }
3275
3276 std::vector<CORE_ADDR>
3277 gdbarch_software_single_step (struct gdbarch *gdbarch, struct regcache *regcache)
3278 {
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);
3284 }
3285
3286 void
3287 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
3288 gdbarch_software_single_step_ftype software_single_step)
3289 {
3290 gdbarch->software_single_step = software_single_step;
3291 }
3292
3293 bool
3294 gdbarch_single_step_through_delay_p (struct gdbarch *gdbarch)
3295 {
3296 gdb_assert (gdbarch != NULL);
3297 return gdbarch->single_step_through_delay != NULL;
3298 }
3299
3300 int
3301 gdbarch_single_step_through_delay (struct gdbarch *gdbarch, struct frame_info *frame)
3302 {
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);
3308 }
3309
3310 void
3311 set_gdbarch_single_step_through_delay (struct gdbarch *gdbarch,
3312 gdbarch_single_step_through_delay_ftype single_step_through_delay)
3313 {
3314 gdbarch->single_step_through_delay = single_step_through_delay;
3315 }
3316
3317 int
3318 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info)
3319 {
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);
3325 }
3326
3327 void
3328 set_gdbarch_print_insn (struct gdbarch *gdbarch,
3329 gdbarch_print_insn_ftype print_insn)
3330 {
3331 gdbarch->print_insn = print_insn;
3332 }
3333
3334 CORE_ADDR
3335 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR pc)
3336 {
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);
3342 }
3343
3344 void
3345 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
3346 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
3347 {
3348 gdbarch->skip_trampoline_code = skip_trampoline_code;
3349 }
3350
3351 CORE_ADDR
3352 gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
3353 {
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);
3359 }
3360
3361 void
3362 set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch,
3363 gdbarch_skip_solib_resolver_ftype skip_solib_resolver)
3364 {
3365 gdbarch->skip_solib_resolver = skip_solib_resolver;
3366 }
3367
3368 int
3369 gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, const char *name)
3370 {
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);
3376 }
3377
3378 void
3379 set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
3380 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
3381 {
3382 gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
3383 }
3384
3385 bool
3386 gdbarch_in_indirect_branch_thunk (struct gdbarch *gdbarch, CORE_ADDR pc)
3387 {
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);
3393 }
3394
3395 void
3396 set_gdbarch_in_indirect_branch_thunk (struct gdbarch *gdbarch,
3397 gdbarch_in_indirect_branch_thunk_ftype in_indirect_branch_thunk)
3398 {
3399 gdbarch->in_indirect_branch_thunk = in_indirect_branch_thunk;
3400 }
3401
3402 int
3403 gdbarch_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR addr)
3404 {
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);
3410 }
3411
3412 void
3413 set_gdbarch_stack_frame_destroyed_p (struct gdbarch *gdbarch,
3414 gdbarch_stack_frame_destroyed_p_ftype stack_frame_destroyed_p)
3415 {
3416 gdbarch->stack_frame_destroyed_p = stack_frame_destroyed_p;
3417 }
3418
3419 bool
3420 gdbarch_elf_make_msymbol_special_p (struct gdbarch *gdbarch)
3421 {
3422 gdb_assert (gdbarch != NULL);
3423 return gdbarch->elf_make_msymbol_special != NULL;
3424 }
3425
3426 void
3427 gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
3428 {
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);
3434 }
3435
3436 void
3437 set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
3438 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
3439 {
3440 gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
3441 }
3442
3443 void
3444 gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
3445 {
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);
3451 }
3452
3453 void
3454 set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
3455 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
3456 {
3457 gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
3458 }
3459
3460 void
3461 gdbarch_make_symbol_special (struct gdbarch *gdbarch, struct symbol *sym, struct objfile *objfile)
3462 {
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);
3468 }
3469
3470 void
3471 set_gdbarch_make_symbol_special (struct gdbarch *gdbarch,
3472 gdbarch_make_symbol_special_ftype make_symbol_special)
3473 {
3474 gdbarch->make_symbol_special = make_symbol_special;
3475 }
3476
3477 CORE_ADDR
3478 gdbarch_adjust_dwarf2_addr (struct gdbarch *gdbarch, CORE_ADDR pc)
3479 {
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);
3485 }
3486
3487 void
3488 set_gdbarch_adjust_dwarf2_addr (struct gdbarch *gdbarch,
3489 gdbarch_adjust_dwarf2_addr_ftype adjust_dwarf2_addr)
3490 {
3491 gdbarch->adjust_dwarf2_addr = adjust_dwarf2_addr;
3492 }
3493
3494 CORE_ADDR
3495 gdbarch_adjust_dwarf2_line (struct gdbarch *gdbarch, CORE_ADDR addr, int rel)
3496 {
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);
3502 }
3503
3504 void
3505 set_gdbarch_adjust_dwarf2_line (struct gdbarch *gdbarch,
3506 gdbarch_adjust_dwarf2_line_ftype adjust_dwarf2_line)
3507 {
3508 gdbarch->adjust_dwarf2_line = adjust_dwarf2_line;
3509 }
3510
3511 int
3512 gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
3513 {
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;
3519 }
3520
3521 void
3522 set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
3523 int cannot_step_breakpoint)
3524 {
3525 gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
3526 }
3527
3528 int
3529 gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
3530 {
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;
3536 }
3537
3538 void
3539 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
3540 int have_nonsteppable_watchpoint)
3541 {
3542 gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
3543 }
3544
3545 bool
3546 gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
3547 {
3548 gdb_assert (gdbarch != NULL);
3549 return gdbarch->address_class_type_flags != NULL;
3550 }
3551
3552 type_instance_flags
3553 gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
3554 {
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);
3560 }
3561
3562 void
3563 set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
3564 gdbarch_address_class_type_flags_ftype address_class_type_flags)
3565 {
3566 gdbarch->address_class_type_flags = address_class_type_flags;
3567 }
3568
3569 bool
3570 gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
3571 {
3572 gdb_assert (gdbarch != NULL);
3573 return gdbarch->address_class_type_flags_to_name != NULL;
3574 }
3575
3576 const char *
3577 gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, type_instance_flags type_flags)
3578 {
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);
3584 }
3585
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)
3589 {
3590 gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
3591 }
3592
3593 bool
3594 gdbarch_execute_dwarf_cfa_vendor_op (struct gdbarch *gdbarch, gdb_byte op, struct dwarf2_frame_state *fs)
3595 {
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);
3601 }
3602
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)
3606 {
3607 gdbarch->execute_dwarf_cfa_vendor_op = execute_dwarf_cfa_vendor_op;
3608 }
3609
3610 bool
3611 gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
3612 {
3613 gdb_assert (gdbarch != NULL);
3614 return gdbarch->address_class_name_to_type_flags != NULL;
3615 }
3616
3617 bool
3618 gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, type_instance_flags *type_flags_ptr)
3619 {
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);
3625 }
3626
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)
3630 {
3631 gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
3632 }
3633
3634 int
3635 gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, const struct reggroup *reggroup)
3636 {
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);
3642 }
3643
3644 void
3645 set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
3646 gdbarch_register_reggroup_p_ftype register_reggroup_p)
3647 {
3648 gdbarch->register_reggroup_p = register_reggroup_p;
3649 }
3650
3651 bool
3652 gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch)
3653 {
3654 gdb_assert (gdbarch != NULL);
3655 return gdbarch->fetch_pointer_argument != NULL;
3656 }
3657
3658 CORE_ADDR
3659 gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type)
3660 {
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);
3666 }
3667
3668 void
3669 set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch,
3670 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument)
3671 {
3672 gdbarch->fetch_pointer_argument = fetch_pointer_argument;
3673 }
3674
3675 bool
3676 gdbarch_iterate_over_regset_sections_p (struct gdbarch *gdbarch)
3677 {
3678 gdb_assert (gdbarch != NULL);
3679 return gdbarch->iterate_over_regset_sections != NULL;
3680 }
3681
3682 void
3683 gdbarch_iterate_over_regset_sections (struct gdbarch *gdbarch, iterate_over_regset_sections_cb *cb, void *cb_data, const struct regcache *regcache)
3684 {
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);
3690 }
3691
3692 void
3693 set_gdbarch_iterate_over_regset_sections (struct gdbarch *gdbarch,
3694 gdbarch_iterate_over_regset_sections_ftype iterate_over_regset_sections)
3695 {
3696 gdbarch->iterate_over_regset_sections = iterate_over_regset_sections;
3697 }
3698
3699 bool
3700 gdbarch_make_corefile_notes_p (struct gdbarch *gdbarch)
3701 {
3702 gdb_assert (gdbarch != NULL);
3703 return gdbarch->make_corefile_notes != NULL;
3704 }
3705
3706 gdb::unique_xmalloc_ptr<char>
3707 gdbarch_make_corefile_notes (struct gdbarch *gdbarch, bfd *obfd, int *note_size)
3708 {
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);
3714 }
3715
3716 void
3717 set_gdbarch_make_corefile_notes (struct gdbarch *gdbarch,
3718 gdbarch_make_corefile_notes_ftype make_corefile_notes)
3719 {
3720 gdbarch->make_corefile_notes = make_corefile_notes;
3721 }
3722
3723 bool
3724 gdbarch_find_memory_regions_p (struct gdbarch *gdbarch)
3725 {
3726 gdb_assert (gdbarch != NULL);
3727 return gdbarch->find_memory_regions != NULL;
3728 }
3729
3730 int
3731 gdbarch_find_memory_regions (struct gdbarch *gdbarch, find_memory_region_ftype func, void *data)
3732 {
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);
3738 }
3739
3740 void
3741 set_gdbarch_find_memory_regions (struct gdbarch *gdbarch,
3742 gdbarch_find_memory_regions_ftype find_memory_regions)
3743 {
3744 gdbarch->find_memory_regions = find_memory_regions;
3745 }
3746
3747 bool
3748 gdbarch_core_xfer_shared_libraries_p (struct gdbarch *gdbarch)
3749 {
3750 gdb_assert (gdbarch != NULL);
3751 return gdbarch->core_xfer_shared_libraries != NULL;
3752 }
3753
3754 ULONGEST
3755 gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len)
3756 {
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);
3762 }
3763
3764 void
3765 set_gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch,
3766 gdbarch_core_xfer_shared_libraries_ftype core_xfer_shared_libraries)
3767 {
3768 gdbarch->core_xfer_shared_libraries = core_xfer_shared_libraries;
3769 }
3770
3771 bool
3772 gdbarch_core_xfer_shared_libraries_aix_p (struct gdbarch *gdbarch)
3773 {
3774 gdb_assert (gdbarch != NULL);
3775 return gdbarch->core_xfer_shared_libraries_aix != NULL;
3776 }
3777
3778 ULONGEST
3779 gdbarch_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len)
3780 {
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);
3786 }
3787
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)
3791 {
3792 gdbarch->core_xfer_shared_libraries_aix = core_xfer_shared_libraries_aix;
3793 }
3794
3795 bool
3796 gdbarch_core_pid_to_str_p (struct gdbarch *gdbarch)
3797 {
3798 gdb_assert (gdbarch != NULL);
3799 return gdbarch->core_pid_to_str != NULL;
3800 }
3801
3802 std::string
3803 gdbarch_core_pid_to_str (struct gdbarch *gdbarch, ptid_t ptid)
3804 {
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);
3810 }
3811
3812 void
3813 set_gdbarch_core_pid_to_str (struct gdbarch *gdbarch,
3814 gdbarch_core_pid_to_str_ftype core_pid_to_str)
3815 {
3816 gdbarch->core_pid_to_str = core_pid_to_str;
3817 }
3818
3819 bool
3820 gdbarch_core_thread_name_p (struct gdbarch *gdbarch)
3821 {
3822 gdb_assert (gdbarch != NULL);
3823 return gdbarch->core_thread_name != NULL;
3824 }
3825
3826 const char *
3827 gdbarch_core_thread_name (struct gdbarch *gdbarch, struct thread_info *thr)
3828 {
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);
3834 }
3835
3836 void
3837 set_gdbarch_core_thread_name (struct gdbarch *gdbarch,
3838 gdbarch_core_thread_name_ftype core_thread_name)
3839 {
3840 gdbarch->core_thread_name = core_thread_name;
3841 }
3842
3843 bool
3844 gdbarch_core_xfer_siginfo_p (struct gdbarch *gdbarch)
3845 {
3846 gdb_assert (gdbarch != NULL);
3847 return gdbarch->core_xfer_siginfo != NULL;
3848 }
3849
3850 LONGEST
3851 gdbarch_core_xfer_siginfo (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len)
3852 {
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);
3858 }
3859
3860 void
3861 set_gdbarch_core_xfer_siginfo (struct gdbarch *gdbarch,
3862 gdbarch_core_xfer_siginfo_ftype core_xfer_siginfo)
3863 {
3864 gdbarch->core_xfer_siginfo = core_xfer_siginfo;
3865 }
3866
3867 bool
3868 gdbarch_gcore_bfd_target_p (struct gdbarch *gdbarch)
3869 {
3870 gdb_assert (gdbarch != NULL);
3871 return gdbarch->gcore_bfd_target != 0;
3872 }
3873
3874 const char *
3875 gdbarch_gcore_bfd_target (struct gdbarch *gdbarch)
3876 {
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;
3883 }
3884
3885 void
3886 set_gdbarch_gcore_bfd_target (struct gdbarch *gdbarch,
3887 const char * gcore_bfd_target)
3888 {
3889 gdbarch->gcore_bfd_target = gcore_bfd_target;
3890 }
3891
3892 int
3893 gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch)
3894 {
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;
3900 }
3901
3902 void
3903 set_gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch,
3904 int vtable_function_descriptors)
3905 {
3906 gdbarch->vtable_function_descriptors = vtable_function_descriptors;
3907 }
3908
3909 int
3910 gdbarch_vbit_in_delta (struct gdbarch *gdbarch)
3911 {
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;
3917 }
3918
3919 void
3920 set_gdbarch_vbit_in_delta (struct gdbarch *gdbarch,
3921 int vbit_in_delta)
3922 {
3923 gdbarch->vbit_in_delta = vbit_in_delta;
3924 }
3925
3926 void
3927 gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch, struct regcache *regcache)
3928 {
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);
3934 }
3935
3936 void
3937 set_gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch,
3938 gdbarch_skip_permanent_breakpoint_ftype skip_permanent_breakpoint)
3939 {
3940 gdbarch->skip_permanent_breakpoint = skip_permanent_breakpoint;
3941 }
3942
3943 bool
3944 gdbarch_max_insn_length_p (struct gdbarch *gdbarch)
3945 {
3946 gdb_assert (gdbarch != NULL);
3947 return gdbarch->max_insn_length != 0;
3948 }
3949
3950 ULONGEST
3951 gdbarch_max_insn_length (struct gdbarch *gdbarch)
3952 {
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;
3959 }
3960
3961 void
3962 set_gdbarch_max_insn_length (struct gdbarch *gdbarch,
3963 ULONGEST max_insn_length)
3964 {
3965 gdbarch->max_insn_length = max_insn_length;
3966 }
3967
3968 bool
3969 gdbarch_displaced_step_copy_insn_p (struct gdbarch *gdbarch)
3970 {
3971 gdb_assert (gdbarch != NULL);
3972 return gdbarch->displaced_step_copy_insn != NULL;
3973 }
3974
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)
3977 {
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);
3983 }
3984
3985 void
3986 set_gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch,
3987 gdbarch_displaced_step_copy_insn_ftype displaced_step_copy_insn)
3988 {
3989 gdbarch->displaced_step_copy_insn = displaced_step_copy_insn;
3990 }
3991
3992 bool
3993 gdbarch_displaced_step_hw_singlestep (struct gdbarch *gdbarch)
3994 {
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);
4000 }
4001
4002 void
4003 set_gdbarch_displaced_step_hw_singlestep (struct gdbarch *gdbarch,
4004 gdbarch_displaced_step_hw_singlestep_ftype displaced_step_hw_singlestep)
4005 {
4006 gdbarch->displaced_step_hw_singlestep = displaced_step_hw_singlestep;
4007 }
4008
4009 bool
4010 gdbarch_displaced_step_fixup_p (struct gdbarch *gdbarch)
4011 {
4012 gdb_assert (gdbarch != NULL);
4013 return gdbarch->displaced_step_fixup != NULL;
4014 }
4015
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)
4018 {
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);
4025 }
4026
4027 void
4028 set_gdbarch_displaced_step_fixup (struct gdbarch *gdbarch,
4029 gdbarch_displaced_step_fixup_ftype displaced_step_fixup)
4030 {
4031 gdbarch->displaced_step_fixup = displaced_step_fixup;
4032 }
4033
4034 bool
4035 gdbarch_displaced_step_prepare_p (struct gdbarch *gdbarch)
4036 {
4037 gdb_assert (gdbarch != NULL);
4038 return gdbarch->displaced_step_prepare != NULL;
4039 }
4040
4041 displaced_step_prepare_status
4042 gdbarch_displaced_step_prepare (struct gdbarch *gdbarch, thread_info *thread, CORE_ADDR &displaced_pc)
4043 {
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);
4049 }
4050
4051 void
4052 set_gdbarch_displaced_step_prepare (struct gdbarch *gdbarch,
4053 gdbarch_displaced_step_prepare_ftype displaced_step_prepare)
4054 {
4055 gdbarch->displaced_step_prepare = displaced_step_prepare;
4056 }
4057
4058 displaced_step_finish_status
4059 gdbarch_displaced_step_finish (struct gdbarch *gdbarch, thread_info *thread, gdb_signal sig)
4060 {
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);
4066 }
4067
4068 void
4069 set_gdbarch_displaced_step_finish (struct gdbarch *gdbarch,
4070 gdbarch_displaced_step_finish_ftype displaced_step_finish)
4071 {
4072 gdbarch->displaced_step_finish = displaced_step_finish;
4073 }
4074
4075 bool
4076 gdbarch_displaced_step_copy_insn_closure_by_addr_p (struct gdbarch *gdbarch)
4077 {
4078 gdb_assert (gdbarch != NULL);
4079 return gdbarch->displaced_step_copy_insn_closure_by_addr != NULL;
4080 }
4081
4082 const displaced_step_copy_insn_closure *
4083 gdbarch_displaced_step_copy_insn_closure_by_addr (struct gdbarch *gdbarch, inferior *inf, CORE_ADDR addr)
4084 {
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);
4090 }
4091
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)
4095 {
4096 gdbarch->displaced_step_copy_insn_closure_by_addr = displaced_step_copy_insn_closure_by_addr;
4097 }
4098
4099 void
4100 gdbarch_displaced_step_restore_all_in_ptid (struct gdbarch *gdbarch, inferior *parent_inf, ptid_t child_ptid)
4101 {
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);
4107 }
4108
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)
4112 {
4113 gdbarch->displaced_step_restore_all_in_ptid = displaced_step_restore_all_in_ptid;
4114 }
4115
4116 bool
4117 gdbarch_relocate_instruction_p (struct gdbarch *gdbarch)
4118 {
4119 gdb_assert (gdbarch != NULL);
4120 return gdbarch->relocate_instruction != NULL;
4121 }
4122
4123 void
4124 gdbarch_relocate_instruction (struct gdbarch *gdbarch, CORE_ADDR *to, CORE_ADDR from)
4125 {
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);
4132 }
4133
4134 void
4135 set_gdbarch_relocate_instruction (struct gdbarch *gdbarch,
4136 gdbarch_relocate_instruction_ftype relocate_instruction)
4137 {
4138 gdbarch->relocate_instruction = relocate_instruction;
4139 }
4140
4141 bool
4142 gdbarch_overlay_update_p (struct gdbarch *gdbarch)
4143 {
4144 gdb_assert (gdbarch != NULL);
4145 return gdbarch->overlay_update != NULL;
4146 }
4147
4148 void
4149 gdbarch_overlay_update (struct gdbarch *gdbarch, struct obj_section *osect)
4150 {
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);
4156 }
4157
4158 void
4159 set_gdbarch_overlay_update (struct gdbarch *gdbarch,
4160 gdbarch_overlay_update_ftype overlay_update)
4161 {
4162 gdbarch->overlay_update = overlay_update;
4163 }
4164
4165 bool
4166 gdbarch_core_read_description_p (struct gdbarch *gdbarch)
4167 {
4168 gdb_assert (gdbarch != NULL);
4169 return gdbarch->core_read_description != NULL;
4170 }
4171
4172 const struct target_desc *
4173 gdbarch_core_read_description (struct gdbarch *gdbarch, struct target_ops *target, bfd *abfd)
4174 {
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);
4180 }
4181
4182 void
4183 set_gdbarch_core_read_description (struct gdbarch *gdbarch,
4184 gdbarch_core_read_description_ftype core_read_description)
4185 {
4186 gdbarch->core_read_description = core_read_description;
4187 }
4188
4189 int
4190 gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch)
4191 {
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;
4197 }
4198
4199 void
4200 set_gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch,
4201 int sofun_address_maybe_missing)
4202 {
4203 gdbarch->sofun_address_maybe_missing = sofun_address_maybe_missing;
4204 }
4205
4206 bool
4207 gdbarch_process_record_p (struct gdbarch *gdbarch)
4208 {
4209 gdb_assert (gdbarch != NULL);
4210 return gdbarch->process_record != NULL;
4211 }
4212
4213 int
4214 gdbarch_process_record (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR addr)
4215 {
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);
4221 }
4222
4223 void
4224 set_gdbarch_process_record (struct gdbarch *gdbarch,
4225 gdbarch_process_record_ftype process_record)
4226 {
4227 gdbarch->process_record = process_record;
4228 }
4229
4230 bool
4231 gdbarch_process_record_signal_p (struct gdbarch *gdbarch)
4232 {
4233 gdb_assert (gdbarch != NULL);
4234 return gdbarch->process_record_signal != NULL;
4235 }
4236
4237 int
4238 gdbarch_process_record_signal (struct gdbarch *gdbarch, struct regcache *regcache, enum gdb_signal signal)
4239 {
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);
4245 }
4246
4247 void
4248 set_gdbarch_process_record_signal (struct gdbarch *gdbarch,
4249 gdbarch_process_record_signal_ftype process_record_signal)
4250 {
4251 gdbarch->process_record_signal = process_record_signal;
4252 }
4253
4254 bool
4255 gdbarch_gdb_signal_from_target_p (struct gdbarch *gdbarch)
4256 {
4257 gdb_assert (gdbarch != NULL);
4258 return gdbarch->gdb_signal_from_target != NULL;
4259 }
4260
4261 enum gdb_signal
4262 gdbarch_gdb_signal_from_target (struct gdbarch *gdbarch, int signo)
4263 {
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);
4269 }
4270
4271 void
4272 set_gdbarch_gdb_signal_from_target (struct gdbarch *gdbarch,
4273 gdbarch_gdb_signal_from_target_ftype gdb_signal_from_target)
4274 {
4275 gdbarch->gdb_signal_from_target = gdb_signal_from_target;
4276 }
4277
4278 bool
4279 gdbarch_gdb_signal_to_target_p (struct gdbarch *gdbarch)
4280 {
4281 gdb_assert (gdbarch != NULL);
4282 return gdbarch->gdb_signal_to_target != NULL;
4283 }
4284
4285 int
4286 gdbarch_gdb_signal_to_target (struct gdbarch *gdbarch, enum gdb_signal signal)
4287 {
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);
4293 }
4294
4295 void
4296 set_gdbarch_gdb_signal_to_target (struct gdbarch *gdbarch,
4297 gdbarch_gdb_signal_to_target_ftype gdb_signal_to_target)
4298 {
4299 gdbarch->gdb_signal_to_target = gdb_signal_to_target;
4300 }
4301
4302 bool
4303 gdbarch_get_siginfo_type_p (struct gdbarch *gdbarch)
4304 {
4305 gdb_assert (gdbarch != NULL);
4306 return gdbarch->get_siginfo_type != NULL;
4307 }
4308
4309 struct type *
4310 gdbarch_get_siginfo_type (struct gdbarch *gdbarch)
4311 {
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);
4317 }
4318
4319 void
4320 set_gdbarch_get_siginfo_type (struct gdbarch *gdbarch,
4321 gdbarch_get_siginfo_type_ftype get_siginfo_type)
4322 {
4323 gdbarch->get_siginfo_type = get_siginfo_type;
4324 }
4325
4326 bool
4327 gdbarch_record_special_symbol_p (struct gdbarch *gdbarch)
4328 {
4329 gdb_assert (gdbarch != NULL);
4330 return gdbarch->record_special_symbol != NULL;
4331 }
4332
4333 void
4334 gdbarch_record_special_symbol (struct gdbarch *gdbarch, struct objfile *objfile, asymbol *sym)
4335 {
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);
4341 }
4342
4343 void
4344 set_gdbarch_record_special_symbol (struct gdbarch *gdbarch,
4345 gdbarch_record_special_symbol_ftype record_special_symbol)
4346 {
4347 gdbarch->record_special_symbol = record_special_symbol;
4348 }
4349
4350 bool
4351 gdbarch_get_syscall_number_p (struct gdbarch *gdbarch)
4352 {
4353 gdb_assert (gdbarch != NULL);
4354 return gdbarch->get_syscall_number != NULL;
4355 }
4356
4357 LONGEST
4358 gdbarch_get_syscall_number (struct gdbarch *gdbarch, thread_info *thread)
4359 {
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);
4365 }
4366
4367 void
4368 set_gdbarch_get_syscall_number (struct gdbarch *gdbarch,
4369 gdbarch_get_syscall_number_ftype get_syscall_number)
4370 {
4371 gdbarch->get_syscall_number = get_syscall_number;
4372 }
4373
4374 const char *
4375 gdbarch_xml_syscall_file (struct gdbarch *gdbarch)
4376 {
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;
4382 }
4383
4384 void
4385 set_gdbarch_xml_syscall_file (struct gdbarch *gdbarch,
4386 const char * xml_syscall_file)
4387 {
4388 gdbarch->xml_syscall_file = xml_syscall_file;
4389 }
4390
4391 struct syscalls_info *
4392 gdbarch_syscalls_info (struct gdbarch *gdbarch)
4393 {
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;
4399 }
4400
4401 void
4402 set_gdbarch_syscalls_info (struct gdbarch *gdbarch,
4403 struct syscalls_info * syscalls_info)
4404 {
4405 gdbarch->syscalls_info = syscalls_info;
4406 }
4407
4408 const char *const *
4409 gdbarch_stap_integer_prefixes (struct gdbarch *gdbarch)
4410 {
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;
4416 }
4417
4418 void
4419 set_gdbarch_stap_integer_prefixes (struct gdbarch *gdbarch,
4420 const char *const * stap_integer_prefixes)
4421 {
4422 gdbarch->stap_integer_prefixes = stap_integer_prefixes;
4423 }
4424
4425 const char *const *
4426 gdbarch_stap_integer_suffixes (struct gdbarch *gdbarch)
4427 {
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;
4433 }
4434
4435 void
4436 set_gdbarch_stap_integer_suffixes (struct gdbarch *gdbarch,
4437 const char *const * stap_integer_suffixes)
4438 {
4439 gdbarch->stap_integer_suffixes = stap_integer_suffixes;
4440 }
4441
4442 const char *const *
4443 gdbarch_stap_register_prefixes (struct gdbarch *gdbarch)
4444 {
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;
4450 }
4451
4452 void
4453 set_gdbarch_stap_register_prefixes (struct gdbarch *gdbarch,
4454 const char *const * stap_register_prefixes)
4455 {
4456 gdbarch->stap_register_prefixes = stap_register_prefixes;
4457 }
4458
4459 const char *const *
4460 gdbarch_stap_register_suffixes (struct gdbarch *gdbarch)
4461 {
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;
4467 }
4468
4469 void
4470 set_gdbarch_stap_register_suffixes (struct gdbarch *gdbarch,
4471 const char *const * stap_register_suffixes)
4472 {
4473 gdbarch->stap_register_suffixes = stap_register_suffixes;
4474 }
4475
4476 const char *const *
4477 gdbarch_stap_register_indirection_prefixes (struct gdbarch *gdbarch)
4478 {
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;
4484 }
4485
4486 void
4487 set_gdbarch_stap_register_indirection_prefixes (struct gdbarch *gdbarch,
4488 const char *const * stap_register_indirection_prefixes)
4489 {
4490 gdbarch->stap_register_indirection_prefixes = stap_register_indirection_prefixes;
4491 }
4492
4493 const char *const *
4494 gdbarch_stap_register_indirection_suffixes (struct gdbarch *gdbarch)
4495 {
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;
4501 }
4502
4503 void
4504 set_gdbarch_stap_register_indirection_suffixes (struct gdbarch *gdbarch,
4505 const char *const * stap_register_indirection_suffixes)
4506 {
4507 gdbarch->stap_register_indirection_suffixes = stap_register_indirection_suffixes;
4508 }
4509
4510 const char *
4511 gdbarch_stap_gdb_register_prefix (struct gdbarch *gdbarch)
4512 {
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;
4518 }
4519
4520 void
4521 set_gdbarch_stap_gdb_register_prefix (struct gdbarch *gdbarch,
4522 const char * stap_gdb_register_prefix)
4523 {
4524 gdbarch->stap_gdb_register_prefix = stap_gdb_register_prefix;
4525 }
4526
4527 const char *
4528 gdbarch_stap_gdb_register_suffix (struct gdbarch *gdbarch)
4529 {
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;
4535 }
4536
4537 void
4538 set_gdbarch_stap_gdb_register_suffix (struct gdbarch *gdbarch,
4539 const char * stap_gdb_register_suffix)
4540 {
4541 gdbarch->stap_gdb_register_suffix = stap_gdb_register_suffix;
4542 }
4543
4544 bool
4545 gdbarch_stap_is_single_operand_p (struct gdbarch *gdbarch)
4546 {
4547 gdb_assert (gdbarch != NULL);
4548 return gdbarch->stap_is_single_operand != NULL;
4549 }
4550
4551 int
4552 gdbarch_stap_is_single_operand (struct gdbarch *gdbarch, const char *s)
4553 {
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);
4559 }
4560
4561 void
4562 set_gdbarch_stap_is_single_operand (struct gdbarch *gdbarch,
4563 gdbarch_stap_is_single_operand_ftype stap_is_single_operand)
4564 {
4565 gdbarch->stap_is_single_operand = stap_is_single_operand;
4566 }
4567
4568 bool
4569 gdbarch_stap_parse_special_token_p (struct gdbarch *gdbarch)
4570 {
4571 gdb_assert (gdbarch != NULL);
4572 return gdbarch->stap_parse_special_token != NULL;
4573 }
4574
4575 expr::operation_up
4576 gdbarch_stap_parse_special_token (struct gdbarch *gdbarch, struct stap_parse_info *p)
4577 {
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);
4583 }
4584
4585 void
4586 set_gdbarch_stap_parse_special_token (struct gdbarch *gdbarch,
4587 gdbarch_stap_parse_special_token_ftype stap_parse_special_token)
4588 {
4589 gdbarch->stap_parse_special_token = stap_parse_special_token;
4590 }
4591
4592 bool
4593 gdbarch_stap_adjust_register_p (struct gdbarch *gdbarch)
4594 {
4595 gdb_assert (gdbarch != NULL);
4596 return gdbarch->stap_adjust_register != NULL;
4597 }
4598
4599 std::string
4600 gdbarch_stap_adjust_register (struct gdbarch *gdbarch, struct stap_parse_info *p, const std::string &regname, int regnum)
4601 {
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);
4607 }
4608
4609 void
4610 set_gdbarch_stap_adjust_register (struct gdbarch *gdbarch,
4611 gdbarch_stap_adjust_register_ftype stap_adjust_register)
4612 {
4613 gdbarch->stap_adjust_register = stap_adjust_register;
4614 }
4615
4616 bool
4617 gdbarch_dtrace_parse_probe_argument_p (struct gdbarch *gdbarch)
4618 {
4619 gdb_assert (gdbarch != NULL);
4620 return gdbarch->dtrace_parse_probe_argument != NULL;
4621 }
4622
4623 expr::operation_up
4624 gdbarch_dtrace_parse_probe_argument (struct gdbarch *gdbarch, int narg)
4625 {
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);
4631 }
4632
4633 void
4634 set_gdbarch_dtrace_parse_probe_argument (struct gdbarch *gdbarch,
4635 gdbarch_dtrace_parse_probe_argument_ftype dtrace_parse_probe_argument)
4636 {
4637 gdbarch->dtrace_parse_probe_argument = dtrace_parse_probe_argument;
4638 }
4639
4640 bool
4641 gdbarch_dtrace_probe_is_enabled_p (struct gdbarch *gdbarch)
4642 {
4643 gdb_assert (gdbarch != NULL);
4644 return gdbarch->dtrace_probe_is_enabled != NULL;
4645 }
4646
4647 int
4648 gdbarch_dtrace_probe_is_enabled (struct gdbarch *gdbarch, CORE_ADDR addr)
4649 {
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);
4655 }
4656
4657 void
4658 set_gdbarch_dtrace_probe_is_enabled (struct gdbarch *gdbarch,
4659 gdbarch_dtrace_probe_is_enabled_ftype dtrace_probe_is_enabled)
4660 {
4661 gdbarch->dtrace_probe_is_enabled = dtrace_probe_is_enabled;
4662 }
4663
4664 bool
4665 gdbarch_dtrace_enable_probe_p (struct gdbarch *gdbarch)
4666 {
4667 gdb_assert (gdbarch != NULL);
4668 return gdbarch->dtrace_enable_probe != NULL;
4669 }
4670
4671 void
4672 gdbarch_dtrace_enable_probe (struct gdbarch *gdbarch, CORE_ADDR addr)
4673 {
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);
4679 }
4680
4681 void
4682 set_gdbarch_dtrace_enable_probe (struct gdbarch *gdbarch,
4683 gdbarch_dtrace_enable_probe_ftype dtrace_enable_probe)
4684 {
4685 gdbarch->dtrace_enable_probe = dtrace_enable_probe;
4686 }
4687
4688 bool
4689 gdbarch_dtrace_disable_probe_p (struct gdbarch *gdbarch)
4690 {
4691 gdb_assert (gdbarch != NULL);
4692 return gdbarch->dtrace_disable_probe != NULL;
4693 }
4694
4695 void
4696 gdbarch_dtrace_disable_probe (struct gdbarch *gdbarch, CORE_ADDR addr)
4697 {
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);
4703 }
4704
4705 void
4706 set_gdbarch_dtrace_disable_probe (struct gdbarch *gdbarch,
4707 gdbarch_dtrace_disable_probe_ftype dtrace_disable_probe)
4708 {
4709 gdbarch->dtrace_disable_probe = dtrace_disable_probe;
4710 }
4711
4712 int
4713 gdbarch_has_global_solist (struct gdbarch *gdbarch)
4714 {
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;
4720 }
4721
4722 void
4723 set_gdbarch_has_global_solist (struct gdbarch *gdbarch,
4724 int has_global_solist)
4725 {
4726 gdbarch->has_global_solist = has_global_solist;
4727 }
4728
4729 int
4730 gdbarch_has_global_breakpoints (struct gdbarch *gdbarch)
4731 {
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;
4737 }
4738
4739 void
4740 set_gdbarch_has_global_breakpoints (struct gdbarch *gdbarch,
4741 int has_global_breakpoints)
4742 {
4743 gdbarch->has_global_breakpoints = has_global_breakpoints;
4744 }
4745
4746 int
4747 gdbarch_has_shared_address_space (struct gdbarch *gdbarch)
4748 {
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);
4754 }
4755
4756 void
4757 set_gdbarch_has_shared_address_space (struct gdbarch *gdbarch,
4758 gdbarch_has_shared_address_space_ftype has_shared_address_space)
4759 {
4760 gdbarch->has_shared_address_space = has_shared_address_space;
4761 }
4762
4763 int
4764 gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch, CORE_ADDR addr, std::string *msg)
4765 {
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);
4771 }
4772
4773 void
4774 set_gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch,
4775 gdbarch_fast_tracepoint_valid_at_ftype fast_tracepoint_valid_at)
4776 {
4777 gdbarch->fast_tracepoint_valid_at = fast_tracepoint_valid_at;
4778 }
4779
4780 void
4781 gdbarch_guess_tracepoint_registers (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR addr)
4782 {
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);
4788 }
4789
4790 void
4791 set_gdbarch_guess_tracepoint_registers (struct gdbarch *gdbarch,
4792 gdbarch_guess_tracepoint_registers_ftype guess_tracepoint_registers)
4793 {
4794 gdbarch->guess_tracepoint_registers = guess_tracepoint_registers;
4795 }
4796
4797 const char *
4798 gdbarch_auto_charset (struct gdbarch *gdbarch)
4799 {
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 ();
4805 }
4806
4807 void
4808 set_gdbarch_auto_charset (struct gdbarch *gdbarch,
4809 gdbarch_auto_charset_ftype auto_charset)
4810 {
4811 gdbarch->auto_charset = auto_charset;
4812 }
4813
4814 const char *
4815 gdbarch_auto_wide_charset (struct gdbarch *gdbarch)
4816 {
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 ();
4822 }
4823
4824 void
4825 set_gdbarch_auto_wide_charset (struct gdbarch *gdbarch,
4826 gdbarch_auto_wide_charset_ftype auto_wide_charset)
4827 {
4828 gdbarch->auto_wide_charset = auto_wide_charset;
4829 }
4830
4831 const char *
4832 gdbarch_solib_symbols_extension (struct gdbarch *gdbarch)
4833 {
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;
4839 }
4840
4841 void
4842 set_gdbarch_solib_symbols_extension (struct gdbarch *gdbarch,
4843 const char * solib_symbols_extension)
4844 {
4845 gdbarch->solib_symbols_extension = solib_symbols_extension;
4846 }
4847
4848 int
4849 gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch)
4850 {
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;
4856 }
4857
4858 void
4859 set_gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch,
4860 int has_dos_based_file_system)
4861 {
4862 gdbarch->has_dos_based_file_system = has_dos_based_file_system;
4863 }
4864
4865 void
4866 gdbarch_gen_return_address (struct gdbarch *gdbarch, struct agent_expr *ax, struct axs_value *value, CORE_ADDR scope)
4867 {
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);
4873 }
4874
4875 void
4876 set_gdbarch_gen_return_address (struct gdbarch *gdbarch,
4877 gdbarch_gen_return_address_ftype gen_return_address)
4878 {
4879 gdbarch->gen_return_address = gen_return_address;
4880 }
4881
4882 bool
4883 gdbarch_info_proc_p (struct gdbarch *gdbarch)
4884 {
4885 gdb_assert (gdbarch != NULL);
4886 return gdbarch->info_proc != NULL;
4887 }
4888
4889 void
4890 gdbarch_info_proc (struct gdbarch *gdbarch, const char *args, enum info_proc_what what)
4891 {
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);
4897 }
4898
4899 void
4900 set_gdbarch_info_proc (struct gdbarch *gdbarch,
4901 gdbarch_info_proc_ftype info_proc)
4902 {
4903 gdbarch->info_proc = info_proc;
4904 }
4905
4906 bool
4907 gdbarch_core_info_proc_p (struct gdbarch *gdbarch)
4908 {
4909 gdb_assert (gdbarch != NULL);
4910 return gdbarch->core_info_proc != NULL;
4911 }
4912
4913 void
4914 gdbarch_core_info_proc (struct gdbarch *gdbarch, const char *args, enum info_proc_what what)
4915 {
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);
4921 }
4922
4923 void
4924 set_gdbarch_core_info_proc (struct gdbarch *gdbarch,
4925 gdbarch_core_info_proc_ftype core_info_proc)
4926 {
4927 gdbarch->core_info_proc = core_info_proc;
4928 }
4929
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)
4932 {
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);
4938 }
4939
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)
4943 {
4944 gdbarch->iterate_over_objfiles_in_search_order = iterate_over_objfiles_in_search_order;
4945 }
4946
4947 struct ravenscar_arch_ops *
4948 gdbarch_ravenscar_ops (struct gdbarch *gdbarch)
4949 {
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;
4955 }
4956
4957 void
4958 set_gdbarch_ravenscar_ops (struct gdbarch *gdbarch,
4959 struct ravenscar_arch_ops * ravenscar_ops)
4960 {
4961 gdbarch->ravenscar_ops = ravenscar_ops;
4962 }
4963
4964 int
4965 gdbarch_insn_is_call (struct gdbarch *gdbarch, CORE_ADDR addr)
4966 {
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);
4972 }
4973
4974 void
4975 set_gdbarch_insn_is_call (struct gdbarch *gdbarch,
4976 gdbarch_insn_is_call_ftype insn_is_call)
4977 {
4978 gdbarch->insn_is_call = insn_is_call;
4979 }
4980
4981 int
4982 gdbarch_insn_is_ret (struct gdbarch *gdbarch, CORE_ADDR addr)
4983 {
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);
4989 }
4990
4991 void
4992 set_gdbarch_insn_is_ret (struct gdbarch *gdbarch,
4993 gdbarch_insn_is_ret_ftype insn_is_ret)
4994 {
4995 gdbarch->insn_is_ret = insn_is_ret;
4996 }
4997
4998 int
4999 gdbarch_insn_is_jump (struct gdbarch *gdbarch, CORE_ADDR addr)
5000 {
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);
5006 }
5007
5008 void
5009 set_gdbarch_insn_is_jump (struct gdbarch *gdbarch,
5010 gdbarch_insn_is_jump_ftype insn_is_jump)
5011 {
5012 gdbarch->insn_is_jump = insn_is_jump;
5013 }
5014
5015 bool
5016 gdbarch_program_breakpoint_here_p (struct gdbarch *gdbarch, CORE_ADDR address)
5017 {
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);
5023 }
5024
5025 void
5026 set_gdbarch_program_breakpoint_here_p (struct gdbarch *gdbarch,
5027 gdbarch_program_breakpoint_here_p_ftype program_breakpoint_here_p)
5028 {
5029 gdbarch->program_breakpoint_here_p = program_breakpoint_here_p;
5030 }
5031
5032 bool
5033 gdbarch_auxv_parse_p (struct gdbarch *gdbarch)
5034 {
5035 gdb_assert (gdbarch != NULL);
5036 return gdbarch->auxv_parse != NULL;
5037 }
5038
5039 int
5040 gdbarch_auxv_parse (struct gdbarch *gdbarch, gdb_byte **readptr, gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp)
5041 {
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);
5047 }
5048
5049 void
5050 set_gdbarch_auxv_parse (struct gdbarch *gdbarch,
5051 gdbarch_auxv_parse_ftype auxv_parse)
5052 {
5053 gdbarch->auxv_parse = auxv_parse;
5054 }
5055
5056 void
5057 gdbarch_print_auxv_entry (struct gdbarch *gdbarch, struct ui_file *file, CORE_ADDR type, CORE_ADDR val)
5058 {
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);
5064 }
5065
5066 void
5067 set_gdbarch_print_auxv_entry (struct gdbarch *gdbarch,
5068 gdbarch_print_auxv_entry_ftype print_auxv_entry)
5069 {
5070 gdbarch->print_auxv_entry = print_auxv_entry;
5071 }
5072
5073 int
5074 gdbarch_vsyscall_range (struct gdbarch *gdbarch, struct mem_range *range)
5075 {
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);
5081 }
5082
5083 void
5084 set_gdbarch_vsyscall_range (struct gdbarch *gdbarch,
5085 gdbarch_vsyscall_range_ftype vsyscall_range)
5086 {
5087 gdbarch->vsyscall_range = vsyscall_range;
5088 }
5089
5090 CORE_ADDR
5091 gdbarch_infcall_mmap (struct gdbarch *gdbarch, CORE_ADDR size, unsigned prot)
5092 {
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);
5098 }
5099
5100 void
5101 set_gdbarch_infcall_mmap (struct gdbarch *gdbarch,
5102 gdbarch_infcall_mmap_ftype infcall_mmap)
5103 {
5104 gdbarch->infcall_mmap = infcall_mmap;
5105 }
5106
5107 void
5108 gdbarch_infcall_munmap (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR size)
5109 {
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);
5115 }
5116
5117 void
5118 set_gdbarch_infcall_munmap (struct gdbarch *gdbarch,
5119 gdbarch_infcall_munmap_ftype infcall_munmap)
5120 {
5121 gdbarch->infcall_munmap = infcall_munmap;
5122 }
5123
5124 std::string
5125 gdbarch_gcc_target_options (struct gdbarch *gdbarch)
5126 {
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);
5132 }
5133
5134 void
5135 set_gdbarch_gcc_target_options (struct gdbarch *gdbarch,
5136 gdbarch_gcc_target_options_ftype gcc_target_options)
5137 {
5138 gdbarch->gcc_target_options = gcc_target_options;
5139 }
5140
5141 const char *
5142 gdbarch_gnu_triplet_regexp (struct gdbarch *gdbarch)
5143 {
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);
5149 }
5150
5151 void
5152 set_gdbarch_gnu_triplet_regexp (struct gdbarch *gdbarch,
5153 gdbarch_gnu_triplet_regexp_ftype gnu_triplet_regexp)
5154 {
5155 gdbarch->gnu_triplet_regexp = gnu_triplet_regexp;
5156 }
5157
5158 int
5159 gdbarch_addressable_memory_unit_size (struct gdbarch *gdbarch)
5160 {
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);
5166 }
5167
5168 void
5169 set_gdbarch_addressable_memory_unit_size (struct gdbarch *gdbarch,
5170 gdbarch_addressable_memory_unit_size_ftype addressable_memory_unit_size)
5171 {
5172 gdbarch->addressable_memory_unit_size = addressable_memory_unit_size;
5173 }
5174
5175 const char *
5176 gdbarch_disassembler_options_implicit (struct gdbarch *gdbarch)
5177 {
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;
5183 }
5184
5185 void
5186 set_gdbarch_disassembler_options_implicit (struct gdbarch *gdbarch,
5187 const char * disassembler_options_implicit)
5188 {
5189 gdbarch->disassembler_options_implicit = disassembler_options_implicit;
5190 }
5191
5192 char **
5193 gdbarch_disassembler_options (struct gdbarch *gdbarch)
5194 {
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;
5200 }
5201
5202 void
5203 set_gdbarch_disassembler_options (struct gdbarch *gdbarch,
5204 char ** disassembler_options)
5205 {
5206 gdbarch->disassembler_options = disassembler_options;
5207 }
5208
5209 const disasm_options_and_args_t *
5210 gdbarch_valid_disassembler_options (struct gdbarch *gdbarch)
5211 {
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;
5217 }
5218
5219 void
5220 set_gdbarch_valid_disassembler_options (struct gdbarch *gdbarch,
5221 const disasm_options_and_args_t * valid_disassembler_options)
5222 {
5223 gdbarch->valid_disassembler_options = valid_disassembler_options;
5224 }
5225
5226 ULONGEST
5227 gdbarch_type_align (struct gdbarch *gdbarch, struct type *type)
5228 {
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);
5234 }
5235
5236 void
5237 set_gdbarch_type_align (struct gdbarch *gdbarch,
5238 gdbarch_type_align_ftype type_align)
5239 {
5240 gdbarch->type_align = type_align;
5241 }
5242
5243 std::string
5244 gdbarch_get_pc_address_flags (struct gdbarch *gdbarch, frame_info *frame, CORE_ADDR pc)
5245 {
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);
5251 }
5252
5253 void
5254 set_gdbarch_get_pc_address_flags (struct gdbarch *gdbarch,
5255 gdbarch_get_pc_address_flags_ftype get_pc_address_flags)
5256 {
5257 gdbarch->get_pc_address_flags = get_pc_address_flags;
5258 }
5259
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)
5262 {
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);
5268 }
5269
5270 void
5271 set_gdbarch_read_core_file_mappings (struct gdbarch *gdbarch,
5272 gdbarch_read_core_file_mappings_ftype read_core_file_mappings)
5273 {
5274 gdbarch->read_core_file_mappings = read_core_file_mappings;
5275 }