xref: /dflybsd-src/contrib/gdb-7/gdb/gdbarch.c (revision cf7f2e2d389e8012d562650bd94d7e433f449d6e)
15796c8dcSSimon Schubert /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
25796c8dcSSimon Schubert 
35796c8dcSSimon Schubert /* Dynamic architecture support for GDB, the GNU debugger.
45796c8dcSSimon Schubert 
5*cf7f2e2dSJohn Marino    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
6*cf7f2e2dSJohn Marino    2007, 2008, 2009 Free Software Foundation, Inc.
75796c8dcSSimon Schubert 
85796c8dcSSimon Schubert    This file is part of GDB.
95796c8dcSSimon Schubert 
105796c8dcSSimon Schubert    This program is free software; you can redistribute it and/or modify
115796c8dcSSimon Schubert    it under the terms of the GNU General Public License as published by
125796c8dcSSimon Schubert    the Free Software Foundation; either version 3 of the License, or
135796c8dcSSimon Schubert    (at your option) any later version.
145796c8dcSSimon Schubert 
155796c8dcSSimon Schubert    This program is distributed in the hope that it will be useful,
165796c8dcSSimon Schubert    but WITHOUT ANY WARRANTY; without even the implied warranty of
175796c8dcSSimon Schubert    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
185796c8dcSSimon Schubert    GNU General Public License for more details.
195796c8dcSSimon Schubert 
205796c8dcSSimon Schubert    You should have received a copy of the GNU General Public License
215796c8dcSSimon Schubert    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
225796c8dcSSimon Schubert 
235796c8dcSSimon Schubert /* This file was created with the aid of ``gdbarch.sh''.
245796c8dcSSimon Schubert 
255796c8dcSSimon Schubert    The Bourne shell script ``gdbarch.sh'' creates the files
265796c8dcSSimon Schubert    ``new-gdbarch.c'' and ``new-gdbarch.h and then compares them
275796c8dcSSimon Schubert    against the existing ``gdbarch.[hc]''.  Any differences found
285796c8dcSSimon Schubert    being reported.
295796c8dcSSimon Schubert 
305796c8dcSSimon Schubert    If editing this file, please also run gdbarch.sh and merge any
315796c8dcSSimon Schubert    changes into that script. Conversely, when making sweeping changes
325796c8dcSSimon Schubert    to this file, modifying gdbarch.sh and using its output may prove
335796c8dcSSimon Schubert    easier. */
345796c8dcSSimon Schubert 
355796c8dcSSimon Schubert 
365796c8dcSSimon Schubert #include "defs.h"
375796c8dcSSimon Schubert #include "arch-utils.h"
385796c8dcSSimon Schubert 
395796c8dcSSimon Schubert #include "gdbcmd.h"
405796c8dcSSimon Schubert #include "inferior.h"
415796c8dcSSimon Schubert #include "symcat.h"
425796c8dcSSimon Schubert 
435796c8dcSSimon Schubert #include "floatformat.h"
445796c8dcSSimon Schubert 
455796c8dcSSimon Schubert #include "gdb_assert.h"
465796c8dcSSimon Schubert #include "gdb_string.h"
475796c8dcSSimon Schubert #include "reggroups.h"
485796c8dcSSimon Schubert #include "osabi.h"
495796c8dcSSimon Schubert #include "gdb_obstack.h"
505796c8dcSSimon Schubert #include "observer.h"
515796c8dcSSimon Schubert #include "regcache.h"
525796c8dcSSimon Schubert 
535796c8dcSSimon Schubert /* Static function declarations */
545796c8dcSSimon Schubert 
555796c8dcSSimon Schubert static void alloc_gdbarch_data (struct gdbarch *);
565796c8dcSSimon Schubert 
575796c8dcSSimon Schubert /* Non-zero if we want to trace architecture code.  */
585796c8dcSSimon Schubert 
595796c8dcSSimon Schubert #ifndef GDBARCH_DEBUG
605796c8dcSSimon Schubert #define GDBARCH_DEBUG 0
615796c8dcSSimon Schubert #endif
625796c8dcSSimon Schubert int gdbarch_debug = GDBARCH_DEBUG;
635796c8dcSSimon Schubert static void
645796c8dcSSimon Schubert show_gdbarch_debug (struct ui_file *file, int from_tty,
655796c8dcSSimon Schubert                     struct cmd_list_element *c, const char *value)
665796c8dcSSimon Schubert {
675796c8dcSSimon Schubert   fprintf_filtered (file, _("Architecture debugging is %s.\n"), value);
685796c8dcSSimon Schubert }
695796c8dcSSimon Schubert 
705796c8dcSSimon Schubert static const char *
715796c8dcSSimon Schubert pformat (const struct floatformat **format)
725796c8dcSSimon Schubert {
735796c8dcSSimon Schubert   if (format == NULL)
745796c8dcSSimon Schubert     return "(null)";
755796c8dcSSimon Schubert   else
765796c8dcSSimon Schubert     /* Just print out one of them - this is only for diagnostics.  */
775796c8dcSSimon Schubert     return format[0]->name;
785796c8dcSSimon Schubert }
795796c8dcSSimon Schubert 
80*cf7f2e2dSJohn Marino static const char *
81*cf7f2e2dSJohn Marino pstring (const char *string)
82*cf7f2e2dSJohn Marino {
83*cf7f2e2dSJohn Marino   if (string == NULL)
84*cf7f2e2dSJohn Marino     return "(null)";
85*cf7f2e2dSJohn Marino   return string;
86*cf7f2e2dSJohn Marino }
87*cf7f2e2dSJohn Marino 
885796c8dcSSimon Schubert 
895796c8dcSSimon Schubert /* Maintain the struct gdbarch object */
905796c8dcSSimon Schubert 
915796c8dcSSimon Schubert struct gdbarch
925796c8dcSSimon Schubert {
935796c8dcSSimon Schubert   /* Has this architecture been fully initialized?  */
945796c8dcSSimon Schubert   int initialized_p;
955796c8dcSSimon Schubert 
965796c8dcSSimon Schubert   /* An obstack bound to the lifetime of the architecture.  */
975796c8dcSSimon Schubert   struct obstack *obstack;
985796c8dcSSimon Schubert 
995796c8dcSSimon Schubert   /* basic architectural information */
1005796c8dcSSimon Schubert   const struct bfd_arch_info * bfd_arch_info;
1015796c8dcSSimon Schubert   int byte_order;
1025796c8dcSSimon Schubert   int byte_order_for_code;
1035796c8dcSSimon Schubert   enum gdb_osabi osabi;
1045796c8dcSSimon Schubert   const struct target_desc * target_desc;
1055796c8dcSSimon Schubert 
1065796c8dcSSimon Schubert   /* target specific vector. */
1075796c8dcSSimon Schubert   struct gdbarch_tdep *tdep;
1085796c8dcSSimon Schubert   gdbarch_dump_tdep_ftype *dump_tdep;
1095796c8dcSSimon Schubert 
1105796c8dcSSimon Schubert   /* per-architecture data-pointers */
1115796c8dcSSimon Schubert   unsigned nr_data;
1125796c8dcSSimon Schubert   void **data;
1135796c8dcSSimon Schubert 
1145796c8dcSSimon Schubert   /* per-architecture swap-regions */
1155796c8dcSSimon Schubert   struct gdbarch_swap *swap;
1165796c8dcSSimon Schubert 
1175796c8dcSSimon Schubert   /* Multi-arch values.
1185796c8dcSSimon Schubert 
1195796c8dcSSimon Schubert      When extending this structure you must:
1205796c8dcSSimon Schubert 
1215796c8dcSSimon Schubert      Add the field below.
1225796c8dcSSimon Schubert 
1235796c8dcSSimon Schubert      Declare set/get functions and define the corresponding
1245796c8dcSSimon Schubert      macro in gdbarch.h.
1255796c8dcSSimon Schubert 
1265796c8dcSSimon Schubert      gdbarch_alloc(): If zero/NULL is not a suitable default,
1275796c8dcSSimon Schubert      initialize the new field.
1285796c8dcSSimon Schubert 
1295796c8dcSSimon Schubert      verify_gdbarch(): Confirm that the target updated the field
1305796c8dcSSimon Schubert      correctly.
1315796c8dcSSimon Schubert 
1325796c8dcSSimon Schubert      gdbarch_dump(): Add a fprintf_unfiltered call so that the new
1335796c8dcSSimon Schubert      field is dumped out
1345796c8dcSSimon Schubert 
1355796c8dcSSimon Schubert      ``startup_gdbarch()'': Append an initial value to the static
1365796c8dcSSimon Schubert      variable (base values on the host's c-type system).
1375796c8dcSSimon Schubert 
1385796c8dcSSimon Schubert      get_gdbarch(): Implement the set/get functions (probably using
1395796c8dcSSimon Schubert      the macro's as shortcuts).
1405796c8dcSSimon Schubert 
1415796c8dcSSimon Schubert      */
1425796c8dcSSimon Schubert 
1435796c8dcSSimon Schubert   int bits_big_endian;
1445796c8dcSSimon Schubert   int short_bit;
1455796c8dcSSimon Schubert   int int_bit;
1465796c8dcSSimon Schubert   int long_bit;
1475796c8dcSSimon Schubert   int long_long_bit;
148*cf7f2e2dSJohn Marino   int half_bit;
149*cf7f2e2dSJohn Marino   const struct floatformat ** half_format;
1505796c8dcSSimon Schubert   int float_bit;
1515796c8dcSSimon Schubert   const struct floatformat ** float_format;
1525796c8dcSSimon Schubert   int double_bit;
1535796c8dcSSimon Schubert   const struct floatformat ** double_format;
1545796c8dcSSimon Schubert   int long_double_bit;
1555796c8dcSSimon Schubert   const struct floatformat ** long_double_format;
1565796c8dcSSimon Schubert   int ptr_bit;
1575796c8dcSSimon Schubert   int addr_bit;
1585796c8dcSSimon Schubert   int char_signed;
1595796c8dcSSimon Schubert   gdbarch_read_pc_ftype *read_pc;
1605796c8dcSSimon Schubert   gdbarch_write_pc_ftype *write_pc;
1615796c8dcSSimon Schubert   gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer;
1625796c8dcSSimon Schubert   gdbarch_pseudo_register_read_ftype *pseudo_register_read;
1635796c8dcSSimon Schubert   gdbarch_pseudo_register_write_ftype *pseudo_register_write;
1645796c8dcSSimon Schubert   int num_regs;
1655796c8dcSSimon Schubert   int num_pseudo_regs;
1665796c8dcSSimon Schubert   int sp_regnum;
1675796c8dcSSimon Schubert   int pc_regnum;
1685796c8dcSSimon Schubert   int ps_regnum;
1695796c8dcSSimon Schubert   int fp0_regnum;
1705796c8dcSSimon Schubert   gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum;
1715796c8dcSSimon Schubert   gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum;
1725796c8dcSSimon Schubert   gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum;
1735796c8dcSSimon Schubert   gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum;
1745796c8dcSSimon Schubert   gdbarch_register_name_ftype *register_name;
1755796c8dcSSimon Schubert   gdbarch_register_type_ftype *register_type;
1765796c8dcSSimon Schubert   gdbarch_dummy_id_ftype *dummy_id;
1775796c8dcSSimon Schubert   int deprecated_fp_regnum;
1785796c8dcSSimon Schubert   gdbarch_push_dummy_call_ftype *push_dummy_call;
1795796c8dcSSimon Schubert   int call_dummy_location;
1805796c8dcSSimon Schubert   gdbarch_push_dummy_code_ftype *push_dummy_code;
1815796c8dcSSimon Schubert   gdbarch_print_registers_info_ftype *print_registers_info;
1825796c8dcSSimon Schubert   gdbarch_print_float_info_ftype *print_float_info;
1835796c8dcSSimon Schubert   gdbarch_print_vector_info_ftype *print_vector_info;
1845796c8dcSSimon Schubert   gdbarch_register_sim_regno_ftype *register_sim_regno;
1855796c8dcSSimon Schubert   gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
1865796c8dcSSimon Schubert   gdbarch_cannot_store_register_ftype *cannot_store_register;
1875796c8dcSSimon Schubert   gdbarch_get_longjmp_target_ftype *get_longjmp_target;
1885796c8dcSSimon Schubert   int believe_pcc_promotion;
1895796c8dcSSimon Schubert   gdbarch_convert_register_p_ftype *convert_register_p;
1905796c8dcSSimon Schubert   gdbarch_register_to_value_ftype *register_to_value;
1915796c8dcSSimon Schubert   gdbarch_value_to_register_ftype *value_to_register;
1925796c8dcSSimon Schubert   gdbarch_value_from_register_ftype *value_from_register;
1935796c8dcSSimon Schubert   gdbarch_pointer_to_address_ftype *pointer_to_address;
1945796c8dcSSimon Schubert   gdbarch_address_to_pointer_ftype *address_to_pointer;
1955796c8dcSSimon Schubert   gdbarch_integer_to_address_ftype *integer_to_address;
1965796c8dcSSimon Schubert   gdbarch_return_value_ftype *return_value;
1975796c8dcSSimon Schubert   gdbarch_skip_prologue_ftype *skip_prologue;
1985796c8dcSSimon Schubert   gdbarch_skip_main_prologue_ftype *skip_main_prologue;
1995796c8dcSSimon Schubert   gdbarch_inner_than_ftype *inner_than;
2005796c8dcSSimon Schubert   gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
201*cf7f2e2dSJohn Marino   gdbarch_remote_breakpoint_from_pc_ftype *remote_breakpoint_from_pc;
2025796c8dcSSimon Schubert   gdbarch_adjust_breakpoint_address_ftype *adjust_breakpoint_address;
2035796c8dcSSimon Schubert   gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
2045796c8dcSSimon Schubert   gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
2055796c8dcSSimon Schubert   CORE_ADDR decr_pc_after_break;
2065796c8dcSSimon Schubert   CORE_ADDR deprecated_function_start_offset;
2075796c8dcSSimon Schubert   gdbarch_remote_register_number_ftype *remote_register_number;
2085796c8dcSSimon Schubert   gdbarch_fetch_tls_load_module_address_ftype *fetch_tls_load_module_address;
2095796c8dcSSimon Schubert   CORE_ADDR frame_args_skip;
2105796c8dcSSimon Schubert   gdbarch_unwind_pc_ftype *unwind_pc;
2115796c8dcSSimon Schubert   gdbarch_unwind_sp_ftype *unwind_sp;
2125796c8dcSSimon Schubert   gdbarch_frame_num_args_ftype *frame_num_args;
2135796c8dcSSimon Schubert   gdbarch_frame_align_ftype *frame_align;
2145796c8dcSSimon Schubert   gdbarch_stabs_argument_has_addr_ftype *stabs_argument_has_addr;
2155796c8dcSSimon Schubert   int frame_red_zone_size;
2165796c8dcSSimon Schubert   gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
2175796c8dcSSimon Schubert   gdbarch_addr_bits_remove_ftype *addr_bits_remove;
2185796c8dcSSimon Schubert   gdbarch_smash_text_address_ftype *smash_text_address;
2195796c8dcSSimon Schubert   gdbarch_software_single_step_ftype *software_single_step;
2205796c8dcSSimon Schubert   gdbarch_single_step_through_delay_ftype *single_step_through_delay;
2215796c8dcSSimon Schubert   gdbarch_print_insn_ftype *print_insn;
2225796c8dcSSimon Schubert   gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
2235796c8dcSSimon Schubert   gdbarch_skip_solib_resolver_ftype *skip_solib_resolver;
2245796c8dcSSimon Schubert   gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
2255796c8dcSSimon Schubert   gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p;
2265796c8dcSSimon Schubert   gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
2275796c8dcSSimon Schubert   gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
2285796c8dcSSimon Schubert   int cannot_step_breakpoint;
2295796c8dcSSimon Schubert   int have_nonsteppable_watchpoint;
2305796c8dcSSimon Schubert   gdbarch_address_class_type_flags_ftype *address_class_type_flags;
2315796c8dcSSimon Schubert   gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name;
2325796c8dcSSimon Schubert   gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
2335796c8dcSSimon Schubert   gdbarch_register_reggroup_p_ftype *register_reggroup_p;
2345796c8dcSSimon Schubert   gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument;
2355796c8dcSSimon Schubert   gdbarch_regset_from_core_section_ftype *regset_from_core_section;
2365796c8dcSSimon Schubert   int core_reg_section_encodes_pid;
2375796c8dcSSimon Schubert   struct core_regset_section * core_regset_sections;
2385796c8dcSSimon Schubert   gdbarch_core_xfer_shared_libraries_ftype *core_xfer_shared_libraries;
2395796c8dcSSimon Schubert   gdbarch_core_pid_to_str_ftype *core_pid_to_str;
2405796c8dcSSimon Schubert   const char * gcore_bfd_target;
2415796c8dcSSimon Schubert   int vtable_function_descriptors;
2425796c8dcSSimon Schubert   int vbit_in_delta;
2435796c8dcSSimon Schubert   gdbarch_skip_permanent_breakpoint_ftype *skip_permanent_breakpoint;
2445796c8dcSSimon Schubert   ULONGEST max_insn_length;
2455796c8dcSSimon Schubert   gdbarch_displaced_step_copy_insn_ftype *displaced_step_copy_insn;
2465796c8dcSSimon Schubert   gdbarch_displaced_step_hw_singlestep_ftype *displaced_step_hw_singlestep;
2475796c8dcSSimon Schubert   gdbarch_displaced_step_fixup_ftype *displaced_step_fixup;
2485796c8dcSSimon Schubert   gdbarch_displaced_step_free_closure_ftype *displaced_step_free_closure;
2495796c8dcSSimon Schubert   gdbarch_displaced_step_location_ftype *displaced_step_location;
250*cf7f2e2dSJohn Marino   gdbarch_relocate_instruction_ftype *relocate_instruction;
2515796c8dcSSimon Schubert   gdbarch_overlay_update_ftype *overlay_update;
2525796c8dcSSimon Schubert   gdbarch_core_read_description_ftype *core_read_description;
2535796c8dcSSimon Schubert   gdbarch_static_transform_name_ftype *static_transform_name;
2545796c8dcSSimon Schubert   int sofun_address_maybe_missing;
2555796c8dcSSimon Schubert   gdbarch_process_record_ftype *process_record;
2565796c8dcSSimon Schubert   gdbarch_process_record_signal_ftype *process_record_signal;
2575796c8dcSSimon Schubert   gdbarch_target_signal_from_host_ftype *target_signal_from_host;
2585796c8dcSSimon Schubert   gdbarch_target_signal_to_host_ftype *target_signal_to_host;
2595796c8dcSSimon Schubert   gdbarch_get_siginfo_type_ftype *get_siginfo_type;
2605796c8dcSSimon Schubert   gdbarch_record_special_symbol_ftype *record_special_symbol;
2615796c8dcSSimon Schubert   gdbarch_get_syscall_number_ftype *get_syscall_number;
2625796c8dcSSimon Schubert   int has_global_solist;
2635796c8dcSSimon Schubert   int has_global_breakpoints;
264*cf7f2e2dSJohn Marino   gdbarch_has_shared_address_space_ftype *has_shared_address_space;
265*cf7f2e2dSJohn Marino   gdbarch_fast_tracepoint_valid_at_ftype *fast_tracepoint_valid_at;
266*cf7f2e2dSJohn Marino   gdbarch_auto_charset_ftype *auto_charset;
267*cf7f2e2dSJohn Marino   gdbarch_auto_wide_charset_ftype *auto_wide_charset;
268*cf7f2e2dSJohn Marino   const char * solib_symbols_extension;
269*cf7f2e2dSJohn Marino   int has_dos_based_file_system;
2705796c8dcSSimon Schubert };
2715796c8dcSSimon Schubert 
2725796c8dcSSimon Schubert 
2735796c8dcSSimon Schubert /* The default architecture uses host values (for want of a better
2745796c8dcSSimon Schubert    choice). */
2755796c8dcSSimon Schubert 
2765796c8dcSSimon Schubert extern const struct bfd_arch_info bfd_default_arch_struct;
2775796c8dcSSimon Schubert 
2785796c8dcSSimon Schubert struct gdbarch startup_gdbarch =
2795796c8dcSSimon Schubert {
2805796c8dcSSimon Schubert   1, /* Always initialized.  */
2815796c8dcSSimon Schubert   NULL, /* The obstack.  */
2825796c8dcSSimon Schubert   /* basic architecture information */
2835796c8dcSSimon Schubert   &bfd_default_arch_struct,  /* bfd_arch_info */
2845796c8dcSSimon Schubert   BFD_ENDIAN_BIG,  /* byte_order */
2855796c8dcSSimon Schubert   BFD_ENDIAN_BIG,  /* byte_order_for_code */
2865796c8dcSSimon Schubert   GDB_OSABI_UNKNOWN,  /* osabi */
2875796c8dcSSimon Schubert   0,  /* target_desc */
2885796c8dcSSimon Schubert   /* target specific vector and its dump routine */
2895796c8dcSSimon Schubert   NULL, NULL,
2905796c8dcSSimon Schubert   /*per-architecture data-pointers and swap regions */
2915796c8dcSSimon Schubert   0, NULL, NULL,
2925796c8dcSSimon Schubert   /* Multi-arch values */
2935796c8dcSSimon Schubert   1,  /* bits_big_endian */
2945796c8dcSSimon Schubert   8 * sizeof (short),  /* short_bit */
2955796c8dcSSimon Schubert   8 * sizeof (int),  /* int_bit */
2965796c8dcSSimon Schubert   8 * sizeof (long),  /* long_bit */
2975796c8dcSSimon Schubert   8 * sizeof (LONGEST),  /* long_long_bit */
298*cf7f2e2dSJohn Marino   16,  /* half_bit */
299*cf7f2e2dSJohn Marino   0,  /* half_format */
3005796c8dcSSimon Schubert   8 * sizeof (float),  /* float_bit */
3015796c8dcSSimon Schubert   0,  /* float_format */
3025796c8dcSSimon Schubert   8 * sizeof (double),  /* double_bit */
3035796c8dcSSimon Schubert   0,  /* double_format */
3045796c8dcSSimon Schubert   8 * sizeof (long double),  /* long_double_bit */
3055796c8dcSSimon Schubert   0,  /* long_double_format */
3065796c8dcSSimon Schubert   8 * sizeof (void*),  /* ptr_bit */
3075796c8dcSSimon Schubert   8 * sizeof (void*),  /* addr_bit */
3085796c8dcSSimon Schubert   1,  /* char_signed */
3095796c8dcSSimon Schubert   0,  /* read_pc */
3105796c8dcSSimon Schubert   0,  /* write_pc */
3115796c8dcSSimon Schubert   legacy_virtual_frame_pointer,  /* virtual_frame_pointer */
3125796c8dcSSimon Schubert   0,  /* pseudo_register_read */
3135796c8dcSSimon Schubert   0,  /* pseudo_register_write */
3145796c8dcSSimon Schubert   0,  /* num_regs */
3155796c8dcSSimon Schubert   0,  /* num_pseudo_regs */
3165796c8dcSSimon Schubert   -1,  /* sp_regnum */
3175796c8dcSSimon Schubert   -1,  /* pc_regnum */
3185796c8dcSSimon Schubert   -1,  /* ps_regnum */
3195796c8dcSSimon Schubert   0,  /* fp0_regnum */
3205796c8dcSSimon Schubert   no_op_reg_to_regnum,  /* stab_reg_to_regnum */
3215796c8dcSSimon Schubert   no_op_reg_to_regnum,  /* ecoff_reg_to_regnum */
3225796c8dcSSimon Schubert   no_op_reg_to_regnum,  /* sdb_reg_to_regnum */
3235796c8dcSSimon Schubert   no_op_reg_to_regnum,  /* dwarf2_reg_to_regnum */
3245796c8dcSSimon Schubert   0,  /* register_name */
3255796c8dcSSimon Schubert   0,  /* register_type */
3265796c8dcSSimon Schubert   0,  /* dummy_id */
3275796c8dcSSimon Schubert   -1,  /* deprecated_fp_regnum */
3285796c8dcSSimon Schubert   0,  /* push_dummy_call */
3295796c8dcSSimon Schubert   0,  /* call_dummy_location */
3305796c8dcSSimon Schubert   0,  /* push_dummy_code */
3315796c8dcSSimon Schubert   default_print_registers_info,  /* print_registers_info */
3325796c8dcSSimon Schubert   0,  /* print_float_info */
3335796c8dcSSimon Schubert   0,  /* print_vector_info */
3345796c8dcSSimon Schubert   legacy_register_sim_regno,  /* register_sim_regno */
3355796c8dcSSimon Schubert   cannot_register_not,  /* cannot_fetch_register */
3365796c8dcSSimon Schubert   cannot_register_not,  /* cannot_store_register */
3375796c8dcSSimon Schubert   0,  /* get_longjmp_target */
3385796c8dcSSimon Schubert   0,  /* believe_pcc_promotion */
3395796c8dcSSimon Schubert   generic_convert_register_p,  /* convert_register_p */
3405796c8dcSSimon Schubert   0,  /* register_to_value */
3415796c8dcSSimon Schubert   0,  /* value_to_register */
3425796c8dcSSimon Schubert   0,  /* value_from_register */
3435796c8dcSSimon Schubert   unsigned_pointer_to_address,  /* pointer_to_address */
3445796c8dcSSimon Schubert   unsigned_address_to_pointer,  /* address_to_pointer */
3455796c8dcSSimon Schubert   0,  /* integer_to_address */
3465796c8dcSSimon Schubert   0,  /* return_value */
3475796c8dcSSimon Schubert   0,  /* skip_prologue */
3485796c8dcSSimon Schubert   0,  /* skip_main_prologue */
3495796c8dcSSimon Schubert   0,  /* inner_than */
3505796c8dcSSimon Schubert   0,  /* breakpoint_from_pc */
351*cf7f2e2dSJohn Marino   default_remote_breakpoint_from_pc,  /* remote_breakpoint_from_pc */
3525796c8dcSSimon Schubert   0,  /* adjust_breakpoint_address */
3535796c8dcSSimon Schubert   default_memory_insert_breakpoint,  /* memory_insert_breakpoint */
3545796c8dcSSimon Schubert   default_memory_remove_breakpoint,  /* memory_remove_breakpoint */
3555796c8dcSSimon Schubert   0,  /* decr_pc_after_break */
3565796c8dcSSimon Schubert   0,  /* deprecated_function_start_offset */
3575796c8dcSSimon Schubert   default_remote_register_number,  /* remote_register_number */
3585796c8dcSSimon Schubert   0,  /* fetch_tls_load_module_address */
3595796c8dcSSimon Schubert   0,  /* frame_args_skip */
3605796c8dcSSimon Schubert   0,  /* unwind_pc */
3615796c8dcSSimon Schubert   0,  /* unwind_sp */
3625796c8dcSSimon Schubert   0,  /* frame_num_args */
3635796c8dcSSimon Schubert   0,  /* frame_align */
3645796c8dcSSimon Schubert   default_stabs_argument_has_addr,  /* stabs_argument_has_addr */
3655796c8dcSSimon Schubert   0,  /* frame_red_zone_size */
3665796c8dcSSimon Schubert   convert_from_func_ptr_addr_identity,  /* convert_from_func_ptr_addr */
3675796c8dcSSimon Schubert   core_addr_identity,  /* addr_bits_remove */
3685796c8dcSSimon Schubert   core_addr_identity,  /* smash_text_address */
3695796c8dcSSimon Schubert   0,  /* software_single_step */
3705796c8dcSSimon Schubert   0,  /* single_step_through_delay */
3715796c8dcSSimon Schubert   0,  /* print_insn */
3725796c8dcSSimon Schubert   0,  /* skip_trampoline_code */
3735796c8dcSSimon Schubert   generic_skip_solib_resolver,  /* skip_solib_resolver */
3745796c8dcSSimon Schubert   generic_in_solib_return_trampoline,  /* in_solib_return_trampoline */
3755796c8dcSSimon Schubert   generic_in_function_epilogue_p,  /* in_function_epilogue_p */
3765796c8dcSSimon Schubert   0,  /* elf_make_msymbol_special */
3775796c8dcSSimon Schubert   0,  /* coff_make_msymbol_special */
3785796c8dcSSimon Schubert   0,  /* cannot_step_breakpoint */
3795796c8dcSSimon Schubert   0,  /* have_nonsteppable_watchpoint */
3805796c8dcSSimon Schubert   0,  /* address_class_type_flags */
3815796c8dcSSimon Schubert   0,  /* address_class_type_flags_to_name */
3825796c8dcSSimon Schubert   0,  /* address_class_name_to_type_flags */
3835796c8dcSSimon Schubert   default_register_reggroup_p,  /* register_reggroup_p */
3845796c8dcSSimon Schubert   0,  /* fetch_pointer_argument */
3855796c8dcSSimon Schubert   0,  /* regset_from_core_section */
3865796c8dcSSimon Schubert   0,  /* core_reg_section_encodes_pid */
3875796c8dcSSimon Schubert   0,  /* core_regset_sections */
3885796c8dcSSimon Schubert   0,  /* core_xfer_shared_libraries */
3895796c8dcSSimon Schubert   0,  /* core_pid_to_str */
3905796c8dcSSimon Schubert   0,  /* gcore_bfd_target */
3915796c8dcSSimon Schubert   0,  /* vtable_function_descriptors */
3925796c8dcSSimon Schubert   0,  /* vbit_in_delta */
3935796c8dcSSimon Schubert   0,  /* skip_permanent_breakpoint */
3945796c8dcSSimon Schubert   0,  /* max_insn_length */
3955796c8dcSSimon Schubert   0,  /* displaced_step_copy_insn */
3965796c8dcSSimon Schubert   default_displaced_step_hw_singlestep,  /* displaced_step_hw_singlestep */
3975796c8dcSSimon Schubert   0,  /* displaced_step_fixup */
3985796c8dcSSimon Schubert   NULL,  /* displaced_step_free_closure */
3995796c8dcSSimon Schubert   NULL,  /* displaced_step_location */
400*cf7f2e2dSJohn Marino   0,  /* relocate_instruction */
4015796c8dcSSimon Schubert   0,  /* overlay_update */
4025796c8dcSSimon Schubert   0,  /* core_read_description */
4035796c8dcSSimon Schubert   0,  /* static_transform_name */
4045796c8dcSSimon Schubert   0,  /* sofun_address_maybe_missing */
4055796c8dcSSimon Schubert   0,  /* process_record */
4065796c8dcSSimon Schubert   0,  /* process_record_signal */
4075796c8dcSSimon Schubert   default_target_signal_from_host,  /* target_signal_from_host */
4085796c8dcSSimon Schubert   default_target_signal_to_host,  /* target_signal_to_host */
4095796c8dcSSimon Schubert   0,  /* get_siginfo_type */
4105796c8dcSSimon Schubert   0,  /* record_special_symbol */
4115796c8dcSSimon Schubert   0,  /* get_syscall_number */
4125796c8dcSSimon Schubert   0,  /* has_global_solist */
4135796c8dcSSimon Schubert   0,  /* has_global_breakpoints */
414*cf7f2e2dSJohn Marino   default_has_shared_address_space,  /* has_shared_address_space */
415*cf7f2e2dSJohn Marino   default_fast_tracepoint_valid_at,  /* fast_tracepoint_valid_at */
416*cf7f2e2dSJohn Marino   default_auto_charset,  /* auto_charset */
417*cf7f2e2dSJohn Marino   default_auto_wide_charset,  /* auto_wide_charset */
418*cf7f2e2dSJohn Marino   0,  /* solib_symbols_extension */
419*cf7f2e2dSJohn Marino   0,  /* has_dos_based_file_system */
4205796c8dcSSimon Schubert   /* startup_gdbarch() */
4215796c8dcSSimon Schubert };
4225796c8dcSSimon Schubert 
4235796c8dcSSimon Schubert struct gdbarch *target_gdbarch = &startup_gdbarch;
4245796c8dcSSimon Schubert 
4255796c8dcSSimon Schubert /* Create a new ``struct gdbarch'' based on information provided by
4265796c8dcSSimon Schubert    ``struct gdbarch_info''. */
4275796c8dcSSimon Schubert 
4285796c8dcSSimon Schubert struct gdbarch *
4295796c8dcSSimon Schubert gdbarch_alloc (const struct gdbarch_info *info,
4305796c8dcSSimon Schubert                struct gdbarch_tdep *tdep)
4315796c8dcSSimon Schubert {
4325796c8dcSSimon Schubert   struct gdbarch *gdbarch;
4335796c8dcSSimon Schubert 
4345796c8dcSSimon Schubert   /* Create an obstack for allocating all the per-architecture memory,
4355796c8dcSSimon Schubert      then use that to allocate the architecture vector.  */
4365796c8dcSSimon Schubert   struct obstack *obstack = XMALLOC (struct obstack);
4375796c8dcSSimon Schubert   obstack_init (obstack);
4385796c8dcSSimon Schubert   gdbarch = obstack_alloc (obstack, sizeof (*gdbarch));
4395796c8dcSSimon Schubert   memset (gdbarch, 0, sizeof (*gdbarch));
4405796c8dcSSimon Schubert   gdbarch->obstack = obstack;
4415796c8dcSSimon Schubert 
4425796c8dcSSimon Schubert   alloc_gdbarch_data (gdbarch);
4435796c8dcSSimon Schubert 
4445796c8dcSSimon Schubert   gdbarch->tdep = tdep;
4455796c8dcSSimon Schubert 
4465796c8dcSSimon Schubert   gdbarch->bfd_arch_info = info->bfd_arch_info;
4475796c8dcSSimon Schubert   gdbarch->byte_order = info->byte_order;
4485796c8dcSSimon Schubert   gdbarch->byte_order_for_code = info->byte_order_for_code;
4495796c8dcSSimon Schubert   gdbarch->osabi = info->osabi;
4505796c8dcSSimon Schubert   gdbarch->target_desc = info->target_desc;
4515796c8dcSSimon Schubert 
4525796c8dcSSimon Schubert   /* Force the explicit initialization of these. */
4535796c8dcSSimon Schubert   gdbarch->bits_big_endian = (gdbarch->byte_order == BFD_ENDIAN_BIG);
4545796c8dcSSimon Schubert   gdbarch->short_bit = 2*TARGET_CHAR_BIT;
4555796c8dcSSimon Schubert   gdbarch->int_bit = 4*TARGET_CHAR_BIT;
4565796c8dcSSimon Schubert   gdbarch->long_bit = 4*TARGET_CHAR_BIT;
4575796c8dcSSimon Schubert   gdbarch->long_long_bit = 2*gdbarch->long_bit;
458*cf7f2e2dSJohn Marino   gdbarch->half_bit = 2*TARGET_CHAR_BIT;
4595796c8dcSSimon Schubert   gdbarch->float_bit = 4*TARGET_CHAR_BIT;
4605796c8dcSSimon Schubert   gdbarch->double_bit = 8*TARGET_CHAR_BIT;
4615796c8dcSSimon Schubert   gdbarch->long_double_bit = 8*TARGET_CHAR_BIT;
4625796c8dcSSimon Schubert   gdbarch->ptr_bit = gdbarch->int_bit;
4635796c8dcSSimon Schubert   gdbarch->char_signed = -1;
4645796c8dcSSimon Schubert   gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
4655796c8dcSSimon Schubert   gdbarch->num_regs = -1;
4665796c8dcSSimon Schubert   gdbarch->sp_regnum = -1;
4675796c8dcSSimon Schubert   gdbarch->pc_regnum = -1;
4685796c8dcSSimon Schubert   gdbarch->ps_regnum = -1;
4695796c8dcSSimon Schubert   gdbarch->fp0_regnum = -1;
4705796c8dcSSimon Schubert   gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
4715796c8dcSSimon Schubert   gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
4725796c8dcSSimon Schubert   gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
4735796c8dcSSimon Schubert   gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
4745796c8dcSSimon Schubert   gdbarch->deprecated_fp_regnum = -1;
4755796c8dcSSimon Schubert   gdbarch->call_dummy_location = AT_ENTRY_POINT;
4765796c8dcSSimon Schubert   gdbarch->print_registers_info = default_print_registers_info;
4775796c8dcSSimon Schubert   gdbarch->register_sim_regno = legacy_register_sim_regno;
4785796c8dcSSimon Schubert   gdbarch->cannot_fetch_register = cannot_register_not;
4795796c8dcSSimon Schubert   gdbarch->cannot_store_register = cannot_register_not;
4805796c8dcSSimon Schubert   gdbarch->convert_register_p = generic_convert_register_p;
4815796c8dcSSimon Schubert   gdbarch->value_from_register = default_value_from_register;
4825796c8dcSSimon Schubert   gdbarch->pointer_to_address = unsigned_pointer_to_address;
4835796c8dcSSimon Schubert   gdbarch->address_to_pointer = unsigned_address_to_pointer;
484*cf7f2e2dSJohn Marino   gdbarch->remote_breakpoint_from_pc = default_remote_breakpoint_from_pc;
4855796c8dcSSimon Schubert   gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
4865796c8dcSSimon Schubert   gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
4875796c8dcSSimon Schubert   gdbarch->remote_register_number = default_remote_register_number;
4885796c8dcSSimon Schubert   gdbarch->stabs_argument_has_addr = default_stabs_argument_has_addr;
4895796c8dcSSimon Schubert   gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr_identity;
4905796c8dcSSimon Schubert   gdbarch->addr_bits_remove = core_addr_identity;
4915796c8dcSSimon Schubert   gdbarch->smash_text_address = core_addr_identity;
4925796c8dcSSimon Schubert   gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
4935796c8dcSSimon Schubert   gdbarch->skip_solib_resolver = generic_skip_solib_resolver;
4945796c8dcSSimon Schubert   gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
4955796c8dcSSimon Schubert   gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
4965796c8dcSSimon Schubert   gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
4975796c8dcSSimon Schubert   gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
4985796c8dcSSimon Schubert   gdbarch->register_reggroup_p = default_register_reggroup_p;
4995796c8dcSSimon Schubert   gdbarch->displaced_step_hw_singlestep = default_displaced_step_hw_singlestep;
5005796c8dcSSimon Schubert   gdbarch->displaced_step_fixup = NULL;
5015796c8dcSSimon Schubert   gdbarch->displaced_step_free_closure = NULL;
5025796c8dcSSimon Schubert   gdbarch->displaced_step_location = NULL;
503*cf7f2e2dSJohn Marino   gdbarch->relocate_instruction = NULL;
5045796c8dcSSimon Schubert   gdbarch->target_signal_from_host = default_target_signal_from_host;
5055796c8dcSSimon Schubert   gdbarch->target_signal_to_host = default_target_signal_to_host;
506*cf7f2e2dSJohn Marino   gdbarch->has_shared_address_space = default_has_shared_address_space;
507*cf7f2e2dSJohn Marino   gdbarch->fast_tracepoint_valid_at = default_fast_tracepoint_valid_at;
508*cf7f2e2dSJohn Marino   gdbarch->auto_charset = default_auto_charset;
509*cf7f2e2dSJohn Marino   gdbarch->auto_wide_charset = default_auto_wide_charset;
5105796c8dcSSimon Schubert   /* gdbarch_alloc() */
5115796c8dcSSimon Schubert 
5125796c8dcSSimon Schubert   return gdbarch;
5135796c8dcSSimon Schubert }
5145796c8dcSSimon Schubert 
5155796c8dcSSimon Schubert 
5165796c8dcSSimon Schubert /* Allocate extra space using the per-architecture obstack.  */
5175796c8dcSSimon Schubert 
5185796c8dcSSimon Schubert void *
5195796c8dcSSimon Schubert gdbarch_obstack_zalloc (struct gdbarch *arch, long size)
5205796c8dcSSimon Schubert {
5215796c8dcSSimon Schubert   void *data = obstack_alloc (arch->obstack, size);
522*cf7f2e2dSJohn Marino 
5235796c8dcSSimon Schubert   memset (data, 0, size);
5245796c8dcSSimon Schubert   return data;
5255796c8dcSSimon Schubert }
5265796c8dcSSimon Schubert 
5275796c8dcSSimon Schubert 
5285796c8dcSSimon Schubert /* Free a gdbarch struct.  This should never happen in normal
5295796c8dcSSimon Schubert    operation --- once you've created a gdbarch, you keep it around.
5305796c8dcSSimon Schubert    However, if an architecture's init function encounters an error
5315796c8dcSSimon Schubert    building the structure, it may need to clean up a partially
5325796c8dcSSimon Schubert    constructed gdbarch.  */
5335796c8dcSSimon Schubert 
5345796c8dcSSimon Schubert void
5355796c8dcSSimon Schubert gdbarch_free (struct gdbarch *arch)
5365796c8dcSSimon Schubert {
5375796c8dcSSimon Schubert   struct obstack *obstack;
538*cf7f2e2dSJohn Marino 
5395796c8dcSSimon Schubert   gdb_assert (arch != NULL);
5405796c8dcSSimon Schubert   gdb_assert (!arch->initialized_p);
5415796c8dcSSimon Schubert   obstack = arch->obstack;
5425796c8dcSSimon Schubert   obstack_free (obstack, 0); /* Includes the ARCH.  */
5435796c8dcSSimon Schubert   xfree (obstack);
5445796c8dcSSimon Schubert }
5455796c8dcSSimon Schubert 
5465796c8dcSSimon Schubert 
5475796c8dcSSimon Schubert /* Ensure that all values in a GDBARCH are reasonable.  */
5485796c8dcSSimon Schubert 
5495796c8dcSSimon Schubert static void
5505796c8dcSSimon Schubert verify_gdbarch (struct gdbarch *gdbarch)
5515796c8dcSSimon Schubert {
5525796c8dcSSimon Schubert   struct ui_file *log;
5535796c8dcSSimon Schubert   struct cleanup *cleanups;
5545796c8dcSSimon Schubert   long length;
5555796c8dcSSimon Schubert   char *buf;
556*cf7f2e2dSJohn Marino 
5575796c8dcSSimon Schubert   log = mem_fileopen ();
5585796c8dcSSimon Schubert   cleanups = make_cleanup_ui_file_delete (log);
5595796c8dcSSimon Schubert   /* fundamental */
5605796c8dcSSimon Schubert   if (gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
5615796c8dcSSimon Schubert     fprintf_unfiltered (log, "\n\tbyte-order");
5625796c8dcSSimon Schubert   if (gdbarch->bfd_arch_info == NULL)
5635796c8dcSSimon Schubert     fprintf_unfiltered (log, "\n\tbfd_arch_info");
5645796c8dcSSimon Schubert   /* Check those that need to be defined for the given multi-arch level. */
5655796c8dcSSimon Schubert   /* Skip verify of bits_big_endian, invalid_p == 0 */
5665796c8dcSSimon Schubert   /* Skip verify of short_bit, invalid_p == 0 */
5675796c8dcSSimon Schubert   /* Skip verify of int_bit, invalid_p == 0 */
5685796c8dcSSimon Schubert   /* Skip verify of long_bit, invalid_p == 0 */
5695796c8dcSSimon Schubert   /* Skip verify of long_long_bit, invalid_p == 0 */
570*cf7f2e2dSJohn Marino   /* Skip verify of half_bit, invalid_p == 0 */
571*cf7f2e2dSJohn Marino   if (gdbarch->half_format == 0)
572*cf7f2e2dSJohn Marino     gdbarch->half_format = floatformats_ieee_half;
5735796c8dcSSimon Schubert   /* Skip verify of float_bit, invalid_p == 0 */
5745796c8dcSSimon Schubert   if (gdbarch->float_format == 0)
5755796c8dcSSimon Schubert     gdbarch->float_format = floatformats_ieee_single;
5765796c8dcSSimon Schubert   /* Skip verify of double_bit, invalid_p == 0 */
5775796c8dcSSimon Schubert   if (gdbarch->double_format == 0)
5785796c8dcSSimon Schubert     gdbarch->double_format = floatformats_ieee_double;
5795796c8dcSSimon Schubert   /* Skip verify of long_double_bit, invalid_p == 0 */
5805796c8dcSSimon Schubert   if (gdbarch->long_double_format == 0)
5815796c8dcSSimon Schubert     gdbarch->long_double_format = floatformats_ieee_double;
5825796c8dcSSimon Schubert   /* Skip verify of ptr_bit, invalid_p == 0 */
5835796c8dcSSimon Schubert   if (gdbarch->addr_bit == 0)
5845796c8dcSSimon Schubert     gdbarch->addr_bit = gdbarch_ptr_bit (gdbarch);
5855796c8dcSSimon Schubert   if (gdbarch->char_signed == -1)
5865796c8dcSSimon Schubert     gdbarch->char_signed = 1;
5875796c8dcSSimon Schubert   /* Skip verify of read_pc, has predicate */
5885796c8dcSSimon Schubert   /* Skip verify of write_pc, has predicate */
5895796c8dcSSimon Schubert   /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
5905796c8dcSSimon Schubert   /* Skip verify of pseudo_register_read, has predicate */
5915796c8dcSSimon Schubert   /* Skip verify of pseudo_register_write, has predicate */
5925796c8dcSSimon Schubert   if (gdbarch->num_regs == -1)
5935796c8dcSSimon Schubert     fprintf_unfiltered (log, "\n\tnum_regs");
5945796c8dcSSimon Schubert   /* Skip verify of num_pseudo_regs, invalid_p == 0 */
5955796c8dcSSimon Schubert   /* Skip verify of sp_regnum, invalid_p == 0 */
5965796c8dcSSimon Schubert   /* Skip verify of pc_regnum, invalid_p == 0 */
5975796c8dcSSimon Schubert   /* Skip verify of ps_regnum, invalid_p == 0 */
5985796c8dcSSimon Schubert   /* Skip verify of fp0_regnum, invalid_p == 0 */
5995796c8dcSSimon Schubert   /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
6005796c8dcSSimon Schubert   /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
6015796c8dcSSimon Schubert   /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
6025796c8dcSSimon Schubert   /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
6035796c8dcSSimon Schubert   if (gdbarch->register_name == 0)
6045796c8dcSSimon Schubert     fprintf_unfiltered (log, "\n\tregister_name");
6055796c8dcSSimon Schubert   /* Skip verify of register_type, has predicate */
6065796c8dcSSimon Schubert   /* Skip verify of dummy_id, has predicate */
6075796c8dcSSimon Schubert   /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
6085796c8dcSSimon Schubert   /* Skip verify of push_dummy_call, has predicate */
6095796c8dcSSimon Schubert   /* Skip verify of call_dummy_location, invalid_p == 0 */
6105796c8dcSSimon Schubert   /* Skip verify of push_dummy_code, has predicate */
6115796c8dcSSimon Schubert   /* Skip verify of print_registers_info, invalid_p == 0 */
6125796c8dcSSimon Schubert   /* Skip verify of print_float_info, has predicate */
6135796c8dcSSimon Schubert   /* Skip verify of print_vector_info, has predicate */
6145796c8dcSSimon Schubert   /* Skip verify of register_sim_regno, invalid_p == 0 */
6155796c8dcSSimon Schubert   /* Skip verify of cannot_fetch_register, invalid_p == 0 */
6165796c8dcSSimon Schubert   /* Skip verify of cannot_store_register, invalid_p == 0 */
6175796c8dcSSimon Schubert   /* Skip verify of get_longjmp_target, has predicate */
6185796c8dcSSimon Schubert   /* Skip verify of convert_register_p, invalid_p == 0 */
6195796c8dcSSimon Schubert   /* Skip verify of value_from_register, invalid_p == 0 */
6205796c8dcSSimon Schubert   /* Skip verify of pointer_to_address, invalid_p == 0 */
6215796c8dcSSimon Schubert   /* Skip verify of address_to_pointer, invalid_p == 0 */
6225796c8dcSSimon Schubert   /* Skip verify of integer_to_address, has predicate */
6235796c8dcSSimon Schubert   /* Skip verify of return_value, has predicate */
6245796c8dcSSimon Schubert   if (gdbarch->skip_prologue == 0)
6255796c8dcSSimon Schubert     fprintf_unfiltered (log, "\n\tskip_prologue");
6265796c8dcSSimon Schubert   /* Skip verify of skip_main_prologue, has predicate */
6275796c8dcSSimon Schubert   if (gdbarch->inner_than == 0)
6285796c8dcSSimon Schubert     fprintf_unfiltered (log, "\n\tinner_than");
6295796c8dcSSimon Schubert   if (gdbarch->breakpoint_from_pc == 0)
6305796c8dcSSimon Schubert     fprintf_unfiltered (log, "\n\tbreakpoint_from_pc");
631*cf7f2e2dSJohn Marino   /* Skip verify of remote_breakpoint_from_pc, invalid_p == 0 */
6325796c8dcSSimon Schubert   /* Skip verify of adjust_breakpoint_address, has predicate */
6335796c8dcSSimon Schubert   /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
6345796c8dcSSimon Schubert   /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
6355796c8dcSSimon Schubert   /* Skip verify of decr_pc_after_break, invalid_p == 0 */
6365796c8dcSSimon Schubert   /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
6375796c8dcSSimon Schubert   /* Skip verify of remote_register_number, invalid_p == 0 */
6385796c8dcSSimon Schubert   /* Skip verify of fetch_tls_load_module_address, has predicate */
6395796c8dcSSimon Schubert   /* Skip verify of frame_args_skip, invalid_p == 0 */
6405796c8dcSSimon Schubert   /* Skip verify of unwind_pc, has predicate */
6415796c8dcSSimon Schubert   /* Skip verify of unwind_sp, has predicate */
6425796c8dcSSimon Schubert   /* Skip verify of frame_num_args, has predicate */
6435796c8dcSSimon Schubert   /* Skip verify of frame_align, has predicate */
6445796c8dcSSimon Schubert   /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
6455796c8dcSSimon Schubert   /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
6465796c8dcSSimon Schubert   /* Skip verify of addr_bits_remove, invalid_p == 0 */
6475796c8dcSSimon Schubert   /* Skip verify of smash_text_address, invalid_p == 0 */
6485796c8dcSSimon Schubert   /* Skip verify of software_single_step, has predicate */
6495796c8dcSSimon Schubert   /* Skip verify of single_step_through_delay, has predicate */
6505796c8dcSSimon Schubert   if (gdbarch->print_insn == 0)
6515796c8dcSSimon Schubert     fprintf_unfiltered (log, "\n\tprint_insn");
6525796c8dcSSimon Schubert   /* Skip verify of skip_trampoline_code, invalid_p == 0 */
6535796c8dcSSimon Schubert   /* Skip verify of skip_solib_resolver, invalid_p == 0 */
6545796c8dcSSimon Schubert   /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
6555796c8dcSSimon Schubert   /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
6565796c8dcSSimon Schubert   /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
6575796c8dcSSimon Schubert   /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
6585796c8dcSSimon Schubert   /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
6595796c8dcSSimon Schubert   /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
6605796c8dcSSimon Schubert   /* Skip verify of address_class_type_flags, has predicate */
6615796c8dcSSimon Schubert   /* Skip verify of address_class_type_flags_to_name, has predicate */
6625796c8dcSSimon Schubert   /* Skip verify of address_class_name_to_type_flags, has predicate */
6635796c8dcSSimon Schubert   /* Skip verify of register_reggroup_p, invalid_p == 0 */
6645796c8dcSSimon Schubert   /* Skip verify of fetch_pointer_argument, has predicate */
6655796c8dcSSimon Schubert   /* Skip verify of regset_from_core_section, has predicate */
6665796c8dcSSimon Schubert   /* Skip verify of core_reg_section_encodes_pid, invalid_p == 0 */
6675796c8dcSSimon Schubert   /* Skip verify of core_xfer_shared_libraries, has predicate */
6685796c8dcSSimon Schubert   /* Skip verify of core_pid_to_str, has predicate */
6695796c8dcSSimon Schubert   /* Skip verify of gcore_bfd_target, has predicate */
6705796c8dcSSimon Schubert   /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
6715796c8dcSSimon Schubert   /* Skip verify of vbit_in_delta, invalid_p == 0 */
6725796c8dcSSimon Schubert   /* Skip verify of skip_permanent_breakpoint, has predicate */
6735796c8dcSSimon Schubert   /* Skip verify of max_insn_length, has predicate */
6745796c8dcSSimon Schubert   /* Skip verify of displaced_step_copy_insn, has predicate */
6755796c8dcSSimon Schubert   /* Skip verify of displaced_step_hw_singlestep, invalid_p == 0 */
6765796c8dcSSimon Schubert   /* Skip verify of displaced_step_fixup, has predicate */
6775796c8dcSSimon Schubert   if ((! gdbarch->displaced_step_free_closure) != (! gdbarch->displaced_step_copy_insn))
6785796c8dcSSimon Schubert     fprintf_unfiltered (log, "\n\tdisplaced_step_free_closure");
6795796c8dcSSimon Schubert   if ((! gdbarch->displaced_step_location) != (! gdbarch->displaced_step_copy_insn))
6805796c8dcSSimon Schubert     fprintf_unfiltered (log, "\n\tdisplaced_step_location");
681*cf7f2e2dSJohn Marino   /* Skip verify of relocate_instruction, has predicate */
6825796c8dcSSimon Schubert   /* Skip verify of overlay_update, has predicate */
6835796c8dcSSimon Schubert   /* Skip verify of core_read_description, has predicate */
6845796c8dcSSimon Schubert   /* Skip verify of static_transform_name, has predicate */
6855796c8dcSSimon Schubert   /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
6865796c8dcSSimon Schubert   /* Skip verify of process_record, has predicate */
6875796c8dcSSimon Schubert   /* Skip verify of process_record_signal, has predicate */
6885796c8dcSSimon Schubert   /* Skip verify of target_signal_from_host, invalid_p == 0 */
6895796c8dcSSimon Schubert   /* Skip verify of target_signal_to_host, invalid_p == 0 */
6905796c8dcSSimon Schubert   /* Skip verify of get_siginfo_type, has predicate */
6915796c8dcSSimon Schubert   /* Skip verify of record_special_symbol, has predicate */
6925796c8dcSSimon Schubert   /* Skip verify of get_syscall_number, has predicate */
6935796c8dcSSimon Schubert   /* Skip verify of has_global_solist, invalid_p == 0 */
6945796c8dcSSimon Schubert   /* Skip verify of has_global_breakpoints, invalid_p == 0 */
695*cf7f2e2dSJohn Marino   /* Skip verify of has_shared_address_space, invalid_p == 0 */
696*cf7f2e2dSJohn Marino   /* Skip verify of fast_tracepoint_valid_at, invalid_p == 0 */
697*cf7f2e2dSJohn Marino   /* Skip verify of auto_charset, invalid_p == 0 */
698*cf7f2e2dSJohn Marino   /* Skip verify of auto_wide_charset, invalid_p == 0 */
699*cf7f2e2dSJohn Marino   /* Skip verify of has_dos_based_file_system, invalid_p == 0 */
7005796c8dcSSimon Schubert   buf = ui_file_xstrdup (log, &length);
7015796c8dcSSimon Schubert   make_cleanup (xfree, buf);
7025796c8dcSSimon Schubert   if (length > 0)
7035796c8dcSSimon Schubert     internal_error (__FILE__, __LINE__,
7045796c8dcSSimon Schubert                     _("verify_gdbarch: the following are invalid ...%s"),
7055796c8dcSSimon Schubert                     buf);
7065796c8dcSSimon Schubert   do_cleanups (cleanups);
7075796c8dcSSimon Schubert }
7085796c8dcSSimon Schubert 
7095796c8dcSSimon Schubert 
7105796c8dcSSimon Schubert /* Print out the details of the current architecture. */
7115796c8dcSSimon Schubert 
7125796c8dcSSimon Schubert void
7135796c8dcSSimon Schubert gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
7145796c8dcSSimon Schubert {
7155796c8dcSSimon Schubert   const char *gdb_nm_file = "<not-defined>";
716*cf7f2e2dSJohn Marino 
7175796c8dcSSimon Schubert #if defined (GDB_NM_FILE)
7185796c8dcSSimon Schubert   gdb_nm_file = GDB_NM_FILE;
7195796c8dcSSimon Schubert #endif
7205796c8dcSSimon Schubert   fprintf_unfiltered (file,
7215796c8dcSSimon Schubert                       "gdbarch_dump: GDB_NM_FILE = %s\n",
7225796c8dcSSimon Schubert                       gdb_nm_file);
7235796c8dcSSimon Schubert   fprintf_unfiltered (file,
7245796c8dcSSimon Schubert                       "gdbarch_dump: addr_bit = %s\n",
7255796c8dcSSimon Schubert                       plongest (gdbarch->addr_bit));
7265796c8dcSSimon Schubert   fprintf_unfiltered (file,
7275796c8dcSSimon Schubert                       "gdbarch_dump: addr_bits_remove = <%s>\n",
7285796c8dcSSimon Schubert                       host_address_to_string (gdbarch->addr_bits_remove));
7295796c8dcSSimon Schubert   fprintf_unfiltered (file,
7305796c8dcSSimon Schubert                       "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
7315796c8dcSSimon Schubert                       gdbarch_address_class_name_to_type_flags_p (gdbarch));
7325796c8dcSSimon Schubert   fprintf_unfiltered (file,
7335796c8dcSSimon Schubert                       "gdbarch_dump: address_class_name_to_type_flags = <%s>\n",
7345796c8dcSSimon Schubert                       host_address_to_string (gdbarch->address_class_name_to_type_flags));
7355796c8dcSSimon Schubert   fprintf_unfiltered (file,
7365796c8dcSSimon Schubert                       "gdbarch_dump: gdbarch_address_class_type_flags_p() = %d\n",
7375796c8dcSSimon Schubert                       gdbarch_address_class_type_flags_p (gdbarch));
7385796c8dcSSimon Schubert   fprintf_unfiltered (file,
7395796c8dcSSimon Schubert                       "gdbarch_dump: address_class_type_flags = <%s>\n",
7405796c8dcSSimon Schubert                       host_address_to_string (gdbarch->address_class_type_flags));
7415796c8dcSSimon Schubert   fprintf_unfiltered (file,
7425796c8dcSSimon Schubert                       "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
7435796c8dcSSimon Schubert                       gdbarch_address_class_type_flags_to_name_p (gdbarch));
7445796c8dcSSimon Schubert   fprintf_unfiltered (file,
7455796c8dcSSimon Schubert                       "gdbarch_dump: address_class_type_flags_to_name = <%s>\n",
7465796c8dcSSimon Schubert                       host_address_to_string (gdbarch->address_class_type_flags_to_name));
7475796c8dcSSimon Schubert   fprintf_unfiltered (file,
7485796c8dcSSimon Schubert                       "gdbarch_dump: address_to_pointer = <%s>\n",
7495796c8dcSSimon Schubert                       host_address_to_string (gdbarch->address_to_pointer));
7505796c8dcSSimon Schubert   fprintf_unfiltered (file,
7515796c8dcSSimon Schubert                       "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n",
7525796c8dcSSimon Schubert                       gdbarch_adjust_breakpoint_address_p (gdbarch));
7535796c8dcSSimon Schubert   fprintf_unfiltered (file,
7545796c8dcSSimon Schubert                       "gdbarch_dump: adjust_breakpoint_address = <%s>\n",
7555796c8dcSSimon Schubert                       host_address_to_string (gdbarch->adjust_breakpoint_address));
7565796c8dcSSimon Schubert   fprintf_unfiltered (file,
757*cf7f2e2dSJohn Marino                       "gdbarch_dump: auto_charset = <%s>\n",
758*cf7f2e2dSJohn Marino                       host_address_to_string (gdbarch->auto_charset));
759*cf7f2e2dSJohn Marino   fprintf_unfiltered (file,
760*cf7f2e2dSJohn Marino                       "gdbarch_dump: auto_wide_charset = <%s>\n",
761*cf7f2e2dSJohn Marino                       host_address_to_string (gdbarch->auto_wide_charset));
762*cf7f2e2dSJohn Marino   fprintf_unfiltered (file,
7635796c8dcSSimon Schubert                       "gdbarch_dump: believe_pcc_promotion = %s\n",
7645796c8dcSSimon Schubert                       plongest (gdbarch->believe_pcc_promotion));
7655796c8dcSSimon Schubert   fprintf_unfiltered (file,
7665796c8dcSSimon Schubert                       "gdbarch_dump: bfd_arch_info = %s\n",
7675796c8dcSSimon Schubert                       gdbarch_bfd_arch_info (gdbarch)->printable_name);
7685796c8dcSSimon Schubert   fprintf_unfiltered (file,
7695796c8dcSSimon Schubert                       "gdbarch_dump: bits_big_endian = %s\n",
7705796c8dcSSimon Schubert                       plongest (gdbarch->bits_big_endian));
7715796c8dcSSimon Schubert   fprintf_unfiltered (file,
7725796c8dcSSimon Schubert                       "gdbarch_dump: breakpoint_from_pc = <%s>\n",
7735796c8dcSSimon Schubert                       host_address_to_string (gdbarch->breakpoint_from_pc));
7745796c8dcSSimon Schubert   fprintf_unfiltered (file,
7755796c8dcSSimon Schubert                       "gdbarch_dump: byte_order = %s\n",
7765796c8dcSSimon Schubert                       plongest (gdbarch->byte_order));
7775796c8dcSSimon Schubert   fprintf_unfiltered (file,
7785796c8dcSSimon Schubert                       "gdbarch_dump: byte_order_for_code = %s\n",
7795796c8dcSSimon Schubert                       plongest (gdbarch->byte_order_for_code));
7805796c8dcSSimon Schubert   fprintf_unfiltered (file,
7815796c8dcSSimon Schubert                       "gdbarch_dump: call_dummy_location = %s\n",
7825796c8dcSSimon Schubert                       plongest (gdbarch->call_dummy_location));
7835796c8dcSSimon Schubert   fprintf_unfiltered (file,
7845796c8dcSSimon Schubert                       "gdbarch_dump: cannot_fetch_register = <%s>\n",
7855796c8dcSSimon Schubert                       host_address_to_string (gdbarch->cannot_fetch_register));
7865796c8dcSSimon Schubert   fprintf_unfiltered (file,
7875796c8dcSSimon Schubert                       "gdbarch_dump: cannot_step_breakpoint = %s\n",
7885796c8dcSSimon Schubert                       plongest (gdbarch->cannot_step_breakpoint));
7895796c8dcSSimon Schubert   fprintf_unfiltered (file,
7905796c8dcSSimon Schubert                       "gdbarch_dump: cannot_store_register = <%s>\n",
7915796c8dcSSimon Schubert                       host_address_to_string (gdbarch->cannot_store_register));
7925796c8dcSSimon Schubert   fprintf_unfiltered (file,
7935796c8dcSSimon Schubert                       "gdbarch_dump: char_signed = %s\n",
7945796c8dcSSimon Schubert                       plongest (gdbarch->char_signed));
7955796c8dcSSimon Schubert   fprintf_unfiltered (file,
7965796c8dcSSimon Schubert                       "gdbarch_dump: coff_make_msymbol_special = <%s>\n",
7975796c8dcSSimon Schubert                       host_address_to_string (gdbarch->coff_make_msymbol_special));
7985796c8dcSSimon Schubert   fprintf_unfiltered (file,
7995796c8dcSSimon Schubert                       "gdbarch_dump: convert_from_func_ptr_addr = <%s>\n",
8005796c8dcSSimon Schubert                       host_address_to_string (gdbarch->convert_from_func_ptr_addr));
8015796c8dcSSimon Schubert   fprintf_unfiltered (file,
8025796c8dcSSimon Schubert                       "gdbarch_dump: convert_register_p = <%s>\n",
8035796c8dcSSimon Schubert                       host_address_to_string (gdbarch->convert_register_p));
8045796c8dcSSimon Schubert   fprintf_unfiltered (file,
8055796c8dcSSimon Schubert                       "gdbarch_dump: gdbarch_core_pid_to_str_p() = %d\n",
8065796c8dcSSimon Schubert                       gdbarch_core_pid_to_str_p (gdbarch));
8075796c8dcSSimon Schubert   fprintf_unfiltered (file,
8085796c8dcSSimon Schubert                       "gdbarch_dump: core_pid_to_str = <%s>\n",
8095796c8dcSSimon Schubert                       host_address_to_string (gdbarch->core_pid_to_str));
8105796c8dcSSimon Schubert   fprintf_unfiltered (file,
8115796c8dcSSimon Schubert                       "gdbarch_dump: gdbarch_core_read_description_p() = %d\n",
8125796c8dcSSimon Schubert                       gdbarch_core_read_description_p (gdbarch));
8135796c8dcSSimon Schubert   fprintf_unfiltered (file,
8145796c8dcSSimon Schubert                       "gdbarch_dump: core_read_description = <%s>\n",
8155796c8dcSSimon Schubert                       host_address_to_string (gdbarch->core_read_description));
8165796c8dcSSimon Schubert   fprintf_unfiltered (file,
8175796c8dcSSimon Schubert                       "gdbarch_dump: core_reg_section_encodes_pid = %s\n",
8185796c8dcSSimon Schubert                       plongest (gdbarch->core_reg_section_encodes_pid));
8195796c8dcSSimon Schubert   fprintf_unfiltered (file,
8205796c8dcSSimon Schubert                       "gdbarch_dump: core_regset_sections = %s\n",
8215796c8dcSSimon Schubert                       host_address_to_string (gdbarch->core_regset_sections));
8225796c8dcSSimon Schubert   fprintf_unfiltered (file,
8235796c8dcSSimon Schubert                       "gdbarch_dump: gdbarch_core_xfer_shared_libraries_p() = %d\n",
8245796c8dcSSimon Schubert                       gdbarch_core_xfer_shared_libraries_p (gdbarch));
8255796c8dcSSimon Schubert   fprintf_unfiltered (file,
8265796c8dcSSimon Schubert                       "gdbarch_dump: core_xfer_shared_libraries = <%s>\n",
8275796c8dcSSimon Schubert                       host_address_to_string (gdbarch->core_xfer_shared_libraries));
8285796c8dcSSimon Schubert   fprintf_unfiltered (file,
8295796c8dcSSimon Schubert                       "gdbarch_dump: decr_pc_after_break = %s\n",
8305796c8dcSSimon Schubert                       core_addr_to_string_nz (gdbarch->decr_pc_after_break));
8315796c8dcSSimon Schubert   fprintf_unfiltered (file,
8325796c8dcSSimon Schubert                       "gdbarch_dump: deprecated_fp_regnum = %s\n",
8335796c8dcSSimon Schubert                       plongest (gdbarch->deprecated_fp_regnum));
8345796c8dcSSimon Schubert   fprintf_unfiltered (file,
8355796c8dcSSimon Schubert                       "gdbarch_dump: deprecated_function_start_offset = %s\n",
8365796c8dcSSimon Schubert                       core_addr_to_string_nz (gdbarch->deprecated_function_start_offset));
8375796c8dcSSimon Schubert   fprintf_unfiltered (file,
8385796c8dcSSimon Schubert                       "gdbarch_dump: gdbarch_displaced_step_copy_insn_p() = %d\n",
8395796c8dcSSimon Schubert                       gdbarch_displaced_step_copy_insn_p (gdbarch));
8405796c8dcSSimon Schubert   fprintf_unfiltered (file,
8415796c8dcSSimon Schubert                       "gdbarch_dump: displaced_step_copy_insn = <%s>\n",
8425796c8dcSSimon Schubert                       host_address_to_string (gdbarch->displaced_step_copy_insn));
8435796c8dcSSimon Schubert   fprintf_unfiltered (file,
8445796c8dcSSimon Schubert                       "gdbarch_dump: gdbarch_displaced_step_fixup_p() = %d\n",
8455796c8dcSSimon Schubert                       gdbarch_displaced_step_fixup_p (gdbarch));
8465796c8dcSSimon Schubert   fprintf_unfiltered (file,
8475796c8dcSSimon Schubert                       "gdbarch_dump: displaced_step_fixup = <%s>\n",
8485796c8dcSSimon Schubert                       host_address_to_string (gdbarch->displaced_step_fixup));
8495796c8dcSSimon Schubert   fprintf_unfiltered (file,
8505796c8dcSSimon Schubert                       "gdbarch_dump: displaced_step_free_closure = <%s>\n",
8515796c8dcSSimon Schubert                       host_address_to_string (gdbarch->displaced_step_free_closure));
8525796c8dcSSimon Schubert   fprintf_unfiltered (file,
8535796c8dcSSimon Schubert                       "gdbarch_dump: displaced_step_hw_singlestep = <%s>\n",
8545796c8dcSSimon Schubert                       host_address_to_string (gdbarch->displaced_step_hw_singlestep));
8555796c8dcSSimon Schubert   fprintf_unfiltered (file,
8565796c8dcSSimon Schubert                       "gdbarch_dump: displaced_step_location = <%s>\n",
8575796c8dcSSimon Schubert                       host_address_to_string (gdbarch->displaced_step_location));
8585796c8dcSSimon Schubert   fprintf_unfiltered (file,
8595796c8dcSSimon Schubert                       "gdbarch_dump: double_bit = %s\n",
8605796c8dcSSimon Schubert                       plongest (gdbarch->double_bit));
8615796c8dcSSimon Schubert   fprintf_unfiltered (file,
8625796c8dcSSimon Schubert                       "gdbarch_dump: double_format = %s\n",
8635796c8dcSSimon Schubert                       pformat (gdbarch->double_format));
8645796c8dcSSimon Schubert   fprintf_unfiltered (file,
8655796c8dcSSimon Schubert                       "gdbarch_dump: gdbarch_dummy_id_p() = %d\n",
8665796c8dcSSimon Schubert                       gdbarch_dummy_id_p (gdbarch));
8675796c8dcSSimon Schubert   fprintf_unfiltered (file,
8685796c8dcSSimon Schubert                       "gdbarch_dump: dummy_id = <%s>\n",
8695796c8dcSSimon Schubert                       host_address_to_string (gdbarch->dummy_id));
8705796c8dcSSimon Schubert   fprintf_unfiltered (file,
8715796c8dcSSimon Schubert                       "gdbarch_dump: dwarf2_reg_to_regnum = <%s>\n",
8725796c8dcSSimon Schubert                       host_address_to_string (gdbarch->dwarf2_reg_to_regnum));
8735796c8dcSSimon Schubert   fprintf_unfiltered (file,
8745796c8dcSSimon Schubert                       "gdbarch_dump: ecoff_reg_to_regnum = <%s>\n",
8755796c8dcSSimon Schubert                       host_address_to_string (gdbarch->ecoff_reg_to_regnum));
8765796c8dcSSimon Schubert   fprintf_unfiltered (file,
8775796c8dcSSimon Schubert                       "gdbarch_dump: elf_make_msymbol_special = <%s>\n",
8785796c8dcSSimon Schubert                       host_address_to_string (gdbarch->elf_make_msymbol_special));
8795796c8dcSSimon Schubert   fprintf_unfiltered (file,
880*cf7f2e2dSJohn Marino                       "gdbarch_dump: fast_tracepoint_valid_at = <%s>\n",
881*cf7f2e2dSJohn Marino                       host_address_to_string (gdbarch->fast_tracepoint_valid_at));
882*cf7f2e2dSJohn Marino   fprintf_unfiltered (file,
8835796c8dcSSimon Schubert                       "gdbarch_dump: gdbarch_fetch_pointer_argument_p() = %d\n",
8845796c8dcSSimon Schubert                       gdbarch_fetch_pointer_argument_p (gdbarch));
8855796c8dcSSimon Schubert   fprintf_unfiltered (file,
8865796c8dcSSimon Schubert                       "gdbarch_dump: fetch_pointer_argument = <%s>\n",
8875796c8dcSSimon Schubert                       host_address_to_string (gdbarch->fetch_pointer_argument));
8885796c8dcSSimon Schubert   fprintf_unfiltered (file,
8895796c8dcSSimon Schubert                       "gdbarch_dump: gdbarch_fetch_tls_load_module_address_p() = %d\n",
8905796c8dcSSimon Schubert                       gdbarch_fetch_tls_load_module_address_p (gdbarch));
8915796c8dcSSimon Schubert   fprintf_unfiltered (file,
8925796c8dcSSimon Schubert                       "gdbarch_dump: fetch_tls_load_module_address = <%s>\n",
8935796c8dcSSimon Schubert                       host_address_to_string (gdbarch->fetch_tls_load_module_address));
8945796c8dcSSimon Schubert   fprintf_unfiltered (file,
8955796c8dcSSimon Schubert                       "gdbarch_dump: float_bit = %s\n",
8965796c8dcSSimon Schubert                       plongest (gdbarch->float_bit));
8975796c8dcSSimon Schubert   fprintf_unfiltered (file,
8985796c8dcSSimon Schubert                       "gdbarch_dump: float_format = %s\n",
8995796c8dcSSimon Schubert                       pformat (gdbarch->float_format));
9005796c8dcSSimon Schubert   fprintf_unfiltered (file,
9015796c8dcSSimon Schubert                       "gdbarch_dump: fp0_regnum = %s\n",
9025796c8dcSSimon Schubert                       plongest (gdbarch->fp0_regnum));
9035796c8dcSSimon Schubert   fprintf_unfiltered (file,
9045796c8dcSSimon Schubert                       "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
9055796c8dcSSimon Schubert                       gdbarch_frame_align_p (gdbarch));
9065796c8dcSSimon Schubert   fprintf_unfiltered (file,
9075796c8dcSSimon Schubert                       "gdbarch_dump: frame_align = <%s>\n",
9085796c8dcSSimon Schubert                       host_address_to_string (gdbarch->frame_align));
9095796c8dcSSimon Schubert   fprintf_unfiltered (file,
9105796c8dcSSimon Schubert                       "gdbarch_dump: frame_args_skip = %s\n",
9115796c8dcSSimon Schubert                       core_addr_to_string_nz (gdbarch->frame_args_skip));
9125796c8dcSSimon Schubert   fprintf_unfiltered (file,
9135796c8dcSSimon Schubert                       "gdbarch_dump: gdbarch_frame_num_args_p() = %d\n",
9145796c8dcSSimon Schubert                       gdbarch_frame_num_args_p (gdbarch));
9155796c8dcSSimon Schubert   fprintf_unfiltered (file,
9165796c8dcSSimon Schubert                       "gdbarch_dump: frame_num_args = <%s>\n",
9175796c8dcSSimon Schubert                       host_address_to_string (gdbarch->frame_num_args));
9185796c8dcSSimon Schubert   fprintf_unfiltered (file,
9195796c8dcSSimon Schubert                       "gdbarch_dump: frame_red_zone_size = %s\n",
9205796c8dcSSimon Schubert                       plongest (gdbarch->frame_red_zone_size));
9215796c8dcSSimon Schubert   fprintf_unfiltered (file,
9225796c8dcSSimon Schubert                       "gdbarch_dump: gdbarch_gcore_bfd_target_p() = %d\n",
9235796c8dcSSimon Schubert                       gdbarch_gcore_bfd_target_p (gdbarch));
9245796c8dcSSimon Schubert   fprintf_unfiltered (file,
9255796c8dcSSimon Schubert                       "gdbarch_dump: gcore_bfd_target = %s\n",
9265796c8dcSSimon Schubert                       gdbarch->gcore_bfd_target);
9275796c8dcSSimon Schubert   fprintf_unfiltered (file,
9285796c8dcSSimon Schubert                       "gdbarch_dump: gdbarch_get_longjmp_target_p() = %d\n",
9295796c8dcSSimon Schubert                       gdbarch_get_longjmp_target_p (gdbarch));
9305796c8dcSSimon Schubert   fprintf_unfiltered (file,
9315796c8dcSSimon Schubert                       "gdbarch_dump: get_longjmp_target = <%s>\n",
9325796c8dcSSimon Schubert                       host_address_to_string (gdbarch->get_longjmp_target));
9335796c8dcSSimon Schubert   fprintf_unfiltered (file,
9345796c8dcSSimon Schubert                       "gdbarch_dump: gdbarch_get_siginfo_type_p() = %d\n",
9355796c8dcSSimon Schubert                       gdbarch_get_siginfo_type_p (gdbarch));
9365796c8dcSSimon Schubert   fprintf_unfiltered (file,
9375796c8dcSSimon Schubert                       "gdbarch_dump: get_siginfo_type = <%s>\n",
9385796c8dcSSimon Schubert                       host_address_to_string (gdbarch->get_siginfo_type));
9395796c8dcSSimon Schubert   fprintf_unfiltered (file,
9405796c8dcSSimon Schubert                       "gdbarch_dump: gdbarch_get_syscall_number_p() = %d\n",
9415796c8dcSSimon Schubert                       gdbarch_get_syscall_number_p (gdbarch));
9425796c8dcSSimon Schubert   fprintf_unfiltered (file,
9435796c8dcSSimon Schubert                       "gdbarch_dump: get_syscall_number = <%s>\n",
9445796c8dcSSimon Schubert                       host_address_to_string (gdbarch->get_syscall_number));
9455796c8dcSSimon Schubert   fprintf_unfiltered (file,
946*cf7f2e2dSJohn Marino                       "gdbarch_dump: half_bit = %s\n",
947*cf7f2e2dSJohn Marino                       plongest (gdbarch->half_bit));
948*cf7f2e2dSJohn Marino   fprintf_unfiltered (file,
949*cf7f2e2dSJohn Marino                       "gdbarch_dump: half_format = %s\n",
950*cf7f2e2dSJohn Marino                       pformat (gdbarch->half_format));
951*cf7f2e2dSJohn Marino   fprintf_unfiltered (file,
952*cf7f2e2dSJohn Marino                       "gdbarch_dump: has_dos_based_file_system = %s\n",
953*cf7f2e2dSJohn Marino                       plongest (gdbarch->has_dos_based_file_system));
954*cf7f2e2dSJohn Marino   fprintf_unfiltered (file,
9555796c8dcSSimon Schubert                       "gdbarch_dump: has_global_breakpoints = %s\n",
9565796c8dcSSimon Schubert                       plongest (gdbarch->has_global_breakpoints));
9575796c8dcSSimon Schubert   fprintf_unfiltered (file,
9585796c8dcSSimon Schubert                       "gdbarch_dump: has_global_solist = %s\n",
9595796c8dcSSimon Schubert                       plongest (gdbarch->has_global_solist));
9605796c8dcSSimon Schubert   fprintf_unfiltered (file,
961*cf7f2e2dSJohn Marino                       "gdbarch_dump: has_shared_address_space = <%s>\n",
962*cf7f2e2dSJohn Marino                       host_address_to_string (gdbarch->has_shared_address_space));
963*cf7f2e2dSJohn Marino   fprintf_unfiltered (file,
9645796c8dcSSimon Schubert                       "gdbarch_dump: have_nonsteppable_watchpoint = %s\n",
9655796c8dcSSimon Schubert                       plongest (gdbarch->have_nonsteppable_watchpoint));
9665796c8dcSSimon Schubert   fprintf_unfiltered (file,
9675796c8dcSSimon Schubert                       "gdbarch_dump: in_function_epilogue_p = <%s>\n",
9685796c8dcSSimon Schubert                       host_address_to_string (gdbarch->in_function_epilogue_p));
9695796c8dcSSimon Schubert   fprintf_unfiltered (file,
9705796c8dcSSimon Schubert                       "gdbarch_dump: in_solib_return_trampoline = <%s>\n",
9715796c8dcSSimon Schubert                       host_address_to_string (gdbarch->in_solib_return_trampoline));
9725796c8dcSSimon Schubert   fprintf_unfiltered (file,
9735796c8dcSSimon Schubert                       "gdbarch_dump: inner_than = <%s>\n",
9745796c8dcSSimon Schubert                       host_address_to_string (gdbarch->inner_than));
9755796c8dcSSimon Schubert   fprintf_unfiltered (file,
9765796c8dcSSimon Schubert                       "gdbarch_dump: int_bit = %s\n",
9775796c8dcSSimon Schubert                       plongest (gdbarch->int_bit));
9785796c8dcSSimon Schubert   fprintf_unfiltered (file,
9795796c8dcSSimon Schubert                       "gdbarch_dump: gdbarch_integer_to_address_p() = %d\n",
9805796c8dcSSimon Schubert                       gdbarch_integer_to_address_p (gdbarch));
9815796c8dcSSimon Schubert   fprintf_unfiltered (file,
9825796c8dcSSimon Schubert                       "gdbarch_dump: integer_to_address = <%s>\n",
9835796c8dcSSimon Schubert                       host_address_to_string (gdbarch->integer_to_address));
9845796c8dcSSimon Schubert   fprintf_unfiltered (file,
9855796c8dcSSimon Schubert                       "gdbarch_dump: long_bit = %s\n",
9865796c8dcSSimon Schubert                       plongest (gdbarch->long_bit));
9875796c8dcSSimon Schubert   fprintf_unfiltered (file,
9885796c8dcSSimon Schubert                       "gdbarch_dump: long_double_bit = %s\n",
9895796c8dcSSimon Schubert                       plongest (gdbarch->long_double_bit));
9905796c8dcSSimon Schubert   fprintf_unfiltered (file,
9915796c8dcSSimon Schubert                       "gdbarch_dump: long_double_format = %s\n",
9925796c8dcSSimon Schubert                       pformat (gdbarch->long_double_format));
9935796c8dcSSimon Schubert   fprintf_unfiltered (file,
9945796c8dcSSimon Schubert                       "gdbarch_dump: long_long_bit = %s\n",
9955796c8dcSSimon Schubert                       plongest (gdbarch->long_long_bit));
9965796c8dcSSimon Schubert   fprintf_unfiltered (file,
9975796c8dcSSimon Schubert                       "gdbarch_dump: gdbarch_max_insn_length_p() = %d\n",
9985796c8dcSSimon Schubert                       gdbarch_max_insn_length_p (gdbarch));
9995796c8dcSSimon Schubert   fprintf_unfiltered (file,
10005796c8dcSSimon Schubert                       "gdbarch_dump: max_insn_length = %s\n",
10015796c8dcSSimon Schubert                       plongest (gdbarch->max_insn_length));
10025796c8dcSSimon Schubert   fprintf_unfiltered (file,
10035796c8dcSSimon Schubert                       "gdbarch_dump: memory_insert_breakpoint = <%s>\n",
10045796c8dcSSimon Schubert                       host_address_to_string (gdbarch->memory_insert_breakpoint));
10055796c8dcSSimon Schubert   fprintf_unfiltered (file,
10065796c8dcSSimon Schubert                       "gdbarch_dump: memory_remove_breakpoint = <%s>\n",
10075796c8dcSSimon Schubert                       host_address_to_string (gdbarch->memory_remove_breakpoint));
10085796c8dcSSimon Schubert   fprintf_unfiltered (file,
10095796c8dcSSimon Schubert                       "gdbarch_dump: num_pseudo_regs = %s\n",
10105796c8dcSSimon Schubert                       plongest (gdbarch->num_pseudo_regs));
10115796c8dcSSimon Schubert   fprintf_unfiltered (file,
10125796c8dcSSimon Schubert                       "gdbarch_dump: num_regs = %s\n",
10135796c8dcSSimon Schubert                       plongest (gdbarch->num_regs));
10145796c8dcSSimon Schubert   fprintf_unfiltered (file,
10155796c8dcSSimon Schubert                       "gdbarch_dump: osabi = %s\n",
10165796c8dcSSimon Schubert                       plongest (gdbarch->osabi));
10175796c8dcSSimon Schubert   fprintf_unfiltered (file,
10185796c8dcSSimon Schubert                       "gdbarch_dump: gdbarch_overlay_update_p() = %d\n",
10195796c8dcSSimon Schubert                       gdbarch_overlay_update_p (gdbarch));
10205796c8dcSSimon Schubert   fprintf_unfiltered (file,
10215796c8dcSSimon Schubert                       "gdbarch_dump: overlay_update = <%s>\n",
10225796c8dcSSimon Schubert                       host_address_to_string (gdbarch->overlay_update));
10235796c8dcSSimon Schubert   fprintf_unfiltered (file,
10245796c8dcSSimon Schubert                       "gdbarch_dump: pc_regnum = %s\n",
10255796c8dcSSimon Schubert                       plongest (gdbarch->pc_regnum));
10265796c8dcSSimon Schubert   fprintf_unfiltered (file,
10275796c8dcSSimon Schubert                       "gdbarch_dump: pointer_to_address = <%s>\n",
10285796c8dcSSimon Schubert                       host_address_to_string (gdbarch->pointer_to_address));
10295796c8dcSSimon Schubert   fprintf_unfiltered (file,
10305796c8dcSSimon Schubert                       "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
10315796c8dcSSimon Schubert                       gdbarch_print_float_info_p (gdbarch));
10325796c8dcSSimon Schubert   fprintf_unfiltered (file,
10335796c8dcSSimon Schubert                       "gdbarch_dump: print_float_info = <%s>\n",
10345796c8dcSSimon Schubert                       host_address_to_string (gdbarch->print_float_info));
10355796c8dcSSimon Schubert   fprintf_unfiltered (file,
10365796c8dcSSimon Schubert                       "gdbarch_dump: print_insn = <%s>\n",
10375796c8dcSSimon Schubert                       host_address_to_string (gdbarch->print_insn));
10385796c8dcSSimon Schubert   fprintf_unfiltered (file,
10395796c8dcSSimon Schubert                       "gdbarch_dump: print_registers_info = <%s>\n",
10405796c8dcSSimon Schubert                       host_address_to_string (gdbarch->print_registers_info));
10415796c8dcSSimon Schubert   fprintf_unfiltered (file,
10425796c8dcSSimon Schubert                       "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
10435796c8dcSSimon Schubert                       gdbarch_print_vector_info_p (gdbarch));
10445796c8dcSSimon Schubert   fprintf_unfiltered (file,
10455796c8dcSSimon Schubert                       "gdbarch_dump: print_vector_info = <%s>\n",
10465796c8dcSSimon Schubert                       host_address_to_string (gdbarch->print_vector_info));
10475796c8dcSSimon Schubert   fprintf_unfiltered (file,
10485796c8dcSSimon Schubert                       "gdbarch_dump: gdbarch_process_record_p() = %d\n",
10495796c8dcSSimon Schubert                       gdbarch_process_record_p (gdbarch));
10505796c8dcSSimon Schubert   fprintf_unfiltered (file,
10515796c8dcSSimon Schubert                       "gdbarch_dump: process_record = <%s>\n",
10525796c8dcSSimon Schubert                       host_address_to_string (gdbarch->process_record));
10535796c8dcSSimon Schubert   fprintf_unfiltered (file,
10545796c8dcSSimon Schubert                       "gdbarch_dump: gdbarch_process_record_signal_p() = %d\n",
10555796c8dcSSimon Schubert                       gdbarch_process_record_signal_p (gdbarch));
10565796c8dcSSimon Schubert   fprintf_unfiltered (file,
10575796c8dcSSimon Schubert                       "gdbarch_dump: process_record_signal = <%s>\n",
10585796c8dcSSimon Schubert                       host_address_to_string (gdbarch->process_record_signal));
10595796c8dcSSimon Schubert   fprintf_unfiltered (file,
10605796c8dcSSimon Schubert                       "gdbarch_dump: ps_regnum = %s\n",
10615796c8dcSSimon Schubert                       plongest (gdbarch->ps_regnum));
10625796c8dcSSimon Schubert   fprintf_unfiltered (file,
10635796c8dcSSimon Schubert                       "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
10645796c8dcSSimon Schubert                       gdbarch_pseudo_register_read_p (gdbarch));
10655796c8dcSSimon Schubert   fprintf_unfiltered (file,
10665796c8dcSSimon Schubert                       "gdbarch_dump: pseudo_register_read = <%s>\n",
10675796c8dcSSimon Schubert                       host_address_to_string (gdbarch->pseudo_register_read));
10685796c8dcSSimon Schubert   fprintf_unfiltered (file,
10695796c8dcSSimon Schubert                       "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
10705796c8dcSSimon Schubert                       gdbarch_pseudo_register_write_p (gdbarch));
10715796c8dcSSimon Schubert   fprintf_unfiltered (file,
10725796c8dcSSimon Schubert                       "gdbarch_dump: pseudo_register_write = <%s>\n",
10735796c8dcSSimon Schubert                       host_address_to_string (gdbarch->pseudo_register_write));
10745796c8dcSSimon Schubert   fprintf_unfiltered (file,
10755796c8dcSSimon Schubert                       "gdbarch_dump: ptr_bit = %s\n",
10765796c8dcSSimon Schubert                       plongest (gdbarch->ptr_bit));
10775796c8dcSSimon Schubert   fprintf_unfiltered (file,
10785796c8dcSSimon Schubert                       "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
10795796c8dcSSimon Schubert                       gdbarch_push_dummy_call_p (gdbarch));
10805796c8dcSSimon Schubert   fprintf_unfiltered (file,
10815796c8dcSSimon Schubert                       "gdbarch_dump: push_dummy_call = <%s>\n",
10825796c8dcSSimon Schubert                       host_address_to_string (gdbarch->push_dummy_call));
10835796c8dcSSimon Schubert   fprintf_unfiltered (file,
10845796c8dcSSimon Schubert                       "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
10855796c8dcSSimon Schubert                       gdbarch_push_dummy_code_p (gdbarch));
10865796c8dcSSimon Schubert   fprintf_unfiltered (file,
10875796c8dcSSimon Schubert                       "gdbarch_dump: push_dummy_code = <%s>\n",
10885796c8dcSSimon Schubert                       host_address_to_string (gdbarch->push_dummy_code));
10895796c8dcSSimon Schubert   fprintf_unfiltered (file,
10905796c8dcSSimon Schubert                       "gdbarch_dump: gdbarch_read_pc_p() = %d\n",
10915796c8dcSSimon Schubert                       gdbarch_read_pc_p (gdbarch));
10925796c8dcSSimon Schubert   fprintf_unfiltered (file,
10935796c8dcSSimon Schubert                       "gdbarch_dump: read_pc = <%s>\n",
10945796c8dcSSimon Schubert                       host_address_to_string (gdbarch->read_pc));
10955796c8dcSSimon Schubert   fprintf_unfiltered (file,
10965796c8dcSSimon Schubert                       "gdbarch_dump: gdbarch_record_special_symbol_p() = %d\n",
10975796c8dcSSimon Schubert                       gdbarch_record_special_symbol_p (gdbarch));
10985796c8dcSSimon Schubert   fprintf_unfiltered (file,
10995796c8dcSSimon Schubert                       "gdbarch_dump: record_special_symbol = <%s>\n",
11005796c8dcSSimon Schubert                       host_address_to_string (gdbarch->record_special_symbol));
11015796c8dcSSimon Schubert   fprintf_unfiltered (file,
11025796c8dcSSimon Schubert                       "gdbarch_dump: register_name = <%s>\n",
11035796c8dcSSimon Schubert                       host_address_to_string (gdbarch->register_name));
11045796c8dcSSimon Schubert   fprintf_unfiltered (file,
11055796c8dcSSimon Schubert                       "gdbarch_dump: register_reggroup_p = <%s>\n",
11065796c8dcSSimon Schubert                       host_address_to_string (gdbarch->register_reggroup_p));
11075796c8dcSSimon Schubert   fprintf_unfiltered (file,
11085796c8dcSSimon Schubert                       "gdbarch_dump: register_sim_regno = <%s>\n",
11095796c8dcSSimon Schubert                       host_address_to_string (gdbarch->register_sim_regno));
11105796c8dcSSimon Schubert   fprintf_unfiltered (file,
11115796c8dcSSimon Schubert                       "gdbarch_dump: register_to_value = <%s>\n",
11125796c8dcSSimon Schubert                       host_address_to_string (gdbarch->register_to_value));
11135796c8dcSSimon Schubert   fprintf_unfiltered (file,
11145796c8dcSSimon Schubert                       "gdbarch_dump: gdbarch_register_type_p() = %d\n",
11155796c8dcSSimon Schubert                       gdbarch_register_type_p (gdbarch));
11165796c8dcSSimon Schubert   fprintf_unfiltered (file,
11175796c8dcSSimon Schubert                       "gdbarch_dump: register_type = <%s>\n",
11185796c8dcSSimon Schubert                       host_address_to_string (gdbarch->register_type));
11195796c8dcSSimon Schubert   fprintf_unfiltered (file,
11205796c8dcSSimon Schubert                       "gdbarch_dump: gdbarch_regset_from_core_section_p() = %d\n",
11215796c8dcSSimon Schubert                       gdbarch_regset_from_core_section_p (gdbarch));
11225796c8dcSSimon Schubert   fprintf_unfiltered (file,
11235796c8dcSSimon Schubert                       "gdbarch_dump: regset_from_core_section = <%s>\n",
11245796c8dcSSimon Schubert                       host_address_to_string (gdbarch->regset_from_core_section));
11255796c8dcSSimon Schubert   fprintf_unfiltered (file,
1126*cf7f2e2dSJohn Marino                       "gdbarch_dump: gdbarch_relocate_instruction_p() = %d\n",
1127*cf7f2e2dSJohn Marino                       gdbarch_relocate_instruction_p (gdbarch));
1128*cf7f2e2dSJohn Marino   fprintf_unfiltered (file,
1129*cf7f2e2dSJohn Marino                       "gdbarch_dump: relocate_instruction = <%s>\n",
1130*cf7f2e2dSJohn Marino                       host_address_to_string (gdbarch->relocate_instruction));
1131*cf7f2e2dSJohn Marino   fprintf_unfiltered (file,
1132*cf7f2e2dSJohn Marino                       "gdbarch_dump: remote_breakpoint_from_pc = <%s>\n",
1133*cf7f2e2dSJohn Marino                       host_address_to_string (gdbarch->remote_breakpoint_from_pc));
1134*cf7f2e2dSJohn Marino   fprintf_unfiltered (file,
11355796c8dcSSimon Schubert                       "gdbarch_dump: remote_register_number = <%s>\n",
11365796c8dcSSimon Schubert                       host_address_to_string (gdbarch->remote_register_number));
11375796c8dcSSimon Schubert   fprintf_unfiltered (file,
11385796c8dcSSimon Schubert                       "gdbarch_dump: gdbarch_return_value_p() = %d\n",
11395796c8dcSSimon Schubert                       gdbarch_return_value_p (gdbarch));
11405796c8dcSSimon Schubert   fprintf_unfiltered (file,
11415796c8dcSSimon Schubert                       "gdbarch_dump: return_value = <%s>\n",
11425796c8dcSSimon Schubert                       host_address_to_string (gdbarch->return_value));
11435796c8dcSSimon Schubert   fprintf_unfiltered (file,
11445796c8dcSSimon Schubert                       "gdbarch_dump: sdb_reg_to_regnum = <%s>\n",
11455796c8dcSSimon Schubert                       host_address_to_string (gdbarch->sdb_reg_to_regnum));
11465796c8dcSSimon Schubert   fprintf_unfiltered (file,
11475796c8dcSSimon Schubert                       "gdbarch_dump: short_bit = %s\n",
11485796c8dcSSimon Schubert                       plongest (gdbarch->short_bit));
11495796c8dcSSimon Schubert   fprintf_unfiltered (file,
11505796c8dcSSimon Schubert                       "gdbarch_dump: gdbarch_single_step_through_delay_p() = %d\n",
11515796c8dcSSimon Schubert                       gdbarch_single_step_through_delay_p (gdbarch));
11525796c8dcSSimon Schubert   fprintf_unfiltered (file,
11535796c8dcSSimon Schubert                       "gdbarch_dump: single_step_through_delay = <%s>\n",
11545796c8dcSSimon Schubert                       host_address_to_string (gdbarch->single_step_through_delay));
11555796c8dcSSimon Schubert   fprintf_unfiltered (file,
11565796c8dcSSimon Schubert                       "gdbarch_dump: gdbarch_skip_main_prologue_p() = %d\n",
11575796c8dcSSimon Schubert                       gdbarch_skip_main_prologue_p (gdbarch));
11585796c8dcSSimon Schubert   fprintf_unfiltered (file,
11595796c8dcSSimon Schubert                       "gdbarch_dump: skip_main_prologue = <%s>\n",
11605796c8dcSSimon Schubert                       host_address_to_string (gdbarch->skip_main_prologue));
11615796c8dcSSimon Schubert   fprintf_unfiltered (file,
11625796c8dcSSimon Schubert                       "gdbarch_dump: gdbarch_skip_permanent_breakpoint_p() = %d\n",
11635796c8dcSSimon Schubert                       gdbarch_skip_permanent_breakpoint_p (gdbarch));
11645796c8dcSSimon Schubert   fprintf_unfiltered (file,
11655796c8dcSSimon Schubert                       "gdbarch_dump: skip_permanent_breakpoint = <%s>\n",
11665796c8dcSSimon Schubert                       host_address_to_string (gdbarch->skip_permanent_breakpoint));
11675796c8dcSSimon Schubert   fprintf_unfiltered (file,
11685796c8dcSSimon Schubert                       "gdbarch_dump: skip_prologue = <%s>\n",
11695796c8dcSSimon Schubert                       host_address_to_string (gdbarch->skip_prologue));
11705796c8dcSSimon Schubert   fprintf_unfiltered (file,
11715796c8dcSSimon Schubert                       "gdbarch_dump: skip_solib_resolver = <%s>\n",
11725796c8dcSSimon Schubert                       host_address_to_string (gdbarch->skip_solib_resolver));
11735796c8dcSSimon Schubert   fprintf_unfiltered (file,
11745796c8dcSSimon Schubert                       "gdbarch_dump: skip_trampoline_code = <%s>\n",
11755796c8dcSSimon Schubert                       host_address_to_string (gdbarch->skip_trampoline_code));
11765796c8dcSSimon Schubert   fprintf_unfiltered (file,
11775796c8dcSSimon Schubert                       "gdbarch_dump: smash_text_address = <%s>\n",
11785796c8dcSSimon Schubert                       host_address_to_string (gdbarch->smash_text_address));
11795796c8dcSSimon Schubert   fprintf_unfiltered (file,
11805796c8dcSSimon Schubert                       "gdbarch_dump: gdbarch_software_single_step_p() = %d\n",
11815796c8dcSSimon Schubert                       gdbarch_software_single_step_p (gdbarch));
11825796c8dcSSimon Schubert   fprintf_unfiltered (file,
11835796c8dcSSimon Schubert                       "gdbarch_dump: software_single_step = <%s>\n",
11845796c8dcSSimon Schubert                       host_address_to_string (gdbarch->software_single_step));
11855796c8dcSSimon Schubert   fprintf_unfiltered (file,
11865796c8dcSSimon Schubert                       "gdbarch_dump: sofun_address_maybe_missing = %s\n",
11875796c8dcSSimon Schubert                       plongest (gdbarch->sofun_address_maybe_missing));
11885796c8dcSSimon Schubert   fprintf_unfiltered (file,
1189*cf7f2e2dSJohn Marino                       "gdbarch_dump: solib_symbols_extension = %s\n",
1190*cf7f2e2dSJohn Marino                       pstring (gdbarch->solib_symbols_extension));
1191*cf7f2e2dSJohn Marino   fprintf_unfiltered (file,
11925796c8dcSSimon Schubert                       "gdbarch_dump: sp_regnum = %s\n",
11935796c8dcSSimon Schubert                       plongest (gdbarch->sp_regnum));
11945796c8dcSSimon Schubert   fprintf_unfiltered (file,
11955796c8dcSSimon Schubert                       "gdbarch_dump: stab_reg_to_regnum = <%s>\n",
11965796c8dcSSimon Schubert                       host_address_to_string (gdbarch->stab_reg_to_regnum));
11975796c8dcSSimon Schubert   fprintf_unfiltered (file,
11985796c8dcSSimon Schubert                       "gdbarch_dump: stabs_argument_has_addr = <%s>\n",
11995796c8dcSSimon Schubert                       host_address_to_string (gdbarch->stabs_argument_has_addr));
12005796c8dcSSimon Schubert   fprintf_unfiltered (file,
12015796c8dcSSimon Schubert                       "gdbarch_dump: gdbarch_static_transform_name_p() = %d\n",
12025796c8dcSSimon Schubert                       gdbarch_static_transform_name_p (gdbarch));
12035796c8dcSSimon Schubert   fprintf_unfiltered (file,
12045796c8dcSSimon Schubert                       "gdbarch_dump: static_transform_name = <%s>\n",
12055796c8dcSSimon Schubert                       host_address_to_string (gdbarch->static_transform_name));
12065796c8dcSSimon Schubert   fprintf_unfiltered (file,
12075796c8dcSSimon Schubert                       "gdbarch_dump: target_desc = %s\n",
12085796c8dcSSimon Schubert                       host_address_to_string (gdbarch->target_desc));
12095796c8dcSSimon Schubert   fprintf_unfiltered (file,
12105796c8dcSSimon Schubert                       "gdbarch_dump: target_signal_from_host = <%s>\n",
12115796c8dcSSimon Schubert                       host_address_to_string (gdbarch->target_signal_from_host));
12125796c8dcSSimon Schubert   fprintf_unfiltered (file,
12135796c8dcSSimon Schubert                       "gdbarch_dump: target_signal_to_host = <%s>\n",
12145796c8dcSSimon Schubert                       host_address_to_string (gdbarch->target_signal_to_host));
12155796c8dcSSimon Schubert   fprintf_unfiltered (file,
12165796c8dcSSimon Schubert                       "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
12175796c8dcSSimon Schubert                       gdbarch_unwind_pc_p (gdbarch));
12185796c8dcSSimon Schubert   fprintf_unfiltered (file,
12195796c8dcSSimon Schubert                       "gdbarch_dump: unwind_pc = <%s>\n",
12205796c8dcSSimon Schubert                       host_address_to_string (gdbarch->unwind_pc));
12215796c8dcSSimon Schubert   fprintf_unfiltered (file,
12225796c8dcSSimon Schubert                       "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
12235796c8dcSSimon Schubert                       gdbarch_unwind_sp_p (gdbarch));
12245796c8dcSSimon Schubert   fprintf_unfiltered (file,
12255796c8dcSSimon Schubert                       "gdbarch_dump: unwind_sp = <%s>\n",
12265796c8dcSSimon Schubert                       host_address_to_string (gdbarch->unwind_sp));
12275796c8dcSSimon Schubert   fprintf_unfiltered (file,
12285796c8dcSSimon Schubert                       "gdbarch_dump: value_from_register = <%s>\n",
12295796c8dcSSimon Schubert                       host_address_to_string (gdbarch->value_from_register));
12305796c8dcSSimon Schubert   fprintf_unfiltered (file,
12315796c8dcSSimon Schubert                       "gdbarch_dump: value_to_register = <%s>\n",
12325796c8dcSSimon Schubert                       host_address_to_string (gdbarch->value_to_register));
12335796c8dcSSimon Schubert   fprintf_unfiltered (file,
12345796c8dcSSimon Schubert                       "gdbarch_dump: vbit_in_delta = %s\n",
12355796c8dcSSimon Schubert                       plongest (gdbarch->vbit_in_delta));
12365796c8dcSSimon Schubert   fprintf_unfiltered (file,
12375796c8dcSSimon Schubert                       "gdbarch_dump: virtual_frame_pointer = <%s>\n",
12385796c8dcSSimon Schubert                       host_address_to_string (gdbarch->virtual_frame_pointer));
12395796c8dcSSimon Schubert   fprintf_unfiltered (file,
12405796c8dcSSimon Schubert                       "gdbarch_dump: vtable_function_descriptors = %s\n",
12415796c8dcSSimon Schubert                       plongest (gdbarch->vtable_function_descriptors));
12425796c8dcSSimon Schubert   fprintf_unfiltered (file,
12435796c8dcSSimon Schubert                       "gdbarch_dump: gdbarch_write_pc_p() = %d\n",
12445796c8dcSSimon Schubert                       gdbarch_write_pc_p (gdbarch));
12455796c8dcSSimon Schubert   fprintf_unfiltered (file,
12465796c8dcSSimon Schubert                       "gdbarch_dump: write_pc = <%s>\n",
12475796c8dcSSimon Schubert                       host_address_to_string (gdbarch->write_pc));
12485796c8dcSSimon Schubert   if (gdbarch->dump_tdep != NULL)
12495796c8dcSSimon Schubert     gdbarch->dump_tdep (gdbarch, file);
12505796c8dcSSimon Schubert }
12515796c8dcSSimon Schubert 
12525796c8dcSSimon Schubert struct gdbarch_tdep *
12535796c8dcSSimon Schubert gdbarch_tdep (struct gdbarch *gdbarch)
12545796c8dcSSimon Schubert {
12555796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
12565796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
12575796c8dcSSimon Schubert   return gdbarch->tdep;
12585796c8dcSSimon Schubert }
12595796c8dcSSimon Schubert 
12605796c8dcSSimon Schubert 
12615796c8dcSSimon Schubert const struct bfd_arch_info *
12625796c8dcSSimon Schubert gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
12635796c8dcSSimon Schubert {
12645796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
12655796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
12665796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
12675796c8dcSSimon Schubert   return gdbarch->bfd_arch_info;
12685796c8dcSSimon Schubert }
12695796c8dcSSimon Schubert 
12705796c8dcSSimon Schubert int
12715796c8dcSSimon Schubert gdbarch_byte_order (struct gdbarch *gdbarch)
12725796c8dcSSimon Schubert {
12735796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
12745796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
12755796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
12765796c8dcSSimon Schubert   return gdbarch->byte_order;
12775796c8dcSSimon Schubert }
12785796c8dcSSimon Schubert 
12795796c8dcSSimon Schubert int
12805796c8dcSSimon Schubert gdbarch_byte_order_for_code (struct gdbarch *gdbarch)
12815796c8dcSSimon Schubert {
12825796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
12835796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
12845796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order_for_code called\n");
12855796c8dcSSimon Schubert   return gdbarch->byte_order_for_code;
12865796c8dcSSimon Schubert }
12875796c8dcSSimon Schubert 
12885796c8dcSSimon Schubert enum gdb_osabi
12895796c8dcSSimon Schubert gdbarch_osabi (struct gdbarch *gdbarch)
12905796c8dcSSimon Schubert {
12915796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
12925796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
12935796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n");
12945796c8dcSSimon Schubert   return gdbarch->osabi;
12955796c8dcSSimon Schubert }
12965796c8dcSSimon Schubert 
12975796c8dcSSimon Schubert const struct target_desc *
12985796c8dcSSimon Schubert gdbarch_target_desc (struct gdbarch *gdbarch)
12995796c8dcSSimon Schubert {
13005796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
13015796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
13025796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_target_desc called\n");
13035796c8dcSSimon Schubert   return gdbarch->target_desc;
13045796c8dcSSimon Schubert }
13055796c8dcSSimon Schubert 
13065796c8dcSSimon Schubert int
13075796c8dcSSimon Schubert gdbarch_bits_big_endian (struct gdbarch *gdbarch)
13085796c8dcSSimon Schubert {
13095796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
13105796c8dcSSimon Schubert   /* Skip verify of bits_big_endian, invalid_p == 0 */
13115796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
13125796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_bits_big_endian called\n");
13135796c8dcSSimon Schubert   return gdbarch->bits_big_endian;
13145796c8dcSSimon Schubert }
13155796c8dcSSimon Schubert 
13165796c8dcSSimon Schubert void
13175796c8dcSSimon Schubert set_gdbarch_bits_big_endian (struct gdbarch *gdbarch,
13185796c8dcSSimon Schubert                              int bits_big_endian)
13195796c8dcSSimon Schubert {
13205796c8dcSSimon Schubert   gdbarch->bits_big_endian = bits_big_endian;
13215796c8dcSSimon Schubert }
13225796c8dcSSimon Schubert 
13235796c8dcSSimon Schubert int
13245796c8dcSSimon Schubert gdbarch_short_bit (struct gdbarch *gdbarch)
13255796c8dcSSimon Schubert {
13265796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
13275796c8dcSSimon Schubert   /* Skip verify of short_bit, invalid_p == 0 */
13285796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
13295796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
13305796c8dcSSimon Schubert   return gdbarch->short_bit;
13315796c8dcSSimon Schubert }
13325796c8dcSSimon Schubert 
13335796c8dcSSimon Schubert void
13345796c8dcSSimon Schubert set_gdbarch_short_bit (struct gdbarch *gdbarch,
13355796c8dcSSimon Schubert                        int short_bit)
13365796c8dcSSimon Schubert {
13375796c8dcSSimon Schubert   gdbarch->short_bit = short_bit;
13385796c8dcSSimon Schubert }
13395796c8dcSSimon Schubert 
13405796c8dcSSimon Schubert int
13415796c8dcSSimon Schubert gdbarch_int_bit (struct gdbarch *gdbarch)
13425796c8dcSSimon Schubert {
13435796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
13445796c8dcSSimon Schubert   /* Skip verify of int_bit, invalid_p == 0 */
13455796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
13465796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
13475796c8dcSSimon Schubert   return gdbarch->int_bit;
13485796c8dcSSimon Schubert }
13495796c8dcSSimon Schubert 
13505796c8dcSSimon Schubert void
13515796c8dcSSimon Schubert set_gdbarch_int_bit (struct gdbarch *gdbarch,
13525796c8dcSSimon Schubert                      int int_bit)
13535796c8dcSSimon Schubert {
13545796c8dcSSimon Schubert   gdbarch->int_bit = int_bit;
13555796c8dcSSimon Schubert }
13565796c8dcSSimon Schubert 
13575796c8dcSSimon Schubert int
13585796c8dcSSimon Schubert gdbarch_long_bit (struct gdbarch *gdbarch)
13595796c8dcSSimon Schubert {
13605796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
13615796c8dcSSimon Schubert   /* Skip verify of long_bit, invalid_p == 0 */
13625796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
13635796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
13645796c8dcSSimon Schubert   return gdbarch->long_bit;
13655796c8dcSSimon Schubert }
13665796c8dcSSimon Schubert 
13675796c8dcSSimon Schubert void
13685796c8dcSSimon Schubert set_gdbarch_long_bit (struct gdbarch *gdbarch,
13695796c8dcSSimon Schubert                       int long_bit)
13705796c8dcSSimon Schubert {
13715796c8dcSSimon Schubert   gdbarch->long_bit = long_bit;
13725796c8dcSSimon Schubert }
13735796c8dcSSimon Schubert 
13745796c8dcSSimon Schubert int
13755796c8dcSSimon Schubert gdbarch_long_long_bit (struct gdbarch *gdbarch)
13765796c8dcSSimon Schubert {
13775796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
13785796c8dcSSimon Schubert   /* Skip verify of long_long_bit, invalid_p == 0 */
13795796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
13805796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
13815796c8dcSSimon Schubert   return gdbarch->long_long_bit;
13825796c8dcSSimon Schubert }
13835796c8dcSSimon Schubert 
13845796c8dcSSimon Schubert void
13855796c8dcSSimon Schubert set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
13865796c8dcSSimon Schubert                            int long_long_bit)
13875796c8dcSSimon Schubert {
13885796c8dcSSimon Schubert   gdbarch->long_long_bit = long_long_bit;
13895796c8dcSSimon Schubert }
13905796c8dcSSimon Schubert 
13915796c8dcSSimon Schubert int
1392*cf7f2e2dSJohn Marino gdbarch_half_bit (struct gdbarch *gdbarch)
1393*cf7f2e2dSJohn Marino {
1394*cf7f2e2dSJohn Marino   gdb_assert (gdbarch != NULL);
1395*cf7f2e2dSJohn Marino   /* Skip verify of half_bit, invalid_p == 0 */
1396*cf7f2e2dSJohn Marino   if (gdbarch_debug >= 2)
1397*cf7f2e2dSJohn Marino     fprintf_unfiltered (gdb_stdlog, "gdbarch_half_bit called\n");
1398*cf7f2e2dSJohn Marino   return gdbarch->half_bit;
1399*cf7f2e2dSJohn Marino }
1400*cf7f2e2dSJohn Marino 
1401*cf7f2e2dSJohn Marino void
1402*cf7f2e2dSJohn Marino set_gdbarch_half_bit (struct gdbarch *gdbarch,
1403*cf7f2e2dSJohn Marino                       int half_bit)
1404*cf7f2e2dSJohn Marino {
1405*cf7f2e2dSJohn Marino   gdbarch->half_bit = half_bit;
1406*cf7f2e2dSJohn Marino }
1407*cf7f2e2dSJohn Marino 
1408*cf7f2e2dSJohn Marino const struct floatformat **
1409*cf7f2e2dSJohn Marino gdbarch_half_format (struct gdbarch *gdbarch)
1410*cf7f2e2dSJohn Marino {
1411*cf7f2e2dSJohn Marino   gdb_assert (gdbarch != NULL);
1412*cf7f2e2dSJohn Marino   if (gdbarch_debug >= 2)
1413*cf7f2e2dSJohn Marino     fprintf_unfiltered (gdb_stdlog, "gdbarch_half_format called\n");
1414*cf7f2e2dSJohn Marino   return gdbarch->half_format;
1415*cf7f2e2dSJohn Marino }
1416*cf7f2e2dSJohn Marino 
1417*cf7f2e2dSJohn Marino void
1418*cf7f2e2dSJohn Marino set_gdbarch_half_format (struct gdbarch *gdbarch,
1419*cf7f2e2dSJohn Marino                          const struct floatformat ** half_format)
1420*cf7f2e2dSJohn Marino {
1421*cf7f2e2dSJohn Marino   gdbarch->half_format = half_format;
1422*cf7f2e2dSJohn Marino }
1423*cf7f2e2dSJohn Marino 
1424*cf7f2e2dSJohn Marino int
14255796c8dcSSimon Schubert gdbarch_float_bit (struct gdbarch *gdbarch)
14265796c8dcSSimon Schubert {
14275796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
14285796c8dcSSimon Schubert   /* Skip verify of float_bit, invalid_p == 0 */
14295796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
14305796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
14315796c8dcSSimon Schubert   return gdbarch->float_bit;
14325796c8dcSSimon Schubert }
14335796c8dcSSimon Schubert 
14345796c8dcSSimon Schubert void
14355796c8dcSSimon Schubert set_gdbarch_float_bit (struct gdbarch *gdbarch,
14365796c8dcSSimon Schubert                        int float_bit)
14375796c8dcSSimon Schubert {
14385796c8dcSSimon Schubert   gdbarch->float_bit = float_bit;
14395796c8dcSSimon Schubert }
14405796c8dcSSimon Schubert 
14415796c8dcSSimon Schubert const struct floatformat **
14425796c8dcSSimon Schubert gdbarch_float_format (struct gdbarch *gdbarch)
14435796c8dcSSimon Schubert {
14445796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
14455796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
14465796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
14475796c8dcSSimon Schubert   return gdbarch->float_format;
14485796c8dcSSimon Schubert }
14495796c8dcSSimon Schubert 
14505796c8dcSSimon Schubert void
14515796c8dcSSimon Schubert set_gdbarch_float_format (struct gdbarch *gdbarch,
14525796c8dcSSimon Schubert                           const struct floatformat ** float_format)
14535796c8dcSSimon Schubert {
14545796c8dcSSimon Schubert   gdbarch->float_format = float_format;
14555796c8dcSSimon Schubert }
14565796c8dcSSimon Schubert 
14575796c8dcSSimon Schubert int
14585796c8dcSSimon Schubert gdbarch_double_bit (struct gdbarch *gdbarch)
14595796c8dcSSimon Schubert {
14605796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
14615796c8dcSSimon Schubert   /* Skip verify of double_bit, invalid_p == 0 */
14625796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
14635796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
14645796c8dcSSimon Schubert   return gdbarch->double_bit;
14655796c8dcSSimon Schubert }
14665796c8dcSSimon Schubert 
14675796c8dcSSimon Schubert void
14685796c8dcSSimon Schubert set_gdbarch_double_bit (struct gdbarch *gdbarch,
14695796c8dcSSimon Schubert                         int double_bit)
14705796c8dcSSimon Schubert {
14715796c8dcSSimon Schubert   gdbarch->double_bit = double_bit;
14725796c8dcSSimon Schubert }
14735796c8dcSSimon Schubert 
14745796c8dcSSimon Schubert const struct floatformat **
14755796c8dcSSimon Schubert gdbarch_double_format (struct gdbarch *gdbarch)
14765796c8dcSSimon Schubert {
14775796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
14785796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
14795796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
14805796c8dcSSimon Schubert   return gdbarch->double_format;
14815796c8dcSSimon Schubert }
14825796c8dcSSimon Schubert 
14835796c8dcSSimon Schubert void
14845796c8dcSSimon Schubert set_gdbarch_double_format (struct gdbarch *gdbarch,
14855796c8dcSSimon Schubert                            const struct floatformat ** double_format)
14865796c8dcSSimon Schubert {
14875796c8dcSSimon Schubert   gdbarch->double_format = double_format;
14885796c8dcSSimon Schubert }
14895796c8dcSSimon Schubert 
14905796c8dcSSimon Schubert int
14915796c8dcSSimon Schubert gdbarch_long_double_bit (struct gdbarch *gdbarch)
14925796c8dcSSimon Schubert {
14935796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
14945796c8dcSSimon Schubert   /* Skip verify of long_double_bit, invalid_p == 0 */
14955796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
14965796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
14975796c8dcSSimon Schubert   return gdbarch->long_double_bit;
14985796c8dcSSimon Schubert }
14995796c8dcSSimon Schubert 
15005796c8dcSSimon Schubert void
15015796c8dcSSimon Schubert set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
15025796c8dcSSimon Schubert                              int long_double_bit)
15035796c8dcSSimon Schubert {
15045796c8dcSSimon Schubert   gdbarch->long_double_bit = long_double_bit;
15055796c8dcSSimon Schubert }
15065796c8dcSSimon Schubert 
15075796c8dcSSimon Schubert const struct floatformat **
15085796c8dcSSimon Schubert gdbarch_long_double_format (struct gdbarch *gdbarch)
15095796c8dcSSimon Schubert {
15105796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
15115796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
15125796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
15135796c8dcSSimon Schubert   return gdbarch->long_double_format;
15145796c8dcSSimon Schubert }
15155796c8dcSSimon Schubert 
15165796c8dcSSimon Schubert void
15175796c8dcSSimon Schubert set_gdbarch_long_double_format (struct gdbarch *gdbarch,
15185796c8dcSSimon Schubert                                 const struct floatformat ** long_double_format)
15195796c8dcSSimon Schubert {
15205796c8dcSSimon Schubert   gdbarch->long_double_format = long_double_format;
15215796c8dcSSimon Schubert }
15225796c8dcSSimon Schubert 
15235796c8dcSSimon Schubert int
15245796c8dcSSimon Schubert gdbarch_ptr_bit (struct gdbarch *gdbarch)
15255796c8dcSSimon Schubert {
15265796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
15275796c8dcSSimon Schubert   /* Skip verify of ptr_bit, invalid_p == 0 */
15285796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
15295796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
15305796c8dcSSimon Schubert   return gdbarch->ptr_bit;
15315796c8dcSSimon Schubert }
15325796c8dcSSimon Schubert 
15335796c8dcSSimon Schubert void
15345796c8dcSSimon Schubert set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
15355796c8dcSSimon Schubert                      int ptr_bit)
15365796c8dcSSimon Schubert {
15375796c8dcSSimon Schubert   gdbarch->ptr_bit = ptr_bit;
15385796c8dcSSimon Schubert }
15395796c8dcSSimon Schubert 
15405796c8dcSSimon Schubert int
15415796c8dcSSimon Schubert gdbarch_addr_bit (struct gdbarch *gdbarch)
15425796c8dcSSimon Schubert {
15435796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
15445796c8dcSSimon Schubert   /* Check variable changed from pre-default.  */
15455796c8dcSSimon Schubert   gdb_assert (gdbarch->addr_bit != 0);
15465796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
15475796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
15485796c8dcSSimon Schubert   return gdbarch->addr_bit;
15495796c8dcSSimon Schubert }
15505796c8dcSSimon Schubert 
15515796c8dcSSimon Schubert void
15525796c8dcSSimon Schubert set_gdbarch_addr_bit (struct gdbarch *gdbarch,
15535796c8dcSSimon Schubert                       int addr_bit)
15545796c8dcSSimon Schubert {
15555796c8dcSSimon Schubert   gdbarch->addr_bit = addr_bit;
15565796c8dcSSimon Schubert }
15575796c8dcSSimon Schubert 
15585796c8dcSSimon Schubert int
15595796c8dcSSimon Schubert gdbarch_char_signed (struct gdbarch *gdbarch)
15605796c8dcSSimon Schubert {
15615796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
15625796c8dcSSimon Schubert   /* Check variable changed from pre-default.  */
15635796c8dcSSimon Schubert   gdb_assert (gdbarch->char_signed != -1);
15645796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
15655796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
15665796c8dcSSimon Schubert   return gdbarch->char_signed;
15675796c8dcSSimon Schubert }
15685796c8dcSSimon Schubert 
15695796c8dcSSimon Schubert void
15705796c8dcSSimon Schubert set_gdbarch_char_signed (struct gdbarch *gdbarch,
15715796c8dcSSimon Schubert                          int char_signed)
15725796c8dcSSimon Schubert {
15735796c8dcSSimon Schubert   gdbarch->char_signed = char_signed;
15745796c8dcSSimon Schubert }
15755796c8dcSSimon Schubert 
15765796c8dcSSimon Schubert int
15775796c8dcSSimon Schubert gdbarch_read_pc_p (struct gdbarch *gdbarch)
15785796c8dcSSimon Schubert {
15795796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
15805796c8dcSSimon Schubert   return gdbarch->read_pc != NULL;
15815796c8dcSSimon Schubert }
15825796c8dcSSimon Schubert 
15835796c8dcSSimon Schubert CORE_ADDR
15845796c8dcSSimon Schubert gdbarch_read_pc (struct gdbarch *gdbarch, struct regcache *regcache)
15855796c8dcSSimon Schubert {
15865796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
15875796c8dcSSimon Schubert   gdb_assert (gdbarch->read_pc != NULL);
15885796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
15895796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
15905796c8dcSSimon Schubert   return gdbarch->read_pc (regcache);
15915796c8dcSSimon Schubert }
15925796c8dcSSimon Schubert 
15935796c8dcSSimon Schubert void
15945796c8dcSSimon Schubert set_gdbarch_read_pc (struct gdbarch *gdbarch,
15955796c8dcSSimon Schubert                      gdbarch_read_pc_ftype read_pc)
15965796c8dcSSimon Schubert {
15975796c8dcSSimon Schubert   gdbarch->read_pc = read_pc;
15985796c8dcSSimon Schubert }
15995796c8dcSSimon Schubert 
16005796c8dcSSimon Schubert int
16015796c8dcSSimon Schubert gdbarch_write_pc_p (struct gdbarch *gdbarch)
16025796c8dcSSimon Schubert {
16035796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
16045796c8dcSSimon Schubert   return gdbarch->write_pc != NULL;
16055796c8dcSSimon Schubert }
16065796c8dcSSimon Schubert 
16075796c8dcSSimon Schubert void
16085796c8dcSSimon Schubert gdbarch_write_pc (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR val)
16095796c8dcSSimon Schubert {
16105796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
16115796c8dcSSimon Schubert   gdb_assert (gdbarch->write_pc != NULL);
16125796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
16135796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
16145796c8dcSSimon Schubert   gdbarch->write_pc (regcache, val);
16155796c8dcSSimon Schubert }
16165796c8dcSSimon Schubert 
16175796c8dcSSimon Schubert void
16185796c8dcSSimon Schubert set_gdbarch_write_pc (struct gdbarch *gdbarch,
16195796c8dcSSimon Schubert                       gdbarch_write_pc_ftype write_pc)
16205796c8dcSSimon Schubert {
16215796c8dcSSimon Schubert   gdbarch->write_pc = write_pc;
16225796c8dcSSimon Schubert }
16235796c8dcSSimon Schubert 
16245796c8dcSSimon Schubert void
16255796c8dcSSimon Schubert gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
16265796c8dcSSimon Schubert {
16275796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
16285796c8dcSSimon Schubert   gdb_assert (gdbarch->virtual_frame_pointer != NULL);
16295796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
16305796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
16315796c8dcSSimon Schubert   gdbarch->virtual_frame_pointer (gdbarch, pc, frame_regnum, frame_offset);
16325796c8dcSSimon Schubert }
16335796c8dcSSimon Schubert 
16345796c8dcSSimon Schubert void
16355796c8dcSSimon Schubert set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
16365796c8dcSSimon Schubert                                    gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
16375796c8dcSSimon Schubert {
16385796c8dcSSimon Schubert   gdbarch->virtual_frame_pointer = virtual_frame_pointer;
16395796c8dcSSimon Schubert }
16405796c8dcSSimon Schubert 
16415796c8dcSSimon Schubert int
16425796c8dcSSimon Schubert gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
16435796c8dcSSimon Schubert {
16445796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
16455796c8dcSSimon Schubert   return gdbarch->pseudo_register_read != NULL;
16465796c8dcSSimon Schubert }
16475796c8dcSSimon Schubert 
16485796c8dcSSimon Schubert void
16495796c8dcSSimon Schubert gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, gdb_byte *buf)
16505796c8dcSSimon Schubert {
16515796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
16525796c8dcSSimon Schubert   gdb_assert (gdbarch->pseudo_register_read != NULL);
16535796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
16545796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
16555796c8dcSSimon Schubert   gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
16565796c8dcSSimon Schubert }
16575796c8dcSSimon Schubert 
16585796c8dcSSimon Schubert void
16595796c8dcSSimon Schubert set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
16605796c8dcSSimon Schubert                                   gdbarch_pseudo_register_read_ftype pseudo_register_read)
16615796c8dcSSimon Schubert {
16625796c8dcSSimon Schubert   gdbarch->pseudo_register_read = pseudo_register_read;
16635796c8dcSSimon Schubert }
16645796c8dcSSimon Schubert 
16655796c8dcSSimon Schubert int
16665796c8dcSSimon Schubert gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
16675796c8dcSSimon Schubert {
16685796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
16695796c8dcSSimon Schubert   return gdbarch->pseudo_register_write != NULL;
16705796c8dcSSimon Schubert }
16715796c8dcSSimon Schubert 
16725796c8dcSSimon Schubert void
16735796c8dcSSimon Schubert gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const gdb_byte *buf)
16745796c8dcSSimon Schubert {
16755796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
16765796c8dcSSimon Schubert   gdb_assert (gdbarch->pseudo_register_write != NULL);
16775796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
16785796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
16795796c8dcSSimon Schubert   gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
16805796c8dcSSimon Schubert }
16815796c8dcSSimon Schubert 
16825796c8dcSSimon Schubert void
16835796c8dcSSimon Schubert set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
16845796c8dcSSimon Schubert                                    gdbarch_pseudo_register_write_ftype pseudo_register_write)
16855796c8dcSSimon Schubert {
16865796c8dcSSimon Schubert   gdbarch->pseudo_register_write = pseudo_register_write;
16875796c8dcSSimon Schubert }
16885796c8dcSSimon Schubert 
16895796c8dcSSimon Schubert int
16905796c8dcSSimon Schubert gdbarch_num_regs (struct gdbarch *gdbarch)
16915796c8dcSSimon Schubert {
16925796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
16935796c8dcSSimon Schubert   /* Check variable changed from pre-default.  */
16945796c8dcSSimon Schubert   gdb_assert (gdbarch->num_regs != -1);
16955796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
16965796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
16975796c8dcSSimon Schubert   return gdbarch->num_regs;
16985796c8dcSSimon Schubert }
16995796c8dcSSimon Schubert 
17005796c8dcSSimon Schubert void
17015796c8dcSSimon Schubert set_gdbarch_num_regs (struct gdbarch *gdbarch,
17025796c8dcSSimon Schubert                       int num_regs)
17035796c8dcSSimon Schubert {
17045796c8dcSSimon Schubert   gdbarch->num_regs = num_regs;
17055796c8dcSSimon Schubert }
17065796c8dcSSimon Schubert 
17075796c8dcSSimon Schubert int
17085796c8dcSSimon Schubert gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
17095796c8dcSSimon Schubert {
17105796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
17115796c8dcSSimon Schubert   /* Skip verify of num_pseudo_regs, invalid_p == 0 */
17125796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
17135796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
17145796c8dcSSimon Schubert   return gdbarch->num_pseudo_regs;
17155796c8dcSSimon Schubert }
17165796c8dcSSimon Schubert 
17175796c8dcSSimon Schubert void
17185796c8dcSSimon Schubert set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
17195796c8dcSSimon Schubert                              int num_pseudo_regs)
17205796c8dcSSimon Schubert {
17215796c8dcSSimon Schubert   gdbarch->num_pseudo_regs = num_pseudo_regs;
17225796c8dcSSimon Schubert }
17235796c8dcSSimon Schubert 
17245796c8dcSSimon Schubert int
17255796c8dcSSimon Schubert gdbarch_sp_regnum (struct gdbarch *gdbarch)
17265796c8dcSSimon Schubert {
17275796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
17285796c8dcSSimon Schubert   /* Skip verify of sp_regnum, invalid_p == 0 */
17295796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
17305796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
17315796c8dcSSimon Schubert   return gdbarch->sp_regnum;
17325796c8dcSSimon Schubert }
17335796c8dcSSimon Schubert 
17345796c8dcSSimon Schubert void
17355796c8dcSSimon Schubert set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
17365796c8dcSSimon Schubert                        int sp_regnum)
17375796c8dcSSimon Schubert {
17385796c8dcSSimon Schubert   gdbarch->sp_regnum = sp_regnum;
17395796c8dcSSimon Schubert }
17405796c8dcSSimon Schubert 
17415796c8dcSSimon Schubert int
17425796c8dcSSimon Schubert gdbarch_pc_regnum (struct gdbarch *gdbarch)
17435796c8dcSSimon Schubert {
17445796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
17455796c8dcSSimon Schubert   /* Skip verify of pc_regnum, invalid_p == 0 */
17465796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
17475796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
17485796c8dcSSimon Schubert   return gdbarch->pc_regnum;
17495796c8dcSSimon Schubert }
17505796c8dcSSimon Schubert 
17515796c8dcSSimon Schubert void
17525796c8dcSSimon Schubert set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
17535796c8dcSSimon Schubert                        int pc_regnum)
17545796c8dcSSimon Schubert {
17555796c8dcSSimon Schubert   gdbarch->pc_regnum = pc_regnum;
17565796c8dcSSimon Schubert }
17575796c8dcSSimon Schubert 
17585796c8dcSSimon Schubert int
17595796c8dcSSimon Schubert gdbarch_ps_regnum (struct gdbarch *gdbarch)
17605796c8dcSSimon Schubert {
17615796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
17625796c8dcSSimon Schubert   /* Skip verify of ps_regnum, invalid_p == 0 */
17635796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
17645796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
17655796c8dcSSimon Schubert   return gdbarch->ps_regnum;
17665796c8dcSSimon Schubert }
17675796c8dcSSimon Schubert 
17685796c8dcSSimon Schubert void
17695796c8dcSSimon Schubert set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
17705796c8dcSSimon Schubert                        int ps_regnum)
17715796c8dcSSimon Schubert {
17725796c8dcSSimon Schubert   gdbarch->ps_regnum = ps_regnum;
17735796c8dcSSimon Schubert }
17745796c8dcSSimon Schubert 
17755796c8dcSSimon Schubert int
17765796c8dcSSimon Schubert gdbarch_fp0_regnum (struct gdbarch *gdbarch)
17775796c8dcSSimon Schubert {
17785796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
17795796c8dcSSimon Schubert   /* Skip verify of fp0_regnum, invalid_p == 0 */
17805796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
17815796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
17825796c8dcSSimon Schubert   return gdbarch->fp0_regnum;
17835796c8dcSSimon Schubert }
17845796c8dcSSimon Schubert 
17855796c8dcSSimon Schubert void
17865796c8dcSSimon Schubert set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
17875796c8dcSSimon Schubert                         int fp0_regnum)
17885796c8dcSSimon Schubert {
17895796c8dcSSimon Schubert   gdbarch->fp0_regnum = fp0_regnum;
17905796c8dcSSimon Schubert }
17915796c8dcSSimon Schubert 
17925796c8dcSSimon Schubert int
17935796c8dcSSimon Schubert gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
17945796c8dcSSimon Schubert {
17955796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
17965796c8dcSSimon Schubert   gdb_assert (gdbarch->stab_reg_to_regnum != NULL);
17975796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
17985796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
17995796c8dcSSimon Schubert   return gdbarch->stab_reg_to_regnum (gdbarch, stab_regnr);
18005796c8dcSSimon Schubert }
18015796c8dcSSimon Schubert 
18025796c8dcSSimon Schubert void
18035796c8dcSSimon Schubert set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
18045796c8dcSSimon Schubert                                 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
18055796c8dcSSimon Schubert {
18065796c8dcSSimon Schubert   gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
18075796c8dcSSimon Schubert }
18085796c8dcSSimon Schubert 
18095796c8dcSSimon Schubert int
18105796c8dcSSimon Schubert gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
18115796c8dcSSimon Schubert {
18125796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
18135796c8dcSSimon Schubert   gdb_assert (gdbarch->ecoff_reg_to_regnum != NULL);
18145796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
18155796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
18165796c8dcSSimon Schubert   return gdbarch->ecoff_reg_to_regnum (gdbarch, ecoff_regnr);
18175796c8dcSSimon Schubert }
18185796c8dcSSimon Schubert 
18195796c8dcSSimon Schubert void
18205796c8dcSSimon Schubert set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
18215796c8dcSSimon Schubert                                  gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
18225796c8dcSSimon Schubert {
18235796c8dcSSimon Schubert   gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
18245796c8dcSSimon Schubert }
18255796c8dcSSimon Schubert 
18265796c8dcSSimon Schubert int
18275796c8dcSSimon Schubert gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
18285796c8dcSSimon Schubert {
18295796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
18305796c8dcSSimon Schubert   gdb_assert (gdbarch->sdb_reg_to_regnum != NULL);
18315796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
18325796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
18335796c8dcSSimon Schubert   return gdbarch->sdb_reg_to_regnum (gdbarch, sdb_regnr);
18345796c8dcSSimon Schubert }
18355796c8dcSSimon Schubert 
18365796c8dcSSimon Schubert void
18375796c8dcSSimon Schubert set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
18385796c8dcSSimon Schubert                                gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
18395796c8dcSSimon Schubert {
18405796c8dcSSimon Schubert   gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
18415796c8dcSSimon Schubert }
18425796c8dcSSimon Schubert 
18435796c8dcSSimon Schubert int
18445796c8dcSSimon Schubert gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
18455796c8dcSSimon Schubert {
18465796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
18475796c8dcSSimon Schubert   gdb_assert (gdbarch->dwarf2_reg_to_regnum != NULL);
18485796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
18495796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
18505796c8dcSSimon Schubert   return gdbarch->dwarf2_reg_to_regnum (gdbarch, dwarf2_regnr);
18515796c8dcSSimon Schubert }
18525796c8dcSSimon Schubert 
18535796c8dcSSimon Schubert void
18545796c8dcSSimon Schubert set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
18555796c8dcSSimon Schubert                                   gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
18565796c8dcSSimon Schubert {
18575796c8dcSSimon Schubert   gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
18585796c8dcSSimon Schubert }
18595796c8dcSSimon Schubert 
18605796c8dcSSimon Schubert const char *
18615796c8dcSSimon Schubert gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
18625796c8dcSSimon Schubert {
18635796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
18645796c8dcSSimon Schubert   gdb_assert (gdbarch->register_name != NULL);
18655796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
18665796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
18675796c8dcSSimon Schubert   return gdbarch->register_name (gdbarch, regnr);
18685796c8dcSSimon Schubert }
18695796c8dcSSimon Schubert 
18705796c8dcSSimon Schubert void
18715796c8dcSSimon Schubert set_gdbarch_register_name (struct gdbarch *gdbarch,
18725796c8dcSSimon Schubert                            gdbarch_register_name_ftype register_name)
18735796c8dcSSimon Schubert {
18745796c8dcSSimon Schubert   gdbarch->register_name = register_name;
18755796c8dcSSimon Schubert }
18765796c8dcSSimon Schubert 
18775796c8dcSSimon Schubert int
18785796c8dcSSimon Schubert gdbarch_register_type_p (struct gdbarch *gdbarch)
18795796c8dcSSimon Schubert {
18805796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
18815796c8dcSSimon Schubert   return gdbarch->register_type != NULL;
18825796c8dcSSimon Schubert }
18835796c8dcSSimon Schubert 
18845796c8dcSSimon Schubert struct type *
18855796c8dcSSimon Schubert gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
18865796c8dcSSimon Schubert {
18875796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
18885796c8dcSSimon Schubert   gdb_assert (gdbarch->register_type != NULL);
18895796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
18905796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
18915796c8dcSSimon Schubert   return gdbarch->register_type (gdbarch, reg_nr);
18925796c8dcSSimon Schubert }
18935796c8dcSSimon Schubert 
18945796c8dcSSimon Schubert void
18955796c8dcSSimon Schubert set_gdbarch_register_type (struct gdbarch *gdbarch,
18965796c8dcSSimon Schubert                            gdbarch_register_type_ftype register_type)
18975796c8dcSSimon Schubert {
18985796c8dcSSimon Schubert   gdbarch->register_type = register_type;
18995796c8dcSSimon Schubert }
19005796c8dcSSimon Schubert 
19015796c8dcSSimon Schubert int
19025796c8dcSSimon Schubert gdbarch_dummy_id_p (struct gdbarch *gdbarch)
19035796c8dcSSimon Schubert {
19045796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
19055796c8dcSSimon Schubert   return gdbarch->dummy_id != NULL;
19065796c8dcSSimon Schubert }
19075796c8dcSSimon Schubert 
19085796c8dcSSimon Schubert struct frame_id
19095796c8dcSSimon Schubert gdbarch_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
19105796c8dcSSimon Schubert {
19115796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
19125796c8dcSSimon Schubert   gdb_assert (gdbarch->dummy_id != NULL);
19135796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
19145796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_dummy_id called\n");
19155796c8dcSSimon Schubert   return gdbarch->dummy_id (gdbarch, this_frame);
19165796c8dcSSimon Schubert }
19175796c8dcSSimon Schubert 
19185796c8dcSSimon Schubert void
19195796c8dcSSimon Schubert set_gdbarch_dummy_id (struct gdbarch *gdbarch,
19205796c8dcSSimon Schubert                       gdbarch_dummy_id_ftype dummy_id)
19215796c8dcSSimon Schubert {
19225796c8dcSSimon Schubert   gdbarch->dummy_id = dummy_id;
19235796c8dcSSimon Schubert }
19245796c8dcSSimon Schubert 
19255796c8dcSSimon Schubert int
19265796c8dcSSimon Schubert gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch)
19275796c8dcSSimon Schubert {
19285796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
19295796c8dcSSimon Schubert   /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
19305796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
19315796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n");
19325796c8dcSSimon Schubert   return gdbarch->deprecated_fp_regnum;
19335796c8dcSSimon Schubert }
19345796c8dcSSimon Schubert 
19355796c8dcSSimon Schubert void
19365796c8dcSSimon Schubert set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch,
19375796c8dcSSimon Schubert                                   int deprecated_fp_regnum)
19385796c8dcSSimon Schubert {
19395796c8dcSSimon Schubert   gdbarch->deprecated_fp_regnum = deprecated_fp_regnum;
19405796c8dcSSimon Schubert }
19415796c8dcSSimon Schubert 
19425796c8dcSSimon Schubert int
19435796c8dcSSimon Schubert gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
19445796c8dcSSimon Schubert {
19455796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
19465796c8dcSSimon Schubert   return gdbarch->push_dummy_call != NULL;
19475796c8dcSSimon Schubert }
19485796c8dcSSimon Schubert 
19495796c8dcSSimon Schubert CORE_ADDR
19505796c8dcSSimon Schubert 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)
19515796c8dcSSimon Schubert {
19525796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
19535796c8dcSSimon Schubert   gdb_assert (gdbarch->push_dummy_call != NULL);
19545796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
19555796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
19565796c8dcSSimon Schubert   return gdbarch->push_dummy_call (gdbarch, function, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr);
19575796c8dcSSimon Schubert }
19585796c8dcSSimon Schubert 
19595796c8dcSSimon Schubert void
19605796c8dcSSimon Schubert set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
19615796c8dcSSimon Schubert                              gdbarch_push_dummy_call_ftype push_dummy_call)
19625796c8dcSSimon Schubert {
19635796c8dcSSimon Schubert   gdbarch->push_dummy_call = push_dummy_call;
19645796c8dcSSimon Schubert }
19655796c8dcSSimon Schubert 
19665796c8dcSSimon Schubert int
19675796c8dcSSimon Schubert gdbarch_call_dummy_location (struct gdbarch *gdbarch)
19685796c8dcSSimon Schubert {
19695796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
19705796c8dcSSimon Schubert   /* Skip verify of call_dummy_location, invalid_p == 0 */
19715796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
19725796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
19735796c8dcSSimon Schubert   return gdbarch->call_dummy_location;
19745796c8dcSSimon Schubert }
19755796c8dcSSimon Schubert 
19765796c8dcSSimon Schubert void
19775796c8dcSSimon Schubert set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
19785796c8dcSSimon Schubert                                  int call_dummy_location)
19795796c8dcSSimon Schubert {
19805796c8dcSSimon Schubert   gdbarch->call_dummy_location = call_dummy_location;
19815796c8dcSSimon Schubert }
19825796c8dcSSimon Schubert 
19835796c8dcSSimon Schubert int
19845796c8dcSSimon Schubert gdbarch_push_dummy_code_p (struct gdbarch *gdbarch)
19855796c8dcSSimon Schubert {
19865796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
19875796c8dcSSimon Schubert   return gdbarch->push_dummy_code != NULL;
19885796c8dcSSimon Schubert }
19895796c8dcSSimon Schubert 
19905796c8dcSSimon Schubert CORE_ADDR
19915796c8dcSSimon Schubert 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)
19925796c8dcSSimon Schubert {
19935796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
19945796c8dcSSimon Schubert   gdb_assert (gdbarch->push_dummy_code != NULL);
19955796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
19965796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n");
19975796c8dcSSimon Schubert   return gdbarch->push_dummy_code (gdbarch, sp, funaddr, args, nargs, value_type, real_pc, bp_addr, regcache);
19985796c8dcSSimon Schubert }
19995796c8dcSSimon Schubert 
20005796c8dcSSimon Schubert void
20015796c8dcSSimon Schubert set_gdbarch_push_dummy_code (struct gdbarch *gdbarch,
20025796c8dcSSimon Schubert                              gdbarch_push_dummy_code_ftype push_dummy_code)
20035796c8dcSSimon Schubert {
20045796c8dcSSimon Schubert   gdbarch->push_dummy_code = push_dummy_code;
20055796c8dcSSimon Schubert }
20065796c8dcSSimon Schubert 
20075796c8dcSSimon Schubert void
20085796c8dcSSimon Schubert gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
20095796c8dcSSimon Schubert {
20105796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
20115796c8dcSSimon Schubert   gdb_assert (gdbarch->print_registers_info != NULL);
20125796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
20135796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
20145796c8dcSSimon Schubert   gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
20155796c8dcSSimon Schubert }
20165796c8dcSSimon Schubert 
20175796c8dcSSimon Schubert void
20185796c8dcSSimon Schubert set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
20195796c8dcSSimon Schubert                                   gdbarch_print_registers_info_ftype print_registers_info)
20205796c8dcSSimon Schubert {
20215796c8dcSSimon Schubert   gdbarch->print_registers_info = print_registers_info;
20225796c8dcSSimon Schubert }
20235796c8dcSSimon Schubert 
20245796c8dcSSimon Schubert int
20255796c8dcSSimon Schubert gdbarch_print_float_info_p (struct gdbarch *gdbarch)
20265796c8dcSSimon Schubert {
20275796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
20285796c8dcSSimon Schubert   return gdbarch->print_float_info != NULL;
20295796c8dcSSimon Schubert }
20305796c8dcSSimon Schubert 
20315796c8dcSSimon Schubert void
20325796c8dcSSimon Schubert gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
20335796c8dcSSimon Schubert {
20345796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
20355796c8dcSSimon Schubert   gdb_assert (gdbarch->print_float_info != NULL);
20365796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
20375796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
20385796c8dcSSimon Schubert   gdbarch->print_float_info (gdbarch, file, frame, args);
20395796c8dcSSimon Schubert }
20405796c8dcSSimon Schubert 
20415796c8dcSSimon Schubert void
20425796c8dcSSimon Schubert set_gdbarch_print_float_info (struct gdbarch *gdbarch,
20435796c8dcSSimon Schubert                               gdbarch_print_float_info_ftype print_float_info)
20445796c8dcSSimon Schubert {
20455796c8dcSSimon Schubert   gdbarch->print_float_info = print_float_info;
20465796c8dcSSimon Schubert }
20475796c8dcSSimon Schubert 
20485796c8dcSSimon Schubert int
20495796c8dcSSimon Schubert gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
20505796c8dcSSimon Schubert {
20515796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
20525796c8dcSSimon Schubert   return gdbarch->print_vector_info != NULL;
20535796c8dcSSimon Schubert }
20545796c8dcSSimon Schubert 
20555796c8dcSSimon Schubert void
20565796c8dcSSimon Schubert gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
20575796c8dcSSimon Schubert {
20585796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
20595796c8dcSSimon Schubert   gdb_assert (gdbarch->print_vector_info != NULL);
20605796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
20615796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
20625796c8dcSSimon Schubert   gdbarch->print_vector_info (gdbarch, file, frame, args);
20635796c8dcSSimon Schubert }
20645796c8dcSSimon Schubert 
20655796c8dcSSimon Schubert void
20665796c8dcSSimon Schubert set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
20675796c8dcSSimon Schubert                                gdbarch_print_vector_info_ftype print_vector_info)
20685796c8dcSSimon Schubert {
20695796c8dcSSimon Schubert   gdbarch->print_vector_info = print_vector_info;
20705796c8dcSSimon Schubert }
20715796c8dcSSimon Schubert 
20725796c8dcSSimon Schubert int
20735796c8dcSSimon Schubert gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
20745796c8dcSSimon Schubert {
20755796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
20765796c8dcSSimon Schubert   gdb_assert (gdbarch->register_sim_regno != NULL);
20775796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
20785796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
20795796c8dcSSimon Schubert   return gdbarch->register_sim_regno (gdbarch, reg_nr);
20805796c8dcSSimon Schubert }
20815796c8dcSSimon Schubert 
20825796c8dcSSimon Schubert void
20835796c8dcSSimon Schubert set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
20845796c8dcSSimon Schubert                                 gdbarch_register_sim_regno_ftype register_sim_regno)
20855796c8dcSSimon Schubert {
20865796c8dcSSimon Schubert   gdbarch->register_sim_regno = register_sim_regno;
20875796c8dcSSimon Schubert }
20885796c8dcSSimon Schubert 
20895796c8dcSSimon Schubert int
20905796c8dcSSimon Schubert gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
20915796c8dcSSimon Schubert {
20925796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
20935796c8dcSSimon Schubert   gdb_assert (gdbarch->cannot_fetch_register != NULL);
20945796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
20955796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
20965796c8dcSSimon Schubert   return gdbarch->cannot_fetch_register (gdbarch, regnum);
20975796c8dcSSimon Schubert }
20985796c8dcSSimon Schubert 
20995796c8dcSSimon Schubert void
21005796c8dcSSimon Schubert set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
21015796c8dcSSimon Schubert                                    gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
21025796c8dcSSimon Schubert {
21035796c8dcSSimon Schubert   gdbarch->cannot_fetch_register = cannot_fetch_register;
21045796c8dcSSimon Schubert }
21055796c8dcSSimon Schubert 
21065796c8dcSSimon Schubert int
21075796c8dcSSimon Schubert gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
21085796c8dcSSimon Schubert {
21095796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
21105796c8dcSSimon Schubert   gdb_assert (gdbarch->cannot_store_register != NULL);
21115796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
21125796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
21135796c8dcSSimon Schubert   return gdbarch->cannot_store_register (gdbarch, regnum);
21145796c8dcSSimon Schubert }
21155796c8dcSSimon Schubert 
21165796c8dcSSimon Schubert void
21175796c8dcSSimon Schubert set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
21185796c8dcSSimon Schubert                                    gdbarch_cannot_store_register_ftype cannot_store_register)
21195796c8dcSSimon Schubert {
21205796c8dcSSimon Schubert   gdbarch->cannot_store_register = cannot_store_register;
21215796c8dcSSimon Schubert }
21225796c8dcSSimon Schubert 
21235796c8dcSSimon Schubert int
21245796c8dcSSimon Schubert gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
21255796c8dcSSimon Schubert {
21265796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
21275796c8dcSSimon Schubert   return gdbarch->get_longjmp_target != NULL;
21285796c8dcSSimon Schubert }
21295796c8dcSSimon Schubert 
21305796c8dcSSimon Schubert int
21315796c8dcSSimon Schubert gdbarch_get_longjmp_target (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR *pc)
21325796c8dcSSimon Schubert {
21335796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
21345796c8dcSSimon Schubert   gdb_assert (gdbarch->get_longjmp_target != NULL);
21355796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
21365796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
21375796c8dcSSimon Schubert   return gdbarch->get_longjmp_target (frame, pc);
21385796c8dcSSimon Schubert }
21395796c8dcSSimon Schubert 
21405796c8dcSSimon Schubert void
21415796c8dcSSimon Schubert set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
21425796c8dcSSimon Schubert                                 gdbarch_get_longjmp_target_ftype get_longjmp_target)
21435796c8dcSSimon Schubert {
21445796c8dcSSimon Schubert   gdbarch->get_longjmp_target = get_longjmp_target;
21455796c8dcSSimon Schubert }
21465796c8dcSSimon Schubert 
21475796c8dcSSimon Schubert int
21485796c8dcSSimon Schubert gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
21495796c8dcSSimon Schubert {
21505796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
21515796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
21525796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
21535796c8dcSSimon Schubert   return gdbarch->believe_pcc_promotion;
21545796c8dcSSimon Schubert }
21555796c8dcSSimon Schubert 
21565796c8dcSSimon Schubert void
21575796c8dcSSimon Schubert set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
21585796c8dcSSimon Schubert                                    int believe_pcc_promotion)
21595796c8dcSSimon Schubert {
21605796c8dcSSimon Schubert   gdbarch->believe_pcc_promotion = believe_pcc_promotion;
21615796c8dcSSimon Schubert }
21625796c8dcSSimon Schubert 
21635796c8dcSSimon Schubert int
21645796c8dcSSimon Schubert gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
21655796c8dcSSimon Schubert {
21665796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
21675796c8dcSSimon Schubert   gdb_assert (gdbarch->convert_register_p != NULL);
21685796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
21695796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
21705796c8dcSSimon Schubert   return gdbarch->convert_register_p (gdbarch, regnum, type);
21715796c8dcSSimon Schubert }
21725796c8dcSSimon Schubert 
21735796c8dcSSimon Schubert void
21745796c8dcSSimon Schubert set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
21755796c8dcSSimon Schubert                                 gdbarch_convert_register_p_ftype convert_register_p)
21765796c8dcSSimon Schubert {
21775796c8dcSSimon Schubert   gdbarch->convert_register_p = convert_register_p;
21785796c8dcSSimon Schubert }
21795796c8dcSSimon Schubert 
21805796c8dcSSimon Schubert void
21815796c8dcSSimon Schubert gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, gdb_byte *buf)
21825796c8dcSSimon Schubert {
21835796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
21845796c8dcSSimon Schubert   gdb_assert (gdbarch->register_to_value != NULL);
21855796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
21865796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
21875796c8dcSSimon Schubert   gdbarch->register_to_value (frame, regnum, type, buf);
21885796c8dcSSimon Schubert }
21895796c8dcSSimon Schubert 
21905796c8dcSSimon Schubert void
21915796c8dcSSimon Schubert set_gdbarch_register_to_value (struct gdbarch *gdbarch,
21925796c8dcSSimon Schubert                                gdbarch_register_to_value_ftype register_to_value)
21935796c8dcSSimon Schubert {
21945796c8dcSSimon Schubert   gdbarch->register_to_value = register_to_value;
21955796c8dcSSimon Schubert }
21965796c8dcSSimon Schubert 
21975796c8dcSSimon Schubert void
21985796c8dcSSimon Schubert gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const gdb_byte *buf)
21995796c8dcSSimon Schubert {
22005796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
22015796c8dcSSimon Schubert   gdb_assert (gdbarch->value_to_register != NULL);
22025796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
22035796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
22045796c8dcSSimon Schubert   gdbarch->value_to_register (frame, regnum, type, buf);
22055796c8dcSSimon Schubert }
22065796c8dcSSimon Schubert 
22075796c8dcSSimon Schubert void
22085796c8dcSSimon Schubert set_gdbarch_value_to_register (struct gdbarch *gdbarch,
22095796c8dcSSimon Schubert                                gdbarch_value_to_register_ftype value_to_register)
22105796c8dcSSimon Schubert {
22115796c8dcSSimon Schubert   gdbarch->value_to_register = value_to_register;
22125796c8dcSSimon Schubert }
22135796c8dcSSimon Schubert 
22145796c8dcSSimon Schubert struct value *
22155796c8dcSSimon Schubert gdbarch_value_from_register (struct gdbarch *gdbarch, struct type *type, int regnum, struct frame_info *frame)
22165796c8dcSSimon Schubert {
22175796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
22185796c8dcSSimon Schubert   gdb_assert (gdbarch->value_from_register != NULL);
22195796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
22205796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_value_from_register called\n");
22215796c8dcSSimon Schubert   return gdbarch->value_from_register (type, regnum, frame);
22225796c8dcSSimon Schubert }
22235796c8dcSSimon Schubert 
22245796c8dcSSimon Schubert void
22255796c8dcSSimon Schubert set_gdbarch_value_from_register (struct gdbarch *gdbarch,
22265796c8dcSSimon Schubert                                  gdbarch_value_from_register_ftype value_from_register)
22275796c8dcSSimon Schubert {
22285796c8dcSSimon Schubert   gdbarch->value_from_register = value_from_register;
22295796c8dcSSimon Schubert }
22305796c8dcSSimon Schubert 
22315796c8dcSSimon Schubert CORE_ADDR
22325796c8dcSSimon Schubert gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
22335796c8dcSSimon Schubert {
22345796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
22355796c8dcSSimon Schubert   gdb_assert (gdbarch->pointer_to_address != NULL);
22365796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
22375796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
22385796c8dcSSimon Schubert   return gdbarch->pointer_to_address (gdbarch, type, buf);
22395796c8dcSSimon Schubert }
22405796c8dcSSimon Schubert 
22415796c8dcSSimon Schubert void
22425796c8dcSSimon Schubert set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
22435796c8dcSSimon Schubert                                 gdbarch_pointer_to_address_ftype pointer_to_address)
22445796c8dcSSimon Schubert {
22455796c8dcSSimon Schubert   gdbarch->pointer_to_address = pointer_to_address;
22465796c8dcSSimon Schubert }
22475796c8dcSSimon Schubert 
22485796c8dcSSimon Schubert void
22495796c8dcSSimon Schubert gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, gdb_byte *buf, CORE_ADDR addr)
22505796c8dcSSimon Schubert {
22515796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
22525796c8dcSSimon Schubert   gdb_assert (gdbarch->address_to_pointer != NULL);
22535796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
22545796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
22555796c8dcSSimon Schubert   gdbarch->address_to_pointer (gdbarch, type, buf, addr);
22565796c8dcSSimon Schubert }
22575796c8dcSSimon Schubert 
22585796c8dcSSimon Schubert void
22595796c8dcSSimon Schubert set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
22605796c8dcSSimon Schubert                                 gdbarch_address_to_pointer_ftype address_to_pointer)
22615796c8dcSSimon Schubert {
22625796c8dcSSimon Schubert   gdbarch->address_to_pointer = address_to_pointer;
22635796c8dcSSimon Schubert }
22645796c8dcSSimon Schubert 
22655796c8dcSSimon Schubert int
22665796c8dcSSimon Schubert gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
22675796c8dcSSimon Schubert {
22685796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
22695796c8dcSSimon Schubert   return gdbarch->integer_to_address != NULL;
22705796c8dcSSimon Schubert }
22715796c8dcSSimon Schubert 
22725796c8dcSSimon Schubert CORE_ADDR
22735796c8dcSSimon Schubert gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
22745796c8dcSSimon Schubert {
22755796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
22765796c8dcSSimon Schubert   gdb_assert (gdbarch->integer_to_address != NULL);
22775796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
22785796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
22795796c8dcSSimon Schubert   return gdbarch->integer_to_address (gdbarch, type, buf);
22805796c8dcSSimon Schubert }
22815796c8dcSSimon Schubert 
22825796c8dcSSimon Schubert void
22835796c8dcSSimon Schubert set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
22845796c8dcSSimon Schubert                                 gdbarch_integer_to_address_ftype integer_to_address)
22855796c8dcSSimon Schubert {
22865796c8dcSSimon Schubert   gdbarch->integer_to_address = integer_to_address;
22875796c8dcSSimon Schubert }
22885796c8dcSSimon Schubert 
22895796c8dcSSimon Schubert int
22905796c8dcSSimon Schubert gdbarch_return_value_p (struct gdbarch *gdbarch)
22915796c8dcSSimon Schubert {
22925796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
22935796c8dcSSimon Schubert   return gdbarch->return_value != NULL;
22945796c8dcSSimon Schubert }
22955796c8dcSSimon Schubert 
22965796c8dcSSimon Schubert enum return_value_convention
22975796c8dcSSimon Schubert gdbarch_return_value (struct gdbarch *gdbarch, struct type *functype, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
22985796c8dcSSimon Schubert {
22995796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
23005796c8dcSSimon Schubert   gdb_assert (gdbarch->return_value != NULL);
23015796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
23025796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value called\n");
23035796c8dcSSimon Schubert   return gdbarch->return_value (gdbarch, functype, valtype, regcache, readbuf, writebuf);
23045796c8dcSSimon Schubert }
23055796c8dcSSimon Schubert 
23065796c8dcSSimon Schubert void
23075796c8dcSSimon Schubert set_gdbarch_return_value (struct gdbarch *gdbarch,
23085796c8dcSSimon Schubert                           gdbarch_return_value_ftype return_value)
23095796c8dcSSimon Schubert {
23105796c8dcSSimon Schubert   gdbarch->return_value = return_value;
23115796c8dcSSimon Schubert }
23125796c8dcSSimon Schubert 
23135796c8dcSSimon Schubert CORE_ADDR
23145796c8dcSSimon Schubert gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
23155796c8dcSSimon Schubert {
23165796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
23175796c8dcSSimon Schubert   gdb_assert (gdbarch->skip_prologue != NULL);
23185796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
23195796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
23205796c8dcSSimon Schubert   return gdbarch->skip_prologue (gdbarch, ip);
23215796c8dcSSimon Schubert }
23225796c8dcSSimon Schubert 
23235796c8dcSSimon Schubert void
23245796c8dcSSimon Schubert set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
23255796c8dcSSimon Schubert                            gdbarch_skip_prologue_ftype skip_prologue)
23265796c8dcSSimon Schubert {
23275796c8dcSSimon Schubert   gdbarch->skip_prologue = skip_prologue;
23285796c8dcSSimon Schubert }
23295796c8dcSSimon Schubert 
23305796c8dcSSimon Schubert int
23315796c8dcSSimon Schubert gdbarch_skip_main_prologue_p (struct gdbarch *gdbarch)
23325796c8dcSSimon Schubert {
23335796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
23345796c8dcSSimon Schubert   return gdbarch->skip_main_prologue != NULL;
23355796c8dcSSimon Schubert }
23365796c8dcSSimon Schubert 
23375796c8dcSSimon Schubert CORE_ADDR
23385796c8dcSSimon Schubert gdbarch_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
23395796c8dcSSimon Schubert {
23405796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
23415796c8dcSSimon Schubert   gdb_assert (gdbarch->skip_main_prologue != NULL);
23425796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
23435796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_main_prologue called\n");
23445796c8dcSSimon Schubert   return gdbarch->skip_main_prologue (gdbarch, ip);
23455796c8dcSSimon Schubert }
23465796c8dcSSimon Schubert 
23475796c8dcSSimon Schubert void
23485796c8dcSSimon Schubert set_gdbarch_skip_main_prologue (struct gdbarch *gdbarch,
23495796c8dcSSimon Schubert                                 gdbarch_skip_main_prologue_ftype skip_main_prologue)
23505796c8dcSSimon Schubert {
23515796c8dcSSimon Schubert   gdbarch->skip_main_prologue = skip_main_prologue;
23525796c8dcSSimon Schubert }
23535796c8dcSSimon Schubert 
23545796c8dcSSimon Schubert int
23555796c8dcSSimon Schubert gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
23565796c8dcSSimon Schubert {
23575796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
23585796c8dcSSimon Schubert   gdb_assert (gdbarch->inner_than != NULL);
23595796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
23605796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
23615796c8dcSSimon Schubert   return gdbarch->inner_than (lhs, rhs);
23625796c8dcSSimon Schubert }
23635796c8dcSSimon Schubert 
23645796c8dcSSimon Schubert void
23655796c8dcSSimon Schubert set_gdbarch_inner_than (struct gdbarch *gdbarch,
23665796c8dcSSimon Schubert                         gdbarch_inner_than_ftype inner_than)
23675796c8dcSSimon Schubert {
23685796c8dcSSimon Schubert   gdbarch->inner_than = inner_than;
23695796c8dcSSimon Schubert }
23705796c8dcSSimon Schubert 
23715796c8dcSSimon Schubert const gdb_byte *
23725796c8dcSSimon Schubert gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
23735796c8dcSSimon Schubert {
23745796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
23755796c8dcSSimon Schubert   gdb_assert (gdbarch->breakpoint_from_pc != NULL);
23765796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
23775796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
23785796c8dcSSimon Schubert   return gdbarch->breakpoint_from_pc (gdbarch, pcptr, lenptr);
23795796c8dcSSimon Schubert }
23805796c8dcSSimon Schubert 
23815796c8dcSSimon Schubert void
23825796c8dcSSimon Schubert set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
23835796c8dcSSimon Schubert                                 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
23845796c8dcSSimon Schubert {
23855796c8dcSSimon Schubert   gdbarch->breakpoint_from_pc = breakpoint_from_pc;
23865796c8dcSSimon Schubert }
23875796c8dcSSimon Schubert 
2388*cf7f2e2dSJohn Marino void
2389*cf7f2e2dSJohn Marino gdbarch_remote_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *kindptr)
2390*cf7f2e2dSJohn Marino {
2391*cf7f2e2dSJohn Marino   gdb_assert (gdbarch != NULL);
2392*cf7f2e2dSJohn Marino   gdb_assert (gdbarch->remote_breakpoint_from_pc != NULL);
2393*cf7f2e2dSJohn Marino   if (gdbarch_debug >= 2)
2394*cf7f2e2dSJohn Marino     fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_breakpoint_from_pc called\n");
2395*cf7f2e2dSJohn Marino   gdbarch->remote_breakpoint_from_pc (gdbarch, pcptr, kindptr);
2396*cf7f2e2dSJohn Marino }
2397*cf7f2e2dSJohn Marino 
2398*cf7f2e2dSJohn Marino void
2399*cf7f2e2dSJohn Marino set_gdbarch_remote_breakpoint_from_pc (struct gdbarch *gdbarch,
2400*cf7f2e2dSJohn Marino                                        gdbarch_remote_breakpoint_from_pc_ftype remote_breakpoint_from_pc)
2401*cf7f2e2dSJohn Marino {
2402*cf7f2e2dSJohn Marino   gdbarch->remote_breakpoint_from_pc = remote_breakpoint_from_pc;
2403*cf7f2e2dSJohn Marino }
2404*cf7f2e2dSJohn Marino 
24055796c8dcSSimon Schubert int
24065796c8dcSSimon Schubert gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch)
24075796c8dcSSimon Schubert {
24085796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
24095796c8dcSSimon Schubert   return gdbarch->adjust_breakpoint_address != NULL;
24105796c8dcSSimon Schubert }
24115796c8dcSSimon Schubert 
24125796c8dcSSimon Schubert CORE_ADDR
24135796c8dcSSimon Schubert gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr)
24145796c8dcSSimon Schubert {
24155796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
24165796c8dcSSimon Schubert   gdb_assert (gdbarch->adjust_breakpoint_address != NULL);
24175796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
24185796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_breakpoint_address called\n");
24195796c8dcSSimon Schubert   return gdbarch->adjust_breakpoint_address (gdbarch, bpaddr);
24205796c8dcSSimon Schubert }
24215796c8dcSSimon Schubert 
24225796c8dcSSimon Schubert void
24235796c8dcSSimon Schubert set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch,
24245796c8dcSSimon Schubert                                        gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address)
24255796c8dcSSimon Schubert {
24265796c8dcSSimon Schubert   gdbarch->adjust_breakpoint_address = adjust_breakpoint_address;
24275796c8dcSSimon Schubert }
24285796c8dcSSimon Schubert 
24295796c8dcSSimon Schubert int
24305796c8dcSSimon Schubert gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
24315796c8dcSSimon Schubert {
24325796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
24335796c8dcSSimon Schubert   gdb_assert (gdbarch->memory_insert_breakpoint != NULL);
24345796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
24355796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
24365796c8dcSSimon Schubert   return gdbarch->memory_insert_breakpoint (gdbarch, bp_tgt);
24375796c8dcSSimon Schubert }
24385796c8dcSSimon Schubert 
24395796c8dcSSimon Schubert void
24405796c8dcSSimon Schubert set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
24415796c8dcSSimon Schubert                                       gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
24425796c8dcSSimon Schubert {
24435796c8dcSSimon Schubert   gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
24445796c8dcSSimon Schubert }
24455796c8dcSSimon Schubert 
24465796c8dcSSimon Schubert int
24475796c8dcSSimon Schubert gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
24485796c8dcSSimon Schubert {
24495796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
24505796c8dcSSimon Schubert   gdb_assert (gdbarch->memory_remove_breakpoint != NULL);
24515796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
24525796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
24535796c8dcSSimon Schubert   return gdbarch->memory_remove_breakpoint (gdbarch, bp_tgt);
24545796c8dcSSimon Schubert }
24555796c8dcSSimon Schubert 
24565796c8dcSSimon Schubert void
24575796c8dcSSimon Schubert set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
24585796c8dcSSimon Schubert                                       gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
24595796c8dcSSimon Schubert {
24605796c8dcSSimon Schubert   gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
24615796c8dcSSimon Schubert }
24625796c8dcSSimon Schubert 
24635796c8dcSSimon Schubert CORE_ADDR
24645796c8dcSSimon Schubert gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
24655796c8dcSSimon Schubert {
24665796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
24675796c8dcSSimon Schubert   /* Skip verify of decr_pc_after_break, invalid_p == 0 */
24685796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
24695796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
24705796c8dcSSimon Schubert   return gdbarch->decr_pc_after_break;
24715796c8dcSSimon Schubert }
24725796c8dcSSimon Schubert 
24735796c8dcSSimon Schubert void
24745796c8dcSSimon Schubert set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
24755796c8dcSSimon Schubert                                  CORE_ADDR decr_pc_after_break)
24765796c8dcSSimon Schubert {
24775796c8dcSSimon Schubert   gdbarch->decr_pc_after_break = decr_pc_after_break;
24785796c8dcSSimon Schubert }
24795796c8dcSSimon Schubert 
24805796c8dcSSimon Schubert CORE_ADDR
24815796c8dcSSimon Schubert gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch)
24825796c8dcSSimon Schubert {
24835796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
24845796c8dcSSimon Schubert   /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
24855796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
24865796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_function_start_offset called\n");
24875796c8dcSSimon Schubert   return gdbarch->deprecated_function_start_offset;
24885796c8dcSSimon Schubert }
24895796c8dcSSimon Schubert 
24905796c8dcSSimon Schubert void
24915796c8dcSSimon Schubert set_gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch,
24925796c8dcSSimon Schubert                                               CORE_ADDR deprecated_function_start_offset)
24935796c8dcSSimon Schubert {
24945796c8dcSSimon Schubert   gdbarch->deprecated_function_start_offset = deprecated_function_start_offset;
24955796c8dcSSimon Schubert }
24965796c8dcSSimon Schubert 
24975796c8dcSSimon Schubert int
24985796c8dcSSimon Schubert gdbarch_remote_register_number (struct gdbarch *gdbarch, int regno)
24995796c8dcSSimon Schubert {
25005796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
25015796c8dcSSimon Schubert   gdb_assert (gdbarch->remote_register_number != NULL);
25025796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
25035796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_register_number called\n");
25045796c8dcSSimon Schubert   return gdbarch->remote_register_number (gdbarch, regno);
25055796c8dcSSimon Schubert }
25065796c8dcSSimon Schubert 
25075796c8dcSSimon Schubert void
25085796c8dcSSimon Schubert set_gdbarch_remote_register_number (struct gdbarch *gdbarch,
25095796c8dcSSimon Schubert                                     gdbarch_remote_register_number_ftype remote_register_number)
25105796c8dcSSimon Schubert {
25115796c8dcSSimon Schubert   gdbarch->remote_register_number = remote_register_number;
25125796c8dcSSimon Schubert }
25135796c8dcSSimon Schubert 
25145796c8dcSSimon Schubert int
25155796c8dcSSimon Schubert gdbarch_fetch_tls_load_module_address_p (struct gdbarch *gdbarch)
25165796c8dcSSimon Schubert {
25175796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
25185796c8dcSSimon Schubert   return gdbarch->fetch_tls_load_module_address != NULL;
25195796c8dcSSimon Schubert }
25205796c8dcSSimon Schubert 
25215796c8dcSSimon Schubert CORE_ADDR
25225796c8dcSSimon Schubert gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch, struct objfile *objfile)
25235796c8dcSSimon Schubert {
25245796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
25255796c8dcSSimon Schubert   gdb_assert (gdbarch->fetch_tls_load_module_address != NULL);
25265796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
25275796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_tls_load_module_address called\n");
25285796c8dcSSimon Schubert   return gdbarch->fetch_tls_load_module_address (objfile);
25295796c8dcSSimon Schubert }
25305796c8dcSSimon Schubert 
25315796c8dcSSimon Schubert void
25325796c8dcSSimon Schubert set_gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch,
25335796c8dcSSimon Schubert                                            gdbarch_fetch_tls_load_module_address_ftype fetch_tls_load_module_address)
25345796c8dcSSimon Schubert {
25355796c8dcSSimon Schubert   gdbarch->fetch_tls_load_module_address = fetch_tls_load_module_address;
25365796c8dcSSimon Schubert }
25375796c8dcSSimon Schubert 
25385796c8dcSSimon Schubert CORE_ADDR
25395796c8dcSSimon Schubert gdbarch_frame_args_skip (struct gdbarch *gdbarch)
25405796c8dcSSimon Schubert {
25415796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
25425796c8dcSSimon Schubert   /* Skip verify of frame_args_skip, invalid_p == 0 */
25435796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
25445796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
25455796c8dcSSimon Schubert   return gdbarch->frame_args_skip;
25465796c8dcSSimon Schubert }
25475796c8dcSSimon Schubert 
25485796c8dcSSimon Schubert void
25495796c8dcSSimon Schubert set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
25505796c8dcSSimon Schubert                              CORE_ADDR frame_args_skip)
25515796c8dcSSimon Schubert {
25525796c8dcSSimon Schubert   gdbarch->frame_args_skip = frame_args_skip;
25535796c8dcSSimon Schubert }
25545796c8dcSSimon Schubert 
25555796c8dcSSimon Schubert int
25565796c8dcSSimon Schubert gdbarch_unwind_pc_p (struct gdbarch *gdbarch)
25575796c8dcSSimon Schubert {
25585796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
25595796c8dcSSimon Schubert   return gdbarch->unwind_pc != NULL;
25605796c8dcSSimon Schubert }
25615796c8dcSSimon Schubert 
25625796c8dcSSimon Schubert CORE_ADDR
25635796c8dcSSimon Schubert gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
25645796c8dcSSimon Schubert {
25655796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
25665796c8dcSSimon Schubert   gdb_assert (gdbarch->unwind_pc != NULL);
25675796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
25685796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n");
25695796c8dcSSimon Schubert   return gdbarch->unwind_pc (gdbarch, next_frame);
25705796c8dcSSimon Schubert }
25715796c8dcSSimon Schubert 
25725796c8dcSSimon Schubert void
25735796c8dcSSimon Schubert set_gdbarch_unwind_pc (struct gdbarch *gdbarch,
25745796c8dcSSimon Schubert                        gdbarch_unwind_pc_ftype unwind_pc)
25755796c8dcSSimon Schubert {
25765796c8dcSSimon Schubert   gdbarch->unwind_pc = unwind_pc;
25775796c8dcSSimon Schubert }
25785796c8dcSSimon Schubert 
25795796c8dcSSimon Schubert int
25805796c8dcSSimon Schubert gdbarch_unwind_sp_p (struct gdbarch *gdbarch)
25815796c8dcSSimon Schubert {
25825796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
25835796c8dcSSimon Schubert   return gdbarch->unwind_sp != NULL;
25845796c8dcSSimon Schubert }
25855796c8dcSSimon Schubert 
25865796c8dcSSimon Schubert CORE_ADDR
25875796c8dcSSimon Schubert gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
25885796c8dcSSimon Schubert {
25895796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
25905796c8dcSSimon Schubert   gdb_assert (gdbarch->unwind_sp != NULL);
25915796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
25925796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_sp called\n");
25935796c8dcSSimon Schubert   return gdbarch->unwind_sp (gdbarch, next_frame);
25945796c8dcSSimon Schubert }
25955796c8dcSSimon Schubert 
25965796c8dcSSimon Schubert void
25975796c8dcSSimon Schubert set_gdbarch_unwind_sp (struct gdbarch *gdbarch,
25985796c8dcSSimon Schubert                        gdbarch_unwind_sp_ftype unwind_sp)
25995796c8dcSSimon Schubert {
26005796c8dcSSimon Schubert   gdbarch->unwind_sp = unwind_sp;
26015796c8dcSSimon Schubert }
26025796c8dcSSimon Schubert 
26035796c8dcSSimon Schubert int
26045796c8dcSSimon Schubert gdbarch_frame_num_args_p (struct gdbarch *gdbarch)
26055796c8dcSSimon Schubert {
26065796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
26075796c8dcSSimon Schubert   return gdbarch->frame_num_args != NULL;
26085796c8dcSSimon Schubert }
26095796c8dcSSimon Schubert 
26105796c8dcSSimon Schubert int
26115796c8dcSSimon Schubert gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
26125796c8dcSSimon Schubert {
26135796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
26145796c8dcSSimon Schubert   gdb_assert (gdbarch->frame_num_args != NULL);
26155796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
26165796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
26175796c8dcSSimon Schubert   return gdbarch->frame_num_args (frame);
26185796c8dcSSimon Schubert }
26195796c8dcSSimon Schubert 
26205796c8dcSSimon Schubert void
26215796c8dcSSimon Schubert set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
26225796c8dcSSimon Schubert                             gdbarch_frame_num_args_ftype frame_num_args)
26235796c8dcSSimon Schubert {
26245796c8dcSSimon Schubert   gdbarch->frame_num_args = frame_num_args;
26255796c8dcSSimon Schubert }
26265796c8dcSSimon Schubert 
26275796c8dcSSimon Schubert int
26285796c8dcSSimon Schubert gdbarch_frame_align_p (struct gdbarch *gdbarch)
26295796c8dcSSimon Schubert {
26305796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
26315796c8dcSSimon Schubert   return gdbarch->frame_align != NULL;
26325796c8dcSSimon Schubert }
26335796c8dcSSimon Schubert 
26345796c8dcSSimon Schubert CORE_ADDR
26355796c8dcSSimon Schubert gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
26365796c8dcSSimon Schubert {
26375796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
26385796c8dcSSimon Schubert   gdb_assert (gdbarch->frame_align != NULL);
26395796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
26405796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
26415796c8dcSSimon Schubert   return gdbarch->frame_align (gdbarch, address);
26425796c8dcSSimon Schubert }
26435796c8dcSSimon Schubert 
26445796c8dcSSimon Schubert void
26455796c8dcSSimon Schubert set_gdbarch_frame_align (struct gdbarch *gdbarch,
26465796c8dcSSimon Schubert                          gdbarch_frame_align_ftype frame_align)
26475796c8dcSSimon Schubert {
26485796c8dcSSimon Schubert   gdbarch->frame_align = frame_align;
26495796c8dcSSimon Schubert }
26505796c8dcSSimon Schubert 
26515796c8dcSSimon Schubert int
26525796c8dcSSimon Schubert gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type)
26535796c8dcSSimon Schubert {
26545796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
26555796c8dcSSimon Schubert   gdb_assert (gdbarch->stabs_argument_has_addr != NULL);
26565796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
26575796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_stabs_argument_has_addr called\n");
26585796c8dcSSimon Schubert   return gdbarch->stabs_argument_has_addr (gdbarch, type);
26595796c8dcSSimon Schubert }
26605796c8dcSSimon Schubert 
26615796c8dcSSimon Schubert void
26625796c8dcSSimon Schubert set_gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch,
26635796c8dcSSimon Schubert                                      gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr)
26645796c8dcSSimon Schubert {
26655796c8dcSSimon Schubert   gdbarch->stabs_argument_has_addr = stabs_argument_has_addr;
26665796c8dcSSimon Schubert }
26675796c8dcSSimon Schubert 
26685796c8dcSSimon Schubert int
26695796c8dcSSimon Schubert gdbarch_frame_red_zone_size (struct gdbarch *gdbarch)
26705796c8dcSSimon Schubert {
26715796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
26725796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
26735796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_red_zone_size called\n");
26745796c8dcSSimon Schubert   return gdbarch->frame_red_zone_size;
26755796c8dcSSimon Schubert }
26765796c8dcSSimon Schubert 
26775796c8dcSSimon Schubert void
26785796c8dcSSimon Schubert set_gdbarch_frame_red_zone_size (struct gdbarch *gdbarch,
26795796c8dcSSimon Schubert                                  int frame_red_zone_size)
26805796c8dcSSimon Schubert {
26815796c8dcSSimon Schubert   gdbarch->frame_red_zone_size = frame_red_zone_size;
26825796c8dcSSimon Schubert }
26835796c8dcSSimon Schubert 
26845796c8dcSSimon Schubert CORE_ADDR
26855796c8dcSSimon Schubert gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
26865796c8dcSSimon Schubert {
26875796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
26885796c8dcSSimon Schubert   gdb_assert (gdbarch->convert_from_func_ptr_addr != NULL);
26895796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
26905796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
26915796c8dcSSimon Schubert   return gdbarch->convert_from_func_ptr_addr (gdbarch, addr, targ);
26925796c8dcSSimon Schubert }
26935796c8dcSSimon Schubert 
26945796c8dcSSimon Schubert void
26955796c8dcSSimon Schubert set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
26965796c8dcSSimon Schubert                                         gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
26975796c8dcSSimon Schubert {
26985796c8dcSSimon Schubert   gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
26995796c8dcSSimon Schubert }
27005796c8dcSSimon Schubert 
27015796c8dcSSimon Schubert CORE_ADDR
27025796c8dcSSimon Schubert gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
27035796c8dcSSimon Schubert {
27045796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
27055796c8dcSSimon Schubert   gdb_assert (gdbarch->addr_bits_remove != NULL);
27065796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
27075796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
27085796c8dcSSimon Schubert   return gdbarch->addr_bits_remove (gdbarch, addr);
27095796c8dcSSimon Schubert }
27105796c8dcSSimon Schubert 
27115796c8dcSSimon Schubert void
27125796c8dcSSimon Schubert set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
27135796c8dcSSimon Schubert                               gdbarch_addr_bits_remove_ftype addr_bits_remove)
27145796c8dcSSimon Schubert {
27155796c8dcSSimon Schubert   gdbarch->addr_bits_remove = addr_bits_remove;
27165796c8dcSSimon Schubert }
27175796c8dcSSimon Schubert 
27185796c8dcSSimon Schubert CORE_ADDR
27195796c8dcSSimon Schubert gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr)
27205796c8dcSSimon Schubert {
27215796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
27225796c8dcSSimon Schubert   gdb_assert (gdbarch->smash_text_address != NULL);
27235796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
27245796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_smash_text_address called\n");
27255796c8dcSSimon Schubert   return gdbarch->smash_text_address (gdbarch, addr);
27265796c8dcSSimon Schubert }
27275796c8dcSSimon Schubert 
27285796c8dcSSimon Schubert void
27295796c8dcSSimon Schubert set_gdbarch_smash_text_address (struct gdbarch *gdbarch,
27305796c8dcSSimon Schubert                                 gdbarch_smash_text_address_ftype smash_text_address)
27315796c8dcSSimon Schubert {
27325796c8dcSSimon Schubert   gdbarch->smash_text_address = smash_text_address;
27335796c8dcSSimon Schubert }
27345796c8dcSSimon Schubert 
27355796c8dcSSimon Schubert int
27365796c8dcSSimon Schubert gdbarch_software_single_step_p (struct gdbarch *gdbarch)
27375796c8dcSSimon Schubert {
27385796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
27395796c8dcSSimon Schubert   return gdbarch->software_single_step != NULL;
27405796c8dcSSimon Schubert }
27415796c8dcSSimon Schubert 
27425796c8dcSSimon Schubert int
27435796c8dcSSimon Schubert gdbarch_software_single_step (struct gdbarch *gdbarch, struct frame_info *frame)
27445796c8dcSSimon Schubert {
27455796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
27465796c8dcSSimon Schubert   gdb_assert (gdbarch->software_single_step != NULL);
27475796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
27485796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
27495796c8dcSSimon Schubert   return gdbarch->software_single_step (frame);
27505796c8dcSSimon Schubert }
27515796c8dcSSimon Schubert 
27525796c8dcSSimon Schubert void
27535796c8dcSSimon Schubert set_gdbarch_software_single_step (struct gdbarch *gdbarch,
27545796c8dcSSimon Schubert                                   gdbarch_software_single_step_ftype software_single_step)
27555796c8dcSSimon Schubert {
27565796c8dcSSimon Schubert   gdbarch->software_single_step = software_single_step;
27575796c8dcSSimon Schubert }
27585796c8dcSSimon Schubert 
27595796c8dcSSimon Schubert int
27605796c8dcSSimon Schubert gdbarch_single_step_through_delay_p (struct gdbarch *gdbarch)
27615796c8dcSSimon Schubert {
27625796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
27635796c8dcSSimon Schubert   return gdbarch->single_step_through_delay != NULL;
27645796c8dcSSimon Schubert }
27655796c8dcSSimon Schubert 
27665796c8dcSSimon Schubert int
27675796c8dcSSimon Schubert gdbarch_single_step_through_delay (struct gdbarch *gdbarch, struct frame_info *frame)
27685796c8dcSSimon Schubert {
27695796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
27705796c8dcSSimon Schubert   gdb_assert (gdbarch->single_step_through_delay != NULL);
27715796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
27725796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_single_step_through_delay called\n");
27735796c8dcSSimon Schubert   return gdbarch->single_step_through_delay (gdbarch, frame);
27745796c8dcSSimon Schubert }
27755796c8dcSSimon Schubert 
27765796c8dcSSimon Schubert void
27775796c8dcSSimon Schubert set_gdbarch_single_step_through_delay (struct gdbarch *gdbarch,
27785796c8dcSSimon Schubert                                        gdbarch_single_step_through_delay_ftype single_step_through_delay)
27795796c8dcSSimon Schubert {
27805796c8dcSSimon Schubert   gdbarch->single_step_through_delay = single_step_through_delay;
27815796c8dcSSimon Schubert }
27825796c8dcSSimon Schubert 
27835796c8dcSSimon Schubert int
27845796c8dcSSimon Schubert gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info)
27855796c8dcSSimon Schubert {
27865796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
27875796c8dcSSimon Schubert   gdb_assert (gdbarch->print_insn != NULL);
27885796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
27895796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
27905796c8dcSSimon Schubert   return gdbarch->print_insn (vma, info);
27915796c8dcSSimon Schubert }
27925796c8dcSSimon Schubert 
27935796c8dcSSimon Schubert void
27945796c8dcSSimon Schubert set_gdbarch_print_insn (struct gdbarch *gdbarch,
27955796c8dcSSimon Schubert                         gdbarch_print_insn_ftype print_insn)
27965796c8dcSSimon Schubert {
27975796c8dcSSimon Schubert   gdbarch->print_insn = print_insn;
27985796c8dcSSimon Schubert }
27995796c8dcSSimon Schubert 
28005796c8dcSSimon Schubert CORE_ADDR
28015796c8dcSSimon Schubert gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR pc)
28025796c8dcSSimon Schubert {
28035796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
28045796c8dcSSimon Schubert   gdb_assert (gdbarch->skip_trampoline_code != NULL);
28055796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
28065796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
28075796c8dcSSimon Schubert   return gdbarch->skip_trampoline_code (frame, pc);
28085796c8dcSSimon Schubert }
28095796c8dcSSimon Schubert 
28105796c8dcSSimon Schubert void
28115796c8dcSSimon Schubert set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
28125796c8dcSSimon Schubert                                   gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
28135796c8dcSSimon Schubert {
28145796c8dcSSimon Schubert   gdbarch->skip_trampoline_code = skip_trampoline_code;
28155796c8dcSSimon Schubert }
28165796c8dcSSimon Schubert 
28175796c8dcSSimon Schubert CORE_ADDR
28185796c8dcSSimon Schubert gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
28195796c8dcSSimon Schubert {
28205796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
28215796c8dcSSimon Schubert   gdb_assert (gdbarch->skip_solib_resolver != NULL);
28225796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
28235796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_solib_resolver called\n");
28245796c8dcSSimon Schubert   return gdbarch->skip_solib_resolver (gdbarch, pc);
28255796c8dcSSimon Schubert }
28265796c8dcSSimon Schubert 
28275796c8dcSSimon Schubert void
28285796c8dcSSimon Schubert set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch,
28295796c8dcSSimon Schubert                                  gdbarch_skip_solib_resolver_ftype skip_solib_resolver)
28305796c8dcSSimon Schubert {
28315796c8dcSSimon Schubert   gdbarch->skip_solib_resolver = skip_solib_resolver;
28325796c8dcSSimon Schubert }
28335796c8dcSSimon Schubert 
28345796c8dcSSimon Schubert int
28355796c8dcSSimon Schubert gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
28365796c8dcSSimon Schubert {
28375796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
28385796c8dcSSimon Schubert   gdb_assert (gdbarch->in_solib_return_trampoline != NULL);
28395796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
28405796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
28415796c8dcSSimon Schubert   return gdbarch->in_solib_return_trampoline (gdbarch, pc, name);
28425796c8dcSSimon Schubert }
28435796c8dcSSimon Schubert 
28445796c8dcSSimon Schubert void
28455796c8dcSSimon Schubert set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
28465796c8dcSSimon Schubert                                         gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
28475796c8dcSSimon Schubert {
28485796c8dcSSimon Schubert   gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
28495796c8dcSSimon Schubert }
28505796c8dcSSimon Schubert 
28515796c8dcSSimon Schubert int
28525796c8dcSSimon Schubert gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
28535796c8dcSSimon Schubert {
28545796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
28555796c8dcSSimon Schubert   gdb_assert (gdbarch->in_function_epilogue_p != NULL);
28565796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
28575796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n");
28585796c8dcSSimon Schubert   return gdbarch->in_function_epilogue_p (gdbarch, addr);
28595796c8dcSSimon Schubert }
28605796c8dcSSimon Schubert 
28615796c8dcSSimon Schubert void
28625796c8dcSSimon Schubert set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch,
28635796c8dcSSimon Schubert                                     gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p)
28645796c8dcSSimon Schubert {
28655796c8dcSSimon Schubert   gdbarch->in_function_epilogue_p = in_function_epilogue_p;
28665796c8dcSSimon Schubert }
28675796c8dcSSimon Schubert 
28685796c8dcSSimon Schubert void
28695796c8dcSSimon Schubert gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
28705796c8dcSSimon Schubert {
28715796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
28725796c8dcSSimon Schubert   gdb_assert (gdbarch->elf_make_msymbol_special != NULL);
28735796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
28745796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
28755796c8dcSSimon Schubert   gdbarch->elf_make_msymbol_special (sym, msym);
28765796c8dcSSimon Schubert }
28775796c8dcSSimon Schubert 
28785796c8dcSSimon Schubert void
28795796c8dcSSimon Schubert set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
28805796c8dcSSimon Schubert                                       gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
28815796c8dcSSimon Schubert {
28825796c8dcSSimon Schubert   gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
28835796c8dcSSimon Schubert }
28845796c8dcSSimon Schubert 
28855796c8dcSSimon Schubert void
28865796c8dcSSimon Schubert gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
28875796c8dcSSimon Schubert {
28885796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
28895796c8dcSSimon Schubert   gdb_assert (gdbarch->coff_make_msymbol_special != NULL);
28905796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
28915796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
28925796c8dcSSimon Schubert   gdbarch->coff_make_msymbol_special (val, msym);
28935796c8dcSSimon Schubert }
28945796c8dcSSimon Schubert 
28955796c8dcSSimon Schubert void
28965796c8dcSSimon Schubert set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
28975796c8dcSSimon Schubert                                        gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
28985796c8dcSSimon Schubert {
28995796c8dcSSimon Schubert   gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
29005796c8dcSSimon Schubert }
29015796c8dcSSimon Schubert 
29025796c8dcSSimon Schubert int
29035796c8dcSSimon Schubert gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
29045796c8dcSSimon Schubert {
29055796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
29065796c8dcSSimon Schubert   /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
29075796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
29085796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
29095796c8dcSSimon Schubert   return gdbarch->cannot_step_breakpoint;
29105796c8dcSSimon Schubert }
29115796c8dcSSimon Schubert 
29125796c8dcSSimon Schubert void
29135796c8dcSSimon Schubert set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
29145796c8dcSSimon Schubert                                     int cannot_step_breakpoint)
29155796c8dcSSimon Schubert {
29165796c8dcSSimon Schubert   gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
29175796c8dcSSimon Schubert }
29185796c8dcSSimon Schubert 
29195796c8dcSSimon Schubert int
29205796c8dcSSimon Schubert gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
29215796c8dcSSimon Schubert {
29225796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
29235796c8dcSSimon Schubert   /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
29245796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
29255796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
29265796c8dcSSimon Schubert   return gdbarch->have_nonsteppable_watchpoint;
29275796c8dcSSimon Schubert }
29285796c8dcSSimon Schubert 
29295796c8dcSSimon Schubert void
29305796c8dcSSimon Schubert set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
29315796c8dcSSimon Schubert                                           int have_nonsteppable_watchpoint)
29325796c8dcSSimon Schubert {
29335796c8dcSSimon Schubert   gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
29345796c8dcSSimon Schubert }
29355796c8dcSSimon Schubert 
29365796c8dcSSimon Schubert int
29375796c8dcSSimon Schubert gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
29385796c8dcSSimon Schubert {
29395796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
29405796c8dcSSimon Schubert   return gdbarch->address_class_type_flags != NULL;
29415796c8dcSSimon Schubert }
29425796c8dcSSimon Schubert 
29435796c8dcSSimon Schubert int
29445796c8dcSSimon Schubert gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
29455796c8dcSSimon Schubert {
29465796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
29475796c8dcSSimon Schubert   gdb_assert (gdbarch->address_class_type_flags != NULL);
29485796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
29495796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
29505796c8dcSSimon Schubert   return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
29515796c8dcSSimon Schubert }
29525796c8dcSSimon Schubert 
29535796c8dcSSimon Schubert void
29545796c8dcSSimon Schubert set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
29555796c8dcSSimon Schubert                                       gdbarch_address_class_type_flags_ftype address_class_type_flags)
29565796c8dcSSimon Schubert {
29575796c8dcSSimon Schubert   gdbarch->address_class_type_flags = address_class_type_flags;
29585796c8dcSSimon Schubert }
29595796c8dcSSimon Schubert 
29605796c8dcSSimon Schubert int
29615796c8dcSSimon Schubert gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
29625796c8dcSSimon Schubert {
29635796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
29645796c8dcSSimon Schubert   return gdbarch->address_class_type_flags_to_name != NULL;
29655796c8dcSSimon Schubert }
29665796c8dcSSimon Schubert 
29675796c8dcSSimon Schubert const char *
29685796c8dcSSimon Schubert gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
29695796c8dcSSimon Schubert {
29705796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
29715796c8dcSSimon Schubert   gdb_assert (gdbarch->address_class_type_flags_to_name != NULL);
29725796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
29735796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
29745796c8dcSSimon Schubert   return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
29755796c8dcSSimon Schubert }
29765796c8dcSSimon Schubert 
29775796c8dcSSimon Schubert void
29785796c8dcSSimon Schubert set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
29795796c8dcSSimon Schubert                                               gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
29805796c8dcSSimon Schubert {
29815796c8dcSSimon Schubert   gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
29825796c8dcSSimon Schubert }
29835796c8dcSSimon Schubert 
29845796c8dcSSimon Schubert int
29855796c8dcSSimon Schubert gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
29865796c8dcSSimon Schubert {
29875796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
29885796c8dcSSimon Schubert   return gdbarch->address_class_name_to_type_flags != NULL;
29895796c8dcSSimon Schubert }
29905796c8dcSSimon Schubert 
29915796c8dcSSimon Schubert int
29925796c8dcSSimon Schubert gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
29935796c8dcSSimon Schubert {
29945796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
29955796c8dcSSimon Schubert   gdb_assert (gdbarch->address_class_name_to_type_flags != NULL);
29965796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
29975796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
29985796c8dcSSimon Schubert   return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
29995796c8dcSSimon Schubert }
30005796c8dcSSimon Schubert 
30015796c8dcSSimon Schubert void
30025796c8dcSSimon Schubert set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
30035796c8dcSSimon Schubert                                               gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
30045796c8dcSSimon Schubert {
30055796c8dcSSimon Schubert   gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
30065796c8dcSSimon Schubert }
30075796c8dcSSimon Schubert 
30085796c8dcSSimon Schubert int
30095796c8dcSSimon Schubert gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
30105796c8dcSSimon Schubert {
30115796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
30125796c8dcSSimon Schubert   gdb_assert (gdbarch->register_reggroup_p != NULL);
30135796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
30145796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
30155796c8dcSSimon Schubert   return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
30165796c8dcSSimon Schubert }
30175796c8dcSSimon Schubert 
30185796c8dcSSimon Schubert void
30195796c8dcSSimon Schubert set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
30205796c8dcSSimon Schubert                                  gdbarch_register_reggroup_p_ftype register_reggroup_p)
30215796c8dcSSimon Schubert {
30225796c8dcSSimon Schubert   gdbarch->register_reggroup_p = register_reggroup_p;
30235796c8dcSSimon Schubert }
30245796c8dcSSimon Schubert 
30255796c8dcSSimon Schubert int
30265796c8dcSSimon Schubert gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch)
30275796c8dcSSimon Schubert {
30285796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
30295796c8dcSSimon Schubert   return gdbarch->fetch_pointer_argument != NULL;
30305796c8dcSSimon Schubert }
30315796c8dcSSimon Schubert 
30325796c8dcSSimon Schubert CORE_ADDR
30335796c8dcSSimon Schubert gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type)
30345796c8dcSSimon Schubert {
30355796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
30365796c8dcSSimon Schubert   gdb_assert (gdbarch->fetch_pointer_argument != NULL);
30375796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
30385796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n");
30395796c8dcSSimon Schubert   return gdbarch->fetch_pointer_argument (frame, argi, type);
30405796c8dcSSimon Schubert }
30415796c8dcSSimon Schubert 
30425796c8dcSSimon Schubert void
30435796c8dcSSimon Schubert set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch,
30445796c8dcSSimon Schubert                                     gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument)
30455796c8dcSSimon Schubert {
30465796c8dcSSimon Schubert   gdbarch->fetch_pointer_argument = fetch_pointer_argument;
30475796c8dcSSimon Schubert }
30485796c8dcSSimon Schubert 
30495796c8dcSSimon Schubert int
30505796c8dcSSimon Schubert gdbarch_regset_from_core_section_p (struct gdbarch *gdbarch)
30515796c8dcSSimon Schubert {
30525796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
30535796c8dcSSimon Schubert   return gdbarch->regset_from_core_section != NULL;
30545796c8dcSSimon Schubert }
30555796c8dcSSimon Schubert 
30565796c8dcSSimon Schubert const struct regset *
30575796c8dcSSimon Schubert gdbarch_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size)
30585796c8dcSSimon Schubert {
30595796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
30605796c8dcSSimon Schubert   gdb_assert (gdbarch->regset_from_core_section != NULL);
30615796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
30625796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_regset_from_core_section called\n");
30635796c8dcSSimon Schubert   return gdbarch->regset_from_core_section (gdbarch, sect_name, sect_size);
30645796c8dcSSimon Schubert }
30655796c8dcSSimon Schubert 
30665796c8dcSSimon Schubert void
30675796c8dcSSimon Schubert set_gdbarch_regset_from_core_section (struct gdbarch *gdbarch,
30685796c8dcSSimon Schubert                                       gdbarch_regset_from_core_section_ftype regset_from_core_section)
30695796c8dcSSimon Schubert {
30705796c8dcSSimon Schubert   gdbarch->regset_from_core_section = regset_from_core_section;
30715796c8dcSSimon Schubert }
30725796c8dcSSimon Schubert 
30735796c8dcSSimon Schubert int
30745796c8dcSSimon Schubert gdbarch_core_reg_section_encodes_pid (struct gdbarch *gdbarch)
30755796c8dcSSimon Schubert {
30765796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
30775796c8dcSSimon Schubert   /* Skip verify of core_reg_section_encodes_pid, invalid_p == 0 */
30785796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
30795796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_core_reg_section_encodes_pid called\n");
30805796c8dcSSimon Schubert   return gdbarch->core_reg_section_encodes_pid;
30815796c8dcSSimon Schubert }
30825796c8dcSSimon Schubert 
30835796c8dcSSimon Schubert void
30845796c8dcSSimon Schubert set_gdbarch_core_reg_section_encodes_pid (struct gdbarch *gdbarch,
30855796c8dcSSimon Schubert                                           int core_reg_section_encodes_pid)
30865796c8dcSSimon Schubert {
30875796c8dcSSimon Schubert   gdbarch->core_reg_section_encodes_pid = core_reg_section_encodes_pid;
30885796c8dcSSimon Schubert }
30895796c8dcSSimon Schubert 
30905796c8dcSSimon Schubert struct core_regset_section *
30915796c8dcSSimon Schubert gdbarch_core_regset_sections (struct gdbarch *gdbarch)
30925796c8dcSSimon Schubert {
30935796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
30945796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
30955796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_core_regset_sections called\n");
30965796c8dcSSimon Schubert   return gdbarch->core_regset_sections;
30975796c8dcSSimon Schubert }
30985796c8dcSSimon Schubert 
30995796c8dcSSimon Schubert void
31005796c8dcSSimon Schubert set_gdbarch_core_regset_sections (struct gdbarch *gdbarch,
31015796c8dcSSimon Schubert                                   struct core_regset_section * core_regset_sections)
31025796c8dcSSimon Schubert {
31035796c8dcSSimon Schubert   gdbarch->core_regset_sections = core_regset_sections;
31045796c8dcSSimon Schubert }
31055796c8dcSSimon Schubert 
31065796c8dcSSimon Schubert int
31075796c8dcSSimon Schubert gdbarch_core_xfer_shared_libraries_p (struct gdbarch *gdbarch)
31085796c8dcSSimon Schubert {
31095796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
31105796c8dcSSimon Schubert   return gdbarch->core_xfer_shared_libraries != NULL;
31115796c8dcSSimon Schubert }
31125796c8dcSSimon Schubert 
31135796c8dcSSimon Schubert LONGEST
31145796c8dcSSimon Schubert gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, LONGEST len)
31155796c8dcSSimon Schubert {
31165796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
31175796c8dcSSimon Schubert   gdb_assert (gdbarch->core_xfer_shared_libraries != NULL);
31185796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
31195796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_core_xfer_shared_libraries called\n");
31205796c8dcSSimon Schubert   return gdbarch->core_xfer_shared_libraries (gdbarch, readbuf, offset, len);
31215796c8dcSSimon Schubert }
31225796c8dcSSimon Schubert 
31235796c8dcSSimon Schubert void
31245796c8dcSSimon Schubert set_gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch,
31255796c8dcSSimon Schubert                                         gdbarch_core_xfer_shared_libraries_ftype core_xfer_shared_libraries)
31265796c8dcSSimon Schubert {
31275796c8dcSSimon Schubert   gdbarch->core_xfer_shared_libraries = core_xfer_shared_libraries;
31285796c8dcSSimon Schubert }
31295796c8dcSSimon Schubert 
31305796c8dcSSimon Schubert int
31315796c8dcSSimon Schubert gdbarch_core_pid_to_str_p (struct gdbarch *gdbarch)
31325796c8dcSSimon Schubert {
31335796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
31345796c8dcSSimon Schubert   return gdbarch->core_pid_to_str != NULL;
31355796c8dcSSimon Schubert }
31365796c8dcSSimon Schubert 
31375796c8dcSSimon Schubert char *
31385796c8dcSSimon Schubert gdbarch_core_pid_to_str (struct gdbarch *gdbarch, ptid_t ptid)
31395796c8dcSSimon Schubert {
31405796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
31415796c8dcSSimon Schubert   gdb_assert (gdbarch->core_pid_to_str != NULL);
31425796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
31435796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_core_pid_to_str called\n");
31445796c8dcSSimon Schubert   return gdbarch->core_pid_to_str (gdbarch, ptid);
31455796c8dcSSimon Schubert }
31465796c8dcSSimon Schubert 
31475796c8dcSSimon Schubert void
31485796c8dcSSimon Schubert set_gdbarch_core_pid_to_str (struct gdbarch *gdbarch,
31495796c8dcSSimon Schubert                              gdbarch_core_pid_to_str_ftype core_pid_to_str)
31505796c8dcSSimon Schubert {
31515796c8dcSSimon Schubert   gdbarch->core_pid_to_str = core_pid_to_str;
31525796c8dcSSimon Schubert }
31535796c8dcSSimon Schubert 
31545796c8dcSSimon Schubert int
31555796c8dcSSimon Schubert gdbarch_gcore_bfd_target_p (struct gdbarch *gdbarch)
31565796c8dcSSimon Schubert {
31575796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
31585796c8dcSSimon Schubert   return gdbarch->gcore_bfd_target != 0;
31595796c8dcSSimon Schubert }
31605796c8dcSSimon Schubert 
31615796c8dcSSimon Schubert const char *
31625796c8dcSSimon Schubert gdbarch_gcore_bfd_target (struct gdbarch *gdbarch)
31635796c8dcSSimon Schubert {
31645796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
31655796c8dcSSimon Schubert   /* Check variable changed from pre-default.  */
31665796c8dcSSimon Schubert   gdb_assert (gdbarch->gcore_bfd_target != 0);
31675796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
31685796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_gcore_bfd_target called\n");
31695796c8dcSSimon Schubert   return gdbarch->gcore_bfd_target;
31705796c8dcSSimon Schubert }
31715796c8dcSSimon Schubert 
31725796c8dcSSimon Schubert void
31735796c8dcSSimon Schubert set_gdbarch_gcore_bfd_target (struct gdbarch *gdbarch,
31745796c8dcSSimon Schubert                               const char * gcore_bfd_target)
31755796c8dcSSimon Schubert {
31765796c8dcSSimon Schubert   gdbarch->gcore_bfd_target = gcore_bfd_target;
31775796c8dcSSimon Schubert }
31785796c8dcSSimon Schubert 
31795796c8dcSSimon Schubert int
31805796c8dcSSimon Schubert gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch)
31815796c8dcSSimon Schubert {
31825796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
31835796c8dcSSimon Schubert   /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
31845796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
31855796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_vtable_function_descriptors called\n");
31865796c8dcSSimon Schubert   return gdbarch->vtable_function_descriptors;
31875796c8dcSSimon Schubert }
31885796c8dcSSimon Schubert 
31895796c8dcSSimon Schubert void
31905796c8dcSSimon Schubert set_gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch,
31915796c8dcSSimon Schubert                                          int vtable_function_descriptors)
31925796c8dcSSimon Schubert {
31935796c8dcSSimon Schubert   gdbarch->vtable_function_descriptors = vtable_function_descriptors;
31945796c8dcSSimon Schubert }
31955796c8dcSSimon Schubert 
31965796c8dcSSimon Schubert int
31975796c8dcSSimon Schubert gdbarch_vbit_in_delta (struct gdbarch *gdbarch)
31985796c8dcSSimon Schubert {
31995796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
32005796c8dcSSimon Schubert   /* Skip verify of vbit_in_delta, invalid_p == 0 */
32015796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
32025796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_vbit_in_delta called\n");
32035796c8dcSSimon Schubert   return gdbarch->vbit_in_delta;
32045796c8dcSSimon Schubert }
32055796c8dcSSimon Schubert 
32065796c8dcSSimon Schubert void
32075796c8dcSSimon Schubert set_gdbarch_vbit_in_delta (struct gdbarch *gdbarch,
32085796c8dcSSimon Schubert                            int vbit_in_delta)
32095796c8dcSSimon Schubert {
32105796c8dcSSimon Schubert   gdbarch->vbit_in_delta = vbit_in_delta;
32115796c8dcSSimon Schubert }
32125796c8dcSSimon Schubert 
32135796c8dcSSimon Schubert int
32145796c8dcSSimon Schubert gdbarch_skip_permanent_breakpoint_p (struct gdbarch *gdbarch)
32155796c8dcSSimon Schubert {
32165796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
32175796c8dcSSimon Schubert   return gdbarch->skip_permanent_breakpoint != NULL;
32185796c8dcSSimon Schubert }
32195796c8dcSSimon Schubert 
32205796c8dcSSimon Schubert void
32215796c8dcSSimon Schubert gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch, struct regcache *regcache)
32225796c8dcSSimon Schubert {
32235796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
32245796c8dcSSimon Schubert   gdb_assert (gdbarch->skip_permanent_breakpoint != NULL);
32255796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
32265796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_permanent_breakpoint called\n");
32275796c8dcSSimon Schubert   gdbarch->skip_permanent_breakpoint (regcache);
32285796c8dcSSimon Schubert }
32295796c8dcSSimon Schubert 
32305796c8dcSSimon Schubert void
32315796c8dcSSimon Schubert set_gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch,
32325796c8dcSSimon Schubert                                        gdbarch_skip_permanent_breakpoint_ftype skip_permanent_breakpoint)
32335796c8dcSSimon Schubert {
32345796c8dcSSimon Schubert   gdbarch->skip_permanent_breakpoint = skip_permanent_breakpoint;
32355796c8dcSSimon Schubert }
32365796c8dcSSimon Schubert 
32375796c8dcSSimon Schubert int
32385796c8dcSSimon Schubert gdbarch_max_insn_length_p (struct gdbarch *gdbarch)
32395796c8dcSSimon Schubert {
32405796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
32415796c8dcSSimon Schubert   return gdbarch->max_insn_length != 0;
32425796c8dcSSimon Schubert }
32435796c8dcSSimon Schubert 
32445796c8dcSSimon Schubert ULONGEST
32455796c8dcSSimon Schubert gdbarch_max_insn_length (struct gdbarch *gdbarch)
32465796c8dcSSimon Schubert {
32475796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
32485796c8dcSSimon Schubert   /* Check variable changed from pre-default.  */
32495796c8dcSSimon Schubert   gdb_assert (gdbarch->max_insn_length != 0);
32505796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
32515796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_max_insn_length called\n");
32525796c8dcSSimon Schubert   return gdbarch->max_insn_length;
32535796c8dcSSimon Schubert }
32545796c8dcSSimon Schubert 
32555796c8dcSSimon Schubert void
32565796c8dcSSimon Schubert set_gdbarch_max_insn_length (struct gdbarch *gdbarch,
32575796c8dcSSimon Schubert                              ULONGEST max_insn_length)
32585796c8dcSSimon Schubert {
32595796c8dcSSimon Schubert   gdbarch->max_insn_length = max_insn_length;
32605796c8dcSSimon Schubert }
32615796c8dcSSimon Schubert 
32625796c8dcSSimon Schubert int
32635796c8dcSSimon Schubert gdbarch_displaced_step_copy_insn_p (struct gdbarch *gdbarch)
32645796c8dcSSimon Schubert {
32655796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
32665796c8dcSSimon Schubert   return gdbarch->displaced_step_copy_insn != NULL;
32675796c8dcSSimon Schubert }
32685796c8dcSSimon Schubert 
32695796c8dcSSimon Schubert struct displaced_step_closure *
32705796c8dcSSimon Schubert gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch, CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
32715796c8dcSSimon Schubert {
32725796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
32735796c8dcSSimon Schubert   gdb_assert (gdbarch->displaced_step_copy_insn != NULL);
32745796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
32755796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_copy_insn called\n");
32765796c8dcSSimon Schubert   return gdbarch->displaced_step_copy_insn (gdbarch, from, to, regs);
32775796c8dcSSimon Schubert }
32785796c8dcSSimon Schubert 
32795796c8dcSSimon Schubert void
32805796c8dcSSimon Schubert set_gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch,
32815796c8dcSSimon Schubert                                       gdbarch_displaced_step_copy_insn_ftype displaced_step_copy_insn)
32825796c8dcSSimon Schubert {
32835796c8dcSSimon Schubert   gdbarch->displaced_step_copy_insn = displaced_step_copy_insn;
32845796c8dcSSimon Schubert }
32855796c8dcSSimon Schubert 
32865796c8dcSSimon Schubert int
32875796c8dcSSimon Schubert gdbarch_displaced_step_hw_singlestep (struct gdbarch *gdbarch, struct displaced_step_closure *closure)
32885796c8dcSSimon Schubert {
32895796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
32905796c8dcSSimon Schubert   gdb_assert (gdbarch->displaced_step_hw_singlestep != NULL);
32915796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
32925796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_hw_singlestep called\n");
32935796c8dcSSimon Schubert   return gdbarch->displaced_step_hw_singlestep (gdbarch, closure);
32945796c8dcSSimon Schubert }
32955796c8dcSSimon Schubert 
32965796c8dcSSimon Schubert void
32975796c8dcSSimon Schubert set_gdbarch_displaced_step_hw_singlestep (struct gdbarch *gdbarch,
32985796c8dcSSimon Schubert                                           gdbarch_displaced_step_hw_singlestep_ftype displaced_step_hw_singlestep)
32995796c8dcSSimon Schubert {
33005796c8dcSSimon Schubert   gdbarch->displaced_step_hw_singlestep = displaced_step_hw_singlestep;
33015796c8dcSSimon Schubert }
33025796c8dcSSimon Schubert 
33035796c8dcSSimon Schubert int
33045796c8dcSSimon Schubert gdbarch_displaced_step_fixup_p (struct gdbarch *gdbarch)
33055796c8dcSSimon Schubert {
33065796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
33075796c8dcSSimon Schubert   return gdbarch->displaced_step_fixup != NULL;
33085796c8dcSSimon Schubert }
33095796c8dcSSimon Schubert 
33105796c8dcSSimon Schubert void
33115796c8dcSSimon Schubert gdbarch_displaced_step_fixup (struct gdbarch *gdbarch, struct displaced_step_closure *closure, CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
33125796c8dcSSimon Schubert {
33135796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
33145796c8dcSSimon Schubert   gdb_assert (gdbarch->displaced_step_fixup != NULL);
33155796c8dcSSimon Schubert   /* Do not check predicate: gdbarch->displaced_step_fixup != NULL, allow call.  */
33165796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
33175796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_fixup called\n");
33185796c8dcSSimon Schubert   gdbarch->displaced_step_fixup (gdbarch, closure, from, to, regs);
33195796c8dcSSimon Schubert }
33205796c8dcSSimon Schubert 
33215796c8dcSSimon Schubert void
33225796c8dcSSimon Schubert set_gdbarch_displaced_step_fixup (struct gdbarch *gdbarch,
33235796c8dcSSimon Schubert                                   gdbarch_displaced_step_fixup_ftype displaced_step_fixup)
33245796c8dcSSimon Schubert {
33255796c8dcSSimon Schubert   gdbarch->displaced_step_fixup = displaced_step_fixup;
33265796c8dcSSimon Schubert }
33275796c8dcSSimon Schubert 
33285796c8dcSSimon Schubert void
33295796c8dcSSimon Schubert gdbarch_displaced_step_free_closure (struct gdbarch *gdbarch, struct displaced_step_closure *closure)
33305796c8dcSSimon Schubert {
33315796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
33325796c8dcSSimon Schubert   gdb_assert (gdbarch->displaced_step_free_closure != NULL);
33335796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
33345796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_free_closure called\n");
33355796c8dcSSimon Schubert   gdbarch->displaced_step_free_closure (gdbarch, closure);
33365796c8dcSSimon Schubert }
33375796c8dcSSimon Schubert 
33385796c8dcSSimon Schubert void
33395796c8dcSSimon Schubert set_gdbarch_displaced_step_free_closure (struct gdbarch *gdbarch,
33405796c8dcSSimon Schubert                                          gdbarch_displaced_step_free_closure_ftype displaced_step_free_closure)
33415796c8dcSSimon Schubert {
33425796c8dcSSimon Schubert   gdbarch->displaced_step_free_closure = displaced_step_free_closure;
33435796c8dcSSimon Schubert }
33445796c8dcSSimon Schubert 
33455796c8dcSSimon Schubert CORE_ADDR
33465796c8dcSSimon Schubert gdbarch_displaced_step_location (struct gdbarch *gdbarch)
33475796c8dcSSimon Schubert {
33485796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
33495796c8dcSSimon Schubert   gdb_assert (gdbarch->displaced_step_location != NULL);
33505796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
33515796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_location called\n");
33525796c8dcSSimon Schubert   return gdbarch->displaced_step_location (gdbarch);
33535796c8dcSSimon Schubert }
33545796c8dcSSimon Schubert 
33555796c8dcSSimon Schubert void
33565796c8dcSSimon Schubert set_gdbarch_displaced_step_location (struct gdbarch *gdbarch,
33575796c8dcSSimon Schubert                                      gdbarch_displaced_step_location_ftype displaced_step_location)
33585796c8dcSSimon Schubert {
33595796c8dcSSimon Schubert   gdbarch->displaced_step_location = displaced_step_location;
33605796c8dcSSimon Schubert }
33615796c8dcSSimon Schubert 
33625796c8dcSSimon Schubert int
3363*cf7f2e2dSJohn Marino gdbarch_relocate_instruction_p (struct gdbarch *gdbarch)
3364*cf7f2e2dSJohn Marino {
3365*cf7f2e2dSJohn Marino   gdb_assert (gdbarch != NULL);
3366*cf7f2e2dSJohn Marino   return gdbarch->relocate_instruction != NULL;
3367*cf7f2e2dSJohn Marino }
3368*cf7f2e2dSJohn Marino 
3369*cf7f2e2dSJohn Marino void
3370*cf7f2e2dSJohn Marino gdbarch_relocate_instruction (struct gdbarch *gdbarch, CORE_ADDR *to, CORE_ADDR from)
3371*cf7f2e2dSJohn Marino {
3372*cf7f2e2dSJohn Marino   gdb_assert (gdbarch != NULL);
3373*cf7f2e2dSJohn Marino   gdb_assert (gdbarch->relocate_instruction != NULL);
3374*cf7f2e2dSJohn Marino   /* Do not check predicate: gdbarch->relocate_instruction != NULL, allow call.  */
3375*cf7f2e2dSJohn Marino   if (gdbarch_debug >= 2)
3376*cf7f2e2dSJohn Marino     fprintf_unfiltered (gdb_stdlog, "gdbarch_relocate_instruction called\n");
3377*cf7f2e2dSJohn Marino   gdbarch->relocate_instruction (gdbarch, to, from);
3378*cf7f2e2dSJohn Marino }
3379*cf7f2e2dSJohn Marino 
3380*cf7f2e2dSJohn Marino void
3381*cf7f2e2dSJohn Marino set_gdbarch_relocate_instruction (struct gdbarch *gdbarch,
3382*cf7f2e2dSJohn Marino                                   gdbarch_relocate_instruction_ftype relocate_instruction)
3383*cf7f2e2dSJohn Marino {
3384*cf7f2e2dSJohn Marino   gdbarch->relocate_instruction = relocate_instruction;
3385*cf7f2e2dSJohn Marino }
3386*cf7f2e2dSJohn Marino 
3387*cf7f2e2dSJohn Marino int
33885796c8dcSSimon Schubert gdbarch_overlay_update_p (struct gdbarch *gdbarch)
33895796c8dcSSimon Schubert {
33905796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
33915796c8dcSSimon Schubert   return gdbarch->overlay_update != NULL;
33925796c8dcSSimon Schubert }
33935796c8dcSSimon Schubert 
33945796c8dcSSimon Schubert void
33955796c8dcSSimon Schubert gdbarch_overlay_update (struct gdbarch *gdbarch, struct obj_section *osect)
33965796c8dcSSimon Schubert {
33975796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
33985796c8dcSSimon Schubert   gdb_assert (gdbarch->overlay_update != NULL);
33995796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
34005796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_overlay_update called\n");
34015796c8dcSSimon Schubert   gdbarch->overlay_update (osect);
34025796c8dcSSimon Schubert }
34035796c8dcSSimon Schubert 
34045796c8dcSSimon Schubert void
34055796c8dcSSimon Schubert set_gdbarch_overlay_update (struct gdbarch *gdbarch,
34065796c8dcSSimon Schubert                             gdbarch_overlay_update_ftype overlay_update)
34075796c8dcSSimon Schubert {
34085796c8dcSSimon Schubert   gdbarch->overlay_update = overlay_update;
34095796c8dcSSimon Schubert }
34105796c8dcSSimon Schubert 
34115796c8dcSSimon Schubert int
34125796c8dcSSimon Schubert gdbarch_core_read_description_p (struct gdbarch *gdbarch)
34135796c8dcSSimon Schubert {
34145796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
34155796c8dcSSimon Schubert   return gdbarch->core_read_description != NULL;
34165796c8dcSSimon Schubert }
34175796c8dcSSimon Schubert 
34185796c8dcSSimon Schubert const struct target_desc *
34195796c8dcSSimon Schubert gdbarch_core_read_description (struct gdbarch *gdbarch, struct target_ops *target, bfd *abfd)
34205796c8dcSSimon Schubert {
34215796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
34225796c8dcSSimon Schubert   gdb_assert (gdbarch->core_read_description != NULL);
34235796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
34245796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_core_read_description called\n");
34255796c8dcSSimon Schubert   return gdbarch->core_read_description (gdbarch, target, abfd);
34265796c8dcSSimon Schubert }
34275796c8dcSSimon Schubert 
34285796c8dcSSimon Schubert void
34295796c8dcSSimon Schubert set_gdbarch_core_read_description (struct gdbarch *gdbarch,
34305796c8dcSSimon Schubert                                    gdbarch_core_read_description_ftype core_read_description)
34315796c8dcSSimon Schubert {
34325796c8dcSSimon Schubert   gdbarch->core_read_description = core_read_description;
34335796c8dcSSimon Schubert }
34345796c8dcSSimon Schubert 
34355796c8dcSSimon Schubert int
34365796c8dcSSimon Schubert gdbarch_static_transform_name_p (struct gdbarch *gdbarch)
34375796c8dcSSimon Schubert {
34385796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
34395796c8dcSSimon Schubert   return gdbarch->static_transform_name != NULL;
34405796c8dcSSimon Schubert }
34415796c8dcSSimon Schubert 
34425796c8dcSSimon Schubert char *
34435796c8dcSSimon Schubert gdbarch_static_transform_name (struct gdbarch *gdbarch, char *name)
34445796c8dcSSimon Schubert {
34455796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
34465796c8dcSSimon Schubert   gdb_assert (gdbarch->static_transform_name != NULL);
34475796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
34485796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_static_transform_name called\n");
34495796c8dcSSimon Schubert   return gdbarch->static_transform_name (name);
34505796c8dcSSimon Schubert }
34515796c8dcSSimon Schubert 
34525796c8dcSSimon Schubert void
34535796c8dcSSimon Schubert set_gdbarch_static_transform_name (struct gdbarch *gdbarch,
34545796c8dcSSimon Schubert                                    gdbarch_static_transform_name_ftype static_transform_name)
34555796c8dcSSimon Schubert {
34565796c8dcSSimon Schubert   gdbarch->static_transform_name = static_transform_name;
34575796c8dcSSimon Schubert }
34585796c8dcSSimon Schubert 
34595796c8dcSSimon Schubert int
34605796c8dcSSimon Schubert gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch)
34615796c8dcSSimon Schubert {
34625796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
34635796c8dcSSimon Schubert   /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
34645796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
34655796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_sofun_address_maybe_missing called\n");
34665796c8dcSSimon Schubert   return gdbarch->sofun_address_maybe_missing;
34675796c8dcSSimon Schubert }
34685796c8dcSSimon Schubert 
34695796c8dcSSimon Schubert void
34705796c8dcSSimon Schubert set_gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch,
34715796c8dcSSimon Schubert                                          int sofun_address_maybe_missing)
34725796c8dcSSimon Schubert {
34735796c8dcSSimon Schubert   gdbarch->sofun_address_maybe_missing = sofun_address_maybe_missing;
34745796c8dcSSimon Schubert }
34755796c8dcSSimon Schubert 
34765796c8dcSSimon Schubert int
34775796c8dcSSimon Schubert gdbarch_process_record_p (struct gdbarch *gdbarch)
34785796c8dcSSimon Schubert {
34795796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
34805796c8dcSSimon Schubert   return gdbarch->process_record != NULL;
34815796c8dcSSimon Schubert }
34825796c8dcSSimon Schubert 
34835796c8dcSSimon Schubert int
34845796c8dcSSimon Schubert gdbarch_process_record (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR addr)
34855796c8dcSSimon Schubert {
34865796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
34875796c8dcSSimon Schubert   gdb_assert (gdbarch->process_record != NULL);
34885796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
34895796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_process_record called\n");
34905796c8dcSSimon Schubert   return gdbarch->process_record (gdbarch, regcache, addr);
34915796c8dcSSimon Schubert }
34925796c8dcSSimon Schubert 
34935796c8dcSSimon Schubert void
34945796c8dcSSimon Schubert set_gdbarch_process_record (struct gdbarch *gdbarch,
34955796c8dcSSimon Schubert                             gdbarch_process_record_ftype process_record)
34965796c8dcSSimon Schubert {
34975796c8dcSSimon Schubert   gdbarch->process_record = process_record;
34985796c8dcSSimon Schubert }
34995796c8dcSSimon Schubert 
35005796c8dcSSimon Schubert int
35015796c8dcSSimon Schubert gdbarch_process_record_signal_p (struct gdbarch *gdbarch)
35025796c8dcSSimon Schubert {
35035796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
35045796c8dcSSimon Schubert   return gdbarch->process_record_signal != NULL;
35055796c8dcSSimon Schubert }
35065796c8dcSSimon Schubert 
35075796c8dcSSimon Schubert int
35085796c8dcSSimon Schubert gdbarch_process_record_signal (struct gdbarch *gdbarch, struct regcache *regcache, enum target_signal signal)
35095796c8dcSSimon Schubert {
35105796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
35115796c8dcSSimon Schubert   gdb_assert (gdbarch->process_record_signal != NULL);
35125796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
35135796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_process_record_signal called\n");
35145796c8dcSSimon Schubert   return gdbarch->process_record_signal (gdbarch, regcache, signal);
35155796c8dcSSimon Schubert }
35165796c8dcSSimon Schubert 
35175796c8dcSSimon Schubert void
35185796c8dcSSimon Schubert set_gdbarch_process_record_signal (struct gdbarch *gdbarch,
35195796c8dcSSimon Schubert                                    gdbarch_process_record_signal_ftype process_record_signal)
35205796c8dcSSimon Schubert {
35215796c8dcSSimon Schubert   gdbarch->process_record_signal = process_record_signal;
35225796c8dcSSimon Schubert }
35235796c8dcSSimon Schubert 
35245796c8dcSSimon Schubert enum target_signal
35255796c8dcSSimon Schubert gdbarch_target_signal_from_host (struct gdbarch *gdbarch, int signo)
35265796c8dcSSimon Schubert {
35275796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
35285796c8dcSSimon Schubert   gdb_assert (gdbarch->target_signal_from_host != NULL);
35295796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
35305796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_target_signal_from_host called\n");
35315796c8dcSSimon Schubert   return gdbarch->target_signal_from_host (gdbarch, signo);
35325796c8dcSSimon Schubert }
35335796c8dcSSimon Schubert 
35345796c8dcSSimon Schubert void
35355796c8dcSSimon Schubert set_gdbarch_target_signal_from_host (struct gdbarch *gdbarch,
35365796c8dcSSimon Schubert                                      gdbarch_target_signal_from_host_ftype target_signal_from_host)
35375796c8dcSSimon Schubert {
35385796c8dcSSimon Schubert   gdbarch->target_signal_from_host = target_signal_from_host;
35395796c8dcSSimon Schubert }
35405796c8dcSSimon Schubert 
35415796c8dcSSimon Schubert int
35425796c8dcSSimon Schubert gdbarch_target_signal_to_host (struct gdbarch *gdbarch, enum target_signal ts)
35435796c8dcSSimon Schubert {
35445796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
35455796c8dcSSimon Schubert   gdb_assert (gdbarch->target_signal_to_host != NULL);
35465796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
35475796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_target_signal_to_host called\n");
35485796c8dcSSimon Schubert   return gdbarch->target_signal_to_host (gdbarch, ts);
35495796c8dcSSimon Schubert }
35505796c8dcSSimon Schubert 
35515796c8dcSSimon Schubert void
35525796c8dcSSimon Schubert set_gdbarch_target_signal_to_host (struct gdbarch *gdbarch,
35535796c8dcSSimon Schubert                                    gdbarch_target_signal_to_host_ftype target_signal_to_host)
35545796c8dcSSimon Schubert {
35555796c8dcSSimon Schubert   gdbarch->target_signal_to_host = target_signal_to_host;
35565796c8dcSSimon Schubert }
35575796c8dcSSimon Schubert 
35585796c8dcSSimon Schubert int
35595796c8dcSSimon Schubert gdbarch_get_siginfo_type_p (struct gdbarch *gdbarch)
35605796c8dcSSimon Schubert {
35615796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
35625796c8dcSSimon Schubert   return gdbarch->get_siginfo_type != NULL;
35635796c8dcSSimon Schubert }
35645796c8dcSSimon Schubert 
35655796c8dcSSimon Schubert struct type *
35665796c8dcSSimon Schubert gdbarch_get_siginfo_type (struct gdbarch *gdbarch)
35675796c8dcSSimon Schubert {
35685796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
35695796c8dcSSimon Schubert   gdb_assert (gdbarch->get_siginfo_type != NULL);
35705796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
35715796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_get_siginfo_type called\n");
35725796c8dcSSimon Schubert   return gdbarch->get_siginfo_type (gdbarch);
35735796c8dcSSimon Schubert }
35745796c8dcSSimon Schubert 
35755796c8dcSSimon Schubert void
35765796c8dcSSimon Schubert set_gdbarch_get_siginfo_type (struct gdbarch *gdbarch,
35775796c8dcSSimon Schubert                               gdbarch_get_siginfo_type_ftype get_siginfo_type)
35785796c8dcSSimon Schubert {
35795796c8dcSSimon Schubert   gdbarch->get_siginfo_type = get_siginfo_type;
35805796c8dcSSimon Schubert }
35815796c8dcSSimon Schubert 
35825796c8dcSSimon Schubert int
35835796c8dcSSimon Schubert gdbarch_record_special_symbol_p (struct gdbarch *gdbarch)
35845796c8dcSSimon Schubert {
35855796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
35865796c8dcSSimon Schubert   return gdbarch->record_special_symbol != NULL;
35875796c8dcSSimon Schubert }
35885796c8dcSSimon Schubert 
35895796c8dcSSimon Schubert void
35905796c8dcSSimon Schubert gdbarch_record_special_symbol (struct gdbarch *gdbarch, struct objfile *objfile, asymbol *sym)
35915796c8dcSSimon Schubert {
35925796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
35935796c8dcSSimon Schubert   gdb_assert (gdbarch->record_special_symbol != NULL);
35945796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
35955796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_record_special_symbol called\n");
35965796c8dcSSimon Schubert   gdbarch->record_special_symbol (gdbarch, objfile, sym);
35975796c8dcSSimon Schubert }
35985796c8dcSSimon Schubert 
35995796c8dcSSimon Schubert void
36005796c8dcSSimon Schubert set_gdbarch_record_special_symbol (struct gdbarch *gdbarch,
36015796c8dcSSimon Schubert                                    gdbarch_record_special_symbol_ftype record_special_symbol)
36025796c8dcSSimon Schubert {
36035796c8dcSSimon Schubert   gdbarch->record_special_symbol = record_special_symbol;
36045796c8dcSSimon Schubert }
36055796c8dcSSimon Schubert 
36065796c8dcSSimon Schubert int
36075796c8dcSSimon Schubert gdbarch_get_syscall_number_p (struct gdbarch *gdbarch)
36085796c8dcSSimon Schubert {
36095796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
36105796c8dcSSimon Schubert   return gdbarch->get_syscall_number != NULL;
36115796c8dcSSimon Schubert }
36125796c8dcSSimon Schubert 
36135796c8dcSSimon Schubert LONGEST
36145796c8dcSSimon Schubert gdbarch_get_syscall_number (struct gdbarch *gdbarch, ptid_t ptid)
36155796c8dcSSimon Schubert {
36165796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
36175796c8dcSSimon Schubert   gdb_assert (gdbarch->get_syscall_number != NULL);
36185796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
36195796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_get_syscall_number called\n");
36205796c8dcSSimon Schubert   return gdbarch->get_syscall_number (gdbarch, ptid);
36215796c8dcSSimon Schubert }
36225796c8dcSSimon Schubert 
36235796c8dcSSimon Schubert void
36245796c8dcSSimon Schubert set_gdbarch_get_syscall_number (struct gdbarch *gdbarch,
36255796c8dcSSimon Schubert                                 gdbarch_get_syscall_number_ftype get_syscall_number)
36265796c8dcSSimon Schubert {
36275796c8dcSSimon Schubert   gdbarch->get_syscall_number = get_syscall_number;
36285796c8dcSSimon Schubert }
36295796c8dcSSimon Schubert 
36305796c8dcSSimon Schubert int
36315796c8dcSSimon Schubert gdbarch_has_global_solist (struct gdbarch *gdbarch)
36325796c8dcSSimon Schubert {
36335796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
36345796c8dcSSimon Schubert   /* Skip verify of has_global_solist, invalid_p == 0 */
36355796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
36365796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_has_global_solist called\n");
36375796c8dcSSimon Schubert   return gdbarch->has_global_solist;
36385796c8dcSSimon Schubert }
36395796c8dcSSimon Schubert 
36405796c8dcSSimon Schubert void
36415796c8dcSSimon Schubert set_gdbarch_has_global_solist (struct gdbarch *gdbarch,
36425796c8dcSSimon Schubert                                int has_global_solist)
36435796c8dcSSimon Schubert {
36445796c8dcSSimon Schubert   gdbarch->has_global_solist = has_global_solist;
36455796c8dcSSimon Schubert }
36465796c8dcSSimon Schubert 
36475796c8dcSSimon Schubert int
36485796c8dcSSimon Schubert gdbarch_has_global_breakpoints (struct gdbarch *gdbarch)
36495796c8dcSSimon Schubert {
36505796c8dcSSimon Schubert   gdb_assert (gdbarch != NULL);
36515796c8dcSSimon Schubert   /* Skip verify of has_global_breakpoints, invalid_p == 0 */
36525796c8dcSSimon Schubert   if (gdbarch_debug >= 2)
36535796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_has_global_breakpoints called\n");
36545796c8dcSSimon Schubert   return gdbarch->has_global_breakpoints;
36555796c8dcSSimon Schubert }
36565796c8dcSSimon Schubert 
36575796c8dcSSimon Schubert void
36585796c8dcSSimon Schubert set_gdbarch_has_global_breakpoints (struct gdbarch *gdbarch,
36595796c8dcSSimon Schubert                                     int has_global_breakpoints)
36605796c8dcSSimon Schubert {
36615796c8dcSSimon Schubert   gdbarch->has_global_breakpoints = has_global_breakpoints;
36625796c8dcSSimon Schubert }
36635796c8dcSSimon Schubert 
3664*cf7f2e2dSJohn Marino int
3665*cf7f2e2dSJohn Marino gdbarch_has_shared_address_space (struct gdbarch *gdbarch)
3666*cf7f2e2dSJohn Marino {
3667*cf7f2e2dSJohn Marino   gdb_assert (gdbarch != NULL);
3668*cf7f2e2dSJohn Marino   gdb_assert (gdbarch->has_shared_address_space != NULL);
3669*cf7f2e2dSJohn Marino   if (gdbarch_debug >= 2)
3670*cf7f2e2dSJohn Marino     fprintf_unfiltered (gdb_stdlog, "gdbarch_has_shared_address_space called\n");
3671*cf7f2e2dSJohn Marino   return gdbarch->has_shared_address_space (gdbarch);
3672*cf7f2e2dSJohn Marino }
3673*cf7f2e2dSJohn Marino 
3674*cf7f2e2dSJohn Marino void
3675*cf7f2e2dSJohn Marino set_gdbarch_has_shared_address_space (struct gdbarch *gdbarch,
3676*cf7f2e2dSJohn Marino                                       gdbarch_has_shared_address_space_ftype has_shared_address_space)
3677*cf7f2e2dSJohn Marino {
3678*cf7f2e2dSJohn Marino   gdbarch->has_shared_address_space = has_shared_address_space;
3679*cf7f2e2dSJohn Marino }
3680*cf7f2e2dSJohn Marino 
3681*cf7f2e2dSJohn Marino int
3682*cf7f2e2dSJohn Marino gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch, CORE_ADDR addr, int *isize, char **msg)
3683*cf7f2e2dSJohn Marino {
3684*cf7f2e2dSJohn Marino   gdb_assert (gdbarch != NULL);
3685*cf7f2e2dSJohn Marino   gdb_assert (gdbarch->fast_tracepoint_valid_at != NULL);
3686*cf7f2e2dSJohn Marino   if (gdbarch_debug >= 2)
3687*cf7f2e2dSJohn Marino     fprintf_unfiltered (gdb_stdlog, "gdbarch_fast_tracepoint_valid_at called\n");
3688*cf7f2e2dSJohn Marino   return gdbarch->fast_tracepoint_valid_at (gdbarch, addr, isize, msg);
3689*cf7f2e2dSJohn Marino }
3690*cf7f2e2dSJohn Marino 
3691*cf7f2e2dSJohn Marino void
3692*cf7f2e2dSJohn Marino set_gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch,
3693*cf7f2e2dSJohn Marino                                       gdbarch_fast_tracepoint_valid_at_ftype fast_tracepoint_valid_at)
3694*cf7f2e2dSJohn Marino {
3695*cf7f2e2dSJohn Marino   gdbarch->fast_tracepoint_valid_at = fast_tracepoint_valid_at;
3696*cf7f2e2dSJohn Marino }
3697*cf7f2e2dSJohn Marino 
3698*cf7f2e2dSJohn Marino const char *
3699*cf7f2e2dSJohn Marino gdbarch_auto_charset (struct gdbarch *gdbarch)
3700*cf7f2e2dSJohn Marino {
3701*cf7f2e2dSJohn Marino   gdb_assert (gdbarch != NULL);
3702*cf7f2e2dSJohn Marino   gdb_assert (gdbarch->auto_charset != NULL);
3703*cf7f2e2dSJohn Marino   if (gdbarch_debug >= 2)
3704*cf7f2e2dSJohn Marino     fprintf_unfiltered (gdb_stdlog, "gdbarch_auto_charset called\n");
3705*cf7f2e2dSJohn Marino   return gdbarch->auto_charset ();
3706*cf7f2e2dSJohn Marino }
3707*cf7f2e2dSJohn Marino 
3708*cf7f2e2dSJohn Marino void
3709*cf7f2e2dSJohn Marino set_gdbarch_auto_charset (struct gdbarch *gdbarch,
3710*cf7f2e2dSJohn Marino                           gdbarch_auto_charset_ftype auto_charset)
3711*cf7f2e2dSJohn Marino {
3712*cf7f2e2dSJohn Marino   gdbarch->auto_charset = auto_charset;
3713*cf7f2e2dSJohn Marino }
3714*cf7f2e2dSJohn Marino 
3715*cf7f2e2dSJohn Marino const char *
3716*cf7f2e2dSJohn Marino gdbarch_auto_wide_charset (struct gdbarch *gdbarch)
3717*cf7f2e2dSJohn Marino {
3718*cf7f2e2dSJohn Marino   gdb_assert (gdbarch != NULL);
3719*cf7f2e2dSJohn Marino   gdb_assert (gdbarch->auto_wide_charset != NULL);
3720*cf7f2e2dSJohn Marino   if (gdbarch_debug >= 2)
3721*cf7f2e2dSJohn Marino     fprintf_unfiltered (gdb_stdlog, "gdbarch_auto_wide_charset called\n");
3722*cf7f2e2dSJohn Marino   return gdbarch->auto_wide_charset ();
3723*cf7f2e2dSJohn Marino }
3724*cf7f2e2dSJohn Marino 
3725*cf7f2e2dSJohn Marino void
3726*cf7f2e2dSJohn Marino set_gdbarch_auto_wide_charset (struct gdbarch *gdbarch,
3727*cf7f2e2dSJohn Marino                                gdbarch_auto_wide_charset_ftype auto_wide_charset)
3728*cf7f2e2dSJohn Marino {
3729*cf7f2e2dSJohn Marino   gdbarch->auto_wide_charset = auto_wide_charset;
3730*cf7f2e2dSJohn Marino }
3731*cf7f2e2dSJohn Marino 
3732*cf7f2e2dSJohn Marino const char *
3733*cf7f2e2dSJohn Marino gdbarch_solib_symbols_extension (struct gdbarch *gdbarch)
3734*cf7f2e2dSJohn Marino {
3735*cf7f2e2dSJohn Marino   gdb_assert (gdbarch != NULL);
3736*cf7f2e2dSJohn Marino   if (gdbarch_debug >= 2)
3737*cf7f2e2dSJohn Marino     fprintf_unfiltered (gdb_stdlog, "gdbarch_solib_symbols_extension called\n");
3738*cf7f2e2dSJohn Marino   return gdbarch->solib_symbols_extension;
3739*cf7f2e2dSJohn Marino }
3740*cf7f2e2dSJohn Marino 
3741*cf7f2e2dSJohn Marino void
3742*cf7f2e2dSJohn Marino set_gdbarch_solib_symbols_extension (struct gdbarch *gdbarch,
3743*cf7f2e2dSJohn Marino                                      const char * solib_symbols_extension)
3744*cf7f2e2dSJohn Marino {
3745*cf7f2e2dSJohn Marino   gdbarch->solib_symbols_extension = solib_symbols_extension;
3746*cf7f2e2dSJohn Marino }
3747*cf7f2e2dSJohn Marino 
3748*cf7f2e2dSJohn Marino int
3749*cf7f2e2dSJohn Marino gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch)
3750*cf7f2e2dSJohn Marino {
3751*cf7f2e2dSJohn Marino   gdb_assert (gdbarch != NULL);
3752*cf7f2e2dSJohn Marino   /* Skip verify of has_dos_based_file_system, invalid_p == 0 */
3753*cf7f2e2dSJohn Marino   if (gdbarch_debug >= 2)
3754*cf7f2e2dSJohn Marino     fprintf_unfiltered (gdb_stdlog, "gdbarch_has_dos_based_file_system called\n");
3755*cf7f2e2dSJohn Marino   return gdbarch->has_dos_based_file_system;
3756*cf7f2e2dSJohn Marino }
3757*cf7f2e2dSJohn Marino 
3758*cf7f2e2dSJohn Marino void
3759*cf7f2e2dSJohn Marino set_gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch,
3760*cf7f2e2dSJohn Marino                                        int has_dos_based_file_system)
3761*cf7f2e2dSJohn Marino {
3762*cf7f2e2dSJohn Marino   gdbarch->has_dos_based_file_system = has_dos_based_file_system;
3763*cf7f2e2dSJohn Marino }
3764*cf7f2e2dSJohn Marino 
37655796c8dcSSimon Schubert 
37665796c8dcSSimon Schubert /* Keep a registry of per-architecture data-pointers required by GDB
37675796c8dcSSimon Schubert    modules. */
37685796c8dcSSimon Schubert 
37695796c8dcSSimon Schubert struct gdbarch_data
37705796c8dcSSimon Schubert {
37715796c8dcSSimon Schubert   unsigned index;
37725796c8dcSSimon Schubert   int init_p;
37735796c8dcSSimon Schubert   gdbarch_data_pre_init_ftype *pre_init;
37745796c8dcSSimon Schubert   gdbarch_data_post_init_ftype *post_init;
37755796c8dcSSimon Schubert };
37765796c8dcSSimon Schubert 
37775796c8dcSSimon Schubert struct gdbarch_data_registration
37785796c8dcSSimon Schubert {
37795796c8dcSSimon Schubert   struct gdbarch_data *data;
37805796c8dcSSimon Schubert   struct gdbarch_data_registration *next;
37815796c8dcSSimon Schubert };
37825796c8dcSSimon Schubert 
37835796c8dcSSimon Schubert struct gdbarch_data_registry
37845796c8dcSSimon Schubert {
37855796c8dcSSimon Schubert   unsigned nr;
37865796c8dcSSimon Schubert   struct gdbarch_data_registration *registrations;
37875796c8dcSSimon Schubert };
37885796c8dcSSimon Schubert 
37895796c8dcSSimon Schubert struct gdbarch_data_registry gdbarch_data_registry =
37905796c8dcSSimon Schubert {
37915796c8dcSSimon Schubert   0, NULL,
37925796c8dcSSimon Schubert };
37935796c8dcSSimon Schubert 
37945796c8dcSSimon Schubert static struct gdbarch_data *
37955796c8dcSSimon Schubert gdbarch_data_register (gdbarch_data_pre_init_ftype *pre_init,
37965796c8dcSSimon Schubert 		       gdbarch_data_post_init_ftype *post_init)
37975796c8dcSSimon Schubert {
37985796c8dcSSimon Schubert   struct gdbarch_data_registration **curr;
3799*cf7f2e2dSJohn Marino 
3800*cf7f2e2dSJohn Marino   /* Append the new registration.  */
38015796c8dcSSimon Schubert   for (curr = &gdbarch_data_registry.registrations;
38025796c8dcSSimon Schubert        (*curr) != NULL;
38035796c8dcSSimon Schubert        curr = &(*curr)->next);
38045796c8dcSSimon Schubert   (*curr) = XMALLOC (struct gdbarch_data_registration);
38055796c8dcSSimon Schubert   (*curr)->next = NULL;
38065796c8dcSSimon Schubert   (*curr)->data = XMALLOC (struct gdbarch_data);
38075796c8dcSSimon Schubert   (*curr)->data->index = gdbarch_data_registry.nr++;
38085796c8dcSSimon Schubert   (*curr)->data->pre_init = pre_init;
38095796c8dcSSimon Schubert   (*curr)->data->post_init = post_init;
38105796c8dcSSimon Schubert   (*curr)->data->init_p = 1;
38115796c8dcSSimon Schubert   return (*curr)->data;
38125796c8dcSSimon Schubert }
38135796c8dcSSimon Schubert 
38145796c8dcSSimon Schubert struct gdbarch_data *
38155796c8dcSSimon Schubert gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype *pre_init)
38165796c8dcSSimon Schubert {
38175796c8dcSSimon Schubert   return gdbarch_data_register (pre_init, NULL);
38185796c8dcSSimon Schubert }
38195796c8dcSSimon Schubert 
38205796c8dcSSimon Schubert struct gdbarch_data *
38215796c8dcSSimon Schubert gdbarch_data_register_post_init (gdbarch_data_post_init_ftype *post_init)
38225796c8dcSSimon Schubert {
38235796c8dcSSimon Schubert   return gdbarch_data_register (NULL, post_init);
38245796c8dcSSimon Schubert }
38255796c8dcSSimon Schubert 
38265796c8dcSSimon Schubert /* Create/delete the gdbarch data vector. */
38275796c8dcSSimon Schubert 
38285796c8dcSSimon Schubert static void
38295796c8dcSSimon Schubert alloc_gdbarch_data (struct gdbarch *gdbarch)
38305796c8dcSSimon Schubert {
38315796c8dcSSimon Schubert   gdb_assert (gdbarch->data == NULL);
38325796c8dcSSimon Schubert   gdbarch->nr_data = gdbarch_data_registry.nr;
38335796c8dcSSimon Schubert   gdbarch->data = GDBARCH_OBSTACK_CALLOC (gdbarch, gdbarch->nr_data, void *);
38345796c8dcSSimon Schubert }
38355796c8dcSSimon Schubert 
38365796c8dcSSimon Schubert /* Initialize the current value of the specified per-architecture
38375796c8dcSSimon Schubert    data-pointer. */
38385796c8dcSSimon Schubert 
38395796c8dcSSimon Schubert void
38405796c8dcSSimon Schubert deprecated_set_gdbarch_data (struct gdbarch *gdbarch,
38415796c8dcSSimon Schubert 			     struct gdbarch_data *data,
38425796c8dcSSimon Schubert 			     void *pointer)
38435796c8dcSSimon Schubert {
38445796c8dcSSimon Schubert   gdb_assert (data->index < gdbarch->nr_data);
38455796c8dcSSimon Schubert   gdb_assert (gdbarch->data[data->index] == NULL);
38465796c8dcSSimon Schubert   gdb_assert (data->pre_init == NULL);
38475796c8dcSSimon Schubert   gdbarch->data[data->index] = pointer;
38485796c8dcSSimon Schubert }
38495796c8dcSSimon Schubert 
38505796c8dcSSimon Schubert /* Return the current value of the specified per-architecture
38515796c8dcSSimon Schubert    data-pointer. */
38525796c8dcSSimon Schubert 
38535796c8dcSSimon Schubert void *
38545796c8dcSSimon Schubert gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
38555796c8dcSSimon Schubert {
38565796c8dcSSimon Schubert   gdb_assert (data->index < gdbarch->nr_data);
38575796c8dcSSimon Schubert   if (gdbarch->data[data->index] == NULL)
38585796c8dcSSimon Schubert     {
38595796c8dcSSimon Schubert       /* The data-pointer isn't initialized, call init() to get a
38605796c8dcSSimon Schubert 	 value.  */
38615796c8dcSSimon Schubert       if (data->pre_init != NULL)
38625796c8dcSSimon Schubert 	/* Mid architecture creation: pass just the obstack, and not
38635796c8dcSSimon Schubert 	   the entire architecture, as that way it isn't possible for
38645796c8dcSSimon Schubert 	   pre-init code to refer to undefined architecture
38655796c8dcSSimon Schubert 	   fields.  */
38665796c8dcSSimon Schubert 	gdbarch->data[data->index] = data->pre_init (gdbarch->obstack);
38675796c8dcSSimon Schubert       else if (gdbarch->initialized_p
38685796c8dcSSimon Schubert 	       && data->post_init != NULL)
38695796c8dcSSimon Schubert 	/* Post architecture creation: pass the entire architecture
38705796c8dcSSimon Schubert 	   (as all fields are valid), but be careful to also detect
38715796c8dcSSimon Schubert 	   recursive references.  */
38725796c8dcSSimon Schubert 	{
38735796c8dcSSimon Schubert 	  gdb_assert (data->init_p);
38745796c8dcSSimon Schubert 	  data->init_p = 0;
38755796c8dcSSimon Schubert 	  gdbarch->data[data->index] = data->post_init (gdbarch);
38765796c8dcSSimon Schubert 	  data->init_p = 1;
38775796c8dcSSimon Schubert 	}
38785796c8dcSSimon Schubert       else
38795796c8dcSSimon Schubert 	/* The architecture initialization hasn't completed - punt -
38805796c8dcSSimon Schubert 	 hope that the caller knows what they are doing.  Once
38815796c8dcSSimon Schubert 	 deprecated_set_gdbarch_data has been initialized, this can be
38825796c8dcSSimon Schubert 	 changed to an internal error.  */
38835796c8dcSSimon Schubert 	return NULL;
38845796c8dcSSimon Schubert       gdb_assert (gdbarch->data[data->index] != NULL);
38855796c8dcSSimon Schubert     }
38865796c8dcSSimon Schubert   return gdbarch->data[data->index];
38875796c8dcSSimon Schubert }
38885796c8dcSSimon Schubert 
38895796c8dcSSimon Schubert 
38905796c8dcSSimon Schubert /* Keep a registry of the architectures known by GDB. */
38915796c8dcSSimon Schubert 
38925796c8dcSSimon Schubert struct gdbarch_registration
38935796c8dcSSimon Schubert {
38945796c8dcSSimon Schubert   enum bfd_architecture bfd_architecture;
38955796c8dcSSimon Schubert   gdbarch_init_ftype *init;
38965796c8dcSSimon Schubert   gdbarch_dump_tdep_ftype *dump_tdep;
38975796c8dcSSimon Schubert   struct gdbarch_list *arches;
38985796c8dcSSimon Schubert   struct gdbarch_registration *next;
38995796c8dcSSimon Schubert };
39005796c8dcSSimon Schubert 
39015796c8dcSSimon Schubert static struct gdbarch_registration *gdbarch_registry = NULL;
39025796c8dcSSimon Schubert 
39035796c8dcSSimon Schubert static void
39045796c8dcSSimon Schubert append_name (const char ***buf, int *nr, const char *name)
39055796c8dcSSimon Schubert {
39065796c8dcSSimon Schubert   *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
39075796c8dcSSimon Schubert   (*buf)[*nr] = name;
39085796c8dcSSimon Schubert   *nr += 1;
39095796c8dcSSimon Schubert }
39105796c8dcSSimon Schubert 
39115796c8dcSSimon Schubert const char **
39125796c8dcSSimon Schubert gdbarch_printable_names (void)
39135796c8dcSSimon Schubert {
39145796c8dcSSimon Schubert   /* Accumulate a list of names based on the registed list of
39155796c8dcSSimon Schubert      architectures. */
39165796c8dcSSimon Schubert   int nr_arches = 0;
39175796c8dcSSimon Schubert   const char **arches = NULL;
39185796c8dcSSimon Schubert   struct gdbarch_registration *rego;
3919*cf7f2e2dSJohn Marino 
39205796c8dcSSimon Schubert   for (rego = gdbarch_registry;
39215796c8dcSSimon Schubert        rego != NULL;
39225796c8dcSSimon Schubert        rego = rego->next)
39235796c8dcSSimon Schubert     {
39245796c8dcSSimon Schubert       const struct bfd_arch_info *ap;
39255796c8dcSSimon Schubert       ap = bfd_lookup_arch (rego->bfd_architecture, 0);
39265796c8dcSSimon Schubert       if (ap == NULL)
39275796c8dcSSimon Schubert         internal_error (__FILE__, __LINE__,
39285796c8dcSSimon Schubert                         _("gdbarch_architecture_names: multi-arch unknown"));
39295796c8dcSSimon Schubert       do
39305796c8dcSSimon Schubert         {
39315796c8dcSSimon Schubert           append_name (&arches, &nr_arches, ap->printable_name);
39325796c8dcSSimon Schubert           ap = ap->next;
39335796c8dcSSimon Schubert         }
39345796c8dcSSimon Schubert       while (ap != NULL);
39355796c8dcSSimon Schubert     }
39365796c8dcSSimon Schubert   append_name (&arches, &nr_arches, NULL);
39375796c8dcSSimon Schubert   return arches;
39385796c8dcSSimon Schubert }
39395796c8dcSSimon Schubert 
39405796c8dcSSimon Schubert 
39415796c8dcSSimon Schubert void
39425796c8dcSSimon Schubert gdbarch_register (enum bfd_architecture bfd_architecture,
39435796c8dcSSimon Schubert                   gdbarch_init_ftype *init,
39445796c8dcSSimon Schubert 		  gdbarch_dump_tdep_ftype *dump_tdep)
39455796c8dcSSimon Schubert {
39465796c8dcSSimon Schubert   struct gdbarch_registration **curr;
39475796c8dcSSimon Schubert   const struct bfd_arch_info *bfd_arch_info;
3948*cf7f2e2dSJohn Marino 
39495796c8dcSSimon Schubert   /* Check that BFD recognizes this architecture */
39505796c8dcSSimon Schubert   bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
39515796c8dcSSimon Schubert   if (bfd_arch_info == NULL)
39525796c8dcSSimon Schubert     {
39535796c8dcSSimon Schubert       internal_error (__FILE__, __LINE__,
39545796c8dcSSimon Schubert                       _("gdbarch: Attempt to register unknown architecture (%d)"),
39555796c8dcSSimon Schubert                       bfd_architecture);
39565796c8dcSSimon Schubert     }
39575796c8dcSSimon Schubert   /* Check that we haven't seen this architecture before */
39585796c8dcSSimon Schubert   for (curr = &gdbarch_registry;
39595796c8dcSSimon Schubert        (*curr) != NULL;
39605796c8dcSSimon Schubert        curr = &(*curr)->next)
39615796c8dcSSimon Schubert     {
39625796c8dcSSimon Schubert       if (bfd_architecture == (*curr)->bfd_architecture)
39635796c8dcSSimon Schubert 	internal_error (__FILE__, __LINE__,
39645796c8dcSSimon Schubert                         _("gdbarch: Duplicate registraration of architecture (%s)"),
39655796c8dcSSimon Schubert 	                bfd_arch_info->printable_name);
39665796c8dcSSimon Schubert     }
39675796c8dcSSimon Schubert   /* log it */
39685796c8dcSSimon Schubert   if (gdbarch_debug)
39695796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, %s)\n",
39705796c8dcSSimon Schubert 			bfd_arch_info->printable_name,
39715796c8dcSSimon Schubert 			host_address_to_string (init));
39725796c8dcSSimon Schubert   /* Append it */
39735796c8dcSSimon Schubert   (*curr) = XMALLOC (struct gdbarch_registration);
39745796c8dcSSimon Schubert   (*curr)->bfd_architecture = bfd_architecture;
39755796c8dcSSimon Schubert   (*curr)->init = init;
39765796c8dcSSimon Schubert   (*curr)->dump_tdep = dump_tdep;
39775796c8dcSSimon Schubert   (*curr)->arches = NULL;
39785796c8dcSSimon Schubert   (*curr)->next = NULL;
39795796c8dcSSimon Schubert }
39805796c8dcSSimon Schubert 
39815796c8dcSSimon Schubert void
39825796c8dcSSimon Schubert register_gdbarch_init (enum bfd_architecture bfd_architecture,
39835796c8dcSSimon Schubert 		       gdbarch_init_ftype *init)
39845796c8dcSSimon Schubert {
39855796c8dcSSimon Schubert   gdbarch_register (bfd_architecture, init, NULL);
39865796c8dcSSimon Schubert }
39875796c8dcSSimon Schubert 
39885796c8dcSSimon Schubert 
39895796c8dcSSimon Schubert /* Look for an architecture using gdbarch_info.  */
39905796c8dcSSimon Schubert 
39915796c8dcSSimon Schubert struct gdbarch_list *
39925796c8dcSSimon Schubert gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
39935796c8dcSSimon Schubert                              const struct gdbarch_info *info)
39945796c8dcSSimon Schubert {
39955796c8dcSSimon Schubert   for (; arches != NULL; arches = arches->next)
39965796c8dcSSimon Schubert     {
39975796c8dcSSimon Schubert       if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
39985796c8dcSSimon Schubert 	continue;
39995796c8dcSSimon Schubert       if (info->byte_order != arches->gdbarch->byte_order)
40005796c8dcSSimon Schubert 	continue;
40015796c8dcSSimon Schubert       if (info->osabi != arches->gdbarch->osabi)
40025796c8dcSSimon Schubert 	continue;
40035796c8dcSSimon Schubert       if (info->target_desc != arches->gdbarch->target_desc)
40045796c8dcSSimon Schubert 	continue;
40055796c8dcSSimon Schubert       return arches;
40065796c8dcSSimon Schubert     }
40075796c8dcSSimon Schubert   return NULL;
40085796c8dcSSimon Schubert }
40095796c8dcSSimon Schubert 
40105796c8dcSSimon Schubert 
40115796c8dcSSimon Schubert /* Find an architecture that matches the specified INFO.  Create a new
40125796c8dcSSimon Schubert    architecture if needed.  Return that new architecture.  */
40135796c8dcSSimon Schubert 
40145796c8dcSSimon Schubert struct gdbarch *
40155796c8dcSSimon Schubert gdbarch_find_by_info (struct gdbarch_info info)
40165796c8dcSSimon Schubert {
40175796c8dcSSimon Schubert   struct gdbarch *new_gdbarch;
40185796c8dcSSimon Schubert   struct gdbarch_registration *rego;
40195796c8dcSSimon Schubert 
40205796c8dcSSimon Schubert   /* Fill in missing parts of the INFO struct using a number of
40215796c8dcSSimon Schubert      sources: "set ..."; INFOabfd supplied; and the global
40225796c8dcSSimon Schubert      defaults.  */
40235796c8dcSSimon Schubert   gdbarch_info_fill (&info);
40245796c8dcSSimon Schubert 
40255796c8dcSSimon Schubert   /* Must have found some sort of architecture. */
40265796c8dcSSimon Schubert   gdb_assert (info.bfd_arch_info != NULL);
40275796c8dcSSimon Schubert 
40285796c8dcSSimon Schubert   if (gdbarch_debug)
40295796c8dcSSimon Schubert     {
40305796c8dcSSimon Schubert       fprintf_unfiltered (gdb_stdlog,
40315796c8dcSSimon Schubert 			  "gdbarch_find_by_info: info.bfd_arch_info %s\n",
40325796c8dcSSimon Schubert 			  (info.bfd_arch_info != NULL
40335796c8dcSSimon Schubert 			   ? info.bfd_arch_info->printable_name
40345796c8dcSSimon Schubert 			   : "(null)"));
40355796c8dcSSimon Schubert       fprintf_unfiltered (gdb_stdlog,
40365796c8dcSSimon Schubert 			  "gdbarch_find_by_info: info.byte_order %d (%s)\n",
40375796c8dcSSimon Schubert 			  info.byte_order,
40385796c8dcSSimon Schubert 			  (info.byte_order == BFD_ENDIAN_BIG ? "big"
40395796c8dcSSimon Schubert 			   : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
40405796c8dcSSimon Schubert 			   : "default"));
40415796c8dcSSimon Schubert       fprintf_unfiltered (gdb_stdlog,
40425796c8dcSSimon Schubert 			  "gdbarch_find_by_info: info.osabi %d (%s)\n",
40435796c8dcSSimon Schubert 			  info.osabi, gdbarch_osabi_name (info.osabi));
40445796c8dcSSimon Schubert       fprintf_unfiltered (gdb_stdlog,
40455796c8dcSSimon Schubert 			  "gdbarch_find_by_info: info.abfd %s\n",
40465796c8dcSSimon Schubert 			  host_address_to_string (info.abfd));
40475796c8dcSSimon Schubert       fprintf_unfiltered (gdb_stdlog,
40485796c8dcSSimon Schubert 			  "gdbarch_find_by_info: info.tdep_info %s\n",
40495796c8dcSSimon Schubert 			  host_address_to_string (info.tdep_info));
40505796c8dcSSimon Schubert     }
40515796c8dcSSimon Schubert 
40525796c8dcSSimon Schubert   /* Find the tdep code that knows about this architecture.  */
40535796c8dcSSimon Schubert   for (rego = gdbarch_registry;
40545796c8dcSSimon Schubert        rego != NULL;
40555796c8dcSSimon Schubert        rego = rego->next)
40565796c8dcSSimon Schubert     if (rego->bfd_architecture == info.bfd_arch_info->arch)
40575796c8dcSSimon Schubert       break;
40585796c8dcSSimon Schubert   if (rego == NULL)
40595796c8dcSSimon Schubert     {
40605796c8dcSSimon Schubert       if (gdbarch_debug)
40615796c8dcSSimon Schubert 	fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
40625796c8dcSSimon Schubert 			    "No matching architecture\n");
40635796c8dcSSimon Schubert       return 0;
40645796c8dcSSimon Schubert     }
40655796c8dcSSimon Schubert 
40665796c8dcSSimon Schubert   /* Ask the tdep code for an architecture that matches "info".  */
40675796c8dcSSimon Schubert   new_gdbarch = rego->init (info, rego->arches);
40685796c8dcSSimon Schubert 
40695796c8dcSSimon Schubert   /* Did the tdep code like it?  No.  Reject the change and revert to
40705796c8dcSSimon Schubert      the old architecture.  */
40715796c8dcSSimon Schubert   if (new_gdbarch == NULL)
40725796c8dcSSimon Schubert     {
40735796c8dcSSimon Schubert       if (gdbarch_debug)
40745796c8dcSSimon Schubert 	fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
40755796c8dcSSimon Schubert 			    "Target rejected architecture\n");
40765796c8dcSSimon Schubert       return NULL;
40775796c8dcSSimon Schubert     }
40785796c8dcSSimon Schubert 
40795796c8dcSSimon Schubert   /* Is this a pre-existing architecture (as determined by already
40805796c8dcSSimon Schubert      being initialized)?  Move it to the front of the architecture
40815796c8dcSSimon Schubert      list (keeping the list sorted Most Recently Used).  */
40825796c8dcSSimon Schubert   if (new_gdbarch->initialized_p)
40835796c8dcSSimon Schubert     {
40845796c8dcSSimon Schubert       struct gdbarch_list **list;
40855796c8dcSSimon Schubert       struct gdbarch_list *this;
40865796c8dcSSimon Schubert       if (gdbarch_debug)
40875796c8dcSSimon Schubert 	fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
40885796c8dcSSimon Schubert 			    "Previous architecture %s (%s) selected\n",
40895796c8dcSSimon Schubert 			    host_address_to_string (new_gdbarch),
40905796c8dcSSimon Schubert 			    new_gdbarch->bfd_arch_info->printable_name);
40915796c8dcSSimon Schubert       /* Find the existing arch in the list.  */
40925796c8dcSSimon Schubert       for (list = &rego->arches;
40935796c8dcSSimon Schubert 	   (*list) != NULL && (*list)->gdbarch != new_gdbarch;
40945796c8dcSSimon Schubert 	   list = &(*list)->next);
40955796c8dcSSimon Schubert       /* It had better be in the list of architectures.  */
40965796c8dcSSimon Schubert       gdb_assert ((*list) != NULL && (*list)->gdbarch == new_gdbarch);
40975796c8dcSSimon Schubert       /* Unlink THIS.  */
40985796c8dcSSimon Schubert       this = (*list);
40995796c8dcSSimon Schubert       (*list) = this->next;
41005796c8dcSSimon Schubert       /* Insert THIS at the front.  */
41015796c8dcSSimon Schubert       this->next = rego->arches;
41025796c8dcSSimon Schubert       rego->arches = this;
41035796c8dcSSimon Schubert       /* Return it.  */
41045796c8dcSSimon Schubert       return new_gdbarch;
41055796c8dcSSimon Schubert     }
41065796c8dcSSimon Schubert 
41075796c8dcSSimon Schubert   /* It's a new architecture.  */
41085796c8dcSSimon Schubert   if (gdbarch_debug)
41095796c8dcSSimon Schubert     fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
41105796c8dcSSimon Schubert 			"New architecture %s (%s) selected\n",
41115796c8dcSSimon Schubert 			host_address_to_string (new_gdbarch),
41125796c8dcSSimon Schubert 			new_gdbarch->bfd_arch_info->printable_name);
41135796c8dcSSimon Schubert 
41145796c8dcSSimon Schubert   /* Insert the new architecture into the front of the architecture
41155796c8dcSSimon Schubert      list (keep the list sorted Most Recently Used).  */
41165796c8dcSSimon Schubert   {
41175796c8dcSSimon Schubert     struct gdbarch_list *this = XMALLOC (struct gdbarch_list);
41185796c8dcSSimon Schubert     this->next = rego->arches;
41195796c8dcSSimon Schubert     this->gdbarch = new_gdbarch;
41205796c8dcSSimon Schubert     rego->arches = this;
41215796c8dcSSimon Schubert   }
41225796c8dcSSimon Schubert 
41235796c8dcSSimon Schubert   /* Check that the newly installed architecture is valid.  Plug in
41245796c8dcSSimon Schubert      any post init values.  */
41255796c8dcSSimon Schubert   new_gdbarch->dump_tdep = rego->dump_tdep;
41265796c8dcSSimon Schubert   verify_gdbarch (new_gdbarch);
41275796c8dcSSimon Schubert   new_gdbarch->initialized_p = 1;
41285796c8dcSSimon Schubert 
41295796c8dcSSimon Schubert   if (gdbarch_debug)
41305796c8dcSSimon Schubert     gdbarch_dump (new_gdbarch, gdb_stdlog);
41315796c8dcSSimon Schubert 
41325796c8dcSSimon Schubert   return new_gdbarch;
41335796c8dcSSimon Schubert }
41345796c8dcSSimon Schubert 
41355796c8dcSSimon Schubert /* Make the specified architecture current.  */
41365796c8dcSSimon Schubert 
41375796c8dcSSimon Schubert void
41385796c8dcSSimon Schubert deprecated_target_gdbarch_select_hack (struct gdbarch *new_gdbarch)
41395796c8dcSSimon Schubert {
41405796c8dcSSimon Schubert   gdb_assert (new_gdbarch != NULL);
41415796c8dcSSimon Schubert   gdb_assert (new_gdbarch->initialized_p);
41425796c8dcSSimon Schubert   target_gdbarch = new_gdbarch;
41435796c8dcSSimon Schubert   observer_notify_architecture_changed (new_gdbarch);
41445796c8dcSSimon Schubert   registers_changed ();
41455796c8dcSSimon Schubert }
41465796c8dcSSimon Schubert 
41475796c8dcSSimon Schubert extern void _initialize_gdbarch (void);
41485796c8dcSSimon Schubert 
41495796c8dcSSimon Schubert void
41505796c8dcSSimon Schubert _initialize_gdbarch (void)
41515796c8dcSSimon Schubert {
41525796c8dcSSimon Schubert   add_setshow_zinteger_cmd ("arch", class_maintenance, &gdbarch_debug, _("\
41535796c8dcSSimon Schubert Set architecture debugging."), _("\
41545796c8dcSSimon Schubert Show architecture debugging."), _("\
41555796c8dcSSimon Schubert When non-zero, architecture debugging is enabled."),
41565796c8dcSSimon Schubert                             NULL,
41575796c8dcSSimon Schubert                             show_gdbarch_debug,
41585796c8dcSSimon Schubert                             &setdebuglist, &showdebuglist);
41595796c8dcSSimon Schubert }
4160