gdb/gdbarch.c - gdb

Global variables defined

Data types defined

Functions defined

Macros defined

Source code

  1. /* *INDENT-OFF* */ /* THIS FILE IS GENERATED -*- buffer-read-only: t -*- */
  2. /* vi:set ro: */

  3. /* Dynamic architecture support for GDB, the GNU debugger.

  4.    Copyright (C) 1998-2015 Free Software Foundation, Inc.

  5.    This file is part of GDB.

  6.    This program is free software; you can redistribute it and/or modify
  7.    it under the terms of the GNU General Public License as published by
  8.    the Free Software Foundation; either version 3 of the License, or
  9.    (at your option) any later version.

  10.    This program is distributed in the hope that it will be useful,
  11.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.    GNU General Public License for more details.

  14.    You should have received a copy of the GNU General Public License
  15.    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */

  16. /* This file was created with the aid of ``gdbarch.sh''.

  17.    The Bourne shell script ``gdbarch.sh'' creates the files
  18.    ``new-gdbarch.c'' and ``new-gdbarch.h and then compares them
  19.    against the existing ``gdbarch.[hc]''.  Any differences found
  20.    being reported.

  21.    If editing this file, please also run gdbarch.sh and merge any
  22.    changes into that script. Conversely, when making sweeping changes
  23.    to this file, modifying gdbarch.sh and using its output may prove
  24.    easier.  */


  25. #include "defs.h"
  26. #include "arch-utils.h"

  27. #include "gdbcmd.h"
  28. #include "inferior.h"
  29. #include "symcat.h"

  30. #include "floatformat.h"
  31. #include "reggroups.h"
  32. #include "osabi.h"
  33. #include "gdb_obstack.h"
  34. #include "observer.h"
  35. #include "regcache.h"
  36. #include "objfiles.h"

  37. /* Static function declarations */

  38. static void alloc_gdbarch_data (struct gdbarch *);

  39. /* Non-zero if we want to trace architecture code.  */

  40. #ifndef GDBARCH_DEBUG
  41. #define GDBARCH_DEBUG 0
  42. #endif
  43. unsigned int gdbarch_debug = GDBARCH_DEBUG;
  44. static void
  45. show_gdbarch_debug (struct ui_file *file, int from_tty,
  46.                     struct cmd_list_element *c, const char *value)
  47. {
  48.   fprintf_filtered (file, _("Architecture debugging is %s.\n"), value);
  49. }

  50. static const char *
  51. pformat (const struct floatformat **format)
  52. {
  53.   if (format == NULL)
  54.     return "(null)";
  55.   else
  56.     /* Just print out one of them - this is only for diagnostics.  */
  57.     return format[0]->name;
  58. }

  59. static const char *
  60. pstring (const char *string)
  61. {
  62.   if (string == NULL)
  63.     return "(null)";
  64.   return string;
  65. }

  66. /* Helper function to print a list of strings, represented as "const
  67.    char *const *".  The list is printed comma-separated.  */

  68. static char *
  69. pstring_list (const char *const *list)
  70. {
  71.   static char ret[100];
  72.   const char *const *p;
  73.   size_t offset = 0;

  74.   if (list == NULL)
  75.     return "(null)";

  76.   ret[0] = '\0';
  77.   for (p = list; *p != NULL && offset < sizeof (ret); ++p)
  78.     {
  79.       size_t s = xsnprintf (ret + offset, sizeof (ret) - offset, "%s, ", *p);
  80.       offset += 2 + s;
  81.     }

  82.   if (offset > 0)
  83.     {
  84.       gdb_assert (offset - 2 < sizeof (ret));
  85.       ret[offset - 2] = '\0';
  86.     }

  87.   return ret;
  88. }


  89. /* Maintain the struct gdbarch object.  */

  90. struct gdbarch
  91. {
  92.   /* Has this architecture been fully initialized?  */
  93.   int initialized_p;

  94.   /* An obstack bound to the lifetime of the architecture.  */
  95.   struct obstack *obstack;

  96.   /* basic architectural information.  */
  97.   const struct bfd_arch_info * bfd_arch_info;
  98.   enum bfd_endian byte_order;
  99.   enum bfd_endian byte_order_for_code;
  100.   enum gdb_osabi osabi;
  101.   const struct target_desc * target_desc;

  102.   /* target specific vector.  */
  103.   struct gdbarch_tdep *tdep;
  104.   gdbarch_dump_tdep_ftype *dump_tdep;

  105.   /* per-architecture data-pointers.  */
  106.   unsigned nr_data;
  107.   void **data;

  108.   /* Multi-arch values.

  109.      When extending this structure you must:

  110.      Add the field below.

  111.      Declare set/get functions and define the corresponding
  112.      macro in gdbarch.h.

  113.      gdbarch_alloc(): If zero/NULL is not a suitable default,
  114.      initialize the new field.

  115.      verify_gdbarch(): Confirm that the target updated the field
  116.      correctly.

  117.      gdbarch_dump(): Add a fprintf_unfiltered call so that the new
  118.      field is dumped out

  119.      get_gdbarch(): Implement the set/get functions (probably using
  120.      the macro's as shortcuts).

  121.      */

  122.   int bits_big_endian;
  123.   int short_bit;
  124.   int int_bit;
  125.   int long_bit;
  126.   int long_long_bit;
  127.   int long_long_align_bit;
  128.   int half_bit;
  129.   const struct floatformat ** half_format;
  130.   int float_bit;
  131.   const struct floatformat ** float_format;
  132.   int double_bit;
  133.   const struct floatformat ** double_format;
  134.   int long_double_bit;
  135.   const struct floatformat ** long_double_format;
  136.   int ptr_bit;
  137.   int addr_bit;
  138.   int dwarf2_addr_size;
  139.   int char_signed;
  140.   gdbarch_read_pc_ftype *read_pc;
  141.   gdbarch_write_pc_ftype *write_pc;
  142.   gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer;
  143.   gdbarch_pseudo_register_read_ftype *pseudo_register_read;
  144.   gdbarch_pseudo_register_read_value_ftype *pseudo_register_read_value;
  145.   gdbarch_pseudo_register_write_ftype *pseudo_register_write;
  146.   int num_regs;
  147.   int num_pseudo_regs;
  148.   gdbarch_ax_pseudo_register_collect_ftype *ax_pseudo_register_collect;
  149.   gdbarch_ax_pseudo_register_push_stack_ftype *ax_pseudo_register_push_stack;
  150.   int sp_regnum;
  151.   int pc_regnum;
  152.   int ps_regnum;
  153.   int fp0_regnum;
  154.   gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum;
  155.   gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum;
  156.   gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum;
  157.   gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum;
  158.   gdbarch_register_name_ftype *register_name;
  159.   gdbarch_register_type_ftype *register_type;
  160.   gdbarch_dummy_id_ftype *dummy_id;
  161.   int deprecated_fp_regnum;
  162.   gdbarch_push_dummy_call_ftype *push_dummy_call;
  163.   int call_dummy_location;
  164.   gdbarch_push_dummy_code_ftype *push_dummy_code;
  165.   gdbarch_print_registers_info_ftype *print_registers_info;
  166.   gdbarch_print_float_info_ftype *print_float_info;
  167.   gdbarch_print_vector_info_ftype *print_vector_info;
  168.   gdbarch_register_sim_regno_ftype *register_sim_regno;
  169.   gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
  170.   gdbarch_cannot_store_register_ftype *cannot_store_register;
  171.   gdbarch_get_longjmp_target_ftype *get_longjmp_target;
  172.   int believe_pcc_promotion;
  173.   gdbarch_convert_register_p_ftype *convert_register_p;
  174.   gdbarch_register_to_value_ftype *register_to_value;
  175.   gdbarch_value_to_register_ftype *value_to_register;
  176.   gdbarch_value_from_register_ftype *value_from_register;
  177.   gdbarch_pointer_to_address_ftype *pointer_to_address;
  178.   gdbarch_address_to_pointer_ftype *address_to_pointer;
  179.   gdbarch_integer_to_address_ftype *integer_to_address;
  180.   gdbarch_return_value_ftype *return_value;
  181.   gdbarch_return_in_first_hidden_param_p_ftype *return_in_first_hidden_param_p;
  182.   gdbarch_skip_prologue_ftype *skip_prologue;
  183.   gdbarch_skip_main_prologue_ftype *skip_main_prologue;
  184.   gdbarch_skip_entrypoint_ftype *skip_entrypoint;
  185.   gdbarch_inner_than_ftype *inner_than;
  186.   gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
  187.   gdbarch_remote_breakpoint_from_pc_ftype *remote_breakpoint_from_pc;
  188.   gdbarch_adjust_breakpoint_address_ftype *adjust_breakpoint_address;
  189.   gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
  190.   gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
  191.   CORE_ADDR decr_pc_after_break;
  192.   CORE_ADDR deprecated_function_start_offset;
  193.   gdbarch_remote_register_number_ftype *remote_register_number;
  194.   gdbarch_fetch_tls_load_module_address_ftype *fetch_tls_load_module_address;
  195.   CORE_ADDR frame_args_skip;
  196.   gdbarch_unwind_pc_ftype *unwind_pc;
  197.   gdbarch_unwind_sp_ftype *unwind_sp;
  198.   gdbarch_frame_num_args_ftype *frame_num_args;
  199.   gdbarch_frame_align_ftype *frame_align;
  200.   gdbarch_stabs_argument_has_addr_ftype *stabs_argument_has_addr;
  201.   int frame_red_zone_size;
  202.   gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
  203.   gdbarch_addr_bits_remove_ftype *addr_bits_remove;
  204.   gdbarch_software_single_step_ftype *software_single_step;
  205.   gdbarch_single_step_through_delay_ftype *single_step_through_delay;
  206.   gdbarch_print_insn_ftype *print_insn;
  207.   gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
  208.   gdbarch_skip_solib_resolver_ftype *skip_solib_resolver;
  209.   gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
  210.   gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p;
  211.   gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
  212.   gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
  213.   gdbarch_make_symbol_special_ftype *make_symbol_special;
  214.   gdbarch_adjust_dwarf2_addr_ftype *adjust_dwarf2_addr;
  215.   gdbarch_adjust_dwarf2_line_ftype *adjust_dwarf2_line;
  216.   int cannot_step_breakpoint;
  217.   int have_nonsteppable_watchpoint;
  218.   gdbarch_address_class_type_flags_ftype *address_class_type_flags;
  219.   gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name;
  220.   gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
  221.   gdbarch_register_reggroup_p_ftype *register_reggroup_p;
  222.   gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument;
  223.   gdbarch_iterate_over_regset_sections_ftype *iterate_over_regset_sections;
  224.   gdbarch_make_corefile_notes_ftype *make_corefile_notes;
  225.   gdbarch_elfcore_write_linux_prpsinfo_ftype *elfcore_write_linux_prpsinfo;
  226.   gdbarch_find_memory_regions_ftype *find_memory_regions;
  227.   gdbarch_core_xfer_shared_libraries_ftype *core_xfer_shared_libraries;
  228.   gdbarch_core_xfer_shared_libraries_aix_ftype *core_xfer_shared_libraries_aix;
  229.   gdbarch_core_pid_to_str_ftype *core_pid_to_str;
  230.   const char * gcore_bfd_target;
  231.   int vtable_function_descriptors;
  232.   int vbit_in_delta;
  233.   gdbarch_skip_permanent_breakpoint_ftype *skip_permanent_breakpoint;
  234.   ULONGEST max_insn_length;
  235.   gdbarch_displaced_step_copy_insn_ftype *displaced_step_copy_insn;
  236.   gdbarch_displaced_step_hw_singlestep_ftype *displaced_step_hw_singlestep;
  237.   gdbarch_displaced_step_fixup_ftype *displaced_step_fixup;
  238.   gdbarch_displaced_step_free_closure_ftype *displaced_step_free_closure;
  239.   gdbarch_displaced_step_location_ftype *displaced_step_location;
  240.   gdbarch_relocate_instruction_ftype *relocate_instruction;
  241.   gdbarch_overlay_update_ftype *overlay_update;
  242.   gdbarch_core_read_description_ftype *core_read_description;
  243.   gdbarch_static_transform_name_ftype *static_transform_name;
  244.   int sofun_address_maybe_missing;
  245.   gdbarch_process_record_ftype *process_record;
  246.   gdbarch_process_record_signal_ftype *process_record_signal;
  247.   gdbarch_gdb_signal_from_target_ftype *gdb_signal_from_target;
  248.   gdbarch_gdb_signal_to_target_ftype *gdb_signal_to_target;
  249.   gdbarch_get_siginfo_type_ftype *get_siginfo_type;
  250.   gdbarch_record_special_symbol_ftype *record_special_symbol;
  251.   gdbarch_get_syscall_number_ftype *get_syscall_number;
  252.   const char * xml_syscall_file;
  253.   struct syscalls_info * syscalls_info;
  254.   const char *const * stap_integer_prefixes;
  255.   const char *const * stap_integer_suffixes;
  256.   const char *const * stap_register_prefixes;
  257.   const char *const * stap_register_suffixes;
  258.   const char *const * stap_register_indirection_prefixes;
  259.   const char *const * stap_register_indirection_suffixes;
  260.   const char * stap_gdb_register_prefix;
  261.   const char * stap_gdb_register_suffix;
  262.   gdbarch_stap_is_single_operand_ftype *stap_is_single_operand;
  263.   gdbarch_stap_parse_special_token_ftype *stap_parse_special_token;
  264.   int has_global_solist;
  265.   int has_global_breakpoints;
  266.   gdbarch_has_shared_address_space_ftype *has_shared_address_space;
  267.   gdbarch_fast_tracepoint_valid_at_ftype *fast_tracepoint_valid_at;
  268.   gdbarch_auto_charset_ftype *auto_charset;
  269.   gdbarch_auto_wide_charset_ftype *auto_wide_charset;
  270.   const char * solib_symbols_extension;
  271.   int has_dos_based_file_system;
  272.   gdbarch_gen_return_address_ftype *gen_return_address;
  273.   gdbarch_info_proc_ftype *info_proc;
  274.   gdbarch_core_info_proc_ftype *core_info_proc;
  275.   gdbarch_iterate_over_objfiles_in_search_order_ftype *iterate_over_objfiles_in_search_order;
  276.   struct ravenscar_arch_ops * ravenscar_ops;
  277.   gdbarch_insn_is_call_ftype *insn_is_call;
  278.   gdbarch_insn_is_ret_ftype *insn_is_ret;
  279.   gdbarch_insn_is_jump_ftype *insn_is_jump;
  280.   gdbarch_auxv_parse_ftype *auxv_parse;
  281.   gdbarch_vsyscall_range_ftype *vsyscall_range;
  282.   gdbarch_infcall_mmap_ftype *infcall_mmap;
  283.   gdbarch_gcc_target_options_ftype *gcc_target_options;
  284.   gdbarch_gnu_triplet_regexp_ftype *gnu_triplet_regexp;
  285. };

  286. /* Create a new ``struct gdbarch'' based on information provided by
  287.    ``struct gdbarch_info''.  */

  288. struct gdbarch *
  289. gdbarch_alloc (const struct gdbarch_info *info,
  290.                struct gdbarch_tdep *tdep)
  291. {
  292.   struct gdbarch *gdbarch;

  293.   /* Create an obstack for allocating all the per-architecture memory,
  294.      then use that to allocate the architecture vector.  */
  295.   struct obstack *obstack = XNEW (struct obstack);
  296.   obstack_init (obstack);
  297.   gdbarch = obstack_alloc (obstack, sizeof (*gdbarch));
  298.   memset (gdbarch, 0, sizeof (*gdbarch));
  299.   gdbarch->obstack = obstack;

  300.   alloc_gdbarch_data (gdbarch);

  301.   gdbarch->tdep = tdep;

  302.   gdbarch->bfd_arch_info = info->bfd_arch_info;
  303.   gdbarch->byte_order = info->byte_order;
  304.   gdbarch->byte_order_for_code = info->byte_order_for_code;
  305.   gdbarch->osabi = info->osabi;
  306.   gdbarch->target_desc = info->target_desc;

  307.   /* Force the explicit initialization of these.  */
  308.   gdbarch->bits_big_endian = (gdbarch->byte_order == BFD_ENDIAN_BIG);
  309.   gdbarch->short_bit = 2*TARGET_CHAR_BIT;
  310.   gdbarch->int_bit = 4*TARGET_CHAR_BIT;
  311.   gdbarch->long_bit = 4*TARGET_CHAR_BIT;
  312.   gdbarch->long_long_bit = 2*gdbarch->long_bit;
  313.   gdbarch->long_long_align_bit = 2*gdbarch->long_bit;
  314.   gdbarch->half_bit = 2*TARGET_CHAR_BIT;
  315.   gdbarch->float_bit = 4*TARGET_CHAR_BIT;
  316.   gdbarch->double_bit = 8*TARGET_CHAR_BIT;
  317.   gdbarch->long_double_bit = 8*TARGET_CHAR_BIT;
  318.   gdbarch->ptr_bit = gdbarch->int_bit;
  319.   gdbarch->char_signed = -1;
  320.   gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
  321.   gdbarch->num_regs = -1;
  322.   gdbarch->sp_regnum = -1;
  323.   gdbarch->pc_regnum = -1;
  324.   gdbarch->ps_regnum = -1;
  325.   gdbarch->fp0_regnum = -1;
  326.   gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
  327.   gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
  328.   gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
  329.   gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
  330.   gdbarch->deprecated_fp_regnum = -1;
  331.   gdbarch->call_dummy_location = AT_ENTRY_POINT;
  332.   gdbarch->print_registers_info = default_print_registers_info;
  333.   gdbarch->print_float_info = default_print_float_info;
  334.   gdbarch->register_sim_regno = legacy_register_sim_regno;
  335.   gdbarch->cannot_fetch_register = cannot_register_not;
  336.   gdbarch->cannot_store_register = cannot_register_not;
  337.   gdbarch->convert_register_p = generic_convert_register_p;
  338.   gdbarch->value_from_register = default_value_from_register;
  339.   gdbarch->pointer_to_address = unsigned_pointer_to_address;
  340.   gdbarch->address_to_pointer = unsigned_address_to_pointer;
  341.   gdbarch->return_in_first_hidden_param_p = default_return_in_first_hidden_param_p;
  342.   gdbarch->remote_breakpoint_from_pc = default_remote_breakpoint_from_pc;
  343.   gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
  344.   gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
  345.   gdbarch->remote_register_number = default_remote_register_number;
  346.   gdbarch->stabs_argument_has_addr = default_stabs_argument_has_addr;
  347.   gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr_identity;
  348.   gdbarch->addr_bits_remove = core_addr_identity;
  349.   gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
  350.   gdbarch->skip_solib_resolver = generic_skip_solib_resolver;
  351.   gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
  352.   gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
  353.   gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
  354.   gdbarch->make_symbol_special = default_make_symbol_special;
  355.   gdbarch->adjust_dwarf2_addr = default_adjust_dwarf2_addr;
  356.   gdbarch->adjust_dwarf2_line = default_adjust_dwarf2_line;
  357.   gdbarch->register_reggroup_p = default_register_reggroup_p;
  358.   gdbarch->skip_permanent_breakpoint = default_skip_permanent_breakpoint;
  359.   gdbarch->displaced_step_hw_singlestep = default_displaced_step_hw_singlestep;
  360.   gdbarch->displaced_step_fixup = NULL;
  361.   gdbarch->displaced_step_free_closure = NULL;
  362.   gdbarch->displaced_step_location = NULL;
  363.   gdbarch->relocate_instruction = NULL;
  364.   gdbarch->has_shared_address_space = default_has_shared_address_space;
  365.   gdbarch->fast_tracepoint_valid_at = default_fast_tracepoint_valid_at;
  366.   gdbarch->auto_charset = default_auto_charset;
  367.   gdbarch->auto_wide_charset = default_auto_wide_charset;
  368.   gdbarch->gen_return_address = default_gen_return_address;
  369.   gdbarch->iterate_over_objfiles_in_search_order = default_iterate_over_objfiles_in_search_order;
  370.   gdbarch->ravenscar_ops = NULL;
  371.   gdbarch->insn_is_call = default_insn_is_call;
  372.   gdbarch->insn_is_ret = default_insn_is_ret;
  373.   gdbarch->insn_is_jump = default_insn_is_jump;
  374.   gdbarch->vsyscall_range = default_vsyscall_range;
  375.   gdbarch->infcall_mmap = default_infcall_mmap;
  376.   gdbarch->gcc_target_options = default_gcc_target_options;
  377.   gdbarch->gnu_triplet_regexp = default_gnu_triplet_regexp;
  378.   /* gdbarch_alloc() */

  379.   return gdbarch;
  380. }


  381. /* Allocate extra space using the per-architecture obstack.  */

  382. void *
  383. gdbarch_obstack_zalloc (struct gdbarch *arch, long size)
  384. {
  385.   void *data = obstack_alloc (arch->obstack, size);

  386.   memset (data, 0, size);
  387.   return data;
  388. }


  389. /* Free a gdbarch struct.  This should never happen in normal
  390.    operation --- once you've created a gdbarch, you keep it around.
  391.    However, if an architecture's init function encounters an error
  392.    building the structure, it may need to clean up a partially
  393.    constructed gdbarch.  */

  394. void
  395. gdbarch_free (struct gdbarch *arch)
  396. {
  397.   struct obstack *obstack;

  398.   gdb_assert (arch != NULL);
  399.   gdb_assert (!arch->initialized_p);
  400.   obstack = arch->obstack;
  401.   obstack_free (obstack, 0); /* Includes the ARCH.  */
  402.   xfree (obstack);
  403. }


  404. /* Ensure that all values in a GDBARCH are reasonable.  */

  405. static void
  406. verify_gdbarch (struct gdbarch *gdbarch)
  407. {
  408.   struct ui_file *log;
  409.   struct cleanup *cleanups;
  410.   long length;
  411.   char *buf;

  412.   log = mem_fileopen ();
  413.   cleanups = make_cleanup_ui_file_delete (log);
  414.   /* fundamental */
  415.   if (gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
  416.     fprintf_unfiltered (log, "\n\tbyte-order");
  417.   if (gdbarch->bfd_arch_info == NULL)
  418.     fprintf_unfiltered (log, "\n\tbfd_arch_info");
  419.   /* Check those that need to be defined for the given multi-arch level.  */
  420.   /* Skip verify of bits_big_endian, invalid_p == 0 */
  421.   /* Skip verify of short_bit, invalid_p == 0 */
  422.   /* Skip verify of int_bit, invalid_p == 0 */
  423.   /* Skip verify of long_bit, invalid_p == 0 */
  424.   /* Skip verify of long_long_bit, invalid_p == 0 */
  425.   /* Skip verify of long_long_align_bit, invalid_p == 0 */
  426.   /* Skip verify of half_bit, invalid_p == 0 */
  427.   if (gdbarch->half_format == 0)
  428.     gdbarch->half_format = floatformats_ieee_half;
  429.   /* Skip verify of float_bit, invalid_p == 0 */
  430.   if (gdbarch->float_format == 0)
  431.     gdbarch->float_format = floatformats_ieee_single;
  432.   /* Skip verify of double_bit, invalid_p == 0 */
  433.   if (gdbarch->double_format == 0)
  434.     gdbarch->double_format = floatformats_ieee_double;
  435.   /* Skip verify of long_double_bit, invalid_p == 0 */
  436.   if (gdbarch->long_double_format == 0)
  437.     gdbarch->long_double_format = floatformats_ieee_double;
  438.   /* Skip verify of ptr_bit, invalid_p == 0 */
  439.   if (gdbarch->addr_bit == 0)
  440.     gdbarch->addr_bit = gdbarch_ptr_bit (gdbarch);
  441.   if (gdbarch->dwarf2_addr_size == 0)
  442.     gdbarch->dwarf2_addr_size = gdbarch_ptr_bit (gdbarch) / TARGET_CHAR_BIT;
  443.   if (gdbarch->char_signed == -1)
  444.     gdbarch->char_signed = 1;
  445.   /* Skip verify of read_pc, has predicate.  */
  446.   /* Skip verify of write_pc, has predicate.  */
  447.   /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
  448.   /* Skip verify of pseudo_register_read, has predicate.  */
  449.   /* Skip verify of pseudo_register_read_value, has predicate.  */
  450.   /* Skip verify of pseudo_register_write, has predicate.  */
  451.   if (gdbarch->num_regs == -1)
  452.     fprintf_unfiltered (log, "\n\tnum_regs");
  453.   /* Skip verify of num_pseudo_regs, invalid_p == 0 */
  454.   /* Skip verify of ax_pseudo_register_collect, has predicate.  */
  455.   /* Skip verify of ax_pseudo_register_push_stack, has predicate.  */
  456.   /* Skip verify of sp_regnum, invalid_p == 0 */
  457.   /* Skip verify of pc_regnum, invalid_p == 0 */
  458.   /* Skip verify of ps_regnum, invalid_p == 0 */
  459.   /* Skip verify of fp0_regnum, invalid_p == 0 */
  460.   /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
  461.   /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
  462.   /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
  463.   /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
  464.   if (gdbarch->register_name == 0)
  465.     fprintf_unfiltered (log, "\n\tregister_name");
  466.   /* Skip verify of register_type, has predicate.  */
  467.   /* Skip verify of dummy_id, has predicate.  */
  468.   /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
  469.   /* Skip verify of push_dummy_call, has predicate.  */
  470.   /* Skip verify of call_dummy_location, invalid_p == 0 */
  471.   /* Skip verify of push_dummy_code, has predicate.  */
  472.   /* Skip verify of print_registers_info, invalid_p == 0 */
  473.   /* Skip verify of print_float_info, invalid_p == 0 */
  474.   /* Skip verify of print_vector_info, has predicate.  */
  475.   /* Skip verify of register_sim_regno, invalid_p == 0 */
  476.   /* Skip verify of cannot_fetch_register, invalid_p == 0 */
  477.   /* Skip verify of cannot_store_register, invalid_p == 0 */
  478.   /* Skip verify of get_longjmp_target, has predicate.  */
  479.   /* Skip verify of convert_register_p, invalid_p == 0 */
  480.   /* Skip verify of value_from_register, invalid_p == 0 */
  481.   /* Skip verify of pointer_to_address, invalid_p == 0 */
  482.   /* Skip verify of address_to_pointer, invalid_p == 0 */
  483.   /* Skip verify of integer_to_address, has predicate.  */
  484.   /* Skip verify of return_value, has predicate.  */
  485.   /* Skip verify of return_in_first_hidden_param_p, invalid_p == 0 */
  486.   if (gdbarch->skip_prologue == 0)
  487.     fprintf_unfiltered (log, "\n\tskip_prologue");
  488.   /* Skip verify of skip_main_prologue, has predicate.  */
  489.   /* Skip verify of skip_entrypoint, has predicate.  */
  490.   if (gdbarch->inner_than == 0)
  491.     fprintf_unfiltered (log, "\n\tinner_than");
  492.   if (gdbarch->breakpoint_from_pc == 0)
  493.     fprintf_unfiltered (log, "\n\tbreakpoint_from_pc");
  494.   /* Skip verify of remote_breakpoint_from_pc, invalid_p == 0 */
  495.   /* Skip verify of adjust_breakpoint_address, has predicate.  */
  496.   /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
  497.   /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
  498.   /* Skip verify of decr_pc_after_break, invalid_p == 0 */
  499.   /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
  500.   /* Skip verify of remote_register_number, invalid_p == 0 */
  501.   /* Skip verify of fetch_tls_load_module_address, has predicate.  */
  502.   /* Skip verify of frame_args_skip, invalid_p == 0 */
  503.   /* Skip verify of unwind_pc, has predicate.  */
  504.   /* Skip verify of unwind_sp, has predicate.  */
  505.   /* Skip verify of frame_num_args, has predicate.  */
  506.   /* Skip verify of frame_align, has predicate.  */
  507.   /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
  508.   /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
  509.   /* Skip verify of addr_bits_remove, invalid_p == 0 */
  510.   /* Skip verify of software_single_step, has predicate.  */
  511.   /* Skip verify of single_step_through_delay, has predicate.  */
  512.   if (gdbarch->print_insn == 0)
  513.     fprintf_unfiltered (log, "\n\tprint_insn");
  514.   /* Skip verify of skip_trampoline_code, invalid_p == 0 */
  515.   /* Skip verify of skip_solib_resolver, invalid_p == 0 */
  516.   /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
  517.   /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
  518.   /* Skip verify of elf_make_msymbol_special, has predicate.  */
  519.   /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
  520.   /* Skip verify of make_symbol_special, invalid_p == 0 */
  521.   /* Skip verify of adjust_dwarf2_addr, invalid_p == 0 */
  522.   /* Skip verify of adjust_dwarf2_line, invalid_p == 0 */
  523.   /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
  524.   /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
  525.   /* Skip verify of address_class_type_flags, has predicate.  */
  526.   /* Skip verify of address_class_type_flags_to_name, has predicate.  */
  527.   /* Skip verify of address_class_name_to_type_flags, has predicate.  */
  528.   /* Skip verify of register_reggroup_p, invalid_p == 0 */
  529.   /* Skip verify of fetch_pointer_argument, has predicate.  */
  530.   /* Skip verify of iterate_over_regset_sections, has predicate.  */
  531.   /* Skip verify of make_corefile_notes, has predicate.  */
  532.   /* Skip verify of elfcore_write_linux_prpsinfo, has predicate.  */
  533.   /* Skip verify of find_memory_regions, has predicate.  */
  534.   /* Skip verify of core_xfer_shared_libraries, has predicate.  */
  535.   /* Skip verify of core_xfer_shared_libraries_aix, has predicate.  */
  536.   /* Skip verify of core_pid_to_str, has predicate.  */
  537.   /* Skip verify of gcore_bfd_target, has predicate.  */
  538.   /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
  539.   /* Skip verify of vbit_in_delta, invalid_p == 0 */
  540.   /* Skip verify of skip_permanent_breakpoint, invalid_p == 0 */
  541.   /* Skip verify of max_insn_length, has predicate.  */
  542.   /* Skip verify of displaced_step_copy_insn, has predicate.  */
  543.   /* Skip verify of displaced_step_hw_singlestep, invalid_p == 0 */
  544.   /* Skip verify of displaced_step_fixup, has predicate.  */
  545.   if ((! gdbarch->displaced_step_free_closure) != (! gdbarch->displaced_step_copy_insn))
  546.     fprintf_unfiltered (log, "\n\tdisplaced_step_free_closure");
  547.   if ((! gdbarch->displaced_step_location) != (! gdbarch->displaced_step_copy_insn))
  548.     fprintf_unfiltered (log, "\n\tdisplaced_step_location");
  549.   /* Skip verify of relocate_instruction, has predicate.  */
  550.   /* Skip verify of overlay_update, has predicate.  */
  551.   /* Skip verify of core_read_description, has predicate.  */
  552.   /* Skip verify of static_transform_name, has predicate.  */
  553.   /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
  554.   /* Skip verify of process_record, has predicate.  */
  555.   /* Skip verify of process_record_signal, has predicate.  */
  556.   /* Skip verify of gdb_signal_from_target, has predicate.  */
  557.   /* Skip verify of gdb_signal_to_target, has predicate.  */
  558.   /* Skip verify of get_siginfo_type, has predicate.  */
  559.   /* Skip verify of record_special_symbol, has predicate.  */
  560.   /* Skip verify of get_syscall_number, has predicate.  */
  561.   /* Skip verify of xml_syscall_file, invalid_p == 0 */
  562.   /* Skip verify of syscalls_info, invalid_p == 0 */
  563.   /* Skip verify of stap_integer_prefixes, invalid_p == 0 */
  564.   /* Skip verify of stap_integer_suffixes, invalid_p == 0 */
  565.   /* Skip verify of stap_register_prefixes, invalid_p == 0 */
  566.   /* Skip verify of stap_register_suffixes, invalid_p == 0 */
  567.   /* Skip verify of stap_register_indirection_prefixes, invalid_p == 0 */
  568.   /* Skip verify of stap_register_indirection_suffixes, invalid_p == 0 */
  569.   /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */
  570.   /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */
  571.   /* Skip verify of stap_is_single_operand, has predicate.  */
  572.   /* Skip verify of stap_parse_special_token, has predicate.  */
  573.   /* Skip verify of has_global_solist, invalid_p == 0 */
  574.   /* Skip verify of has_global_breakpoints, invalid_p == 0 */
  575.   /* Skip verify of has_shared_address_space, invalid_p == 0 */
  576.   /* Skip verify of fast_tracepoint_valid_at, invalid_p == 0 */
  577.   /* Skip verify of auto_charset, invalid_p == 0 */
  578.   /* Skip verify of auto_wide_charset, invalid_p == 0 */
  579.   /* Skip verify of has_dos_based_file_system, invalid_p == 0 */
  580.   /* Skip verify of gen_return_address, invalid_p == 0 */
  581.   /* Skip verify of info_proc, has predicate.  */
  582.   /* Skip verify of core_info_proc, has predicate.  */
  583.   /* Skip verify of iterate_over_objfiles_in_search_order, invalid_p == 0 */
  584.   /* Skip verify of ravenscar_ops, invalid_p == 0 */
  585.   /* Skip verify of insn_is_call, invalid_p == 0 */
  586.   /* Skip verify of insn_is_ret, invalid_p == 0 */
  587.   /* Skip verify of insn_is_jump, invalid_p == 0 */
  588.   /* Skip verify of auxv_parse, has predicate.  */
  589.   /* Skip verify of vsyscall_range, invalid_p == 0 */
  590.   /* Skip verify of infcall_mmap, invalid_p == 0 */
  591.   /* Skip verify of gcc_target_options, invalid_p == 0 */
  592.   /* Skip verify of gnu_triplet_regexp, invalid_p == 0 */
  593.   buf = ui_file_xstrdup (log, &length);
  594.   make_cleanup (xfree, buf);
  595.   if (length > 0)
  596.     internal_error (__FILE__, __LINE__,
  597.                     _("verify_gdbarch: the following are invalid ...%s"),
  598.                     buf);
  599.   do_cleanups (cleanups);
  600. }


  601. /* Print out the details of the current architecture.  */

  602. void
  603. gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
  604. {
  605.   const char *gdb_nm_file = "<not-defined>";

  606. #if defined (GDB_NM_FILE)
  607.   gdb_nm_file = GDB_NM_FILE;
  608. #endif
  609.   fprintf_unfiltered (file,
  610.                       "gdbarch_dump: GDB_NM_FILE = %s\n",
  611.                       gdb_nm_file);
  612.   fprintf_unfiltered (file,
  613.                       "gdbarch_dump: addr_bit = %s\n",
  614.                       plongest (gdbarch->addr_bit));
  615.   fprintf_unfiltered (file,
  616.                       "gdbarch_dump: addr_bits_remove = <%s>\n",
  617.                       host_address_to_string (gdbarch->addr_bits_remove));
  618.   fprintf_unfiltered (file,
  619.                       "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
  620.                       gdbarch_address_class_name_to_type_flags_p (gdbarch));
  621.   fprintf_unfiltered (file,
  622.                       "gdbarch_dump: address_class_name_to_type_flags = <%s>\n",
  623.                       host_address_to_string (gdbarch->address_class_name_to_type_flags));
  624.   fprintf_unfiltered (file,
  625.                       "gdbarch_dump: gdbarch_address_class_type_flags_p() = %d\n",
  626.                       gdbarch_address_class_type_flags_p (gdbarch));
  627.   fprintf_unfiltered (file,
  628.                       "gdbarch_dump: address_class_type_flags = <%s>\n",
  629.                       host_address_to_string (gdbarch->address_class_type_flags));
  630.   fprintf_unfiltered (file,
  631.                       "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
  632.                       gdbarch_address_class_type_flags_to_name_p (gdbarch));
  633.   fprintf_unfiltered (file,
  634.                       "gdbarch_dump: address_class_type_flags_to_name = <%s>\n",
  635.                       host_address_to_string (gdbarch->address_class_type_flags_to_name));
  636.   fprintf_unfiltered (file,
  637.                       "gdbarch_dump: address_to_pointer = <%s>\n",
  638.                       host_address_to_string (gdbarch->address_to_pointer));
  639.   fprintf_unfiltered (file,
  640.                       "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n",
  641.                       gdbarch_adjust_breakpoint_address_p (gdbarch));
  642.   fprintf_unfiltered (file,
  643.                       "gdbarch_dump: adjust_breakpoint_address = <%s>\n",
  644.                       host_address_to_string (gdbarch->adjust_breakpoint_address));
  645.   fprintf_unfiltered (file,
  646.                       "gdbarch_dump: adjust_dwarf2_addr = <%s>\n",
  647.                       host_address_to_string (gdbarch->adjust_dwarf2_addr));
  648.   fprintf_unfiltered (file,
  649.                       "gdbarch_dump: adjust_dwarf2_line = <%s>\n",
  650.                       host_address_to_string (gdbarch->adjust_dwarf2_line));
  651.   fprintf_unfiltered (file,
  652.                       "gdbarch_dump: auto_charset = <%s>\n",
  653.                       host_address_to_string (gdbarch->auto_charset));
  654.   fprintf_unfiltered (file,
  655.                       "gdbarch_dump: auto_wide_charset = <%s>\n",
  656.                       host_address_to_string (gdbarch->auto_wide_charset));
  657.   fprintf_unfiltered (file,
  658.                       "gdbarch_dump: gdbarch_auxv_parse_p() = %d\n",
  659.                       gdbarch_auxv_parse_p (gdbarch));
  660.   fprintf_unfiltered (file,
  661.                       "gdbarch_dump: auxv_parse = <%s>\n",
  662.                       host_address_to_string (gdbarch->auxv_parse));
  663.   fprintf_unfiltered (file,
  664.                       "gdbarch_dump: gdbarch_ax_pseudo_register_collect_p() = %d\n",
  665.                       gdbarch_ax_pseudo_register_collect_p (gdbarch));
  666.   fprintf_unfiltered (file,
  667.                       "gdbarch_dump: ax_pseudo_register_collect = <%s>\n",
  668.                       host_address_to_string (gdbarch->ax_pseudo_register_collect));
  669.   fprintf_unfiltered (file,
  670.                       "gdbarch_dump: gdbarch_ax_pseudo_register_push_stack_p() = %d\n",
  671.                       gdbarch_ax_pseudo_register_push_stack_p (gdbarch));
  672.   fprintf_unfiltered (file,
  673.                       "gdbarch_dump: ax_pseudo_register_push_stack = <%s>\n",
  674.                       host_address_to_string (gdbarch->ax_pseudo_register_push_stack));
  675.   fprintf_unfiltered (file,
  676.                       "gdbarch_dump: believe_pcc_promotion = %s\n",
  677.                       plongest (gdbarch->believe_pcc_promotion));
  678.   fprintf_unfiltered (file,
  679.                       "gdbarch_dump: bfd_arch_info = %s\n",
  680.                       gdbarch_bfd_arch_info (gdbarch)->printable_name);
  681.   fprintf_unfiltered (file,
  682.                       "gdbarch_dump: bits_big_endian = %s\n",
  683.                       plongest (gdbarch->bits_big_endian));
  684.   fprintf_unfiltered (file,
  685.                       "gdbarch_dump: breakpoint_from_pc = <%s>\n",
  686.                       host_address_to_string (gdbarch->breakpoint_from_pc));
  687.   fprintf_unfiltered (file,
  688.                       "gdbarch_dump: byte_order = %s\n",
  689.                       plongest (gdbarch->byte_order));
  690.   fprintf_unfiltered (file,
  691.                       "gdbarch_dump: byte_order_for_code = %s\n",
  692.                       plongest (gdbarch->byte_order_for_code));
  693.   fprintf_unfiltered (file,
  694.                       "gdbarch_dump: call_dummy_location = %s\n",
  695.                       plongest (gdbarch->call_dummy_location));
  696.   fprintf_unfiltered (file,
  697.                       "gdbarch_dump: cannot_fetch_register = <%s>\n",
  698.                       host_address_to_string (gdbarch->cannot_fetch_register));
  699.   fprintf_unfiltered (file,
  700.                       "gdbarch_dump: cannot_step_breakpoint = %s\n",
  701.                       plongest (gdbarch->cannot_step_breakpoint));
  702.   fprintf_unfiltered (file,
  703.                       "gdbarch_dump: cannot_store_register = <%s>\n",
  704.                       host_address_to_string (gdbarch->cannot_store_register));
  705.   fprintf_unfiltered (file,
  706.                       "gdbarch_dump: char_signed = %s\n",
  707.                       plongest (gdbarch->char_signed));
  708.   fprintf_unfiltered (file,
  709.                       "gdbarch_dump: coff_make_msymbol_special = <%s>\n",
  710.                       host_address_to_string (gdbarch->coff_make_msymbol_special));
  711.   fprintf_unfiltered (file,
  712.                       "gdbarch_dump: convert_from_func_ptr_addr = <%s>\n",
  713.                       host_address_to_string (gdbarch->convert_from_func_ptr_addr));
  714.   fprintf_unfiltered (file,
  715.                       "gdbarch_dump: convert_register_p = <%s>\n",
  716.                       host_address_to_string (gdbarch->convert_register_p));
  717.   fprintf_unfiltered (file,
  718.                       "gdbarch_dump: gdbarch_core_info_proc_p() = %d\n",
  719.                       gdbarch_core_info_proc_p (gdbarch));
  720.   fprintf_unfiltered (file,
  721.                       "gdbarch_dump: core_info_proc = <%s>\n",
  722.                       host_address_to_string (gdbarch->core_info_proc));
  723.   fprintf_unfiltered (file,
  724.                       "gdbarch_dump: gdbarch_core_pid_to_str_p() = %d\n",
  725.                       gdbarch_core_pid_to_str_p (gdbarch));
  726.   fprintf_unfiltered (file,
  727.                       "gdbarch_dump: core_pid_to_str = <%s>\n",
  728.                       host_address_to_string (gdbarch->core_pid_to_str));
  729.   fprintf_unfiltered (file,
  730.                       "gdbarch_dump: gdbarch_core_read_description_p() = %d\n",
  731.                       gdbarch_core_read_description_p (gdbarch));
  732.   fprintf_unfiltered (file,
  733.                       "gdbarch_dump: core_read_description = <%s>\n",
  734.                       host_address_to_string (gdbarch->core_read_description));
  735.   fprintf_unfiltered (file,
  736.                       "gdbarch_dump: gdbarch_core_xfer_shared_libraries_p() = %d\n",
  737.                       gdbarch_core_xfer_shared_libraries_p (gdbarch));
  738.   fprintf_unfiltered (file,
  739.                       "gdbarch_dump: core_xfer_shared_libraries = <%s>\n",
  740.                       host_address_to_string (gdbarch->core_xfer_shared_libraries));
  741.   fprintf_unfiltered (file,
  742.                       "gdbarch_dump: gdbarch_core_xfer_shared_libraries_aix_p() = %d\n",
  743.                       gdbarch_core_xfer_shared_libraries_aix_p (gdbarch));
  744.   fprintf_unfiltered (file,
  745.                       "gdbarch_dump: core_xfer_shared_libraries_aix = <%s>\n",
  746.                       host_address_to_string (gdbarch->core_xfer_shared_libraries_aix));
  747.   fprintf_unfiltered (file,
  748.                       "gdbarch_dump: decr_pc_after_break = %s\n",
  749.                       core_addr_to_string_nz (gdbarch->decr_pc_after_break));
  750.   fprintf_unfiltered (file,
  751.                       "gdbarch_dump: deprecated_fp_regnum = %s\n",
  752.                       plongest (gdbarch->deprecated_fp_regnum));
  753.   fprintf_unfiltered (file,
  754.                       "gdbarch_dump: deprecated_function_start_offset = %s\n",
  755.                       core_addr_to_string_nz (gdbarch->deprecated_function_start_offset));
  756.   fprintf_unfiltered (file,
  757.                       "gdbarch_dump: gdbarch_displaced_step_copy_insn_p() = %d\n",
  758.                       gdbarch_displaced_step_copy_insn_p (gdbarch));
  759.   fprintf_unfiltered (file,
  760.                       "gdbarch_dump: displaced_step_copy_insn = <%s>\n",
  761.                       host_address_to_string (gdbarch->displaced_step_copy_insn));
  762.   fprintf_unfiltered (file,
  763.                       "gdbarch_dump: gdbarch_displaced_step_fixup_p() = %d\n",
  764.                       gdbarch_displaced_step_fixup_p (gdbarch));
  765.   fprintf_unfiltered (file,
  766.                       "gdbarch_dump: displaced_step_fixup = <%s>\n",
  767.                       host_address_to_string (gdbarch->displaced_step_fixup));
  768.   fprintf_unfiltered (file,
  769.                       "gdbarch_dump: displaced_step_free_closure = <%s>\n",
  770.                       host_address_to_string (gdbarch->displaced_step_free_closure));
  771.   fprintf_unfiltered (file,
  772.                       "gdbarch_dump: displaced_step_hw_singlestep = <%s>\n",
  773.                       host_address_to_string (gdbarch->displaced_step_hw_singlestep));
  774.   fprintf_unfiltered (file,
  775.                       "gdbarch_dump: displaced_step_location = <%s>\n",
  776.                       host_address_to_string (gdbarch->displaced_step_location));
  777.   fprintf_unfiltered (file,
  778.                       "gdbarch_dump: double_bit = %s\n",
  779.                       plongest (gdbarch->double_bit));
  780.   fprintf_unfiltered (file,
  781.                       "gdbarch_dump: double_format = %s\n",
  782.                       pformat (gdbarch->double_format));
  783.   fprintf_unfiltered (file,
  784.                       "gdbarch_dump: gdbarch_dummy_id_p() = %d\n",
  785.                       gdbarch_dummy_id_p (gdbarch));
  786.   fprintf_unfiltered (file,
  787.                       "gdbarch_dump: dummy_id = <%s>\n",
  788.                       host_address_to_string (gdbarch->dummy_id));
  789.   fprintf_unfiltered (file,
  790.                       "gdbarch_dump: dwarf2_addr_size = %s\n",
  791.                       plongest (gdbarch->dwarf2_addr_size));
  792.   fprintf_unfiltered (file,
  793.                       "gdbarch_dump: dwarf2_reg_to_regnum = <%s>\n",
  794.                       host_address_to_string (gdbarch->dwarf2_reg_to_regnum));
  795.   fprintf_unfiltered (file,
  796.                       "gdbarch_dump: ecoff_reg_to_regnum = <%s>\n",
  797.                       host_address_to_string (gdbarch->ecoff_reg_to_regnum));
  798.   fprintf_unfiltered (file,
  799.                       "gdbarch_dump: gdbarch_elf_make_msymbol_special_p() = %d\n",
  800.                       gdbarch_elf_make_msymbol_special_p (gdbarch));
  801.   fprintf_unfiltered (file,
  802.                       "gdbarch_dump: elf_make_msymbol_special = <%s>\n",
  803.                       host_address_to_string (gdbarch->elf_make_msymbol_special));
  804.   fprintf_unfiltered (file,
  805.                       "gdbarch_dump: gdbarch_elfcore_write_linux_prpsinfo_p() = %d\n",
  806.                       gdbarch_elfcore_write_linux_prpsinfo_p (gdbarch));
  807.   fprintf_unfiltered (file,
  808.                       "gdbarch_dump: elfcore_write_linux_prpsinfo = <%s>\n",
  809.                       host_address_to_string (gdbarch->elfcore_write_linux_prpsinfo));
  810.   fprintf_unfiltered (file,
  811.                       "gdbarch_dump: fast_tracepoint_valid_at = <%s>\n",
  812.                       host_address_to_string (gdbarch->fast_tracepoint_valid_at));
  813.   fprintf_unfiltered (file,
  814.                       "gdbarch_dump: gdbarch_fetch_pointer_argument_p() = %d\n",
  815.                       gdbarch_fetch_pointer_argument_p (gdbarch));
  816.   fprintf_unfiltered (file,
  817.                       "gdbarch_dump: fetch_pointer_argument = <%s>\n",
  818.                       host_address_to_string (gdbarch->fetch_pointer_argument));
  819.   fprintf_unfiltered (file,
  820.                       "gdbarch_dump: gdbarch_fetch_tls_load_module_address_p() = %d\n",
  821.                       gdbarch_fetch_tls_load_module_address_p (gdbarch));
  822.   fprintf_unfiltered (file,
  823.                       "gdbarch_dump: fetch_tls_load_module_address = <%s>\n",
  824.                       host_address_to_string (gdbarch->fetch_tls_load_module_address));
  825.   fprintf_unfiltered (file,
  826.                       "gdbarch_dump: gdbarch_find_memory_regions_p() = %d\n",
  827.                       gdbarch_find_memory_regions_p (gdbarch));
  828.   fprintf_unfiltered (file,
  829.                       "gdbarch_dump: find_memory_regions = <%s>\n",
  830.                       host_address_to_string (gdbarch->find_memory_regions));
  831.   fprintf_unfiltered (file,
  832.                       "gdbarch_dump: float_bit = %s\n",
  833.                       plongest (gdbarch->float_bit));
  834.   fprintf_unfiltered (file,
  835.                       "gdbarch_dump: float_format = %s\n",
  836.                       pformat (gdbarch->float_format));
  837.   fprintf_unfiltered (file,
  838.                       "gdbarch_dump: fp0_regnum = %s\n",
  839.                       plongest (gdbarch->fp0_regnum));
  840.   fprintf_unfiltered (file,
  841.                       "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
  842.                       gdbarch_frame_align_p (gdbarch));
  843.   fprintf_unfiltered (file,
  844.                       "gdbarch_dump: frame_align = <%s>\n",
  845.                       host_address_to_string (gdbarch->frame_align));
  846.   fprintf_unfiltered (file,
  847.                       "gdbarch_dump: frame_args_skip = %s\n",
  848.                       core_addr_to_string_nz (gdbarch->frame_args_skip));
  849.   fprintf_unfiltered (file,
  850.                       "gdbarch_dump: gdbarch_frame_num_args_p() = %d\n",
  851.                       gdbarch_frame_num_args_p (gdbarch));
  852.   fprintf_unfiltered (file,
  853.                       "gdbarch_dump: frame_num_args = <%s>\n",
  854.                       host_address_to_string (gdbarch->frame_num_args));
  855.   fprintf_unfiltered (file,
  856.                       "gdbarch_dump: frame_red_zone_size = %s\n",
  857.                       plongest (gdbarch->frame_red_zone_size));
  858.   fprintf_unfiltered (file,
  859.                       "gdbarch_dump: gcc_target_options = <%s>\n",
  860.                       host_address_to_string (gdbarch->gcc_target_options));
  861.   fprintf_unfiltered (file,
  862.                       "gdbarch_dump: gdbarch_gcore_bfd_target_p() = %d\n",
  863.                       gdbarch_gcore_bfd_target_p (gdbarch));
  864.   fprintf_unfiltered (file,
  865.                       "gdbarch_dump: gcore_bfd_target = %s\n",
  866.                       pstring (gdbarch->gcore_bfd_target));
  867.   fprintf_unfiltered (file,
  868.                       "gdbarch_dump: gdbarch_gdb_signal_from_target_p() = %d\n",
  869.                       gdbarch_gdb_signal_from_target_p (gdbarch));
  870.   fprintf_unfiltered (file,
  871.                       "gdbarch_dump: gdb_signal_from_target = <%s>\n",
  872.                       host_address_to_string (gdbarch->gdb_signal_from_target));
  873.   fprintf_unfiltered (file,
  874.                       "gdbarch_dump: gdbarch_gdb_signal_to_target_p() = %d\n",
  875.                       gdbarch_gdb_signal_to_target_p (gdbarch));
  876.   fprintf_unfiltered (file,
  877.                       "gdbarch_dump: gdb_signal_to_target = <%s>\n",
  878.                       host_address_to_string (gdbarch->gdb_signal_to_target));
  879.   fprintf_unfiltered (file,
  880.                       "gdbarch_dump: gen_return_address = <%s>\n",
  881.                       host_address_to_string (gdbarch->gen_return_address));
  882.   fprintf_unfiltered (file,
  883.                       "gdbarch_dump: gdbarch_get_longjmp_target_p() = %d\n",
  884.                       gdbarch_get_longjmp_target_p (gdbarch));
  885.   fprintf_unfiltered (file,
  886.                       "gdbarch_dump: get_longjmp_target = <%s>\n",
  887.                       host_address_to_string (gdbarch->get_longjmp_target));
  888.   fprintf_unfiltered (file,
  889.                       "gdbarch_dump: gdbarch_get_siginfo_type_p() = %d\n",
  890.                       gdbarch_get_siginfo_type_p (gdbarch));
  891.   fprintf_unfiltered (file,
  892.                       "gdbarch_dump: get_siginfo_type = <%s>\n",
  893.                       host_address_to_string (gdbarch->get_siginfo_type));
  894.   fprintf_unfiltered (file,
  895.                       "gdbarch_dump: gdbarch_get_syscall_number_p() = %d\n",
  896.                       gdbarch_get_syscall_number_p (gdbarch));
  897.   fprintf_unfiltered (file,
  898.                       "gdbarch_dump: get_syscall_number = <%s>\n",
  899.                       host_address_to_string (gdbarch->get_syscall_number));
  900.   fprintf_unfiltered (file,
  901.                       "gdbarch_dump: gnu_triplet_regexp = <%s>\n",
  902.                       host_address_to_string (gdbarch->gnu_triplet_regexp));
  903.   fprintf_unfiltered (file,
  904.                       "gdbarch_dump: half_bit = %s\n",
  905.                       plongest (gdbarch->half_bit));
  906.   fprintf_unfiltered (file,
  907.                       "gdbarch_dump: half_format = %s\n",
  908.                       pformat (gdbarch->half_format));
  909.   fprintf_unfiltered (file,
  910.                       "gdbarch_dump: has_dos_based_file_system = %s\n",
  911.                       plongest (gdbarch->has_dos_based_file_system));
  912.   fprintf_unfiltered (file,
  913.                       "gdbarch_dump: has_global_breakpoints = %s\n",
  914.                       plongest (gdbarch->has_global_breakpoints));
  915.   fprintf_unfiltered (file,
  916.                       "gdbarch_dump: has_global_solist = %s\n",
  917.                       plongest (gdbarch->has_global_solist));
  918.   fprintf_unfiltered (file,
  919.                       "gdbarch_dump: has_shared_address_space = <%s>\n",
  920.                       host_address_to_string (gdbarch->has_shared_address_space));
  921.   fprintf_unfiltered (file,
  922.                       "gdbarch_dump: have_nonsteppable_watchpoint = %s\n",
  923.                       plongest (gdbarch->have_nonsteppable_watchpoint));
  924.   fprintf_unfiltered (file,
  925.                       "gdbarch_dump: in_function_epilogue_p = <%s>\n",
  926.                       host_address_to_string (gdbarch->in_function_epilogue_p));
  927.   fprintf_unfiltered (file,
  928.                       "gdbarch_dump: in_solib_return_trampoline = <%s>\n",
  929.                       host_address_to_string (gdbarch->in_solib_return_trampoline));
  930.   fprintf_unfiltered (file,
  931.                       "gdbarch_dump: infcall_mmap = <%s>\n",
  932.                       host_address_to_string (gdbarch->infcall_mmap));
  933.   fprintf_unfiltered (file,
  934.                       "gdbarch_dump: gdbarch_info_proc_p() = %d\n",
  935.                       gdbarch_info_proc_p (gdbarch));
  936.   fprintf_unfiltered (file,
  937.                       "gdbarch_dump: info_proc = <%s>\n",
  938.                       host_address_to_string (gdbarch->info_proc));
  939.   fprintf_unfiltered (file,
  940.                       "gdbarch_dump: inner_than = <%s>\n",
  941.                       host_address_to_string (gdbarch->inner_than));
  942.   fprintf_unfiltered (file,
  943.                       "gdbarch_dump: insn_is_call = <%s>\n",
  944.                       host_address_to_string (gdbarch->insn_is_call));
  945.   fprintf_unfiltered (file,
  946.                       "gdbarch_dump: insn_is_jump = <%s>\n",
  947.                       host_address_to_string (gdbarch->insn_is_jump));
  948.   fprintf_unfiltered (file,
  949.                       "gdbarch_dump: insn_is_ret = <%s>\n",
  950.                       host_address_to_string (gdbarch->insn_is_ret));
  951.   fprintf_unfiltered (file,
  952.                       "gdbarch_dump: int_bit = %s\n",
  953.                       plongest (gdbarch->int_bit));
  954.   fprintf_unfiltered (file,
  955.                       "gdbarch_dump: gdbarch_integer_to_address_p() = %d\n",
  956.                       gdbarch_integer_to_address_p (gdbarch));
  957.   fprintf_unfiltered (file,
  958.                       "gdbarch_dump: integer_to_address = <%s>\n",
  959.                       host_address_to_string (gdbarch->integer_to_address));
  960.   fprintf_unfiltered (file,
  961.                       "gdbarch_dump: iterate_over_objfiles_in_search_order = <%s>\n",
  962.                       host_address_to_string (gdbarch->iterate_over_objfiles_in_search_order));
  963.   fprintf_unfiltered (file,
  964.                       "gdbarch_dump: gdbarch_iterate_over_regset_sections_p() = %d\n",
  965.                       gdbarch_iterate_over_regset_sections_p (gdbarch));
  966.   fprintf_unfiltered (file,
  967.                       "gdbarch_dump: iterate_over_regset_sections = <%s>\n",
  968.                       host_address_to_string (gdbarch->iterate_over_regset_sections));
  969.   fprintf_unfiltered (file,
  970.                       "gdbarch_dump: long_bit = %s\n",
  971.                       plongest (gdbarch->long_bit));
  972.   fprintf_unfiltered (file,
  973.                       "gdbarch_dump: long_double_bit = %s\n",
  974.                       plongest (gdbarch->long_double_bit));
  975.   fprintf_unfiltered (file,
  976.                       "gdbarch_dump: long_double_format = %s\n",
  977.                       pformat (gdbarch->long_double_format));
  978.   fprintf_unfiltered (file,
  979.                       "gdbarch_dump: long_long_align_bit = %s\n",
  980.                       plongest (gdbarch->long_long_align_bit));
  981.   fprintf_unfiltered (file,
  982.                       "gdbarch_dump: long_long_bit = %s\n",
  983.                       plongest (gdbarch->long_long_bit));
  984.   fprintf_unfiltered (file,
  985.                       "gdbarch_dump: gdbarch_make_corefile_notes_p() = %d\n",
  986.                       gdbarch_make_corefile_notes_p (gdbarch));
  987.   fprintf_unfiltered (file,
  988.                       "gdbarch_dump: make_corefile_notes = <%s>\n",
  989.                       host_address_to_string (gdbarch->make_corefile_notes));
  990.   fprintf_unfiltered (file,
  991.                       "gdbarch_dump: make_symbol_special = <%s>\n",
  992.                       host_address_to_string (gdbarch->make_symbol_special));
  993.   fprintf_unfiltered (file,
  994.                       "gdbarch_dump: gdbarch_max_insn_length_p() = %d\n",
  995.                       gdbarch_max_insn_length_p (gdbarch));
  996.   fprintf_unfiltered (file,
  997.                       "gdbarch_dump: max_insn_length = %s\n",
  998.                       plongest (gdbarch->max_insn_length));
  999.   fprintf_unfiltered (file,
  1000.                       "gdbarch_dump: memory_insert_breakpoint = <%s>\n",
  1001.                       host_address_to_string (gdbarch->memory_insert_breakpoint));
  1002.   fprintf_unfiltered (file,
  1003.                       "gdbarch_dump: memory_remove_breakpoint = <%s>\n",
  1004.                       host_address_to_string (gdbarch->memory_remove_breakpoint));
  1005.   fprintf_unfiltered (file,
  1006.                       "gdbarch_dump: num_pseudo_regs = %s\n",
  1007.                       plongest (gdbarch->num_pseudo_regs));
  1008.   fprintf_unfiltered (file,
  1009.                       "gdbarch_dump: num_regs = %s\n",
  1010.                       plongest (gdbarch->num_regs));
  1011.   fprintf_unfiltered (file,
  1012.                       "gdbarch_dump: osabi = %s\n",
  1013.                       plongest (gdbarch->osabi));
  1014.   fprintf_unfiltered (file,
  1015.                       "gdbarch_dump: gdbarch_overlay_update_p() = %d\n",
  1016.                       gdbarch_overlay_update_p (gdbarch));
  1017.   fprintf_unfiltered (file,
  1018.                       "gdbarch_dump: overlay_update = <%s>\n",
  1019.                       host_address_to_string (gdbarch->overlay_update));
  1020.   fprintf_unfiltered (file,
  1021.                       "gdbarch_dump: pc_regnum = %s\n",
  1022.                       plongest (gdbarch->pc_regnum));
  1023.   fprintf_unfiltered (file,
  1024.                       "gdbarch_dump: pointer_to_address = <%s>\n",
  1025.                       host_address_to_string (gdbarch->pointer_to_address));
  1026.   fprintf_unfiltered (file,
  1027.                       "gdbarch_dump: print_float_info = <%s>\n",
  1028.                       host_address_to_string (gdbarch->print_float_info));
  1029.   fprintf_unfiltered (file,
  1030.                       "gdbarch_dump: print_insn = <%s>\n",
  1031.                       host_address_to_string (gdbarch->print_insn));
  1032.   fprintf_unfiltered (file,
  1033.                       "gdbarch_dump: print_registers_info = <%s>\n",
  1034.                       host_address_to_string (gdbarch->print_registers_info));
  1035.   fprintf_unfiltered (file,
  1036.                       "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
  1037.                       gdbarch_print_vector_info_p (gdbarch));
  1038.   fprintf_unfiltered (file,
  1039.                       "gdbarch_dump: print_vector_info = <%s>\n",
  1040.                       host_address_to_string (gdbarch->print_vector_info));
  1041.   fprintf_unfiltered (file,
  1042.                       "gdbarch_dump: gdbarch_process_record_p() = %d\n",
  1043.                       gdbarch_process_record_p (gdbarch));
  1044.   fprintf_unfiltered (file,
  1045.                       "gdbarch_dump: process_record = <%s>\n",
  1046.                       host_address_to_string (gdbarch->process_record));
  1047.   fprintf_unfiltered (file,
  1048.                       "gdbarch_dump: gdbarch_process_record_signal_p() = %d\n",
  1049.                       gdbarch_process_record_signal_p (gdbarch));
  1050.   fprintf_unfiltered (file,
  1051.                       "gdbarch_dump: process_record_signal = <%s>\n",
  1052.                       host_address_to_string (gdbarch->process_record_signal));
  1053.   fprintf_unfiltered (file,
  1054.                       "gdbarch_dump: ps_regnum = %s\n",
  1055.                       plongest (gdbarch->ps_regnum));
  1056.   fprintf_unfiltered (file,
  1057.                       "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
  1058.                       gdbarch_pseudo_register_read_p (gdbarch));
  1059.   fprintf_unfiltered (file,
  1060.                       "gdbarch_dump: pseudo_register_read = <%s>\n",
  1061.                       host_address_to_string (gdbarch->pseudo_register_read));
  1062.   fprintf_unfiltered (file,
  1063.                       "gdbarch_dump: gdbarch_pseudo_register_read_value_p() = %d\n",
  1064.                       gdbarch_pseudo_register_read_value_p (gdbarch));
  1065.   fprintf_unfiltered (file,
  1066.                       "gdbarch_dump: pseudo_register_read_value = <%s>\n",
  1067.                       host_address_to_string (gdbarch->pseudo_register_read_value));
  1068.   fprintf_unfiltered (file,
  1069.                       "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
  1070.                       gdbarch_pseudo_register_write_p (gdbarch));
  1071.   fprintf_unfiltered (file,
  1072.                       "gdbarch_dump: pseudo_register_write = <%s>\n",
  1073.                       host_address_to_string (gdbarch->pseudo_register_write));
  1074.   fprintf_unfiltered (file,
  1075.                       "gdbarch_dump: ptr_bit = %s\n",
  1076.                       plongest (gdbarch->ptr_bit));
  1077.   fprintf_unfiltered (file,
  1078.                       "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
  1079.                       gdbarch_push_dummy_call_p (gdbarch));
  1080.   fprintf_unfiltered (file,
  1081.                       "gdbarch_dump: push_dummy_call = <%s>\n",
  1082.                       host_address_to_string (gdbarch->push_dummy_call));
  1083.   fprintf_unfiltered (file,
  1084.                       "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
  1085.                       gdbarch_push_dummy_code_p (gdbarch));
  1086.   fprintf_unfiltered (file,
  1087.                       "gdbarch_dump: push_dummy_code = <%s>\n",
  1088.                       host_address_to_string (gdbarch->push_dummy_code));
  1089.   fprintf_unfiltered (file,
  1090.                       "gdbarch_dump: ravenscar_ops = %s\n",
  1091.                       host_address_to_string (gdbarch->ravenscar_ops));
  1092.   fprintf_unfiltered (file,
  1093.                       "gdbarch_dump: gdbarch_read_pc_p() = %d\n",
  1094.                       gdbarch_read_pc_p (gdbarch));
  1095.   fprintf_unfiltered (file,
  1096.                       "gdbarch_dump: read_pc = <%s>\n",
  1097.                       host_address_to_string (gdbarch->read_pc));
  1098.   fprintf_unfiltered (file,
  1099.                       "gdbarch_dump: gdbarch_record_special_symbol_p() = %d\n",
  1100.                       gdbarch_record_special_symbol_p (gdbarch));
  1101.   fprintf_unfiltered (file,
  1102.                       "gdbarch_dump: record_special_symbol = <%s>\n",
  1103.                       host_address_to_string (gdbarch->record_special_symbol));
  1104.   fprintf_unfiltered (file,
  1105.                       "gdbarch_dump: register_name = <%s>\n",
  1106.                       host_address_to_string (gdbarch->register_name));
  1107.   fprintf_unfiltered (file,
  1108.                       "gdbarch_dump: register_reggroup_p = <%s>\n",
  1109.                       host_address_to_string (gdbarch->register_reggroup_p));
  1110.   fprintf_unfiltered (file,
  1111.                       "gdbarch_dump: register_sim_regno = <%s>\n",
  1112.                       host_address_to_string (gdbarch->register_sim_regno));
  1113.   fprintf_unfiltered (file,
  1114.                       "gdbarch_dump: register_to_value = <%s>\n",
  1115.                       host_address_to_string (gdbarch->register_to_value));
  1116.   fprintf_unfiltered (file,
  1117.                       "gdbarch_dump: gdbarch_register_type_p() = %d\n",
  1118.                       gdbarch_register_type_p (gdbarch));
  1119.   fprintf_unfiltered (file,
  1120.                       "gdbarch_dump: register_type = <%s>\n",
  1121.                       host_address_to_string (gdbarch->register_type));
  1122.   fprintf_unfiltered (file,
  1123.                       "gdbarch_dump: gdbarch_relocate_instruction_p() = %d\n",
  1124.                       gdbarch_relocate_instruction_p (gdbarch));
  1125.   fprintf_unfiltered (file,
  1126.                       "gdbarch_dump: relocate_instruction = <%s>\n",
  1127.                       host_address_to_string (gdbarch->relocate_instruction));
  1128.   fprintf_unfiltered (file,
  1129.                       "gdbarch_dump: remote_breakpoint_from_pc = <%s>\n",
  1130.                       host_address_to_string (gdbarch->remote_breakpoint_from_pc));
  1131.   fprintf_unfiltered (file,
  1132.                       "gdbarch_dump: remote_register_number = <%s>\n",
  1133.                       host_address_to_string (gdbarch->remote_register_number));
  1134.   fprintf_unfiltered (file,
  1135.                       "gdbarch_dump: return_in_first_hidden_param_p = <%s>\n",
  1136.                       host_address_to_string (gdbarch->return_in_first_hidden_param_p));
  1137.   fprintf_unfiltered (file,
  1138.                       "gdbarch_dump: gdbarch_return_value_p() = %d\n",
  1139.                       gdbarch_return_value_p (gdbarch));
  1140.   fprintf_unfiltered (file,
  1141.                       "gdbarch_dump: return_value = <%s>\n",
  1142.                       host_address_to_string (gdbarch->return_value));
  1143.   fprintf_unfiltered (file,
  1144.                       "gdbarch_dump: sdb_reg_to_regnum = <%s>\n",
  1145.                       host_address_to_string (gdbarch->sdb_reg_to_regnum));
  1146.   fprintf_unfiltered (file,
  1147.                       "gdbarch_dump: short_bit = %s\n",
  1148.                       plongest (gdbarch->short_bit));
  1149.   fprintf_unfiltered (file,
  1150.                       "gdbarch_dump: gdbarch_single_step_through_delay_p() = %d\n",
  1151.                       gdbarch_single_step_through_delay_p (gdbarch));
  1152.   fprintf_unfiltered (file,
  1153.                       "gdbarch_dump: single_step_through_delay = <%s>\n",
  1154.                       host_address_to_string (gdbarch->single_step_through_delay));
  1155.   fprintf_unfiltered (file,
  1156.                       "gdbarch_dump: gdbarch_skip_entrypoint_p() = %d\n",
  1157.                       gdbarch_skip_entrypoint_p (gdbarch));
  1158.   fprintf_unfiltered (file,
  1159.                       "gdbarch_dump: skip_entrypoint = <%s>\n",
  1160.                       host_address_to_string (gdbarch->skip_entrypoint));
  1161.   fprintf_unfiltered (file,
  1162.                       "gdbarch_dump: gdbarch_skip_main_prologue_p() = %d\n",
  1163.                       gdbarch_skip_main_prologue_p (gdbarch));
  1164.   fprintf_unfiltered (file,
  1165.                       "gdbarch_dump: skip_main_prologue = <%s>\n",
  1166.                       host_address_to_string (gdbarch->skip_main_prologue));
  1167.   fprintf_unfiltered (file,
  1168.                       "gdbarch_dump: skip_permanent_breakpoint = <%s>\n",
  1169.                       host_address_to_string (gdbarch->skip_permanent_breakpoint));
  1170.   fprintf_unfiltered (file,
  1171.                       "gdbarch_dump: skip_prologue = <%s>\n",
  1172.                       host_address_to_string (gdbarch->skip_prologue));
  1173.   fprintf_unfiltered (file,
  1174.                       "gdbarch_dump: skip_solib_resolver = <%s>\n",
  1175.                       host_address_to_string (gdbarch->skip_solib_resolver));
  1176.   fprintf_unfiltered (file,
  1177.                       "gdbarch_dump: skip_trampoline_code = <%s>\n",
  1178.                       host_address_to_string (gdbarch->skip_trampoline_code));
  1179.   fprintf_unfiltered (file,
  1180.                       "gdbarch_dump: gdbarch_software_single_step_p() = %d\n",
  1181.                       gdbarch_software_single_step_p (gdbarch));
  1182.   fprintf_unfiltered (file,
  1183.                       "gdbarch_dump: software_single_step = <%s>\n",
  1184.                       host_address_to_string (gdbarch->software_single_step));
  1185.   fprintf_unfiltered (file,
  1186.                       "gdbarch_dump: sofun_address_maybe_missing = %s\n",
  1187.                       plongest (gdbarch->sofun_address_maybe_missing));
  1188.   fprintf_unfiltered (file,
  1189.                       "gdbarch_dump: solib_symbols_extension = %s\n",
  1190.                       pstring (gdbarch->solib_symbols_extension));
  1191.   fprintf_unfiltered (file,
  1192.                       "gdbarch_dump: sp_regnum = %s\n",
  1193.                       plongest (gdbarch->sp_regnum));
  1194.   fprintf_unfiltered (file,
  1195.                       "gdbarch_dump: stab_reg_to_regnum = <%s>\n",
  1196.                       host_address_to_string (gdbarch->stab_reg_to_regnum));
  1197.   fprintf_unfiltered (file,
  1198.                       "gdbarch_dump: stabs_argument_has_addr = <%s>\n",
  1199.                       host_address_to_string (gdbarch->stabs_argument_has_addr));
  1200.   fprintf_unfiltered (file,
  1201.                       "gdbarch_dump: stap_gdb_register_prefix = %s\n",
  1202.                       pstring (gdbarch->stap_gdb_register_prefix));
  1203.   fprintf_unfiltered (file,
  1204.                       "gdbarch_dump: stap_gdb_register_suffix = %s\n",
  1205.                       pstring (gdbarch->stap_gdb_register_suffix));
  1206.   fprintf_unfiltered (file,
  1207.                       "gdbarch_dump: stap_integer_prefixes = %s\n",
  1208.                       pstring_list (gdbarch->stap_integer_prefixes));
  1209.   fprintf_unfiltered (file,
  1210.                       "gdbarch_dump: stap_integer_suffixes = %s\n",
  1211.                       pstring_list (gdbarch->stap_integer_suffixes));
  1212.   fprintf_unfiltered (file,
  1213.                       "gdbarch_dump: gdbarch_stap_is_single_operand_p() = %d\n",
  1214.                       gdbarch_stap_is_single_operand_p (gdbarch));
  1215.   fprintf_unfiltered (file,
  1216.                       "gdbarch_dump: stap_is_single_operand = <%s>\n",
  1217.                       host_address_to_string (gdbarch->stap_is_single_operand));
  1218.   fprintf_unfiltered (file,
  1219.                       "gdbarch_dump: gdbarch_stap_parse_special_token_p() = %d\n",
  1220.                       gdbarch_stap_parse_special_token_p (gdbarch));
  1221.   fprintf_unfiltered (file,
  1222.                       "gdbarch_dump: stap_parse_special_token = <%s>\n",
  1223.                       host_address_to_string (gdbarch->stap_parse_special_token));
  1224.   fprintf_unfiltered (file,
  1225.                       "gdbarch_dump: stap_register_indirection_prefixes = %s\n",
  1226.                       pstring_list (gdbarch->stap_register_indirection_prefixes));
  1227.   fprintf_unfiltered (file,
  1228.                       "gdbarch_dump: stap_register_indirection_suffixes = %s\n",
  1229.                       pstring_list (gdbarch->stap_register_indirection_suffixes));
  1230.   fprintf_unfiltered (file,
  1231.                       "gdbarch_dump: stap_register_prefixes = %s\n",
  1232.                       pstring_list (gdbarch->stap_register_prefixes));
  1233.   fprintf_unfiltered (file,
  1234.                       "gdbarch_dump: stap_register_suffixes = %s\n",
  1235.                       pstring_list (gdbarch->stap_register_suffixes));
  1236.   fprintf_unfiltered (file,
  1237.                       "gdbarch_dump: gdbarch_static_transform_name_p() = %d\n",
  1238.                       gdbarch_static_transform_name_p (gdbarch));
  1239.   fprintf_unfiltered (file,
  1240.                       "gdbarch_dump: static_transform_name = <%s>\n",
  1241.                       host_address_to_string (gdbarch->static_transform_name));
  1242.   fprintf_unfiltered (file,
  1243.                       "gdbarch_dump: syscalls_info = %s\n",
  1244.                       host_address_to_string (gdbarch->syscalls_info));
  1245.   fprintf_unfiltered (file,
  1246.                       "gdbarch_dump: target_desc = %s\n",
  1247.                       host_address_to_string (gdbarch->target_desc));
  1248.   fprintf_unfiltered (file,
  1249.                       "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
  1250.                       gdbarch_unwind_pc_p (gdbarch));
  1251.   fprintf_unfiltered (file,
  1252.                       "gdbarch_dump: unwind_pc = <%s>\n",
  1253.                       host_address_to_string (gdbarch->unwind_pc));
  1254.   fprintf_unfiltered (file,
  1255.                       "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
  1256.                       gdbarch_unwind_sp_p (gdbarch));
  1257.   fprintf_unfiltered (file,
  1258.                       "gdbarch_dump: unwind_sp = <%s>\n",
  1259.                       host_address_to_string (gdbarch->unwind_sp));
  1260.   fprintf_unfiltered (file,
  1261.                       "gdbarch_dump: value_from_register = <%s>\n",
  1262.                       host_address_to_string (gdbarch->value_from_register));
  1263.   fprintf_unfiltered (file,
  1264.                       "gdbarch_dump: value_to_register = <%s>\n",
  1265.                       host_address_to_string (gdbarch->value_to_register));
  1266.   fprintf_unfiltered (file,
  1267.                       "gdbarch_dump: vbit_in_delta = %s\n",
  1268.                       plongest (gdbarch->vbit_in_delta));
  1269.   fprintf_unfiltered (file,
  1270.                       "gdbarch_dump: virtual_frame_pointer = <%s>\n",
  1271.                       host_address_to_string (gdbarch->virtual_frame_pointer));
  1272.   fprintf_unfiltered (file,
  1273.                       "gdbarch_dump: vsyscall_range = <%s>\n",
  1274.                       host_address_to_string (gdbarch->vsyscall_range));
  1275.   fprintf_unfiltered (file,
  1276.                       "gdbarch_dump: vtable_function_descriptors = %s\n",
  1277.                       plongest (gdbarch->vtable_function_descriptors));
  1278.   fprintf_unfiltered (file,
  1279.                       "gdbarch_dump: gdbarch_write_pc_p() = %d\n",
  1280.                       gdbarch_write_pc_p (gdbarch));
  1281.   fprintf_unfiltered (file,
  1282.                       "gdbarch_dump: write_pc = <%s>\n",
  1283.                       host_address_to_string (gdbarch->write_pc));
  1284.   fprintf_unfiltered (file,
  1285.                       "gdbarch_dump: xml_syscall_file = %s\n",
  1286.                       pstring (gdbarch->xml_syscall_file));
  1287.   if (gdbarch->dump_tdep != NULL)
  1288.     gdbarch->dump_tdep (gdbarch, file);
  1289. }

  1290. struct gdbarch_tdep *
  1291. gdbarch_tdep (struct gdbarch *gdbarch)
  1292. {
  1293.   if (gdbarch_debug >= 2)
  1294.     fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
  1295.   return gdbarch->tdep;
  1296. }


  1297. const struct bfd_arch_info *
  1298. gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
  1299. {
  1300.   gdb_assert (gdbarch != NULL);
  1301.   if (gdbarch_debug >= 2)
  1302.     fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
  1303.   return gdbarch->bfd_arch_info;
  1304. }

  1305. enum bfd_endian
  1306. gdbarch_byte_order (struct gdbarch *gdbarch)
  1307. {
  1308.   gdb_assert (gdbarch != NULL);
  1309.   if (gdbarch_debug >= 2)
  1310.     fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
  1311.   return gdbarch->byte_order;
  1312. }

  1313. enum bfd_endian
  1314. gdbarch_byte_order_for_code (struct gdbarch *gdbarch)
  1315. {
  1316.   gdb_assert (gdbarch != NULL);
  1317.   if (gdbarch_debug >= 2)
  1318.     fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order_for_code called\n");
  1319.   return gdbarch->byte_order_for_code;
  1320. }

  1321. enum gdb_osabi
  1322. gdbarch_osabi (struct gdbarch *gdbarch)
  1323. {
  1324.   gdb_assert (gdbarch != NULL);
  1325.   if (gdbarch_debug >= 2)
  1326.     fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n");
  1327.   return gdbarch->osabi;
  1328. }

  1329. const struct target_desc *
  1330. gdbarch_target_desc (struct gdbarch *gdbarch)
  1331. {
  1332.   gdb_assert (gdbarch != NULL);
  1333.   if (gdbarch_debug >= 2)
  1334.     fprintf_unfiltered (gdb_stdlog, "gdbarch_target_desc called\n");
  1335.   return gdbarch->target_desc;
  1336. }

  1337. int
  1338. gdbarch_bits_big_endian (struct gdbarch *gdbarch)
  1339. {
  1340.   gdb_assert (gdbarch != NULL);
  1341.   /* Skip verify of bits_big_endian, invalid_p == 0 */
  1342.   if (gdbarch_debug >= 2)
  1343.     fprintf_unfiltered (gdb_stdlog, "gdbarch_bits_big_endian called\n");
  1344.   return gdbarch->bits_big_endian;
  1345. }

  1346. void
  1347. set_gdbarch_bits_big_endian (struct gdbarch *gdbarch,
  1348.                              int bits_big_endian)
  1349. {
  1350.   gdbarch->bits_big_endian = bits_big_endian;
  1351. }

  1352. int
  1353. gdbarch_short_bit (struct gdbarch *gdbarch)
  1354. {
  1355.   gdb_assert (gdbarch != NULL);
  1356.   /* Skip verify of short_bit, invalid_p == 0 */
  1357.   if (gdbarch_debug >= 2)
  1358.     fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
  1359.   return gdbarch->short_bit;
  1360. }

  1361. void
  1362. set_gdbarch_short_bit (struct gdbarch *gdbarch,
  1363.                        int short_bit)
  1364. {
  1365.   gdbarch->short_bit = short_bit;
  1366. }

  1367. int
  1368. gdbarch_int_bit (struct gdbarch *gdbarch)
  1369. {
  1370.   gdb_assert (gdbarch != NULL);
  1371.   /* Skip verify of int_bit, invalid_p == 0 */
  1372.   if (gdbarch_debug >= 2)
  1373.     fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
  1374.   return gdbarch->int_bit;
  1375. }

  1376. void
  1377. set_gdbarch_int_bit (struct gdbarch *gdbarch,
  1378.                      int int_bit)
  1379. {
  1380.   gdbarch->int_bit = int_bit;
  1381. }

  1382. int
  1383. gdbarch_long_bit (struct gdbarch *gdbarch)
  1384. {
  1385.   gdb_assert (gdbarch != NULL);
  1386.   /* Skip verify of long_bit, invalid_p == 0 */
  1387.   if (gdbarch_debug >= 2)
  1388.     fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
  1389.   return gdbarch->long_bit;
  1390. }

  1391. void
  1392. set_gdbarch_long_bit (struct gdbarch *gdbarch,
  1393.                       int long_bit)
  1394. {
  1395.   gdbarch->long_bit = long_bit;
  1396. }

  1397. int
  1398. gdbarch_long_long_bit (struct gdbarch *gdbarch)
  1399. {
  1400.   gdb_assert (gdbarch != NULL);
  1401.   /* Skip verify of long_long_bit, invalid_p == 0 */
  1402.   if (gdbarch_debug >= 2)
  1403.     fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
  1404.   return gdbarch->long_long_bit;
  1405. }

  1406. void
  1407. set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
  1408.                            int long_long_bit)
  1409. {
  1410.   gdbarch->long_long_bit = long_long_bit;
  1411. }

  1412. int
  1413. gdbarch_long_long_align_bit (struct gdbarch *gdbarch)
  1414. {
  1415.   gdb_assert (gdbarch != NULL);
  1416.   /* Skip verify of long_long_align_bit, invalid_p == 0 */
  1417.   if (gdbarch_debug >= 2)
  1418.     fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_align_bit called\n");
  1419.   return gdbarch->long_long_align_bit;
  1420. }

  1421. void
  1422. set_gdbarch_long_long_align_bit (struct gdbarch *gdbarch,
  1423.                                  int long_long_align_bit)
  1424. {
  1425.   gdbarch->long_long_align_bit = long_long_align_bit;
  1426. }

  1427. int
  1428. gdbarch_half_bit (struct gdbarch *gdbarch)
  1429. {
  1430.   gdb_assert (gdbarch != NULL);
  1431.   /* Skip verify of half_bit, invalid_p == 0 */
  1432.   if (gdbarch_debug >= 2)
  1433.     fprintf_unfiltered (gdb_stdlog, "gdbarch_half_bit called\n");
  1434.   return gdbarch->half_bit;
  1435. }

  1436. void
  1437. set_gdbarch_half_bit (struct gdbarch *gdbarch,
  1438.                       int half_bit)
  1439. {
  1440.   gdbarch->half_bit = half_bit;
  1441. }

  1442. const struct floatformat **
  1443. gdbarch_half_format (struct gdbarch *gdbarch)
  1444. {
  1445.   gdb_assert (gdbarch != NULL);
  1446.   if (gdbarch_debug >= 2)
  1447.     fprintf_unfiltered (gdb_stdlog, "gdbarch_half_format called\n");
  1448.   return gdbarch->half_format;
  1449. }

  1450. void
  1451. set_gdbarch_half_format (struct gdbarch *gdbarch,
  1452.                          const struct floatformat ** half_format)
  1453. {
  1454.   gdbarch->half_format = half_format;
  1455. }

  1456. int
  1457. gdbarch_float_bit (struct gdbarch *gdbarch)
  1458. {
  1459.   gdb_assert (gdbarch != NULL);
  1460.   /* Skip verify of float_bit, invalid_p == 0 */
  1461.   if (gdbarch_debug >= 2)
  1462.     fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
  1463.   return gdbarch->float_bit;
  1464. }

  1465. void
  1466. set_gdbarch_float_bit (struct gdbarch *gdbarch,
  1467.                        int float_bit)
  1468. {
  1469.   gdbarch->float_bit = float_bit;
  1470. }

  1471. const struct floatformat **
  1472. gdbarch_float_format (struct gdbarch *gdbarch)
  1473. {
  1474.   gdb_assert (gdbarch != NULL);
  1475.   if (gdbarch_debug >= 2)
  1476.     fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
  1477.   return gdbarch->float_format;
  1478. }

  1479. void
  1480. set_gdbarch_float_format (struct gdbarch *gdbarch,
  1481.                           const struct floatformat ** float_format)
  1482. {
  1483.   gdbarch->float_format = float_format;
  1484. }

  1485. int
  1486. gdbarch_double_bit (struct gdbarch *gdbarch)
  1487. {
  1488.   gdb_assert (gdbarch != NULL);
  1489.   /* Skip verify of double_bit, invalid_p == 0 */
  1490.   if (gdbarch_debug >= 2)
  1491.     fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
  1492.   return gdbarch->double_bit;
  1493. }

  1494. void
  1495. set_gdbarch_double_bit (struct gdbarch *gdbarch,
  1496.                         int double_bit)
  1497. {
  1498.   gdbarch->double_bit = double_bit;
  1499. }

  1500. const struct floatformat **
  1501. gdbarch_double_format (struct gdbarch *gdbarch)
  1502. {
  1503.   gdb_assert (gdbarch != NULL);
  1504.   if (gdbarch_debug >= 2)
  1505.     fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
  1506.   return gdbarch->double_format;
  1507. }

  1508. void
  1509. set_gdbarch_double_format (struct gdbarch *gdbarch,
  1510.                            const struct floatformat ** double_format)
  1511. {
  1512.   gdbarch->double_format = double_format;
  1513. }

  1514. int
  1515. gdbarch_long_double_bit (struct gdbarch *gdbarch)
  1516. {
  1517.   gdb_assert (gdbarch != NULL);
  1518.   /* Skip verify of long_double_bit, invalid_p == 0 */
  1519.   if (gdbarch_debug >= 2)
  1520.     fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
  1521.   return gdbarch->long_double_bit;
  1522. }

  1523. void
  1524. set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
  1525.                              int long_double_bit)
  1526. {
  1527.   gdbarch->long_double_bit = long_double_bit;
  1528. }

  1529. const struct floatformat **
  1530. gdbarch_long_double_format (struct gdbarch *gdbarch)
  1531. {
  1532.   gdb_assert (gdbarch != NULL);
  1533.   if (gdbarch_debug >= 2)
  1534.     fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
  1535.   return gdbarch->long_double_format;
  1536. }

  1537. void
  1538. set_gdbarch_long_double_format (struct gdbarch *gdbarch,
  1539.                                 const struct floatformat ** long_double_format)
  1540. {
  1541.   gdbarch->long_double_format = long_double_format;
  1542. }

  1543. int
  1544. gdbarch_ptr_bit (struct gdbarch *gdbarch)
  1545. {
  1546.   gdb_assert (gdbarch != NULL);
  1547.   /* Skip verify of ptr_bit, invalid_p == 0 */
  1548.   if (gdbarch_debug >= 2)
  1549.     fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
  1550.   return gdbarch->ptr_bit;
  1551. }

  1552. void
  1553. set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
  1554.                      int ptr_bit)
  1555. {
  1556.   gdbarch->ptr_bit = ptr_bit;
  1557. }

  1558. int
  1559. gdbarch_addr_bit (struct gdbarch *gdbarch)
  1560. {
  1561.   gdb_assert (gdbarch != NULL);
  1562.   /* Check variable changed from pre-default.  */
  1563.   gdb_assert (gdbarch->addr_bit != 0);
  1564.   if (gdbarch_debug >= 2)
  1565.     fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
  1566.   return gdbarch->addr_bit;
  1567. }

  1568. void
  1569. set_gdbarch_addr_bit (struct gdbarch *gdbarch,
  1570.                       int addr_bit)
  1571. {
  1572.   gdbarch->addr_bit = addr_bit;
  1573. }

  1574. int
  1575. gdbarch_dwarf2_addr_size (struct gdbarch *gdbarch)
  1576. {
  1577.   gdb_assert (gdbarch != NULL);
  1578.   /* Check variable changed from pre-default.  */
  1579.   gdb_assert (gdbarch->dwarf2_addr_size != 0);
  1580.   if (gdbarch_debug >= 2)
  1581.     fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_addr_size called\n");
  1582.   return gdbarch->dwarf2_addr_size;
  1583. }

  1584. void
  1585. set_gdbarch_dwarf2_addr_size (struct gdbarch *gdbarch,
  1586.                               int dwarf2_addr_size)
  1587. {
  1588.   gdbarch->dwarf2_addr_size = dwarf2_addr_size;
  1589. }

  1590. int
  1591. gdbarch_char_signed (struct gdbarch *gdbarch)
  1592. {
  1593.   gdb_assert (gdbarch != NULL);
  1594.   /* Check variable changed from pre-default.  */
  1595.   gdb_assert (gdbarch->char_signed != -1);
  1596.   if (gdbarch_debug >= 2)
  1597.     fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
  1598.   return gdbarch->char_signed;
  1599. }

  1600. void
  1601. set_gdbarch_char_signed (struct gdbarch *gdbarch,
  1602.                          int char_signed)
  1603. {
  1604.   gdbarch->char_signed = char_signed;
  1605. }

  1606. int
  1607. gdbarch_read_pc_p (struct gdbarch *gdbarch)
  1608. {
  1609.   gdb_assert (gdbarch != NULL);
  1610.   return gdbarch->read_pc != NULL;
  1611. }

  1612. CORE_ADDR
  1613. gdbarch_read_pc (struct gdbarch *gdbarch, struct regcache *regcache)
  1614. {
  1615.   gdb_assert (gdbarch != NULL);
  1616.   gdb_assert (gdbarch->read_pc != NULL);
  1617.   if (gdbarch_debug >= 2)
  1618.     fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
  1619.   return gdbarch->read_pc (regcache);
  1620. }

  1621. void
  1622. set_gdbarch_read_pc (struct gdbarch *gdbarch,
  1623.                      gdbarch_read_pc_ftype read_pc)
  1624. {
  1625.   gdbarch->read_pc = read_pc;
  1626. }

  1627. int
  1628. gdbarch_write_pc_p (struct gdbarch *gdbarch)
  1629. {
  1630.   gdb_assert (gdbarch != NULL);
  1631.   return gdbarch->write_pc != NULL;
  1632. }

  1633. void
  1634. gdbarch_write_pc (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR val)
  1635. {
  1636.   gdb_assert (gdbarch != NULL);
  1637.   gdb_assert (gdbarch->write_pc != NULL);
  1638.   if (gdbarch_debug >= 2)
  1639.     fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
  1640.   gdbarch->write_pc (regcache, val);
  1641. }

  1642. void
  1643. set_gdbarch_write_pc (struct gdbarch *gdbarch,
  1644.                       gdbarch_write_pc_ftype write_pc)
  1645. {
  1646.   gdbarch->write_pc = write_pc;
  1647. }

  1648. void
  1649. gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
  1650. {
  1651.   gdb_assert (gdbarch != NULL);
  1652.   gdb_assert (gdbarch->virtual_frame_pointer != NULL);
  1653.   if (gdbarch_debug >= 2)
  1654.     fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
  1655.   gdbarch->virtual_frame_pointer (gdbarch, pc, frame_regnum, frame_offset);
  1656. }

  1657. void
  1658. set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
  1659.                                    gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
  1660. {
  1661.   gdbarch->virtual_frame_pointer = virtual_frame_pointer;
  1662. }

  1663. int
  1664. gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
  1665. {
  1666.   gdb_assert (gdbarch != NULL);
  1667.   return gdbarch->pseudo_register_read != NULL;
  1668. }

  1669. enum register_status
  1670. gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, gdb_byte *buf)
  1671. {
  1672.   gdb_assert (gdbarch != NULL);
  1673.   gdb_assert (gdbarch->pseudo_register_read != NULL);
  1674.   if (gdbarch_debug >= 2)
  1675.     fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
  1676.   return gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
  1677. }

  1678. void
  1679. set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
  1680.                                   gdbarch_pseudo_register_read_ftype pseudo_register_read)
  1681. {
  1682.   gdbarch->pseudo_register_read = pseudo_register_read;
  1683. }

  1684. int
  1685. gdbarch_pseudo_register_read_value_p (struct gdbarch *gdbarch)
  1686. {
  1687.   gdb_assert (gdbarch != NULL);
  1688.   return gdbarch->pseudo_register_read_value != NULL;
  1689. }

  1690. struct value *
  1691. gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum)
  1692. {
  1693.   gdb_assert (gdbarch != NULL);
  1694.   gdb_assert (gdbarch->pseudo_register_read_value != NULL);
  1695.   if (gdbarch_debug >= 2)
  1696.     fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read_value called\n");
  1697.   return gdbarch->pseudo_register_read_value (gdbarch, regcache, cookednum);
  1698. }

  1699. void
  1700. set_gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch,
  1701.                                         gdbarch_pseudo_register_read_value_ftype pseudo_register_read_value)
  1702. {
  1703.   gdbarch->pseudo_register_read_value = pseudo_register_read_value;
  1704. }

  1705. int
  1706. gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
  1707. {
  1708.   gdb_assert (gdbarch != NULL);
  1709.   return gdbarch->pseudo_register_write != NULL;
  1710. }

  1711. void
  1712. gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const gdb_byte *buf)
  1713. {
  1714.   gdb_assert (gdbarch != NULL);
  1715.   gdb_assert (gdbarch->pseudo_register_write != NULL);
  1716.   if (gdbarch_debug >= 2)
  1717.     fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
  1718.   gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
  1719. }

  1720. void
  1721. set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
  1722.                                    gdbarch_pseudo_register_write_ftype pseudo_register_write)
  1723. {
  1724.   gdbarch->pseudo_register_write = pseudo_register_write;
  1725. }

  1726. int
  1727. gdbarch_num_regs (struct gdbarch *gdbarch)
  1728. {
  1729.   gdb_assert (gdbarch != NULL);
  1730.   /* Check variable changed from pre-default.  */
  1731.   gdb_assert (gdbarch->num_regs != -1);
  1732.   if (gdbarch_debug >= 2)
  1733.     fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
  1734.   return gdbarch->num_regs;
  1735. }

  1736. void
  1737. set_gdbarch_num_regs (struct gdbarch *gdbarch,
  1738.                       int num_regs)
  1739. {
  1740.   gdbarch->num_regs = num_regs;
  1741. }

  1742. int
  1743. gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
  1744. {
  1745.   gdb_assert (gdbarch != NULL);
  1746.   /* Skip verify of num_pseudo_regs, invalid_p == 0 */
  1747.   if (gdbarch_debug >= 2)
  1748.     fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
  1749.   return gdbarch->num_pseudo_regs;
  1750. }

  1751. void
  1752. set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
  1753.                              int num_pseudo_regs)
  1754. {
  1755.   gdbarch->num_pseudo_regs = num_pseudo_regs;
  1756. }

  1757. int
  1758. gdbarch_ax_pseudo_register_collect_p (struct gdbarch *gdbarch)
  1759. {
  1760.   gdb_assert (gdbarch != NULL);
  1761.   return gdbarch->ax_pseudo_register_collect != NULL;
  1762. }

  1763. int
  1764. gdbarch_ax_pseudo_register_collect (struct gdbarch *gdbarch, struct agent_expr *ax, int reg)
  1765. {
  1766.   gdb_assert (gdbarch != NULL);
  1767.   gdb_assert (gdbarch->ax_pseudo_register_collect != NULL);
  1768.   if (gdbarch_debug >= 2)
  1769.     fprintf_unfiltered (gdb_stdlog, "gdbarch_ax_pseudo_register_collect called\n");
  1770.   return gdbarch->ax_pseudo_register_collect (gdbarch, ax, reg);
  1771. }

  1772. void
  1773. set_gdbarch_ax_pseudo_register_collect (struct gdbarch *gdbarch,
  1774.                                         gdbarch_ax_pseudo_register_collect_ftype ax_pseudo_register_collect)
  1775. {
  1776.   gdbarch->ax_pseudo_register_collect = ax_pseudo_register_collect;
  1777. }

  1778. int
  1779. gdbarch_ax_pseudo_register_push_stack_p (struct gdbarch *gdbarch)
  1780. {
  1781.   gdb_assert (gdbarch != NULL);
  1782.   return gdbarch->ax_pseudo_register_push_stack != NULL;
  1783. }

  1784. int
  1785. gdbarch_ax_pseudo_register_push_stack (struct gdbarch *gdbarch, struct agent_expr *ax, int reg)
  1786. {
  1787.   gdb_assert (gdbarch != NULL);
  1788.   gdb_assert (gdbarch->ax_pseudo_register_push_stack != NULL);
  1789.   if (gdbarch_debug >= 2)
  1790.     fprintf_unfiltered (gdb_stdlog, "gdbarch_ax_pseudo_register_push_stack called\n");
  1791.   return gdbarch->ax_pseudo_register_push_stack (gdbarch, ax, reg);
  1792. }

  1793. void
  1794. set_gdbarch_ax_pseudo_register_push_stack (struct gdbarch *gdbarch,
  1795.                                            gdbarch_ax_pseudo_register_push_stack_ftype ax_pseudo_register_push_stack)
  1796. {
  1797.   gdbarch->ax_pseudo_register_push_stack = ax_pseudo_register_push_stack;
  1798. }

  1799. int
  1800. gdbarch_sp_regnum (struct gdbarch *gdbarch)
  1801. {
  1802.   gdb_assert (gdbarch != NULL);
  1803.   /* Skip verify of sp_regnum, invalid_p == 0 */
  1804.   if (gdbarch_debug >= 2)
  1805.     fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
  1806.   return gdbarch->sp_regnum;
  1807. }

  1808. void
  1809. set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
  1810.                        int sp_regnum)
  1811. {
  1812.   gdbarch->sp_regnum = sp_regnum;
  1813. }

  1814. int
  1815. gdbarch_pc_regnum (struct gdbarch *gdbarch)
  1816. {
  1817.   gdb_assert (gdbarch != NULL);
  1818.   /* Skip verify of pc_regnum, invalid_p == 0 */
  1819.   if (gdbarch_debug >= 2)
  1820.     fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
  1821.   return gdbarch->pc_regnum;
  1822. }

  1823. void
  1824. set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
  1825.                        int pc_regnum)
  1826. {
  1827.   gdbarch->pc_regnum = pc_regnum;
  1828. }

  1829. int
  1830. gdbarch_ps_regnum (struct gdbarch *gdbarch)
  1831. {
  1832.   gdb_assert (gdbarch != NULL);
  1833.   /* Skip verify of ps_regnum, invalid_p == 0 */
  1834.   if (gdbarch_debug >= 2)
  1835.     fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
  1836.   return gdbarch->ps_regnum;
  1837. }

  1838. void
  1839. set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
  1840.                        int ps_regnum)
  1841. {
  1842.   gdbarch->ps_regnum = ps_regnum;
  1843. }

  1844. int
  1845. gdbarch_fp0_regnum (struct gdbarch *gdbarch)
  1846. {
  1847.   gdb_assert (gdbarch != NULL);
  1848.   /* Skip verify of fp0_regnum, invalid_p == 0 */
  1849.   if (gdbarch_debug >= 2)
  1850.     fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
  1851.   return gdbarch->fp0_regnum;
  1852. }

  1853. void
  1854. set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
  1855.                         int fp0_regnum)
  1856. {
  1857.   gdbarch->fp0_regnum = fp0_regnum;
  1858. }

  1859. int
  1860. gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
  1861. {
  1862.   gdb_assert (gdbarch != NULL);
  1863.   gdb_assert (gdbarch->stab_reg_to_regnum != NULL);
  1864.   if (gdbarch_debug >= 2)
  1865.     fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
  1866.   return gdbarch->stab_reg_to_regnum (gdbarch, stab_regnr);
  1867. }

  1868. void
  1869. set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
  1870.                                 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
  1871. {
  1872.   gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
  1873. }

  1874. int
  1875. gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
  1876. {
  1877.   gdb_assert (gdbarch != NULL);
  1878.   gdb_assert (gdbarch->ecoff_reg_to_regnum != NULL);
  1879.   if (gdbarch_debug >= 2)
  1880.     fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
  1881.   return gdbarch->ecoff_reg_to_regnum (gdbarch, ecoff_regnr);
  1882. }

  1883. void
  1884. set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
  1885.                                  gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
  1886. {
  1887.   gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
  1888. }

  1889. int
  1890. gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
  1891. {
  1892.   gdb_assert (gdbarch != NULL);
  1893.   gdb_assert (gdbarch->sdb_reg_to_regnum != NULL);
  1894.   if (gdbarch_debug >= 2)
  1895.     fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
  1896.   return gdbarch->sdb_reg_to_regnum (gdbarch, sdb_regnr);
  1897. }

  1898. void
  1899. set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
  1900.                                gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
  1901. {
  1902.   gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
  1903. }

  1904. int
  1905. gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
  1906. {
  1907.   gdb_assert (gdbarch != NULL);
  1908.   gdb_assert (gdbarch->dwarf2_reg_to_regnum != NULL);
  1909.   if (gdbarch_debug >= 2)
  1910.     fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
  1911.   return gdbarch->dwarf2_reg_to_regnum (gdbarch, dwarf2_regnr);
  1912. }

  1913. void
  1914. set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
  1915.                                   gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
  1916. {
  1917.   gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
  1918. }

  1919. const char *
  1920. gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
  1921. {
  1922.   gdb_assert (gdbarch != NULL);
  1923.   gdb_assert (gdbarch->register_name != NULL);
  1924.   if (gdbarch_debug >= 2)
  1925.     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
  1926.   return gdbarch->register_name (gdbarch, regnr);
  1927. }

  1928. void
  1929. set_gdbarch_register_name (struct gdbarch *gdbarch,
  1930.                            gdbarch_register_name_ftype register_name)
  1931. {
  1932.   gdbarch->register_name = register_name;
  1933. }

  1934. int
  1935. gdbarch_register_type_p (struct gdbarch *gdbarch)
  1936. {
  1937.   gdb_assert (gdbarch != NULL);
  1938.   return gdbarch->register_type != NULL;
  1939. }

  1940. struct type *
  1941. gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
  1942. {
  1943.   gdb_assert (gdbarch != NULL);
  1944.   gdb_assert (gdbarch->register_type != NULL);
  1945.   if (gdbarch_debug >= 2)
  1946.     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
  1947.   return gdbarch->register_type (gdbarch, reg_nr);
  1948. }

  1949. void
  1950. set_gdbarch_register_type (struct gdbarch *gdbarch,
  1951.                            gdbarch_register_type_ftype register_type)
  1952. {
  1953.   gdbarch->register_type = register_type;
  1954. }

  1955. int
  1956. gdbarch_dummy_id_p (struct gdbarch *gdbarch)
  1957. {
  1958.   gdb_assert (gdbarch != NULL);
  1959.   return gdbarch->dummy_id != NULL;
  1960. }

  1961. struct frame_id
  1962. gdbarch_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
  1963. {
  1964.   gdb_assert (gdbarch != NULL);
  1965.   gdb_assert (gdbarch->dummy_id != NULL);
  1966.   if (gdbarch_debug >= 2)
  1967.     fprintf_unfiltered (gdb_stdlog, "gdbarch_dummy_id called\n");
  1968.   return gdbarch->dummy_id (gdbarch, this_frame);
  1969. }

  1970. void
  1971. set_gdbarch_dummy_id (struct gdbarch *gdbarch,
  1972.                       gdbarch_dummy_id_ftype dummy_id)
  1973. {
  1974.   gdbarch->dummy_id = dummy_id;
  1975. }

  1976. int
  1977. gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch)
  1978. {
  1979.   gdb_assert (gdbarch != NULL);
  1980.   /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
  1981.   if (gdbarch_debug >= 2)
  1982.     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n");
  1983.   return gdbarch->deprecated_fp_regnum;
  1984. }

  1985. void
  1986. set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch,
  1987.                                   int deprecated_fp_regnum)
  1988. {
  1989.   gdbarch->deprecated_fp_regnum = deprecated_fp_regnum;
  1990. }

  1991. int
  1992. gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
  1993. {
  1994.   gdb_assert (gdbarch != NULL);
  1995.   return gdbarch->push_dummy_call != NULL;
  1996. }

  1997. CORE_ADDR
  1998. 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)
  1999. {
  2000.   gdb_assert (gdbarch != NULL);
  2001.   gdb_assert (gdbarch->push_dummy_call != NULL);
  2002.   if (gdbarch_debug >= 2)
  2003.     fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
  2004.   return gdbarch->push_dummy_call (gdbarch, function, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr);
  2005. }

  2006. void
  2007. set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
  2008.                              gdbarch_push_dummy_call_ftype push_dummy_call)
  2009. {
  2010.   gdbarch->push_dummy_call = push_dummy_call;
  2011. }

  2012. int
  2013. gdbarch_call_dummy_location (struct gdbarch *gdbarch)
  2014. {
  2015.   gdb_assert (gdbarch != NULL);
  2016.   /* Skip verify of call_dummy_location, invalid_p == 0 */
  2017.   if (gdbarch_debug >= 2)
  2018.     fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
  2019.   return gdbarch->call_dummy_location;
  2020. }

  2021. void
  2022. set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
  2023.                                  int call_dummy_location)
  2024. {
  2025.   gdbarch->call_dummy_location = call_dummy_location;
  2026. }

  2027. int
  2028. gdbarch_push_dummy_code_p (struct gdbarch *gdbarch)
  2029. {
  2030.   gdb_assert (gdbarch != NULL);
  2031.   return gdbarch->push_dummy_code != NULL;
  2032. }

  2033. CORE_ADDR
  2034. 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)
  2035. {
  2036.   gdb_assert (gdbarch != NULL);
  2037.   gdb_assert (gdbarch->push_dummy_code != NULL);
  2038.   if (gdbarch_debug >= 2)
  2039.     fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n");
  2040.   return gdbarch->push_dummy_code (gdbarch, sp, funaddr, args, nargs, value_type, real_pc, bp_addr, regcache);
  2041. }

  2042. void
  2043. set_gdbarch_push_dummy_code (struct gdbarch *gdbarch,
  2044.                              gdbarch_push_dummy_code_ftype push_dummy_code)
  2045. {
  2046.   gdbarch->push_dummy_code = push_dummy_code;
  2047. }

  2048. void
  2049. gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
  2050. {
  2051.   gdb_assert (gdbarch != NULL);
  2052.   gdb_assert (gdbarch->print_registers_info != NULL);
  2053.   if (gdbarch_debug >= 2)
  2054.     fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
  2055.   gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
  2056. }

  2057. void
  2058. set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
  2059.                                   gdbarch_print_registers_info_ftype print_registers_info)
  2060. {
  2061.   gdbarch->print_registers_info = print_registers_info;
  2062. }

  2063. void
  2064. gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
  2065. {
  2066.   gdb_assert (gdbarch != NULL);
  2067.   gdb_assert (gdbarch->print_float_info != NULL);
  2068.   if (gdbarch_debug >= 2)
  2069.     fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
  2070.   gdbarch->print_float_info (gdbarch, file, frame, args);
  2071. }

  2072. void
  2073. set_gdbarch_print_float_info (struct gdbarch *gdbarch,
  2074.                               gdbarch_print_float_info_ftype print_float_info)
  2075. {
  2076.   gdbarch->print_float_info = print_float_info;
  2077. }

  2078. int
  2079. gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
  2080. {
  2081.   gdb_assert (gdbarch != NULL);
  2082.   return gdbarch->print_vector_info != NULL;
  2083. }

  2084. void
  2085. gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
  2086. {
  2087.   gdb_assert (gdbarch != NULL);
  2088.   gdb_assert (gdbarch->print_vector_info != NULL);
  2089.   if (gdbarch_debug >= 2)
  2090.     fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
  2091.   gdbarch->print_vector_info (gdbarch, file, frame, args);
  2092. }

  2093. void
  2094. set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
  2095.                                gdbarch_print_vector_info_ftype print_vector_info)
  2096. {
  2097.   gdbarch->print_vector_info = print_vector_info;
  2098. }

  2099. int
  2100. gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
  2101. {
  2102.   gdb_assert (gdbarch != NULL);
  2103.   gdb_assert (gdbarch->register_sim_regno != NULL);
  2104.   if (gdbarch_debug >= 2)
  2105.     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
  2106.   return gdbarch->register_sim_regno (gdbarch, reg_nr);
  2107. }

  2108. void
  2109. set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
  2110.                                 gdbarch_register_sim_regno_ftype register_sim_regno)
  2111. {
  2112.   gdbarch->register_sim_regno = register_sim_regno;
  2113. }

  2114. int
  2115. gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
  2116. {
  2117.   gdb_assert (gdbarch != NULL);
  2118.   gdb_assert (gdbarch->cannot_fetch_register != NULL);
  2119.   if (gdbarch_debug >= 2)
  2120.     fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
  2121.   return gdbarch->cannot_fetch_register (gdbarch, regnum);
  2122. }

  2123. void
  2124. set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
  2125.                                    gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
  2126. {
  2127.   gdbarch->cannot_fetch_register = cannot_fetch_register;
  2128. }

  2129. int
  2130. gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
  2131. {
  2132.   gdb_assert (gdbarch != NULL);
  2133.   gdb_assert (gdbarch->cannot_store_register != NULL);
  2134.   if (gdbarch_debug >= 2)
  2135.     fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
  2136.   return gdbarch->cannot_store_register (gdbarch, regnum);
  2137. }

  2138. void
  2139. set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
  2140.                                    gdbarch_cannot_store_register_ftype cannot_store_register)
  2141. {
  2142.   gdbarch->cannot_store_register = cannot_store_register;
  2143. }

  2144. int
  2145. gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
  2146. {
  2147.   gdb_assert (gdbarch != NULL);
  2148.   return gdbarch->get_longjmp_target != NULL;
  2149. }

  2150. int
  2151. gdbarch_get_longjmp_target (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR *pc)
  2152. {
  2153.   gdb_assert (gdbarch != NULL);
  2154.   gdb_assert (gdbarch->get_longjmp_target != NULL);
  2155.   if (gdbarch_debug >= 2)
  2156.     fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
  2157.   return gdbarch->get_longjmp_target (frame, pc);
  2158. }

  2159. void
  2160. set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
  2161.                                 gdbarch_get_longjmp_target_ftype get_longjmp_target)
  2162. {
  2163.   gdbarch->get_longjmp_target = get_longjmp_target;
  2164. }

  2165. int
  2166. gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
  2167. {
  2168.   gdb_assert (gdbarch != NULL);
  2169.   if (gdbarch_debug >= 2)
  2170.     fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
  2171.   return gdbarch->believe_pcc_promotion;
  2172. }

  2173. void
  2174. set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
  2175.                                    int believe_pcc_promotion)
  2176. {
  2177.   gdbarch->believe_pcc_promotion = believe_pcc_promotion;
  2178. }

  2179. int
  2180. gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
  2181. {
  2182.   gdb_assert (gdbarch != NULL);
  2183.   gdb_assert (gdbarch->convert_register_p != NULL);
  2184.   if (gdbarch_debug >= 2)
  2185.     fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
  2186.   return gdbarch->convert_register_p (gdbarch, regnum, type);
  2187. }

  2188. void
  2189. set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
  2190.                                 gdbarch_convert_register_p_ftype convert_register_p)
  2191. {
  2192.   gdbarch->convert_register_p = convert_register_p;
  2193. }

  2194. int
  2195. gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, gdb_byte *buf, int *optimizedp, int *unavailablep)
  2196. {
  2197.   gdb_assert (gdbarch != NULL);
  2198.   gdb_assert (gdbarch->register_to_value != NULL);
  2199.   if (gdbarch_debug >= 2)
  2200.     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
  2201.   return gdbarch->register_to_value (frame, regnum, type, buf, optimizedp, unavailablep);
  2202. }

  2203. void
  2204. set_gdbarch_register_to_value (struct gdbarch *gdbarch,
  2205.                                gdbarch_register_to_value_ftype register_to_value)
  2206. {
  2207.   gdbarch->register_to_value = register_to_value;
  2208. }

  2209. void
  2210. gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const gdb_byte *buf)
  2211. {
  2212.   gdb_assert (gdbarch != NULL);
  2213.   gdb_assert (gdbarch->value_to_register != NULL);
  2214.   if (gdbarch_debug >= 2)
  2215.     fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
  2216.   gdbarch->value_to_register (frame, regnum, type, buf);
  2217. }

  2218. void
  2219. set_gdbarch_value_to_register (struct gdbarch *gdbarch,
  2220.                                gdbarch_value_to_register_ftype value_to_register)
  2221. {
  2222.   gdbarch->value_to_register = value_to_register;
  2223. }

  2224. struct value *
  2225. gdbarch_value_from_register (struct gdbarch *gdbarch, struct type *type, int regnum, struct frame_id frame_id)
  2226. {
  2227.   gdb_assert (gdbarch != NULL);
  2228.   gdb_assert (gdbarch->value_from_register != NULL);
  2229.   if (gdbarch_debug >= 2)
  2230.     fprintf_unfiltered (gdb_stdlog, "gdbarch_value_from_register called\n");
  2231.   return gdbarch->value_from_register (gdbarch, type, regnum, frame_id);
  2232. }

  2233. void
  2234. set_gdbarch_value_from_register (struct gdbarch *gdbarch,
  2235.                                  gdbarch_value_from_register_ftype value_from_register)
  2236. {
  2237.   gdbarch->value_from_register = value_from_register;
  2238. }

  2239. CORE_ADDR
  2240. gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
  2241. {
  2242.   gdb_assert (gdbarch != NULL);
  2243.   gdb_assert (gdbarch->pointer_to_address != NULL);
  2244.   if (gdbarch_debug >= 2)
  2245.     fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
  2246.   return gdbarch->pointer_to_address (gdbarch, type, buf);
  2247. }

  2248. void
  2249. set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
  2250.                                 gdbarch_pointer_to_address_ftype pointer_to_address)
  2251. {
  2252.   gdbarch->pointer_to_address = pointer_to_address;
  2253. }

  2254. void
  2255. gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, gdb_byte *buf, CORE_ADDR addr)
  2256. {
  2257.   gdb_assert (gdbarch != NULL);
  2258.   gdb_assert (gdbarch->address_to_pointer != NULL);
  2259.   if (gdbarch_debug >= 2)
  2260.     fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
  2261.   gdbarch->address_to_pointer (gdbarch, type, buf, addr);
  2262. }

  2263. void
  2264. set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
  2265.                                 gdbarch_address_to_pointer_ftype address_to_pointer)
  2266. {
  2267.   gdbarch->address_to_pointer = address_to_pointer;
  2268. }

  2269. int
  2270. gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
  2271. {
  2272.   gdb_assert (gdbarch != NULL);
  2273.   return gdbarch->integer_to_address != NULL;
  2274. }

  2275. CORE_ADDR
  2276. gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
  2277. {
  2278.   gdb_assert (gdbarch != NULL);
  2279.   gdb_assert (gdbarch->integer_to_address != NULL);
  2280.   if (gdbarch_debug >= 2)
  2281.     fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
  2282.   return gdbarch->integer_to_address (gdbarch, type, buf);
  2283. }

  2284. void
  2285. set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
  2286.                                 gdbarch_integer_to_address_ftype integer_to_address)
  2287. {
  2288.   gdbarch->integer_to_address = integer_to_address;
  2289. }

  2290. int
  2291. gdbarch_return_value_p (struct gdbarch *gdbarch)
  2292. {
  2293.   gdb_assert (gdbarch != NULL);
  2294.   return gdbarch->return_value != NULL;
  2295. }

  2296. enum return_value_convention
  2297. gdbarch_return_value (struct gdbarch *gdbarch, struct value *function, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
  2298. {
  2299.   gdb_assert (gdbarch != NULL);
  2300.   gdb_assert (gdbarch->return_value != NULL);
  2301.   if (gdbarch_debug >= 2)
  2302.     fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value called\n");
  2303.   return gdbarch->return_value (gdbarch, function, valtype, regcache, readbuf, writebuf);
  2304. }

  2305. void
  2306. set_gdbarch_return_value (struct gdbarch *gdbarch,
  2307.                           gdbarch_return_value_ftype return_value)
  2308. {
  2309.   gdbarch->return_value = return_value;
  2310. }

  2311. int
  2312. gdbarch_return_in_first_hidden_param_p (struct gdbarch *gdbarch, struct type *type)
  2313. {
  2314.   gdb_assert (gdbarch != NULL);
  2315.   gdb_assert (gdbarch->return_in_first_hidden_param_p != NULL);
  2316.   if (gdbarch_debug >= 2)
  2317.     fprintf_unfiltered (gdb_stdlog, "gdbarch_return_in_first_hidden_param_p called\n");
  2318.   return gdbarch->return_in_first_hidden_param_p (gdbarch, type);
  2319. }

  2320. void
  2321. set_gdbarch_return_in_first_hidden_param_p (struct gdbarch *gdbarch,
  2322.                                             gdbarch_return_in_first_hidden_param_p_ftype return_in_first_hidden_param_p)
  2323. {
  2324.   gdbarch->return_in_first_hidden_param_p = return_in_first_hidden_param_p;
  2325. }

  2326. CORE_ADDR
  2327. gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
  2328. {
  2329.   gdb_assert (gdbarch != NULL);
  2330.   gdb_assert (gdbarch->skip_prologue != NULL);
  2331.   if (gdbarch_debug >= 2)
  2332.     fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
  2333.   return gdbarch->skip_prologue (gdbarch, ip);
  2334. }

  2335. void
  2336. set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
  2337.                            gdbarch_skip_prologue_ftype skip_prologue)
  2338. {
  2339.   gdbarch->skip_prologue = skip_prologue;
  2340. }

  2341. int
  2342. gdbarch_skip_main_prologue_p (struct gdbarch *gdbarch)
  2343. {
  2344.   gdb_assert (gdbarch != NULL);
  2345.   return gdbarch->skip_main_prologue != NULL;
  2346. }

  2347. CORE_ADDR
  2348. gdbarch_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
  2349. {
  2350.   gdb_assert (gdbarch != NULL);
  2351.   gdb_assert (gdbarch->skip_main_prologue != NULL);
  2352.   if (gdbarch_debug >= 2)
  2353.     fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_main_prologue called\n");
  2354.   return gdbarch->skip_main_prologue (gdbarch, ip);
  2355. }

  2356. void
  2357. set_gdbarch_skip_main_prologue (struct gdbarch *gdbarch,
  2358.                                 gdbarch_skip_main_prologue_ftype skip_main_prologue)
  2359. {
  2360.   gdbarch->skip_main_prologue = skip_main_prologue;
  2361. }

  2362. int
  2363. gdbarch_skip_entrypoint_p (struct gdbarch *gdbarch)
  2364. {
  2365.   gdb_assert (gdbarch != NULL);
  2366.   return gdbarch->skip_entrypoint != NULL;
  2367. }

  2368. CORE_ADDR
  2369. gdbarch_skip_entrypoint (struct gdbarch *gdbarch, CORE_ADDR ip)
  2370. {
  2371.   gdb_assert (gdbarch != NULL);
  2372.   gdb_assert (gdbarch->skip_entrypoint != NULL);
  2373.   if (gdbarch_debug >= 2)
  2374.     fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_entrypoint called\n");
  2375.   return gdbarch->skip_entrypoint (gdbarch, ip);
  2376. }

  2377. void
  2378. set_gdbarch_skip_entrypoint (struct gdbarch *gdbarch,
  2379.                              gdbarch_skip_entrypoint_ftype skip_entrypoint)
  2380. {
  2381.   gdbarch->skip_entrypoint = skip_entrypoint;
  2382. }

  2383. int
  2384. gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
  2385. {
  2386.   gdb_assert (gdbarch != NULL);
  2387.   gdb_assert (gdbarch->inner_than != NULL);
  2388.   if (gdbarch_debug >= 2)
  2389.     fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
  2390.   return gdbarch->inner_than (lhs, rhs);
  2391. }

  2392. void
  2393. set_gdbarch_inner_than (struct gdbarch *gdbarch,
  2394.                         gdbarch_inner_than_ftype inner_than)
  2395. {
  2396.   gdbarch->inner_than = inner_than;
  2397. }

  2398. const gdb_byte *
  2399. gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
  2400. {
  2401.   gdb_assert (gdbarch != NULL);
  2402.   gdb_assert (gdbarch->breakpoint_from_pc != NULL);
  2403.   if (gdbarch_debug >= 2)
  2404.     fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
  2405.   return gdbarch->breakpoint_from_pc (gdbarch, pcptr, lenptr);
  2406. }

  2407. void
  2408. set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
  2409.                                 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
  2410. {
  2411.   gdbarch->breakpoint_from_pc = breakpoint_from_pc;
  2412. }

  2413. void
  2414. gdbarch_remote_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *kindptr)
  2415. {
  2416.   gdb_assert (gdbarch != NULL);
  2417.   gdb_assert (gdbarch->remote_breakpoint_from_pc != NULL);
  2418.   if (gdbarch_debug >= 2)
  2419.     fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_breakpoint_from_pc called\n");
  2420.   gdbarch->remote_breakpoint_from_pc (gdbarch, pcptr, kindptr);
  2421. }

  2422. void
  2423. set_gdbarch_remote_breakpoint_from_pc (struct gdbarch *gdbarch,
  2424.                                        gdbarch_remote_breakpoint_from_pc_ftype remote_breakpoint_from_pc)
  2425. {
  2426.   gdbarch->remote_breakpoint_from_pc = remote_breakpoint_from_pc;
  2427. }

  2428. int
  2429. gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch)
  2430. {
  2431.   gdb_assert (gdbarch != NULL);
  2432.   return gdbarch->adjust_breakpoint_address != NULL;
  2433. }

  2434. CORE_ADDR
  2435. gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr)
  2436. {
  2437.   gdb_assert (gdbarch != NULL);
  2438.   gdb_assert (gdbarch->adjust_breakpoint_address != NULL);
  2439.   if (gdbarch_debug >= 2)
  2440.     fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_breakpoint_address called\n");
  2441.   return gdbarch->adjust_breakpoint_address (gdbarch, bpaddr);
  2442. }

  2443. void
  2444. set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch,
  2445.                                        gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address)
  2446. {
  2447.   gdbarch->adjust_breakpoint_address = adjust_breakpoint_address;
  2448. }

  2449. int
  2450. gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
  2451. {
  2452.   gdb_assert (gdbarch != NULL);
  2453.   gdb_assert (gdbarch->memory_insert_breakpoint != NULL);
  2454.   if (gdbarch_debug >= 2)
  2455.     fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
  2456.   return gdbarch->memory_insert_breakpoint (gdbarch, bp_tgt);
  2457. }

  2458. void
  2459. set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
  2460.                                       gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
  2461. {
  2462.   gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
  2463. }

  2464. int
  2465. gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
  2466. {
  2467.   gdb_assert (gdbarch != NULL);
  2468.   gdb_assert (gdbarch->memory_remove_breakpoint != NULL);
  2469.   if (gdbarch_debug >= 2)
  2470.     fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
  2471.   return gdbarch->memory_remove_breakpoint (gdbarch, bp_tgt);
  2472. }

  2473. void
  2474. set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
  2475.                                       gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
  2476. {
  2477.   gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
  2478. }

  2479. CORE_ADDR
  2480. gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
  2481. {
  2482.   gdb_assert (gdbarch != NULL);
  2483.   /* Skip verify of decr_pc_after_break, invalid_p == 0 */
  2484.   if (gdbarch_debug >= 2)
  2485.     fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
  2486.   return gdbarch->decr_pc_after_break;
  2487. }

  2488. void
  2489. set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
  2490.                                  CORE_ADDR decr_pc_after_break)
  2491. {
  2492.   gdbarch->decr_pc_after_break = decr_pc_after_break;
  2493. }

  2494. CORE_ADDR
  2495. gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch)
  2496. {
  2497.   gdb_assert (gdbarch != NULL);
  2498.   /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
  2499.   if (gdbarch_debug >= 2)
  2500.     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_function_start_offset called\n");
  2501.   return gdbarch->deprecated_function_start_offset;
  2502. }

  2503. void
  2504. set_gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch,
  2505.                                               CORE_ADDR deprecated_function_start_offset)
  2506. {
  2507.   gdbarch->deprecated_function_start_offset = deprecated_function_start_offset;
  2508. }

  2509. int
  2510. gdbarch_remote_register_number (struct gdbarch *gdbarch, int regno)
  2511. {
  2512.   gdb_assert (gdbarch != NULL);
  2513.   gdb_assert (gdbarch->remote_register_number != NULL);
  2514.   if (gdbarch_debug >= 2)
  2515.     fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_register_number called\n");
  2516.   return gdbarch->remote_register_number (gdbarch, regno);
  2517. }

  2518. void
  2519. set_gdbarch_remote_register_number (struct gdbarch *gdbarch,
  2520.                                     gdbarch_remote_register_number_ftype remote_register_number)
  2521. {
  2522.   gdbarch->remote_register_number = remote_register_number;
  2523. }

  2524. int
  2525. gdbarch_fetch_tls_load_module_address_p (struct gdbarch *gdbarch)
  2526. {
  2527.   gdb_assert (gdbarch != NULL);
  2528.   return gdbarch->fetch_tls_load_module_address != NULL;
  2529. }

  2530. CORE_ADDR
  2531. gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch, struct objfile *objfile)
  2532. {
  2533.   gdb_assert (gdbarch != NULL);
  2534.   gdb_assert (gdbarch->fetch_tls_load_module_address != NULL);
  2535.   if (gdbarch_debug >= 2)
  2536.     fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_tls_load_module_address called\n");
  2537.   return gdbarch->fetch_tls_load_module_address (objfile);
  2538. }

  2539. void
  2540. set_gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch,
  2541.                                            gdbarch_fetch_tls_load_module_address_ftype fetch_tls_load_module_address)
  2542. {
  2543.   gdbarch->fetch_tls_load_module_address = fetch_tls_load_module_address;
  2544. }

  2545. CORE_ADDR
  2546. gdbarch_frame_args_skip (struct gdbarch *gdbarch)
  2547. {
  2548.   gdb_assert (gdbarch != NULL);
  2549.   /* Skip verify of frame_args_skip, invalid_p == 0 */
  2550.   if (gdbarch_debug >= 2)
  2551.     fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
  2552.   return gdbarch->frame_args_skip;
  2553. }

  2554. void
  2555. set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
  2556.                              CORE_ADDR frame_args_skip)
  2557. {
  2558.   gdbarch->frame_args_skip = frame_args_skip;
  2559. }

  2560. int
  2561. gdbarch_unwind_pc_p (struct gdbarch *gdbarch)
  2562. {
  2563.   gdb_assert (gdbarch != NULL);
  2564.   return gdbarch->unwind_pc != NULL;
  2565. }

  2566. CORE_ADDR
  2567. gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
  2568. {
  2569.   gdb_assert (gdbarch != NULL);
  2570.   gdb_assert (gdbarch->unwind_pc != NULL);
  2571.   if (gdbarch_debug >= 2)
  2572.     fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n");
  2573.   return gdbarch->unwind_pc (gdbarch, next_frame);
  2574. }

  2575. void
  2576. set_gdbarch_unwind_pc (struct gdbarch *gdbarch,
  2577.                        gdbarch_unwind_pc_ftype unwind_pc)
  2578. {
  2579.   gdbarch->unwind_pc = unwind_pc;
  2580. }

  2581. int
  2582. gdbarch_unwind_sp_p (struct gdbarch *gdbarch)
  2583. {
  2584.   gdb_assert (gdbarch != NULL);
  2585.   return gdbarch->unwind_sp != NULL;
  2586. }

  2587. CORE_ADDR
  2588. gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
  2589. {
  2590.   gdb_assert (gdbarch != NULL);
  2591.   gdb_assert (gdbarch->unwind_sp != NULL);
  2592.   if (gdbarch_debug >= 2)
  2593.     fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_sp called\n");
  2594.   return gdbarch->unwind_sp (gdbarch, next_frame);
  2595. }

  2596. void
  2597. set_gdbarch_unwind_sp (struct gdbarch *gdbarch,
  2598.                        gdbarch_unwind_sp_ftype unwind_sp)
  2599. {
  2600.   gdbarch->unwind_sp = unwind_sp;
  2601. }

  2602. int
  2603. gdbarch_frame_num_args_p (struct gdbarch *gdbarch)
  2604. {
  2605.   gdb_assert (gdbarch != NULL);
  2606.   return gdbarch->frame_num_args != NULL;
  2607. }

  2608. int
  2609. gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
  2610. {
  2611.   gdb_assert (gdbarch != NULL);
  2612.   gdb_assert (gdbarch->frame_num_args != NULL);
  2613.   if (gdbarch_debug >= 2)
  2614.     fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
  2615.   return gdbarch->frame_num_args (frame);
  2616. }

  2617. void
  2618. set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
  2619.                             gdbarch_frame_num_args_ftype frame_num_args)
  2620. {
  2621.   gdbarch->frame_num_args = frame_num_args;
  2622. }

  2623. int
  2624. gdbarch_frame_align_p (struct gdbarch *gdbarch)
  2625. {
  2626.   gdb_assert (gdbarch != NULL);
  2627.   return gdbarch->frame_align != NULL;
  2628. }

  2629. CORE_ADDR
  2630. gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
  2631. {
  2632.   gdb_assert (gdbarch != NULL);
  2633.   gdb_assert (gdbarch->frame_align != NULL);
  2634.   if (gdbarch_debug >= 2)
  2635.     fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
  2636.   return gdbarch->frame_align (gdbarch, address);
  2637. }

  2638. void
  2639. set_gdbarch_frame_align (struct gdbarch *gdbarch,
  2640.                          gdbarch_frame_align_ftype frame_align)
  2641. {
  2642.   gdbarch->frame_align = frame_align;
  2643. }

  2644. int
  2645. gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type)
  2646. {
  2647.   gdb_assert (gdbarch != NULL);
  2648.   gdb_assert (gdbarch->stabs_argument_has_addr != NULL);
  2649.   if (gdbarch_debug >= 2)
  2650.     fprintf_unfiltered (gdb_stdlog, "gdbarch_stabs_argument_has_addr called\n");
  2651.   return gdbarch->stabs_argument_has_addr (gdbarch, type);
  2652. }

  2653. void
  2654. set_gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch,
  2655.                                      gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr)
  2656. {
  2657.   gdbarch->stabs_argument_has_addr = stabs_argument_has_addr;
  2658. }

  2659. int
  2660. gdbarch_frame_red_zone_size (struct gdbarch *gdbarch)
  2661. {
  2662.   gdb_assert (gdbarch != NULL);
  2663.   if (gdbarch_debug >= 2)
  2664.     fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_red_zone_size called\n");
  2665.   return gdbarch->frame_red_zone_size;
  2666. }

  2667. void
  2668. set_gdbarch_frame_red_zone_size (struct gdbarch *gdbarch,
  2669.                                  int frame_red_zone_size)
  2670. {
  2671.   gdbarch->frame_red_zone_size = frame_red_zone_size;
  2672. }

  2673. CORE_ADDR
  2674. gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
  2675. {
  2676.   gdb_assert (gdbarch != NULL);
  2677.   gdb_assert (gdbarch->convert_from_func_ptr_addr != NULL);
  2678.   if (gdbarch_debug >= 2)
  2679.     fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
  2680.   return gdbarch->convert_from_func_ptr_addr (gdbarch, addr, targ);
  2681. }

  2682. void
  2683. set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
  2684.                                         gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
  2685. {
  2686.   gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
  2687. }

  2688. CORE_ADDR
  2689. gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
  2690. {
  2691.   gdb_assert (gdbarch != NULL);
  2692.   gdb_assert (gdbarch->addr_bits_remove != NULL);
  2693.   if (gdbarch_debug >= 2)
  2694.     fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
  2695.   return gdbarch->addr_bits_remove (gdbarch, addr);
  2696. }

  2697. void
  2698. set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
  2699.                               gdbarch_addr_bits_remove_ftype addr_bits_remove)
  2700. {
  2701.   gdbarch->addr_bits_remove = addr_bits_remove;
  2702. }

  2703. int
  2704. gdbarch_software_single_step_p (struct gdbarch *gdbarch)
  2705. {
  2706.   gdb_assert (gdbarch != NULL);
  2707.   return gdbarch->software_single_step != NULL;
  2708. }

  2709. int
  2710. gdbarch_software_single_step (struct gdbarch *gdbarch, struct frame_info *frame)
  2711. {
  2712.   gdb_assert (gdbarch != NULL);
  2713.   gdb_assert (gdbarch->software_single_step != NULL);
  2714.   if (gdbarch_debug >= 2)
  2715.     fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
  2716.   return gdbarch->software_single_step (frame);
  2717. }

  2718. void
  2719. set_gdbarch_software_single_step (struct gdbarch *gdbarch,
  2720.                                   gdbarch_software_single_step_ftype software_single_step)
  2721. {
  2722.   gdbarch->software_single_step = software_single_step;
  2723. }

  2724. int
  2725. gdbarch_single_step_through_delay_p (struct gdbarch *gdbarch)
  2726. {
  2727.   gdb_assert (gdbarch != NULL);
  2728.   return gdbarch->single_step_through_delay != NULL;
  2729. }

  2730. int
  2731. gdbarch_single_step_through_delay (struct gdbarch *gdbarch, struct frame_info *frame)
  2732. {
  2733.   gdb_assert (gdbarch != NULL);
  2734.   gdb_assert (gdbarch->single_step_through_delay != NULL);
  2735.   if (gdbarch_debug >= 2)
  2736.     fprintf_unfiltered (gdb_stdlog, "gdbarch_single_step_through_delay called\n");
  2737.   return gdbarch->single_step_through_delay (gdbarch, frame);
  2738. }

  2739. void
  2740. set_gdbarch_single_step_through_delay (struct gdbarch *gdbarch,
  2741.                                        gdbarch_single_step_through_delay_ftype single_step_through_delay)
  2742. {
  2743.   gdbarch->single_step_through_delay = single_step_through_delay;
  2744. }

  2745. int
  2746. gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info)
  2747. {
  2748.   gdb_assert (gdbarch != NULL);
  2749.   gdb_assert (gdbarch->print_insn != NULL);
  2750.   if (gdbarch_debug >= 2)
  2751.     fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
  2752.   return gdbarch->print_insn (vma, info);
  2753. }

  2754. void
  2755. set_gdbarch_print_insn (struct gdbarch *gdbarch,
  2756.                         gdbarch_print_insn_ftype print_insn)
  2757. {
  2758.   gdbarch->print_insn = print_insn;
  2759. }

  2760. CORE_ADDR
  2761. gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR pc)
  2762. {
  2763.   gdb_assert (gdbarch != NULL);
  2764.   gdb_assert (gdbarch->skip_trampoline_code != NULL);
  2765.   if (gdbarch_debug >= 2)
  2766.     fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
  2767.   return gdbarch->skip_trampoline_code (frame, pc);
  2768. }

  2769. void
  2770. set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
  2771.                                   gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
  2772. {
  2773.   gdbarch->skip_trampoline_code = skip_trampoline_code;
  2774. }

  2775. CORE_ADDR
  2776. gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
  2777. {
  2778.   gdb_assert (gdbarch != NULL);
  2779.   gdb_assert (gdbarch->skip_solib_resolver != NULL);
  2780.   if (gdbarch_debug >= 2)
  2781.     fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_solib_resolver called\n");
  2782.   return gdbarch->skip_solib_resolver (gdbarch, pc);
  2783. }

  2784. void
  2785. set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch,
  2786.                                  gdbarch_skip_solib_resolver_ftype skip_solib_resolver)
  2787. {
  2788.   gdbarch->skip_solib_resolver = skip_solib_resolver;
  2789. }

  2790. int
  2791. gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, const char *name)
  2792. {
  2793.   gdb_assert (gdbarch != NULL);
  2794.   gdb_assert (gdbarch->in_solib_return_trampoline != NULL);
  2795.   if (gdbarch_debug >= 2)
  2796.     fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
  2797.   return gdbarch->in_solib_return_trampoline (gdbarch, pc, name);
  2798. }

  2799. void
  2800. set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
  2801.                                         gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
  2802. {
  2803.   gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
  2804. }

  2805. int
  2806. gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
  2807. {
  2808.   gdb_assert (gdbarch != NULL);
  2809.   gdb_assert (gdbarch->in_function_epilogue_p != NULL);
  2810.   if (gdbarch_debug >= 2)
  2811.     fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n");
  2812.   return gdbarch->in_function_epilogue_p (gdbarch, addr);
  2813. }

  2814. void
  2815. set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch,
  2816.                                     gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p)
  2817. {
  2818.   gdbarch->in_function_epilogue_p = in_function_epilogue_p;
  2819. }

  2820. int
  2821. gdbarch_elf_make_msymbol_special_p (struct gdbarch *gdbarch)
  2822. {
  2823.   gdb_assert (gdbarch != NULL);
  2824.   return gdbarch->elf_make_msymbol_special != NULL;
  2825. }

  2826. void
  2827. gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
  2828. {
  2829.   gdb_assert (gdbarch != NULL);
  2830.   gdb_assert (gdbarch->elf_make_msymbol_special != NULL);
  2831.   if (gdbarch_debug >= 2)
  2832.     fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
  2833.   gdbarch->elf_make_msymbol_special (sym, msym);
  2834. }

  2835. void
  2836. set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
  2837.                                       gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
  2838. {
  2839.   gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
  2840. }

  2841. void
  2842. gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
  2843. {
  2844.   gdb_assert (gdbarch != NULL);
  2845.   gdb_assert (gdbarch->coff_make_msymbol_special != NULL);
  2846.   if (gdbarch_debug >= 2)
  2847.     fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
  2848.   gdbarch->coff_make_msymbol_special (val, msym);
  2849. }

  2850. void
  2851. set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
  2852.                                        gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
  2853. {
  2854.   gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
  2855. }

  2856. void
  2857. gdbarch_make_symbol_special (struct gdbarch *gdbarch, struct symbol *sym, struct objfile *objfile)
  2858. {
  2859.   gdb_assert (gdbarch != NULL);
  2860.   gdb_assert (gdbarch->make_symbol_special != NULL);
  2861.   if (gdbarch_debug >= 2)
  2862.     fprintf_unfiltered (gdb_stdlog, "gdbarch_make_symbol_special called\n");
  2863.   gdbarch->make_symbol_special (sym, objfile);
  2864. }

  2865. void
  2866. set_gdbarch_make_symbol_special (struct gdbarch *gdbarch,
  2867.                                  gdbarch_make_symbol_special_ftype make_symbol_special)
  2868. {
  2869.   gdbarch->make_symbol_special = make_symbol_special;
  2870. }

  2871. CORE_ADDR
  2872. gdbarch_adjust_dwarf2_addr (struct gdbarch *gdbarch, CORE_ADDR pc)
  2873. {
  2874.   gdb_assert (gdbarch != NULL);
  2875.   gdb_assert (gdbarch->adjust_dwarf2_addr != NULL);
  2876.   if (gdbarch_debug >= 2)
  2877.     fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_dwarf2_addr called\n");
  2878.   return gdbarch->adjust_dwarf2_addr (pc);
  2879. }

  2880. void
  2881. set_gdbarch_adjust_dwarf2_addr (struct gdbarch *gdbarch,
  2882.                                 gdbarch_adjust_dwarf2_addr_ftype adjust_dwarf2_addr)
  2883. {
  2884.   gdbarch->adjust_dwarf2_addr = adjust_dwarf2_addr;
  2885. }

  2886. CORE_ADDR
  2887. gdbarch_adjust_dwarf2_line (struct gdbarch *gdbarch, CORE_ADDR addr, int rel)
  2888. {
  2889.   gdb_assert (gdbarch != NULL);
  2890.   gdb_assert (gdbarch->adjust_dwarf2_line != NULL);
  2891.   if (gdbarch_debug >= 2)
  2892.     fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_dwarf2_line called\n");
  2893.   return gdbarch->adjust_dwarf2_line (addr, rel);
  2894. }

  2895. void
  2896. set_gdbarch_adjust_dwarf2_line (struct gdbarch *gdbarch,
  2897.                                 gdbarch_adjust_dwarf2_line_ftype adjust_dwarf2_line)
  2898. {
  2899.   gdbarch->adjust_dwarf2_line = adjust_dwarf2_line;
  2900. }

  2901. int
  2902. gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
  2903. {
  2904.   gdb_assert (gdbarch != NULL);
  2905.   /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
  2906.   if (gdbarch_debug >= 2)
  2907.     fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
  2908.   return gdbarch->cannot_step_breakpoint;
  2909. }

  2910. void
  2911. set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
  2912.                                     int cannot_step_breakpoint)
  2913. {
  2914.   gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
  2915. }

  2916. int
  2917. gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
  2918. {
  2919.   gdb_assert (gdbarch != NULL);
  2920.   /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
  2921.   if (gdbarch_debug >= 2)
  2922.     fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
  2923.   return gdbarch->have_nonsteppable_watchpoint;
  2924. }

  2925. void
  2926. set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
  2927.                                           int have_nonsteppable_watchpoint)
  2928. {
  2929.   gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
  2930. }

  2931. int
  2932. gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
  2933. {
  2934.   gdb_assert (gdbarch != NULL);
  2935.   return gdbarch->address_class_type_flags != NULL;
  2936. }

  2937. int
  2938. gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
  2939. {
  2940.   gdb_assert (gdbarch != NULL);
  2941.   gdb_assert (gdbarch->address_class_type_flags != NULL);
  2942.   if (gdbarch_debug >= 2)
  2943.     fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
  2944.   return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
  2945. }

  2946. void
  2947. set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
  2948.                                       gdbarch_address_class_type_flags_ftype address_class_type_flags)
  2949. {
  2950.   gdbarch->address_class_type_flags = address_class_type_flags;
  2951. }

  2952. int
  2953. gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
  2954. {
  2955.   gdb_assert (gdbarch != NULL);
  2956.   return gdbarch->address_class_type_flags_to_name != NULL;
  2957. }

  2958. const char *
  2959. gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
  2960. {
  2961.   gdb_assert (gdbarch != NULL);
  2962.   gdb_assert (gdbarch->address_class_type_flags_to_name != NULL);
  2963.   if (gdbarch_debug >= 2)
  2964.     fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
  2965.   return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
  2966. }

  2967. void
  2968. set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
  2969.                                               gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
  2970. {
  2971.   gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
  2972. }

  2973. int
  2974. gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
  2975. {
  2976.   gdb_assert (gdbarch != NULL);
  2977.   return gdbarch->address_class_name_to_type_flags != NULL;
  2978. }

  2979. int
  2980. gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
  2981. {
  2982.   gdb_assert (gdbarch != NULL);
  2983.   gdb_assert (gdbarch->address_class_name_to_type_flags != NULL);
  2984.   if (gdbarch_debug >= 2)
  2985.     fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
  2986.   return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
  2987. }

  2988. void
  2989. set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
  2990.                                               gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
  2991. {
  2992.   gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
  2993. }

  2994. int
  2995. gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
  2996. {
  2997.   gdb_assert (gdbarch != NULL);
  2998.   gdb_assert (gdbarch->register_reggroup_p != NULL);
  2999.   if (gdbarch_debug >= 2)
  3000.     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
  3001.   return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
  3002. }

  3003. void
  3004. set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
  3005.                                  gdbarch_register_reggroup_p_ftype register_reggroup_p)
  3006. {
  3007.   gdbarch->register_reggroup_p = register_reggroup_p;
  3008. }

  3009. int
  3010. gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch)
  3011. {
  3012.   gdb_assert (gdbarch != NULL);
  3013.   return gdbarch->fetch_pointer_argument != NULL;
  3014. }

  3015. CORE_ADDR
  3016. gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type)
  3017. {
  3018.   gdb_assert (gdbarch != NULL);
  3019.   gdb_assert (gdbarch->fetch_pointer_argument != NULL);
  3020.   if (gdbarch_debug >= 2)
  3021.     fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n");
  3022.   return gdbarch->fetch_pointer_argument (frame, argi, type);
  3023. }

  3024. void
  3025. set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch,
  3026.                                     gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument)
  3027. {
  3028.   gdbarch->fetch_pointer_argument = fetch_pointer_argument;
  3029. }

  3030. int
  3031. gdbarch_iterate_over_regset_sections_p (struct gdbarch *gdbarch)
  3032. {
  3033.   gdb_assert (gdbarch != NULL);
  3034.   return gdbarch->iterate_over_regset_sections != NULL;
  3035. }

  3036. void
  3037. gdbarch_iterate_over_regset_sections (struct gdbarch *gdbarch, iterate_over_regset_sections_cb *cb, void *cb_data, const struct regcache *regcache)
  3038. {
  3039.   gdb_assert (gdbarch != NULL);
  3040.   gdb_assert (gdbarch->iterate_over_regset_sections != NULL);
  3041.   if (gdbarch_debug >= 2)
  3042.     fprintf_unfiltered (gdb_stdlog, "gdbarch_iterate_over_regset_sections called\n");
  3043.   gdbarch->iterate_over_regset_sections (gdbarch, cb, cb_data, regcache);
  3044. }

  3045. void
  3046. set_gdbarch_iterate_over_regset_sections (struct gdbarch *gdbarch,
  3047.                                           gdbarch_iterate_over_regset_sections_ftype iterate_over_regset_sections)
  3048. {
  3049.   gdbarch->iterate_over_regset_sections = iterate_over_regset_sections;
  3050. }

  3051. int
  3052. gdbarch_make_corefile_notes_p (struct gdbarch *gdbarch)
  3053. {
  3054.   gdb_assert (gdbarch != NULL);
  3055.   return gdbarch->make_corefile_notes != NULL;
  3056. }

  3057. char *
  3058. gdbarch_make_corefile_notes (struct gdbarch *gdbarch, bfd *obfd, int *note_size)
  3059. {
  3060.   gdb_assert (gdbarch != NULL);
  3061.   gdb_assert (gdbarch->make_corefile_notes != NULL);
  3062.   if (gdbarch_debug >= 2)
  3063.     fprintf_unfiltered (gdb_stdlog, "gdbarch_make_corefile_notes called\n");
  3064.   return gdbarch->make_corefile_notes (gdbarch, obfd, note_size);
  3065. }

  3066. void
  3067. set_gdbarch_make_corefile_notes (struct gdbarch *gdbarch,
  3068.                                  gdbarch_make_corefile_notes_ftype make_corefile_notes)
  3069. {
  3070.   gdbarch->make_corefile_notes = make_corefile_notes;
  3071. }

  3072. int
  3073. gdbarch_elfcore_write_linux_prpsinfo_p (struct gdbarch *gdbarch)
  3074. {
  3075.   gdb_assert (gdbarch != NULL);
  3076.   return gdbarch->elfcore_write_linux_prpsinfo != NULL;
  3077. }

  3078. char *
  3079. gdbarch_elfcore_write_linux_prpsinfo (struct gdbarch *gdbarch, bfd *obfd, char *note_data, int *note_size, const struct elf_internal_linux_prpsinfo *info)
  3080. {
  3081.   gdb_assert (gdbarch != NULL);
  3082.   gdb_assert (gdbarch->elfcore_write_linux_prpsinfo != NULL);
  3083.   if (gdbarch_debug >= 2)
  3084.     fprintf_unfiltered (gdb_stdlog, "gdbarch_elfcore_write_linux_prpsinfo called\n");
  3085.   return gdbarch->elfcore_write_linux_prpsinfo (obfd, note_data, note_size, info);
  3086. }

  3087. void
  3088. set_gdbarch_elfcore_write_linux_prpsinfo (struct gdbarch *gdbarch,
  3089.                                           gdbarch_elfcore_write_linux_prpsinfo_ftype elfcore_write_linux_prpsinfo)
  3090. {
  3091.   gdbarch->elfcore_write_linux_prpsinfo = elfcore_write_linux_prpsinfo;
  3092. }

  3093. int
  3094. gdbarch_find_memory_regions_p (struct gdbarch *gdbarch)
  3095. {
  3096.   gdb_assert (gdbarch != NULL);
  3097.   return gdbarch->find_memory_regions != NULL;
  3098. }

  3099. int
  3100. gdbarch_find_memory_regions (struct gdbarch *gdbarch, find_memory_region_ftype func, void *data)
  3101. {
  3102.   gdb_assert (gdbarch != NULL);
  3103.   gdb_assert (gdbarch->find_memory_regions != NULL);
  3104.   if (gdbarch_debug >= 2)
  3105.     fprintf_unfiltered (gdb_stdlog, "gdbarch_find_memory_regions called\n");
  3106.   return gdbarch->find_memory_regions (gdbarch, func, data);
  3107. }

  3108. void
  3109. set_gdbarch_find_memory_regions (struct gdbarch *gdbarch,
  3110.                                  gdbarch_find_memory_regions_ftype find_memory_regions)
  3111. {
  3112.   gdbarch->find_memory_regions = find_memory_regions;
  3113. }

  3114. int
  3115. gdbarch_core_xfer_shared_libraries_p (struct gdbarch *gdbarch)
  3116. {
  3117.   gdb_assert (gdbarch != NULL);
  3118.   return gdbarch->core_xfer_shared_libraries != NULL;
  3119. }

  3120. ULONGEST
  3121. gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len)
  3122. {
  3123.   gdb_assert (gdbarch != NULL);
  3124.   gdb_assert (gdbarch->core_xfer_shared_libraries != NULL);
  3125.   if (gdbarch_debug >= 2)
  3126.     fprintf_unfiltered (gdb_stdlog, "gdbarch_core_xfer_shared_libraries called\n");
  3127.   return gdbarch->core_xfer_shared_libraries (gdbarch, readbuf, offset, len);
  3128. }

  3129. void
  3130. set_gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch,
  3131.                                         gdbarch_core_xfer_shared_libraries_ftype core_xfer_shared_libraries)
  3132. {
  3133.   gdbarch->core_xfer_shared_libraries = core_xfer_shared_libraries;
  3134. }

  3135. int
  3136. gdbarch_core_xfer_shared_libraries_aix_p (struct gdbarch *gdbarch)
  3137. {
  3138.   gdb_assert (gdbarch != NULL);
  3139.   return gdbarch->core_xfer_shared_libraries_aix != NULL;
  3140. }

  3141. ULONGEST
  3142. gdbarch_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len)
  3143. {
  3144.   gdb_assert (gdbarch != NULL);
  3145.   gdb_assert (gdbarch->core_xfer_shared_libraries_aix != NULL);
  3146.   if (gdbarch_debug >= 2)
  3147.     fprintf_unfiltered (gdb_stdlog, "gdbarch_core_xfer_shared_libraries_aix called\n");
  3148.   return gdbarch->core_xfer_shared_libraries_aix (gdbarch, readbuf, offset, len);
  3149. }

  3150. void
  3151. set_gdbarch_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch,
  3152.                                             gdbarch_core_xfer_shared_libraries_aix_ftype core_xfer_shared_libraries_aix)
  3153. {
  3154.   gdbarch->core_xfer_shared_libraries_aix = core_xfer_shared_libraries_aix;
  3155. }

  3156. int
  3157. gdbarch_core_pid_to_str_p (struct gdbarch *gdbarch)
  3158. {
  3159.   gdb_assert (gdbarch != NULL);
  3160.   return gdbarch->core_pid_to_str != NULL;
  3161. }

  3162. char *
  3163. gdbarch_core_pid_to_str (struct gdbarch *gdbarch, ptid_t ptid)
  3164. {
  3165.   gdb_assert (gdbarch != NULL);
  3166.   gdb_assert (gdbarch->core_pid_to_str != NULL);
  3167.   if (gdbarch_debug >= 2)
  3168.     fprintf_unfiltered (gdb_stdlog, "gdbarch_core_pid_to_str called\n");
  3169.   return gdbarch->core_pid_to_str (gdbarch, ptid);
  3170. }

  3171. void
  3172. set_gdbarch_core_pid_to_str (struct gdbarch *gdbarch,
  3173.                              gdbarch_core_pid_to_str_ftype core_pid_to_str)
  3174. {
  3175.   gdbarch->core_pid_to_str = core_pid_to_str;
  3176. }

  3177. int
  3178. gdbarch_gcore_bfd_target_p (struct gdbarch *gdbarch)
  3179. {
  3180.   gdb_assert (gdbarch != NULL);
  3181.   return gdbarch->gcore_bfd_target != 0;
  3182. }

  3183. const char *
  3184. gdbarch_gcore_bfd_target (struct gdbarch *gdbarch)
  3185. {
  3186.   gdb_assert (gdbarch != NULL);
  3187.   /* Check variable changed from pre-default.  */
  3188.   gdb_assert (gdbarch->gcore_bfd_target != 0);
  3189.   if (gdbarch_debug >= 2)
  3190.     fprintf_unfiltered (gdb_stdlog, "gdbarch_gcore_bfd_target called\n");
  3191.   return gdbarch->gcore_bfd_target;
  3192. }

  3193. void
  3194. set_gdbarch_gcore_bfd_target (struct gdbarch *gdbarch,
  3195.                               const char * gcore_bfd_target)
  3196. {
  3197.   gdbarch->gcore_bfd_target = gcore_bfd_target;
  3198. }

  3199. int
  3200. gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch)
  3201. {
  3202.   gdb_assert (gdbarch != NULL);
  3203.   /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
  3204.   if (gdbarch_debug >= 2)
  3205.     fprintf_unfiltered (gdb_stdlog, "gdbarch_vtable_function_descriptors called\n");
  3206.   return gdbarch->vtable_function_descriptors;
  3207. }

  3208. void
  3209. set_gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch,
  3210.                                          int vtable_function_descriptors)
  3211. {
  3212.   gdbarch->vtable_function_descriptors = vtable_function_descriptors;
  3213. }

  3214. int
  3215. gdbarch_vbit_in_delta (struct gdbarch *gdbarch)
  3216. {
  3217.   gdb_assert (gdbarch != NULL);
  3218.   /* Skip verify of vbit_in_delta, invalid_p == 0 */
  3219.   if (gdbarch_debug >= 2)
  3220.     fprintf_unfiltered (gdb_stdlog, "gdbarch_vbit_in_delta called\n");
  3221.   return gdbarch->vbit_in_delta;
  3222. }

  3223. void
  3224. set_gdbarch_vbit_in_delta (struct gdbarch *gdbarch,
  3225.                            int vbit_in_delta)
  3226. {
  3227.   gdbarch->vbit_in_delta = vbit_in_delta;
  3228. }

  3229. void
  3230. gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch, struct regcache *regcache)
  3231. {
  3232.   gdb_assert (gdbarch != NULL);
  3233.   gdb_assert (gdbarch->skip_permanent_breakpoint != NULL);
  3234.   if (gdbarch_debug >= 2)
  3235.     fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_permanent_breakpoint called\n");
  3236.   gdbarch->skip_permanent_breakpoint (regcache);
  3237. }

  3238. void
  3239. set_gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch,
  3240.                                        gdbarch_skip_permanent_breakpoint_ftype skip_permanent_breakpoint)
  3241. {
  3242.   gdbarch->skip_permanent_breakpoint = skip_permanent_breakpoint;
  3243. }

  3244. int
  3245. gdbarch_max_insn_length_p (struct gdbarch *gdbarch)
  3246. {
  3247.   gdb_assert (gdbarch != NULL);
  3248.   return gdbarch->max_insn_length != 0;
  3249. }

  3250. ULONGEST
  3251. gdbarch_max_insn_length (struct gdbarch *gdbarch)
  3252. {
  3253.   gdb_assert (gdbarch != NULL);
  3254.   /* Check variable changed from pre-default.  */
  3255.   gdb_assert (gdbarch->max_insn_length != 0);
  3256.   if (gdbarch_debug >= 2)
  3257.     fprintf_unfiltered (gdb_stdlog, "gdbarch_max_insn_length called\n");
  3258.   return gdbarch->max_insn_length;
  3259. }

  3260. void
  3261. set_gdbarch_max_insn_length (struct gdbarch *gdbarch,
  3262.                              ULONGEST max_insn_length)
  3263. {
  3264.   gdbarch->max_insn_length = max_insn_length;
  3265. }

  3266. int
  3267. gdbarch_displaced_step_copy_insn_p (struct gdbarch *gdbarch)
  3268. {
  3269.   gdb_assert (gdbarch != NULL);
  3270.   return gdbarch->displaced_step_copy_insn != NULL;
  3271. }

  3272. struct displaced_step_closure *
  3273. gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch, CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
  3274. {
  3275.   gdb_assert (gdbarch != NULL);
  3276.   gdb_assert (gdbarch->displaced_step_copy_insn != NULL);
  3277.   if (gdbarch_debug >= 2)
  3278.     fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_copy_insn called\n");
  3279.   return gdbarch->displaced_step_copy_insn (gdbarch, from, to, regs);
  3280. }

  3281. void
  3282. set_gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch,
  3283.                                       gdbarch_displaced_step_copy_insn_ftype displaced_step_copy_insn)
  3284. {
  3285.   gdbarch->displaced_step_copy_insn = displaced_step_copy_insn;
  3286. }

  3287. int
  3288. gdbarch_displaced_step_hw_singlestep (struct gdbarch *gdbarch, struct displaced_step_closure *closure)
  3289. {
  3290.   gdb_assert (gdbarch != NULL);
  3291.   gdb_assert (gdbarch->displaced_step_hw_singlestep != NULL);
  3292.   if (gdbarch_debug >= 2)
  3293.     fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_hw_singlestep called\n");
  3294.   return gdbarch->displaced_step_hw_singlestep (gdbarch, closure);
  3295. }

  3296. void
  3297. set_gdbarch_displaced_step_hw_singlestep (struct gdbarch *gdbarch,
  3298.                                           gdbarch_displaced_step_hw_singlestep_ftype displaced_step_hw_singlestep)
  3299. {
  3300.   gdbarch->displaced_step_hw_singlestep = displaced_step_hw_singlestep;
  3301. }

  3302. int
  3303. gdbarch_displaced_step_fixup_p (struct gdbarch *gdbarch)
  3304. {
  3305.   gdb_assert (gdbarch != NULL);
  3306.   return gdbarch->displaced_step_fixup != NULL;
  3307. }

  3308. void
  3309. gdbarch_displaced_step_fixup (struct gdbarch *gdbarch, struct displaced_step_closure *closure, CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
  3310. {
  3311.   gdb_assert (gdbarch != NULL);
  3312.   gdb_assert (gdbarch->displaced_step_fixup != NULL);
  3313.   /* Do not check predicate: gdbarch->displaced_step_fixup != NULL, allow call.  */
  3314.   if (gdbarch_debug >= 2)
  3315.     fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_fixup called\n");
  3316.   gdbarch->displaced_step_fixup (gdbarch, closure, from, to, regs);
  3317. }

  3318. void
  3319. set_gdbarch_displaced_step_fixup (struct gdbarch *gdbarch,
  3320.                                   gdbarch_displaced_step_fixup_ftype displaced_step_fixup)
  3321. {
  3322.   gdbarch->displaced_step_fixup = displaced_step_fixup;
  3323. }

  3324. void
  3325. gdbarch_displaced_step_free_closure (struct gdbarch *gdbarch, struct displaced_step_closure *closure)
  3326. {
  3327.   gdb_assert (gdbarch != NULL);
  3328.   gdb_assert (gdbarch->displaced_step_free_closure != NULL);
  3329.   if (gdbarch_debug >= 2)
  3330.     fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_free_closure called\n");
  3331.   gdbarch->displaced_step_free_closure (gdbarch, closure);
  3332. }

  3333. void
  3334. set_gdbarch_displaced_step_free_closure (struct gdbarch *gdbarch,
  3335.                                          gdbarch_displaced_step_free_closure_ftype displaced_step_free_closure)
  3336. {
  3337.   gdbarch->displaced_step_free_closure = displaced_step_free_closure;
  3338. }

  3339. CORE_ADDR
  3340. gdbarch_displaced_step_location (struct gdbarch *gdbarch)
  3341. {
  3342.   gdb_assert (gdbarch != NULL);
  3343.   gdb_assert (gdbarch->displaced_step_location != NULL);
  3344.   if (gdbarch_debug >= 2)
  3345.     fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_location called\n");
  3346.   return gdbarch->displaced_step_location (gdbarch);
  3347. }

  3348. void
  3349. set_gdbarch_displaced_step_location (struct gdbarch *gdbarch,
  3350.                                      gdbarch_displaced_step_location_ftype displaced_step_location)
  3351. {
  3352.   gdbarch->displaced_step_location = displaced_step_location;
  3353. }

  3354. int
  3355. gdbarch_relocate_instruction_p (struct gdbarch *gdbarch)
  3356. {
  3357.   gdb_assert (gdbarch != NULL);
  3358.   return gdbarch->relocate_instruction != NULL;
  3359. }

  3360. void
  3361. gdbarch_relocate_instruction (struct gdbarch *gdbarch, CORE_ADDR *to, CORE_ADDR from)
  3362. {
  3363.   gdb_assert (gdbarch != NULL);
  3364.   gdb_assert (gdbarch->relocate_instruction != NULL);
  3365.   /* Do not check predicate: gdbarch->relocate_instruction != NULL, allow call.  */
  3366.   if (gdbarch_debug >= 2)
  3367.     fprintf_unfiltered (gdb_stdlog, "gdbarch_relocate_instruction called\n");
  3368.   gdbarch->relocate_instruction (gdbarch, to, from);
  3369. }

  3370. void
  3371. set_gdbarch_relocate_instruction (struct gdbarch *gdbarch,
  3372.                                   gdbarch_relocate_instruction_ftype relocate_instruction)
  3373. {
  3374.   gdbarch->relocate_instruction = relocate_instruction;
  3375. }

  3376. int
  3377. gdbarch_overlay_update_p (struct gdbarch *gdbarch)
  3378. {
  3379.   gdb_assert (gdbarch != NULL);
  3380.   return gdbarch->overlay_update != NULL;
  3381. }

  3382. void
  3383. gdbarch_overlay_update (struct gdbarch *gdbarch, struct obj_section *osect)
  3384. {
  3385.   gdb_assert (gdbarch != NULL);
  3386.   gdb_assert (gdbarch->overlay_update != NULL);
  3387.   if (gdbarch_debug >= 2)
  3388.     fprintf_unfiltered (gdb_stdlog, "gdbarch_overlay_update called\n");
  3389.   gdbarch->overlay_update (osect);
  3390. }

  3391. void
  3392. set_gdbarch_overlay_update (struct gdbarch *gdbarch,
  3393.                             gdbarch_overlay_update_ftype overlay_update)
  3394. {
  3395.   gdbarch->overlay_update = overlay_update;
  3396. }

  3397. int
  3398. gdbarch_core_read_description_p (struct gdbarch *gdbarch)
  3399. {
  3400.   gdb_assert (gdbarch != NULL);
  3401.   return gdbarch->core_read_description != NULL;
  3402. }

  3403. const struct target_desc *
  3404. gdbarch_core_read_description (struct gdbarch *gdbarch, struct target_ops *target, bfd *abfd)
  3405. {
  3406.   gdb_assert (gdbarch != NULL);
  3407.   gdb_assert (gdbarch->core_read_description != NULL);
  3408.   if (gdbarch_debug >= 2)
  3409.     fprintf_unfiltered (gdb_stdlog, "gdbarch_core_read_description called\n");
  3410.   return gdbarch->core_read_description (gdbarch, target, abfd);
  3411. }

  3412. void
  3413. set_gdbarch_core_read_description (struct gdbarch *gdbarch,
  3414.                                    gdbarch_core_read_description_ftype core_read_description)
  3415. {
  3416.   gdbarch->core_read_description = core_read_description;
  3417. }

  3418. int
  3419. gdbarch_static_transform_name_p (struct gdbarch *gdbarch)
  3420. {
  3421.   gdb_assert (gdbarch != NULL);
  3422.   return gdbarch->static_transform_name != NULL;
  3423. }

  3424. const char *
  3425. gdbarch_static_transform_name (struct gdbarch *gdbarch, const char *name)
  3426. {
  3427.   gdb_assert (gdbarch != NULL);
  3428.   gdb_assert (gdbarch->static_transform_name != NULL);
  3429.   if (gdbarch_debug >= 2)
  3430.     fprintf_unfiltered (gdb_stdlog, "gdbarch_static_transform_name called\n");
  3431.   return gdbarch->static_transform_name (name);
  3432. }

  3433. void
  3434. set_gdbarch_static_transform_name (struct gdbarch *gdbarch,
  3435.                                    gdbarch_static_transform_name_ftype static_transform_name)
  3436. {
  3437.   gdbarch->static_transform_name = static_transform_name;
  3438. }

  3439. int
  3440. gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch)
  3441. {
  3442.   gdb_assert (gdbarch != NULL);
  3443.   /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
  3444.   if (gdbarch_debug >= 2)
  3445.     fprintf_unfiltered (gdb_stdlog, "gdbarch_sofun_address_maybe_missing called\n");
  3446.   return gdbarch->sofun_address_maybe_missing;
  3447. }

  3448. void
  3449. set_gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch,
  3450.                                          int sofun_address_maybe_missing)
  3451. {
  3452.   gdbarch->sofun_address_maybe_missing = sofun_address_maybe_missing;
  3453. }

  3454. int
  3455. gdbarch_process_record_p (struct gdbarch *gdbarch)
  3456. {
  3457.   gdb_assert (gdbarch != NULL);
  3458.   return gdbarch->process_record != NULL;
  3459. }

  3460. int
  3461. gdbarch_process_record (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR addr)
  3462. {
  3463.   gdb_assert (gdbarch != NULL);
  3464.   gdb_assert (gdbarch->process_record != NULL);
  3465.   if (gdbarch_debug >= 2)
  3466.     fprintf_unfiltered (gdb_stdlog, "gdbarch_process_record called\n");
  3467.   return gdbarch->process_record (gdbarch, regcache, addr);
  3468. }

  3469. void
  3470. set_gdbarch_process_record (struct gdbarch *gdbarch,
  3471.                             gdbarch_process_record_ftype process_record)
  3472. {
  3473.   gdbarch->process_record = process_record;
  3474. }

  3475. int
  3476. gdbarch_process_record_signal_p (struct gdbarch *gdbarch)
  3477. {
  3478.   gdb_assert (gdbarch != NULL);
  3479.   return gdbarch->process_record_signal != NULL;
  3480. }

  3481. int
  3482. gdbarch_process_record_signal (struct gdbarch *gdbarch, struct regcache *regcache, enum gdb_signal signal)
  3483. {
  3484.   gdb_assert (gdbarch != NULL);
  3485.   gdb_assert (gdbarch->process_record_signal != NULL);
  3486.   if (gdbarch_debug >= 2)
  3487.     fprintf_unfiltered (gdb_stdlog, "gdbarch_process_record_signal called\n");
  3488.   return gdbarch->process_record_signal (gdbarch, regcache, signal);
  3489. }

  3490. void
  3491. set_gdbarch_process_record_signal (struct gdbarch *gdbarch,
  3492.                                    gdbarch_process_record_signal_ftype process_record_signal)
  3493. {
  3494.   gdbarch->process_record_signal = process_record_signal;
  3495. }

  3496. int
  3497. gdbarch_gdb_signal_from_target_p (struct gdbarch *gdbarch)
  3498. {
  3499.   gdb_assert (gdbarch != NULL);
  3500.   return gdbarch->gdb_signal_from_target != NULL;
  3501. }

  3502. enum gdb_signal
  3503. gdbarch_gdb_signal_from_target (struct gdbarch *gdbarch, int signo)
  3504. {
  3505.   gdb_assert (gdbarch != NULL);
  3506.   gdb_assert (gdbarch->gdb_signal_from_target != NULL);
  3507.   if (gdbarch_debug >= 2)
  3508.     fprintf_unfiltered (gdb_stdlog, "gdbarch_gdb_signal_from_target called\n");
  3509.   return gdbarch->gdb_signal_from_target (gdbarch, signo);
  3510. }

  3511. void
  3512. set_gdbarch_gdb_signal_from_target (struct gdbarch *gdbarch,
  3513.                                     gdbarch_gdb_signal_from_target_ftype gdb_signal_from_target)
  3514. {
  3515.   gdbarch->gdb_signal_from_target = gdb_signal_from_target;
  3516. }

  3517. int
  3518. gdbarch_gdb_signal_to_target_p (struct gdbarch *gdbarch)
  3519. {
  3520.   gdb_assert (gdbarch != NULL);
  3521.   return gdbarch->gdb_signal_to_target != NULL;
  3522. }

  3523. int
  3524. gdbarch_gdb_signal_to_target (struct gdbarch *gdbarch, enum gdb_signal signal)
  3525. {
  3526.   gdb_assert (gdbarch != NULL);
  3527.   gdb_assert (gdbarch->gdb_signal_to_target != NULL);
  3528.   if (gdbarch_debug >= 2)
  3529.     fprintf_unfiltered (gdb_stdlog, "gdbarch_gdb_signal_to_target called\n");
  3530.   return gdbarch->gdb_signal_to_target (gdbarch, signal);
  3531. }

  3532. void
  3533. set_gdbarch_gdb_signal_to_target (struct gdbarch *gdbarch,
  3534.                                   gdbarch_gdb_signal_to_target_ftype gdb_signal_to_target)
  3535. {
  3536.   gdbarch->gdb_signal_to_target = gdb_signal_to_target;
  3537. }

  3538. int
  3539. gdbarch_get_siginfo_type_p (struct gdbarch *gdbarch)
  3540. {
  3541.   gdb_assert (gdbarch != NULL);
  3542.   return gdbarch->get_siginfo_type != NULL;
  3543. }

  3544. struct type *
  3545. gdbarch_get_siginfo_type (struct gdbarch *gdbarch)
  3546. {
  3547.   gdb_assert (gdbarch != NULL);
  3548.   gdb_assert (gdbarch->get_siginfo_type != NULL);
  3549.   if (gdbarch_debug >= 2)
  3550.     fprintf_unfiltered (gdb_stdlog, "gdbarch_get_siginfo_type called\n");
  3551.   return gdbarch->get_siginfo_type (gdbarch);
  3552. }

  3553. void
  3554. set_gdbarch_get_siginfo_type (struct gdbarch *gdbarch,
  3555.                               gdbarch_get_siginfo_type_ftype get_siginfo_type)
  3556. {
  3557.   gdbarch->get_siginfo_type = get_siginfo_type;
  3558. }

  3559. int
  3560. gdbarch_record_special_symbol_p (struct gdbarch *gdbarch)
  3561. {
  3562.   gdb_assert (gdbarch != NULL);
  3563.   return gdbarch->record_special_symbol != NULL;
  3564. }

  3565. void
  3566. gdbarch_record_special_symbol (struct gdbarch *gdbarch, struct objfile *objfile, asymbol *sym)
  3567. {
  3568.   gdb_assert (gdbarch != NULL);
  3569.   gdb_assert (gdbarch->record_special_symbol != NULL);
  3570.   if (gdbarch_debug >= 2)
  3571.     fprintf_unfiltered (gdb_stdlog, "gdbarch_record_special_symbol called\n");
  3572.   gdbarch->record_special_symbol (gdbarch, objfile, sym);
  3573. }

  3574. void
  3575. set_gdbarch_record_special_symbol (struct gdbarch *gdbarch,
  3576.                                    gdbarch_record_special_symbol_ftype record_special_symbol)
  3577. {
  3578.   gdbarch->record_special_symbol = record_special_symbol;
  3579. }

  3580. int
  3581. gdbarch_get_syscall_number_p (struct gdbarch *gdbarch)
  3582. {
  3583.   gdb_assert (gdbarch != NULL);
  3584.   return gdbarch->get_syscall_number != NULL;
  3585. }

  3586. LONGEST
  3587. gdbarch_get_syscall_number (struct gdbarch *gdbarch, ptid_t ptid)
  3588. {
  3589.   gdb_assert (gdbarch != NULL);
  3590.   gdb_assert (gdbarch->get_syscall_number != NULL);
  3591.   if (gdbarch_debug >= 2)
  3592.     fprintf_unfiltered (gdb_stdlog, "gdbarch_get_syscall_number called\n");
  3593.   return gdbarch->get_syscall_number (gdbarch, ptid);
  3594. }

  3595. void
  3596. set_gdbarch_get_syscall_number (struct gdbarch *gdbarch,
  3597.                                 gdbarch_get_syscall_number_ftype get_syscall_number)
  3598. {
  3599.   gdbarch->get_syscall_number = get_syscall_number;
  3600. }

  3601. const char *
  3602. gdbarch_xml_syscall_file (struct gdbarch *gdbarch)
  3603. {
  3604.   gdb_assert (gdbarch != NULL);
  3605.   /* Skip verify of xml_syscall_file, invalid_p == 0 */
  3606.   if (gdbarch_debug >= 2)
  3607.     fprintf_unfiltered (gdb_stdlog, "gdbarch_xml_syscall_file called\n");
  3608.   return gdbarch->xml_syscall_file;
  3609. }

  3610. void
  3611. set_gdbarch_xml_syscall_file (struct gdbarch *gdbarch,
  3612.                               const char * xml_syscall_file)
  3613. {
  3614.   gdbarch->xml_syscall_file = xml_syscall_file;
  3615. }

  3616. struct syscalls_info *
  3617. gdbarch_syscalls_info (struct gdbarch *gdbarch)
  3618. {
  3619.   gdb_assert (gdbarch != NULL);
  3620.   /* Skip verify of syscalls_info, invalid_p == 0 */
  3621.   if (gdbarch_debug >= 2)
  3622.     fprintf_unfiltered (gdb_stdlog, "gdbarch_syscalls_info called\n");
  3623.   return gdbarch->syscalls_info;
  3624. }

  3625. void
  3626. set_gdbarch_syscalls_info (struct gdbarch *gdbarch,
  3627.                            struct syscalls_info * syscalls_info)
  3628. {
  3629.   gdbarch->syscalls_info = syscalls_info;
  3630. }

  3631. const char *const *
  3632. gdbarch_stap_integer_prefixes (struct gdbarch *gdbarch)
  3633. {
  3634.   gdb_assert (gdbarch != NULL);
  3635.   /* Skip verify of stap_integer_prefixes, invalid_p == 0 */
  3636.   if (gdbarch_debug >= 2)
  3637.     fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_integer_prefixes called\n");
  3638.   return gdbarch->stap_integer_prefixes;
  3639. }

  3640. void
  3641. set_gdbarch_stap_integer_prefixes (struct gdbarch *gdbarch,
  3642.                                    const char *const * stap_integer_prefixes)
  3643. {
  3644.   gdbarch->stap_integer_prefixes = stap_integer_prefixes;
  3645. }

  3646. const char *const *
  3647. gdbarch_stap_integer_suffixes (struct gdbarch *gdbarch)
  3648. {
  3649.   gdb_assert (gdbarch != NULL);
  3650.   /* Skip verify of stap_integer_suffixes, invalid_p == 0 */
  3651.   if (gdbarch_debug >= 2)
  3652.     fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_integer_suffixes called\n");
  3653.   return gdbarch->stap_integer_suffixes;
  3654. }

  3655. void
  3656. set_gdbarch_stap_integer_suffixes (struct gdbarch *gdbarch,
  3657.                                    const char *const * stap_integer_suffixes)
  3658. {
  3659.   gdbarch->stap_integer_suffixes = stap_integer_suffixes;
  3660. }

  3661. const char *const *
  3662. gdbarch_stap_register_prefixes (struct gdbarch *gdbarch)
  3663. {
  3664.   gdb_assert (gdbarch != NULL);
  3665.   /* Skip verify of stap_register_prefixes, invalid_p == 0 */
  3666.   if (gdbarch_debug >= 2)
  3667.     fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_prefixes called\n");
  3668.   return gdbarch->stap_register_prefixes;
  3669. }

  3670. void
  3671. set_gdbarch_stap_register_prefixes (struct gdbarch *gdbarch,
  3672.                                     const char *const * stap_register_prefixes)
  3673. {
  3674.   gdbarch->stap_register_prefixes = stap_register_prefixes;
  3675. }

  3676. const char *const *
  3677. gdbarch_stap_register_suffixes (struct gdbarch *gdbarch)
  3678. {
  3679.   gdb_assert (gdbarch != NULL);
  3680.   /* Skip verify of stap_register_suffixes, invalid_p == 0 */
  3681.   if (gdbarch_debug >= 2)
  3682.     fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_suffixes called\n");
  3683.   return gdbarch->stap_register_suffixes;
  3684. }

  3685. void
  3686. set_gdbarch_stap_register_suffixes (struct gdbarch *gdbarch,
  3687.                                     const char *const * stap_register_suffixes)
  3688. {
  3689.   gdbarch->stap_register_suffixes = stap_register_suffixes;
  3690. }

  3691. const char *const *
  3692. gdbarch_stap_register_indirection_prefixes (struct gdbarch *gdbarch)
  3693. {
  3694.   gdb_assert (gdbarch != NULL);
  3695.   /* Skip verify of stap_register_indirection_prefixes, invalid_p == 0 */
  3696.   if (gdbarch_debug >= 2)
  3697.     fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_indirection_prefixes called\n");
  3698.   return gdbarch->stap_register_indirection_prefixes;
  3699. }

  3700. void
  3701. set_gdbarch_stap_register_indirection_prefixes (struct gdbarch *gdbarch,
  3702.                                                 const char *const * stap_register_indirection_prefixes)
  3703. {
  3704.   gdbarch->stap_register_indirection_prefixes = stap_register_indirection_prefixes;
  3705. }

  3706. const char *const *
  3707. gdbarch_stap_register_indirection_suffixes (struct gdbarch *gdbarch)
  3708. {
  3709.   gdb_assert (gdbarch != NULL);
  3710.   /* Skip verify of stap_register_indirection_suffixes, invalid_p == 0 */
  3711.   if (gdbarch_debug >= 2)
  3712.     fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_indirection_suffixes called\n");
  3713.   return gdbarch->stap_register_indirection_suffixes;
  3714. }

  3715. void
  3716. set_gdbarch_stap_register_indirection_suffixes (struct gdbarch *gdbarch,
  3717.                                                 const char *const * stap_register_indirection_suffixes)
  3718. {
  3719.   gdbarch->stap_register_indirection_suffixes = stap_register_indirection_suffixes;
  3720. }

  3721. const char *
  3722. gdbarch_stap_gdb_register_prefix (struct gdbarch *gdbarch)
  3723. {
  3724.   gdb_assert (gdbarch != NULL);
  3725.   /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */
  3726.   if (gdbarch_debug >= 2)
  3727.     fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_gdb_register_prefix called\n");
  3728.   return gdbarch->stap_gdb_register_prefix;
  3729. }

  3730. void
  3731. set_gdbarch_stap_gdb_register_prefix (struct gdbarch *gdbarch,
  3732.                                       const char * stap_gdb_register_prefix)
  3733. {
  3734.   gdbarch->stap_gdb_register_prefix = stap_gdb_register_prefix;
  3735. }

  3736. const char *
  3737. gdbarch_stap_gdb_register_suffix (struct gdbarch *gdbarch)
  3738. {
  3739.   gdb_assert (gdbarch != NULL);
  3740.   /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */
  3741.   if (gdbarch_debug >= 2)
  3742.     fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_gdb_register_suffix called\n");
  3743.   return gdbarch->stap_gdb_register_suffix;
  3744. }

  3745. void
  3746. set_gdbarch_stap_gdb_register_suffix (struct gdbarch *gdbarch,
  3747.                                       const char * stap_gdb_register_suffix)
  3748. {
  3749.   gdbarch->stap_gdb_register_suffix = stap_gdb_register_suffix;
  3750. }

  3751. int
  3752. gdbarch_stap_is_single_operand_p (struct gdbarch *gdbarch)
  3753. {
  3754.   gdb_assert (gdbarch != NULL);
  3755.   return gdbarch->stap_is_single_operand != NULL;
  3756. }

  3757. int
  3758. gdbarch_stap_is_single_operand (struct gdbarch *gdbarch, const char *s)
  3759. {
  3760.   gdb_assert (gdbarch != NULL);
  3761.   gdb_assert (gdbarch->stap_is_single_operand != NULL);
  3762.   if (gdbarch_debug >= 2)
  3763.     fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_is_single_operand called\n");
  3764.   return gdbarch->stap_is_single_operand (gdbarch, s);
  3765. }

  3766. void
  3767. set_gdbarch_stap_is_single_operand (struct gdbarch *gdbarch,
  3768.                                     gdbarch_stap_is_single_operand_ftype stap_is_single_operand)
  3769. {
  3770.   gdbarch->stap_is_single_operand = stap_is_single_operand;
  3771. }

  3772. int
  3773. gdbarch_stap_parse_special_token_p (struct gdbarch *gdbarch)
  3774. {
  3775.   gdb_assert (gdbarch != NULL);
  3776.   return gdbarch->stap_parse_special_token != NULL;
  3777. }

  3778. int
  3779. gdbarch_stap_parse_special_token (struct gdbarch *gdbarch, struct stap_parse_info *p)
  3780. {
  3781.   gdb_assert (gdbarch != NULL);
  3782.   gdb_assert (gdbarch->stap_parse_special_token != NULL);
  3783.   if (gdbarch_debug >= 2)
  3784.     fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_parse_special_token called\n");
  3785.   return gdbarch->stap_parse_special_token (gdbarch, p);
  3786. }

  3787. void
  3788. set_gdbarch_stap_parse_special_token (struct gdbarch *gdbarch,
  3789.                                       gdbarch_stap_parse_special_token_ftype stap_parse_special_token)
  3790. {
  3791.   gdbarch->stap_parse_special_token = stap_parse_special_token;
  3792. }

  3793. int
  3794. gdbarch_has_global_solist (struct gdbarch *gdbarch)
  3795. {
  3796.   gdb_assert (gdbarch != NULL);
  3797.   /* Skip verify of has_global_solist, invalid_p == 0 */
  3798.   if (gdbarch_debug >= 2)
  3799.     fprintf_unfiltered (gdb_stdlog, "gdbarch_has_global_solist called\n");
  3800.   return gdbarch->has_global_solist;
  3801. }

  3802. void
  3803. set_gdbarch_has_global_solist (struct gdbarch *gdbarch,
  3804.                                int has_global_solist)
  3805. {
  3806.   gdbarch->has_global_solist = has_global_solist;
  3807. }

  3808. int
  3809. gdbarch_has_global_breakpoints (struct gdbarch *gdbarch)
  3810. {
  3811.   gdb_assert (gdbarch != NULL);
  3812.   /* Skip verify of has_global_breakpoints, invalid_p == 0 */
  3813.   if (gdbarch_debug >= 2)
  3814.     fprintf_unfiltered (gdb_stdlog, "gdbarch_has_global_breakpoints called\n");
  3815.   return gdbarch->has_global_breakpoints;
  3816. }

  3817. void
  3818. set_gdbarch_has_global_breakpoints (struct gdbarch *gdbarch,
  3819.                                     int has_global_breakpoints)
  3820. {
  3821.   gdbarch->has_global_breakpoints = has_global_breakpoints;
  3822. }

  3823. int
  3824. gdbarch_has_shared_address_space (struct gdbarch *gdbarch)
  3825. {
  3826.   gdb_assert (gdbarch != NULL);
  3827.   gdb_assert (gdbarch->has_shared_address_space != NULL);
  3828.   if (gdbarch_debug >= 2)
  3829.     fprintf_unfiltered (gdb_stdlog, "gdbarch_has_shared_address_space called\n");
  3830.   return gdbarch->has_shared_address_space (gdbarch);
  3831. }

  3832. void
  3833. set_gdbarch_has_shared_address_space (struct gdbarch *gdbarch,
  3834.                                       gdbarch_has_shared_address_space_ftype has_shared_address_space)
  3835. {
  3836.   gdbarch->has_shared_address_space = has_shared_address_space;
  3837. }

  3838. int
  3839. gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch, CORE_ADDR addr, int *isize, char **msg)
  3840. {
  3841.   gdb_assert (gdbarch != NULL);
  3842.   gdb_assert (gdbarch->fast_tracepoint_valid_at != NULL);
  3843.   if (gdbarch_debug >= 2)
  3844.     fprintf_unfiltered (gdb_stdlog, "gdbarch_fast_tracepoint_valid_at called\n");
  3845.   return gdbarch->fast_tracepoint_valid_at (gdbarch, addr, isize, msg);
  3846. }

  3847. void
  3848. set_gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch,
  3849.                                       gdbarch_fast_tracepoint_valid_at_ftype fast_tracepoint_valid_at)
  3850. {
  3851.   gdbarch->fast_tracepoint_valid_at = fast_tracepoint_valid_at;
  3852. }

  3853. const char *
  3854. gdbarch_auto_charset (struct gdbarch *gdbarch)
  3855. {
  3856.   gdb_assert (gdbarch != NULL);
  3857.   gdb_assert (gdbarch->auto_charset != NULL);
  3858.   if (gdbarch_debug >= 2)
  3859.     fprintf_unfiltered (gdb_stdlog, "gdbarch_auto_charset called\n");
  3860.   return gdbarch->auto_charset ();
  3861. }

  3862. void
  3863. set_gdbarch_auto_charset (struct gdbarch *gdbarch,
  3864.                           gdbarch_auto_charset_ftype auto_charset)
  3865. {
  3866.   gdbarch->auto_charset = auto_charset;
  3867. }

  3868. const char *
  3869. gdbarch_auto_wide_charset (struct gdbarch *gdbarch)
  3870. {
  3871.   gdb_assert (gdbarch != NULL);
  3872.   gdb_assert (gdbarch->auto_wide_charset != NULL);
  3873.   if (gdbarch_debug >= 2)
  3874.     fprintf_unfiltered (gdb_stdlog, "gdbarch_auto_wide_charset called\n");
  3875.   return gdbarch->auto_wide_charset ();
  3876. }

  3877. void
  3878. set_gdbarch_auto_wide_charset (struct gdbarch *gdbarch,
  3879.                                gdbarch_auto_wide_charset_ftype auto_wide_charset)
  3880. {
  3881.   gdbarch->auto_wide_charset = auto_wide_charset;
  3882. }

  3883. const char *
  3884. gdbarch_solib_symbols_extension (struct gdbarch *gdbarch)
  3885. {
  3886.   gdb_assert (gdbarch != NULL);
  3887.   if (gdbarch_debug >= 2)
  3888.     fprintf_unfiltered (gdb_stdlog, "gdbarch_solib_symbols_extension called\n");
  3889.   return gdbarch->solib_symbols_extension;
  3890. }

  3891. void
  3892. set_gdbarch_solib_symbols_extension (struct gdbarch *gdbarch,
  3893.                                      const char * solib_symbols_extension)
  3894. {
  3895.   gdbarch->solib_symbols_extension = solib_symbols_extension;
  3896. }

  3897. int
  3898. gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch)
  3899. {
  3900.   gdb_assert (gdbarch != NULL);
  3901.   /* Skip verify of has_dos_based_file_system, invalid_p == 0 */
  3902.   if (gdbarch_debug >= 2)
  3903.     fprintf_unfiltered (gdb_stdlog, "gdbarch_has_dos_based_file_system called\n");
  3904.   return gdbarch->has_dos_based_file_system;
  3905. }

  3906. void
  3907. set_gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch,
  3908.                                        int has_dos_based_file_system)
  3909. {
  3910.   gdbarch->has_dos_based_file_system = has_dos_based_file_system;
  3911. }

  3912. void
  3913. gdbarch_gen_return_address (struct gdbarch *gdbarch, struct agent_expr *ax, struct axs_value *value, CORE_ADDR scope)
  3914. {
  3915.   gdb_assert (gdbarch != NULL);
  3916.   gdb_assert (gdbarch->gen_return_address != NULL);
  3917.   if (gdbarch_debug >= 2)
  3918.     fprintf_unfiltered (gdb_stdlog, "gdbarch_gen_return_address called\n");
  3919.   gdbarch->gen_return_address (gdbarch, ax, value, scope);
  3920. }

  3921. void
  3922. set_gdbarch_gen_return_address (struct gdbarch *gdbarch,
  3923.                                 gdbarch_gen_return_address_ftype gen_return_address)
  3924. {
  3925.   gdbarch->gen_return_address = gen_return_address;
  3926. }

  3927. int
  3928. gdbarch_info_proc_p (struct gdbarch *gdbarch)
  3929. {
  3930.   gdb_assert (gdbarch != NULL);
  3931.   return gdbarch->info_proc != NULL;
  3932. }

  3933. void
  3934. gdbarch_info_proc (struct gdbarch *gdbarch, const char *args, enum info_proc_what what)
  3935. {
  3936.   gdb_assert (gdbarch != NULL);
  3937.   gdb_assert (gdbarch->info_proc != NULL);
  3938.   if (gdbarch_debug >= 2)
  3939.     fprintf_unfiltered (gdb_stdlog, "gdbarch_info_proc called\n");
  3940.   gdbarch->info_proc (gdbarch, args, what);
  3941. }

  3942. void
  3943. set_gdbarch_info_proc (struct gdbarch *gdbarch,
  3944.                        gdbarch_info_proc_ftype info_proc)
  3945. {
  3946.   gdbarch->info_proc = info_proc;
  3947. }

  3948. int
  3949. gdbarch_core_info_proc_p (struct gdbarch *gdbarch)
  3950. {
  3951.   gdb_assert (gdbarch != NULL);
  3952.   return gdbarch->core_info_proc != NULL;
  3953. }

  3954. void
  3955. gdbarch_core_info_proc (struct gdbarch *gdbarch, const char *args, enum info_proc_what what)
  3956. {
  3957.   gdb_assert (gdbarch != NULL);
  3958.   gdb_assert (gdbarch->core_info_proc != NULL);
  3959.   if (gdbarch_debug >= 2)
  3960.     fprintf_unfiltered (gdb_stdlog, "gdbarch_core_info_proc called\n");
  3961.   gdbarch->core_info_proc (gdbarch, args, what);
  3962. }

  3963. void
  3964. set_gdbarch_core_info_proc (struct gdbarch *gdbarch,
  3965.                             gdbarch_core_info_proc_ftype core_info_proc)
  3966. {
  3967.   gdbarch->core_info_proc = core_info_proc;
  3968. }

  3969. void
  3970. 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)
  3971. {
  3972.   gdb_assert (gdbarch != NULL);
  3973.   gdb_assert (gdbarch->iterate_over_objfiles_in_search_order != NULL);
  3974.   if (gdbarch_debug >= 2)
  3975.     fprintf_unfiltered (gdb_stdlog, "gdbarch_iterate_over_objfiles_in_search_order called\n");
  3976.   gdbarch->iterate_over_objfiles_in_search_order (gdbarch, cb, cb_data, current_objfile);
  3977. }

  3978. void
  3979. set_gdbarch_iterate_over_objfiles_in_search_order (struct gdbarch *gdbarch,
  3980.                                                    gdbarch_iterate_over_objfiles_in_search_order_ftype iterate_over_objfiles_in_search_order)
  3981. {
  3982.   gdbarch->iterate_over_objfiles_in_search_order = iterate_over_objfiles_in_search_order;
  3983. }

  3984. struct ravenscar_arch_ops *
  3985. gdbarch_ravenscar_ops (struct gdbarch *gdbarch)
  3986. {
  3987.   gdb_assert (gdbarch != NULL);
  3988.   /* Skip verify of ravenscar_ops, invalid_p == 0 */
  3989.   if (gdbarch_debug >= 2)
  3990.     fprintf_unfiltered (gdb_stdlog, "gdbarch_ravenscar_ops called\n");
  3991.   return gdbarch->ravenscar_ops;
  3992. }

  3993. void
  3994. set_gdbarch_ravenscar_ops (struct gdbarch *gdbarch,
  3995.                            struct ravenscar_arch_ops * ravenscar_ops)
  3996. {
  3997.   gdbarch->ravenscar_ops = ravenscar_ops;
  3998. }

  3999. int
  4000. gdbarch_insn_is_call (struct gdbarch *gdbarch, CORE_ADDR addr)
  4001. {
  4002.   gdb_assert (gdbarch != NULL);
  4003.   gdb_assert (gdbarch->insn_is_call != NULL);
  4004.   if (gdbarch_debug >= 2)
  4005.     fprintf_unfiltered (gdb_stdlog, "gdbarch_insn_is_call called\n");
  4006.   return gdbarch->insn_is_call (gdbarch, addr);
  4007. }

  4008. void
  4009. set_gdbarch_insn_is_call (struct gdbarch *gdbarch,
  4010.                           gdbarch_insn_is_call_ftype insn_is_call)
  4011. {
  4012.   gdbarch->insn_is_call = insn_is_call;
  4013. }

  4014. int
  4015. gdbarch_insn_is_ret (struct gdbarch *gdbarch, CORE_ADDR addr)
  4016. {
  4017.   gdb_assert (gdbarch != NULL);
  4018.   gdb_assert (gdbarch->insn_is_ret != NULL);
  4019.   if (gdbarch_debug >= 2)
  4020.     fprintf_unfiltered (gdb_stdlog, "gdbarch_insn_is_ret called\n");
  4021.   return gdbarch->insn_is_ret (gdbarch, addr);
  4022. }

  4023. void
  4024. set_gdbarch_insn_is_ret (struct gdbarch *gdbarch,
  4025.                          gdbarch_insn_is_ret_ftype insn_is_ret)
  4026. {
  4027.   gdbarch->insn_is_ret = insn_is_ret;
  4028. }

  4029. int
  4030. gdbarch_insn_is_jump (struct gdbarch *gdbarch, CORE_ADDR addr)
  4031. {
  4032.   gdb_assert (gdbarch != NULL);
  4033.   gdb_assert (gdbarch->insn_is_jump != NULL);
  4034.   if (gdbarch_debug >= 2)
  4035.     fprintf_unfiltered (gdb_stdlog, "gdbarch_insn_is_jump called\n");
  4036.   return gdbarch->insn_is_jump (gdbarch, addr);
  4037. }

  4038. void
  4039. set_gdbarch_insn_is_jump (struct gdbarch *gdbarch,
  4040.                           gdbarch_insn_is_jump_ftype insn_is_jump)
  4041. {
  4042.   gdbarch->insn_is_jump = insn_is_jump;
  4043. }

  4044. int
  4045. gdbarch_auxv_parse_p (struct gdbarch *gdbarch)
  4046. {
  4047.   gdb_assert (gdbarch != NULL);
  4048.   return gdbarch->auxv_parse != NULL;
  4049. }

  4050. int
  4051. gdbarch_auxv_parse (struct gdbarch *gdbarch, gdb_byte **readptr, gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp)
  4052. {
  4053.   gdb_assert (gdbarch != NULL);
  4054.   gdb_assert (gdbarch->auxv_parse != NULL);
  4055.   if (gdbarch_debug >= 2)
  4056.     fprintf_unfiltered (gdb_stdlog, "gdbarch_auxv_parse called\n");
  4057.   return gdbarch->auxv_parse (gdbarch, readptr, endptr, typep, valp);
  4058. }

  4059. void
  4060. set_gdbarch_auxv_parse (struct gdbarch *gdbarch,
  4061.                         gdbarch_auxv_parse_ftype auxv_parse)
  4062. {
  4063.   gdbarch->auxv_parse = auxv_parse;
  4064. }

  4065. int
  4066. gdbarch_vsyscall_range (struct gdbarch *gdbarch, struct mem_range *range)
  4067. {
  4068.   gdb_assert (gdbarch != NULL);
  4069.   gdb_assert (gdbarch->vsyscall_range != NULL);
  4070.   if (gdbarch_debug >= 2)
  4071.     fprintf_unfiltered (gdb_stdlog, "gdbarch_vsyscall_range called\n");
  4072.   return gdbarch->vsyscall_range (gdbarch, range);
  4073. }

  4074. void
  4075. set_gdbarch_vsyscall_range (struct gdbarch *gdbarch,
  4076.                             gdbarch_vsyscall_range_ftype vsyscall_range)
  4077. {
  4078.   gdbarch->vsyscall_range = vsyscall_range;
  4079. }

  4080. CORE_ADDR
  4081. gdbarch_infcall_mmap (struct gdbarch *gdbarch, CORE_ADDR size, unsigned prot)
  4082. {
  4083.   gdb_assert (gdbarch != NULL);
  4084.   gdb_assert (gdbarch->infcall_mmap != NULL);
  4085.   if (gdbarch_debug >= 2)
  4086.     fprintf_unfiltered (gdb_stdlog, "gdbarch_infcall_mmap called\n");
  4087.   return gdbarch->infcall_mmap (size, prot);
  4088. }

  4089. void
  4090. set_gdbarch_infcall_mmap (struct gdbarch *gdbarch,
  4091.                           gdbarch_infcall_mmap_ftype infcall_mmap)
  4092. {
  4093.   gdbarch->infcall_mmap = infcall_mmap;
  4094. }

  4095. char *
  4096. gdbarch_gcc_target_options (struct gdbarch *gdbarch)
  4097. {
  4098.   gdb_assert (gdbarch != NULL);
  4099.   gdb_assert (gdbarch->gcc_target_options != NULL);
  4100.   if (gdbarch_debug >= 2)
  4101.     fprintf_unfiltered (gdb_stdlog, "gdbarch_gcc_target_options called\n");
  4102.   return gdbarch->gcc_target_options (gdbarch);
  4103. }

  4104. void
  4105. set_gdbarch_gcc_target_options (struct gdbarch *gdbarch,
  4106.                                 gdbarch_gcc_target_options_ftype gcc_target_options)
  4107. {
  4108.   gdbarch->gcc_target_options = gcc_target_options;
  4109. }

  4110. const char *
  4111. gdbarch_gnu_triplet_regexp (struct gdbarch *gdbarch)
  4112. {
  4113.   gdb_assert (gdbarch != NULL);
  4114.   gdb_assert (gdbarch->gnu_triplet_regexp != NULL);
  4115.   if (gdbarch_debug >= 2)
  4116.     fprintf_unfiltered (gdb_stdlog, "gdbarch_gnu_triplet_regexp called\n");
  4117.   return gdbarch->gnu_triplet_regexp (gdbarch);
  4118. }

  4119. void
  4120. set_gdbarch_gnu_triplet_regexp (struct gdbarch *gdbarch,
  4121.                                 gdbarch_gnu_triplet_regexp_ftype gnu_triplet_regexp)
  4122. {
  4123.   gdbarch->gnu_triplet_regexp = gnu_triplet_regexp;
  4124. }


  4125. /* Keep a registry of per-architecture data-pointers required by GDB
  4126.    modules.  */

  4127. struct gdbarch_data
  4128. {
  4129.   unsigned index;
  4130.   int init_p;
  4131.   gdbarch_data_pre_init_ftype *pre_init;
  4132.   gdbarch_data_post_init_ftype *post_init;
  4133. };

  4134. struct gdbarch_data_registration
  4135. {
  4136.   struct gdbarch_data *data;
  4137.   struct gdbarch_data_registration *next;
  4138. };

  4139. struct gdbarch_data_registry
  4140. {
  4141.   unsigned nr;
  4142.   struct gdbarch_data_registration *registrations;
  4143. };

  4144. struct gdbarch_data_registry gdbarch_data_registry =
  4145. {
  4146.   0, NULL,
  4147. };

  4148. static struct gdbarch_data *
  4149. gdbarch_data_register (gdbarch_data_pre_init_ftype *pre_init,
  4150.                        gdbarch_data_post_init_ftype *post_init)
  4151. {
  4152.   struct gdbarch_data_registration **curr;

  4153.   /* Append the new registration.  */
  4154.   for (curr = &gdbarch_data_registry.registrations;
  4155.        (*curr) != NULL;
  4156.        curr = &(*curr)->next);
  4157.   (*curr) = XNEW (struct gdbarch_data_registration);
  4158.   (*curr)->next = NULL;
  4159.   (*curr)->data = XNEW (struct gdbarch_data);
  4160.   (*curr)->data->index = gdbarch_data_registry.nr++;
  4161.   (*curr)->data->pre_init = pre_init;
  4162.   (*curr)->data->post_init = post_init;
  4163.   (*curr)->data->init_p = 1;
  4164.   return (*curr)->data;
  4165. }

  4166. struct gdbarch_data *
  4167. gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype *pre_init)
  4168. {
  4169.   return gdbarch_data_register (pre_init, NULL);
  4170. }

  4171. struct gdbarch_data *
  4172. gdbarch_data_register_post_init (gdbarch_data_post_init_ftype *post_init)
  4173. {
  4174.   return gdbarch_data_register (NULL, post_init);
  4175. }

  4176. /* Create/delete the gdbarch data vector.  */

  4177. static void
  4178. alloc_gdbarch_data (struct gdbarch *gdbarch)
  4179. {
  4180.   gdb_assert (gdbarch->data == NULL);
  4181.   gdbarch->nr_data = gdbarch_data_registry.nr;
  4182.   gdbarch->data = GDBARCH_OBSTACK_CALLOC (gdbarch, gdbarch->nr_data, void *);
  4183. }

  4184. /* Initialize the current value of the specified per-architecture
  4185.    data-pointer.  */

  4186. void
  4187. deprecated_set_gdbarch_data (struct gdbarch *gdbarch,
  4188.                              struct gdbarch_data *data,
  4189.                              void *pointer)
  4190. {
  4191.   gdb_assert (data->index < gdbarch->nr_data);
  4192.   gdb_assert (gdbarch->data[data->index] == NULL);
  4193.   gdb_assert (data->pre_init == NULL);
  4194.   gdbarch->data[data->index] = pointer;
  4195. }

  4196. /* Return the current value of the specified per-architecture
  4197.    data-pointer.  */

  4198. void *
  4199. gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
  4200. {
  4201.   gdb_assert (data->index < gdbarch->nr_data);
  4202.   if (gdbarch->data[data->index] == NULL)
  4203.     {
  4204.       /* The data-pointer isn't initialized, call init() to get a
  4205.          value.  */
  4206.       if (data->pre_init != NULL)
  4207.         /* Mid architecture creation: pass just the obstack, and not
  4208.            the entire architecture, as that way it isn't possible for
  4209.            pre-init code to refer to undefined architecture
  4210.            fields.  */
  4211.         gdbarch->data[data->index] = data->pre_init (gdbarch->obstack);
  4212.       else if (gdbarch->initialized_p
  4213.                && data->post_init != NULL)
  4214.         /* Post architecture creation: pass the entire architecture
  4215.            (as all fields are valid), but be careful to also detect
  4216.            recursive references.  */
  4217.         {
  4218.           gdb_assert (data->init_p);
  4219.           data->init_p = 0;
  4220.           gdbarch->data[data->index] = data->post_init (gdbarch);
  4221.           data->init_p = 1;
  4222.         }
  4223.       else
  4224.         /* The architecture initialization hasn't completed - punt -
  4225.          hope that the caller knows what they are doing.  Once
  4226.          deprecated_set_gdbarch_data has been initialized, this can be
  4227.          changed to an internal error.  */
  4228.         return NULL;
  4229.       gdb_assert (gdbarch->data[data->index] != NULL);
  4230.     }
  4231.   return gdbarch->data[data->index];
  4232. }


  4233. /* Keep a registry of the architectures known by GDB.  */

  4234. struct gdbarch_registration
  4235. {
  4236.   enum bfd_architecture bfd_architecture;
  4237.   gdbarch_init_ftype *init;
  4238.   gdbarch_dump_tdep_ftype *dump_tdep;
  4239.   struct gdbarch_list *arches;
  4240.   struct gdbarch_registration *next;
  4241. };

  4242. static struct gdbarch_registration *gdbarch_registry = NULL;

  4243. static void
  4244. append_name (const char ***buf, int *nr, const char *name)
  4245. {
  4246.   *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
  4247.   (*buf)[*nr] = name;
  4248.   *nr += 1;
  4249. }

  4250. const char **
  4251. gdbarch_printable_names (void)
  4252. {
  4253.   /* Accumulate a list of names based on the registed list of
  4254.      architectures.  */
  4255.   int nr_arches = 0;
  4256.   const char **arches = NULL;
  4257.   struct gdbarch_registration *rego;

  4258.   for (rego = gdbarch_registry;
  4259.        rego != NULL;
  4260.        rego = rego->next)
  4261.     {
  4262.       const struct bfd_arch_info *ap;
  4263.       ap = bfd_lookup_arch (rego->bfd_architecture, 0);
  4264.       if (ap == NULL)
  4265.         internal_error (__FILE__, __LINE__,
  4266.                         _("gdbarch_architecture_names: multi-arch unknown"));
  4267.       do
  4268.         {
  4269.           append_name (&arches, &nr_arches, ap->printable_name);
  4270.           ap = ap->next;
  4271.         }
  4272.       while (ap != NULL);
  4273.     }
  4274.   append_name (&arches, &nr_arches, NULL);
  4275.   return arches;
  4276. }


  4277. void
  4278. gdbarch_register (enum bfd_architecture bfd_architecture,
  4279.                   gdbarch_init_ftype *init,
  4280.                   gdbarch_dump_tdep_ftype *dump_tdep)
  4281. {
  4282.   struct gdbarch_registration **curr;
  4283.   const struct bfd_arch_info *bfd_arch_info;

  4284.   /* Check that BFD recognizes this architecture */
  4285.   bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
  4286.   if (bfd_arch_info == NULL)
  4287.     {
  4288.       internal_error (__FILE__, __LINE__,
  4289.                       _("gdbarch: Attempt to register "
  4290.                         "unknown architecture (%d)"),
  4291.                       bfd_architecture);
  4292.     }
  4293.   /* Check that we haven't seen this architecture before.  */
  4294.   for (curr = &gdbarch_registry;
  4295.        (*curr) != NULL;
  4296.        curr = &(*curr)->next)
  4297.     {
  4298.       if (bfd_architecture == (*curr)->bfd_architecture)
  4299.         internal_error (__FILE__, __LINE__,
  4300.                         _("gdbarch: Duplicate registration "
  4301.                           "of architecture (%s)"),
  4302.                         bfd_arch_info->printable_name);
  4303.     }
  4304.   /* log it */
  4305.   if (gdbarch_debug)
  4306.     fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, %s)\n",
  4307.                         bfd_arch_info->printable_name,
  4308.                         host_address_to_string (init));
  4309.   /* Append it */
  4310.   (*curr) = XNEW (struct gdbarch_registration);
  4311.   (*curr)->bfd_architecture = bfd_architecture;
  4312.   (*curr)->init = init;
  4313.   (*curr)->dump_tdep = dump_tdep;
  4314.   (*curr)->arches = NULL;
  4315.   (*curr)->next = NULL;
  4316. }

  4317. void
  4318. register_gdbarch_init (enum bfd_architecture bfd_architecture,
  4319.                        gdbarch_init_ftype *init)
  4320. {
  4321.   gdbarch_register (bfd_architecture, init, NULL);
  4322. }


  4323. /* Look for an architecture using gdbarch_info.  */

  4324. struct gdbarch_list *
  4325. gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
  4326.                              const struct gdbarch_info *info)
  4327. {
  4328.   for (; arches != NULL; arches = arches->next)
  4329.     {
  4330.       if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
  4331.         continue;
  4332.       if (info->byte_order != arches->gdbarch->byte_order)
  4333.         continue;
  4334.       if (info->osabi != arches->gdbarch->osabi)
  4335.         continue;
  4336.       if (info->target_desc != arches->gdbarch->target_desc)
  4337.         continue;
  4338.       return arches;
  4339.     }
  4340.   return NULL;
  4341. }


  4342. /* Find an architecture that matches the specified INFO.  Create a new
  4343.    architecture if needed.  Return that new architecture.  */

  4344. struct gdbarch *
  4345. gdbarch_find_by_info (struct gdbarch_info info)
  4346. {
  4347.   struct gdbarch *new_gdbarch;
  4348.   struct gdbarch_registration *rego;

  4349.   /* Fill in missing parts of the INFO struct using a number of
  4350.      sources: "set ..."; INFOabfd supplied; and the global
  4351.      defaults.  */
  4352.   gdbarch_info_fill (&info);

  4353.   /* Must have found some sort of architecture.  */
  4354.   gdb_assert (info.bfd_arch_info != NULL);

  4355.   if (gdbarch_debug)
  4356.     {
  4357.       fprintf_unfiltered (gdb_stdlog,
  4358.                           "gdbarch_find_by_info: info.bfd_arch_info %s\n",
  4359.                           (info.bfd_arch_info != NULL
  4360.                            ? info.bfd_arch_info->printable_name
  4361.                            : "(null)"));
  4362.       fprintf_unfiltered (gdb_stdlog,
  4363.                           "gdbarch_find_by_info: info.byte_order %d (%s)\n",
  4364.                           info.byte_order,
  4365.                           (info.byte_order == BFD_ENDIAN_BIG ? "big"
  4366.                            : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
  4367.                            : "default"));
  4368.       fprintf_unfiltered (gdb_stdlog,
  4369.                           "gdbarch_find_by_info: info.osabi %d (%s)\n",
  4370.                           info.osabi, gdbarch_osabi_name (info.osabi));
  4371.       fprintf_unfiltered (gdb_stdlog,
  4372.                           "gdbarch_find_by_info: info.abfd %s\n",
  4373.                           host_address_to_string (info.abfd));
  4374.       fprintf_unfiltered (gdb_stdlog,
  4375.                           "gdbarch_find_by_info: info.tdep_info %s\n",
  4376.                           host_address_to_string (info.tdep_info));
  4377.     }

  4378.   /* Find the tdep code that knows about this architecture.  */
  4379.   for (rego = gdbarch_registry;
  4380.        rego != NULL;
  4381.        rego = rego->next)
  4382.     if (rego->bfd_architecture == info.bfd_arch_info->arch)
  4383.       break;
  4384.   if (rego == NULL)
  4385.     {
  4386.       if (gdbarch_debug)
  4387.         fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
  4388.                             "No matching architecture\n");
  4389.       return 0;
  4390.     }

  4391.   /* Ask the tdep code for an architecture that matches "info".  */
  4392.   new_gdbarch = rego->init (info, rego->arches);

  4393.   /* Did the tdep code like it?  No.  Reject the change and revert to
  4394.      the old architecture.  */
  4395.   if (new_gdbarch == NULL)
  4396.     {
  4397.       if (gdbarch_debug)
  4398.         fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
  4399.                             "Target rejected architecture\n");
  4400.       return NULL;
  4401.     }

  4402.   /* Is this a pre-existing architecture (as determined by already
  4403.      being initialized)?  Move it to the front of the architecture
  4404.      list (keeping the list sorted Most Recently Used).  */
  4405.   if (new_gdbarch->initialized_p)
  4406.     {
  4407.       struct gdbarch_list **list;
  4408.       struct gdbarch_list *this;
  4409.       if (gdbarch_debug)
  4410.         fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
  4411.                             "Previous architecture %s (%s) selected\n",
  4412.                             host_address_to_string (new_gdbarch),
  4413.                             new_gdbarch->bfd_arch_info->printable_name);
  4414.       /* Find the existing arch in the list.  */
  4415.       for (list = &rego->arches;
  4416.            (*list) != NULL && (*list)->gdbarch != new_gdbarch;
  4417.            list = &(*list)->next);
  4418.       /* It had better be in the list of architectures.  */
  4419.       gdb_assert ((*list) != NULL && (*list)->gdbarch == new_gdbarch);
  4420.       /* Unlink THIS.  */
  4421.       this = (*list);
  4422.       (*list) = this->next;
  4423.       /* Insert THIS at the front.  */
  4424.       this->next = rego->arches;
  4425.       rego->arches = this;
  4426.       /* Return it.  */
  4427.       return new_gdbarch;
  4428.     }

  4429.   /* It's a new architecture.  */
  4430.   if (gdbarch_debug)
  4431.     fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
  4432.                         "New architecture %s (%s) selected\n",
  4433.                         host_address_to_string (new_gdbarch),
  4434.                         new_gdbarch->bfd_arch_info->printable_name);

  4435.   /* Insert the new architecture into the front of the architecture
  4436.      list (keep the list sorted Most Recently Used).  */
  4437.   {
  4438.     struct gdbarch_list *this = XNEW (struct gdbarch_list);
  4439.     this->next = rego->arches;
  4440.     this->gdbarch = new_gdbarch;
  4441.     rego->arches = this;
  4442.   }

  4443.   /* Check that the newly installed architecture is valid.  Plug in
  4444.      any post init values.  */
  4445.   new_gdbarch->dump_tdep = rego->dump_tdep;
  4446.   verify_gdbarch (new_gdbarch);
  4447.   new_gdbarch->initialized_p = 1;

  4448.   if (gdbarch_debug)
  4449.     gdbarch_dump (new_gdbarch, gdb_stdlog);

  4450.   return new_gdbarch;
  4451. }

  4452. /* Make the specified architecture current.  */

  4453. void
  4454. set_target_gdbarch (struct gdbarch *new_gdbarch)
  4455. {
  4456.   gdb_assert (new_gdbarch != NULL);
  4457.   gdb_assert (new_gdbarch->initialized_p);
  4458.   current_inferior ()->gdbarch = new_gdbarch;
  4459.   observer_notify_architecture_changed (new_gdbarch);
  4460.   registers_changed ();
  4461. }

  4462. /* Return the current inferior's arch.  */

  4463. struct gdbarch *
  4464. target_gdbarch (void)
  4465. {
  4466.   return current_inferior ()->gdbarch;
  4467. }

  4468. extern void _initialize_gdbarch (void);

  4469. void
  4470. _initialize_gdbarch (void)
  4471. {
  4472.   add_setshow_zuinteger_cmd ("arch", class_maintenance, &gdbarch_debug, _("\
  4473. Set architecture debugging."), _("\
  4474. Show architecture debugging."), _("\
  4475. When non-zero, architecture debugging is enabled."),
  4476.                             NULL,
  4477.                             show_gdbarch_debug,
  4478.                             &setdebuglist, &showdebuglist);
  4479. }