1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED -*- buffer-read-only: t -*- */
4 /* Dynamic architecture support for GDB, the GNU debugger.
6 Copyright (C) 1998-2016 Free Software Foundation, Inc.
8 This file is part of GDB.
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 3 of the License, or
13 (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program. If not, see <http://www.gnu.org/licenses/>. */
23 /* This file was created with the aid of ``gdbarch.sh''.
25 The Bourne shell script ``gdbarch.sh'' creates the files
26 ``new-gdbarch.c'' and ``new-gdbarch.h and then compares them
27 against the existing ``gdbarch.[hc]''. Any differences found
30 If editing this file, please also run gdbarch.sh and merge any
31 changes into that script. Conversely, when making sweeping changes
32 to this file, modifying gdbarch.sh and using its output may prove
37 #include "arch-utils.h"
43 #include "floatformat.h"
44 #include "reggroups.h"
46 #include "gdb_obstack.h"
51 /* Static function declarations */
53 static void alloc_gdbarch_data (struct gdbarch *);
55 /* Non-zero if we want to trace architecture code. */
58 #define GDBARCH_DEBUG 0
60 unsigned int gdbarch_debug = GDBARCH_DEBUG;
62 show_gdbarch_debug (struct ui_file *file, int from_tty,
63 struct cmd_list_element *c, const char *value)
65 fprintf_filtered (file, _("Architecture debugging is %s.\n"), value);
69 pformat (const struct floatformat **format)
74 /* Just print out one of them - this is only for diagnostics. */
75 return format[0]->name;
79 pstring (const char *string)
86 /* Helper function to print a list of strings, represented as "const
87 char *const *". The list is printed comma-separated. */
90 pstring_list (const char *const *list)
100 for (p = list; *p != NULL && offset < sizeof (ret); ++p)
102 size_t s = xsnprintf (ret + offset, sizeof (ret) - offset, "%s, ", *p);
108 gdb_assert (offset - 2 < sizeof (ret));
109 ret[offset - 2] = '\0';
116 /* Maintain the struct gdbarch object. */
120 /* Has this architecture been fully initialized? */
123 /* An obstack bound to the lifetime of the architecture. */
124 struct obstack *obstack;
126 /* basic architectural information. */
127 const struct bfd_arch_info * bfd_arch_info;
128 enum bfd_endian byte_order;
129 enum bfd_endian byte_order_for_code;
130 enum gdb_osabi osabi;
131 const struct target_desc * target_desc;
133 /* target specific vector. */
134 struct gdbarch_tdep *tdep;
135 gdbarch_dump_tdep_ftype *dump_tdep;
137 /* per-architecture data-pointers. */
141 /* Multi-arch values.
143 When extending this structure you must:
147 Declare set/get functions and define the corresponding
150 gdbarch_alloc(): If zero/NULL is not a suitable default,
151 initialize the new field.
153 verify_gdbarch(): Confirm that the target updated the field
156 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
159 get_gdbarch(): Implement the set/get functions (probably using
160 the macro's as shortcuts).
169 int long_long_align_bit;
171 const struct floatformat ** half_format;
173 const struct floatformat ** float_format;
175 const struct floatformat ** double_format;
177 const struct floatformat ** long_double_format;
180 int dwarf2_addr_size;
182 gdbarch_read_pc_ftype *read_pc;
183 gdbarch_write_pc_ftype *write_pc;
184 gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer;
185 gdbarch_pseudo_register_read_ftype *pseudo_register_read;
186 gdbarch_pseudo_register_read_value_ftype *pseudo_register_read_value;
187 gdbarch_pseudo_register_write_ftype *pseudo_register_write;
190 gdbarch_ax_pseudo_register_collect_ftype *ax_pseudo_register_collect;
191 gdbarch_ax_pseudo_register_push_stack_ftype *ax_pseudo_register_push_stack;
192 gdbarch_handle_segmentation_fault_ftype *handle_segmentation_fault;
197 gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum;
198 gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum;
199 gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum;
200 gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum;
201 gdbarch_register_name_ftype *register_name;
202 gdbarch_register_type_ftype *register_type;
203 gdbarch_dummy_id_ftype *dummy_id;
204 int deprecated_fp_regnum;
205 gdbarch_push_dummy_call_ftype *push_dummy_call;
206 int call_dummy_location;
207 gdbarch_push_dummy_code_ftype *push_dummy_code;
208 gdbarch_print_registers_info_ftype *print_registers_info;
209 gdbarch_print_float_info_ftype *print_float_info;
210 gdbarch_print_vector_info_ftype *print_vector_info;
211 gdbarch_register_sim_regno_ftype *register_sim_regno;
212 gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
213 gdbarch_cannot_store_register_ftype *cannot_store_register;
214 gdbarch_get_longjmp_target_ftype *get_longjmp_target;
215 int believe_pcc_promotion;
216 gdbarch_convert_register_p_ftype *convert_register_p;
217 gdbarch_register_to_value_ftype *register_to_value;
218 gdbarch_value_to_register_ftype *value_to_register;
219 gdbarch_value_from_register_ftype *value_from_register;
220 gdbarch_pointer_to_address_ftype *pointer_to_address;
221 gdbarch_address_to_pointer_ftype *address_to_pointer;
222 gdbarch_integer_to_address_ftype *integer_to_address;
223 gdbarch_return_value_ftype *return_value;
224 gdbarch_return_in_first_hidden_param_p_ftype *return_in_first_hidden_param_p;
225 gdbarch_skip_prologue_ftype *skip_prologue;
226 gdbarch_skip_main_prologue_ftype *skip_main_prologue;
227 gdbarch_skip_entrypoint_ftype *skip_entrypoint;
228 gdbarch_inner_than_ftype *inner_than;
229 gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
230 gdbarch_remote_breakpoint_from_pc_ftype *remote_breakpoint_from_pc;
231 gdbarch_adjust_breakpoint_address_ftype *adjust_breakpoint_address;
232 gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
233 gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
234 CORE_ADDR decr_pc_after_break;
235 CORE_ADDR deprecated_function_start_offset;
236 gdbarch_remote_register_number_ftype *remote_register_number;
237 gdbarch_fetch_tls_load_module_address_ftype *fetch_tls_load_module_address;
238 CORE_ADDR frame_args_skip;
239 gdbarch_unwind_pc_ftype *unwind_pc;
240 gdbarch_unwind_sp_ftype *unwind_sp;
241 gdbarch_frame_num_args_ftype *frame_num_args;
242 gdbarch_frame_align_ftype *frame_align;
243 gdbarch_stabs_argument_has_addr_ftype *stabs_argument_has_addr;
244 int frame_red_zone_size;
245 gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
246 gdbarch_addr_bits_remove_ftype *addr_bits_remove;
247 gdbarch_software_single_step_ftype *software_single_step;
248 gdbarch_single_step_through_delay_ftype *single_step_through_delay;
249 gdbarch_print_insn_ftype *print_insn;
250 gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
251 gdbarch_skip_solib_resolver_ftype *skip_solib_resolver;
252 gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
253 gdbarch_stack_frame_destroyed_p_ftype *stack_frame_destroyed_p;
254 gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
255 gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
256 gdbarch_make_symbol_special_ftype *make_symbol_special;
257 gdbarch_adjust_dwarf2_addr_ftype *adjust_dwarf2_addr;
258 gdbarch_adjust_dwarf2_line_ftype *adjust_dwarf2_line;
259 int cannot_step_breakpoint;
260 int have_nonsteppable_watchpoint;
261 gdbarch_address_class_type_flags_ftype *address_class_type_flags;
262 gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name;
263 gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
264 gdbarch_register_reggroup_p_ftype *register_reggroup_p;
265 gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument;
266 gdbarch_iterate_over_regset_sections_ftype *iterate_over_regset_sections;
267 gdbarch_make_corefile_notes_ftype *make_corefile_notes;
268 gdbarch_elfcore_write_linux_prpsinfo_ftype *elfcore_write_linux_prpsinfo;
269 gdbarch_find_memory_regions_ftype *find_memory_regions;
270 gdbarch_core_xfer_shared_libraries_ftype *core_xfer_shared_libraries;
271 gdbarch_core_xfer_shared_libraries_aix_ftype *core_xfer_shared_libraries_aix;
272 gdbarch_core_pid_to_str_ftype *core_pid_to_str;
273 gdbarch_core_thread_name_ftype *core_thread_name;
274 const char * gcore_bfd_target;
275 int vtable_function_descriptors;
277 gdbarch_skip_permanent_breakpoint_ftype *skip_permanent_breakpoint;
278 ULONGEST max_insn_length;
279 gdbarch_displaced_step_copy_insn_ftype *displaced_step_copy_insn;
280 gdbarch_displaced_step_hw_singlestep_ftype *displaced_step_hw_singlestep;
281 gdbarch_displaced_step_fixup_ftype *displaced_step_fixup;
282 gdbarch_displaced_step_free_closure_ftype *displaced_step_free_closure;
283 gdbarch_displaced_step_location_ftype *displaced_step_location;
284 gdbarch_relocate_instruction_ftype *relocate_instruction;
285 gdbarch_overlay_update_ftype *overlay_update;
286 gdbarch_core_read_description_ftype *core_read_description;
287 gdbarch_static_transform_name_ftype *static_transform_name;
288 int sofun_address_maybe_missing;
289 gdbarch_process_record_ftype *process_record;
290 gdbarch_process_record_signal_ftype *process_record_signal;
291 gdbarch_gdb_signal_from_target_ftype *gdb_signal_from_target;
292 gdbarch_gdb_signal_to_target_ftype *gdb_signal_to_target;
293 gdbarch_get_siginfo_type_ftype *get_siginfo_type;
294 gdbarch_record_special_symbol_ftype *record_special_symbol;
295 gdbarch_get_syscall_number_ftype *get_syscall_number;
296 const char * xml_syscall_file;
297 struct syscalls_info * syscalls_info;
298 const char *const * stap_integer_prefixes;
299 const char *const * stap_integer_suffixes;
300 const char *const * stap_register_prefixes;
301 const char *const * stap_register_suffixes;
302 const char *const * stap_register_indirection_prefixes;
303 const char *const * stap_register_indirection_suffixes;
304 const char * stap_gdb_register_prefix;
305 const char * stap_gdb_register_suffix;
306 gdbarch_stap_is_single_operand_ftype *stap_is_single_operand;
307 gdbarch_stap_parse_special_token_ftype *stap_parse_special_token;
308 gdbarch_dtrace_parse_probe_argument_ftype *dtrace_parse_probe_argument;
309 gdbarch_dtrace_probe_is_enabled_ftype *dtrace_probe_is_enabled;
310 gdbarch_dtrace_enable_probe_ftype *dtrace_enable_probe;
311 gdbarch_dtrace_disable_probe_ftype *dtrace_disable_probe;
312 int has_global_solist;
313 int has_global_breakpoints;
314 gdbarch_has_shared_address_space_ftype *has_shared_address_space;
315 gdbarch_fast_tracepoint_valid_at_ftype *fast_tracepoint_valid_at;
316 gdbarch_guess_tracepoint_registers_ftype *guess_tracepoint_registers;
317 gdbarch_auto_charset_ftype *auto_charset;
318 gdbarch_auto_wide_charset_ftype *auto_wide_charset;
319 const char * solib_symbols_extension;
320 int has_dos_based_file_system;
321 gdbarch_gen_return_address_ftype *gen_return_address;
322 gdbarch_info_proc_ftype *info_proc;
323 gdbarch_core_info_proc_ftype *core_info_proc;
324 gdbarch_iterate_over_objfiles_in_search_order_ftype *iterate_over_objfiles_in_search_order;
325 struct ravenscar_arch_ops * ravenscar_ops;
326 gdbarch_insn_is_call_ftype *insn_is_call;
327 gdbarch_insn_is_ret_ftype *insn_is_ret;
328 gdbarch_insn_is_jump_ftype *insn_is_jump;
329 gdbarch_auxv_parse_ftype *auxv_parse;
330 gdbarch_vsyscall_range_ftype *vsyscall_range;
331 gdbarch_infcall_mmap_ftype *infcall_mmap;
332 gdbarch_infcall_munmap_ftype *infcall_munmap;
333 gdbarch_gcc_target_options_ftype *gcc_target_options;
334 gdbarch_gnu_triplet_regexp_ftype *gnu_triplet_regexp;
335 gdbarch_addressable_memory_unit_size_ftype *addressable_memory_unit_size;
338 /* Create a new ``struct gdbarch'' based on information provided by
339 ``struct gdbarch_info''. */
342 gdbarch_alloc (const struct gdbarch_info *info,
343 struct gdbarch_tdep *tdep)
345 struct gdbarch *gdbarch;
347 /* Create an obstack for allocating all the per-architecture memory,
348 then use that to allocate the architecture vector. */
349 struct obstack *obstack = XNEW (struct obstack);
350 obstack_init (obstack);
351 gdbarch = XOBNEW (obstack, struct gdbarch);
352 memset (gdbarch, 0, sizeof (*gdbarch));
353 gdbarch->obstack = obstack;
355 alloc_gdbarch_data (gdbarch);
357 gdbarch->tdep = tdep;
359 gdbarch->bfd_arch_info = info->bfd_arch_info;
360 gdbarch->byte_order = info->byte_order;
361 gdbarch->byte_order_for_code = info->byte_order_for_code;
362 gdbarch->osabi = info->osabi;
363 gdbarch->target_desc = info->target_desc;
365 /* Force the explicit initialization of these. */
366 gdbarch->bits_big_endian = (gdbarch->byte_order == BFD_ENDIAN_BIG);
367 gdbarch->short_bit = 2*TARGET_CHAR_BIT;
368 gdbarch->int_bit = 4*TARGET_CHAR_BIT;
369 gdbarch->long_bit = 4*TARGET_CHAR_BIT;
370 gdbarch->long_long_bit = 2*gdbarch->long_bit;
371 gdbarch->long_long_align_bit = 2*gdbarch->long_bit;
372 gdbarch->half_bit = 2*TARGET_CHAR_BIT;
373 gdbarch->float_bit = 4*TARGET_CHAR_BIT;
374 gdbarch->double_bit = 8*TARGET_CHAR_BIT;
375 gdbarch->long_double_bit = 8*TARGET_CHAR_BIT;
376 gdbarch->ptr_bit = gdbarch->int_bit;
377 gdbarch->char_signed = -1;
378 gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
379 gdbarch->num_regs = -1;
380 gdbarch->sp_regnum = -1;
381 gdbarch->pc_regnum = -1;
382 gdbarch->ps_regnum = -1;
383 gdbarch->fp0_regnum = -1;
384 gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
385 gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
386 gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
387 gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
388 gdbarch->deprecated_fp_regnum = -1;
389 gdbarch->call_dummy_location = AT_ENTRY_POINT;
390 gdbarch->print_registers_info = default_print_registers_info;
391 gdbarch->print_float_info = default_print_float_info;
392 gdbarch->register_sim_regno = legacy_register_sim_regno;
393 gdbarch->cannot_fetch_register = cannot_register_not;
394 gdbarch->cannot_store_register = cannot_register_not;
395 gdbarch->convert_register_p = generic_convert_register_p;
396 gdbarch->value_from_register = default_value_from_register;
397 gdbarch->pointer_to_address = unsigned_pointer_to_address;
398 gdbarch->address_to_pointer = unsigned_address_to_pointer;
399 gdbarch->return_in_first_hidden_param_p = default_return_in_first_hidden_param_p;
400 gdbarch->remote_breakpoint_from_pc = default_remote_breakpoint_from_pc;
401 gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
402 gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
403 gdbarch->remote_register_number = default_remote_register_number;
404 gdbarch->stabs_argument_has_addr = default_stabs_argument_has_addr;
405 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr_identity;
406 gdbarch->addr_bits_remove = core_addr_identity;
407 gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
408 gdbarch->skip_solib_resolver = generic_skip_solib_resolver;
409 gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
410 gdbarch->stack_frame_destroyed_p = generic_stack_frame_destroyed_p;
411 gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
412 gdbarch->make_symbol_special = default_make_symbol_special;
413 gdbarch->adjust_dwarf2_addr = default_adjust_dwarf2_addr;
414 gdbarch->adjust_dwarf2_line = default_adjust_dwarf2_line;
415 gdbarch->register_reggroup_p = default_register_reggroup_p;
416 gdbarch->skip_permanent_breakpoint = default_skip_permanent_breakpoint;
417 gdbarch->displaced_step_hw_singlestep = default_displaced_step_hw_singlestep;
418 gdbarch->displaced_step_fixup = NULL;
419 gdbarch->displaced_step_free_closure = NULL;
420 gdbarch->displaced_step_location = NULL;
421 gdbarch->relocate_instruction = NULL;
422 gdbarch->has_shared_address_space = default_has_shared_address_space;
423 gdbarch->fast_tracepoint_valid_at = default_fast_tracepoint_valid_at;
424 gdbarch->guess_tracepoint_registers = default_guess_tracepoint_registers;
425 gdbarch->auto_charset = default_auto_charset;
426 gdbarch->auto_wide_charset = default_auto_wide_charset;
427 gdbarch->gen_return_address = default_gen_return_address;
428 gdbarch->iterate_over_objfiles_in_search_order = default_iterate_over_objfiles_in_search_order;
429 gdbarch->ravenscar_ops = NULL;
430 gdbarch->insn_is_call = default_insn_is_call;
431 gdbarch->insn_is_ret = default_insn_is_ret;
432 gdbarch->insn_is_jump = default_insn_is_jump;
433 gdbarch->vsyscall_range = default_vsyscall_range;
434 gdbarch->infcall_mmap = default_infcall_mmap;
435 gdbarch->infcall_munmap = default_infcall_munmap;
436 gdbarch->gcc_target_options = default_gcc_target_options;
437 gdbarch->gnu_triplet_regexp = default_gnu_triplet_regexp;
438 gdbarch->addressable_memory_unit_size = default_addressable_memory_unit_size;
439 /* gdbarch_alloc() */
445 /* Allocate extra space using the per-architecture obstack. */
448 gdbarch_obstack_zalloc (struct gdbarch *arch, long size)
450 void *data = obstack_alloc (arch->obstack, size);
452 memset (data, 0, size);
459 gdbarch_obstack_strdup (struct gdbarch *arch, const char *string)
461 return obstack_strdup (arch->obstack, string);
465 /* Free a gdbarch struct. This should never happen in normal
466 operation --- once you've created a gdbarch, you keep it around.
467 However, if an architecture's init function encounters an error
468 building the structure, it may need to clean up a partially
469 constructed gdbarch. */
472 gdbarch_free (struct gdbarch *arch)
474 struct obstack *obstack;
476 gdb_assert (arch != NULL);
477 gdb_assert (!arch->initialized_p);
478 obstack = arch->obstack;
479 obstack_free (obstack, 0); /* Includes the ARCH. */
484 /* Ensure that all values in a GDBARCH are reasonable. */
487 verify_gdbarch (struct gdbarch *gdbarch)
490 struct cleanup *cleanups;
494 log = mem_fileopen ();
495 cleanups = make_cleanup_ui_file_delete (log);
497 if (gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
498 fprintf_unfiltered (log, "\n\tbyte-order");
499 if (gdbarch->bfd_arch_info == NULL)
500 fprintf_unfiltered (log, "\n\tbfd_arch_info");
501 /* Check those that need to be defined for the given multi-arch level. */
502 /* Skip verify of bits_big_endian, invalid_p == 0 */
503 /* Skip verify of short_bit, invalid_p == 0 */
504 /* Skip verify of int_bit, invalid_p == 0 */
505 /* Skip verify of long_bit, invalid_p == 0 */
506 /* Skip verify of long_long_bit, invalid_p == 0 */
507 /* Skip verify of long_long_align_bit, invalid_p == 0 */
508 /* Skip verify of half_bit, invalid_p == 0 */
509 if (gdbarch->half_format == 0)
510 gdbarch->half_format = floatformats_ieee_half;
511 /* Skip verify of float_bit, invalid_p == 0 */
512 if (gdbarch->float_format == 0)
513 gdbarch->float_format = floatformats_ieee_single;
514 /* Skip verify of double_bit, invalid_p == 0 */
515 if (gdbarch->double_format == 0)
516 gdbarch->double_format = floatformats_ieee_double;
517 /* Skip verify of long_double_bit, invalid_p == 0 */
518 if (gdbarch->long_double_format == 0)
519 gdbarch->long_double_format = floatformats_ieee_double;
520 /* Skip verify of ptr_bit, invalid_p == 0 */
521 if (gdbarch->addr_bit == 0)
522 gdbarch->addr_bit = gdbarch_ptr_bit (gdbarch);
523 if (gdbarch->dwarf2_addr_size == 0)
524 gdbarch->dwarf2_addr_size = gdbarch_ptr_bit (gdbarch) / TARGET_CHAR_BIT;
525 if (gdbarch->char_signed == -1)
526 gdbarch->char_signed = 1;
527 /* Skip verify of read_pc, has predicate. */
528 /* Skip verify of write_pc, has predicate. */
529 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
530 /* Skip verify of pseudo_register_read, has predicate. */
531 /* Skip verify of pseudo_register_read_value, has predicate. */
532 /* Skip verify of pseudo_register_write, has predicate. */
533 if (gdbarch->num_regs == -1)
534 fprintf_unfiltered (log, "\n\tnum_regs");
535 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
536 /* Skip verify of ax_pseudo_register_collect, has predicate. */
537 /* Skip verify of ax_pseudo_register_push_stack, has predicate. */
538 /* Skip verify of handle_segmentation_fault, has predicate. */
539 /* Skip verify of sp_regnum, invalid_p == 0 */
540 /* Skip verify of pc_regnum, invalid_p == 0 */
541 /* Skip verify of ps_regnum, invalid_p == 0 */
542 /* Skip verify of fp0_regnum, invalid_p == 0 */
543 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
544 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
545 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
546 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
547 if (gdbarch->register_name == 0)
548 fprintf_unfiltered (log, "\n\tregister_name");
549 /* Skip verify of register_type, has predicate. */
550 /* Skip verify of dummy_id, has predicate. */
551 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
552 /* Skip verify of push_dummy_call, has predicate. */
553 /* Skip verify of call_dummy_location, invalid_p == 0 */
554 /* Skip verify of push_dummy_code, has predicate. */
555 /* Skip verify of print_registers_info, invalid_p == 0 */
556 /* Skip verify of print_float_info, invalid_p == 0 */
557 /* Skip verify of print_vector_info, has predicate. */
558 /* Skip verify of register_sim_regno, invalid_p == 0 */
559 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
560 /* Skip verify of cannot_store_register, invalid_p == 0 */
561 /* Skip verify of get_longjmp_target, has predicate. */
562 /* Skip verify of convert_register_p, invalid_p == 0 */
563 /* Skip verify of value_from_register, invalid_p == 0 */
564 /* Skip verify of pointer_to_address, invalid_p == 0 */
565 /* Skip verify of address_to_pointer, invalid_p == 0 */
566 /* Skip verify of integer_to_address, has predicate. */
567 /* Skip verify of return_value, has predicate. */
568 /* Skip verify of return_in_first_hidden_param_p, invalid_p == 0 */
569 if (gdbarch->skip_prologue == 0)
570 fprintf_unfiltered (log, "\n\tskip_prologue");
571 /* Skip verify of skip_main_prologue, has predicate. */
572 /* Skip verify of skip_entrypoint, has predicate. */
573 if (gdbarch->inner_than == 0)
574 fprintf_unfiltered (log, "\n\tinner_than");
575 if (gdbarch->breakpoint_from_pc == 0)
576 fprintf_unfiltered (log, "\n\tbreakpoint_from_pc");
577 /* Skip verify of remote_breakpoint_from_pc, invalid_p == 0 */
578 /* Skip verify of adjust_breakpoint_address, has predicate. */
579 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
580 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
581 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
582 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
583 /* Skip verify of remote_register_number, invalid_p == 0 */
584 /* Skip verify of fetch_tls_load_module_address, has predicate. */
585 /* Skip verify of frame_args_skip, invalid_p == 0 */
586 /* Skip verify of unwind_pc, has predicate. */
587 /* Skip verify of unwind_sp, has predicate. */
588 /* Skip verify of frame_num_args, has predicate. */
589 /* Skip verify of frame_align, has predicate. */
590 /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
591 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
592 /* Skip verify of addr_bits_remove, invalid_p == 0 */
593 /* Skip verify of software_single_step, has predicate. */
594 /* Skip verify of single_step_through_delay, has predicate. */
595 if (gdbarch->print_insn == 0)
596 fprintf_unfiltered (log, "\n\tprint_insn");
597 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
598 /* Skip verify of skip_solib_resolver, invalid_p == 0 */
599 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
600 /* Skip verify of stack_frame_destroyed_p, invalid_p == 0 */
601 /* Skip verify of elf_make_msymbol_special, has predicate. */
602 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
603 /* Skip verify of make_symbol_special, invalid_p == 0 */
604 /* Skip verify of adjust_dwarf2_addr, invalid_p == 0 */
605 /* Skip verify of adjust_dwarf2_line, invalid_p == 0 */
606 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
607 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
608 /* Skip verify of address_class_type_flags, has predicate. */
609 /* Skip verify of address_class_type_flags_to_name, has predicate. */
610 /* Skip verify of address_class_name_to_type_flags, has predicate. */
611 /* Skip verify of register_reggroup_p, invalid_p == 0 */
612 /* Skip verify of fetch_pointer_argument, has predicate. */
613 /* Skip verify of iterate_over_regset_sections, has predicate. */
614 /* Skip verify of make_corefile_notes, has predicate. */
615 /* Skip verify of elfcore_write_linux_prpsinfo, has predicate. */
616 /* Skip verify of find_memory_regions, has predicate. */
617 /* Skip verify of core_xfer_shared_libraries, has predicate. */
618 /* Skip verify of core_xfer_shared_libraries_aix, has predicate. */
619 /* Skip verify of core_pid_to_str, has predicate. */
620 /* Skip verify of core_thread_name, has predicate. */
621 /* Skip verify of gcore_bfd_target, has predicate. */
622 /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
623 /* Skip verify of vbit_in_delta, invalid_p == 0 */
624 /* Skip verify of skip_permanent_breakpoint, invalid_p == 0 */
625 /* Skip verify of max_insn_length, has predicate. */
626 /* Skip verify of displaced_step_copy_insn, has predicate. */
627 /* Skip verify of displaced_step_hw_singlestep, invalid_p == 0 */
628 /* Skip verify of displaced_step_fixup, has predicate. */
629 if ((! gdbarch->displaced_step_free_closure) != (! gdbarch->displaced_step_copy_insn))
630 fprintf_unfiltered (log, "\n\tdisplaced_step_free_closure");
631 if ((! gdbarch->displaced_step_location) != (! gdbarch->displaced_step_copy_insn))
632 fprintf_unfiltered (log, "\n\tdisplaced_step_location");
633 /* Skip verify of relocate_instruction, has predicate. */
634 /* Skip verify of overlay_update, has predicate. */
635 /* Skip verify of core_read_description, has predicate. */
636 /* Skip verify of static_transform_name, has predicate. */
637 /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
638 /* Skip verify of process_record, has predicate. */
639 /* Skip verify of process_record_signal, has predicate. */
640 /* Skip verify of gdb_signal_from_target, has predicate. */
641 /* Skip verify of gdb_signal_to_target, has predicate. */
642 /* Skip verify of get_siginfo_type, has predicate. */
643 /* Skip verify of record_special_symbol, has predicate. */
644 /* Skip verify of get_syscall_number, has predicate. */
645 /* Skip verify of xml_syscall_file, invalid_p == 0 */
646 /* Skip verify of syscalls_info, invalid_p == 0 */
647 /* Skip verify of stap_integer_prefixes, invalid_p == 0 */
648 /* Skip verify of stap_integer_suffixes, invalid_p == 0 */
649 /* Skip verify of stap_register_prefixes, invalid_p == 0 */
650 /* Skip verify of stap_register_suffixes, invalid_p == 0 */
651 /* Skip verify of stap_register_indirection_prefixes, invalid_p == 0 */
652 /* Skip verify of stap_register_indirection_suffixes, invalid_p == 0 */
653 /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */
654 /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */
655 /* Skip verify of stap_is_single_operand, has predicate. */
656 /* Skip verify of stap_parse_special_token, has predicate. */
657 /* Skip verify of dtrace_parse_probe_argument, has predicate. */
658 /* Skip verify of dtrace_probe_is_enabled, has predicate. */
659 /* Skip verify of dtrace_enable_probe, has predicate. */
660 /* Skip verify of dtrace_disable_probe, has predicate. */
661 /* Skip verify of has_global_solist, invalid_p == 0 */
662 /* Skip verify of has_global_breakpoints, invalid_p == 0 */
663 /* Skip verify of has_shared_address_space, invalid_p == 0 */
664 /* Skip verify of fast_tracepoint_valid_at, invalid_p == 0 */
665 /* Skip verify of guess_tracepoint_registers, invalid_p == 0 */
666 /* Skip verify of auto_charset, invalid_p == 0 */
667 /* Skip verify of auto_wide_charset, invalid_p == 0 */
668 /* Skip verify of has_dos_based_file_system, invalid_p == 0 */
669 /* Skip verify of gen_return_address, invalid_p == 0 */
670 /* Skip verify of info_proc, has predicate. */
671 /* Skip verify of core_info_proc, has predicate. */
672 /* Skip verify of iterate_over_objfiles_in_search_order, invalid_p == 0 */
673 /* Skip verify of ravenscar_ops, invalid_p == 0 */
674 /* Skip verify of insn_is_call, invalid_p == 0 */
675 /* Skip verify of insn_is_ret, invalid_p == 0 */
676 /* Skip verify of insn_is_jump, invalid_p == 0 */
677 /* Skip verify of auxv_parse, has predicate. */
678 /* Skip verify of vsyscall_range, invalid_p == 0 */
679 /* Skip verify of infcall_mmap, invalid_p == 0 */
680 /* Skip verify of infcall_munmap, invalid_p == 0 */
681 /* Skip verify of gcc_target_options, invalid_p == 0 */
682 /* Skip verify of gnu_triplet_regexp, invalid_p == 0 */
683 /* Skip verify of addressable_memory_unit_size, invalid_p == 0 */
684 buf = ui_file_xstrdup (log, &length);
685 make_cleanup (xfree, buf);
687 internal_error (__FILE__, __LINE__,
688 _("verify_gdbarch: the following are invalid ...%s"),
690 do_cleanups (cleanups);
694 /* Print out the details of the current architecture. */
697 gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
699 const char *gdb_nm_file = "<not-defined>";
701 #if defined (GDB_NM_FILE)
702 gdb_nm_file = GDB_NM_FILE;
704 fprintf_unfiltered (file,
705 "gdbarch_dump: GDB_NM_FILE = %s\n",
707 fprintf_unfiltered (file,
708 "gdbarch_dump: addr_bit = %s\n",
709 plongest (gdbarch->addr_bit));
710 fprintf_unfiltered (file,
711 "gdbarch_dump: addr_bits_remove = <%s>\n",
712 host_address_to_string (gdbarch->addr_bits_remove));
713 fprintf_unfiltered (file,
714 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
715 gdbarch_address_class_name_to_type_flags_p (gdbarch));
716 fprintf_unfiltered (file,
717 "gdbarch_dump: address_class_name_to_type_flags = <%s>\n",
718 host_address_to_string (gdbarch->address_class_name_to_type_flags));
719 fprintf_unfiltered (file,
720 "gdbarch_dump: gdbarch_address_class_type_flags_p() = %d\n",
721 gdbarch_address_class_type_flags_p (gdbarch));
722 fprintf_unfiltered (file,
723 "gdbarch_dump: address_class_type_flags = <%s>\n",
724 host_address_to_string (gdbarch->address_class_type_flags));
725 fprintf_unfiltered (file,
726 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
727 gdbarch_address_class_type_flags_to_name_p (gdbarch));
728 fprintf_unfiltered (file,
729 "gdbarch_dump: address_class_type_flags_to_name = <%s>\n",
730 host_address_to_string (gdbarch->address_class_type_flags_to_name));
731 fprintf_unfiltered (file,
732 "gdbarch_dump: address_to_pointer = <%s>\n",
733 host_address_to_string (gdbarch->address_to_pointer));
734 fprintf_unfiltered (file,
735 "gdbarch_dump: addressable_memory_unit_size = <%s>\n",
736 host_address_to_string (gdbarch->addressable_memory_unit_size));
737 fprintf_unfiltered (file,
738 "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n",
739 gdbarch_adjust_breakpoint_address_p (gdbarch));
740 fprintf_unfiltered (file,
741 "gdbarch_dump: adjust_breakpoint_address = <%s>\n",
742 host_address_to_string (gdbarch->adjust_breakpoint_address));
743 fprintf_unfiltered (file,
744 "gdbarch_dump: adjust_dwarf2_addr = <%s>\n",
745 host_address_to_string (gdbarch->adjust_dwarf2_addr));
746 fprintf_unfiltered (file,
747 "gdbarch_dump: adjust_dwarf2_line = <%s>\n",
748 host_address_to_string (gdbarch->adjust_dwarf2_line));
749 fprintf_unfiltered (file,
750 "gdbarch_dump: auto_charset = <%s>\n",
751 host_address_to_string (gdbarch->auto_charset));
752 fprintf_unfiltered (file,
753 "gdbarch_dump: auto_wide_charset = <%s>\n",
754 host_address_to_string (gdbarch->auto_wide_charset));
755 fprintf_unfiltered (file,
756 "gdbarch_dump: gdbarch_auxv_parse_p() = %d\n",
757 gdbarch_auxv_parse_p (gdbarch));
758 fprintf_unfiltered (file,
759 "gdbarch_dump: auxv_parse = <%s>\n",
760 host_address_to_string (gdbarch->auxv_parse));
761 fprintf_unfiltered (file,
762 "gdbarch_dump: gdbarch_ax_pseudo_register_collect_p() = %d\n",
763 gdbarch_ax_pseudo_register_collect_p (gdbarch));
764 fprintf_unfiltered (file,
765 "gdbarch_dump: ax_pseudo_register_collect = <%s>\n",
766 host_address_to_string (gdbarch->ax_pseudo_register_collect));
767 fprintf_unfiltered (file,
768 "gdbarch_dump: gdbarch_ax_pseudo_register_push_stack_p() = %d\n",
769 gdbarch_ax_pseudo_register_push_stack_p (gdbarch));
770 fprintf_unfiltered (file,
771 "gdbarch_dump: ax_pseudo_register_push_stack = <%s>\n",
772 host_address_to_string (gdbarch->ax_pseudo_register_push_stack));
773 fprintf_unfiltered (file,
774 "gdbarch_dump: believe_pcc_promotion = %s\n",
775 plongest (gdbarch->believe_pcc_promotion));
776 fprintf_unfiltered (file,
777 "gdbarch_dump: bfd_arch_info = %s\n",
778 gdbarch_bfd_arch_info (gdbarch)->printable_name);
779 fprintf_unfiltered (file,
780 "gdbarch_dump: bits_big_endian = %s\n",
781 plongest (gdbarch->bits_big_endian));
782 fprintf_unfiltered (file,
783 "gdbarch_dump: breakpoint_from_pc = <%s>\n",
784 host_address_to_string (gdbarch->breakpoint_from_pc));
785 fprintf_unfiltered (file,
786 "gdbarch_dump: byte_order = %s\n",
787 plongest (gdbarch->byte_order));
788 fprintf_unfiltered (file,
789 "gdbarch_dump: byte_order_for_code = %s\n",
790 plongest (gdbarch->byte_order_for_code));
791 fprintf_unfiltered (file,
792 "gdbarch_dump: call_dummy_location = %s\n",
793 plongest (gdbarch->call_dummy_location));
794 fprintf_unfiltered (file,
795 "gdbarch_dump: cannot_fetch_register = <%s>\n",
796 host_address_to_string (gdbarch->cannot_fetch_register));
797 fprintf_unfiltered (file,
798 "gdbarch_dump: cannot_step_breakpoint = %s\n",
799 plongest (gdbarch->cannot_step_breakpoint));
800 fprintf_unfiltered (file,
801 "gdbarch_dump: cannot_store_register = <%s>\n",
802 host_address_to_string (gdbarch->cannot_store_register));
803 fprintf_unfiltered (file,
804 "gdbarch_dump: char_signed = %s\n",
805 plongest (gdbarch->char_signed));
806 fprintf_unfiltered (file,
807 "gdbarch_dump: coff_make_msymbol_special = <%s>\n",
808 host_address_to_string (gdbarch->coff_make_msymbol_special));
809 fprintf_unfiltered (file,
810 "gdbarch_dump: convert_from_func_ptr_addr = <%s>\n",
811 host_address_to_string (gdbarch->convert_from_func_ptr_addr));
812 fprintf_unfiltered (file,
813 "gdbarch_dump: convert_register_p = <%s>\n",
814 host_address_to_string (gdbarch->convert_register_p));
815 fprintf_unfiltered (file,
816 "gdbarch_dump: gdbarch_core_info_proc_p() = %d\n",
817 gdbarch_core_info_proc_p (gdbarch));
818 fprintf_unfiltered (file,
819 "gdbarch_dump: core_info_proc = <%s>\n",
820 host_address_to_string (gdbarch->core_info_proc));
821 fprintf_unfiltered (file,
822 "gdbarch_dump: gdbarch_core_pid_to_str_p() = %d\n",
823 gdbarch_core_pid_to_str_p (gdbarch));
824 fprintf_unfiltered (file,
825 "gdbarch_dump: core_pid_to_str = <%s>\n",
826 host_address_to_string (gdbarch->core_pid_to_str));
827 fprintf_unfiltered (file,
828 "gdbarch_dump: gdbarch_core_read_description_p() = %d\n",
829 gdbarch_core_read_description_p (gdbarch));
830 fprintf_unfiltered (file,
831 "gdbarch_dump: core_read_description = <%s>\n",
832 host_address_to_string (gdbarch->core_read_description));
833 fprintf_unfiltered (file,
834 "gdbarch_dump: gdbarch_core_thread_name_p() = %d\n",
835 gdbarch_core_thread_name_p (gdbarch));
836 fprintf_unfiltered (file,
837 "gdbarch_dump: core_thread_name = <%s>\n",
838 host_address_to_string (gdbarch->core_thread_name));
839 fprintf_unfiltered (file,
840 "gdbarch_dump: gdbarch_core_xfer_shared_libraries_p() = %d\n",
841 gdbarch_core_xfer_shared_libraries_p (gdbarch));
842 fprintf_unfiltered (file,
843 "gdbarch_dump: core_xfer_shared_libraries = <%s>\n",
844 host_address_to_string (gdbarch->core_xfer_shared_libraries));
845 fprintf_unfiltered (file,
846 "gdbarch_dump: gdbarch_core_xfer_shared_libraries_aix_p() = %d\n",
847 gdbarch_core_xfer_shared_libraries_aix_p (gdbarch));
848 fprintf_unfiltered (file,
849 "gdbarch_dump: core_xfer_shared_libraries_aix = <%s>\n",
850 host_address_to_string (gdbarch->core_xfer_shared_libraries_aix));
851 fprintf_unfiltered (file,
852 "gdbarch_dump: decr_pc_after_break = %s\n",
853 core_addr_to_string_nz (gdbarch->decr_pc_after_break));
854 fprintf_unfiltered (file,
855 "gdbarch_dump: deprecated_fp_regnum = %s\n",
856 plongest (gdbarch->deprecated_fp_regnum));
857 fprintf_unfiltered (file,
858 "gdbarch_dump: deprecated_function_start_offset = %s\n",
859 core_addr_to_string_nz (gdbarch->deprecated_function_start_offset));
860 fprintf_unfiltered (file,
861 "gdbarch_dump: gdbarch_displaced_step_copy_insn_p() = %d\n",
862 gdbarch_displaced_step_copy_insn_p (gdbarch));
863 fprintf_unfiltered (file,
864 "gdbarch_dump: displaced_step_copy_insn = <%s>\n",
865 host_address_to_string (gdbarch->displaced_step_copy_insn));
866 fprintf_unfiltered (file,
867 "gdbarch_dump: gdbarch_displaced_step_fixup_p() = %d\n",
868 gdbarch_displaced_step_fixup_p (gdbarch));
869 fprintf_unfiltered (file,
870 "gdbarch_dump: displaced_step_fixup = <%s>\n",
871 host_address_to_string (gdbarch->displaced_step_fixup));
872 fprintf_unfiltered (file,
873 "gdbarch_dump: displaced_step_free_closure = <%s>\n",
874 host_address_to_string (gdbarch->displaced_step_free_closure));
875 fprintf_unfiltered (file,
876 "gdbarch_dump: displaced_step_hw_singlestep = <%s>\n",
877 host_address_to_string (gdbarch->displaced_step_hw_singlestep));
878 fprintf_unfiltered (file,
879 "gdbarch_dump: displaced_step_location = <%s>\n",
880 host_address_to_string (gdbarch->displaced_step_location));
881 fprintf_unfiltered (file,
882 "gdbarch_dump: double_bit = %s\n",
883 plongest (gdbarch->double_bit));
884 fprintf_unfiltered (file,
885 "gdbarch_dump: double_format = %s\n",
886 pformat (gdbarch->double_format));
887 fprintf_unfiltered (file,
888 "gdbarch_dump: gdbarch_dtrace_disable_probe_p() = %d\n",
889 gdbarch_dtrace_disable_probe_p (gdbarch));
890 fprintf_unfiltered (file,
891 "gdbarch_dump: dtrace_disable_probe = <%s>\n",
892 host_address_to_string (gdbarch->dtrace_disable_probe));
893 fprintf_unfiltered (file,
894 "gdbarch_dump: gdbarch_dtrace_enable_probe_p() = %d\n",
895 gdbarch_dtrace_enable_probe_p (gdbarch));
896 fprintf_unfiltered (file,
897 "gdbarch_dump: dtrace_enable_probe = <%s>\n",
898 host_address_to_string (gdbarch->dtrace_enable_probe));
899 fprintf_unfiltered (file,
900 "gdbarch_dump: gdbarch_dtrace_parse_probe_argument_p() = %d\n",
901 gdbarch_dtrace_parse_probe_argument_p (gdbarch));
902 fprintf_unfiltered (file,
903 "gdbarch_dump: dtrace_parse_probe_argument = <%s>\n",
904 host_address_to_string (gdbarch->dtrace_parse_probe_argument));
905 fprintf_unfiltered (file,
906 "gdbarch_dump: gdbarch_dtrace_probe_is_enabled_p() = %d\n",
907 gdbarch_dtrace_probe_is_enabled_p (gdbarch));
908 fprintf_unfiltered (file,
909 "gdbarch_dump: dtrace_probe_is_enabled = <%s>\n",
910 host_address_to_string (gdbarch->dtrace_probe_is_enabled));
911 fprintf_unfiltered (file,
912 "gdbarch_dump: gdbarch_dummy_id_p() = %d\n",
913 gdbarch_dummy_id_p (gdbarch));
914 fprintf_unfiltered (file,
915 "gdbarch_dump: dummy_id = <%s>\n",
916 host_address_to_string (gdbarch->dummy_id));
917 fprintf_unfiltered (file,
918 "gdbarch_dump: dwarf2_addr_size = %s\n",
919 plongest (gdbarch->dwarf2_addr_size));
920 fprintf_unfiltered (file,
921 "gdbarch_dump: dwarf2_reg_to_regnum = <%s>\n",
922 host_address_to_string (gdbarch->dwarf2_reg_to_regnum));
923 fprintf_unfiltered (file,
924 "gdbarch_dump: ecoff_reg_to_regnum = <%s>\n",
925 host_address_to_string (gdbarch->ecoff_reg_to_regnum));
926 fprintf_unfiltered (file,
927 "gdbarch_dump: gdbarch_elf_make_msymbol_special_p() = %d\n",
928 gdbarch_elf_make_msymbol_special_p (gdbarch));
929 fprintf_unfiltered (file,
930 "gdbarch_dump: elf_make_msymbol_special = <%s>\n",
931 host_address_to_string (gdbarch->elf_make_msymbol_special));
932 fprintf_unfiltered (file,
933 "gdbarch_dump: gdbarch_elfcore_write_linux_prpsinfo_p() = %d\n",
934 gdbarch_elfcore_write_linux_prpsinfo_p (gdbarch));
935 fprintf_unfiltered (file,
936 "gdbarch_dump: elfcore_write_linux_prpsinfo = <%s>\n",
937 host_address_to_string (gdbarch->elfcore_write_linux_prpsinfo));
938 fprintf_unfiltered (file,
939 "gdbarch_dump: fast_tracepoint_valid_at = <%s>\n",
940 host_address_to_string (gdbarch->fast_tracepoint_valid_at));
941 fprintf_unfiltered (file,
942 "gdbarch_dump: gdbarch_fetch_pointer_argument_p() = %d\n",
943 gdbarch_fetch_pointer_argument_p (gdbarch));
944 fprintf_unfiltered (file,
945 "gdbarch_dump: fetch_pointer_argument = <%s>\n",
946 host_address_to_string (gdbarch->fetch_pointer_argument));
947 fprintf_unfiltered (file,
948 "gdbarch_dump: gdbarch_fetch_tls_load_module_address_p() = %d\n",
949 gdbarch_fetch_tls_load_module_address_p (gdbarch));
950 fprintf_unfiltered (file,
951 "gdbarch_dump: fetch_tls_load_module_address = <%s>\n",
952 host_address_to_string (gdbarch->fetch_tls_load_module_address));
953 fprintf_unfiltered (file,
954 "gdbarch_dump: gdbarch_find_memory_regions_p() = %d\n",
955 gdbarch_find_memory_regions_p (gdbarch));
956 fprintf_unfiltered (file,
957 "gdbarch_dump: find_memory_regions = <%s>\n",
958 host_address_to_string (gdbarch->find_memory_regions));
959 fprintf_unfiltered (file,
960 "gdbarch_dump: float_bit = %s\n",
961 plongest (gdbarch->float_bit));
962 fprintf_unfiltered (file,
963 "gdbarch_dump: float_format = %s\n",
964 pformat (gdbarch->float_format));
965 fprintf_unfiltered (file,
966 "gdbarch_dump: fp0_regnum = %s\n",
967 plongest (gdbarch->fp0_regnum));
968 fprintf_unfiltered (file,
969 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
970 gdbarch_frame_align_p (gdbarch));
971 fprintf_unfiltered (file,
972 "gdbarch_dump: frame_align = <%s>\n",
973 host_address_to_string (gdbarch->frame_align));
974 fprintf_unfiltered (file,
975 "gdbarch_dump: frame_args_skip = %s\n",
976 core_addr_to_string_nz (gdbarch->frame_args_skip));
977 fprintf_unfiltered (file,
978 "gdbarch_dump: gdbarch_frame_num_args_p() = %d\n",
979 gdbarch_frame_num_args_p (gdbarch));
980 fprintf_unfiltered (file,
981 "gdbarch_dump: frame_num_args = <%s>\n",
982 host_address_to_string (gdbarch->frame_num_args));
983 fprintf_unfiltered (file,
984 "gdbarch_dump: frame_red_zone_size = %s\n",
985 plongest (gdbarch->frame_red_zone_size));
986 fprintf_unfiltered (file,
987 "gdbarch_dump: gcc_target_options = <%s>\n",
988 host_address_to_string (gdbarch->gcc_target_options));
989 fprintf_unfiltered (file,
990 "gdbarch_dump: gdbarch_gcore_bfd_target_p() = %d\n",
991 gdbarch_gcore_bfd_target_p (gdbarch));
992 fprintf_unfiltered (file,
993 "gdbarch_dump: gcore_bfd_target = %s\n",
994 pstring (gdbarch->gcore_bfd_target));
995 fprintf_unfiltered (file,
996 "gdbarch_dump: gdbarch_gdb_signal_from_target_p() = %d\n",
997 gdbarch_gdb_signal_from_target_p (gdbarch));
998 fprintf_unfiltered (file,
999 "gdbarch_dump: gdb_signal_from_target = <%s>\n",
1000 host_address_to_string (gdbarch->gdb_signal_from_target));
1001 fprintf_unfiltered (file,
1002 "gdbarch_dump: gdbarch_gdb_signal_to_target_p() = %d\n",
1003 gdbarch_gdb_signal_to_target_p (gdbarch));
1004 fprintf_unfiltered (file,
1005 "gdbarch_dump: gdb_signal_to_target = <%s>\n",
1006 host_address_to_string (gdbarch->gdb_signal_to_target));
1007 fprintf_unfiltered (file,
1008 "gdbarch_dump: gen_return_address = <%s>\n",
1009 host_address_to_string (gdbarch->gen_return_address));
1010 fprintf_unfiltered (file,
1011 "gdbarch_dump: gdbarch_get_longjmp_target_p() = %d\n",
1012 gdbarch_get_longjmp_target_p (gdbarch));
1013 fprintf_unfiltered (file,
1014 "gdbarch_dump: get_longjmp_target = <%s>\n",
1015 host_address_to_string (gdbarch->get_longjmp_target));
1016 fprintf_unfiltered (file,
1017 "gdbarch_dump: gdbarch_get_siginfo_type_p() = %d\n",
1018 gdbarch_get_siginfo_type_p (gdbarch));
1019 fprintf_unfiltered (file,
1020 "gdbarch_dump: get_siginfo_type = <%s>\n",
1021 host_address_to_string (gdbarch->get_siginfo_type));
1022 fprintf_unfiltered (file,
1023 "gdbarch_dump: gdbarch_get_syscall_number_p() = %d\n",
1024 gdbarch_get_syscall_number_p (gdbarch));
1025 fprintf_unfiltered (file,
1026 "gdbarch_dump: get_syscall_number = <%s>\n",
1027 host_address_to_string (gdbarch->get_syscall_number));
1028 fprintf_unfiltered (file,
1029 "gdbarch_dump: gnu_triplet_regexp = <%s>\n",
1030 host_address_to_string (gdbarch->gnu_triplet_regexp));
1031 fprintf_unfiltered (file,
1032 "gdbarch_dump: guess_tracepoint_registers = <%s>\n",
1033 host_address_to_string (gdbarch->guess_tracepoint_registers));
1034 fprintf_unfiltered (file,
1035 "gdbarch_dump: half_bit = %s\n",
1036 plongest (gdbarch->half_bit));
1037 fprintf_unfiltered (file,
1038 "gdbarch_dump: half_format = %s\n",
1039 pformat (gdbarch->half_format));
1040 fprintf_unfiltered (file,
1041 "gdbarch_dump: gdbarch_handle_segmentation_fault_p() = %d\n",
1042 gdbarch_handle_segmentation_fault_p (gdbarch));
1043 fprintf_unfiltered (file,
1044 "gdbarch_dump: handle_segmentation_fault = <%s>\n",
1045 host_address_to_string (gdbarch->handle_segmentation_fault));
1046 fprintf_unfiltered (file,
1047 "gdbarch_dump: has_dos_based_file_system = %s\n",
1048 plongest (gdbarch->has_dos_based_file_system));
1049 fprintf_unfiltered (file,
1050 "gdbarch_dump: has_global_breakpoints = %s\n",
1051 plongest (gdbarch->has_global_breakpoints));
1052 fprintf_unfiltered (file,
1053 "gdbarch_dump: has_global_solist = %s\n",
1054 plongest (gdbarch->has_global_solist));
1055 fprintf_unfiltered (file,
1056 "gdbarch_dump: has_shared_address_space = <%s>\n",
1057 host_address_to_string (gdbarch->has_shared_address_space));
1058 fprintf_unfiltered (file,
1059 "gdbarch_dump: have_nonsteppable_watchpoint = %s\n",
1060 plongest (gdbarch->have_nonsteppable_watchpoint));
1061 fprintf_unfiltered (file,
1062 "gdbarch_dump: in_solib_return_trampoline = <%s>\n",
1063 host_address_to_string (gdbarch->in_solib_return_trampoline));
1064 fprintf_unfiltered (file,
1065 "gdbarch_dump: infcall_mmap = <%s>\n",
1066 host_address_to_string (gdbarch->infcall_mmap));
1067 fprintf_unfiltered (file,
1068 "gdbarch_dump: infcall_munmap = <%s>\n",
1069 host_address_to_string (gdbarch->infcall_munmap));
1070 fprintf_unfiltered (file,
1071 "gdbarch_dump: gdbarch_info_proc_p() = %d\n",
1072 gdbarch_info_proc_p (gdbarch));
1073 fprintf_unfiltered (file,
1074 "gdbarch_dump: info_proc = <%s>\n",
1075 host_address_to_string (gdbarch->info_proc));
1076 fprintf_unfiltered (file,
1077 "gdbarch_dump: inner_than = <%s>\n",
1078 host_address_to_string (gdbarch->inner_than));
1079 fprintf_unfiltered (file,
1080 "gdbarch_dump: insn_is_call = <%s>\n",
1081 host_address_to_string (gdbarch->insn_is_call));
1082 fprintf_unfiltered (file,
1083 "gdbarch_dump: insn_is_jump = <%s>\n",
1084 host_address_to_string (gdbarch->insn_is_jump));
1085 fprintf_unfiltered (file,
1086 "gdbarch_dump: insn_is_ret = <%s>\n",
1087 host_address_to_string (gdbarch->insn_is_ret));
1088 fprintf_unfiltered (file,
1089 "gdbarch_dump: int_bit = %s\n",
1090 plongest (gdbarch->int_bit));
1091 fprintf_unfiltered (file,
1092 "gdbarch_dump: gdbarch_integer_to_address_p() = %d\n",
1093 gdbarch_integer_to_address_p (gdbarch));
1094 fprintf_unfiltered (file,
1095 "gdbarch_dump: integer_to_address = <%s>\n",
1096 host_address_to_string (gdbarch->integer_to_address));
1097 fprintf_unfiltered (file,
1098 "gdbarch_dump: iterate_over_objfiles_in_search_order = <%s>\n",
1099 host_address_to_string (gdbarch->iterate_over_objfiles_in_search_order));
1100 fprintf_unfiltered (file,
1101 "gdbarch_dump: gdbarch_iterate_over_regset_sections_p() = %d\n",
1102 gdbarch_iterate_over_regset_sections_p (gdbarch));
1103 fprintf_unfiltered (file,
1104 "gdbarch_dump: iterate_over_regset_sections = <%s>\n",
1105 host_address_to_string (gdbarch->iterate_over_regset_sections));
1106 fprintf_unfiltered (file,
1107 "gdbarch_dump: long_bit = %s\n",
1108 plongest (gdbarch->long_bit));
1109 fprintf_unfiltered (file,
1110 "gdbarch_dump: long_double_bit = %s\n",
1111 plongest (gdbarch->long_double_bit));
1112 fprintf_unfiltered (file,
1113 "gdbarch_dump: long_double_format = %s\n",
1114 pformat (gdbarch->long_double_format));
1115 fprintf_unfiltered (file,
1116 "gdbarch_dump: long_long_align_bit = %s\n",
1117 plongest (gdbarch->long_long_align_bit));
1118 fprintf_unfiltered (file,
1119 "gdbarch_dump: long_long_bit = %s\n",
1120 plongest (gdbarch->long_long_bit));
1121 fprintf_unfiltered (file,
1122 "gdbarch_dump: gdbarch_make_corefile_notes_p() = %d\n",
1123 gdbarch_make_corefile_notes_p (gdbarch));
1124 fprintf_unfiltered (file,
1125 "gdbarch_dump: make_corefile_notes = <%s>\n",
1126 host_address_to_string (gdbarch->make_corefile_notes));
1127 fprintf_unfiltered (file,
1128 "gdbarch_dump: make_symbol_special = <%s>\n",
1129 host_address_to_string (gdbarch->make_symbol_special));
1130 fprintf_unfiltered (file,
1131 "gdbarch_dump: gdbarch_max_insn_length_p() = %d\n",
1132 gdbarch_max_insn_length_p (gdbarch));
1133 fprintf_unfiltered (file,
1134 "gdbarch_dump: max_insn_length = %s\n",
1135 plongest (gdbarch->max_insn_length));
1136 fprintf_unfiltered (file,
1137 "gdbarch_dump: memory_insert_breakpoint = <%s>\n",
1138 host_address_to_string (gdbarch->memory_insert_breakpoint));
1139 fprintf_unfiltered (file,
1140 "gdbarch_dump: memory_remove_breakpoint = <%s>\n",
1141 host_address_to_string (gdbarch->memory_remove_breakpoint));
1142 fprintf_unfiltered (file,
1143 "gdbarch_dump: num_pseudo_regs = %s\n",
1144 plongest (gdbarch->num_pseudo_regs));
1145 fprintf_unfiltered (file,
1146 "gdbarch_dump: num_regs = %s\n",
1147 plongest (gdbarch->num_regs));
1148 fprintf_unfiltered (file,
1149 "gdbarch_dump: osabi = %s\n",
1150 plongest (gdbarch->osabi));
1151 fprintf_unfiltered (file,
1152 "gdbarch_dump: gdbarch_overlay_update_p() = %d\n",
1153 gdbarch_overlay_update_p (gdbarch));
1154 fprintf_unfiltered (file,
1155 "gdbarch_dump: overlay_update = <%s>\n",
1156 host_address_to_string (gdbarch->overlay_update));
1157 fprintf_unfiltered (file,
1158 "gdbarch_dump: pc_regnum = %s\n",
1159 plongest (gdbarch->pc_regnum));
1160 fprintf_unfiltered (file,
1161 "gdbarch_dump: pointer_to_address = <%s>\n",
1162 host_address_to_string (gdbarch->pointer_to_address));
1163 fprintf_unfiltered (file,
1164 "gdbarch_dump: print_float_info = <%s>\n",
1165 host_address_to_string (gdbarch->print_float_info));
1166 fprintf_unfiltered (file,
1167 "gdbarch_dump: print_insn = <%s>\n",
1168 host_address_to_string (gdbarch->print_insn));
1169 fprintf_unfiltered (file,
1170 "gdbarch_dump: print_registers_info = <%s>\n",
1171 host_address_to_string (gdbarch->print_registers_info));
1172 fprintf_unfiltered (file,
1173 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1174 gdbarch_print_vector_info_p (gdbarch));
1175 fprintf_unfiltered (file,
1176 "gdbarch_dump: print_vector_info = <%s>\n",
1177 host_address_to_string (gdbarch->print_vector_info));
1178 fprintf_unfiltered (file,
1179 "gdbarch_dump: gdbarch_process_record_p() = %d\n",
1180 gdbarch_process_record_p (gdbarch));
1181 fprintf_unfiltered (file,
1182 "gdbarch_dump: process_record = <%s>\n",
1183 host_address_to_string (gdbarch->process_record));
1184 fprintf_unfiltered (file,
1185 "gdbarch_dump: gdbarch_process_record_signal_p() = %d\n",
1186 gdbarch_process_record_signal_p (gdbarch));
1187 fprintf_unfiltered (file,
1188 "gdbarch_dump: process_record_signal = <%s>\n",
1189 host_address_to_string (gdbarch->process_record_signal));
1190 fprintf_unfiltered (file,
1191 "gdbarch_dump: ps_regnum = %s\n",
1192 plongest (gdbarch->ps_regnum));
1193 fprintf_unfiltered (file,
1194 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
1195 gdbarch_pseudo_register_read_p (gdbarch));
1196 fprintf_unfiltered (file,
1197 "gdbarch_dump: pseudo_register_read = <%s>\n",
1198 host_address_to_string (gdbarch->pseudo_register_read));
1199 fprintf_unfiltered (file,
1200 "gdbarch_dump: gdbarch_pseudo_register_read_value_p() = %d\n",
1201 gdbarch_pseudo_register_read_value_p (gdbarch));
1202 fprintf_unfiltered (file,
1203 "gdbarch_dump: pseudo_register_read_value = <%s>\n",
1204 host_address_to_string (gdbarch->pseudo_register_read_value));
1205 fprintf_unfiltered (file,
1206 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
1207 gdbarch_pseudo_register_write_p (gdbarch));
1208 fprintf_unfiltered (file,
1209 "gdbarch_dump: pseudo_register_write = <%s>\n",
1210 host_address_to_string (gdbarch->pseudo_register_write));
1211 fprintf_unfiltered (file,
1212 "gdbarch_dump: ptr_bit = %s\n",
1213 plongest (gdbarch->ptr_bit));
1214 fprintf_unfiltered (file,
1215 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
1216 gdbarch_push_dummy_call_p (gdbarch));
1217 fprintf_unfiltered (file,
1218 "gdbarch_dump: push_dummy_call = <%s>\n",
1219 host_address_to_string (gdbarch->push_dummy_call));
1220 fprintf_unfiltered (file,
1221 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
1222 gdbarch_push_dummy_code_p (gdbarch));
1223 fprintf_unfiltered (file,
1224 "gdbarch_dump: push_dummy_code = <%s>\n",
1225 host_address_to_string (gdbarch->push_dummy_code));
1226 fprintf_unfiltered (file,
1227 "gdbarch_dump: ravenscar_ops = %s\n",
1228 host_address_to_string (gdbarch->ravenscar_ops));
1229 fprintf_unfiltered (file,
1230 "gdbarch_dump: gdbarch_read_pc_p() = %d\n",
1231 gdbarch_read_pc_p (gdbarch));
1232 fprintf_unfiltered (file,
1233 "gdbarch_dump: read_pc = <%s>\n",
1234 host_address_to_string (gdbarch->read_pc));
1235 fprintf_unfiltered (file,
1236 "gdbarch_dump: gdbarch_record_special_symbol_p() = %d\n",
1237 gdbarch_record_special_symbol_p (gdbarch));
1238 fprintf_unfiltered (file,
1239 "gdbarch_dump: record_special_symbol = <%s>\n",
1240 host_address_to_string (gdbarch->record_special_symbol));
1241 fprintf_unfiltered (file,
1242 "gdbarch_dump: register_name = <%s>\n",
1243 host_address_to_string (gdbarch->register_name));
1244 fprintf_unfiltered (file,
1245 "gdbarch_dump: register_reggroup_p = <%s>\n",
1246 host_address_to_string (gdbarch->register_reggroup_p));
1247 fprintf_unfiltered (file,
1248 "gdbarch_dump: register_sim_regno = <%s>\n",
1249 host_address_to_string (gdbarch->register_sim_regno));
1250 fprintf_unfiltered (file,
1251 "gdbarch_dump: register_to_value = <%s>\n",
1252 host_address_to_string (gdbarch->register_to_value));
1253 fprintf_unfiltered (file,
1254 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
1255 gdbarch_register_type_p (gdbarch));
1256 fprintf_unfiltered (file,
1257 "gdbarch_dump: register_type = <%s>\n",
1258 host_address_to_string (gdbarch->register_type));
1259 fprintf_unfiltered (file,
1260 "gdbarch_dump: gdbarch_relocate_instruction_p() = %d\n",
1261 gdbarch_relocate_instruction_p (gdbarch));
1262 fprintf_unfiltered (file,
1263 "gdbarch_dump: relocate_instruction = <%s>\n",
1264 host_address_to_string (gdbarch->relocate_instruction));
1265 fprintf_unfiltered (file,
1266 "gdbarch_dump: remote_breakpoint_from_pc = <%s>\n",
1267 host_address_to_string (gdbarch->remote_breakpoint_from_pc));
1268 fprintf_unfiltered (file,
1269 "gdbarch_dump: remote_register_number = <%s>\n",
1270 host_address_to_string (gdbarch->remote_register_number));
1271 fprintf_unfiltered (file,
1272 "gdbarch_dump: return_in_first_hidden_param_p = <%s>\n",
1273 host_address_to_string (gdbarch->return_in_first_hidden_param_p));
1274 fprintf_unfiltered (file,
1275 "gdbarch_dump: gdbarch_return_value_p() = %d\n",
1276 gdbarch_return_value_p (gdbarch));
1277 fprintf_unfiltered (file,
1278 "gdbarch_dump: return_value = <%s>\n",
1279 host_address_to_string (gdbarch->return_value));
1280 fprintf_unfiltered (file,
1281 "gdbarch_dump: sdb_reg_to_regnum = <%s>\n",
1282 host_address_to_string (gdbarch->sdb_reg_to_regnum));
1283 fprintf_unfiltered (file,
1284 "gdbarch_dump: short_bit = %s\n",
1285 plongest (gdbarch->short_bit));
1286 fprintf_unfiltered (file,
1287 "gdbarch_dump: gdbarch_single_step_through_delay_p() = %d\n",
1288 gdbarch_single_step_through_delay_p (gdbarch));
1289 fprintf_unfiltered (file,
1290 "gdbarch_dump: single_step_through_delay = <%s>\n",
1291 host_address_to_string (gdbarch->single_step_through_delay));
1292 fprintf_unfiltered (file,
1293 "gdbarch_dump: gdbarch_skip_entrypoint_p() = %d\n",
1294 gdbarch_skip_entrypoint_p (gdbarch));
1295 fprintf_unfiltered (file,
1296 "gdbarch_dump: skip_entrypoint = <%s>\n",
1297 host_address_to_string (gdbarch->skip_entrypoint));
1298 fprintf_unfiltered (file,
1299 "gdbarch_dump: gdbarch_skip_main_prologue_p() = %d\n",
1300 gdbarch_skip_main_prologue_p (gdbarch));
1301 fprintf_unfiltered (file,
1302 "gdbarch_dump: skip_main_prologue = <%s>\n",
1303 host_address_to_string (gdbarch->skip_main_prologue));
1304 fprintf_unfiltered (file,
1305 "gdbarch_dump: skip_permanent_breakpoint = <%s>\n",
1306 host_address_to_string (gdbarch->skip_permanent_breakpoint));
1307 fprintf_unfiltered (file,
1308 "gdbarch_dump: skip_prologue = <%s>\n",
1309 host_address_to_string (gdbarch->skip_prologue));
1310 fprintf_unfiltered (file,
1311 "gdbarch_dump: skip_solib_resolver = <%s>\n",
1312 host_address_to_string (gdbarch->skip_solib_resolver));
1313 fprintf_unfiltered (file,
1314 "gdbarch_dump: skip_trampoline_code = <%s>\n",
1315 host_address_to_string (gdbarch->skip_trampoline_code));
1316 fprintf_unfiltered (file,
1317 "gdbarch_dump: gdbarch_software_single_step_p() = %d\n",
1318 gdbarch_software_single_step_p (gdbarch));
1319 fprintf_unfiltered (file,
1320 "gdbarch_dump: software_single_step = <%s>\n",
1321 host_address_to_string (gdbarch->software_single_step));
1322 fprintf_unfiltered (file,
1323 "gdbarch_dump: sofun_address_maybe_missing = %s\n",
1324 plongest (gdbarch->sofun_address_maybe_missing));
1325 fprintf_unfiltered (file,
1326 "gdbarch_dump: solib_symbols_extension = %s\n",
1327 pstring (gdbarch->solib_symbols_extension));
1328 fprintf_unfiltered (file,
1329 "gdbarch_dump: sp_regnum = %s\n",
1330 plongest (gdbarch->sp_regnum));
1331 fprintf_unfiltered (file,
1332 "gdbarch_dump: stab_reg_to_regnum = <%s>\n",
1333 host_address_to_string (gdbarch->stab_reg_to_regnum));
1334 fprintf_unfiltered (file,
1335 "gdbarch_dump: stabs_argument_has_addr = <%s>\n",
1336 host_address_to_string (gdbarch->stabs_argument_has_addr));
1337 fprintf_unfiltered (file,
1338 "gdbarch_dump: stack_frame_destroyed_p = <%s>\n",
1339 host_address_to_string (gdbarch->stack_frame_destroyed_p));
1340 fprintf_unfiltered (file,
1341 "gdbarch_dump: stap_gdb_register_prefix = %s\n",
1342 pstring (gdbarch->stap_gdb_register_prefix));
1343 fprintf_unfiltered (file,
1344 "gdbarch_dump: stap_gdb_register_suffix = %s\n",
1345 pstring (gdbarch->stap_gdb_register_suffix));
1346 fprintf_unfiltered (file,
1347 "gdbarch_dump: stap_integer_prefixes = %s\n",
1348 pstring_list (gdbarch->stap_integer_prefixes));
1349 fprintf_unfiltered (file,
1350 "gdbarch_dump: stap_integer_suffixes = %s\n",
1351 pstring_list (gdbarch->stap_integer_suffixes));
1352 fprintf_unfiltered (file,
1353 "gdbarch_dump: gdbarch_stap_is_single_operand_p() = %d\n",
1354 gdbarch_stap_is_single_operand_p (gdbarch));
1355 fprintf_unfiltered (file,
1356 "gdbarch_dump: stap_is_single_operand = <%s>\n",
1357 host_address_to_string (gdbarch->stap_is_single_operand));
1358 fprintf_unfiltered (file,
1359 "gdbarch_dump: gdbarch_stap_parse_special_token_p() = %d\n",
1360 gdbarch_stap_parse_special_token_p (gdbarch));
1361 fprintf_unfiltered (file,
1362 "gdbarch_dump: stap_parse_special_token = <%s>\n",
1363 host_address_to_string (gdbarch->stap_parse_special_token));
1364 fprintf_unfiltered (file,
1365 "gdbarch_dump: stap_register_indirection_prefixes = %s\n",
1366 pstring_list (gdbarch->stap_register_indirection_prefixes));
1367 fprintf_unfiltered (file,
1368 "gdbarch_dump: stap_register_indirection_suffixes = %s\n",
1369 pstring_list (gdbarch->stap_register_indirection_suffixes));
1370 fprintf_unfiltered (file,
1371 "gdbarch_dump: stap_register_prefixes = %s\n",
1372 pstring_list (gdbarch->stap_register_prefixes));
1373 fprintf_unfiltered (file,
1374 "gdbarch_dump: stap_register_suffixes = %s\n",
1375 pstring_list (gdbarch->stap_register_suffixes));
1376 fprintf_unfiltered (file,
1377 "gdbarch_dump: gdbarch_static_transform_name_p() = %d\n",
1378 gdbarch_static_transform_name_p (gdbarch));
1379 fprintf_unfiltered (file,
1380 "gdbarch_dump: static_transform_name = <%s>\n",
1381 host_address_to_string (gdbarch->static_transform_name));
1382 fprintf_unfiltered (file,
1383 "gdbarch_dump: syscalls_info = %s\n",
1384 host_address_to_string (gdbarch->syscalls_info));
1385 fprintf_unfiltered (file,
1386 "gdbarch_dump: target_desc = %s\n",
1387 host_address_to_string (gdbarch->target_desc));
1388 fprintf_unfiltered (file,
1389 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
1390 gdbarch_unwind_pc_p (gdbarch));
1391 fprintf_unfiltered (file,
1392 "gdbarch_dump: unwind_pc = <%s>\n",
1393 host_address_to_string (gdbarch->unwind_pc));
1394 fprintf_unfiltered (file,
1395 "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
1396 gdbarch_unwind_sp_p (gdbarch));
1397 fprintf_unfiltered (file,
1398 "gdbarch_dump: unwind_sp = <%s>\n",
1399 host_address_to_string (gdbarch->unwind_sp));
1400 fprintf_unfiltered (file,
1401 "gdbarch_dump: value_from_register = <%s>\n",
1402 host_address_to_string (gdbarch->value_from_register));
1403 fprintf_unfiltered (file,
1404 "gdbarch_dump: value_to_register = <%s>\n",
1405 host_address_to_string (gdbarch->value_to_register));
1406 fprintf_unfiltered (file,
1407 "gdbarch_dump: vbit_in_delta = %s\n",
1408 plongest (gdbarch->vbit_in_delta));
1409 fprintf_unfiltered (file,
1410 "gdbarch_dump: virtual_frame_pointer = <%s>\n",
1411 host_address_to_string (gdbarch->virtual_frame_pointer));
1412 fprintf_unfiltered (file,
1413 "gdbarch_dump: vsyscall_range = <%s>\n",
1414 host_address_to_string (gdbarch->vsyscall_range));
1415 fprintf_unfiltered (file,
1416 "gdbarch_dump: vtable_function_descriptors = %s\n",
1417 plongest (gdbarch->vtable_function_descriptors));
1418 fprintf_unfiltered (file,
1419 "gdbarch_dump: gdbarch_write_pc_p() = %d\n",
1420 gdbarch_write_pc_p (gdbarch));
1421 fprintf_unfiltered (file,
1422 "gdbarch_dump: write_pc = <%s>\n",
1423 host_address_to_string (gdbarch->write_pc));
1424 fprintf_unfiltered (file,
1425 "gdbarch_dump: xml_syscall_file = %s\n",
1426 pstring (gdbarch->xml_syscall_file));
1427 if (gdbarch->dump_tdep != NULL)
1428 gdbarch->dump_tdep (gdbarch, file);
1431 struct gdbarch_tdep *
1432 gdbarch_tdep (struct gdbarch *gdbarch)
1434 if (gdbarch_debug >= 2)
1435 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
1436 return gdbarch->tdep;
1440 const struct bfd_arch_info *
1441 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
1443 gdb_assert (gdbarch != NULL);
1444 if (gdbarch_debug >= 2)
1445 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
1446 return gdbarch->bfd_arch_info;
1450 gdbarch_byte_order (struct gdbarch *gdbarch)
1452 gdb_assert (gdbarch != NULL);
1453 if (gdbarch_debug >= 2)
1454 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
1455 return gdbarch->byte_order;
1459 gdbarch_byte_order_for_code (struct gdbarch *gdbarch)
1461 gdb_assert (gdbarch != NULL);
1462 if (gdbarch_debug >= 2)
1463 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order_for_code called\n");
1464 return gdbarch->byte_order_for_code;
1468 gdbarch_osabi (struct gdbarch *gdbarch)
1470 gdb_assert (gdbarch != NULL);
1471 if (gdbarch_debug >= 2)
1472 fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n");
1473 return gdbarch->osabi;
1476 const struct target_desc *
1477 gdbarch_target_desc (struct gdbarch *gdbarch)
1479 gdb_assert (gdbarch != NULL);
1480 if (gdbarch_debug >= 2)
1481 fprintf_unfiltered (gdb_stdlog, "gdbarch_target_desc called\n");
1482 return gdbarch->target_desc;
1486 gdbarch_bits_big_endian (struct gdbarch *gdbarch)
1488 gdb_assert (gdbarch != NULL);
1489 /* Skip verify of bits_big_endian, invalid_p == 0 */
1490 if (gdbarch_debug >= 2)
1491 fprintf_unfiltered (gdb_stdlog, "gdbarch_bits_big_endian called\n");
1492 return gdbarch->bits_big_endian;
1496 set_gdbarch_bits_big_endian (struct gdbarch *gdbarch,
1497 int bits_big_endian)
1499 gdbarch->bits_big_endian = bits_big_endian;
1503 gdbarch_short_bit (struct gdbarch *gdbarch)
1505 gdb_assert (gdbarch != NULL);
1506 /* Skip verify of short_bit, invalid_p == 0 */
1507 if (gdbarch_debug >= 2)
1508 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
1509 return gdbarch->short_bit;
1513 set_gdbarch_short_bit (struct gdbarch *gdbarch,
1516 gdbarch->short_bit = short_bit;
1520 gdbarch_int_bit (struct gdbarch *gdbarch)
1522 gdb_assert (gdbarch != NULL);
1523 /* Skip verify of int_bit, invalid_p == 0 */
1524 if (gdbarch_debug >= 2)
1525 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
1526 return gdbarch->int_bit;
1530 set_gdbarch_int_bit (struct gdbarch *gdbarch,
1533 gdbarch->int_bit = int_bit;
1537 gdbarch_long_bit (struct gdbarch *gdbarch)
1539 gdb_assert (gdbarch != NULL);
1540 /* Skip verify of long_bit, invalid_p == 0 */
1541 if (gdbarch_debug >= 2)
1542 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
1543 return gdbarch->long_bit;
1547 set_gdbarch_long_bit (struct gdbarch *gdbarch,
1550 gdbarch->long_bit = long_bit;
1554 gdbarch_long_long_bit (struct gdbarch *gdbarch)
1556 gdb_assert (gdbarch != NULL);
1557 /* Skip verify of long_long_bit, invalid_p == 0 */
1558 if (gdbarch_debug >= 2)
1559 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
1560 return gdbarch->long_long_bit;
1564 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
1567 gdbarch->long_long_bit = long_long_bit;
1571 gdbarch_long_long_align_bit (struct gdbarch *gdbarch)
1573 gdb_assert (gdbarch != NULL);
1574 /* Skip verify of long_long_align_bit, invalid_p == 0 */
1575 if (gdbarch_debug >= 2)
1576 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_align_bit called\n");
1577 return gdbarch->long_long_align_bit;
1581 set_gdbarch_long_long_align_bit (struct gdbarch *gdbarch,
1582 int long_long_align_bit)
1584 gdbarch->long_long_align_bit = long_long_align_bit;
1588 gdbarch_half_bit (struct gdbarch *gdbarch)
1590 gdb_assert (gdbarch != NULL);
1591 /* Skip verify of half_bit, invalid_p == 0 */
1592 if (gdbarch_debug >= 2)
1593 fprintf_unfiltered (gdb_stdlog, "gdbarch_half_bit called\n");
1594 return gdbarch->half_bit;
1598 set_gdbarch_half_bit (struct gdbarch *gdbarch,
1601 gdbarch->half_bit = half_bit;
1604 const struct floatformat **
1605 gdbarch_half_format (struct gdbarch *gdbarch)
1607 gdb_assert (gdbarch != NULL);
1608 if (gdbarch_debug >= 2)
1609 fprintf_unfiltered (gdb_stdlog, "gdbarch_half_format called\n");
1610 return gdbarch->half_format;
1614 set_gdbarch_half_format (struct gdbarch *gdbarch,
1615 const struct floatformat ** half_format)
1617 gdbarch->half_format = half_format;
1621 gdbarch_float_bit (struct gdbarch *gdbarch)
1623 gdb_assert (gdbarch != NULL);
1624 /* Skip verify of float_bit, invalid_p == 0 */
1625 if (gdbarch_debug >= 2)
1626 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
1627 return gdbarch->float_bit;
1631 set_gdbarch_float_bit (struct gdbarch *gdbarch,
1634 gdbarch->float_bit = float_bit;
1637 const struct floatformat **
1638 gdbarch_float_format (struct gdbarch *gdbarch)
1640 gdb_assert (gdbarch != NULL);
1641 if (gdbarch_debug >= 2)
1642 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
1643 return gdbarch->float_format;
1647 set_gdbarch_float_format (struct gdbarch *gdbarch,
1648 const struct floatformat ** float_format)
1650 gdbarch->float_format = float_format;
1654 gdbarch_double_bit (struct gdbarch *gdbarch)
1656 gdb_assert (gdbarch != NULL);
1657 /* Skip verify of double_bit, invalid_p == 0 */
1658 if (gdbarch_debug >= 2)
1659 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
1660 return gdbarch->double_bit;
1664 set_gdbarch_double_bit (struct gdbarch *gdbarch,
1667 gdbarch->double_bit = double_bit;
1670 const struct floatformat **
1671 gdbarch_double_format (struct gdbarch *gdbarch)
1673 gdb_assert (gdbarch != NULL);
1674 if (gdbarch_debug >= 2)
1675 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
1676 return gdbarch->double_format;
1680 set_gdbarch_double_format (struct gdbarch *gdbarch,
1681 const struct floatformat ** double_format)
1683 gdbarch->double_format = double_format;
1687 gdbarch_long_double_bit (struct gdbarch *gdbarch)
1689 gdb_assert (gdbarch != NULL);
1690 /* Skip verify of long_double_bit, invalid_p == 0 */
1691 if (gdbarch_debug >= 2)
1692 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
1693 return gdbarch->long_double_bit;
1697 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
1698 int long_double_bit)
1700 gdbarch->long_double_bit = long_double_bit;
1703 const struct floatformat **
1704 gdbarch_long_double_format (struct gdbarch *gdbarch)
1706 gdb_assert (gdbarch != NULL);
1707 if (gdbarch_debug >= 2)
1708 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
1709 return gdbarch->long_double_format;
1713 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
1714 const struct floatformat ** long_double_format)
1716 gdbarch->long_double_format = long_double_format;
1720 gdbarch_ptr_bit (struct gdbarch *gdbarch)
1722 gdb_assert (gdbarch != NULL);
1723 /* Skip verify of ptr_bit, invalid_p == 0 */
1724 if (gdbarch_debug >= 2)
1725 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
1726 return gdbarch->ptr_bit;
1730 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
1733 gdbarch->ptr_bit = ptr_bit;
1737 gdbarch_addr_bit (struct gdbarch *gdbarch)
1739 gdb_assert (gdbarch != NULL);
1740 /* Check variable changed from pre-default. */
1741 gdb_assert (gdbarch->addr_bit != 0);
1742 if (gdbarch_debug >= 2)
1743 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
1744 return gdbarch->addr_bit;
1748 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
1751 gdbarch->addr_bit = addr_bit;
1755 gdbarch_dwarf2_addr_size (struct gdbarch *gdbarch)
1757 gdb_assert (gdbarch != NULL);
1758 /* Check variable changed from pre-default. */
1759 gdb_assert (gdbarch->dwarf2_addr_size != 0);
1760 if (gdbarch_debug >= 2)
1761 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_addr_size called\n");
1762 return gdbarch->dwarf2_addr_size;
1766 set_gdbarch_dwarf2_addr_size (struct gdbarch *gdbarch,
1767 int dwarf2_addr_size)
1769 gdbarch->dwarf2_addr_size = dwarf2_addr_size;
1773 gdbarch_char_signed (struct gdbarch *gdbarch)
1775 gdb_assert (gdbarch != NULL);
1776 /* Check variable changed from pre-default. */
1777 gdb_assert (gdbarch->char_signed != -1);
1778 if (gdbarch_debug >= 2)
1779 fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
1780 return gdbarch->char_signed;
1784 set_gdbarch_char_signed (struct gdbarch *gdbarch,
1787 gdbarch->char_signed = char_signed;
1791 gdbarch_read_pc_p (struct gdbarch *gdbarch)
1793 gdb_assert (gdbarch != NULL);
1794 return gdbarch->read_pc != NULL;
1798 gdbarch_read_pc (struct gdbarch *gdbarch, struct regcache *regcache)
1800 gdb_assert (gdbarch != NULL);
1801 gdb_assert (gdbarch->read_pc != NULL);
1802 if (gdbarch_debug >= 2)
1803 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
1804 return gdbarch->read_pc (regcache);
1808 set_gdbarch_read_pc (struct gdbarch *gdbarch,
1809 gdbarch_read_pc_ftype read_pc)
1811 gdbarch->read_pc = read_pc;
1815 gdbarch_write_pc_p (struct gdbarch *gdbarch)
1817 gdb_assert (gdbarch != NULL);
1818 return gdbarch->write_pc != NULL;
1822 gdbarch_write_pc (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR val)
1824 gdb_assert (gdbarch != NULL);
1825 gdb_assert (gdbarch->write_pc != NULL);
1826 if (gdbarch_debug >= 2)
1827 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
1828 gdbarch->write_pc (regcache, val);
1832 set_gdbarch_write_pc (struct gdbarch *gdbarch,
1833 gdbarch_write_pc_ftype write_pc)
1835 gdbarch->write_pc = write_pc;
1839 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
1841 gdb_assert (gdbarch != NULL);
1842 gdb_assert (gdbarch->virtual_frame_pointer != NULL);
1843 if (gdbarch_debug >= 2)
1844 fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
1845 gdbarch->virtual_frame_pointer (gdbarch, pc, frame_regnum, frame_offset);
1849 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
1850 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
1852 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
1856 gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
1858 gdb_assert (gdbarch != NULL);
1859 return gdbarch->pseudo_register_read != NULL;
1862 enum register_status
1863 gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, gdb_byte *buf)
1865 gdb_assert (gdbarch != NULL);
1866 gdb_assert (gdbarch->pseudo_register_read != NULL);
1867 if (gdbarch_debug >= 2)
1868 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
1869 return gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
1873 set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
1874 gdbarch_pseudo_register_read_ftype pseudo_register_read)
1876 gdbarch->pseudo_register_read = pseudo_register_read;
1880 gdbarch_pseudo_register_read_value_p (struct gdbarch *gdbarch)
1882 gdb_assert (gdbarch != NULL);
1883 return gdbarch->pseudo_register_read_value != NULL;
1887 gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum)
1889 gdb_assert (gdbarch != NULL);
1890 gdb_assert (gdbarch->pseudo_register_read_value != NULL);
1891 if (gdbarch_debug >= 2)
1892 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read_value called\n");
1893 return gdbarch->pseudo_register_read_value (gdbarch, regcache, cookednum);
1897 set_gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch,
1898 gdbarch_pseudo_register_read_value_ftype pseudo_register_read_value)
1900 gdbarch->pseudo_register_read_value = pseudo_register_read_value;
1904 gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
1906 gdb_assert (gdbarch != NULL);
1907 return gdbarch->pseudo_register_write != NULL;
1911 gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const gdb_byte *buf)
1913 gdb_assert (gdbarch != NULL);
1914 gdb_assert (gdbarch->pseudo_register_write != NULL);
1915 if (gdbarch_debug >= 2)
1916 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
1917 gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
1921 set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
1922 gdbarch_pseudo_register_write_ftype pseudo_register_write)
1924 gdbarch->pseudo_register_write = pseudo_register_write;
1928 gdbarch_num_regs (struct gdbarch *gdbarch)
1930 gdb_assert (gdbarch != NULL);
1931 /* Check variable changed from pre-default. */
1932 gdb_assert (gdbarch->num_regs != -1);
1933 if (gdbarch_debug >= 2)
1934 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
1935 return gdbarch->num_regs;
1939 set_gdbarch_num_regs (struct gdbarch *gdbarch,
1942 gdbarch->num_regs = num_regs;
1946 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
1948 gdb_assert (gdbarch != NULL);
1949 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
1950 if (gdbarch_debug >= 2)
1951 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
1952 return gdbarch->num_pseudo_regs;
1956 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
1957 int num_pseudo_regs)
1959 gdbarch->num_pseudo_regs = num_pseudo_regs;
1963 gdbarch_ax_pseudo_register_collect_p (struct gdbarch *gdbarch)
1965 gdb_assert (gdbarch != NULL);
1966 return gdbarch->ax_pseudo_register_collect != NULL;
1970 gdbarch_ax_pseudo_register_collect (struct gdbarch *gdbarch, struct agent_expr *ax, int reg)
1972 gdb_assert (gdbarch != NULL);
1973 gdb_assert (gdbarch->ax_pseudo_register_collect != NULL);
1974 if (gdbarch_debug >= 2)
1975 fprintf_unfiltered (gdb_stdlog, "gdbarch_ax_pseudo_register_collect called\n");
1976 return gdbarch->ax_pseudo_register_collect (gdbarch, ax, reg);
1980 set_gdbarch_ax_pseudo_register_collect (struct gdbarch *gdbarch,
1981 gdbarch_ax_pseudo_register_collect_ftype ax_pseudo_register_collect)
1983 gdbarch->ax_pseudo_register_collect = ax_pseudo_register_collect;
1987 gdbarch_ax_pseudo_register_push_stack_p (struct gdbarch *gdbarch)
1989 gdb_assert (gdbarch != NULL);
1990 return gdbarch->ax_pseudo_register_push_stack != NULL;
1994 gdbarch_ax_pseudo_register_push_stack (struct gdbarch *gdbarch, struct agent_expr *ax, int reg)
1996 gdb_assert (gdbarch != NULL);
1997 gdb_assert (gdbarch->ax_pseudo_register_push_stack != NULL);
1998 if (gdbarch_debug >= 2)
1999 fprintf_unfiltered (gdb_stdlog, "gdbarch_ax_pseudo_register_push_stack called\n");
2000 return gdbarch->ax_pseudo_register_push_stack (gdbarch, ax, reg);
2004 set_gdbarch_ax_pseudo_register_push_stack (struct gdbarch *gdbarch,
2005 gdbarch_ax_pseudo_register_push_stack_ftype ax_pseudo_register_push_stack)
2007 gdbarch->ax_pseudo_register_push_stack = ax_pseudo_register_push_stack;
2011 gdbarch_handle_segmentation_fault_p (struct gdbarch *gdbarch)
2013 gdb_assert (gdbarch != NULL);
2014 return gdbarch->handle_segmentation_fault != NULL;
2018 gdbarch_handle_segmentation_fault (struct gdbarch *gdbarch, struct ui_out *uiout)
2020 gdb_assert (gdbarch != NULL);
2021 gdb_assert (gdbarch->handle_segmentation_fault != NULL);
2022 if (gdbarch_debug >= 2)
2023 fprintf_unfiltered (gdb_stdlog, "gdbarch_handle_segmentation_fault called\n");
2024 gdbarch->handle_segmentation_fault (gdbarch, uiout);
2028 set_gdbarch_handle_segmentation_fault (struct gdbarch *gdbarch,
2029 gdbarch_handle_segmentation_fault_ftype handle_segmentation_fault)
2031 gdbarch->handle_segmentation_fault = handle_segmentation_fault;
2035 gdbarch_sp_regnum (struct gdbarch *gdbarch)
2037 gdb_assert (gdbarch != NULL);
2038 /* Skip verify of sp_regnum, invalid_p == 0 */
2039 if (gdbarch_debug >= 2)
2040 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
2041 return gdbarch->sp_regnum;
2045 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
2048 gdbarch->sp_regnum = sp_regnum;
2052 gdbarch_pc_regnum (struct gdbarch *gdbarch)
2054 gdb_assert (gdbarch != NULL);
2055 /* Skip verify of pc_regnum, invalid_p == 0 */
2056 if (gdbarch_debug >= 2)
2057 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
2058 return gdbarch->pc_regnum;
2062 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
2065 gdbarch->pc_regnum = pc_regnum;
2069 gdbarch_ps_regnum (struct gdbarch *gdbarch)
2071 gdb_assert (gdbarch != NULL);
2072 /* Skip verify of ps_regnum, invalid_p == 0 */
2073 if (gdbarch_debug >= 2)
2074 fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
2075 return gdbarch->ps_regnum;
2079 set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
2082 gdbarch->ps_regnum = ps_regnum;
2086 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
2088 gdb_assert (gdbarch != NULL);
2089 /* Skip verify of fp0_regnum, invalid_p == 0 */
2090 if (gdbarch_debug >= 2)
2091 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
2092 return gdbarch->fp0_regnum;
2096 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
2099 gdbarch->fp0_regnum = fp0_regnum;
2103 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
2105 gdb_assert (gdbarch != NULL);
2106 gdb_assert (gdbarch->stab_reg_to_regnum != NULL);
2107 if (gdbarch_debug >= 2)
2108 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
2109 return gdbarch->stab_reg_to_regnum (gdbarch, stab_regnr);
2113 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
2114 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
2116 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
2120 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
2122 gdb_assert (gdbarch != NULL);
2123 gdb_assert (gdbarch->ecoff_reg_to_regnum != NULL);
2124 if (gdbarch_debug >= 2)
2125 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
2126 return gdbarch->ecoff_reg_to_regnum (gdbarch, ecoff_regnr);
2130 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
2131 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
2133 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
2137 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
2139 gdb_assert (gdbarch != NULL);
2140 gdb_assert (gdbarch->sdb_reg_to_regnum != NULL);
2141 if (gdbarch_debug >= 2)
2142 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
2143 return gdbarch->sdb_reg_to_regnum (gdbarch, sdb_regnr);
2147 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
2148 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
2150 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
2154 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
2156 gdb_assert (gdbarch != NULL);
2157 gdb_assert (gdbarch->dwarf2_reg_to_regnum != NULL);
2158 if (gdbarch_debug >= 2)
2159 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
2160 return gdbarch->dwarf2_reg_to_regnum (gdbarch, dwarf2_regnr);
2164 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
2165 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
2167 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
2171 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
2173 gdb_assert (gdbarch != NULL);
2174 gdb_assert (gdbarch->register_name != NULL);
2175 if (gdbarch_debug >= 2)
2176 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
2177 return gdbarch->register_name (gdbarch, regnr);
2181 set_gdbarch_register_name (struct gdbarch *gdbarch,
2182 gdbarch_register_name_ftype register_name)
2184 gdbarch->register_name = register_name;
2188 gdbarch_register_type_p (struct gdbarch *gdbarch)
2190 gdb_assert (gdbarch != NULL);
2191 return gdbarch->register_type != NULL;
2195 gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
2197 gdb_assert (gdbarch != NULL);
2198 gdb_assert (gdbarch->register_type != NULL);
2199 if (gdbarch_debug >= 2)
2200 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
2201 return gdbarch->register_type (gdbarch, reg_nr);
2205 set_gdbarch_register_type (struct gdbarch *gdbarch,
2206 gdbarch_register_type_ftype register_type)
2208 gdbarch->register_type = register_type;
2212 gdbarch_dummy_id_p (struct gdbarch *gdbarch)
2214 gdb_assert (gdbarch != NULL);
2215 return gdbarch->dummy_id != NULL;
2219 gdbarch_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
2221 gdb_assert (gdbarch != NULL);
2222 gdb_assert (gdbarch->dummy_id != NULL);
2223 if (gdbarch_debug >= 2)
2224 fprintf_unfiltered (gdb_stdlog, "gdbarch_dummy_id called\n");
2225 return gdbarch->dummy_id (gdbarch, this_frame);
2229 set_gdbarch_dummy_id (struct gdbarch *gdbarch,
2230 gdbarch_dummy_id_ftype dummy_id)
2232 gdbarch->dummy_id = dummy_id;
2236 gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch)
2238 gdb_assert (gdbarch != NULL);
2239 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
2240 if (gdbarch_debug >= 2)
2241 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n");
2242 return gdbarch->deprecated_fp_regnum;
2246 set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch,
2247 int deprecated_fp_regnum)
2249 gdbarch->deprecated_fp_regnum = deprecated_fp_regnum;
2253 gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
2255 gdb_assert (gdbarch != NULL);
2256 return gdbarch->push_dummy_call != NULL;
2260 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, int struct_return, CORE_ADDR struct_addr)
2262 gdb_assert (gdbarch != NULL);
2263 gdb_assert (gdbarch->push_dummy_call != NULL);
2264 if (gdbarch_debug >= 2)
2265 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
2266 return gdbarch->push_dummy_call (gdbarch, function, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr);
2270 set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
2271 gdbarch_push_dummy_call_ftype push_dummy_call)
2273 gdbarch->push_dummy_call = push_dummy_call;
2277 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
2279 gdb_assert (gdbarch != NULL);
2280 /* Skip verify of call_dummy_location, invalid_p == 0 */
2281 if (gdbarch_debug >= 2)
2282 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
2283 return gdbarch->call_dummy_location;
2287 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
2288 int call_dummy_location)
2290 gdbarch->call_dummy_location = call_dummy_location;
2294 gdbarch_push_dummy_code_p (struct gdbarch *gdbarch)
2296 gdb_assert (gdbarch != NULL);
2297 return gdbarch->push_dummy_code != NULL;
2301 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)
2303 gdb_assert (gdbarch != NULL);
2304 gdb_assert (gdbarch->push_dummy_code != NULL);
2305 if (gdbarch_debug >= 2)
2306 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n");
2307 return gdbarch->push_dummy_code (gdbarch, sp, funaddr, args, nargs, value_type, real_pc, bp_addr, regcache);
2311 set_gdbarch_push_dummy_code (struct gdbarch *gdbarch,
2312 gdbarch_push_dummy_code_ftype push_dummy_code)
2314 gdbarch->push_dummy_code = push_dummy_code;
2318 gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
2320 gdb_assert (gdbarch != NULL);
2321 gdb_assert (gdbarch->print_registers_info != NULL);
2322 if (gdbarch_debug >= 2)
2323 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
2324 gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
2328 set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
2329 gdbarch_print_registers_info_ftype print_registers_info)
2331 gdbarch->print_registers_info = print_registers_info;
2335 gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
2337 gdb_assert (gdbarch != NULL);
2338 gdb_assert (gdbarch->print_float_info != NULL);
2339 if (gdbarch_debug >= 2)
2340 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
2341 gdbarch->print_float_info (gdbarch, file, frame, args);
2345 set_gdbarch_print_float_info (struct gdbarch *gdbarch,
2346 gdbarch_print_float_info_ftype print_float_info)
2348 gdbarch->print_float_info = print_float_info;
2352 gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
2354 gdb_assert (gdbarch != NULL);
2355 return gdbarch->print_vector_info != NULL;
2359 gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
2361 gdb_assert (gdbarch != NULL);
2362 gdb_assert (gdbarch->print_vector_info != NULL);
2363 if (gdbarch_debug >= 2)
2364 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
2365 gdbarch->print_vector_info (gdbarch, file, frame, args);
2369 set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
2370 gdbarch_print_vector_info_ftype print_vector_info)
2372 gdbarch->print_vector_info = print_vector_info;
2376 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
2378 gdb_assert (gdbarch != NULL);
2379 gdb_assert (gdbarch->register_sim_regno != NULL);
2380 if (gdbarch_debug >= 2)
2381 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
2382 return gdbarch->register_sim_regno (gdbarch, reg_nr);
2386 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
2387 gdbarch_register_sim_regno_ftype register_sim_regno)
2389 gdbarch->register_sim_regno = register_sim_regno;
2393 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
2395 gdb_assert (gdbarch != NULL);
2396 gdb_assert (gdbarch->cannot_fetch_register != NULL);
2397 if (gdbarch_debug >= 2)
2398 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
2399 return gdbarch->cannot_fetch_register (gdbarch, regnum);
2403 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
2404 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
2406 gdbarch->cannot_fetch_register = cannot_fetch_register;
2410 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
2412 gdb_assert (gdbarch != NULL);
2413 gdb_assert (gdbarch->cannot_store_register != NULL);
2414 if (gdbarch_debug >= 2)
2415 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
2416 return gdbarch->cannot_store_register (gdbarch, regnum);
2420 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
2421 gdbarch_cannot_store_register_ftype cannot_store_register)
2423 gdbarch->cannot_store_register = cannot_store_register;
2427 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
2429 gdb_assert (gdbarch != NULL);
2430 return gdbarch->get_longjmp_target != NULL;
2434 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR *pc)
2436 gdb_assert (gdbarch != NULL);
2437 gdb_assert (gdbarch->get_longjmp_target != NULL);
2438 if (gdbarch_debug >= 2)
2439 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
2440 return gdbarch->get_longjmp_target (frame, pc);
2444 set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
2445 gdbarch_get_longjmp_target_ftype get_longjmp_target)
2447 gdbarch->get_longjmp_target = get_longjmp_target;
2451 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
2453 gdb_assert (gdbarch != NULL);
2454 if (gdbarch_debug >= 2)
2455 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
2456 return gdbarch->believe_pcc_promotion;
2460 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
2461 int believe_pcc_promotion)
2463 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
2467 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
2469 gdb_assert (gdbarch != NULL);
2470 gdb_assert (gdbarch->convert_register_p != NULL);
2471 if (gdbarch_debug >= 2)
2472 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
2473 return gdbarch->convert_register_p (gdbarch, regnum, type);
2477 set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
2478 gdbarch_convert_register_p_ftype convert_register_p)
2480 gdbarch->convert_register_p = convert_register_p;
2484 gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, gdb_byte *buf, int *optimizedp, int *unavailablep)
2486 gdb_assert (gdbarch != NULL);
2487 gdb_assert (gdbarch->register_to_value != NULL);
2488 if (gdbarch_debug >= 2)
2489 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
2490 return gdbarch->register_to_value (frame, regnum, type, buf, optimizedp, unavailablep);
2494 set_gdbarch_register_to_value (struct gdbarch *gdbarch,
2495 gdbarch_register_to_value_ftype register_to_value)
2497 gdbarch->register_to_value = register_to_value;
2501 gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const gdb_byte *buf)
2503 gdb_assert (gdbarch != NULL);
2504 gdb_assert (gdbarch->value_to_register != NULL);
2505 if (gdbarch_debug >= 2)
2506 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
2507 gdbarch->value_to_register (frame, regnum, type, buf);
2511 set_gdbarch_value_to_register (struct gdbarch *gdbarch,
2512 gdbarch_value_to_register_ftype value_to_register)
2514 gdbarch->value_to_register = value_to_register;
2518 gdbarch_value_from_register (struct gdbarch *gdbarch, struct type *type, int regnum, struct frame_id frame_id)
2520 gdb_assert (gdbarch != NULL);
2521 gdb_assert (gdbarch->value_from_register != NULL);
2522 if (gdbarch_debug >= 2)
2523 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_from_register called\n");
2524 return gdbarch->value_from_register (gdbarch, type, regnum, frame_id);
2528 set_gdbarch_value_from_register (struct gdbarch *gdbarch,
2529 gdbarch_value_from_register_ftype value_from_register)
2531 gdbarch->value_from_register = value_from_register;
2535 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
2537 gdb_assert (gdbarch != NULL);
2538 gdb_assert (gdbarch->pointer_to_address != NULL);
2539 if (gdbarch_debug >= 2)
2540 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
2541 return gdbarch->pointer_to_address (gdbarch, type, buf);
2545 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
2546 gdbarch_pointer_to_address_ftype pointer_to_address)
2548 gdbarch->pointer_to_address = pointer_to_address;
2552 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, gdb_byte *buf, CORE_ADDR addr)
2554 gdb_assert (gdbarch != NULL);
2555 gdb_assert (gdbarch->address_to_pointer != NULL);
2556 if (gdbarch_debug >= 2)
2557 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
2558 gdbarch->address_to_pointer (gdbarch, type, buf, addr);
2562 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
2563 gdbarch_address_to_pointer_ftype address_to_pointer)
2565 gdbarch->address_to_pointer = address_to_pointer;
2569 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
2571 gdb_assert (gdbarch != NULL);
2572 return gdbarch->integer_to_address != NULL;
2576 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
2578 gdb_assert (gdbarch != NULL);
2579 gdb_assert (gdbarch->integer_to_address != NULL);
2580 if (gdbarch_debug >= 2)
2581 fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
2582 return gdbarch->integer_to_address (gdbarch, type, buf);
2586 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
2587 gdbarch_integer_to_address_ftype integer_to_address)
2589 gdbarch->integer_to_address = integer_to_address;
2593 gdbarch_return_value_p (struct gdbarch *gdbarch)
2595 gdb_assert (gdbarch != NULL);
2596 return gdbarch->return_value != NULL;
2599 enum return_value_convention
2600 gdbarch_return_value (struct gdbarch *gdbarch, struct value *function, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
2602 gdb_assert (gdbarch != NULL);
2603 gdb_assert (gdbarch->return_value != NULL);
2604 if (gdbarch_debug >= 2)
2605 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value called\n");
2606 return gdbarch->return_value (gdbarch, function, valtype, regcache, readbuf, writebuf);
2610 set_gdbarch_return_value (struct gdbarch *gdbarch,
2611 gdbarch_return_value_ftype return_value)
2613 gdbarch->return_value = return_value;
2617 gdbarch_return_in_first_hidden_param_p (struct gdbarch *gdbarch, struct type *type)
2619 gdb_assert (gdbarch != NULL);
2620 gdb_assert (gdbarch->return_in_first_hidden_param_p != NULL);
2621 if (gdbarch_debug >= 2)
2622 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_in_first_hidden_param_p called\n");
2623 return gdbarch->return_in_first_hidden_param_p (gdbarch, type);
2627 set_gdbarch_return_in_first_hidden_param_p (struct gdbarch *gdbarch,
2628 gdbarch_return_in_first_hidden_param_p_ftype return_in_first_hidden_param_p)
2630 gdbarch->return_in_first_hidden_param_p = return_in_first_hidden_param_p;
2634 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
2636 gdb_assert (gdbarch != NULL);
2637 gdb_assert (gdbarch->skip_prologue != NULL);
2638 if (gdbarch_debug >= 2)
2639 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
2640 return gdbarch->skip_prologue (gdbarch, ip);
2644 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
2645 gdbarch_skip_prologue_ftype skip_prologue)
2647 gdbarch->skip_prologue = skip_prologue;
2651 gdbarch_skip_main_prologue_p (struct gdbarch *gdbarch)
2653 gdb_assert (gdbarch != NULL);
2654 return gdbarch->skip_main_prologue != NULL;
2658 gdbarch_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
2660 gdb_assert (gdbarch != NULL);
2661 gdb_assert (gdbarch->skip_main_prologue != NULL);
2662 if (gdbarch_debug >= 2)
2663 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_main_prologue called\n");
2664 return gdbarch->skip_main_prologue (gdbarch, ip);
2668 set_gdbarch_skip_main_prologue (struct gdbarch *gdbarch,
2669 gdbarch_skip_main_prologue_ftype skip_main_prologue)
2671 gdbarch->skip_main_prologue = skip_main_prologue;
2675 gdbarch_skip_entrypoint_p (struct gdbarch *gdbarch)
2677 gdb_assert (gdbarch != NULL);
2678 return gdbarch->skip_entrypoint != NULL;
2682 gdbarch_skip_entrypoint (struct gdbarch *gdbarch, CORE_ADDR ip)
2684 gdb_assert (gdbarch != NULL);
2685 gdb_assert (gdbarch->skip_entrypoint != NULL);
2686 if (gdbarch_debug >= 2)
2687 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_entrypoint called\n");
2688 return gdbarch->skip_entrypoint (gdbarch, ip);
2692 set_gdbarch_skip_entrypoint (struct gdbarch *gdbarch,
2693 gdbarch_skip_entrypoint_ftype skip_entrypoint)
2695 gdbarch->skip_entrypoint = skip_entrypoint;
2699 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
2701 gdb_assert (gdbarch != NULL);
2702 gdb_assert (gdbarch->inner_than != NULL);
2703 if (gdbarch_debug >= 2)
2704 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
2705 return gdbarch->inner_than (lhs, rhs);
2709 set_gdbarch_inner_than (struct gdbarch *gdbarch,
2710 gdbarch_inner_than_ftype inner_than)
2712 gdbarch->inner_than = inner_than;
2716 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
2718 gdb_assert (gdbarch != NULL);
2719 gdb_assert (gdbarch->breakpoint_from_pc != NULL);
2720 if (gdbarch_debug >= 2)
2721 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
2722 return gdbarch->breakpoint_from_pc (gdbarch, pcptr, lenptr);
2726 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
2727 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
2729 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
2733 gdbarch_remote_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *kindptr)
2735 gdb_assert (gdbarch != NULL);
2736 gdb_assert (gdbarch->remote_breakpoint_from_pc != NULL);
2737 if (gdbarch_debug >= 2)
2738 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_breakpoint_from_pc called\n");
2739 gdbarch->remote_breakpoint_from_pc (gdbarch, pcptr, kindptr);
2743 set_gdbarch_remote_breakpoint_from_pc (struct gdbarch *gdbarch,
2744 gdbarch_remote_breakpoint_from_pc_ftype remote_breakpoint_from_pc)
2746 gdbarch->remote_breakpoint_from_pc = remote_breakpoint_from_pc;
2750 gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch)
2752 gdb_assert (gdbarch != NULL);
2753 return gdbarch->adjust_breakpoint_address != NULL;
2757 gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr)
2759 gdb_assert (gdbarch != NULL);
2760 gdb_assert (gdbarch->adjust_breakpoint_address != NULL);
2761 if (gdbarch_debug >= 2)
2762 fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_breakpoint_address called\n");
2763 return gdbarch->adjust_breakpoint_address (gdbarch, bpaddr);
2767 set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch,
2768 gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address)
2770 gdbarch->adjust_breakpoint_address = adjust_breakpoint_address;
2774 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
2776 gdb_assert (gdbarch != NULL);
2777 gdb_assert (gdbarch->memory_insert_breakpoint != NULL);
2778 if (gdbarch_debug >= 2)
2779 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
2780 return gdbarch->memory_insert_breakpoint (gdbarch, bp_tgt);
2784 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
2785 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
2787 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
2791 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
2793 gdb_assert (gdbarch != NULL);
2794 gdb_assert (gdbarch->memory_remove_breakpoint != NULL);
2795 if (gdbarch_debug >= 2)
2796 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
2797 return gdbarch->memory_remove_breakpoint (gdbarch, bp_tgt);
2801 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
2802 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
2804 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
2808 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
2810 gdb_assert (gdbarch != NULL);
2811 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
2812 if (gdbarch_debug >= 2)
2813 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
2814 return gdbarch->decr_pc_after_break;
2818 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
2819 CORE_ADDR decr_pc_after_break)
2821 gdbarch->decr_pc_after_break = decr_pc_after_break;
2825 gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch)
2827 gdb_assert (gdbarch != NULL);
2828 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
2829 if (gdbarch_debug >= 2)
2830 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_function_start_offset called\n");
2831 return gdbarch->deprecated_function_start_offset;
2835 set_gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch,
2836 CORE_ADDR deprecated_function_start_offset)
2838 gdbarch->deprecated_function_start_offset = deprecated_function_start_offset;
2842 gdbarch_remote_register_number (struct gdbarch *gdbarch, int regno)
2844 gdb_assert (gdbarch != NULL);
2845 gdb_assert (gdbarch->remote_register_number != NULL);
2846 if (gdbarch_debug >= 2)
2847 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_register_number called\n");
2848 return gdbarch->remote_register_number (gdbarch, regno);
2852 set_gdbarch_remote_register_number (struct gdbarch *gdbarch,
2853 gdbarch_remote_register_number_ftype remote_register_number)
2855 gdbarch->remote_register_number = remote_register_number;
2859 gdbarch_fetch_tls_load_module_address_p (struct gdbarch *gdbarch)
2861 gdb_assert (gdbarch != NULL);
2862 return gdbarch->fetch_tls_load_module_address != NULL;
2866 gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch, struct objfile *objfile)
2868 gdb_assert (gdbarch != NULL);
2869 gdb_assert (gdbarch->fetch_tls_load_module_address != NULL);
2870 if (gdbarch_debug >= 2)
2871 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_tls_load_module_address called\n");
2872 return gdbarch->fetch_tls_load_module_address (objfile);
2876 set_gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch,
2877 gdbarch_fetch_tls_load_module_address_ftype fetch_tls_load_module_address)
2879 gdbarch->fetch_tls_load_module_address = fetch_tls_load_module_address;
2883 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
2885 gdb_assert (gdbarch != NULL);
2886 /* Skip verify of frame_args_skip, invalid_p == 0 */
2887 if (gdbarch_debug >= 2)
2888 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
2889 return gdbarch->frame_args_skip;
2893 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
2894 CORE_ADDR frame_args_skip)
2896 gdbarch->frame_args_skip = frame_args_skip;
2900 gdbarch_unwind_pc_p (struct gdbarch *gdbarch)
2902 gdb_assert (gdbarch != NULL);
2903 return gdbarch->unwind_pc != NULL;
2907 gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
2909 gdb_assert (gdbarch != NULL);
2910 gdb_assert (gdbarch->unwind_pc != NULL);
2911 if (gdbarch_debug >= 2)
2912 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n");
2913 return gdbarch->unwind_pc (gdbarch, next_frame);
2917 set_gdbarch_unwind_pc (struct gdbarch *gdbarch,
2918 gdbarch_unwind_pc_ftype unwind_pc)
2920 gdbarch->unwind_pc = unwind_pc;
2924 gdbarch_unwind_sp_p (struct gdbarch *gdbarch)
2926 gdb_assert (gdbarch != NULL);
2927 return gdbarch->unwind_sp != NULL;
2931 gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
2933 gdb_assert (gdbarch != NULL);
2934 gdb_assert (gdbarch->unwind_sp != NULL);
2935 if (gdbarch_debug >= 2)
2936 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_sp called\n");
2937 return gdbarch->unwind_sp (gdbarch, next_frame);
2941 set_gdbarch_unwind_sp (struct gdbarch *gdbarch,
2942 gdbarch_unwind_sp_ftype unwind_sp)
2944 gdbarch->unwind_sp = unwind_sp;
2948 gdbarch_frame_num_args_p (struct gdbarch *gdbarch)
2950 gdb_assert (gdbarch != NULL);
2951 return gdbarch->frame_num_args != NULL;
2955 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
2957 gdb_assert (gdbarch != NULL);
2958 gdb_assert (gdbarch->frame_num_args != NULL);
2959 if (gdbarch_debug >= 2)
2960 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
2961 return gdbarch->frame_num_args (frame);
2965 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
2966 gdbarch_frame_num_args_ftype frame_num_args)
2968 gdbarch->frame_num_args = frame_num_args;
2972 gdbarch_frame_align_p (struct gdbarch *gdbarch)
2974 gdb_assert (gdbarch != NULL);
2975 return gdbarch->frame_align != NULL;
2979 gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
2981 gdb_assert (gdbarch != NULL);
2982 gdb_assert (gdbarch->frame_align != NULL);
2983 if (gdbarch_debug >= 2)
2984 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
2985 return gdbarch->frame_align (gdbarch, address);
2989 set_gdbarch_frame_align (struct gdbarch *gdbarch,
2990 gdbarch_frame_align_ftype frame_align)
2992 gdbarch->frame_align = frame_align;
2996 gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type)
2998 gdb_assert (gdbarch != NULL);
2999 gdb_assert (gdbarch->stabs_argument_has_addr != NULL);
3000 if (gdbarch_debug >= 2)
3001 fprintf_unfiltered (gdb_stdlog, "gdbarch_stabs_argument_has_addr called\n");
3002 return gdbarch->stabs_argument_has_addr (gdbarch, type);
3006 set_gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch,
3007 gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr)
3009 gdbarch->stabs_argument_has_addr = stabs_argument_has_addr;
3013 gdbarch_frame_red_zone_size (struct gdbarch *gdbarch)
3015 gdb_assert (gdbarch != NULL);
3016 if (gdbarch_debug >= 2)
3017 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_red_zone_size called\n");
3018 return gdbarch->frame_red_zone_size;
3022 set_gdbarch_frame_red_zone_size (struct gdbarch *gdbarch,
3023 int frame_red_zone_size)
3025 gdbarch->frame_red_zone_size = frame_red_zone_size;
3029 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
3031 gdb_assert (gdbarch != NULL);
3032 gdb_assert (gdbarch->convert_from_func_ptr_addr != NULL);
3033 if (gdbarch_debug >= 2)
3034 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
3035 return gdbarch->convert_from_func_ptr_addr (gdbarch, addr, targ);
3039 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
3040 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
3042 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
3046 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
3048 gdb_assert (gdbarch != NULL);
3049 gdb_assert (gdbarch->addr_bits_remove != NULL);
3050 if (gdbarch_debug >= 2)
3051 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
3052 return gdbarch->addr_bits_remove (gdbarch, addr);
3056 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
3057 gdbarch_addr_bits_remove_ftype addr_bits_remove)
3059 gdbarch->addr_bits_remove = addr_bits_remove;
3063 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
3065 gdb_assert (gdbarch != NULL);
3066 return gdbarch->software_single_step != NULL;
3070 gdbarch_software_single_step (struct gdbarch *gdbarch, struct frame_info *frame)
3072 gdb_assert (gdbarch != NULL);
3073 gdb_assert (gdbarch->software_single_step != NULL);
3074 if (gdbarch_debug >= 2)
3075 fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
3076 return gdbarch->software_single_step (frame);
3080 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
3081 gdbarch_software_single_step_ftype software_single_step)
3083 gdbarch->software_single_step = software_single_step;
3087 gdbarch_single_step_through_delay_p (struct gdbarch *gdbarch)
3089 gdb_assert (gdbarch != NULL);
3090 return gdbarch->single_step_through_delay != NULL;
3094 gdbarch_single_step_through_delay (struct gdbarch *gdbarch, struct frame_info *frame)
3096 gdb_assert (gdbarch != NULL);
3097 gdb_assert (gdbarch->single_step_through_delay != NULL);
3098 if (gdbarch_debug >= 2)
3099 fprintf_unfiltered (gdb_stdlog, "gdbarch_single_step_through_delay called\n");
3100 return gdbarch->single_step_through_delay (gdbarch, frame);
3104 set_gdbarch_single_step_through_delay (struct gdbarch *gdbarch,
3105 gdbarch_single_step_through_delay_ftype single_step_through_delay)
3107 gdbarch->single_step_through_delay = single_step_through_delay;
3111 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info)
3113 gdb_assert (gdbarch != NULL);
3114 gdb_assert (gdbarch->print_insn != NULL);
3115 if (gdbarch_debug >= 2)
3116 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
3117 return gdbarch->print_insn (vma, info);
3121 set_gdbarch_print_insn (struct gdbarch *gdbarch,
3122 gdbarch_print_insn_ftype print_insn)
3124 gdbarch->print_insn = print_insn;
3128 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR pc)
3130 gdb_assert (gdbarch != NULL);
3131 gdb_assert (gdbarch->skip_trampoline_code != NULL);
3132 if (gdbarch_debug >= 2)
3133 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
3134 return gdbarch->skip_trampoline_code (frame, pc);
3138 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
3139 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
3141 gdbarch->skip_trampoline_code = skip_trampoline_code;
3145 gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
3147 gdb_assert (gdbarch != NULL);
3148 gdb_assert (gdbarch->skip_solib_resolver != NULL);
3149 if (gdbarch_debug >= 2)
3150 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_solib_resolver called\n");
3151 return gdbarch->skip_solib_resolver (gdbarch, pc);
3155 set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch,
3156 gdbarch_skip_solib_resolver_ftype skip_solib_resolver)
3158 gdbarch->skip_solib_resolver = skip_solib_resolver;
3162 gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, const char *name)
3164 gdb_assert (gdbarch != NULL);
3165 gdb_assert (gdbarch->in_solib_return_trampoline != NULL);
3166 if (gdbarch_debug >= 2)
3167 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
3168 return gdbarch->in_solib_return_trampoline (gdbarch, pc, name);
3172 set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
3173 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
3175 gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
3179 gdbarch_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR addr)
3181 gdb_assert (gdbarch != NULL);
3182 gdb_assert (gdbarch->stack_frame_destroyed_p != NULL);
3183 if (gdbarch_debug >= 2)
3184 fprintf_unfiltered (gdb_stdlog, "gdbarch_stack_frame_destroyed_p called\n");
3185 return gdbarch->stack_frame_destroyed_p (gdbarch, addr);
3189 set_gdbarch_stack_frame_destroyed_p (struct gdbarch *gdbarch,
3190 gdbarch_stack_frame_destroyed_p_ftype stack_frame_destroyed_p)
3192 gdbarch->stack_frame_destroyed_p = stack_frame_destroyed_p;
3196 gdbarch_elf_make_msymbol_special_p (struct gdbarch *gdbarch)
3198 gdb_assert (gdbarch != NULL);
3199 return gdbarch->elf_make_msymbol_special != NULL;
3203 gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
3205 gdb_assert (gdbarch != NULL);
3206 gdb_assert (gdbarch->elf_make_msymbol_special != NULL);
3207 if (gdbarch_debug >= 2)
3208 fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
3209 gdbarch->elf_make_msymbol_special (sym, msym);
3213 set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
3214 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
3216 gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
3220 gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
3222 gdb_assert (gdbarch != NULL);
3223 gdb_assert (gdbarch->coff_make_msymbol_special != NULL);
3224 if (gdbarch_debug >= 2)
3225 fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
3226 gdbarch->coff_make_msymbol_special (val, msym);
3230 set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
3231 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
3233 gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
3237 gdbarch_make_symbol_special (struct gdbarch *gdbarch, struct symbol *sym, struct objfile *objfile)
3239 gdb_assert (gdbarch != NULL);
3240 gdb_assert (gdbarch->make_symbol_special != NULL);
3241 if (gdbarch_debug >= 2)
3242 fprintf_unfiltered (gdb_stdlog, "gdbarch_make_symbol_special called\n");
3243 gdbarch->make_symbol_special (sym, objfile);
3247 set_gdbarch_make_symbol_special (struct gdbarch *gdbarch,
3248 gdbarch_make_symbol_special_ftype make_symbol_special)
3250 gdbarch->make_symbol_special = make_symbol_special;
3254 gdbarch_adjust_dwarf2_addr (struct gdbarch *gdbarch, CORE_ADDR pc)
3256 gdb_assert (gdbarch != NULL);
3257 gdb_assert (gdbarch->adjust_dwarf2_addr != NULL);
3258 if (gdbarch_debug >= 2)
3259 fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_dwarf2_addr called\n");
3260 return gdbarch->adjust_dwarf2_addr (pc);
3264 set_gdbarch_adjust_dwarf2_addr (struct gdbarch *gdbarch,
3265 gdbarch_adjust_dwarf2_addr_ftype adjust_dwarf2_addr)
3267 gdbarch->adjust_dwarf2_addr = adjust_dwarf2_addr;
3271 gdbarch_adjust_dwarf2_line (struct gdbarch *gdbarch, CORE_ADDR addr, int rel)
3273 gdb_assert (gdbarch != NULL);
3274 gdb_assert (gdbarch->adjust_dwarf2_line != NULL);
3275 if (gdbarch_debug >= 2)
3276 fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_dwarf2_line called\n");
3277 return gdbarch->adjust_dwarf2_line (addr, rel);
3281 set_gdbarch_adjust_dwarf2_line (struct gdbarch *gdbarch,
3282 gdbarch_adjust_dwarf2_line_ftype adjust_dwarf2_line)
3284 gdbarch->adjust_dwarf2_line = adjust_dwarf2_line;
3288 gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
3290 gdb_assert (gdbarch != NULL);
3291 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
3292 if (gdbarch_debug >= 2)
3293 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
3294 return gdbarch->cannot_step_breakpoint;
3298 set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
3299 int cannot_step_breakpoint)
3301 gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
3305 gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
3307 gdb_assert (gdbarch != NULL);
3308 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
3309 if (gdbarch_debug >= 2)
3310 fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
3311 return gdbarch->have_nonsteppable_watchpoint;
3315 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
3316 int have_nonsteppable_watchpoint)
3318 gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
3322 gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
3324 gdb_assert (gdbarch != NULL);
3325 return gdbarch->address_class_type_flags != NULL;
3329 gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
3331 gdb_assert (gdbarch != NULL);
3332 gdb_assert (gdbarch->address_class_type_flags != NULL);
3333 if (gdbarch_debug >= 2)
3334 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
3335 return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
3339 set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
3340 gdbarch_address_class_type_flags_ftype address_class_type_flags)
3342 gdbarch->address_class_type_flags = address_class_type_flags;
3346 gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
3348 gdb_assert (gdbarch != NULL);
3349 return gdbarch->address_class_type_flags_to_name != NULL;
3353 gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
3355 gdb_assert (gdbarch != NULL);
3356 gdb_assert (gdbarch->address_class_type_flags_to_name != NULL);
3357 if (gdbarch_debug >= 2)
3358 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
3359 return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
3363 set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
3364 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
3366 gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
3370 gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
3372 gdb_assert (gdbarch != NULL);
3373 return gdbarch->address_class_name_to_type_flags != NULL;
3377 gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
3379 gdb_assert (gdbarch != NULL);
3380 gdb_assert (gdbarch->address_class_name_to_type_flags != NULL);
3381 if (gdbarch_debug >= 2)
3382 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
3383 return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
3387 set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
3388 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
3390 gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
3394 gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
3396 gdb_assert (gdbarch != NULL);
3397 gdb_assert (gdbarch->register_reggroup_p != NULL);
3398 if (gdbarch_debug >= 2)
3399 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
3400 return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
3404 set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
3405 gdbarch_register_reggroup_p_ftype register_reggroup_p)
3407 gdbarch->register_reggroup_p = register_reggroup_p;
3411 gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch)
3413 gdb_assert (gdbarch != NULL);
3414 return gdbarch->fetch_pointer_argument != NULL;
3418 gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type)
3420 gdb_assert (gdbarch != NULL);
3421 gdb_assert (gdbarch->fetch_pointer_argument != NULL);
3422 if (gdbarch_debug >= 2)
3423 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n");
3424 return gdbarch->fetch_pointer_argument (frame, argi, type);
3428 set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch,
3429 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument)
3431 gdbarch->fetch_pointer_argument = fetch_pointer_argument;
3435 gdbarch_iterate_over_regset_sections_p (struct gdbarch *gdbarch)
3437 gdb_assert (gdbarch != NULL);
3438 return gdbarch->iterate_over_regset_sections != NULL;
3442 gdbarch_iterate_over_regset_sections (struct gdbarch *gdbarch, iterate_over_regset_sections_cb *cb, void *cb_data, const struct regcache *regcache)
3444 gdb_assert (gdbarch != NULL);
3445 gdb_assert (gdbarch->iterate_over_regset_sections != NULL);
3446 if (gdbarch_debug >= 2)
3447 fprintf_unfiltered (gdb_stdlog, "gdbarch_iterate_over_regset_sections called\n");
3448 gdbarch->iterate_over_regset_sections (gdbarch, cb, cb_data, regcache);
3452 set_gdbarch_iterate_over_regset_sections (struct gdbarch *gdbarch,
3453 gdbarch_iterate_over_regset_sections_ftype iterate_over_regset_sections)
3455 gdbarch->iterate_over_regset_sections = iterate_over_regset_sections;
3459 gdbarch_make_corefile_notes_p (struct gdbarch *gdbarch)
3461 gdb_assert (gdbarch != NULL);
3462 return gdbarch->make_corefile_notes != NULL;
3466 gdbarch_make_corefile_notes (struct gdbarch *gdbarch, bfd *obfd, int *note_size)
3468 gdb_assert (gdbarch != NULL);
3469 gdb_assert (gdbarch->make_corefile_notes != NULL);
3470 if (gdbarch_debug >= 2)
3471 fprintf_unfiltered (gdb_stdlog, "gdbarch_make_corefile_notes called\n");
3472 return gdbarch->make_corefile_notes (gdbarch, obfd, note_size);
3476 set_gdbarch_make_corefile_notes (struct gdbarch *gdbarch,
3477 gdbarch_make_corefile_notes_ftype make_corefile_notes)
3479 gdbarch->make_corefile_notes = make_corefile_notes;
3483 gdbarch_elfcore_write_linux_prpsinfo_p (struct gdbarch *gdbarch)
3485 gdb_assert (gdbarch != NULL);
3486 return gdbarch->elfcore_write_linux_prpsinfo != NULL;
3490 gdbarch_elfcore_write_linux_prpsinfo (struct gdbarch *gdbarch, bfd *obfd, char *note_data, int *note_size, const struct elf_internal_linux_prpsinfo *info)
3492 gdb_assert (gdbarch != NULL);
3493 gdb_assert (gdbarch->elfcore_write_linux_prpsinfo != NULL);
3494 if (gdbarch_debug >= 2)
3495 fprintf_unfiltered (gdb_stdlog, "gdbarch_elfcore_write_linux_prpsinfo called\n");
3496 return gdbarch->elfcore_write_linux_prpsinfo (obfd, note_data, note_size, info);
3500 set_gdbarch_elfcore_write_linux_prpsinfo (struct gdbarch *gdbarch,
3501 gdbarch_elfcore_write_linux_prpsinfo_ftype elfcore_write_linux_prpsinfo)
3503 gdbarch->elfcore_write_linux_prpsinfo = elfcore_write_linux_prpsinfo;
3507 gdbarch_find_memory_regions_p (struct gdbarch *gdbarch)
3509 gdb_assert (gdbarch != NULL);
3510 return gdbarch->find_memory_regions != NULL;
3514 gdbarch_find_memory_regions (struct gdbarch *gdbarch, find_memory_region_ftype func, void *data)
3516 gdb_assert (gdbarch != NULL);
3517 gdb_assert (gdbarch->find_memory_regions != NULL);
3518 if (gdbarch_debug >= 2)
3519 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_memory_regions called\n");
3520 return gdbarch->find_memory_regions (gdbarch, func, data);
3524 set_gdbarch_find_memory_regions (struct gdbarch *gdbarch,
3525 gdbarch_find_memory_regions_ftype find_memory_regions)
3527 gdbarch->find_memory_regions = find_memory_regions;
3531 gdbarch_core_xfer_shared_libraries_p (struct gdbarch *gdbarch)
3533 gdb_assert (gdbarch != NULL);
3534 return gdbarch->core_xfer_shared_libraries != NULL;
3538 gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len)
3540 gdb_assert (gdbarch != NULL);
3541 gdb_assert (gdbarch->core_xfer_shared_libraries != NULL);
3542 if (gdbarch_debug >= 2)
3543 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_xfer_shared_libraries called\n");
3544 return gdbarch->core_xfer_shared_libraries (gdbarch, readbuf, offset, len);
3548 set_gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch,
3549 gdbarch_core_xfer_shared_libraries_ftype core_xfer_shared_libraries)
3551 gdbarch->core_xfer_shared_libraries = core_xfer_shared_libraries;
3555 gdbarch_core_xfer_shared_libraries_aix_p (struct gdbarch *gdbarch)
3557 gdb_assert (gdbarch != NULL);
3558 return gdbarch->core_xfer_shared_libraries_aix != NULL;
3562 gdbarch_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len)
3564 gdb_assert (gdbarch != NULL);
3565 gdb_assert (gdbarch->core_xfer_shared_libraries_aix != NULL);
3566 if (gdbarch_debug >= 2)
3567 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_xfer_shared_libraries_aix called\n");
3568 return gdbarch->core_xfer_shared_libraries_aix (gdbarch, readbuf, offset, len);
3572 set_gdbarch_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch,
3573 gdbarch_core_xfer_shared_libraries_aix_ftype core_xfer_shared_libraries_aix)
3575 gdbarch->core_xfer_shared_libraries_aix = core_xfer_shared_libraries_aix;
3579 gdbarch_core_pid_to_str_p (struct gdbarch *gdbarch)
3581 gdb_assert (gdbarch != NULL);
3582 return gdbarch->core_pid_to_str != NULL;
3586 gdbarch_core_pid_to_str (struct gdbarch *gdbarch, ptid_t ptid)
3588 gdb_assert (gdbarch != NULL);
3589 gdb_assert (gdbarch->core_pid_to_str != NULL);
3590 if (gdbarch_debug >= 2)
3591 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_pid_to_str called\n");
3592 return gdbarch->core_pid_to_str (gdbarch, ptid);
3596 set_gdbarch_core_pid_to_str (struct gdbarch *gdbarch,
3597 gdbarch_core_pid_to_str_ftype core_pid_to_str)
3599 gdbarch->core_pid_to_str = core_pid_to_str;
3603 gdbarch_core_thread_name_p (struct gdbarch *gdbarch)
3605 gdb_assert (gdbarch != NULL);
3606 return gdbarch->core_thread_name != NULL;
3610 gdbarch_core_thread_name (struct gdbarch *gdbarch, struct thread_info *thr)
3612 gdb_assert (gdbarch != NULL);
3613 gdb_assert (gdbarch->core_thread_name != NULL);
3614 if (gdbarch_debug >= 2)
3615 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_thread_name called\n");
3616 return gdbarch->core_thread_name (gdbarch, thr);
3620 set_gdbarch_core_thread_name (struct gdbarch *gdbarch,
3621 gdbarch_core_thread_name_ftype core_thread_name)
3623 gdbarch->core_thread_name = core_thread_name;
3627 gdbarch_gcore_bfd_target_p (struct gdbarch *gdbarch)
3629 gdb_assert (gdbarch != NULL);
3630 return gdbarch->gcore_bfd_target != 0;
3634 gdbarch_gcore_bfd_target (struct gdbarch *gdbarch)
3636 gdb_assert (gdbarch != NULL);
3637 /* Check variable changed from pre-default. */
3638 gdb_assert (gdbarch->gcore_bfd_target != 0);
3639 if (gdbarch_debug >= 2)
3640 fprintf_unfiltered (gdb_stdlog, "gdbarch_gcore_bfd_target called\n");
3641 return gdbarch->gcore_bfd_target;
3645 set_gdbarch_gcore_bfd_target (struct gdbarch *gdbarch,
3646 const char * gcore_bfd_target)
3648 gdbarch->gcore_bfd_target = gcore_bfd_target;
3652 gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch)
3654 gdb_assert (gdbarch != NULL);
3655 /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
3656 if (gdbarch_debug >= 2)
3657 fprintf_unfiltered (gdb_stdlog, "gdbarch_vtable_function_descriptors called\n");
3658 return gdbarch->vtable_function_descriptors;
3662 set_gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch,
3663 int vtable_function_descriptors)
3665 gdbarch->vtable_function_descriptors = vtable_function_descriptors;
3669 gdbarch_vbit_in_delta (struct gdbarch *gdbarch)
3671 gdb_assert (gdbarch != NULL);
3672 /* Skip verify of vbit_in_delta, invalid_p == 0 */
3673 if (gdbarch_debug >= 2)
3674 fprintf_unfiltered (gdb_stdlog, "gdbarch_vbit_in_delta called\n");
3675 return gdbarch->vbit_in_delta;
3679 set_gdbarch_vbit_in_delta (struct gdbarch *gdbarch,
3682 gdbarch->vbit_in_delta = vbit_in_delta;
3686 gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch, struct regcache *regcache)
3688 gdb_assert (gdbarch != NULL);
3689 gdb_assert (gdbarch->skip_permanent_breakpoint != NULL);
3690 if (gdbarch_debug >= 2)
3691 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_permanent_breakpoint called\n");
3692 gdbarch->skip_permanent_breakpoint (regcache);
3696 set_gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch,
3697 gdbarch_skip_permanent_breakpoint_ftype skip_permanent_breakpoint)
3699 gdbarch->skip_permanent_breakpoint = skip_permanent_breakpoint;
3703 gdbarch_max_insn_length_p (struct gdbarch *gdbarch)
3705 gdb_assert (gdbarch != NULL);
3706 return gdbarch->max_insn_length != 0;
3710 gdbarch_max_insn_length (struct gdbarch *gdbarch)
3712 gdb_assert (gdbarch != NULL);
3713 /* Check variable changed from pre-default. */
3714 gdb_assert (gdbarch->max_insn_length != 0);
3715 if (gdbarch_debug >= 2)
3716 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_insn_length called\n");
3717 return gdbarch->max_insn_length;
3721 set_gdbarch_max_insn_length (struct gdbarch *gdbarch,
3722 ULONGEST max_insn_length)
3724 gdbarch->max_insn_length = max_insn_length;
3728 gdbarch_displaced_step_copy_insn_p (struct gdbarch *gdbarch)
3730 gdb_assert (gdbarch != NULL);
3731 return gdbarch->displaced_step_copy_insn != NULL;
3734 struct displaced_step_closure *
3735 gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch, CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
3737 gdb_assert (gdbarch != NULL);
3738 gdb_assert (gdbarch->displaced_step_copy_insn != NULL);
3739 if (gdbarch_debug >= 2)
3740 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_copy_insn called\n");
3741 return gdbarch->displaced_step_copy_insn (gdbarch, from, to, regs);
3745 set_gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch,
3746 gdbarch_displaced_step_copy_insn_ftype displaced_step_copy_insn)
3748 gdbarch->displaced_step_copy_insn = displaced_step_copy_insn;
3752 gdbarch_displaced_step_hw_singlestep (struct gdbarch *gdbarch, struct displaced_step_closure *closure)
3754 gdb_assert (gdbarch != NULL);
3755 gdb_assert (gdbarch->displaced_step_hw_singlestep != NULL);
3756 if (gdbarch_debug >= 2)
3757 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_hw_singlestep called\n");
3758 return gdbarch->displaced_step_hw_singlestep (gdbarch, closure);
3762 set_gdbarch_displaced_step_hw_singlestep (struct gdbarch *gdbarch,
3763 gdbarch_displaced_step_hw_singlestep_ftype displaced_step_hw_singlestep)
3765 gdbarch->displaced_step_hw_singlestep = displaced_step_hw_singlestep;
3769 gdbarch_displaced_step_fixup_p (struct gdbarch *gdbarch)
3771 gdb_assert (gdbarch != NULL);
3772 return gdbarch->displaced_step_fixup != NULL;
3776 gdbarch_displaced_step_fixup (struct gdbarch *gdbarch, struct displaced_step_closure *closure, CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
3778 gdb_assert (gdbarch != NULL);
3779 gdb_assert (gdbarch->displaced_step_fixup != NULL);
3780 /* Do not check predicate: gdbarch->displaced_step_fixup != NULL, allow call. */
3781 if (gdbarch_debug >= 2)
3782 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_fixup called\n");
3783 gdbarch->displaced_step_fixup (gdbarch, closure, from, to, regs);
3787 set_gdbarch_displaced_step_fixup (struct gdbarch *gdbarch,
3788 gdbarch_displaced_step_fixup_ftype displaced_step_fixup)
3790 gdbarch->displaced_step_fixup = displaced_step_fixup;
3794 gdbarch_displaced_step_free_closure (struct gdbarch *gdbarch, struct displaced_step_closure *closure)
3796 gdb_assert (gdbarch != NULL);
3797 gdb_assert (gdbarch->displaced_step_free_closure != NULL);
3798 if (gdbarch_debug >= 2)
3799 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_free_closure called\n");
3800 gdbarch->displaced_step_free_closure (gdbarch, closure);
3804 set_gdbarch_displaced_step_free_closure (struct gdbarch *gdbarch,
3805 gdbarch_displaced_step_free_closure_ftype displaced_step_free_closure)
3807 gdbarch->displaced_step_free_closure = displaced_step_free_closure;
3811 gdbarch_displaced_step_location (struct gdbarch *gdbarch)
3813 gdb_assert (gdbarch != NULL);
3814 gdb_assert (gdbarch->displaced_step_location != NULL);
3815 if (gdbarch_debug >= 2)
3816 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_location called\n");
3817 return gdbarch->displaced_step_location (gdbarch);
3821 set_gdbarch_displaced_step_location (struct gdbarch *gdbarch,
3822 gdbarch_displaced_step_location_ftype displaced_step_location)
3824 gdbarch->displaced_step_location = displaced_step_location;
3828 gdbarch_relocate_instruction_p (struct gdbarch *gdbarch)
3830 gdb_assert (gdbarch != NULL);
3831 return gdbarch->relocate_instruction != NULL;
3835 gdbarch_relocate_instruction (struct gdbarch *gdbarch, CORE_ADDR *to, CORE_ADDR from)
3837 gdb_assert (gdbarch != NULL);
3838 gdb_assert (gdbarch->relocate_instruction != NULL);
3839 /* Do not check predicate: gdbarch->relocate_instruction != NULL, allow call. */
3840 if (gdbarch_debug >= 2)
3841 fprintf_unfiltered (gdb_stdlog, "gdbarch_relocate_instruction called\n");
3842 gdbarch->relocate_instruction (gdbarch, to, from);
3846 set_gdbarch_relocate_instruction (struct gdbarch *gdbarch,
3847 gdbarch_relocate_instruction_ftype relocate_instruction)
3849 gdbarch->relocate_instruction = relocate_instruction;
3853 gdbarch_overlay_update_p (struct gdbarch *gdbarch)
3855 gdb_assert (gdbarch != NULL);
3856 return gdbarch->overlay_update != NULL;
3860 gdbarch_overlay_update (struct gdbarch *gdbarch, struct obj_section *osect)
3862 gdb_assert (gdbarch != NULL);
3863 gdb_assert (gdbarch->overlay_update != NULL);
3864 if (gdbarch_debug >= 2)
3865 fprintf_unfiltered (gdb_stdlog, "gdbarch_overlay_update called\n");
3866 gdbarch->overlay_update (osect);
3870 set_gdbarch_overlay_update (struct gdbarch *gdbarch,
3871 gdbarch_overlay_update_ftype overlay_update)
3873 gdbarch->overlay_update = overlay_update;
3877 gdbarch_core_read_description_p (struct gdbarch *gdbarch)
3879 gdb_assert (gdbarch != NULL);
3880 return gdbarch->core_read_description != NULL;
3883 const struct target_desc *
3884 gdbarch_core_read_description (struct gdbarch *gdbarch, struct target_ops *target, bfd *abfd)
3886 gdb_assert (gdbarch != NULL);
3887 gdb_assert (gdbarch->core_read_description != NULL);
3888 if (gdbarch_debug >= 2)
3889 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_read_description called\n");
3890 return gdbarch->core_read_description (gdbarch, target, abfd);
3894 set_gdbarch_core_read_description (struct gdbarch *gdbarch,
3895 gdbarch_core_read_description_ftype core_read_description)
3897 gdbarch->core_read_description = core_read_description;
3901 gdbarch_static_transform_name_p (struct gdbarch *gdbarch)
3903 gdb_assert (gdbarch != NULL);
3904 return gdbarch->static_transform_name != NULL;
3908 gdbarch_static_transform_name (struct gdbarch *gdbarch, const char *name)
3910 gdb_assert (gdbarch != NULL);
3911 gdb_assert (gdbarch->static_transform_name != NULL);
3912 if (gdbarch_debug >= 2)
3913 fprintf_unfiltered (gdb_stdlog, "gdbarch_static_transform_name called\n");
3914 return gdbarch->static_transform_name (name);
3918 set_gdbarch_static_transform_name (struct gdbarch *gdbarch,
3919 gdbarch_static_transform_name_ftype static_transform_name)
3921 gdbarch->static_transform_name = static_transform_name;
3925 gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch)
3927 gdb_assert (gdbarch != NULL);
3928 /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
3929 if (gdbarch_debug >= 2)
3930 fprintf_unfiltered (gdb_stdlog, "gdbarch_sofun_address_maybe_missing called\n");
3931 return gdbarch->sofun_address_maybe_missing;
3935 set_gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch,
3936 int sofun_address_maybe_missing)
3938 gdbarch->sofun_address_maybe_missing = sofun_address_maybe_missing;
3942 gdbarch_process_record_p (struct gdbarch *gdbarch)
3944 gdb_assert (gdbarch != NULL);
3945 return gdbarch->process_record != NULL;
3949 gdbarch_process_record (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR addr)
3951 gdb_assert (gdbarch != NULL);
3952 gdb_assert (gdbarch->process_record != NULL);
3953 if (gdbarch_debug >= 2)
3954 fprintf_unfiltered (gdb_stdlog, "gdbarch_process_record called\n");
3955 return gdbarch->process_record (gdbarch, regcache, addr);
3959 set_gdbarch_process_record (struct gdbarch *gdbarch,
3960 gdbarch_process_record_ftype process_record)
3962 gdbarch->process_record = process_record;
3966 gdbarch_process_record_signal_p (struct gdbarch *gdbarch)
3968 gdb_assert (gdbarch != NULL);
3969 return gdbarch->process_record_signal != NULL;
3973 gdbarch_process_record_signal (struct gdbarch *gdbarch, struct regcache *regcache, enum gdb_signal signal)
3975 gdb_assert (gdbarch != NULL);
3976 gdb_assert (gdbarch->process_record_signal != NULL);
3977 if (gdbarch_debug >= 2)
3978 fprintf_unfiltered (gdb_stdlog, "gdbarch_process_record_signal called\n");
3979 return gdbarch->process_record_signal (gdbarch, regcache, signal);
3983 set_gdbarch_process_record_signal (struct gdbarch *gdbarch,
3984 gdbarch_process_record_signal_ftype process_record_signal)
3986 gdbarch->process_record_signal = process_record_signal;
3990 gdbarch_gdb_signal_from_target_p (struct gdbarch *gdbarch)
3992 gdb_assert (gdbarch != NULL);
3993 return gdbarch->gdb_signal_from_target != NULL;
3997 gdbarch_gdb_signal_from_target (struct gdbarch *gdbarch, int signo)
3999 gdb_assert (gdbarch != NULL);
4000 gdb_assert (gdbarch->gdb_signal_from_target != NULL);
4001 if (gdbarch_debug >= 2)
4002 fprintf_unfiltered (gdb_stdlog, "gdbarch_gdb_signal_from_target called\n");
4003 return gdbarch->gdb_signal_from_target (gdbarch, signo);
4007 set_gdbarch_gdb_signal_from_target (struct gdbarch *gdbarch,
4008 gdbarch_gdb_signal_from_target_ftype gdb_signal_from_target)
4010 gdbarch->gdb_signal_from_target = gdb_signal_from_target;
4014 gdbarch_gdb_signal_to_target_p (struct gdbarch *gdbarch)
4016 gdb_assert (gdbarch != NULL);
4017 return gdbarch->gdb_signal_to_target != NULL;
4021 gdbarch_gdb_signal_to_target (struct gdbarch *gdbarch, enum gdb_signal signal)
4023 gdb_assert (gdbarch != NULL);
4024 gdb_assert (gdbarch->gdb_signal_to_target != NULL);
4025 if (gdbarch_debug >= 2)
4026 fprintf_unfiltered (gdb_stdlog, "gdbarch_gdb_signal_to_target called\n");
4027 return gdbarch->gdb_signal_to_target (gdbarch, signal);
4031 set_gdbarch_gdb_signal_to_target (struct gdbarch *gdbarch,
4032 gdbarch_gdb_signal_to_target_ftype gdb_signal_to_target)
4034 gdbarch->gdb_signal_to_target = gdb_signal_to_target;
4038 gdbarch_get_siginfo_type_p (struct gdbarch *gdbarch)
4040 gdb_assert (gdbarch != NULL);
4041 return gdbarch->get_siginfo_type != NULL;
4045 gdbarch_get_siginfo_type (struct gdbarch *gdbarch)
4047 gdb_assert (gdbarch != NULL);
4048 gdb_assert (gdbarch->get_siginfo_type != NULL);
4049 if (gdbarch_debug >= 2)
4050 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_siginfo_type called\n");
4051 return gdbarch->get_siginfo_type (gdbarch);
4055 set_gdbarch_get_siginfo_type (struct gdbarch *gdbarch,
4056 gdbarch_get_siginfo_type_ftype get_siginfo_type)
4058 gdbarch->get_siginfo_type = get_siginfo_type;
4062 gdbarch_record_special_symbol_p (struct gdbarch *gdbarch)
4064 gdb_assert (gdbarch != NULL);
4065 return gdbarch->record_special_symbol != NULL;
4069 gdbarch_record_special_symbol (struct gdbarch *gdbarch, struct objfile *objfile, asymbol *sym)
4071 gdb_assert (gdbarch != NULL);
4072 gdb_assert (gdbarch->record_special_symbol != NULL);
4073 if (gdbarch_debug >= 2)
4074 fprintf_unfiltered (gdb_stdlog, "gdbarch_record_special_symbol called\n");
4075 gdbarch->record_special_symbol (gdbarch, objfile, sym);
4079 set_gdbarch_record_special_symbol (struct gdbarch *gdbarch,
4080 gdbarch_record_special_symbol_ftype record_special_symbol)
4082 gdbarch->record_special_symbol = record_special_symbol;
4086 gdbarch_get_syscall_number_p (struct gdbarch *gdbarch)
4088 gdb_assert (gdbarch != NULL);
4089 return gdbarch->get_syscall_number != NULL;
4093 gdbarch_get_syscall_number (struct gdbarch *gdbarch, ptid_t ptid)
4095 gdb_assert (gdbarch != NULL);
4096 gdb_assert (gdbarch->get_syscall_number != NULL);
4097 if (gdbarch_debug >= 2)
4098 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_syscall_number called\n");
4099 return gdbarch->get_syscall_number (gdbarch, ptid);
4103 set_gdbarch_get_syscall_number (struct gdbarch *gdbarch,
4104 gdbarch_get_syscall_number_ftype get_syscall_number)
4106 gdbarch->get_syscall_number = get_syscall_number;
4110 gdbarch_xml_syscall_file (struct gdbarch *gdbarch)
4112 gdb_assert (gdbarch != NULL);
4113 /* Skip verify of xml_syscall_file, invalid_p == 0 */
4114 if (gdbarch_debug >= 2)
4115 fprintf_unfiltered (gdb_stdlog, "gdbarch_xml_syscall_file called\n");
4116 return gdbarch->xml_syscall_file;
4120 set_gdbarch_xml_syscall_file (struct gdbarch *gdbarch,
4121 const char * xml_syscall_file)
4123 gdbarch->xml_syscall_file = xml_syscall_file;
4126 struct syscalls_info *
4127 gdbarch_syscalls_info (struct gdbarch *gdbarch)
4129 gdb_assert (gdbarch != NULL);
4130 /* Skip verify of syscalls_info, invalid_p == 0 */
4131 if (gdbarch_debug >= 2)
4132 fprintf_unfiltered (gdb_stdlog, "gdbarch_syscalls_info called\n");
4133 return gdbarch->syscalls_info;
4137 set_gdbarch_syscalls_info (struct gdbarch *gdbarch,
4138 struct syscalls_info * syscalls_info)
4140 gdbarch->syscalls_info = syscalls_info;
4144 gdbarch_stap_integer_prefixes (struct gdbarch *gdbarch)
4146 gdb_assert (gdbarch != NULL);
4147 /* Skip verify of stap_integer_prefixes, invalid_p == 0 */
4148 if (gdbarch_debug >= 2)
4149 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_integer_prefixes called\n");
4150 return gdbarch->stap_integer_prefixes;
4154 set_gdbarch_stap_integer_prefixes (struct gdbarch *gdbarch,
4155 const char *const * stap_integer_prefixes)
4157 gdbarch->stap_integer_prefixes = stap_integer_prefixes;
4161 gdbarch_stap_integer_suffixes (struct gdbarch *gdbarch)
4163 gdb_assert (gdbarch != NULL);
4164 /* Skip verify of stap_integer_suffixes, invalid_p == 0 */
4165 if (gdbarch_debug >= 2)
4166 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_integer_suffixes called\n");
4167 return gdbarch->stap_integer_suffixes;
4171 set_gdbarch_stap_integer_suffixes (struct gdbarch *gdbarch,
4172 const char *const * stap_integer_suffixes)
4174 gdbarch->stap_integer_suffixes = stap_integer_suffixes;
4178 gdbarch_stap_register_prefixes (struct gdbarch *gdbarch)
4180 gdb_assert (gdbarch != NULL);
4181 /* Skip verify of stap_register_prefixes, invalid_p == 0 */
4182 if (gdbarch_debug >= 2)
4183 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_prefixes called\n");
4184 return gdbarch->stap_register_prefixes;
4188 set_gdbarch_stap_register_prefixes (struct gdbarch *gdbarch,
4189 const char *const * stap_register_prefixes)
4191 gdbarch->stap_register_prefixes = stap_register_prefixes;
4195 gdbarch_stap_register_suffixes (struct gdbarch *gdbarch)
4197 gdb_assert (gdbarch != NULL);
4198 /* Skip verify of stap_register_suffixes, invalid_p == 0 */
4199 if (gdbarch_debug >= 2)
4200 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_suffixes called\n");
4201 return gdbarch->stap_register_suffixes;
4205 set_gdbarch_stap_register_suffixes (struct gdbarch *gdbarch,
4206 const char *const * stap_register_suffixes)
4208 gdbarch->stap_register_suffixes = stap_register_suffixes;
4212 gdbarch_stap_register_indirection_prefixes (struct gdbarch *gdbarch)
4214 gdb_assert (gdbarch != NULL);
4215 /* Skip verify of stap_register_indirection_prefixes, invalid_p == 0 */
4216 if (gdbarch_debug >= 2)
4217 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_indirection_prefixes called\n");
4218 return gdbarch->stap_register_indirection_prefixes;
4222 set_gdbarch_stap_register_indirection_prefixes (struct gdbarch *gdbarch,
4223 const char *const * stap_register_indirection_prefixes)
4225 gdbarch->stap_register_indirection_prefixes = stap_register_indirection_prefixes;
4229 gdbarch_stap_register_indirection_suffixes (struct gdbarch *gdbarch)
4231 gdb_assert (gdbarch != NULL);
4232 /* Skip verify of stap_register_indirection_suffixes, invalid_p == 0 */
4233 if (gdbarch_debug >= 2)
4234 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_indirection_suffixes called\n");
4235 return gdbarch->stap_register_indirection_suffixes;
4239 set_gdbarch_stap_register_indirection_suffixes (struct gdbarch *gdbarch,
4240 const char *const * stap_register_indirection_suffixes)
4242 gdbarch->stap_register_indirection_suffixes = stap_register_indirection_suffixes;
4246 gdbarch_stap_gdb_register_prefix (struct gdbarch *gdbarch)
4248 gdb_assert (gdbarch != NULL);
4249 /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */
4250 if (gdbarch_debug >= 2)
4251 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_gdb_register_prefix called\n");
4252 return gdbarch->stap_gdb_register_prefix;
4256 set_gdbarch_stap_gdb_register_prefix (struct gdbarch *gdbarch,
4257 const char * stap_gdb_register_prefix)
4259 gdbarch->stap_gdb_register_prefix = stap_gdb_register_prefix;
4263 gdbarch_stap_gdb_register_suffix (struct gdbarch *gdbarch)
4265 gdb_assert (gdbarch != NULL);
4266 /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */
4267 if (gdbarch_debug >= 2)
4268 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_gdb_register_suffix called\n");
4269 return gdbarch->stap_gdb_register_suffix;
4273 set_gdbarch_stap_gdb_register_suffix (struct gdbarch *gdbarch,
4274 const char * stap_gdb_register_suffix)
4276 gdbarch->stap_gdb_register_suffix = stap_gdb_register_suffix;
4280 gdbarch_stap_is_single_operand_p (struct gdbarch *gdbarch)
4282 gdb_assert (gdbarch != NULL);
4283 return gdbarch->stap_is_single_operand != NULL;
4287 gdbarch_stap_is_single_operand (struct gdbarch *gdbarch, const char *s)
4289 gdb_assert (gdbarch != NULL);
4290 gdb_assert (gdbarch->stap_is_single_operand != NULL);
4291 if (gdbarch_debug >= 2)
4292 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_is_single_operand called\n");
4293 return gdbarch->stap_is_single_operand (gdbarch, s);
4297 set_gdbarch_stap_is_single_operand (struct gdbarch *gdbarch,
4298 gdbarch_stap_is_single_operand_ftype stap_is_single_operand)
4300 gdbarch->stap_is_single_operand = stap_is_single_operand;
4304 gdbarch_stap_parse_special_token_p (struct gdbarch *gdbarch)
4306 gdb_assert (gdbarch != NULL);
4307 return gdbarch->stap_parse_special_token != NULL;
4311 gdbarch_stap_parse_special_token (struct gdbarch *gdbarch, struct stap_parse_info *p)
4313 gdb_assert (gdbarch != NULL);
4314 gdb_assert (gdbarch->stap_parse_special_token != NULL);
4315 if (gdbarch_debug >= 2)
4316 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_parse_special_token called\n");
4317 return gdbarch->stap_parse_special_token (gdbarch, p);
4321 set_gdbarch_stap_parse_special_token (struct gdbarch *gdbarch,
4322 gdbarch_stap_parse_special_token_ftype stap_parse_special_token)
4324 gdbarch->stap_parse_special_token = stap_parse_special_token;
4328 gdbarch_dtrace_parse_probe_argument_p (struct gdbarch *gdbarch)
4330 gdb_assert (gdbarch != NULL);
4331 return gdbarch->dtrace_parse_probe_argument != NULL;
4335 gdbarch_dtrace_parse_probe_argument (struct gdbarch *gdbarch, struct parser_state *pstate, int narg)
4337 gdb_assert (gdbarch != NULL);
4338 gdb_assert (gdbarch->dtrace_parse_probe_argument != NULL);
4339 if (gdbarch_debug >= 2)
4340 fprintf_unfiltered (gdb_stdlog, "gdbarch_dtrace_parse_probe_argument called\n");
4341 gdbarch->dtrace_parse_probe_argument (gdbarch, pstate, narg);
4345 set_gdbarch_dtrace_parse_probe_argument (struct gdbarch *gdbarch,
4346 gdbarch_dtrace_parse_probe_argument_ftype dtrace_parse_probe_argument)
4348 gdbarch->dtrace_parse_probe_argument = dtrace_parse_probe_argument;
4352 gdbarch_dtrace_probe_is_enabled_p (struct gdbarch *gdbarch)
4354 gdb_assert (gdbarch != NULL);
4355 return gdbarch->dtrace_probe_is_enabled != NULL;
4359 gdbarch_dtrace_probe_is_enabled (struct gdbarch *gdbarch, CORE_ADDR addr)
4361 gdb_assert (gdbarch != NULL);
4362 gdb_assert (gdbarch->dtrace_probe_is_enabled != NULL);
4363 if (gdbarch_debug >= 2)
4364 fprintf_unfiltered (gdb_stdlog, "gdbarch_dtrace_probe_is_enabled called\n");
4365 return gdbarch->dtrace_probe_is_enabled (gdbarch, addr);
4369 set_gdbarch_dtrace_probe_is_enabled (struct gdbarch *gdbarch,
4370 gdbarch_dtrace_probe_is_enabled_ftype dtrace_probe_is_enabled)
4372 gdbarch->dtrace_probe_is_enabled = dtrace_probe_is_enabled;
4376 gdbarch_dtrace_enable_probe_p (struct gdbarch *gdbarch)
4378 gdb_assert (gdbarch != NULL);
4379 return gdbarch->dtrace_enable_probe != NULL;
4383 gdbarch_dtrace_enable_probe (struct gdbarch *gdbarch, CORE_ADDR addr)
4385 gdb_assert (gdbarch != NULL);
4386 gdb_assert (gdbarch->dtrace_enable_probe != NULL);
4387 if (gdbarch_debug >= 2)
4388 fprintf_unfiltered (gdb_stdlog, "gdbarch_dtrace_enable_probe called\n");
4389 gdbarch->dtrace_enable_probe (gdbarch, addr);
4393 set_gdbarch_dtrace_enable_probe (struct gdbarch *gdbarch,
4394 gdbarch_dtrace_enable_probe_ftype dtrace_enable_probe)
4396 gdbarch->dtrace_enable_probe = dtrace_enable_probe;
4400 gdbarch_dtrace_disable_probe_p (struct gdbarch *gdbarch)
4402 gdb_assert (gdbarch != NULL);
4403 return gdbarch->dtrace_disable_probe != NULL;
4407 gdbarch_dtrace_disable_probe (struct gdbarch *gdbarch, CORE_ADDR addr)
4409 gdb_assert (gdbarch != NULL);
4410 gdb_assert (gdbarch->dtrace_disable_probe != NULL);
4411 if (gdbarch_debug >= 2)
4412 fprintf_unfiltered (gdb_stdlog, "gdbarch_dtrace_disable_probe called\n");
4413 gdbarch->dtrace_disable_probe (gdbarch, addr);
4417 set_gdbarch_dtrace_disable_probe (struct gdbarch *gdbarch,
4418 gdbarch_dtrace_disable_probe_ftype dtrace_disable_probe)
4420 gdbarch->dtrace_disable_probe = dtrace_disable_probe;
4424 gdbarch_has_global_solist (struct gdbarch *gdbarch)
4426 gdb_assert (gdbarch != NULL);
4427 /* Skip verify of has_global_solist, invalid_p == 0 */
4428 if (gdbarch_debug >= 2)
4429 fprintf_unfiltered (gdb_stdlog, "gdbarch_has_global_solist called\n");
4430 return gdbarch->has_global_solist;
4434 set_gdbarch_has_global_solist (struct gdbarch *gdbarch,
4435 int has_global_solist)
4437 gdbarch->has_global_solist = has_global_solist;
4441 gdbarch_has_global_breakpoints (struct gdbarch *gdbarch)
4443 gdb_assert (gdbarch != NULL);
4444 /* Skip verify of has_global_breakpoints, invalid_p == 0 */
4445 if (gdbarch_debug >= 2)
4446 fprintf_unfiltered (gdb_stdlog, "gdbarch_has_global_breakpoints called\n");
4447 return gdbarch->has_global_breakpoints;
4451 set_gdbarch_has_global_breakpoints (struct gdbarch *gdbarch,
4452 int has_global_breakpoints)
4454 gdbarch->has_global_breakpoints = has_global_breakpoints;
4458 gdbarch_has_shared_address_space (struct gdbarch *gdbarch)
4460 gdb_assert (gdbarch != NULL);
4461 gdb_assert (gdbarch->has_shared_address_space != NULL);
4462 if (gdbarch_debug >= 2)
4463 fprintf_unfiltered (gdb_stdlog, "gdbarch_has_shared_address_space called\n");
4464 return gdbarch->has_shared_address_space (gdbarch);
4468 set_gdbarch_has_shared_address_space (struct gdbarch *gdbarch,
4469 gdbarch_has_shared_address_space_ftype has_shared_address_space)
4471 gdbarch->has_shared_address_space = has_shared_address_space;
4475 gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch, CORE_ADDR addr, char **msg)
4477 gdb_assert (gdbarch != NULL);
4478 gdb_assert (gdbarch->fast_tracepoint_valid_at != NULL);
4479 if (gdbarch_debug >= 2)
4480 fprintf_unfiltered (gdb_stdlog, "gdbarch_fast_tracepoint_valid_at called\n");
4481 return gdbarch->fast_tracepoint_valid_at (gdbarch, addr, msg);
4485 set_gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch,
4486 gdbarch_fast_tracepoint_valid_at_ftype fast_tracepoint_valid_at)
4488 gdbarch->fast_tracepoint_valid_at = fast_tracepoint_valid_at;
4492 gdbarch_guess_tracepoint_registers (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR addr)
4494 gdb_assert (gdbarch != NULL);
4495 gdb_assert (gdbarch->guess_tracepoint_registers != NULL);
4496 if (gdbarch_debug >= 2)
4497 fprintf_unfiltered (gdb_stdlog, "gdbarch_guess_tracepoint_registers called\n");
4498 gdbarch->guess_tracepoint_registers (gdbarch, regcache, addr);
4502 set_gdbarch_guess_tracepoint_registers (struct gdbarch *gdbarch,
4503 gdbarch_guess_tracepoint_registers_ftype guess_tracepoint_registers)
4505 gdbarch->guess_tracepoint_registers = guess_tracepoint_registers;
4509 gdbarch_auto_charset (struct gdbarch *gdbarch)
4511 gdb_assert (gdbarch != NULL);
4512 gdb_assert (gdbarch->auto_charset != NULL);
4513 if (gdbarch_debug >= 2)
4514 fprintf_unfiltered (gdb_stdlog, "gdbarch_auto_charset called\n");
4515 return gdbarch->auto_charset ();
4519 set_gdbarch_auto_charset (struct gdbarch *gdbarch,
4520 gdbarch_auto_charset_ftype auto_charset)
4522 gdbarch->auto_charset = auto_charset;
4526 gdbarch_auto_wide_charset (struct gdbarch *gdbarch)
4528 gdb_assert (gdbarch != NULL);
4529 gdb_assert (gdbarch->auto_wide_charset != NULL);
4530 if (gdbarch_debug >= 2)
4531 fprintf_unfiltered (gdb_stdlog, "gdbarch_auto_wide_charset called\n");
4532 return gdbarch->auto_wide_charset ();
4536 set_gdbarch_auto_wide_charset (struct gdbarch *gdbarch,
4537 gdbarch_auto_wide_charset_ftype auto_wide_charset)
4539 gdbarch->auto_wide_charset = auto_wide_charset;
4543 gdbarch_solib_symbols_extension (struct gdbarch *gdbarch)
4545 gdb_assert (gdbarch != NULL);
4546 if (gdbarch_debug >= 2)
4547 fprintf_unfiltered (gdb_stdlog, "gdbarch_solib_symbols_extension called\n");
4548 return gdbarch->solib_symbols_extension;
4552 set_gdbarch_solib_symbols_extension (struct gdbarch *gdbarch,
4553 const char * solib_symbols_extension)
4555 gdbarch->solib_symbols_extension = solib_symbols_extension;
4559 gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch)
4561 gdb_assert (gdbarch != NULL);
4562 /* Skip verify of has_dos_based_file_system, invalid_p == 0 */
4563 if (gdbarch_debug >= 2)
4564 fprintf_unfiltered (gdb_stdlog, "gdbarch_has_dos_based_file_system called\n");
4565 return gdbarch->has_dos_based_file_system;
4569 set_gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch,
4570 int has_dos_based_file_system)
4572 gdbarch->has_dos_based_file_system = has_dos_based_file_system;
4576 gdbarch_gen_return_address (struct gdbarch *gdbarch, struct agent_expr *ax, struct axs_value *value, CORE_ADDR scope)
4578 gdb_assert (gdbarch != NULL);
4579 gdb_assert (gdbarch->gen_return_address != NULL);
4580 if (gdbarch_debug >= 2)
4581 fprintf_unfiltered (gdb_stdlog, "gdbarch_gen_return_address called\n");
4582 gdbarch->gen_return_address (gdbarch, ax, value, scope);
4586 set_gdbarch_gen_return_address (struct gdbarch *gdbarch,
4587 gdbarch_gen_return_address_ftype gen_return_address)
4589 gdbarch->gen_return_address = gen_return_address;
4593 gdbarch_info_proc_p (struct gdbarch *gdbarch)
4595 gdb_assert (gdbarch != NULL);
4596 return gdbarch->info_proc != NULL;
4600 gdbarch_info_proc (struct gdbarch *gdbarch, const char *args, enum info_proc_what what)
4602 gdb_assert (gdbarch != NULL);
4603 gdb_assert (gdbarch->info_proc != NULL);
4604 if (gdbarch_debug >= 2)
4605 fprintf_unfiltered (gdb_stdlog, "gdbarch_info_proc called\n");
4606 gdbarch->info_proc (gdbarch, args, what);
4610 set_gdbarch_info_proc (struct gdbarch *gdbarch,
4611 gdbarch_info_proc_ftype info_proc)
4613 gdbarch->info_proc = info_proc;
4617 gdbarch_core_info_proc_p (struct gdbarch *gdbarch)
4619 gdb_assert (gdbarch != NULL);
4620 return gdbarch->core_info_proc != NULL;
4624 gdbarch_core_info_proc (struct gdbarch *gdbarch, const char *args, enum info_proc_what what)
4626 gdb_assert (gdbarch != NULL);
4627 gdb_assert (gdbarch->core_info_proc != NULL);
4628 if (gdbarch_debug >= 2)
4629 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_info_proc called\n");
4630 gdbarch->core_info_proc (gdbarch, args, what);
4634 set_gdbarch_core_info_proc (struct gdbarch *gdbarch,
4635 gdbarch_core_info_proc_ftype core_info_proc)
4637 gdbarch->core_info_proc = core_info_proc;
4641 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)
4643 gdb_assert (gdbarch != NULL);
4644 gdb_assert (gdbarch->iterate_over_objfiles_in_search_order != NULL);
4645 if (gdbarch_debug >= 2)
4646 fprintf_unfiltered (gdb_stdlog, "gdbarch_iterate_over_objfiles_in_search_order called\n");
4647 gdbarch->iterate_over_objfiles_in_search_order (gdbarch, cb, cb_data, current_objfile);
4651 set_gdbarch_iterate_over_objfiles_in_search_order (struct gdbarch *gdbarch,
4652 gdbarch_iterate_over_objfiles_in_search_order_ftype iterate_over_objfiles_in_search_order)
4654 gdbarch->iterate_over_objfiles_in_search_order = iterate_over_objfiles_in_search_order;
4657 struct ravenscar_arch_ops *
4658 gdbarch_ravenscar_ops (struct gdbarch *gdbarch)
4660 gdb_assert (gdbarch != NULL);
4661 /* Skip verify of ravenscar_ops, invalid_p == 0 */
4662 if (gdbarch_debug >= 2)
4663 fprintf_unfiltered (gdb_stdlog, "gdbarch_ravenscar_ops called\n");
4664 return gdbarch->ravenscar_ops;
4668 set_gdbarch_ravenscar_ops (struct gdbarch *gdbarch,
4669 struct ravenscar_arch_ops * ravenscar_ops)
4671 gdbarch->ravenscar_ops = ravenscar_ops;
4675 gdbarch_insn_is_call (struct gdbarch *gdbarch, CORE_ADDR addr)
4677 gdb_assert (gdbarch != NULL);
4678 gdb_assert (gdbarch->insn_is_call != NULL);
4679 if (gdbarch_debug >= 2)
4680 fprintf_unfiltered (gdb_stdlog, "gdbarch_insn_is_call called\n");
4681 return gdbarch->insn_is_call (gdbarch, addr);
4685 set_gdbarch_insn_is_call (struct gdbarch *gdbarch,
4686 gdbarch_insn_is_call_ftype insn_is_call)
4688 gdbarch->insn_is_call = insn_is_call;
4692 gdbarch_insn_is_ret (struct gdbarch *gdbarch, CORE_ADDR addr)
4694 gdb_assert (gdbarch != NULL);
4695 gdb_assert (gdbarch->insn_is_ret != NULL);
4696 if (gdbarch_debug >= 2)
4697 fprintf_unfiltered (gdb_stdlog, "gdbarch_insn_is_ret called\n");
4698 return gdbarch->insn_is_ret (gdbarch, addr);
4702 set_gdbarch_insn_is_ret (struct gdbarch *gdbarch,
4703 gdbarch_insn_is_ret_ftype insn_is_ret)
4705 gdbarch->insn_is_ret = insn_is_ret;
4709 gdbarch_insn_is_jump (struct gdbarch *gdbarch, CORE_ADDR addr)
4711 gdb_assert (gdbarch != NULL);
4712 gdb_assert (gdbarch->insn_is_jump != NULL);
4713 if (gdbarch_debug >= 2)
4714 fprintf_unfiltered (gdb_stdlog, "gdbarch_insn_is_jump called\n");
4715 return gdbarch->insn_is_jump (gdbarch, addr);
4719 set_gdbarch_insn_is_jump (struct gdbarch *gdbarch,
4720 gdbarch_insn_is_jump_ftype insn_is_jump)
4722 gdbarch->insn_is_jump = insn_is_jump;
4726 gdbarch_auxv_parse_p (struct gdbarch *gdbarch)
4728 gdb_assert (gdbarch != NULL);
4729 return gdbarch->auxv_parse != NULL;
4733 gdbarch_auxv_parse (struct gdbarch *gdbarch, gdb_byte **readptr, gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp)
4735 gdb_assert (gdbarch != NULL);
4736 gdb_assert (gdbarch->auxv_parse != NULL);
4737 if (gdbarch_debug >= 2)
4738 fprintf_unfiltered (gdb_stdlog, "gdbarch_auxv_parse called\n");
4739 return gdbarch->auxv_parse (gdbarch, readptr, endptr, typep, valp);
4743 set_gdbarch_auxv_parse (struct gdbarch *gdbarch,
4744 gdbarch_auxv_parse_ftype auxv_parse)
4746 gdbarch->auxv_parse = auxv_parse;
4750 gdbarch_vsyscall_range (struct gdbarch *gdbarch, struct mem_range *range)
4752 gdb_assert (gdbarch != NULL);
4753 gdb_assert (gdbarch->vsyscall_range != NULL);
4754 if (gdbarch_debug >= 2)
4755 fprintf_unfiltered (gdb_stdlog, "gdbarch_vsyscall_range called\n");
4756 return gdbarch->vsyscall_range (gdbarch, range);
4760 set_gdbarch_vsyscall_range (struct gdbarch *gdbarch,
4761 gdbarch_vsyscall_range_ftype vsyscall_range)
4763 gdbarch->vsyscall_range = vsyscall_range;
4767 gdbarch_infcall_mmap (struct gdbarch *gdbarch, CORE_ADDR size, unsigned prot)
4769 gdb_assert (gdbarch != NULL);
4770 gdb_assert (gdbarch->infcall_mmap != NULL);
4771 if (gdbarch_debug >= 2)
4772 fprintf_unfiltered (gdb_stdlog, "gdbarch_infcall_mmap called\n");
4773 return gdbarch->infcall_mmap (size, prot);
4777 set_gdbarch_infcall_mmap (struct gdbarch *gdbarch,
4778 gdbarch_infcall_mmap_ftype infcall_mmap)
4780 gdbarch->infcall_mmap = infcall_mmap;
4784 gdbarch_infcall_munmap (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR size)
4786 gdb_assert (gdbarch != NULL);
4787 gdb_assert (gdbarch->infcall_munmap != NULL);
4788 if (gdbarch_debug >= 2)
4789 fprintf_unfiltered (gdb_stdlog, "gdbarch_infcall_munmap called\n");
4790 gdbarch->infcall_munmap (addr, size);
4794 set_gdbarch_infcall_munmap (struct gdbarch *gdbarch,
4795 gdbarch_infcall_munmap_ftype infcall_munmap)
4797 gdbarch->infcall_munmap = infcall_munmap;
4801 gdbarch_gcc_target_options (struct gdbarch *gdbarch)
4803 gdb_assert (gdbarch != NULL);
4804 gdb_assert (gdbarch->gcc_target_options != NULL);
4805 if (gdbarch_debug >= 2)
4806 fprintf_unfiltered (gdb_stdlog, "gdbarch_gcc_target_options called\n");
4807 return gdbarch->gcc_target_options (gdbarch);
4811 set_gdbarch_gcc_target_options (struct gdbarch *gdbarch,
4812 gdbarch_gcc_target_options_ftype gcc_target_options)
4814 gdbarch->gcc_target_options = gcc_target_options;
4818 gdbarch_gnu_triplet_regexp (struct gdbarch *gdbarch)
4820 gdb_assert (gdbarch != NULL);
4821 gdb_assert (gdbarch->gnu_triplet_regexp != NULL);
4822 if (gdbarch_debug >= 2)
4823 fprintf_unfiltered (gdb_stdlog, "gdbarch_gnu_triplet_regexp called\n");
4824 return gdbarch->gnu_triplet_regexp (gdbarch);
4828 set_gdbarch_gnu_triplet_regexp (struct gdbarch *gdbarch,
4829 gdbarch_gnu_triplet_regexp_ftype gnu_triplet_regexp)
4831 gdbarch->gnu_triplet_regexp = gnu_triplet_regexp;
4835 gdbarch_addressable_memory_unit_size (struct gdbarch *gdbarch)
4837 gdb_assert (gdbarch != NULL);
4838 gdb_assert (gdbarch->addressable_memory_unit_size != NULL);
4839 if (gdbarch_debug >= 2)
4840 fprintf_unfiltered (gdb_stdlog, "gdbarch_addressable_memory_unit_size called\n");
4841 return gdbarch->addressable_memory_unit_size (gdbarch);
4845 set_gdbarch_addressable_memory_unit_size (struct gdbarch *gdbarch,
4846 gdbarch_addressable_memory_unit_size_ftype addressable_memory_unit_size)
4848 gdbarch->addressable_memory_unit_size = addressable_memory_unit_size;
4852 /* Keep a registry of per-architecture data-pointers required by GDB
4859 gdbarch_data_pre_init_ftype *pre_init;
4860 gdbarch_data_post_init_ftype *post_init;
4863 struct gdbarch_data_registration
4865 struct gdbarch_data *data;
4866 struct gdbarch_data_registration *next;
4869 struct gdbarch_data_registry
4872 struct gdbarch_data_registration *registrations;
4875 struct gdbarch_data_registry gdbarch_data_registry =
4880 static struct gdbarch_data *
4881 gdbarch_data_register (gdbarch_data_pre_init_ftype *pre_init,
4882 gdbarch_data_post_init_ftype *post_init)
4884 struct gdbarch_data_registration **curr;
4886 /* Append the new registration. */
4887 for (curr = &gdbarch_data_registry.registrations;
4889 curr = &(*curr)->next);
4890 (*curr) = XNEW (struct gdbarch_data_registration);
4891 (*curr)->next = NULL;
4892 (*curr)->data = XNEW (struct gdbarch_data);
4893 (*curr)->data->index = gdbarch_data_registry.nr++;
4894 (*curr)->data->pre_init = pre_init;
4895 (*curr)->data->post_init = post_init;
4896 (*curr)->data->init_p = 1;
4897 return (*curr)->data;
4900 struct gdbarch_data *
4901 gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype *pre_init)
4903 return gdbarch_data_register (pre_init, NULL);
4906 struct gdbarch_data *
4907 gdbarch_data_register_post_init (gdbarch_data_post_init_ftype *post_init)
4909 return gdbarch_data_register (NULL, post_init);
4912 /* Create/delete the gdbarch data vector. */
4915 alloc_gdbarch_data (struct gdbarch *gdbarch)
4917 gdb_assert (gdbarch->data == NULL);
4918 gdbarch->nr_data = gdbarch_data_registry.nr;
4919 gdbarch->data = GDBARCH_OBSTACK_CALLOC (gdbarch, gdbarch->nr_data, void *);
4922 /* Initialize the current value of the specified per-architecture
4926 deprecated_set_gdbarch_data (struct gdbarch *gdbarch,
4927 struct gdbarch_data *data,
4930 gdb_assert (data->index < gdbarch->nr_data);
4931 gdb_assert (gdbarch->data[data->index] == NULL);
4932 gdb_assert (data->pre_init == NULL);
4933 gdbarch->data[data->index] = pointer;
4936 /* Return the current value of the specified per-architecture
4940 gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
4942 gdb_assert (data->index < gdbarch->nr_data);
4943 if (gdbarch->data[data->index] == NULL)
4945 /* The data-pointer isn't initialized, call init() to get a
4947 if (data->pre_init != NULL)
4948 /* Mid architecture creation: pass just the obstack, and not
4949 the entire architecture, as that way it isn't possible for
4950 pre-init code to refer to undefined architecture
4952 gdbarch->data[data->index] = data->pre_init (gdbarch->obstack);
4953 else if (gdbarch->initialized_p
4954 && data->post_init != NULL)
4955 /* Post architecture creation: pass the entire architecture
4956 (as all fields are valid), but be careful to also detect
4957 recursive references. */
4959 gdb_assert (data->init_p);
4961 gdbarch->data[data->index] = data->post_init (gdbarch);
4965 /* The architecture initialization hasn't completed - punt -
4966 hope that the caller knows what they are doing. Once
4967 deprecated_set_gdbarch_data has been initialized, this can be
4968 changed to an internal error. */
4970 gdb_assert (gdbarch->data[data->index] != NULL);
4972 return gdbarch->data[data->index];
4976 /* Keep a registry of the architectures known by GDB. */
4978 struct gdbarch_registration
4980 enum bfd_architecture bfd_architecture;
4981 gdbarch_init_ftype *init;
4982 gdbarch_dump_tdep_ftype *dump_tdep;
4983 struct gdbarch_list *arches;
4984 struct gdbarch_registration *next;
4987 static struct gdbarch_registration *gdbarch_registry = NULL;
4990 append_name (const char ***buf, int *nr, const char *name)
4992 *buf = XRESIZEVEC (const char *, *buf, *nr + 1);
4998 gdbarch_printable_names (void)
5000 /* Accumulate a list of names based on the registed list of
5003 const char **arches = NULL;
5004 struct gdbarch_registration *rego;
5006 for (rego = gdbarch_registry;
5010 const struct bfd_arch_info *ap;
5011 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
5013 internal_error (__FILE__, __LINE__,
5014 _("gdbarch_architecture_names: multi-arch unknown"));
5017 append_name (&arches, &nr_arches, ap->printable_name);
5022 append_name (&arches, &nr_arches, NULL);
5028 gdbarch_register (enum bfd_architecture bfd_architecture,
5029 gdbarch_init_ftype *init,
5030 gdbarch_dump_tdep_ftype *dump_tdep)
5032 struct gdbarch_registration **curr;
5033 const struct bfd_arch_info *bfd_arch_info;
5035 /* Check that BFD recognizes this architecture */
5036 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
5037 if (bfd_arch_info == NULL)
5039 internal_error (__FILE__, __LINE__,
5040 _("gdbarch: Attempt to register "
5041 "unknown architecture (%d)"),
5044 /* Check that we haven't seen this architecture before. */
5045 for (curr = &gdbarch_registry;
5047 curr = &(*curr)->next)
5049 if (bfd_architecture == (*curr)->bfd_architecture)
5050 internal_error (__FILE__, __LINE__,
5051 _("gdbarch: Duplicate registration "
5052 "of architecture (%s)"),
5053 bfd_arch_info->printable_name);
5057 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, %s)\n",
5058 bfd_arch_info->printable_name,
5059 host_address_to_string (init));
5061 (*curr) = XNEW (struct gdbarch_registration);
5062 (*curr)->bfd_architecture = bfd_architecture;
5063 (*curr)->init = init;
5064 (*curr)->dump_tdep = dump_tdep;
5065 (*curr)->arches = NULL;
5066 (*curr)->next = NULL;
5070 register_gdbarch_init (enum bfd_architecture bfd_architecture,
5071 gdbarch_init_ftype *init)
5073 gdbarch_register (bfd_architecture, init, NULL);
5077 /* Look for an architecture using gdbarch_info. */
5079 struct gdbarch_list *
5080 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
5081 const struct gdbarch_info *info)
5083 for (; arches != NULL; arches = arches->next)
5085 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
5087 if (info->byte_order != arches->gdbarch->byte_order)
5089 if (info->osabi != arches->gdbarch->osabi)
5091 if (info->target_desc != arches->gdbarch->target_desc)
5099 /* Find an architecture that matches the specified INFO. Create a new
5100 architecture if needed. Return that new architecture. */
5103 gdbarch_find_by_info (struct gdbarch_info info)
5105 struct gdbarch *new_gdbarch;
5106 struct gdbarch_registration *rego;
5108 /* Fill in missing parts of the INFO struct using a number of
5109 sources: "set ..."; INFOabfd supplied; and the global
5111 gdbarch_info_fill (&info);
5113 /* Must have found some sort of architecture. */
5114 gdb_assert (info.bfd_arch_info != NULL);
5118 fprintf_unfiltered (gdb_stdlog,
5119 "gdbarch_find_by_info: info.bfd_arch_info %s\n",
5120 (info.bfd_arch_info != NULL
5121 ? info.bfd_arch_info->printable_name
5123 fprintf_unfiltered (gdb_stdlog,
5124 "gdbarch_find_by_info: info.byte_order %d (%s)\n",
5126 (info.byte_order == BFD_ENDIAN_BIG ? "big"
5127 : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
5129 fprintf_unfiltered (gdb_stdlog,
5130 "gdbarch_find_by_info: info.osabi %d (%s)\n",
5131 info.osabi, gdbarch_osabi_name (info.osabi));
5132 fprintf_unfiltered (gdb_stdlog,
5133 "gdbarch_find_by_info: info.abfd %s\n",
5134 host_address_to_string (info.abfd));
5135 fprintf_unfiltered (gdb_stdlog,
5136 "gdbarch_find_by_info: info.tdep_info %s\n",
5137 host_address_to_string (info.tdep_info));
5140 /* Find the tdep code that knows about this architecture. */
5141 for (rego = gdbarch_registry;
5144 if (rego->bfd_architecture == info.bfd_arch_info->arch)
5149 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
5150 "No matching architecture\n");
5154 /* Ask the tdep code for an architecture that matches "info". */
5155 new_gdbarch = rego->init (info, rego->arches);
5157 /* Did the tdep code like it? No. Reject the change and revert to
5158 the old architecture. */
5159 if (new_gdbarch == NULL)
5162 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
5163 "Target rejected architecture\n");
5167 /* Is this a pre-existing architecture (as determined by already
5168 being initialized)? Move it to the front of the architecture
5169 list (keeping the list sorted Most Recently Used). */
5170 if (new_gdbarch->initialized_p)
5172 struct gdbarch_list **list;
5173 struct gdbarch_list *self;
5175 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
5176 "Previous architecture %s (%s) selected\n",
5177 host_address_to_string (new_gdbarch),
5178 new_gdbarch->bfd_arch_info->printable_name);
5179 /* Find the existing arch in the list. */
5180 for (list = ®o->arches;
5181 (*list) != NULL && (*list)->gdbarch != new_gdbarch;
5182 list = &(*list)->next);
5183 /* It had better be in the list of architectures. */
5184 gdb_assert ((*list) != NULL && (*list)->gdbarch == new_gdbarch);
5187 (*list) = self->next;
5188 /* Insert SELF at the front. */
5189 self->next = rego->arches;
5190 rego->arches = self;
5195 /* It's a new architecture. */
5197 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
5198 "New architecture %s (%s) selected\n",
5199 host_address_to_string (new_gdbarch),
5200 new_gdbarch->bfd_arch_info->printable_name);
5202 /* Insert the new architecture into the front of the architecture
5203 list (keep the list sorted Most Recently Used). */
5205 struct gdbarch_list *self = XNEW (struct gdbarch_list);
5206 self->next = rego->arches;
5207 self->gdbarch = new_gdbarch;
5208 rego->arches = self;
5211 /* Check that the newly installed architecture is valid. Plug in
5212 any post init values. */
5213 new_gdbarch->dump_tdep = rego->dump_tdep;
5214 verify_gdbarch (new_gdbarch);
5215 new_gdbarch->initialized_p = 1;
5218 gdbarch_dump (new_gdbarch, gdb_stdlog);
5223 /* Make the specified architecture current. */
5226 set_target_gdbarch (struct gdbarch *new_gdbarch)
5228 gdb_assert (new_gdbarch != NULL);
5229 gdb_assert (new_gdbarch->initialized_p);
5230 current_inferior ()->gdbarch = new_gdbarch;
5231 observer_notify_architecture_changed (new_gdbarch);
5232 registers_changed ();
5235 /* Return the current inferior's arch. */
5238 target_gdbarch (void)
5240 return current_inferior ()->gdbarch;
5243 extern void _initialize_gdbarch (void);
5246 _initialize_gdbarch (void)
5248 add_setshow_zuinteger_cmd ("arch", class_maintenance, &gdbarch_debug, _("\
5249 Set architecture debugging."), _("\
5250 Show architecture debugging."), _("\
5251 When non-zero, architecture debugging is enabled."),
5254 &setdebuglist, &showdebuglist);