1*ef5ccd6cSJohn Marino /* *INDENT-OFF* */ /* THIS FILE IS GENERATED -*- buffer-read-only: t -*- */
2*ef5ccd6cSJohn Marino /* vi:set ro: */
35796c8dcSSimon Schubert
45796c8dcSSimon Schubert /* Dynamic architecture support for GDB, the GNU debugger.
55796c8dcSSimon Schubert
6*ef5ccd6cSJohn Marino Copyright (C) 1998-2013 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"
52*ef5ccd6cSJohn Marino #include "objfiles.h"
535796c8dcSSimon Schubert
545796c8dcSSimon Schubert /* Static function declarations */
555796c8dcSSimon Schubert
565796c8dcSSimon Schubert static void alloc_gdbarch_data (struct gdbarch *);
575796c8dcSSimon Schubert
585796c8dcSSimon Schubert /* Non-zero if we want to trace architecture code. */
595796c8dcSSimon Schubert
605796c8dcSSimon Schubert #ifndef GDBARCH_DEBUG
615796c8dcSSimon Schubert #define GDBARCH_DEBUG 0
625796c8dcSSimon Schubert #endif
63*ef5ccd6cSJohn Marino unsigned int gdbarch_debug = GDBARCH_DEBUG;
645796c8dcSSimon Schubert static void
show_gdbarch_debug(struct ui_file * file,int from_tty,struct cmd_list_element * c,const char * value)655796c8dcSSimon Schubert show_gdbarch_debug (struct ui_file *file, int from_tty,
665796c8dcSSimon Schubert struct cmd_list_element *c, const char *value)
675796c8dcSSimon Schubert {
685796c8dcSSimon Schubert fprintf_filtered (file, _("Architecture debugging is %s.\n"), value);
695796c8dcSSimon Schubert }
705796c8dcSSimon Schubert
715796c8dcSSimon Schubert static const char *
pformat(const struct floatformat ** format)725796c8dcSSimon Schubert pformat (const struct floatformat **format)
735796c8dcSSimon Schubert {
745796c8dcSSimon Schubert if (format == NULL)
755796c8dcSSimon Schubert return "(null)";
765796c8dcSSimon Schubert else
775796c8dcSSimon Schubert /* Just print out one of them - this is only for diagnostics. */
785796c8dcSSimon Schubert return format[0]->name;
795796c8dcSSimon Schubert }
805796c8dcSSimon Schubert
81cf7f2e2dSJohn Marino static const char *
pstring(const char * string)82cf7f2e2dSJohn Marino pstring (const char *string)
83cf7f2e2dSJohn Marino {
84cf7f2e2dSJohn Marino if (string == NULL)
85cf7f2e2dSJohn Marino return "(null)";
86cf7f2e2dSJohn Marino return string;
87cf7f2e2dSJohn Marino }
88cf7f2e2dSJohn Marino
895796c8dcSSimon Schubert
90c50c785cSJohn Marino /* Maintain the struct gdbarch object. */
915796c8dcSSimon Schubert
925796c8dcSSimon Schubert struct gdbarch
935796c8dcSSimon Schubert {
945796c8dcSSimon Schubert /* Has this architecture been fully initialized? */
955796c8dcSSimon Schubert int initialized_p;
965796c8dcSSimon Schubert
975796c8dcSSimon Schubert /* An obstack bound to the lifetime of the architecture. */
985796c8dcSSimon Schubert struct obstack *obstack;
995796c8dcSSimon Schubert
100c50c785cSJohn Marino /* basic architectural information. */
1015796c8dcSSimon Schubert const struct bfd_arch_info * bfd_arch_info;
1025796c8dcSSimon Schubert int byte_order;
1035796c8dcSSimon Schubert int byte_order_for_code;
1045796c8dcSSimon Schubert enum gdb_osabi osabi;
1055796c8dcSSimon Schubert const struct target_desc * target_desc;
1065796c8dcSSimon Schubert
1075796c8dcSSimon Schubert /* target specific vector. */
1085796c8dcSSimon Schubert struct gdbarch_tdep *tdep;
1095796c8dcSSimon Schubert gdbarch_dump_tdep_ftype *dump_tdep;
1105796c8dcSSimon Schubert
111c50c785cSJohn Marino /* per-architecture data-pointers. */
1125796c8dcSSimon Schubert unsigned nr_data;
1135796c8dcSSimon Schubert void **data;
1145796c8dcSSimon Schubert
1155796c8dcSSimon Schubert /* Multi-arch values.
1165796c8dcSSimon Schubert
1175796c8dcSSimon Schubert When extending this structure you must:
1185796c8dcSSimon Schubert
1195796c8dcSSimon Schubert Add the field below.
1205796c8dcSSimon Schubert
1215796c8dcSSimon Schubert Declare set/get functions and define the corresponding
1225796c8dcSSimon Schubert macro in gdbarch.h.
1235796c8dcSSimon Schubert
1245796c8dcSSimon Schubert gdbarch_alloc(): If zero/NULL is not a suitable default,
1255796c8dcSSimon Schubert initialize the new field.
1265796c8dcSSimon Schubert
1275796c8dcSSimon Schubert verify_gdbarch(): Confirm that the target updated the field
1285796c8dcSSimon Schubert correctly.
1295796c8dcSSimon Schubert
1305796c8dcSSimon Schubert gdbarch_dump(): Add a fprintf_unfiltered call so that the new
1315796c8dcSSimon Schubert field is dumped out
1325796c8dcSSimon Schubert
1335796c8dcSSimon Schubert ``startup_gdbarch()'': Append an initial value to the static
1345796c8dcSSimon Schubert variable (base values on the host's c-type system).
1355796c8dcSSimon Schubert
1365796c8dcSSimon Schubert get_gdbarch(): Implement the set/get functions (probably using
1375796c8dcSSimon Schubert the macro's as shortcuts).
1385796c8dcSSimon Schubert
1395796c8dcSSimon Schubert */
1405796c8dcSSimon Schubert
1415796c8dcSSimon Schubert int bits_big_endian;
1425796c8dcSSimon Schubert int short_bit;
1435796c8dcSSimon Schubert int int_bit;
1445796c8dcSSimon Schubert int long_bit;
1455796c8dcSSimon Schubert int long_long_bit;
146a45ae5f8SJohn Marino int long_long_align_bit;
147cf7f2e2dSJohn Marino int half_bit;
148cf7f2e2dSJohn Marino const struct floatformat ** half_format;
1495796c8dcSSimon Schubert int float_bit;
1505796c8dcSSimon Schubert const struct floatformat ** float_format;
1515796c8dcSSimon Schubert int double_bit;
1525796c8dcSSimon Schubert const struct floatformat ** double_format;
1535796c8dcSSimon Schubert int long_double_bit;
1545796c8dcSSimon Schubert const struct floatformat ** long_double_format;
1555796c8dcSSimon Schubert int ptr_bit;
1565796c8dcSSimon Schubert int addr_bit;
157c50c785cSJohn Marino int dwarf2_addr_size;
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;
163a45ae5f8SJohn Marino gdbarch_pseudo_register_read_value_ftype *pseudo_register_read_value;
1645796c8dcSSimon Schubert gdbarch_pseudo_register_write_ftype *pseudo_register_write;
1655796c8dcSSimon Schubert int num_regs;
1665796c8dcSSimon Schubert int num_pseudo_regs;
167c50c785cSJohn Marino gdbarch_ax_pseudo_register_collect_ftype *ax_pseudo_register_collect;
168c50c785cSJohn Marino gdbarch_ax_pseudo_register_push_stack_ftype *ax_pseudo_register_push_stack;
1695796c8dcSSimon Schubert int sp_regnum;
1705796c8dcSSimon Schubert int pc_regnum;
1715796c8dcSSimon Schubert int ps_regnum;
1725796c8dcSSimon Schubert int fp0_regnum;
1735796c8dcSSimon Schubert gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum;
1745796c8dcSSimon Schubert gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum;
1755796c8dcSSimon Schubert gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum;
1765796c8dcSSimon Schubert gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum;
1775796c8dcSSimon Schubert gdbarch_register_name_ftype *register_name;
1785796c8dcSSimon Schubert gdbarch_register_type_ftype *register_type;
1795796c8dcSSimon Schubert gdbarch_dummy_id_ftype *dummy_id;
1805796c8dcSSimon Schubert int deprecated_fp_regnum;
1815796c8dcSSimon Schubert gdbarch_push_dummy_call_ftype *push_dummy_call;
1825796c8dcSSimon Schubert int call_dummy_location;
1835796c8dcSSimon Schubert gdbarch_push_dummy_code_ftype *push_dummy_code;
1845796c8dcSSimon Schubert gdbarch_print_registers_info_ftype *print_registers_info;
1855796c8dcSSimon Schubert gdbarch_print_float_info_ftype *print_float_info;
1865796c8dcSSimon Schubert gdbarch_print_vector_info_ftype *print_vector_info;
1875796c8dcSSimon Schubert gdbarch_register_sim_regno_ftype *register_sim_regno;
1885796c8dcSSimon Schubert gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
1895796c8dcSSimon Schubert gdbarch_cannot_store_register_ftype *cannot_store_register;
1905796c8dcSSimon Schubert gdbarch_get_longjmp_target_ftype *get_longjmp_target;
1915796c8dcSSimon Schubert int believe_pcc_promotion;
1925796c8dcSSimon Schubert gdbarch_convert_register_p_ftype *convert_register_p;
1935796c8dcSSimon Schubert gdbarch_register_to_value_ftype *register_to_value;
1945796c8dcSSimon Schubert gdbarch_value_to_register_ftype *value_to_register;
1955796c8dcSSimon Schubert gdbarch_value_from_register_ftype *value_from_register;
1965796c8dcSSimon Schubert gdbarch_pointer_to_address_ftype *pointer_to_address;
1975796c8dcSSimon Schubert gdbarch_address_to_pointer_ftype *address_to_pointer;
1985796c8dcSSimon Schubert gdbarch_integer_to_address_ftype *integer_to_address;
1995796c8dcSSimon Schubert gdbarch_return_value_ftype *return_value;
200*ef5ccd6cSJohn Marino gdbarch_return_in_first_hidden_param_p_ftype *return_in_first_hidden_param_p;
2015796c8dcSSimon Schubert gdbarch_skip_prologue_ftype *skip_prologue;
2025796c8dcSSimon Schubert gdbarch_skip_main_prologue_ftype *skip_main_prologue;
2035796c8dcSSimon Schubert gdbarch_inner_than_ftype *inner_than;
2045796c8dcSSimon Schubert gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
205cf7f2e2dSJohn Marino gdbarch_remote_breakpoint_from_pc_ftype *remote_breakpoint_from_pc;
2065796c8dcSSimon Schubert gdbarch_adjust_breakpoint_address_ftype *adjust_breakpoint_address;
2075796c8dcSSimon Schubert gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
2085796c8dcSSimon Schubert gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
2095796c8dcSSimon Schubert CORE_ADDR decr_pc_after_break;
2105796c8dcSSimon Schubert CORE_ADDR deprecated_function_start_offset;
2115796c8dcSSimon Schubert gdbarch_remote_register_number_ftype *remote_register_number;
2125796c8dcSSimon Schubert gdbarch_fetch_tls_load_module_address_ftype *fetch_tls_load_module_address;
2135796c8dcSSimon Schubert CORE_ADDR frame_args_skip;
2145796c8dcSSimon Schubert gdbarch_unwind_pc_ftype *unwind_pc;
2155796c8dcSSimon Schubert gdbarch_unwind_sp_ftype *unwind_sp;
2165796c8dcSSimon Schubert gdbarch_frame_num_args_ftype *frame_num_args;
2175796c8dcSSimon Schubert gdbarch_frame_align_ftype *frame_align;
2185796c8dcSSimon Schubert gdbarch_stabs_argument_has_addr_ftype *stabs_argument_has_addr;
2195796c8dcSSimon Schubert int frame_red_zone_size;
2205796c8dcSSimon Schubert gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
2215796c8dcSSimon Schubert gdbarch_addr_bits_remove_ftype *addr_bits_remove;
2225796c8dcSSimon Schubert gdbarch_software_single_step_ftype *software_single_step;
2235796c8dcSSimon Schubert gdbarch_single_step_through_delay_ftype *single_step_through_delay;
2245796c8dcSSimon Schubert gdbarch_print_insn_ftype *print_insn;
2255796c8dcSSimon Schubert gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
2265796c8dcSSimon Schubert gdbarch_skip_solib_resolver_ftype *skip_solib_resolver;
2275796c8dcSSimon Schubert gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
2285796c8dcSSimon Schubert gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p;
2295796c8dcSSimon Schubert gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
2305796c8dcSSimon Schubert gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
2315796c8dcSSimon Schubert int cannot_step_breakpoint;
2325796c8dcSSimon Schubert int have_nonsteppable_watchpoint;
2335796c8dcSSimon Schubert gdbarch_address_class_type_flags_ftype *address_class_type_flags;
2345796c8dcSSimon Schubert gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name;
2355796c8dcSSimon Schubert gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
2365796c8dcSSimon Schubert gdbarch_register_reggroup_p_ftype *register_reggroup_p;
2375796c8dcSSimon Schubert gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument;
2385796c8dcSSimon Schubert gdbarch_regset_from_core_section_ftype *regset_from_core_section;
2395796c8dcSSimon Schubert struct core_regset_section * core_regset_sections;
240*ef5ccd6cSJohn Marino gdbarch_make_corefile_notes_ftype *make_corefile_notes;
241*ef5ccd6cSJohn Marino gdbarch_elfcore_write_linux_prpsinfo_ftype *elfcore_write_linux_prpsinfo;
242*ef5ccd6cSJohn Marino gdbarch_find_memory_regions_ftype *find_memory_regions;
2435796c8dcSSimon Schubert gdbarch_core_xfer_shared_libraries_ftype *core_xfer_shared_libraries;
2445796c8dcSSimon Schubert gdbarch_core_pid_to_str_ftype *core_pid_to_str;
2455796c8dcSSimon Schubert const char * gcore_bfd_target;
2465796c8dcSSimon Schubert int vtable_function_descriptors;
2475796c8dcSSimon Schubert int vbit_in_delta;
2485796c8dcSSimon Schubert gdbarch_skip_permanent_breakpoint_ftype *skip_permanent_breakpoint;
2495796c8dcSSimon Schubert ULONGEST max_insn_length;
2505796c8dcSSimon Schubert gdbarch_displaced_step_copy_insn_ftype *displaced_step_copy_insn;
2515796c8dcSSimon Schubert gdbarch_displaced_step_hw_singlestep_ftype *displaced_step_hw_singlestep;
2525796c8dcSSimon Schubert gdbarch_displaced_step_fixup_ftype *displaced_step_fixup;
2535796c8dcSSimon Schubert gdbarch_displaced_step_free_closure_ftype *displaced_step_free_closure;
2545796c8dcSSimon Schubert gdbarch_displaced_step_location_ftype *displaced_step_location;
255cf7f2e2dSJohn Marino gdbarch_relocate_instruction_ftype *relocate_instruction;
2565796c8dcSSimon Schubert gdbarch_overlay_update_ftype *overlay_update;
2575796c8dcSSimon Schubert gdbarch_core_read_description_ftype *core_read_description;
2585796c8dcSSimon Schubert gdbarch_static_transform_name_ftype *static_transform_name;
2595796c8dcSSimon Schubert int sofun_address_maybe_missing;
2605796c8dcSSimon Schubert gdbarch_process_record_ftype *process_record;
2615796c8dcSSimon Schubert gdbarch_process_record_signal_ftype *process_record_signal;
262*ef5ccd6cSJohn Marino gdbarch_gdb_signal_from_target_ftype *gdb_signal_from_target;
2635796c8dcSSimon Schubert gdbarch_get_siginfo_type_ftype *get_siginfo_type;
2645796c8dcSSimon Schubert gdbarch_record_special_symbol_ftype *record_special_symbol;
2655796c8dcSSimon Schubert gdbarch_get_syscall_number_ftype *get_syscall_number;
266*ef5ccd6cSJohn Marino const char * stap_integer_prefix;
267*ef5ccd6cSJohn Marino const char * stap_integer_suffix;
268*ef5ccd6cSJohn Marino const char * stap_register_prefix;
269*ef5ccd6cSJohn Marino const char * stap_register_suffix;
270*ef5ccd6cSJohn Marino const char * stap_register_indirection_prefix;
271*ef5ccd6cSJohn Marino const char * stap_register_indirection_suffix;
272*ef5ccd6cSJohn Marino const char * stap_gdb_register_prefix;
273*ef5ccd6cSJohn Marino const char * stap_gdb_register_suffix;
274*ef5ccd6cSJohn Marino gdbarch_stap_is_single_operand_ftype *stap_is_single_operand;
275*ef5ccd6cSJohn Marino gdbarch_stap_parse_special_token_ftype *stap_parse_special_token;
2765796c8dcSSimon Schubert int has_global_solist;
2775796c8dcSSimon Schubert int has_global_breakpoints;
278cf7f2e2dSJohn Marino gdbarch_has_shared_address_space_ftype *has_shared_address_space;
279cf7f2e2dSJohn Marino gdbarch_fast_tracepoint_valid_at_ftype *fast_tracepoint_valid_at;
280cf7f2e2dSJohn Marino gdbarch_auto_charset_ftype *auto_charset;
281cf7f2e2dSJohn Marino gdbarch_auto_wide_charset_ftype *auto_wide_charset;
282cf7f2e2dSJohn Marino const char * solib_symbols_extension;
283cf7f2e2dSJohn Marino int has_dos_based_file_system;
284a45ae5f8SJohn Marino gdbarch_gen_return_address_ftype *gen_return_address;
285*ef5ccd6cSJohn Marino gdbarch_info_proc_ftype *info_proc;
286*ef5ccd6cSJohn Marino gdbarch_core_info_proc_ftype *core_info_proc;
287*ef5ccd6cSJohn Marino gdbarch_iterate_over_objfiles_in_search_order_ftype *iterate_over_objfiles_in_search_order;
288*ef5ccd6cSJohn Marino struct ravenscar_arch_ops * ravenscar_ops;
2895796c8dcSSimon Schubert };
2905796c8dcSSimon Schubert
2915796c8dcSSimon Schubert
2925796c8dcSSimon Schubert /* The default architecture uses host values (for want of a better
2935796c8dcSSimon Schubert choice). */
2945796c8dcSSimon Schubert
2955796c8dcSSimon Schubert extern const struct bfd_arch_info bfd_default_arch_struct;
2965796c8dcSSimon Schubert
2975796c8dcSSimon Schubert struct gdbarch startup_gdbarch =
2985796c8dcSSimon Schubert {
2995796c8dcSSimon Schubert 1, /* Always initialized. */
3005796c8dcSSimon Schubert NULL, /* The obstack. */
301c50c785cSJohn Marino /* basic architecture information. */
3025796c8dcSSimon Schubert &bfd_default_arch_struct, /* bfd_arch_info */
3035796c8dcSSimon Schubert BFD_ENDIAN_BIG, /* byte_order */
3045796c8dcSSimon Schubert BFD_ENDIAN_BIG, /* byte_order_for_code */
3055796c8dcSSimon Schubert GDB_OSABI_UNKNOWN, /* osabi */
3065796c8dcSSimon Schubert 0, /* target_desc */
307c50c785cSJohn Marino /* target specific vector and its dump routine. */
3085796c8dcSSimon Schubert NULL, NULL,
309*ef5ccd6cSJohn Marino /*per-architecture data-pointers. */
310*ef5ccd6cSJohn Marino 0, NULL,
3115796c8dcSSimon Schubert /* Multi-arch values */
3125796c8dcSSimon Schubert 1, /* bits_big_endian */
3135796c8dcSSimon Schubert 8 * sizeof (short), /* short_bit */
3145796c8dcSSimon Schubert 8 * sizeof (int), /* int_bit */
3155796c8dcSSimon Schubert 8 * sizeof (long), /* long_bit */
3165796c8dcSSimon Schubert 8 * sizeof (LONGEST), /* long_long_bit */
317a45ae5f8SJohn Marino 8 * sizeof (LONGEST), /* long_long_align_bit */
318cf7f2e2dSJohn Marino 16, /* half_bit */
319cf7f2e2dSJohn Marino 0, /* half_format */
3205796c8dcSSimon Schubert 8 * sizeof (float), /* float_bit */
3215796c8dcSSimon Schubert 0, /* float_format */
3225796c8dcSSimon Schubert 8 * sizeof (double), /* double_bit */
3235796c8dcSSimon Schubert 0, /* double_format */
3245796c8dcSSimon Schubert 8 * sizeof (long double), /* long_double_bit */
3255796c8dcSSimon Schubert 0, /* long_double_format */
3265796c8dcSSimon Schubert 8 * sizeof (void*), /* ptr_bit */
3275796c8dcSSimon Schubert 8 * sizeof (void*), /* addr_bit */
328c50c785cSJohn Marino sizeof (void*), /* dwarf2_addr_size */
3295796c8dcSSimon Schubert 1, /* char_signed */
3305796c8dcSSimon Schubert 0, /* read_pc */
3315796c8dcSSimon Schubert 0, /* write_pc */
3325796c8dcSSimon Schubert legacy_virtual_frame_pointer, /* virtual_frame_pointer */
3335796c8dcSSimon Schubert 0, /* pseudo_register_read */
334a45ae5f8SJohn Marino 0, /* pseudo_register_read_value */
3355796c8dcSSimon Schubert 0, /* pseudo_register_write */
3365796c8dcSSimon Schubert 0, /* num_regs */
3375796c8dcSSimon Schubert 0, /* num_pseudo_regs */
338c50c785cSJohn Marino 0, /* ax_pseudo_register_collect */
339c50c785cSJohn Marino 0, /* ax_pseudo_register_push_stack */
3405796c8dcSSimon Schubert -1, /* sp_regnum */
3415796c8dcSSimon Schubert -1, /* pc_regnum */
3425796c8dcSSimon Schubert -1, /* ps_regnum */
3435796c8dcSSimon Schubert 0, /* fp0_regnum */
3445796c8dcSSimon Schubert no_op_reg_to_regnum, /* stab_reg_to_regnum */
3455796c8dcSSimon Schubert no_op_reg_to_regnum, /* ecoff_reg_to_regnum */
3465796c8dcSSimon Schubert no_op_reg_to_regnum, /* sdb_reg_to_regnum */
3475796c8dcSSimon Schubert no_op_reg_to_regnum, /* dwarf2_reg_to_regnum */
3485796c8dcSSimon Schubert 0, /* register_name */
3495796c8dcSSimon Schubert 0, /* register_type */
3505796c8dcSSimon Schubert 0, /* dummy_id */
3515796c8dcSSimon Schubert -1, /* deprecated_fp_regnum */
3525796c8dcSSimon Schubert 0, /* push_dummy_call */
3535796c8dcSSimon Schubert 0, /* call_dummy_location */
3545796c8dcSSimon Schubert 0, /* push_dummy_code */
3555796c8dcSSimon Schubert default_print_registers_info, /* print_registers_info */
3565796c8dcSSimon Schubert 0, /* print_float_info */
3575796c8dcSSimon Schubert 0, /* print_vector_info */
3585796c8dcSSimon Schubert legacy_register_sim_regno, /* register_sim_regno */
3595796c8dcSSimon Schubert cannot_register_not, /* cannot_fetch_register */
3605796c8dcSSimon Schubert cannot_register_not, /* cannot_store_register */
3615796c8dcSSimon Schubert 0, /* get_longjmp_target */
3625796c8dcSSimon Schubert 0, /* believe_pcc_promotion */
3635796c8dcSSimon Schubert generic_convert_register_p, /* convert_register_p */
3645796c8dcSSimon Schubert 0, /* register_to_value */
3655796c8dcSSimon Schubert 0, /* value_to_register */
3665796c8dcSSimon Schubert 0, /* value_from_register */
3675796c8dcSSimon Schubert unsigned_pointer_to_address, /* pointer_to_address */
3685796c8dcSSimon Schubert unsigned_address_to_pointer, /* address_to_pointer */
3695796c8dcSSimon Schubert 0, /* integer_to_address */
3705796c8dcSSimon Schubert 0, /* return_value */
371*ef5ccd6cSJohn Marino default_return_in_first_hidden_param_p, /* return_in_first_hidden_param_p */
3725796c8dcSSimon Schubert 0, /* skip_prologue */
3735796c8dcSSimon Schubert 0, /* skip_main_prologue */
3745796c8dcSSimon Schubert 0, /* inner_than */
3755796c8dcSSimon Schubert 0, /* breakpoint_from_pc */
376cf7f2e2dSJohn Marino default_remote_breakpoint_from_pc, /* remote_breakpoint_from_pc */
3775796c8dcSSimon Schubert 0, /* adjust_breakpoint_address */
3785796c8dcSSimon Schubert default_memory_insert_breakpoint, /* memory_insert_breakpoint */
3795796c8dcSSimon Schubert default_memory_remove_breakpoint, /* memory_remove_breakpoint */
3805796c8dcSSimon Schubert 0, /* decr_pc_after_break */
3815796c8dcSSimon Schubert 0, /* deprecated_function_start_offset */
3825796c8dcSSimon Schubert default_remote_register_number, /* remote_register_number */
3835796c8dcSSimon Schubert 0, /* fetch_tls_load_module_address */
3845796c8dcSSimon Schubert 0, /* frame_args_skip */
3855796c8dcSSimon Schubert 0, /* unwind_pc */
3865796c8dcSSimon Schubert 0, /* unwind_sp */
3875796c8dcSSimon Schubert 0, /* frame_num_args */
3885796c8dcSSimon Schubert 0, /* frame_align */
3895796c8dcSSimon Schubert default_stabs_argument_has_addr, /* stabs_argument_has_addr */
3905796c8dcSSimon Schubert 0, /* frame_red_zone_size */
3915796c8dcSSimon Schubert convert_from_func_ptr_addr_identity, /* convert_from_func_ptr_addr */
3925796c8dcSSimon Schubert core_addr_identity, /* addr_bits_remove */
3935796c8dcSSimon Schubert 0, /* software_single_step */
3945796c8dcSSimon Schubert 0, /* single_step_through_delay */
3955796c8dcSSimon Schubert 0, /* print_insn */
3965796c8dcSSimon Schubert 0, /* skip_trampoline_code */
3975796c8dcSSimon Schubert generic_skip_solib_resolver, /* skip_solib_resolver */
3985796c8dcSSimon Schubert generic_in_solib_return_trampoline, /* in_solib_return_trampoline */
3995796c8dcSSimon Schubert generic_in_function_epilogue_p, /* in_function_epilogue_p */
4005796c8dcSSimon Schubert 0, /* elf_make_msymbol_special */
4015796c8dcSSimon Schubert 0, /* coff_make_msymbol_special */
4025796c8dcSSimon Schubert 0, /* cannot_step_breakpoint */
4035796c8dcSSimon Schubert 0, /* have_nonsteppable_watchpoint */
4045796c8dcSSimon Schubert 0, /* address_class_type_flags */
4055796c8dcSSimon Schubert 0, /* address_class_type_flags_to_name */
4065796c8dcSSimon Schubert 0, /* address_class_name_to_type_flags */
4075796c8dcSSimon Schubert default_register_reggroup_p, /* register_reggroup_p */
4085796c8dcSSimon Schubert 0, /* fetch_pointer_argument */
4095796c8dcSSimon Schubert 0, /* regset_from_core_section */
4105796c8dcSSimon Schubert 0, /* core_regset_sections */
411*ef5ccd6cSJohn Marino 0, /* make_corefile_notes */
412*ef5ccd6cSJohn Marino 0, /* elfcore_write_linux_prpsinfo */
413*ef5ccd6cSJohn Marino 0, /* find_memory_regions */
4145796c8dcSSimon Schubert 0, /* core_xfer_shared_libraries */
4155796c8dcSSimon Schubert 0, /* core_pid_to_str */
4165796c8dcSSimon Schubert 0, /* gcore_bfd_target */
4175796c8dcSSimon Schubert 0, /* vtable_function_descriptors */
4185796c8dcSSimon Schubert 0, /* vbit_in_delta */
4195796c8dcSSimon Schubert 0, /* skip_permanent_breakpoint */
4205796c8dcSSimon Schubert 0, /* max_insn_length */
4215796c8dcSSimon Schubert 0, /* displaced_step_copy_insn */
4225796c8dcSSimon Schubert default_displaced_step_hw_singlestep, /* displaced_step_hw_singlestep */
4235796c8dcSSimon Schubert 0, /* displaced_step_fixup */
4245796c8dcSSimon Schubert NULL, /* displaced_step_free_closure */
4255796c8dcSSimon Schubert NULL, /* displaced_step_location */
426cf7f2e2dSJohn Marino 0, /* relocate_instruction */
4275796c8dcSSimon Schubert 0, /* overlay_update */
4285796c8dcSSimon Schubert 0, /* core_read_description */
4295796c8dcSSimon Schubert 0, /* static_transform_name */
4305796c8dcSSimon Schubert 0, /* sofun_address_maybe_missing */
4315796c8dcSSimon Schubert 0, /* process_record */
4325796c8dcSSimon Schubert 0, /* process_record_signal */
433*ef5ccd6cSJohn Marino 0, /* gdb_signal_from_target */
4345796c8dcSSimon Schubert 0, /* get_siginfo_type */
4355796c8dcSSimon Schubert 0, /* record_special_symbol */
4365796c8dcSSimon Schubert 0, /* get_syscall_number */
437*ef5ccd6cSJohn Marino 0, /* stap_integer_prefix */
438*ef5ccd6cSJohn Marino 0, /* stap_integer_suffix */
439*ef5ccd6cSJohn Marino 0, /* stap_register_prefix */
440*ef5ccd6cSJohn Marino 0, /* stap_register_suffix */
441*ef5ccd6cSJohn Marino 0, /* stap_register_indirection_prefix */
442*ef5ccd6cSJohn Marino 0, /* stap_register_indirection_suffix */
443*ef5ccd6cSJohn Marino 0, /* stap_gdb_register_prefix */
444*ef5ccd6cSJohn Marino 0, /* stap_gdb_register_suffix */
445*ef5ccd6cSJohn Marino 0, /* stap_is_single_operand */
446*ef5ccd6cSJohn Marino 0, /* stap_parse_special_token */
4475796c8dcSSimon Schubert 0, /* has_global_solist */
4485796c8dcSSimon Schubert 0, /* has_global_breakpoints */
449cf7f2e2dSJohn Marino default_has_shared_address_space, /* has_shared_address_space */
450cf7f2e2dSJohn Marino default_fast_tracepoint_valid_at, /* fast_tracepoint_valid_at */
451cf7f2e2dSJohn Marino default_auto_charset, /* auto_charset */
452cf7f2e2dSJohn Marino default_auto_wide_charset, /* auto_wide_charset */
453cf7f2e2dSJohn Marino 0, /* solib_symbols_extension */
454cf7f2e2dSJohn Marino 0, /* has_dos_based_file_system */
455a45ae5f8SJohn Marino default_gen_return_address, /* gen_return_address */
456*ef5ccd6cSJohn Marino 0, /* info_proc */
457*ef5ccd6cSJohn Marino 0, /* core_info_proc */
458*ef5ccd6cSJohn Marino default_iterate_over_objfiles_in_search_order, /* iterate_over_objfiles_in_search_order */
459*ef5ccd6cSJohn Marino NULL, /* ravenscar_ops */
4605796c8dcSSimon Schubert /* startup_gdbarch() */
4615796c8dcSSimon Schubert };
4625796c8dcSSimon Schubert
4635796c8dcSSimon Schubert
4645796c8dcSSimon Schubert /* Create a new ``struct gdbarch'' based on information provided by
4655796c8dcSSimon Schubert ``struct gdbarch_info''. */
4665796c8dcSSimon Schubert
4675796c8dcSSimon Schubert struct gdbarch *
gdbarch_alloc(const struct gdbarch_info * info,struct gdbarch_tdep * tdep)4685796c8dcSSimon Schubert gdbarch_alloc (const struct gdbarch_info *info,
4695796c8dcSSimon Schubert struct gdbarch_tdep *tdep)
4705796c8dcSSimon Schubert {
4715796c8dcSSimon Schubert struct gdbarch *gdbarch;
4725796c8dcSSimon Schubert
4735796c8dcSSimon Schubert /* Create an obstack for allocating all the per-architecture memory,
4745796c8dcSSimon Schubert then use that to allocate the architecture vector. */
4755796c8dcSSimon Schubert struct obstack *obstack = XMALLOC (struct obstack);
4765796c8dcSSimon Schubert obstack_init (obstack);
4775796c8dcSSimon Schubert gdbarch = obstack_alloc (obstack, sizeof (*gdbarch));
4785796c8dcSSimon Schubert memset (gdbarch, 0, sizeof (*gdbarch));
4795796c8dcSSimon Schubert gdbarch->obstack = obstack;
4805796c8dcSSimon Schubert
4815796c8dcSSimon Schubert alloc_gdbarch_data (gdbarch);
4825796c8dcSSimon Schubert
4835796c8dcSSimon Schubert gdbarch->tdep = tdep;
4845796c8dcSSimon Schubert
4855796c8dcSSimon Schubert gdbarch->bfd_arch_info = info->bfd_arch_info;
4865796c8dcSSimon Schubert gdbarch->byte_order = info->byte_order;
4875796c8dcSSimon Schubert gdbarch->byte_order_for_code = info->byte_order_for_code;
4885796c8dcSSimon Schubert gdbarch->osabi = info->osabi;
4895796c8dcSSimon Schubert gdbarch->target_desc = info->target_desc;
4905796c8dcSSimon Schubert
4915796c8dcSSimon Schubert /* Force the explicit initialization of these. */
4925796c8dcSSimon Schubert gdbarch->bits_big_endian = (gdbarch->byte_order == BFD_ENDIAN_BIG);
4935796c8dcSSimon Schubert gdbarch->short_bit = 2*TARGET_CHAR_BIT;
4945796c8dcSSimon Schubert gdbarch->int_bit = 4*TARGET_CHAR_BIT;
4955796c8dcSSimon Schubert gdbarch->long_bit = 4*TARGET_CHAR_BIT;
4965796c8dcSSimon Schubert gdbarch->long_long_bit = 2*gdbarch->long_bit;
497a45ae5f8SJohn Marino gdbarch->long_long_align_bit = 2*gdbarch->long_bit;
498cf7f2e2dSJohn Marino gdbarch->half_bit = 2*TARGET_CHAR_BIT;
4995796c8dcSSimon Schubert gdbarch->float_bit = 4*TARGET_CHAR_BIT;
5005796c8dcSSimon Schubert gdbarch->double_bit = 8*TARGET_CHAR_BIT;
5015796c8dcSSimon Schubert gdbarch->long_double_bit = 8*TARGET_CHAR_BIT;
5025796c8dcSSimon Schubert gdbarch->ptr_bit = gdbarch->int_bit;
5035796c8dcSSimon Schubert gdbarch->char_signed = -1;
5045796c8dcSSimon Schubert gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
5055796c8dcSSimon Schubert gdbarch->num_regs = -1;
5065796c8dcSSimon Schubert gdbarch->sp_regnum = -1;
5075796c8dcSSimon Schubert gdbarch->pc_regnum = -1;
5085796c8dcSSimon Schubert gdbarch->ps_regnum = -1;
5095796c8dcSSimon Schubert gdbarch->fp0_regnum = -1;
5105796c8dcSSimon Schubert gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
5115796c8dcSSimon Schubert gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
5125796c8dcSSimon Schubert gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
5135796c8dcSSimon Schubert gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
5145796c8dcSSimon Schubert gdbarch->deprecated_fp_regnum = -1;
5155796c8dcSSimon Schubert gdbarch->call_dummy_location = AT_ENTRY_POINT;
5165796c8dcSSimon Schubert gdbarch->print_registers_info = default_print_registers_info;
5175796c8dcSSimon Schubert gdbarch->register_sim_regno = legacy_register_sim_regno;
5185796c8dcSSimon Schubert gdbarch->cannot_fetch_register = cannot_register_not;
5195796c8dcSSimon Schubert gdbarch->cannot_store_register = cannot_register_not;
5205796c8dcSSimon Schubert gdbarch->convert_register_p = generic_convert_register_p;
5215796c8dcSSimon Schubert gdbarch->value_from_register = default_value_from_register;
5225796c8dcSSimon Schubert gdbarch->pointer_to_address = unsigned_pointer_to_address;
5235796c8dcSSimon Schubert gdbarch->address_to_pointer = unsigned_address_to_pointer;
524*ef5ccd6cSJohn Marino gdbarch->return_in_first_hidden_param_p = default_return_in_first_hidden_param_p;
525cf7f2e2dSJohn Marino gdbarch->remote_breakpoint_from_pc = default_remote_breakpoint_from_pc;
5265796c8dcSSimon Schubert gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
5275796c8dcSSimon Schubert gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
5285796c8dcSSimon Schubert gdbarch->remote_register_number = default_remote_register_number;
5295796c8dcSSimon Schubert gdbarch->stabs_argument_has_addr = default_stabs_argument_has_addr;
5305796c8dcSSimon Schubert gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr_identity;
5315796c8dcSSimon Schubert gdbarch->addr_bits_remove = core_addr_identity;
5325796c8dcSSimon Schubert gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
5335796c8dcSSimon Schubert gdbarch->skip_solib_resolver = generic_skip_solib_resolver;
5345796c8dcSSimon Schubert gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
5355796c8dcSSimon Schubert gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
5365796c8dcSSimon Schubert gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
5375796c8dcSSimon Schubert gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
5385796c8dcSSimon Schubert gdbarch->register_reggroup_p = default_register_reggroup_p;
5395796c8dcSSimon Schubert gdbarch->displaced_step_hw_singlestep = default_displaced_step_hw_singlestep;
5405796c8dcSSimon Schubert gdbarch->displaced_step_fixup = NULL;
5415796c8dcSSimon Schubert gdbarch->displaced_step_free_closure = NULL;
5425796c8dcSSimon Schubert gdbarch->displaced_step_location = NULL;
543cf7f2e2dSJohn Marino gdbarch->relocate_instruction = NULL;
544cf7f2e2dSJohn Marino gdbarch->has_shared_address_space = default_has_shared_address_space;
545cf7f2e2dSJohn Marino gdbarch->fast_tracepoint_valid_at = default_fast_tracepoint_valid_at;
546cf7f2e2dSJohn Marino gdbarch->auto_charset = default_auto_charset;
547cf7f2e2dSJohn Marino gdbarch->auto_wide_charset = default_auto_wide_charset;
548a45ae5f8SJohn Marino gdbarch->gen_return_address = default_gen_return_address;
549*ef5ccd6cSJohn Marino gdbarch->iterate_over_objfiles_in_search_order = default_iterate_over_objfiles_in_search_order;
550*ef5ccd6cSJohn Marino gdbarch->ravenscar_ops = NULL;
5515796c8dcSSimon Schubert /* gdbarch_alloc() */
5525796c8dcSSimon Schubert
5535796c8dcSSimon Schubert return gdbarch;
5545796c8dcSSimon Schubert }
5555796c8dcSSimon Schubert
5565796c8dcSSimon Schubert
5575796c8dcSSimon Schubert /* Allocate extra space using the per-architecture obstack. */
5585796c8dcSSimon Schubert
5595796c8dcSSimon Schubert void *
gdbarch_obstack_zalloc(struct gdbarch * arch,long size)5605796c8dcSSimon Schubert gdbarch_obstack_zalloc (struct gdbarch *arch, long size)
5615796c8dcSSimon Schubert {
5625796c8dcSSimon Schubert void *data = obstack_alloc (arch->obstack, size);
563cf7f2e2dSJohn Marino
5645796c8dcSSimon Schubert memset (data, 0, size);
5655796c8dcSSimon Schubert return data;
5665796c8dcSSimon Schubert }
5675796c8dcSSimon Schubert
5685796c8dcSSimon Schubert
5695796c8dcSSimon Schubert /* Free a gdbarch struct. This should never happen in normal
5705796c8dcSSimon Schubert operation --- once you've created a gdbarch, you keep it around.
5715796c8dcSSimon Schubert However, if an architecture's init function encounters an error
5725796c8dcSSimon Schubert building the structure, it may need to clean up a partially
5735796c8dcSSimon Schubert constructed gdbarch. */
5745796c8dcSSimon Schubert
5755796c8dcSSimon Schubert void
gdbarch_free(struct gdbarch * arch)5765796c8dcSSimon Schubert gdbarch_free (struct gdbarch *arch)
5775796c8dcSSimon Schubert {
5785796c8dcSSimon Schubert struct obstack *obstack;
579cf7f2e2dSJohn Marino
5805796c8dcSSimon Schubert gdb_assert (arch != NULL);
5815796c8dcSSimon Schubert gdb_assert (!arch->initialized_p);
5825796c8dcSSimon Schubert obstack = arch->obstack;
5835796c8dcSSimon Schubert obstack_free (obstack, 0); /* Includes the ARCH. */
5845796c8dcSSimon Schubert xfree (obstack);
5855796c8dcSSimon Schubert }
5865796c8dcSSimon Schubert
5875796c8dcSSimon Schubert
5885796c8dcSSimon Schubert /* Ensure that all values in a GDBARCH are reasonable. */
5895796c8dcSSimon Schubert
5905796c8dcSSimon Schubert static void
verify_gdbarch(struct gdbarch * gdbarch)5915796c8dcSSimon Schubert verify_gdbarch (struct gdbarch *gdbarch)
5925796c8dcSSimon Schubert {
5935796c8dcSSimon Schubert struct ui_file *log;
5945796c8dcSSimon Schubert struct cleanup *cleanups;
5955796c8dcSSimon Schubert long length;
5965796c8dcSSimon Schubert char *buf;
597cf7f2e2dSJohn Marino
5985796c8dcSSimon Schubert log = mem_fileopen ();
5995796c8dcSSimon Schubert cleanups = make_cleanup_ui_file_delete (log);
6005796c8dcSSimon Schubert /* fundamental */
6015796c8dcSSimon Schubert if (gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
6025796c8dcSSimon Schubert fprintf_unfiltered (log, "\n\tbyte-order");
6035796c8dcSSimon Schubert if (gdbarch->bfd_arch_info == NULL)
6045796c8dcSSimon Schubert fprintf_unfiltered (log, "\n\tbfd_arch_info");
6055796c8dcSSimon Schubert /* Check those that need to be defined for the given multi-arch level. */
6065796c8dcSSimon Schubert /* Skip verify of bits_big_endian, invalid_p == 0 */
6075796c8dcSSimon Schubert /* Skip verify of short_bit, invalid_p == 0 */
6085796c8dcSSimon Schubert /* Skip verify of int_bit, invalid_p == 0 */
6095796c8dcSSimon Schubert /* Skip verify of long_bit, invalid_p == 0 */
6105796c8dcSSimon Schubert /* Skip verify of long_long_bit, invalid_p == 0 */
611a45ae5f8SJohn Marino /* Skip verify of long_long_align_bit, invalid_p == 0 */
612cf7f2e2dSJohn Marino /* Skip verify of half_bit, invalid_p == 0 */
613cf7f2e2dSJohn Marino if (gdbarch->half_format == 0)
614cf7f2e2dSJohn Marino gdbarch->half_format = floatformats_ieee_half;
6155796c8dcSSimon Schubert /* Skip verify of float_bit, invalid_p == 0 */
6165796c8dcSSimon Schubert if (gdbarch->float_format == 0)
6175796c8dcSSimon Schubert gdbarch->float_format = floatformats_ieee_single;
6185796c8dcSSimon Schubert /* Skip verify of double_bit, invalid_p == 0 */
6195796c8dcSSimon Schubert if (gdbarch->double_format == 0)
6205796c8dcSSimon Schubert gdbarch->double_format = floatformats_ieee_double;
6215796c8dcSSimon Schubert /* Skip verify of long_double_bit, invalid_p == 0 */
6225796c8dcSSimon Schubert if (gdbarch->long_double_format == 0)
6235796c8dcSSimon Schubert gdbarch->long_double_format = floatformats_ieee_double;
6245796c8dcSSimon Schubert /* Skip verify of ptr_bit, invalid_p == 0 */
6255796c8dcSSimon Schubert if (gdbarch->addr_bit == 0)
6265796c8dcSSimon Schubert gdbarch->addr_bit = gdbarch_ptr_bit (gdbarch);
627c50c785cSJohn Marino if (gdbarch->dwarf2_addr_size == 0)
628c50c785cSJohn Marino gdbarch->dwarf2_addr_size = gdbarch_ptr_bit (gdbarch) / TARGET_CHAR_BIT;
6295796c8dcSSimon Schubert if (gdbarch->char_signed == -1)
6305796c8dcSSimon Schubert gdbarch->char_signed = 1;
631c50c785cSJohn Marino /* Skip verify of read_pc, has predicate. */
632c50c785cSJohn Marino /* Skip verify of write_pc, has predicate. */
6335796c8dcSSimon Schubert /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
634c50c785cSJohn Marino /* Skip verify of pseudo_register_read, has predicate. */
635a45ae5f8SJohn Marino /* Skip verify of pseudo_register_read_value, has predicate. */
636c50c785cSJohn Marino /* Skip verify of pseudo_register_write, has predicate. */
6375796c8dcSSimon Schubert if (gdbarch->num_regs == -1)
6385796c8dcSSimon Schubert fprintf_unfiltered (log, "\n\tnum_regs");
6395796c8dcSSimon Schubert /* Skip verify of num_pseudo_regs, invalid_p == 0 */
640c50c785cSJohn Marino /* Skip verify of ax_pseudo_register_collect, has predicate. */
641c50c785cSJohn Marino /* Skip verify of ax_pseudo_register_push_stack, has predicate. */
6425796c8dcSSimon Schubert /* Skip verify of sp_regnum, invalid_p == 0 */
6435796c8dcSSimon Schubert /* Skip verify of pc_regnum, invalid_p == 0 */
6445796c8dcSSimon Schubert /* Skip verify of ps_regnum, invalid_p == 0 */
6455796c8dcSSimon Schubert /* Skip verify of fp0_regnum, invalid_p == 0 */
6465796c8dcSSimon Schubert /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
6475796c8dcSSimon Schubert /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
6485796c8dcSSimon Schubert /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
6495796c8dcSSimon Schubert /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
6505796c8dcSSimon Schubert if (gdbarch->register_name == 0)
6515796c8dcSSimon Schubert fprintf_unfiltered (log, "\n\tregister_name");
652c50c785cSJohn Marino /* Skip verify of register_type, has predicate. */
653c50c785cSJohn Marino /* Skip verify of dummy_id, has predicate. */
6545796c8dcSSimon Schubert /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
655c50c785cSJohn Marino /* Skip verify of push_dummy_call, has predicate. */
6565796c8dcSSimon Schubert /* Skip verify of call_dummy_location, invalid_p == 0 */
657c50c785cSJohn Marino /* Skip verify of push_dummy_code, has predicate. */
6585796c8dcSSimon Schubert /* Skip verify of print_registers_info, invalid_p == 0 */
659c50c785cSJohn Marino /* Skip verify of print_float_info, has predicate. */
660c50c785cSJohn Marino /* Skip verify of print_vector_info, has predicate. */
6615796c8dcSSimon Schubert /* Skip verify of register_sim_regno, invalid_p == 0 */
6625796c8dcSSimon Schubert /* Skip verify of cannot_fetch_register, invalid_p == 0 */
6635796c8dcSSimon Schubert /* Skip verify of cannot_store_register, invalid_p == 0 */
664c50c785cSJohn Marino /* Skip verify of get_longjmp_target, has predicate. */
6655796c8dcSSimon Schubert /* Skip verify of convert_register_p, invalid_p == 0 */
6665796c8dcSSimon Schubert /* Skip verify of value_from_register, invalid_p == 0 */
6675796c8dcSSimon Schubert /* Skip verify of pointer_to_address, invalid_p == 0 */
6685796c8dcSSimon Schubert /* Skip verify of address_to_pointer, invalid_p == 0 */
669c50c785cSJohn Marino /* Skip verify of integer_to_address, has predicate. */
670c50c785cSJohn Marino /* Skip verify of return_value, has predicate. */
671*ef5ccd6cSJohn Marino /* Skip verify of return_in_first_hidden_param_p, invalid_p == 0 */
6725796c8dcSSimon Schubert if (gdbarch->skip_prologue == 0)
6735796c8dcSSimon Schubert fprintf_unfiltered (log, "\n\tskip_prologue");
674c50c785cSJohn Marino /* Skip verify of skip_main_prologue, has predicate. */
6755796c8dcSSimon Schubert if (gdbarch->inner_than == 0)
6765796c8dcSSimon Schubert fprintf_unfiltered (log, "\n\tinner_than");
6775796c8dcSSimon Schubert if (gdbarch->breakpoint_from_pc == 0)
6785796c8dcSSimon Schubert fprintf_unfiltered (log, "\n\tbreakpoint_from_pc");
679cf7f2e2dSJohn Marino /* Skip verify of remote_breakpoint_from_pc, invalid_p == 0 */
680c50c785cSJohn Marino /* Skip verify of adjust_breakpoint_address, has predicate. */
6815796c8dcSSimon Schubert /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
6825796c8dcSSimon Schubert /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
6835796c8dcSSimon Schubert /* Skip verify of decr_pc_after_break, invalid_p == 0 */
6845796c8dcSSimon Schubert /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
6855796c8dcSSimon Schubert /* Skip verify of remote_register_number, invalid_p == 0 */
686c50c785cSJohn Marino /* Skip verify of fetch_tls_load_module_address, has predicate. */
6875796c8dcSSimon Schubert /* Skip verify of frame_args_skip, invalid_p == 0 */
688c50c785cSJohn Marino /* Skip verify of unwind_pc, has predicate. */
689c50c785cSJohn Marino /* Skip verify of unwind_sp, has predicate. */
690c50c785cSJohn Marino /* Skip verify of frame_num_args, has predicate. */
691c50c785cSJohn Marino /* Skip verify of frame_align, has predicate. */
6925796c8dcSSimon Schubert /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
6935796c8dcSSimon Schubert /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
6945796c8dcSSimon Schubert /* Skip verify of addr_bits_remove, invalid_p == 0 */
695c50c785cSJohn Marino /* Skip verify of software_single_step, has predicate. */
696c50c785cSJohn Marino /* Skip verify of single_step_through_delay, has predicate. */
6975796c8dcSSimon Schubert if (gdbarch->print_insn == 0)
6985796c8dcSSimon Schubert fprintf_unfiltered (log, "\n\tprint_insn");
6995796c8dcSSimon Schubert /* Skip verify of skip_trampoline_code, invalid_p == 0 */
7005796c8dcSSimon Schubert /* Skip verify of skip_solib_resolver, invalid_p == 0 */
7015796c8dcSSimon Schubert /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
7025796c8dcSSimon Schubert /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
7035796c8dcSSimon Schubert /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
7045796c8dcSSimon Schubert /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
7055796c8dcSSimon Schubert /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
7065796c8dcSSimon Schubert /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
707c50c785cSJohn Marino /* Skip verify of address_class_type_flags, has predicate. */
708c50c785cSJohn Marino /* Skip verify of address_class_type_flags_to_name, has predicate. */
709c50c785cSJohn Marino /* Skip verify of address_class_name_to_type_flags, has predicate. */
7105796c8dcSSimon Schubert /* Skip verify of register_reggroup_p, invalid_p == 0 */
711c50c785cSJohn Marino /* Skip verify of fetch_pointer_argument, has predicate. */
712c50c785cSJohn Marino /* Skip verify of regset_from_core_section, has predicate. */
713*ef5ccd6cSJohn Marino /* Skip verify of make_corefile_notes, has predicate. */
714*ef5ccd6cSJohn Marino /* Skip verify of elfcore_write_linux_prpsinfo, has predicate. */
715*ef5ccd6cSJohn Marino /* Skip verify of find_memory_regions, has predicate. */
716c50c785cSJohn Marino /* Skip verify of core_xfer_shared_libraries, has predicate. */
717c50c785cSJohn Marino /* Skip verify of core_pid_to_str, has predicate. */
718c50c785cSJohn Marino /* Skip verify of gcore_bfd_target, has predicate. */
7195796c8dcSSimon Schubert /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
7205796c8dcSSimon Schubert /* Skip verify of vbit_in_delta, invalid_p == 0 */
721c50c785cSJohn Marino /* Skip verify of skip_permanent_breakpoint, has predicate. */
722c50c785cSJohn Marino /* Skip verify of max_insn_length, has predicate. */
723c50c785cSJohn Marino /* Skip verify of displaced_step_copy_insn, has predicate. */
7245796c8dcSSimon Schubert /* Skip verify of displaced_step_hw_singlestep, invalid_p == 0 */
725c50c785cSJohn Marino /* Skip verify of displaced_step_fixup, has predicate. */
7265796c8dcSSimon Schubert if ((! gdbarch->displaced_step_free_closure) != (! gdbarch->displaced_step_copy_insn))
7275796c8dcSSimon Schubert fprintf_unfiltered (log, "\n\tdisplaced_step_free_closure");
7285796c8dcSSimon Schubert if ((! gdbarch->displaced_step_location) != (! gdbarch->displaced_step_copy_insn))
7295796c8dcSSimon Schubert fprintf_unfiltered (log, "\n\tdisplaced_step_location");
730c50c785cSJohn Marino /* Skip verify of relocate_instruction, has predicate. */
731c50c785cSJohn Marino /* Skip verify of overlay_update, has predicate. */
732c50c785cSJohn Marino /* Skip verify of core_read_description, has predicate. */
733c50c785cSJohn Marino /* Skip verify of static_transform_name, has predicate. */
7345796c8dcSSimon Schubert /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
735c50c785cSJohn Marino /* Skip verify of process_record, has predicate. */
736c50c785cSJohn Marino /* Skip verify of process_record_signal, has predicate. */
737*ef5ccd6cSJohn Marino /* Skip verify of gdb_signal_from_target, has predicate. */
738c50c785cSJohn Marino /* Skip verify of get_siginfo_type, has predicate. */
739c50c785cSJohn Marino /* Skip verify of record_special_symbol, has predicate. */
740c50c785cSJohn Marino /* Skip verify of get_syscall_number, has predicate. */
741*ef5ccd6cSJohn Marino /* Skip verify of stap_integer_prefix, invalid_p == 0 */
742*ef5ccd6cSJohn Marino /* Skip verify of stap_integer_suffix, invalid_p == 0 */
743*ef5ccd6cSJohn Marino /* Skip verify of stap_register_prefix, invalid_p == 0 */
744*ef5ccd6cSJohn Marino /* Skip verify of stap_register_suffix, invalid_p == 0 */
745*ef5ccd6cSJohn Marino /* Skip verify of stap_register_indirection_prefix, invalid_p == 0 */
746*ef5ccd6cSJohn Marino /* Skip verify of stap_register_indirection_suffix, invalid_p == 0 */
747*ef5ccd6cSJohn Marino /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */
748*ef5ccd6cSJohn Marino /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */
749*ef5ccd6cSJohn Marino /* Skip verify of stap_is_single_operand, has predicate. */
750*ef5ccd6cSJohn Marino /* Skip verify of stap_parse_special_token, has predicate. */
7515796c8dcSSimon Schubert /* Skip verify of has_global_solist, invalid_p == 0 */
7525796c8dcSSimon Schubert /* Skip verify of has_global_breakpoints, invalid_p == 0 */
753cf7f2e2dSJohn Marino /* Skip verify of has_shared_address_space, invalid_p == 0 */
754cf7f2e2dSJohn Marino /* Skip verify of fast_tracepoint_valid_at, invalid_p == 0 */
755cf7f2e2dSJohn Marino /* Skip verify of auto_charset, invalid_p == 0 */
756cf7f2e2dSJohn Marino /* Skip verify of auto_wide_charset, invalid_p == 0 */
757cf7f2e2dSJohn Marino /* Skip verify of has_dos_based_file_system, invalid_p == 0 */
758a45ae5f8SJohn Marino /* Skip verify of gen_return_address, invalid_p == 0 */
759*ef5ccd6cSJohn Marino /* Skip verify of info_proc, has predicate. */
760*ef5ccd6cSJohn Marino /* Skip verify of core_info_proc, has predicate. */
761*ef5ccd6cSJohn Marino /* Skip verify of iterate_over_objfiles_in_search_order, invalid_p == 0 */
762*ef5ccd6cSJohn Marino /* Skip verify of ravenscar_ops, invalid_p == 0 */
7635796c8dcSSimon Schubert buf = ui_file_xstrdup (log, &length);
7645796c8dcSSimon Schubert make_cleanup (xfree, buf);
7655796c8dcSSimon Schubert if (length > 0)
7665796c8dcSSimon Schubert internal_error (__FILE__, __LINE__,
7675796c8dcSSimon Schubert _("verify_gdbarch: the following are invalid ...%s"),
7685796c8dcSSimon Schubert buf);
7695796c8dcSSimon Schubert do_cleanups (cleanups);
7705796c8dcSSimon Schubert }
7715796c8dcSSimon Schubert
7725796c8dcSSimon Schubert
7735796c8dcSSimon Schubert /* Print out the details of the current architecture. */
7745796c8dcSSimon Schubert
7755796c8dcSSimon Schubert void
gdbarch_dump(struct gdbarch * gdbarch,struct ui_file * file)7765796c8dcSSimon Schubert gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
7775796c8dcSSimon Schubert {
7785796c8dcSSimon Schubert const char *gdb_nm_file = "<not-defined>";
779cf7f2e2dSJohn Marino
7805796c8dcSSimon Schubert #if defined (GDB_NM_FILE)
7815796c8dcSSimon Schubert gdb_nm_file = GDB_NM_FILE;
7825796c8dcSSimon Schubert #endif
7835796c8dcSSimon Schubert fprintf_unfiltered (file,
7845796c8dcSSimon Schubert "gdbarch_dump: GDB_NM_FILE = %s\n",
7855796c8dcSSimon Schubert gdb_nm_file);
7865796c8dcSSimon Schubert fprintf_unfiltered (file,
7875796c8dcSSimon Schubert "gdbarch_dump: addr_bit = %s\n",
7885796c8dcSSimon Schubert plongest (gdbarch->addr_bit));
7895796c8dcSSimon Schubert fprintf_unfiltered (file,
7905796c8dcSSimon Schubert "gdbarch_dump: addr_bits_remove = <%s>\n",
7915796c8dcSSimon Schubert host_address_to_string (gdbarch->addr_bits_remove));
7925796c8dcSSimon Schubert fprintf_unfiltered (file,
7935796c8dcSSimon Schubert "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
7945796c8dcSSimon Schubert gdbarch_address_class_name_to_type_flags_p (gdbarch));
7955796c8dcSSimon Schubert fprintf_unfiltered (file,
7965796c8dcSSimon Schubert "gdbarch_dump: address_class_name_to_type_flags = <%s>\n",
7975796c8dcSSimon Schubert host_address_to_string (gdbarch->address_class_name_to_type_flags));
7985796c8dcSSimon Schubert fprintf_unfiltered (file,
7995796c8dcSSimon Schubert "gdbarch_dump: gdbarch_address_class_type_flags_p() = %d\n",
8005796c8dcSSimon Schubert gdbarch_address_class_type_flags_p (gdbarch));
8015796c8dcSSimon Schubert fprintf_unfiltered (file,
8025796c8dcSSimon Schubert "gdbarch_dump: address_class_type_flags = <%s>\n",
8035796c8dcSSimon Schubert host_address_to_string (gdbarch->address_class_type_flags));
8045796c8dcSSimon Schubert fprintf_unfiltered (file,
8055796c8dcSSimon Schubert "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
8065796c8dcSSimon Schubert gdbarch_address_class_type_flags_to_name_p (gdbarch));
8075796c8dcSSimon Schubert fprintf_unfiltered (file,
8085796c8dcSSimon Schubert "gdbarch_dump: address_class_type_flags_to_name = <%s>\n",
8095796c8dcSSimon Schubert host_address_to_string (gdbarch->address_class_type_flags_to_name));
8105796c8dcSSimon Schubert fprintf_unfiltered (file,
8115796c8dcSSimon Schubert "gdbarch_dump: address_to_pointer = <%s>\n",
8125796c8dcSSimon Schubert host_address_to_string (gdbarch->address_to_pointer));
8135796c8dcSSimon Schubert fprintf_unfiltered (file,
8145796c8dcSSimon Schubert "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n",
8155796c8dcSSimon Schubert gdbarch_adjust_breakpoint_address_p (gdbarch));
8165796c8dcSSimon Schubert fprintf_unfiltered (file,
8175796c8dcSSimon Schubert "gdbarch_dump: adjust_breakpoint_address = <%s>\n",
8185796c8dcSSimon Schubert host_address_to_string (gdbarch->adjust_breakpoint_address));
8195796c8dcSSimon Schubert fprintf_unfiltered (file,
820cf7f2e2dSJohn Marino "gdbarch_dump: auto_charset = <%s>\n",
821cf7f2e2dSJohn Marino host_address_to_string (gdbarch->auto_charset));
822cf7f2e2dSJohn Marino fprintf_unfiltered (file,
823cf7f2e2dSJohn Marino "gdbarch_dump: auto_wide_charset = <%s>\n",
824cf7f2e2dSJohn Marino host_address_to_string (gdbarch->auto_wide_charset));
825cf7f2e2dSJohn Marino fprintf_unfiltered (file,
826c50c785cSJohn Marino "gdbarch_dump: gdbarch_ax_pseudo_register_collect_p() = %d\n",
827c50c785cSJohn Marino gdbarch_ax_pseudo_register_collect_p (gdbarch));
828c50c785cSJohn Marino fprintf_unfiltered (file,
829c50c785cSJohn Marino "gdbarch_dump: ax_pseudo_register_collect = <%s>\n",
830c50c785cSJohn Marino host_address_to_string (gdbarch->ax_pseudo_register_collect));
831c50c785cSJohn Marino fprintf_unfiltered (file,
832c50c785cSJohn Marino "gdbarch_dump: gdbarch_ax_pseudo_register_push_stack_p() = %d\n",
833c50c785cSJohn Marino gdbarch_ax_pseudo_register_push_stack_p (gdbarch));
834c50c785cSJohn Marino fprintf_unfiltered (file,
835c50c785cSJohn Marino "gdbarch_dump: ax_pseudo_register_push_stack = <%s>\n",
836c50c785cSJohn Marino host_address_to_string (gdbarch->ax_pseudo_register_push_stack));
837c50c785cSJohn Marino fprintf_unfiltered (file,
8385796c8dcSSimon Schubert "gdbarch_dump: believe_pcc_promotion = %s\n",
8395796c8dcSSimon Schubert plongest (gdbarch->believe_pcc_promotion));
8405796c8dcSSimon Schubert fprintf_unfiltered (file,
8415796c8dcSSimon Schubert "gdbarch_dump: bfd_arch_info = %s\n",
8425796c8dcSSimon Schubert gdbarch_bfd_arch_info (gdbarch)->printable_name);
8435796c8dcSSimon Schubert fprintf_unfiltered (file,
8445796c8dcSSimon Schubert "gdbarch_dump: bits_big_endian = %s\n",
8455796c8dcSSimon Schubert plongest (gdbarch->bits_big_endian));
8465796c8dcSSimon Schubert fprintf_unfiltered (file,
8475796c8dcSSimon Schubert "gdbarch_dump: breakpoint_from_pc = <%s>\n",
8485796c8dcSSimon Schubert host_address_to_string (gdbarch->breakpoint_from_pc));
8495796c8dcSSimon Schubert fprintf_unfiltered (file,
8505796c8dcSSimon Schubert "gdbarch_dump: byte_order = %s\n",
8515796c8dcSSimon Schubert plongest (gdbarch->byte_order));
8525796c8dcSSimon Schubert fprintf_unfiltered (file,
8535796c8dcSSimon Schubert "gdbarch_dump: byte_order_for_code = %s\n",
8545796c8dcSSimon Schubert plongest (gdbarch->byte_order_for_code));
8555796c8dcSSimon Schubert fprintf_unfiltered (file,
8565796c8dcSSimon Schubert "gdbarch_dump: call_dummy_location = %s\n",
8575796c8dcSSimon Schubert plongest (gdbarch->call_dummy_location));
8585796c8dcSSimon Schubert fprintf_unfiltered (file,
8595796c8dcSSimon Schubert "gdbarch_dump: cannot_fetch_register = <%s>\n",
8605796c8dcSSimon Schubert host_address_to_string (gdbarch->cannot_fetch_register));
8615796c8dcSSimon Schubert fprintf_unfiltered (file,
8625796c8dcSSimon Schubert "gdbarch_dump: cannot_step_breakpoint = %s\n",
8635796c8dcSSimon Schubert plongest (gdbarch->cannot_step_breakpoint));
8645796c8dcSSimon Schubert fprintf_unfiltered (file,
8655796c8dcSSimon Schubert "gdbarch_dump: cannot_store_register = <%s>\n",
8665796c8dcSSimon Schubert host_address_to_string (gdbarch->cannot_store_register));
8675796c8dcSSimon Schubert fprintf_unfiltered (file,
8685796c8dcSSimon Schubert "gdbarch_dump: char_signed = %s\n",
8695796c8dcSSimon Schubert plongest (gdbarch->char_signed));
8705796c8dcSSimon Schubert fprintf_unfiltered (file,
8715796c8dcSSimon Schubert "gdbarch_dump: coff_make_msymbol_special = <%s>\n",
8725796c8dcSSimon Schubert host_address_to_string (gdbarch->coff_make_msymbol_special));
8735796c8dcSSimon Schubert fprintf_unfiltered (file,
8745796c8dcSSimon Schubert "gdbarch_dump: convert_from_func_ptr_addr = <%s>\n",
8755796c8dcSSimon Schubert host_address_to_string (gdbarch->convert_from_func_ptr_addr));
8765796c8dcSSimon Schubert fprintf_unfiltered (file,
8775796c8dcSSimon Schubert "gdbarch_dump: convert_register_p = <%s>\n",
8785796c8dcSSimon Schubert host_address_to_string (gdbarch->convert_register_p));
8795796c8dcSSimon Schubert fprintf_unfiltered (file,
880*ef5ccd6cSJohn Marino "gdbarch_dump: gdbarch_core_info_proc_p() = %d\n",
881*ef5ccd6cSJohn Marino gdbarch_core_info_proc_p (gdbarch));
882*ef5ccd6cSJohn Marino fprintf_unfiltered (file,
883*ef5ccd6cSJohn Marino "gdbarch_dump: core_info_proc = <%s>\n",
884*ef5ccd6cSJohn Marino host_address_to_string (gdbarch->core_info_proc));
885*ef5ccd6cSJohn Marino fprintf_unfiltered (file,
8865796c8dcSSimon Schubert "gdbarch_dump: gdbarch_core_pid_to_str_p() = %d\n",
8875796c8dcSSimon Schubert gdbarch_core_pid_to_str_p (gdbarch));
8885796c8dcSSimon Schubert fprintf_unfiltered (file,
8895796c8dcSSimon Schubert "gdbarch_dump: core_pid_to_str = <%s>\n",
8905796c8dcSSimon Schubert host_address_to_string (gdbarch->core_pid_to_str));
8915796c8dcSSimon Schubert fprintf_unfiltered (file,
8925796c8dcSSimon Schubert "gdbarch_dump: gdbarch_core_read_description_p() = %d\n",
8935796c8dcSSimon Schubert gdbarch_core_read_description_p (gdbarch));
8945796c8dcSSimon Schubert fprintf_unfiltered (file,
8955796c8dcSSimon Schubert "gdbarch_dump: core_read_description = <%s>\n",
8965796c8dcSSimon Schubert host_address_to_string (gdbarch->core_read_description));
8975796c8dcSSimon Schubert fprintf_unfiltered (file,
8985796c8dcSSimon Schubert "gdbarch_dump: core_regset_sections = %s\n",
8995796c8dcSSimon Schubert host_address_to_string (gdbarch->core_regset_sections));
9005796c8dcSSimon Schubert fprintf_unfiltered (file,
9015796c8dcSSimon Schubert "gdbarch_dump: gdbarch_core_xfer_shared_libraries_p() = %d\n",
9025796c8dcSSimon Schubert gdbarch_core_xfer_shared_libraries_p (gdbarch));
9035796c8dcSSimon Schubert fprintf_unfiltered (file,
9045796c8dcSSimon Schubert "gdbarch_dump: core_xfer_shared_libraries = <%s>\n",
9055796c8dcSSimon Schubert host_address_to_string (gdbarch->core_xfer_shared_libraries));
9065796c8dcSSimon Schubert fprintf_unfiltered (file,
9075796c8dcSSimon Schubert "gdbarch_dump: decr_pc_after_break = %s\n",
9085796c8dcSSimon Schubert core_addr_to_string_nz (gdbarch->decr_pc_after_break));
9095796c8dcSSimon Schubert fprintf_unfiltered (file,
9105796c8dcSSimon Schubert "gdbarch_dump: deprecated_fp_regnum = %s\n",
9115796c8dcSSimon Schubert plongest (gdbarch->deprecated_fp_regnum));
9125796c8dcSSimon Schubert fprintf_unfiltered (file,
9135796c8dcSSimon Schubert "gdbarch_dump: deprecated_function_start_offset = %s\n",
9145796c8dcSSimon Schubert core_addr_to_string_nz (gdbarch->deprecated_function_start_offset));
9155796c8dcSSimon Schubert fprintf_unfiltered (file,
9165796c8dcSSimon Schubert "gdbarch_dump: gdbarch_displaced_step_copy_insn_p() = %d\n",
9175796c8dcSSimon Schubert gdbarch_displaced_step_copy_insn_p (gdbarch));
9185796c8dcSSimon Schubert fprintf_unfiltered (file,
9195796c8dcSSimon Schubert "gdbarch_dump: displaced_step_copy_insn = <%s>\n",
9205796c8dcSSimon Schubert host_address_to_string (gdbarch->displaced_step_copy_insn));
9215796c8dcSSimon Schubert fprintf_unfiltered (file,
9225796c8dcSSimon Schubert "gdbarch_dump: gdbarch_displaced_step_fixup_p() = %d\n",
9235796c8dcSSimon Schubert gdbarch_displaced_step_fixup_p (gdbarch));
9245796c8dcSSimon Schubert fprintf_unfiltered (file,
9255796c8dcSSimon Schubert "gdbarch_dump: displaced_step_fixup = <%s>\n",
9265796c8dcSSimon Schubert host_address_to_string (gdbarch->displaced_step_fixup));
9275796c8dcSSimon Schubert fprintf_unfiltered (file,
9285796c8dcSSimon Schubert "gdbarch_dump: displaced_step_free_closure = <%s>\n",
9295796c8dcSSimon Schubert host_address_to_string (gdbarch->displaced_step_free_closure));
9305796c8dcSSimon Schubert fprintf_unfiltered (file,
9315796c8dcSSimon Schubert "gdbarch_dump: displaced_step_hw_singlestep = <%s>\n",
9325796c8dcSSimon Schubert host_address_to_string (gdbarch->displaced_step_hw_singlestep));
9335796c8dcSSimon Schubert fprintf_unfiltered (file,
9345796c8dcSSimon Schubert "gdbarch_dump: displaced_step_location = <%s>\n",
9355796c8dcSSimon Schubert host_address_to_string (gdbarch->displaced_step_location));
9365796c8dcSSimon Schubert fprintf_unfiltered (file,
9375796c8dcSSimon Schubert "gdbarch_dump: double_bit = %s\n",
9385796c8dcSSimon Schubert plongest (gdbarch->double_bit));
9395796c8dcSSimon Schubert fprintf_unfiltered (file,
9405796c8dcSSimon Schubert "gdbarch_dump: double_format = %s\n",
9415796c8dcSSimon Schubert pformat (gdbarch->double_format));
9425796c8dcSSimon Schubert fprintf_unfiltered (file,
9435796c8dcSSimon Schubert "gdbarch_dump: gdbarch_dummy_id_p() = %d\n",
9445796c8dcSSimon Schubert gdbarch_dummy_id_p (gdbarch));
9455796c8dcSSimon Schubert fprintf_unfiltered (file,
9465796c8dcSSimon Schubert "gdbarch_dump: dummy_id = <%s>\n",
9475796c8dcSSimon Schubert host_address_to_string (gdbarch->dummy_id));
9485796c8dcSSimon Schubert fprintf_unfiltered (file,
949c50c785cSJohn Marino "gdbarch_dump: dwarf2_addr_size = %s\n",
950c50c785cSJohn Marino plongest (gdbarch->dwarf2_addr_size));
951c50c785cSJohn Marino fprintf_unfiltered (file,
9525796c8dcSSimon Schubert "gdbarch_dump: dwarf2_reg_to_regnum = <%s>\n",
9535796c8dcSSimon Schubert host_address_to_string (gdbarch->dwarf2_reg_to_regnum));
9545796c8dcSSimon Schubert fprintf_unfiltered (file,
9555796c8dcSSimon Schubert "gdbarch_dump: ecoff_reg_to_regnum = <%s>\n",
9565796c8dcSSimon Schubert host_address_to_string (gdbarch->ecoff_reg_to_regnum));
9575796c8dcSSimon Schubert fprintf_unfiltered (file,
9585796c8dcSSimon Schubert "gdbarch_dump: elf_make_msymbol_special = <%s>\n",
9595796c8dcSSimon Schubert host_address_to_string (gdbarch->elf_make_msymbol_special));
9605796c8dcSSimon Schubert fprintf_unfiltered (file,
961*ef5ccd6cSJohn Marino "gdbarch_dump: gdbarch_elfcore_write_linux_prpsinfo_p() = %d\n",
962*ef5ccd6cSJohn Marino gdbarch_elfcore_write_linux_prpsinfo_p (gdbarch));
963*ef5ccd6cSJohn Marino fprintf_unfiltered (file,
964*ef5ccd6cSJohn Marino "gdbarch_dump: elfcore_write_linux_prpsinfo = <%s>\n",
965*ef5ccd6cSJohn Marino host_address_to_string (gdbarch->elfcore_write_linux_prpsinfo));
966*ef5ccd6cSJohn Marino fprintf_unfiltered (file,
967cf7f2e2dSJohn Marino "gdbarch_dump: fast_tracepoint_valid_at = <%s>\n",
968cf7f2e2dSJohn Marino host_address_to_string (gdbarch->fast_tracepoint_valid_at));
969cf7f2e2dSJohn Marino fprintf_unfiltered (file,
9705796c8dcSSimon Schubert "gdbarch_dump: gdbarch_fetch_pointer_argument_p() = %d\n",
9715796c8dcSSimon Schubert gdbarch_fetch_pointer_argument_p (gdbarch));
9725796c8dcSSimon Schubert fprintf_unfiltered (file,
9735796c8dcSSimon Schubert "gdbarch_dump: fetch_pointer_argument = <%s>\n",
9745796c8dcSSimon Schubert host_address_to_string (gdbarch->fetch_pointer_argument));
9755796c8dcSSimon Schubert fprintf_unfiltered (file,
9765796c8dcSSimon Schubert "gdbarch_dump: gdbarch_fetch_tls_load_module_address_p() = %d\n",
9775796c8dcSSimon Schubert gdbarch_fetch_tls_load_module_address_p (gdbarch));
9785796c8dcSSimon Schubert fprintf_unfiltered (file,
9795796c8dcSSimon Schubert "gdbarch_dump: fetch_tls_load_module_address = <%s>\n",
9805796c8dcSSimon Schubert host_address_to_string (gdbarch->fetch_tls_load_module_address));
9815796c8dcSSimon Schubert fprintf_unfiltered (file,
982*ef5ccd6cSJohn Marino "gdbarch_dump: gdbarch_find_memory_regions_p() = %d\n",
983*ef5ccd6cSJohn Marino gdbarch_find_memory_regions_p (gdbarch));
984*ef5ccd6cSJohn Marino fprintf_unfiltered (file,
985*ef5ccd6cSJohn Marino "gdbarch_dump: find_memory_regions = <%s>\n",
986*ef5ccd6cSJohn Marino host_address_to_string (gdbarch->find_memory_regions));
987*ef5ccd6cSJohn Marino fprintf_unfiltered (file,
9885796c8dcSSimon Schubert "gdbarch_dump: float_bit = %s\n",
9895796c8dcSSimon Schubert plongest (gdbarch->float_bit));
9905796c8dcSSimon Schubert fprintf_unfiltered (file,
9915796c8dcSSimon Schubert "gdbarch_dump: float_format = %s\n",
9925796c8dcSSimon Schubert pformat (gdbarch->float_format));
9935796c8dcSSimon Schubert fprintf_unfiltered (file,
9945796c8dcSSimon Schubert "gdbarch_dump: fp0_regnum = %s\n",
9955796c8dcSSimon Schubert plongest (gdbarch->fp0_regnum));
9965796c8dcSSimon Schubert fprintf_unfiltered (file,
9975796c8dcSSimon Schubert "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
9985796c8dcSSimon Schubert gdbarch_frame_align_p (gdbarch));
9995796c8dcSSimon Schubert fprintf_unfiltered (file,
10005796c8dcSSimon Schubert "gdbarch_dump: frame_align = <%s>\n",
10015796c8dcSSimon Schubert host_address_to_string (gdbarch->frame_align));
10025796c8dcSSimon Schubert fprintf_unfiltered (file,
10035796c8dcSSimon Schubert "gdbarch_dump: frame_args_skip = %s\n",
10045796c8dcSSimon Schubert core_addr_to_string_nz (gdbarch->frame_args_skip));
10055796c8dcSSimon Schubert fprintf_unfiltered (file,
10065796c8dcSSimon Schubert "gdbarch_dump: gdbarch_frame_num_args_p() = %d\n",
10075796c8dcSSimon Schubert gdbarch_frame_num_args_p (gdbarch));
10085796c8dcSSimon Schubert fprintf_unfiltered (file,
10095796c8dcSSimon Schubert "gdbarch_dump: frame_num_args = <%s>\n",
10105796c8dcSSimon Schubert host_address_to_string (gdbarch->frame_num_args));
10115796c8dcSSimon Schubert fprintf_unfiltered (file,
10125796c8dcSSimon Schubert "gdbarch_dump: frame_red_zone_size = %s\n",
10135796c8dcSSimon Schubert plongest (gdbarch->frame_red_zone_size));
10145796c8dcSSimon Schubert fprintf_unfiltered (file,
10155796c8dcSSimon Schubert "gdbarch_dump: gdbarch_gcore_bfd_target_p() = %d\n",
10165796c8dcSSimon Schubert gdbarch_gcore_bfd_target_p (gdbarch));
10175796c8dcSSimon Schubert fprintf_unfiltered (file,
10185796c8dcSSimon Schubert "gdbarch_dump: gcore_bfd_target = %s\n",
1019a45ae5f8SJohn Marino pstring (gdbarch->gcore_bfd_target));
1020a45ae5f8SJohn Marino fprintf_unfiltered (file,
1021*ef5ccd6cSJohn Marino "gdbarch_dump: gdbarch_gdb_signal_from_target_p() = %d\n",
1022*ef5ccd6cSJohn Marino gdbarch_gdb_signal_from_target_p (gdbarch));
1023*ef5ccd6cSJohn Marino fprintf_unfiltered (file,
1024*ef5ccd6cSJohn Marino "gdbarch_dump: gdb_signal_from_target = <%s>\n",
1025*ef5ccd6cSJohn Marino host_address_to_string (gdbarch->gdb_signal_from_target));
1026*ef5ccd6cSJohn Marino fprintf_unfiltered (file,
1027a45ae5f8SJohn Marino "gdbarch_dump: gen_return_address = <%s>\n",
1028a45ae5f8SJohn Marino host_address_to_string (gdbarch->gen_return_address));
10295796c8dcSSimon Schubert fprintf_unfiltered (file,
10305796c8dcSSimon Schubert "gdbarch_dump: gdbarch_get_longjmp_target_p() = %d\n",
10315796c8dcSSimon Schubert gdbarch_get_longjmp_target_p (gdbarch));
10325796c8dcSSimon Schubert fprintf_unfiltered (file,
10335796c8dcSSimon Schubert "gdbarch_dump: get_longjmp_target = <%s>\n",
10345796c8dcSSimon Schubert host_address_to_string (gdbarch->get_longjmp_target));
10355796c8dcSSimon Schubert fprintf_unfiltered (file,
10365796c8dcSSimon Schubert "gdbarch_dump: gdbarch_get_siginfo_type_p() = %d\n",
10375796c8dcSSimon Schubert gdbarch_get_siginfo_type_p (gdbarch));
10385796c8dcSSimon Schubert fprintf_unfiltered (file,
10395796c8dcSSimon Schubert "gdbarch_dump: get_siginfo_type = <%s>\n",
10405796c8dcSSimon Schubert host_address_to_string (gdbarch->get_siginfo_type));
10415796c8dcSSimon Schubert fprintf_unfiltered (file,
10425796c8dcSSimon Schubert "gdbarch_dump: gdbarch_get_syscall_number_p() = %d\n",
10435796c8dcSSimon Schubert gdbarch_get_syscall_number_p (gdbarch));
10445796c8dcSSimon Schubert fprintf_unfiltered (file,
10455796c8dcSSimon Schubert "gdbarch_dump: get_syscall_number = <%s>\n",
10465796c8dcSSimon Schubert host_address_to_string (gdbarch->get_syscall_number));
10475796c8dcSSimon Schubert fprintf_unfiltered (file,
1048cf7f2e2dSJohn Marino "gdbarch_dump: half_bit = %s\n",
1049cf7f2e2dSJohn Marino plongest (gdbarch->half_bit));
1050cf7f2e2dSJohn Marino fprintf_unfiltered (file,
1051cf7f2e2dSJohn Marino "gdbarch_dump: half_format = %s\n",
1052cf7f2e2dSJohn Marino pformat (gdbarch->half_format));
1053cf7f2e2dSJohn Marino fprintf_unfiltered (file,
1054cf7f2e2dSJohn Marino "gdbarch_dump: has_dos_based_file_system = %s\n",
1055cf7f2e2dSJohn Marino plongest (gdbarch->has_dos_based_file_system));
1056cf7f2e2dSJohn Marino fprintf_unfiltered (file,
10575796c8dcSSimon Schubert "gdbarch_dump: has_global_breakpoints = %s\n",
10585796c8dcSSimon Schubert plongest (gdbarch->has_global_breakpoints));
10595796c8dcSSimon Schubert fprintf_unfiltered (file,
10605796c8dcSSimon Schubert "gdbarch_dump: has_global_solist = %s\n",
10615796c8dcSSimon Schubert plongest (gdbarch->has_global_solist));
10625796c8dcSSimon Schubert fprintf_unfiltered (file,
1063cf7f2e2dSJohn Marino "gdbarch_dump: has_shared_address_space = <%s>\n",
1064cf7f2e2dSJohn Marino host_address_to_string (gdbarch->has_shared_address_space));
1065cf7f2e2dSJohn Marino fprintf_unfiltered (file,
10665796c8dcSSimon Schubert "gdbarch_dump: have_nonsteppable_watchpoint = %s\n",
10675796c8dcSSimon Schubert plongest (gdbarch->have_nonsteppable_watchpoint));
10685796c8dcSSimon Schubert fprintf_unfiltered (file,
10695796c8dcSSimon Schubert "gdbarch_dump: in_function_epilogue_p = <%s>\n",
10705796c8dcSSimon Schubert host_address_to_string (gdbarch->in_function_epilogue_p));
10715796c8dcSSimon Schubert fprintf_unfiltered (file,
10725796c8dcSSimon Schubert "gdbarch_dump: in_solib_return_trampoline = <%s>\n",
10735796c8dcSSimon Schubert host_address_to_string (gdbarch->in_solib_return_trampoline));
10745796c8dcSSimon Schubert fprintf_unfiltered (file,
1075*ef5ccd6cSJohn Marino "gdbarch_dump: gdbarch_info_proc_p() = %d\n",
1076*ef5ccd6cSJohn Marino gdbarch_info_proc_p (gdbarch));
1077*ef5ccd6cSJohn Marino fprintf_unfiltered (file,
1078*ef5ccd6cSJohn Marino "gdbarch_dump: info_proc = <%s>\n",
1079*ef5ccd6cSJohn Marino host_address_to_string (gdbarch->info_proc));
1080*ef5ccd6cSJohn Marino fprintf_unfiltered (file,
10815796c8dcSSimon Schubert "gdbarch_dump: inner_than = <%s>\n",
10825796c8dcSSimon Schubert host_address_to_string (gdbarch->inner_than));
10835796c8dcSSimon Schubert fprintf_unfiltered (file,
10845796c8dcSSimon Schubert "gdbarch_dump: int_bit = %s\n",
10855796c8dcSSimon Schubert plongest (gdbarch->int_bit));
10865796c8dcSSimon Schubert fprintf_unfiltered (file,
10875796c8dcSSimon Schubert "gdbarch_dump: gdbarch_integer_to_address_p() = %d\n",
10885796c8dcSSimon Schubert gdbarch_integer_to_address_p (gdbarch));
10895796c8dcSSimon Schubert fprintf_unfiltered (file,
10905796c8dcSSimon Schubert "gdbarch_dump: integer_to_address = <%s>\n",
10915796c8dcSSimon Schubert host_address_to_string (gdbarch->integer_to_address));
10925796c8dcSSimon Schubert fprintf_unfiltered (file,
1093*ef5ccd6cSJohn Marino "gdbarch_dump: iterate_over_objfiles_in_search_order = <%s>\n",
1094*ef5ccd6cSJohn Marino host_address_to_string (gdbarch->iterate_over_objfiles_in_search_order));
1095*ef5ccd6cSJohn Marino fprintf_unfiltered (file,
10965796c8dcSSimon Schubert "gdbarch_dump: long_bit = %s\n",
10975796c8dcSSimon Schubert plongest (gdbarch->long_bit));
10985796c8dcSSimon Schubert fprintf_unfiltered (file,
10995796c8dcSSimon Schubert "gdbarch_dump: long_double_bit = %s\n",
11005796c8dcSSimon Schubert plongest (gdbarch->long_double_bit));
11015796c8dcSSimon Schubert fprintf_unfiltered (file,
11025796c8dcSSimon Schubert "gdbarch_dump: long_double_format = %s\n",
11035796c8dcSSimon Schubert pformat (gdbarch->long_double_format));
11045796c8dcSSimon Schubert fprintf_unfiltered (file,
1105a45ae5f8SJohn Marino "gdbarch_dump: long_long_align_bit = %s\n",
1106a45ae5f8SJohn Marino plongest (gdbarch->long_long_align_bit));
1107a45ae5f8SJohn Marino fprintf_unfiltered (file,
11085796c8dcSSimon Schubert "gdbarch_dump: long_long_bit = %s\n",
11095796c8dcSSimon Schubert plongest (gdbarch->long_long_bit));
11105796c8dcSSimon Schubert fprintf_unfiltered (file,
1111*ef5ccd6cSJohn Marino "gdbarch_dump: gdbarch_make_corefile_notes_p() = %d\n",
1112*ef5ccd6cSJohn Marino gdbarch_make_corefile_notes_p (gdbarch));
1113*ef5ccd6cSJohn Marino fprintf_unfiltered (file,
1114*ef5ccd6cSJohn Marino "gdbarch_dump: make_corefile_notes = <%s>\n",
1115*ef5ccd6cSJohn Marino host_address_to_string (gdbarch->make_corefile_notes));
1116*ef5ccd6cSJohn Marino fprintf_unfiltered (file,
11175796c8dcSSimon Schubert "gdbarch_dump: gdbarch_max_insn_length_p() = %d\n",
11185796c8dcSSimon Schubert gdbarch_max_insn_length_p (gdbarch));
11195796c8dcSSimon Schubert fprintf_unfiltered (file,
11205796c8dcSSimon Schubert "gdbarch_dump: max_insn_length = %s\n",
11215796c8dcSSimon Schubert plongest (gdbarch->max_insn_length));
11225796c8dcSSimon Schubert fprintf_unfiltered (file,
11235796c8dcSSimon Schubert "gdbarch_dump: memory_insert_breakpoint = <%s>\n",
11245796c8dcSSimon Schubert host_address_to_string (gdbarch->memory_insert_breakpoint));
11255796c8dcSSimon Schubert fprintf_unfiltered (file,
11265796c8dcSSimon Schubert "gdbarch_dump: memory_remove_breakpoint = <%s>\n",
11275796c8dcSSimon Schubert host_address_to_string (gdbarch->memory_remove_breakpoint));
11285796c8dcSSimon Schubert fprintf_unfiltered (file,
11295796c8dcSSimon Schubert "gdbarch_dump: num_pseudo_regs = %s\n",
11305796c8dcSSimon Schubert plongest (gdbarch->num_pseudo_regs));
11315796c8dcSSimon Schubert fprintf_unfiltered (file,
11325796c8dcSSimon Schubert "gdbarch_dump: num_regs = %s\n",
11335796c8dcSSimon Schubert plongest (gdbarch->num_regs));
11345796c8dcSSimon Schubert fprintf_unfiltered (file,
11355796c8dcSSimon Schubert "gdbarch_dump: osabi = %s\n",
11365796c8dcSSimon Schubert plongest (gdbarch->osabi));
11375796c8dcSSimon Schubert fprintf_unfiltered (file,
11385796c8dcSSimon Schubert "gdbarch_dump: gdbarch_overlay_update_p() = %d\n",
11395796c8dcSSimon Schubert gdbarch_overlay_update_p (gdbarch));
11405796c8dcSSimon Schubert fprintf_unfiltered (file,
11415796c8dcSSimon Schubert "gdbarch_dump: overlay_update = <%s>\n",
11425796c8dcSSimon Schubert host_address_to_string (gdbarch->overlay_update));
11435796c8dcSSimon Schubert fprintf_unfiltered (file,
11445796c8dcSSimon Schubert "gdbarch_dump: pc_regnum = %s\n",
11455796c8dcSSimon Schubert plongest (gdbarch->pc_regnum));
11465796c8dcSSimon Schubert fprintf_unfiltered (file,
11475796c8dcSSimon Schubert "gdbarch_dump: pointer_to_address = <%s>\n",
11485796c8dcSSimon Schubert host_address_to_string (gdbarch->pointer_to_address));
11495796c8dcSSimon Schubert fprintf_unfiltered (file,
11505796c8dcSSimon Schubert "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
11515796c8dcSSimon Schubert gdbarch_print_float_info_p (gdbarch));
11525796c8dcSSimon Schubert fprintf_unfiltered (file,
11535796c8dcSSimon Schubert "gdbarch_dump: print_float_info = <%s>\n",
11545796c8dcSSimon Schubert host_address_to_string (gdbarch->print_float_info));
11555796c8dcSSimon Schubert fprintf_unfiltered (file,
11565796c8dcSSimon Schubert "gdbarch_dump: print_insn = <%s>\n",
11575796c8dcSSimon Schubert host_address_to_string (gdbarch->print_insn));
11585796c8dcSSimon Schubert fprintf_unfiltered (file,
11595796c8dcSSimon Schubert "gdbarch_dump: print_registers_info = <%s>\n",
11605796c8dcSSimon Schubert host_address_to_string (gdbarch->print_registers_info));
11615796c8dcSSimon Schubert fprintf_unfiltered (file,
11625796c8dcSSimon Schubert "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
11635796c8dcSSimon Schubert gdbarch_print_vector_info_p (gdbarch));
11645796c8dcSSimon Schubert fprintf_unfiltered (file,
11655796c8dcSSimon Schubert "gdbarch_dump: print_vector_info = <%s>\n",
11665796c8dcSSimon Schubert host_address_to_string (gdbarch->print_vector_info));
11675796c8dcSSimon Schubert fprintf_unfiltered (file,
11685796c8dcSSimon Schubert "gdbarch_dump: gdbarch_process_record_p() = %d\n",
11695796c8dcSSimon Schubert gdbarch_process_record_p (gdbarch));
11705796c8dcSSimon Schubert fprintf_unfiltered (file,
11715796c8dcSSimon Schubert "gdbarch_dump: process_record = <%s>\n",
11725796c8dcSSimon Schubert host_address_to_string (gdbarch->process_record));
11735796c8dcSSimon Schubert fprintf_unfiltered (file,
11745796c8dcSSimon Schubert "gdbarch_dump: gdbarch_process_record_signal_p() = %d\n",
11755796c8dcSSimon Schubert gdbarch_process_record_signal_p (gdbarch));
11765796c8dcSSimon Schubert fprintf_unfiltered (file,
11775796c8dcSSimon Schubert "gdbarch_dump: process_record_signal = <%s>\n",
11785796c8dcSSimon Schubert host_address_to_string (gdbarch->process_record_signal));
11795796c8dcSSimon Schubert fprintf_unfiltered (file,
11805796c8dcSSimon Schubert "gdbarch_dump: ps_regnum = %s\n",
11815796c8dcSSimon Schubert plongest (gdbarch->ps_regnum));
11825796c8dcSSimon Schubert fprintf_unfiltered (file,
11835796c8dcSSimon Schubert "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
11845796c8dcSSimon Schubert gdbarch_pseudo_register_read_p (gdbarch));
11855796c8dcSSimon Schubert fprintf_unfiltered (file,
11865796c8dcSSimon Schubert "gdbarch_dump: pseudo_register_read = <%s>\n",
11875796c8dcSSimon Schubert host_address_to_string (gdbarch->pseudo_register_read));
11885796c8dcSSimon Schubert fprintf_unfiltered (file,
1189a45ae5f8SJohn Marino "gdbarch_dump: gdbarch_pseudo_register_read_value_p() = %d\n",
1190a45ae5f8SJohn Marino gdbarch_pseudo_register_read_value_p (gdbarch));
1191a45ae5f8SJohn Marino fprintf_unfiltered (file,
1192a45ae5f8SJohn Marino "gdbarch_dump: pseudo_register_read_value = <%s>\n",
1193a45ae5f8SJohn Marino host_address_to_string (gdbarch->pseudo_register_read_value));
1194a45ae5f8SJohn Marino fprintf_unfiltered (file,
11955796c8dcSSimon Schubert "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
11965796c8dcSSimon Schubert gdbarch_pseudo_register_write_p (gdbarch));
11975796c8dcSSimon Schubert fprintf_unfiltered (file,
11985796c8dcSSimon Schubert "gdbarch_dump: pseudo_register_write = <%s>\n",
11995796c8dcSSimon Schubert host_address_to_string (gdbarch->pseudo_register_write));
12005796c8dcSSimon Schubert fprintf_unfiltered (file,
12015796c8dcSSimon Schubert "gdbarch_dump: ptr_bit = %s\n",
12025796c8dcSSimon Schubert plongest (gdbarch->ptr_bit));
12035796c8dcSSimon Schubert fprintf_unfiltered (file,
12045796c8dcSSimon Schubert "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
12055796c8dcSSimon Schubert gdbarch_push_dummy_call_p (gdbarch));
12065796c8dcSSimon Schubert fprintf_unfiltered (file,
12075796c8dcSSimon Schubert "gdbarch_dump: push_dummy_call = <%s>\n",
12085796c8dcSSimon Schubert host_address_to_string (gdbarch->push_dummy_call));
12095796c8dcSSimon Schubert fprintf_unfiltered (file,
12105796c8dcSSimon Schubert "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
12115796c8dcSSimon Schubert gdbarch_push_dummy_code_p (gdbarch));
12125796c8dcSSimon Schubert fprintf_unfiltered (file,
12135796c8dcSSimon Schubert "gdbarch_dump: push_dummy_code = <%s>\n",
12145796c8dcSSimon Schubert host_address_to_string (gdbarch->push_dummy_code));
12155796c8dcSSimon Schubert fprintf_unfiltered (file,
1216*ef5ccd6cSJohn Marino "gdbarch_dump: ravenscar_ops = %s\n",
1217*ef5ccd6cSJohn Marino host_address_to_string (gdbarch->ravenscar_ops));
1218*ef5ccd6cSJohn Marino fprintf_unfiltered (file,
12195796c8dcSSimon Schubert "gdbarch_dump: gdbarch_read_pc_p() = %d\n",
12205796c8dcSSimon Schubert gdbarch_read_pc_p (gdbarch));
12215796c8dcSSimon Schubert fprintf_unfiltered (file,
12225796c8dcSSimon Schubert "gdbarch_dump: read_pc = <%s>\n",
12235796c8dcSSimon Schubert host_address_to_string (gdbarch->read_pc));
12245796c8dcSSimon Schubert fprintf_unfiltered (file,
12255796c8dcSSimon Schubert "gdbarch_dump: gdbarch_record_special_symbol_p() = %d\n",
12265796c8dcSSimon Schubert gdbarch_record_special_symbol_p (gdbarch));
12275796c8dcSSimon Schubert fprintf_unfiltered (file,
12285796c8dcSSimon Schubert "gdbarch_dump: record_special_symbol = <%s>\n",
12295796c8dcSSimon Schubert host_address_to_string (gdbarch->record_special_symbol));
12305796c8dcSSimon Schubert fprintf_unfiltered (file,
12315796c8dcSSimon Schubert "gdbarch_dump: register_name = <%s>\n",
12325796c8dcSSimon Schubert host_address_to_string (gdbarch->register_name));
12335796c8dcSSimon Schubert fprintf_unfiltered (file,
12345796c8dcSSimon Schubert "gdbarch_dump: register_reggroup_p = <%s>\n",
12355796c8dcSSimon Schubert host_address_to_string (gdbarch->register_reggroup_p));
12365796c8dcSSimon Schubert fprintf_unfiltered (file,
12375796c8dcSSimon Schubert "gdbarch_dump: register_sim_regno = <%s>\n",
12385796c8dcSSimon Schubert host_address_to_string (gdbarch->register_sim_regno));
12395796c8dcSSimon Schubert fprintf_unfiltered (file,
12405796c8dcSSimon Schubert "gdbarch_dump: register_to_value = <%s>\n",
12415796c8dcSSimon Schubert host_address_to_string (gdbarch->register_to_value));
12425796c8dcSSimon Schubert fprintf_unfiltered (file,
12435796c8dcSSimon Schubert "gdbarch_dump: gdbarch_register_type_p() = %d\n",
12445796c8dcSSimon Schubert gdbarch_register_type_p (gdbarch));
12455796c8dcSSimon Schubert fprintf_unfiltered (file,
12465796c8dcSSimon Schubert "gdbarch_dump: register_type = <%s>\n",
12475796c8dcSSimon Schubert host_address_to_string (gdbarch->register_type));
12485796c8dcSSimon Schubert fprintf_unfiltered (file,
12495796c8dcSSimon Schubert "gdbarch_dump: gdbarch_regset_from_core_section_p() = %d\n",
12505796c8dcSSimon Schubert gdbarch_regset_from_core_section_p (gdbarch));
12515796c8dcSSimon Schubert fprintf_unfiltered (file,
12525796c8dcSSimon Schubert "gdbarch_dump: regset_from_core_section = <%s>\n",
12535796c8dcSSimon Schubert host_address_to_string (gdbarch->regset_from_core_section));
12545796c8dcSSimon Schubert fprintf_unfiltered (file,
1255cf7f2e2dSJohn Marino "gdbarch_dump: gdbarch_relocate_instruction_p() = %d\n",
1256cf7f2e2dSJohn Marino gdbarch_relocate_instruction_p (gdbarch));
1257cf7f2e2dSJohn Marino fprintf_unfiltered (file,
1258cf7f2e2dSJohn Marino "gdbarch_dump: relocate_instruction = <%s>\n",
1259cf7f2e2dSJohn Marino host_address_to_string (gdbarch->relocate_instruction));
1260cf7f2e2dSJohn Marino fprintf_unfiltered (file,
1261cf7f2e2dSJohn Marino "gdbarch_dump: remote_breakpoint_from_pc = <%s>\n",
1262cf7f2e2dSJohn Marino host_address_to_string (gdbarch->remote_breakpoint_from_pc));
1263cf7f2e2dSJohn Marino fprintf_unfiltered (file,
12645796c8dcSSimon Schubert "gdbarch_dump: remote_register_number = <%s>\n",
12655796c8dcSSimon Schubert host_address_to_string (gdbarch->remote_register_number));
12665796c8dcSSimon Schubert fprintf_unfiltered (file,
1267*ef5ccd6cSJohn Marino "gdbarch_dump: return_in_first_hidden_param_p = <%s>\n",
1268*ef5ccd6cSJohn Marino host_address_to_string (gdbarch->return_in_first_hidden_param_p));
1269*ef5ccd6cSJohn Marino fprintf_unfiltered (file,
12705796c8dcSSimon Schubert "gdbarch_dump: gdbarch_return_value_p() = %d\n",
12715796c8dcSSimon Schubert gdbarch_return_value_p (gdbarch));
12725796c8dcSSimon Schubert fprintf_unfiltered (file,
12735796c8dcSSimon Schubert "gdbarch_dump: return_value = <%s>\n",
12745796c8dcSSimon Schubert host_address_to_string (gdbarch->return_value));
12755796c8dcSSimon Schubert fprintf_unfiltered (file,
12765796c8dcSSimon Schubert "gdbarch_dump: sdb_reg_to_regnum = <%s>\n",
12775796c8dcSSimon Schubert host_address_to_string (gdbarch->sdb_reg_to_regnum));
12785796c8dcSSimon Schubert fprintf_unfiltered (file,
12795796c8dcSSimon Schubert "gdbarch_dump: short_bit = %s\n",
12805796c8dcSSimon Schubert plongest (gdbarch->short_bit));
12815796c8dcSSimon Schubert fprintf_unfiltered (file,
12825796c8dcSSimon Schubert "gdbarch_dump: gdbarch_single_step_through_delay_p() = %d\n",
12835796c8dcSSimon Schubert gdbarch_single_step_through_delay_p (gdbarch));
12845796c8dcSSimon Schubert fprintf_unfiltered (file,
12855796c8dcSSimon Schubert "gdbarch_dump: single_step_through_delay = <%s>\n",
12865796c8dcSSimon Schubert host_address_to_string (gdbarch->single_step_through_delay));
12875796c8dcSSimon Schubert fprintf_unfiltered (file,
12885796c8dcSSimon Schubert "gdbarch_dump: gdbarch_skip_main_prologue_p() = %d\n",
12895796c8dcSSimon Schubert gdbarch_skip_main_prologue_p (gdbarch));
12905796c8dcSSimon Schubert fprintf_unfiltered (file,
12915796c8dcSSimon Schubert "gdbarch_dump: skip_main_prologue = <%s>\n",
12925796c8dcSSimon Schubert host_address_to_string (gdbarch->skip_main_prologue));
12935796c8dcSSimon Schubert fprintf_unfiltered (file,
12945796c8dcSSimon Schubert "gdbarch_dump: gdbarch_skip_permanent_breakpoint_p() = %d\n",
12955796c8dcSSimon Schubert gdbarch_skip_permanent_breakpoint_p (gdbarch));
12965796c8dcSSimon Schubert fprintf_unfiltered (file,
12975796c8dcSSimon Schubert "gdbarch_dump: skip_permanent_breakpoint = <%s>\n",
12985796c8dcSSimon Schubert host_address_to_string (gdbarch->skip_permanent_breakpoint));
12995796c8dcSSimon Schubert fprintf_unfiltered (file,
13005796c8dcSSimon Schubert "gdbarch_dump: skip_prologue = <%s>\n",
13015796c8dcSSimon Schubert host_address_to_string (gdbarch->skip_prologue));
13025796c8dcSSimon Schubert fprintf_unfiltered (file,
13035796c8dcSSimon Schubert "gdbarch_dump: skip_solib_resolver = <%s>\n",
13045796c8dcSSimon Schubert host_address_to_string (gdbarch->skip_solib_resolver));
13055796c8dcSSimon Schubert fprintf_unfiltered (file,
13065796c8dcSSimon Schubert "gdbarch_dump: skip_trampoline_code = <%s>\n",
13075796c8dcSSimon Schubert host_address_to_string (gdbarch->skip_trampoline_code));
13085796c8dcSSimon Schubert fprintf_unfiltered (file,
13095796c8dcSSimon Schubert "gdbarch_dump: gdbarch_software_single_step_p() = %d\n",
13105796c8dcSSimon Schubert gdbarch_software_single_step_p (gdbarch));
13115796c8dcSSimon Schubert fprintf_unfiltered (file,
13125796c8dcSSimon Schubert "gdbarch_dump: software_single_step = <%s>\n",
13135796c8dcSSimon Schubert host_address_to_string (gdbarch->software_single_step));
13145796c8dcSSimon Schubert fprintf_unfiltered (file,
13155796c8dcSSimon Schubert "gdbarch_dump: sofun_address_maybe_missing = %s\n",
13165796c8dcSSimon Schubert plongest (gdbarch->sofun_address_maybe_missing));
13175796c8dcSSimon Schubert fprintf_unfiltered (file,
1318cf7f2e2dSJohn Marino "gdbarch_dump: solib_symbols_extension = %s\n",
1319cf7f2e2dSJohn Marino pstring (gdbarch->solib_symbols_extension));
1320cf7f2e2dSJohn Marino fprintf_unfiltered (file,
13215796c8dcSSimon Schubert "gdbarch_dump: sp_regnum = %s\n",
13225796c8dcSSimon Schubert plongest (gdbarch->sp_regnum));
13235796c8dcSSimon Schubert fprintf_unfiltered (file,
13245796c8dcSSimon Schubert "gdbarch_dump: stab_reg_to_regnum = <%s>\n",
13255796c8dcSSimon Schubert host_address_to_string (gdbarch->stab_reg_to_regnum));
13265796c8dcSSimon Schubert fprintf_unfiltered (file,
13275796c8dcSSimon Schubert "gdbarch_dump: stabs_argument_has_addr = <%s>\n",
13285796c8dcSSimon Schubert host_address_to_string (gdbarch->stabs_argument_has_addr));
13295796c8dcSSimon Schubert fprintf_unfiltered (file,
1330*ef5ccd6cSJohn Marino "gdbarch_dump: stap_gdb_register_prefix = %s\n",
1331*ef5ccd6cSJohn Marino pstring (gdbarch->stap_gdb_register_prefix));
1332*ef5ccd6cSJohn Marino fprintf_unfiltered (file,
1333*ef5ccd6cSJohn Marino "gdbarch_dump: stap_gdb_register_suffix = %s\n",
1334*ef5ccd6cSJohn Marino pstring (gdbarch->stap_gdb_register_suffix));
1335*ef5ccd6cSJohn Marino fprintf_unfiltered (file,
1336*ef5ccd6cSJohn Marino "gdbarch_dump: stap_integer_prefix = %s\n",
1337*ef5ccd6cSJohn Marino pstring (gdbarch->stap_integer_prefix));
1338*ef5ccd6cSJohn Marino fprintf_unfiltered (file,
1339*ef5ccd6cSJohn Marino "gdbarch_dump: stap_integer_suffix = %s\n",
1340*ef5ccd6cSJohn Marino pstring (gdbarch->stap_integer_suffix));
1341*ef5ccd6cSJohn Marino fprintf_unfiltered (file,
1342*ef5ccd6cSJohn Marino "gdbarch_dump: gdbarch_stap_is_single_operand_p() = %d\n",
1343*ef5ccd6cSJohn Marino gdbarch_stap_is_single_operand_p (gdbarch));
1344*ef5ccd6cSJohn Marino fprintf_unfiltered (file,
1345*ef5ccd6cSJohn Marino "gdbarch_dump: stap_is_single_operand = <%s>\n",
1346*ef5ccd6cSJohn Marino host_address_to_string (gdbarch->stap_is_single_operand));
1347*ef5ccd6cSJohn Marino fprintf_unfiltered (file,
1348*ef5ccd6cSJohn Marino "gdbarch_dump: gdbarch_stap_parse_special_token_p() = %d\n",
1349*ef5ccd6cSJohn Marino gdbarch_stap_parse_special_token_p (gdbarch));
1350*ef5ccd6cSJohn Marino fprintf_unfiltered (file,
1351*ef5ccd6cSJohn Marino "gdbarch_dump: stap_parse_special_token = <%s>\n",
1352*ef5ccd6cSJohn Marino host_address_to_string (gdbarch->stap_parse_special_token));
1353*ef5ccd6cSJohn Marino fprintf_unfiltered (file,
1354*ef5ccd6cSJohn Marino "gdbarch_dump: stap_register_indirection_prefix = %s\n",
1355*ef5ccd6cSJohn Marino pstring (gdbarch->stap_register_indirection_prefix));
1356*ef5ccd6cSJohn Marino fprintf_unfiltered (file,
1357*ef5ccd6cSJohn Marino "gdbarch_dump: stap_register_indirection_suffix = %s\n",
1358*ef5ccd6cSJohn Marino pstring (gdbarch->stap_register_indirection_suffix));
1359*ef5ccd6cSJohn Marino fprintf_unfiltered (file,
1360*ef5ccd6cSJohn Marino "gdbarch_dump: stap_register_prefix = %s\n",
1361*ef5ccd6cSJohn Marino pstring (gdbarch->stap_register_prefix));
1362*ef5ccd6cSJohn Marino fprintf_unfiltered (file,
1363*ef5ccd6cSJohn Marino "gdbarch_dump: stap_register_suffix = %s\n",
1364*ef5ccd6cSJohn Marino pstring (gdbarch->stap_register_suffix));
1365*ef5ccd6cSJohn Marino fprintf_unfiltered (file,
13665796c8dcSSimon Schubert "gdbarch_dump: gdbarch_static_transform_name_p() = %d\n",
13675796c8dcSSimon Schubert gdbarch_static_transform_name_p (gdbarch));
13685796c8dcSSimon Schubert fprintf_unfiltered (file,
13695796c8dcSSimon Schubert "gdbarch_dump: static_transform_name = <%s>\n",
13705796c8dcSSimon Schubert host_address_to_string (gdbarch->static_transform_name));
13715796c8dcSSimon Schubert fprintf_unfiltered (file,
13725796c8dcSSimon Schubert "gdbarch_dump: target_desc = %s\n",
13735796c8dcSSimon Schubert host_address_to_string (gdbarch->target_desc));
13745796c8dcSSimon Schubert fprintf_unfiltered (file,
13755796c8dcSSimon Schubert "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
13765796c8dcSSimon Schubert gdbarch_unwind_pc_p (gdbarch));
13775796c8dcSSimon Schubert fprintf_unfiltered (file,
13785796c8dcSSimon Schubert "gdbarch_dump: unwind_pc = <%s>\n",
13795796c8dcSSimon Schubert host_address_to_string (gdbarch->unwind_pc));
13805796c8dcSSimon Schubert fprintf_unfiltered (file,
13815796c8dcSSimon Schubert "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
13825796c8dcSSimon Schubert gdbarch_unwind_sp_p (gdbarch));
13835796c8dcSSimon Schubert fprintf_unfiltered (file,
13845796c8dcSSimon Schubert "gdbarch_dump: unwind_sp = <%s>\n",
13855796c8dcSSimon Schubert host_address_to_string (gdbarch->unwind_sp));
13865796c8dcSSimon Schubert fprintf_unfiltered (file,
13875796c8dcSSimon Schubert "gdbarch_dump: value_from_register = <%s>\n",
13885796c8dcSSimon Schubert host_address_to_string (gdbarch->value_from_register));
13895796c8dcSSimon Schubert fprintf_unfiltered (file,
13905796c8dcSSimon Schubert "gdbarch_dump: value_to_register = <%s>\n",
13915796c8dcSSimon Schubert host_address_to_string (gdbarch->value_to_register));
13925796c8dcSSimon Schubert fprintf_unfiltered (file,
13935796c8dcSSimon Schubert "gdbarch_dump: vbit_in_delta = %s\n",
13945796c8dcSSimon Schubert plongest (gdbarch->vbit_in_delta));
13955796c8dcSSimon Schubert fprintf_unfiltered (file,
13965796c8dcSSimon Schubert "gdbarch_dump: virtual_frame_pointer = <%s>\n",
13975796c8dcSSimon Schubert host_address_to_string (gdbarch->virtual_frame_pointer));
13985796c8dcSSimon Schubert fprintf_unfiltered (file,
13995796c8dcSSimon Schubert "gdbarch_dump: vtable_function_descriptors = %s\n",
14005796c8dcSSimon Schubert plongest (gdbarch->vtable_function_descriptors));
14015796c8dcSSimon Schubert fprintf_unfiltered (file,
14025796c8dcSSimon Schubert "gdbarch_dump: gdbarch_write_pc_p() = %d\n",
14035796c8dcSSimon Schubert gdbarch_write_pc_p (gdbarch));
14045796c8dcSSimon Schubert fprintf_unfiltered (file,
14055796c8dcSSimon Schubert "gdbarch_dump: write_pc = <%s>\n",
14065796c8dcSSimon Schubert host_address_to_string (gdbarch->write_pc));
14075796c8dcSSimon Schubert if (gdbarch->dump_tdep != NULL)
14085796c8dcSSimon Schubert gdbarch->dump_tdep (gdbarch, file);
14095796c8dcSSimon Schubert }
14105796c8dcSSimon Schubert
14115796c8dcSSimon Schubert struct gdbarch_tdep *
gdbarch_tdep(struct gdbarch * gdbarch)14125796c8dcSSimon Schubert gdbarch_tdep (struct gdbarch *gdbarch)
14135796c8dcSSimon Schubert {
14145796c8dcSSimon Schubert if (gdbarch_debug >= 2)
14155796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
14165796c8dcSSimon Schubert return gdbarch->tdep;
14175796c8dcSSimon Schubert }
14185796c8dcSSimon Schubert
14195796c8dcSSimon Schubert
14205796c8dcSSimon Schubert const struct bfd_arch_info *
gdbarch_bfd_arch_info(struct gdbarch * gdbarch)14215796c8dcSSimon Schubert gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
14225796c8dcSSimon Schubert {
14235796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
14245796c8dcSSimon Schubert if (gdbarch_debug >= 2)
14255796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
14265796c8dcSSimon Schubert return gdbarch->bfd_arch_info;
14275796c8dcSSimon Schubert }
14285796c8dcSSimon Schubert
14295796c8dcSSimon Schubert int
gdbarch_byte_order(struct gdbarch * gdbarch)14305796c8dcSSimon Schubert gdbarch_byte_order (struct gdbarch *gdbarch)
14315796c8dcSSimon Schubert {
14325796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
14335796c8dcSSimon Schubert if (gdbarch_debug >= 2)
14345796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
14355796c8dcSSimon Schubert return gdbarch->byte_order;
14365796c8dcSSimon Schubert }
14375796c8dcSSimon Schubert
14385796c8dcSSimon Schubert int
gdbarch_byte_order_for_code(struct gdbarch * gdbarch)14395796c8dcSSimon Schubert gdbarch_byte_order_for_code (struct gdbarch *gdbarch)
14405796c8dcSSimon Schubert {
14415796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
14425796c8dcSSimon Schubert if (gdbarch_debug >= 2)
14435796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order_for_code called\n");
14445796c8dcSSimon Schubert return gdbarch->byte_order_for_code;
14455796c8dcSSimon Schubert }
14465796c8dcSSimon Schubert
14475796c8dcSSimon Schubert enum gdb_osabi
gdbarch_osabi(struct gdbarch * gdbarch)14485796c8dcSSimon Schubert gdbarch_osabi (struct gdbarch *gdbarch)
14495796c8dcSSimon Schubert {
14505796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
14515796c8dcSSimon Schubert if (gdbarch_debug >= 2)
14525796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n");
14535796c8dcSSimon Schubert return gdbarch->osabi;
14545796c8dcSSimon Schubert }
14555796c8dcSSimon Schubert
14565796c8dcSSimon Schubert const struct target_desc *
gdbarch_target_desc(struct gdbarch * gdbarch)14575796c8dcSSimon Schubert gdbarch_target_desc (struct gdbarch *gdbarch)
14585796c8dcSSimon Schubert {
14595796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
14605796c8dcSSimon Schubert if (gdbarch_debug >= 2)
14615796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_target_desc called\n");
14625796c8dcSSimon Schubert return gdbarch->target_desc;
14635796c8dcSSimon Schubert }
14645796c8dcSSimon Schubert
14655796c8dcSSimon Schubert int
gdbarch_bits_big_endian(struct gdbarch * gdbarch)14665796c8dcSSimon Schubert gdbarch_bits_big_endian (struct gdbarch *gdbarch)
14675796c8dcSSimon Schubert {
14685796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
14695796c8dcSSimon Schubert /* Skip verify of bits_big_endian, invalid_p == 0 */
14705796c8dcSSimon Schubert if (gdbarch_debug >= 2)
14715796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_bits_big_endian called\n");
14725796c8dcSSimon Schubert return gdbarch->bits_big_endian;
14735796c8dcSSimon Schubert }
14745796c8dcSSimon Schubert
14755796c8dcSSimon Schubert void
set_gdbarch_bits_big_endian(struct gdbarch * gdbarch,int bits_big_endian)14765796c8dcSSimon Schubert set_gdbarch_bits_big_endian (struct gdbarch *gdbarch,
14775796c8dcSSimon Schubert int bits_big_endian)
14785796c8dcSSimon Schubert {
14795796c8dcSSimon Schubert gdbarch->bits_big_endian = bits_big_endian;
14805796c8dcSSimon Schubert }
14815796c8dcSSimon Schubert
14825796c8dcSSimon Schubert int
gdbarch_short_bit(struct gdbarch * gdbarch)14835796c8dcSSimon Schubert gdbarch_short_bit (struct gdbarch *gdbarch)
14845796c8dcSSimon Schubert {
14855796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
14865796c8dcSSimon Schubert /* Skip verify of short_bit, invalid_p == 0 */
14875796c8dcSSimon Schubert if (gdbarch_debug >= 2)
14885796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
14895796c8dcSSimon Schubert return gdbarch->short_bit;
14905796c8dcSSimon Schubert }
14915796c8dcSSimon Schubert
14925796c8dcSSimon Schubert void
set_gdbarch_short_bit(struct gdbarch * gdbarch,int short_bit)14935796c8dcSSimon Schubert set_gdbarch_short_bit (struct gdbarch *gdbarch,
14945796c8dcSSimon Schubert int short_bit)
14955796c8dcSSimon Schubert {
14965796c8dcSSimon Schubert gdbarch->short_bit = short_bit;
14975796c8dcSSimon Schubert }
14985796c8dcSSimon Schubert
14995796c8dcSSimon Schubert int
gdbarch_int_bit(struct gdbarch * gdbarch)15005796c8dcSSimon Schubert gdbarch_int_bit (struct gdbarch *gdbarch)
15015796c8dcSSimon Schubert {
15025796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
15035796c8dcSSimon Schubert /* Skip verify of int_bit, invalid_p == 0 */
15045796c8dcSSimon Schubert if (gdbarch_debug >= 2)
15055796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
15065796c8dcSSimon Schubert return gdbarch->int_bit;
15075796c8dcSSimon Schubert }
15085796c8dcSSimon Schubert
15095796c8dcSSimon Schubert void
set_gdbarch_int_bit(struct gdbarch * gdbarch,int int_bit)15105796c8dcSSimon Schubert set_gdbarch_int_bit (struct gdbarch *gdbarch,
15115796c8dcSSimon Schubert int int_bit)
15125796c8dcSSimon Schubert {
15135796c8dcSSimon Schubert gdbarch->int_bit = int_bit;
15145796c8dcSSimon Schubert }
15155796c8dcSSimon Schubert
15165796c8dcSSimon Schubert int
gdbarch_long_bit(struct gdbarch * gdbarch)15175796c8dcSSimon Schubert gdbarch_long_bit (struct gdbarch *gdbarch)
15185796c8dcSSimon Schubert {
15195796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
15205796c8dcSSimon Schubert /* Skip verify of long_bit, invalid_p == 0 */
15215796c8dcSSimon Schubert if (gdbarch_debug >= 2)
15225796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
15235796c8dcSSimon Schubert return gdbarch->long_bit;
15245796c8dcSSimon Schubert }
15255796c8dcSSimon Schubert
15265796c8dcSSimon Schubert void
set_gdbarch_long_bit(struct gdbarch * gdbarch,int long_bit)15275796c8dcSSimon Schubert set_gdbarch_long_bit (struct gdbarch *gdbarch,
15285796c8dcSSimon Schubert int long_bit)
15295796c8dcSSimon Schubert {
15305796c8dcSSimon Schubert gdbarch->long_bit = long_bit;
15315796c8dcSSimon Schubert }
15325796c8dcSSimon Schubert
15335796c8dcSSimon Schubert int
gdbarch_long_long_bit(struct gdbarch * gdbarch)15345796c8dcSSimon Schubert gdbarch_long_long_bit (struct gdbarch *gdbarch)
15355796c8dcSSimon Schubert {
15365796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
15375796c8dcSSimon Schubert /* Skip verify of long_long_bit, invalid_p == 0 */
15385796c8dcSSimon Schubert if (gdbarch_debug >= 2)
15395796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
15405796c8dcSSimon Schubert return gdbarch->long_long_bit;
15415796c8dcSSimon Schubert }
15425796c8dcSSimon Schubert
15435796c8dcSSimon Schubert void
set_gdbarch_long_long_bit(struct gdbarch * gdbarch,int long_long_bit)15445796c8dcSSimon Schubert set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
15455796c8dcSSimon Schubert int long_long_bit)
15465796c8dcSSimon Schubert {
15475796c8dcSSimon Schubert gdbarch->long_long_bit = long_long_bit;
15485796c8dcSSimon Schubert }
15495796c8dcSSimon Schubert
15505796c8dcSSimon Schubert int
gdbarch_long_long_align_bit(struct gdbarch * gdbarch)1551a45ae5f8SJohn Marino gdbarch_long_long_align_bit (struct gdbarch *gdbarch)
1552a45ae5f8SJohn Marino {
1553a45ae5f8SJohn Marino gdb_assert (gdbarch != NULL);
1554a45ae5f8SJohn Marino /* Skip verify of long_long_align_bit, invalid_p == 0 */
1555a45ae5f8SJohn Marino if (gdbarch_debug >= 2)
1556a45ae5f8SJohn Marino fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_align_bit called\n");
1557a45ae5f8SJohn Marino return gdbarch->long_long_align_bit;
1558a45ae5f8SJohn Marino }
1559a45ae5f8SJohn Marino
1560a45ae5f8SJohn Marino void
set_gdbarch_long_long_align_bit(struct gdbarch * gdbarch,int long_long_align_bit)1561a45ae5f8SJohn Marino set_gdbarch_long_long_align_bit (struct gdbarch *gdbarch,
1562a45ae5f8SJohn Marino int long_long_align_bit)
1563a45ae5f8SJohn Marino {
1564a45ae5f8SJohn Marino gdbarch->long_long_align_bit = long_long_align_bit;
1565a45ae5f8SJohn Marino }
1566a45ae5f8SJohn Marino
1567a45ae5f8SJohn Marino int
gdbarch_half_bit(struct gdbarch * gdbarch)1568cf7f2e2dSJohn Marino gdbarch_half_bit (struct gdbarch *gdbarch)
1569cf7f2e2dSJohn Marino {
1570cf7f2e2dSJohn Marino gdb_assert (gdbarch != NULL);
1571cf7f2e2dSJohn Marino /* Skip verify of half_bit, invalid_p == 0 */
1572cf7f2e2dSJohn Marino if (gdbarch_debug >= 2)
1573cf7f2e2dSJohn Marino fprintf_unfiltered (gdb_stdlog, "gdbarch_half_bit called\n");
1574cf7f2e2dSJohn Marino return gdbarch->half_bit;
1575cf7f2e2dSJohn Marino }
1576cf7f2e2dSJohn Marino
1577cf7f2e2dSJohn Marino void
set_gdbarch_half_bit(struct gdbarch * gdbarch,int half_bit)1578cf7f2e2dSJohn Marino set_gdbarch_half_bit (struct gdbarch *gdbarch,
1579cf7f2e2dSJohn Marino int half_bit)
1580cf7f2e2dSJohn Marino {
1581cf7f2e2dSJohn Marino gdbarch->half_bit = half_bit;
1582cf7f2e2dSJohn Marino }
1583cf7f2e2dSJohn Marino
1584cf7f2e2dSJohn Marino const struct floatformat **
gdbarch_half_format(struct gdbarch * gdbarch)1585cf7f2e2dSJohn Marino gdbarch_half_format (struct gdbarch *gdbarch)
1586cf7f2e2dSJohn Marino {
1587cf7f2e2dSJohn Marino gdb_assert (gdbarch != NULL);
1588cf7f2e2dSJohn Marino if (gdbarch_debug >= 2)
1589cf7f2e2dSJohn Marino fprintf_unfiltered (gdb_stdlog, "gdbarch_half_format called\n");
1590cf7f2e2dSJohn Marino return gdbarch->half_format;
1591cf7f2e2dSJohn Marino }
1592cf7f2e2dSJohn Marino
1593cf7f2e2dSJohn Marino void
set_gdbarch_half_format(struct gdbarch * gdbarch,const struct floatformat ** half_format)1594cf7f2e2dSJohn Marino set_gdbarch_half_format (struct gdbarch *gdbarch,
1595cf7f2e2dSJohn Marino const struct floatformat ** half_format)
1596cf7f2e2dSJohn Marino {
1597cf7f2e2dSJohn Marino gdbarch->half_format = half_format;
1598cf7f2e2dSJohn Marino }
1599cf7f2e2dSJohn Marino
1600cf7f2e2dSJohn Marino int
gdbarch_float_bit(struct gdbarch * gdbarch)16015796c8dcSSimon Schubert gdbarch_float_bit (struct gdbarch *gdbarch)
16025796c8dcSSimon Schubert {
16035796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
16045796c8dcSSimon Schubert /* Skip verify of float_bit, invalid_p == 0 */
16055796c8dcSSimon Schubert if (gdbarch_debug >= 2)
16065796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
16075796c8dcSSimon Schubert return gdbarch->float_bit;
16085796c8dcSSimon Schubert }
16095796c8dcSSimon Schubert
16105796c8dcSSimon Schubert void
set_gdbarch_float_bit(struct gdbarch * gdbarch,int float_bit)16115796c8dcSSimon Schubert set_gdbarch_float_bit (struct gdbarch *gdbarch,
16125796c8dcSSimon Schubert int float_bit)
16135796c8dcSSimon Schubert {
16145796c8dcSSimon Schubert gdbarch->float_bit = float_bit;
16155796c8dcSSimon Schubert }
16165796c8dcSSimon Schubert
16175796c8dcSSimon Schubert const struct floatformat **
gdbarch_float_format(struct gdbarch * gdbarch)16185796c8dcSSimon Schubert gdbarch_float_format (struct gdbarch *gdbarch)
16195796c8dcSSimon Schubert {
16205796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
16215796c8dcSSimon Schubert if (gdbarch_debug >= 2)
16225796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
16235796c8dcSSimon Schubert return gdbarch->float_format;
16245796c8dcSSimon Schubert }
16255796c8dcSSimon Schubert
16265796c8dcSSimon Schubert void
set_gdbarch_float_format(struct gdbarch * gdbarch,const struct floatformat ** float_format)16275796c8dcSSimon Schubert set_gdbarch_float_format (struct gdbarch *gdbarch,
16285796c8dcSSimon Schubert const struct floatformat ** float_format)
16295796c8dcSSimon Schubert {
16305796c8dcSSimon Schubert gdbarch->float_format = float_format;
16315796c8dcSSimon Schubert }
16325796c8dcSSimon Schubert
16335796c8dcSSimon Schubert int
gdbarch_double_bit(struct gdbarch * gdbarch)16345796c8dcSSimon Schubert gdbarch_double_bit (struct gdbarch *gdbarch)
16355796c8dcSSimon Schubert {
16365796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
16375796c8dcSSimon Schubert /* Skip verify of double_bit, invalid_p == 0 */
16385796c8dcSSimon Schubert if (gdbarch_debug >= 2)
16395796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
16405796c8dcSSimon Schubert return gdbarch->double_bit;
16415796c8dcSSimon Schubert }
16425796c8dcSSimon Schubert
16435796c8dcSSimon Schubert void
set_gdbarch_double_bit(struct gdbarch * gdbarch,int double_bit)16445796c8dcSSimon Schubert set_gdbarch_double_bit (struct gdbarch *gdbarch,
16455796c8dcSSimon Schubert int double_bit)
16465796c8dcSSimon Schubert {
16475796c8dcSSimon Schubert gdbarch->double_bit = double_bit;
16485796c8dcSSimon Schubert }
16495796c8dcSSimon Schubert
16505796c8dcSSimon Schubert const struct floatformat **
gdbarch_double_format(struct gdbarch * gdbarch)16515796c8dcSSimon Schubert gdbarch_double_format (struct gdbarch *gdbarch)
16525796c8dcSSimon Schubert {
16535796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
16545796c8dcSSimon Schubert if (gdbarch_debug >= 2)
16555796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
16565796c8dcSSimon Schubert return gdbarch->double_format;
16575796c8dcSSimon Schubert }
16585796c8dcSSimon Schubert
16595796c8dcSSimon Schubert void
set_gdbarch_double_format(struct gdbarch * gdbarch,const struct floatformat ** double_format)16605796c8dcSSimon Schubert set_gdbarch_double_format (struct gdbarch *gdbarch,
16615796c8dcSSimon Schubert const struct floatformat ** double_format)
16625796c8dcSSimon Schubert {
16635796c8dcSSimon Schubert gdbarch->double_format = double_format;
16645796c8dcSSimon Schubert }
16655796c8dcSSimon Schubert
16665796c8dcSSimon Schubert int
gdbarch_long_double_bit(struct gdbarch * gdbarch)16675796c8dcSSimon Schubert gdbarch_long_double_bit (struct gdbarch *gdbarch)
16685796c8dcSSimon Schubert {
16695796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
16705796c8dcSSimon Schubert /* Skip verify of long_double_bit, invalid_p == 0 */
16715796c8dcSSimon Schubert if (gdbarch_debug >= 2)
16725796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
16735796c8dcSSimon Schubert return gdbarch->long_double_bit;
16745796c8dcSSimon Schubert }
16755796c8dcSSimon Schubert
16765796c8dcSSimon Schubert void
set_gdbarch_long_double_bit(struct gdbarch * gdbarch,int long_double_bit)16775796c8dcSSimon Schubert set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
16785796c8dcSSimon Schubert int long_double_bit)
16795796c8dcSSimon Schubert {
16805796c8dcSSimon Schubert gdbarch->long_double_bit = long_double_bit;
16815796c8dcSSimon Schubert }
16825796c8dcSSimon Schubert
16835796c8dcSSimon Schubert const struct floatformat **
gdbarch_long_double_format(struct gdbarch * gdbarch)16845796c8dcSSimon Schubert gdbarch_long_double_format (struct gdbarch *gdbarch)
16855796c8dcSSimon Schubert {
16865796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
16875796c8dcSSimon Schubert if (gdbarch_debug >= 2)
16885796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
16895796c8dcSSimon Schubert return gdbarch->long_double_format;
16905796c8dcSSimon Schubert }
16915796c8dcSSimon Schubert
16925796c8dcSSimon Schubert void
set_gdbarch_long_double_format(struct gdbarch * gdbarch,const struct floatformat ** long_double_format)16935796c8dcSSimon Schubert set_gdbarch_long_double_format (struct gdbarch *gdbarch,
16945796c8dcSSimon Schubert const struct floatformat ** long_double_format)
16955796c8dcSSimon Schubert {
16965796c8dcSSimon Schubert gdbarch->long_double_format = long_double_format;
16975796c8dcSSimon Schubert }
16985796c8dcSSimon Schubert
16995796c8dcSSimon Schubert int
gdbarch_ptr_bit(struct gdbarch * gdbarch)17005796c8dcSSimon Schubert gdbarch_ptr_bit (struct gdbarch *gdbarch)
17015796c8dcSSimon Schubert {
17025796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
17035796c8dcSSimon Schubert /* Skip verify of ptr_bit, invalid_p == 0 */
17045796c8dcSSimon Schubert if (gdbarch_debug >= 2)
17055796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
17065796c8dcSSimon Schubert return gdbarch->ptr_bit;
17075796c8dcSSimon Schubert }
17085796c8dcSSimon Schubert
17095796c8dcSSimon Schubert void
set_gdbarch_ptr_bit(struct gdbarch * gdbarch,int ptr_bit)17105796c8dcSSimon Schubert set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
17115796c8dcSSimon Schubert int ptr_bit)
17125796c8dcSSimon Schubert {
17135796c8dcSSimon Schubert gdbarch->ptr_bit = ptr_bit;
17145796c8dcSSimon Schubert }
17155796c8dcSSimon Schubert
17165796c8dcSSimon Schubert int
gdbarch_addr_bit(struct gdbarch * gdbarch)17175796c8dcSSimon Schubert gdbarch_addr_bit (struct gdbarch *gdbarch)
17185796c8dcSSimon Schubert {
17195796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
17205796c8dcSSimon Schubert /* Check variable changed from pre-default. */
17215796c8dcSSimon Schubert gdb_assert (gdbarch->addr_bit != 0);
17225796c8dcSSimon Schubert if (gdbarch_debug >= 2)
17235796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
17245796c8dcSSimon Schubert return gdbarch->addr_bit;
17255796c8dcSSimon Schubert }
17265796c8dcSSimon Schubert
17275796c8dcSSimon Schubert void
set_gdbarch_addr_bit(struct gdbarch * gdbarch,int addr_bit)17285796c8dcSSimon Schubert set_gdbarch_addr_bit (struct gdbarch *gdbarch,
17295796c8dcSSimon Schubert int addr_bit)
17305796c8dcSSimon Schubert {
17315796c8dcSSimon Schubert gdbarch->addr_bit = addr_bit;
17325796c8dcSSimon Schubert }
17335796c8dcSSimon Schubert
17345796c8dcSSimon Schubert int
gdbarch_dwarf2_addr_size(struct gdbarch * gdbarch)1735c50c785cSJohn Marino gdbarch_dwarf2_addr_size (struct gdbarch *gdbarch)
1736c50c785cSJohn Marino {
1737c50c785cSJohn Marino gdb_assert (gdbarch != NULL);
1738c50c785cSJohn Marino /* Check variable changed from pre-default. */
1739c50c785cSJohn Marino gdb_assert (gdbarch->dwarf2_addr_size != 0);
1740c50c785cSJohn Marino if (gdbarch_debug >= 2)
1741c50c785cSJohn Marino fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_addr_size called\n");
1742c50c785cSJohn Marino return gdbarch->dwarf2_addr_size;
1743c50c785cSJohn Marino }
1744c50c785cSJohn Marino
1745c50c785cSJohn Marino void
set_gdbarch_dwarf2_addr_size(struct gdbarch * gdbarch,int dwarf2_addr_size)1746c50c785cSJohn Marino set_gdbarch_dwarf2_addr_size (struct gdbarch *gdbarch,
1747c50c785cSJohn Marino int dwarf2_addr_size)
1748c50c785cSJohn Marino {
1749c50c785cSJohn Marino gdbarch->dwarf2_addr_size = dwarf2_addr_size;
1750c50c785cSJohn Marino }
1751c50c785cSJohn Marino
1752c50c785cSJohn Marino int
gdbarch_char_signed(struct gdbarch * gdbarch)17535796c8dcSSimon Schubert gdbarch_char_signed (struct gdbarch *gdbarch)
17545796c8dcSSimon Schubert {
17555796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
17565796c8dcSSimon Schubert /* Check variable changed from pre-default. */
17575796c8dcSSimon Schubert gdb_assert (gdbarch->char_signed != -1);
17585796c8dcSSimon Schubert if (gdbarch_debug >= 2)
17595796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
17605796c8dcSSimon Schubert return gdbarch->char_signed;
17615796c8dcSSimon Schubert }
17625796c8dcSSimon Schubert
17635796c8dcSSimon Schubert void
set_gdbarch_char_signed(struct gdbarch * gdbarch,int char_signed)17645796c8dcSSimon Schubert set_gdbarch_char_signed (struct gdbarch *gdbarch,
17655796c8dcSSimon Schubert int char_signed)
17665796c8dcSSimon Schubert {
17675796c8dcSSimon Schubert gdbarch->char_signed = char_signed;
17685796c8dcSSimon Schubert }
17695796c8dcSSimon Schubert
17705796c8dcSSimon Schubert int
gdbarch_read_pc_p(struct gdbarch * gdbarch)17715796c8dcSSimon Schubert gdbarch_read_pc_p (struct gdbarch *gdbarch)
17725796c8dcSSimon Schubert {
17735796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
17745796c8dcSSimon Schubert return gdbarch->read_pc != NULL;
17755796c8dcSSimon Schubert }
17765796c8dcSSimon Schubert
17775796c8dcSSimon Schubert CORE_ADDR
gdbarch_read_pc(struct gdbarch * gdbarch,struct regcache * regcache)17785796c8dcSSimon Schubert gdbarch_read_pc (struct gdbarch *gdbarch, struct regcache *regcache)
17795796c8dcSSimon Schubert {
17805796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
17815796c8dcSSimon Schubert gdb_assert (gdbarch->read_pc != NULL);
17825796c8dcSSimon Schubert if (gdbarch_debug >= 2)
17835796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
17845796c8dcSSimon Schubert return gdbarch->read_pc (regcache);
17855796c8dcSSimon Schubert }
17865796c8dcSSimon Schubert
17875796c8dcSSimon Schubert void
set_gdbarch_read_pc(struct gdbarch * gdbarch,gdbarch_read_pc_ftype read_pc)17885796c8dcSSimon Schubert set_gdbarch_read_pc (struct gdbarch *gdbarch,
17895796c8dcSSimon Schubert gdbarch_read_pc_ftype read_pc)
17905796c8dcSSimon Schubert {
17915796c8dcSSimon Schubert gdbarch->read_pc = read_pc;
17925796c8dcSSimon Schubert }
17935796c8dcSSimon Schubert
17945796c8dcSSimon Schubert int
gdbarch_write_pc_p(struct gdbarch * gdbarch)17955796c8dcSSimon Schubert gdbarch_write_pc_p (struct gdbarch *gdbarch)
17965796c8dcSSimon Schubert {
17975796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
17985796c8dcSSimon Schubert return gdbarch->write_pc != NULL;
17995796c8dcSSimon Schubert }
18005796c8dcSSimon Schubert
18015796c8dcSSimon Schubert void
gdbarch_write_pc(struct gdbarch * gdbarch,struct regcache * regcache,CORE_ADDR val)18025796c8dcSSimon Schubert gdbarch_write_pc (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR val)
18035796c8dcSSimon Schubert {
18045796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
18055796c8dcSSimon Schubert gdb_assert (gdbarch->write_pc != NULL);
18065796c8dcSSimon Schubert if (gdbarch_debug >= 2)
18075796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
18085796c8dcSSimon Schubert gdbarch->write_pc (regcache, val);
18095796c8dcSSimon Schubert }
18105796c8dcSSimon Schubert
18115796c8dcSSimon Schubert void
set_gdbarch_write_pc(struct gdbarch * gdbarch,gdbarch_write_pc_ftype write_pc)18125796c8dcSSimon Schubert set_gdbarch_write_pc (struct gdbarch *gdbarch,
18135796c8dcSSimon Schubert gdbarch_write_pc_ftype write_pc)
18145796c8dcSSimon Schubert {
18155796c8dcSSimon Schubert gdbarch->write_pc = write_pc;
18165796c8dcSSimon Schubert }
18175796c8dcSSimon Schubert
18185796c8dcSSimon Schubert void
gdbarch_virtual_frame_pointer(struct gdbarch * gdbarch,CORE_ADDR pc,int * frame_regnum,LONGEST * frame_offset)18195796c8dcSSimon Schubert gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
18205796c8dcSSimon Schubert {
18215796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
18225796c8dcSSimon Schubert gdb_assert (gdbarch->virtual_frame_pointer != NULL);
18235796c8dcSSimon Schubert if (gdbarch_debug >= 2)
18245796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
18255796c8dcSSimon Schubert gdbarch->virtual_frame_pointer (gdbarch, pc, frame_regnum, frame_offset);
18265796c8dcSSimon Schubert }
18275796c8dcSSimon Schubert
18285796c8dcSSimon Schubert void
set_gdbarch_virtual_frame_pointer(struct gdbarch * gdbarch,gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)18295796c8dcSSimon Schubert set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
18305796c8dcSSimon Schubert gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
18315796c8dcSSimon Schubert {
18325796c8dcSSimon Schubert gdbarch->virtual_frame_pointer = virtual_frame_pointer;
18335796c8dcSSimon Schubert }
18345796c8dcSSimon Schubert
18355796c8dcSSimon Schubert int
gdbarch_pseudo_register_read_p(struct gdbarch * gdbarch)18365796c8dcSSimon Schubert gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
18375796c8dcSSimon Schubert {
18385796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
18395796c8dcSSimon Schubert return gdbarch->pseudo_register_read != NULL;
18405796c8dcSSimon Schubert }
18415796c8dcSSimon Schubert
1842c50c785cSJohn Marino enum register_status
gdbarch_pseudo_register_read(struct gdbarch * gdbarch,struct regcache * regcache,int cookednum,gdb_byte * buf)18435796c8dcSSimon Schubert gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, gdb_byte *buf)
18445796c8dcSSimon Schubert {
18455796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
18465796c8dcSSimon Schubert gdb_assert (gdbarch->pseudo_register_read != NULL);
18475796c8dcSSimon Schubert if (gdbarch_debug >= 2)
18485796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
1849c50c785cSJohn Marino return gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
18505796c8dcSSimon Schubert }
18515796c8dcSSimon Schubert
18525796c8dcSSimon Schubert void
set_gdbarch_pseudo_register_read(struct gdbarch * gdbarch,gdbarch_pseudo_register_read_ftype pseudo_register_read)18535796c8dcSSimon Schubert set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
18545796c8dcSSimon Schubert gdbarch_pseudo_register_read_ftype pseudo_register_read)
18555796c8dcSSimon Schubert {
18565796c8dcSSimon Schubert gdbarch->pseudo_register_read = pseudo_register_read;
18575796c8dcSSimon Schubert }
18585796c8dcSSimon Schubert
18595796c8dcSSimon Schubert int
gdbarch_pseudo_register_read_value_p(struct gdbarch * gdbarch)1860a45ae5f8SJohn Marino gdbarch_pseudo_register_read_value_p (struct gdbarch *gdbarch)
1861a45ae5f8SJohn Marino {
1862a45ae5f8SJohn Marino gdb_assert (gdbarch != NULL);
1863a45ae5f8SJohn Marino return gdbarch->pseudo_register_read_value != NULL;
1864a45ae5f8SJohn Marino }
1865a45ae5f8SJohn Marino
1866a45ae5f8SJohn Marino struct value *
gdbarch_pseudo_register_read_value(struct gdbarch * gdbarch,struct regcache * regcache,int cookednum)1867a45ae5f8SJohn Marino gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum)
1868a45ae5f8SJohn Marino {
1869a45ae5f8SJohn Marino gdb_assert (gdbarch != NULL);
1870a45ae5f8SJohn Marino gdb_assert (gdbarch->pseudo_register_read_value != NULL);
1871a45ae5f8SJohn Marino if (gdbarch_debug >= 2)
1872a45ae5f8SJohn Marino fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read_value called\n");
1873a45ae5f8SJohn Marino return gdbarch->pseudo_register_read_value (gdbarch, regcache, cookednum);
1874a45ae5f8SJohn Marino }
1875a45ae5f8SJohn Marino
1876a45ae5f8SJohn Marino void
set_gdbarch_pseudo_register_read_value(struct gdbarch * gdbarch,gdbarch_pseudo_register_read_value_ftype pseudo_register_read_value)1877a45ae5f8SJohn Marino set_gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch,
1878a45ae5f8SJohn Marino gdbarch_pseudo_register_read_value_ftype pseudo_register_read_value)
1879a45ae5f8SJohn Marino {
1880a45ae5f8SJohn Marino gdbarch->pseudo_register_read_value = pseudo_register_read_value;
1881a45ae5f8SJohn Marino }
1882a45ae5f8SJohn Marino
1883a45ae5f8SJohn Marino int
gdbarch_pseudo_register_write_p(struct gdbarch * gdbarch)18845796c8dcSSimon Schubert gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
18855796c8dcSSimon Schubert {
18865796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
18875796c8dcSSimon Schubert return gdbarch->pseudo_register_write != NULL;
18885796c8dcSSimon Schubert }
18895796c8dcSSimon Schubert
18905796c8dcSSimon Schubert void
gdbarch_pseudo_register_write(struct gdbarch * gdbarch,struct regcache * regcache,int cookednum,const gdb_byte * buf)18915796c8dcSSimon Schubert gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const gdb_byte *buf)
18925796c8dcSSimon Schubert {
18935796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
18945796c8dcSSimon Schubert gdb_assert (gdbarch->pseudo_register_write != NULL);
18955796c8dcSSimon Schubert if (gdbarch_debug >= 2)
18965796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
18975796c8dcSSimon Schubert gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
18985796c8dcSSimon Schubert }
18995796c8dcSSimon Schubert
19005796c8dcSSimon Schubert void
set_gdbarch_pseudo_register_write(struct gdbarch * gdbarch,gdbarch_pseudo_register_write_ftype pseudo_register_write)19015796c8dcSSimon Schubert set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
19025796c8dcSSimon Schubert gdbarch_pseudo_register_write_ftype pseudo_register_write)
19035796c8dcSSimon Schubert {
19045796c8dcSSimon Schubert gdbarch->pseudo_register_write = pseudo_register_write;
19055796c8dcSSimon Schubert }
19065796c8dcSSimon Schubert
19075796c8dcSSimon Schubert int
gdbarch_num_regs(struct gdbarch * gdbarch)19085796c8dcSSimon Schubert gdbarch_num_regs (struct gdbarch *gdbarch)
19095796c8dcSSimon Schubert {
19105796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
19115796c8dcSSimon Schubert /* Check variable changed from pre-default. */
19125796c8dcSSimon Schubert gdb_assert (gdbarch->num_regs != -1);
19135796c8dcSSimon Schubert if (gdbarch_debug >= 2)
19145796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
19155796c8dcSSimon Schubert return gdbarch->num_regs;
19165796c8dcSSimon Schubert }
19175796c8dcSSimon Schubert
19185796c8dcSSimon Schubert void
set_gdbarch_num_regs(struct gdbarch * gdbarch,int num_regs)19195796c8dcSSimon Schubert set_gdbarch_num_regs (struct gdbarch *gdbarch,
19205796c8dcSSimon Schubert int num_regs)
19215796c8dcSSimon Schubert {
19225796c8dcSSimon Schubert gdbarch->num_regs = num_regs;
19235796c8dcSSimon Schubert }
19245796c8dcSSimon Schubert
19255796c8dcSSimon Schubert int
gdbarch_num_pseudo_regs(struct gdbarch * gdbarch)19265796c8dcSSimon Schubert gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
19275796c8dcSSimon Schubert {
19285796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
19295796c8dcSSimon Schubert /* Skip verify of num_pseudo_regs, invalid_p == 0 */
19305796c8dcSSimon Schubert if (gdbarch_debug >= 2)
19315796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
19325796c8dcSSimon Schubert return gdbarch->num_pseudo_regs;
19335796c8dcSSimon Schubert }
19345796c8dcSSimon Schubert
19355796c8dcSSimon Schubert void
set_gdbarch_num_pseudo_regs(struct gdbarch * gdbarch,int num_pseudo_regs)19365796c8dcSSimon Schubert set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
19375796c8dcSSimon Schubert int num_pseudo_regs)
19385796c8dcSSimon Schubert {
19395796c8dcSSimon Schubert gdbarch->num_pseudo_regs = num_pseudo_regs;
19405796c8dcSSimon Schubert }
19415796c8dcSSimon Schubert
19425796c8dcSSimon Schubert int
gdbarch_ax_pseudo_register_collect_p(struct gdbarch * gdbarch)1943c50c785cSJohn Marino gdbarch_ax_pseudo_register_collect_p (struct gdbarch *gdbarch)
1944c50c785cSJohn Marino {
1945c50c785cSJohn Marino gdb_assert (gdbarch != NULL);
1946c50c785cSJohn Marino return gdbarch->ax_pseudo_register_collect != NULL;
1947c50c785cSJohn Marino }
1948c50c785cSJohn Marino
1949c50c785cSJohn Marino int
gdbarch_ax_pseudo_register_collect(struct gdbarch * gdbarch,struct agent_expr * ax,int reg)1950c50c785cSJohn Marino gdbarch_ax_pseudo_register_collect (struct gdbarch *gdbarch, struct agent_expr *ax, int reg)
1951c50c785cSJohn Marino {
1952c50c785cSJohn Marino gdb_assert (gdbarch != NULL);
1953c50c785cSJohn Marino gdb_assert (gdbarch->ax_pseudo_register_collect != NULL);
1954c50c785cSJohn Marino if (gdbarch_debug >= 2)
1955c50c785cSJohn Marino fprintf_unfiltered (gdb_stdlog, "gdbarch_ax_pseudo_register_collect called\n");
1956c50c785cSJohn Marino return gdbarch->ax_pseudo_register_collect (gdbarch, ax, reg);
1957c50c785cSJohn Marino }
1958c50c785cSJohn Marino
1959c50c785cSJohn Marino void
set_gdbarch_ax_pseudo_register_collect(struct gdbarch * gdbarch,gdbarch_ax_pseudo_register_collect_ftype ax_pseudo_register_collect)1960c50c785cSJohn Marino set_gdbarch_ax_pseudo_register_collect (struct gdbarch *gdbarch,
1961c50c785cSJohn Marino gdbarch_ax_pseudo_register_collect_ftype ax_pseudo_register_collect)
1962c50c785cSJohn Marino {
1963c50c785cSJohn Marino gdbarch->ax_pseudo_register_collect = ax_pseudo_register_collect;
1964c50c785cSJohn Marino }
1965c50c785cSJohn Marino
1966c50c785cSJohn Marino int
gdbarch_ax_pseudo_register_push_stack_p(struct gdbarch * gdbarch)1967c50c785cSJohn Marino gdbarch_ax_pseudo_register_push_stack_p (struct gdbarch *gdbarch)
1968c50c785cSJohn Marino {
1969c50c785cSJohn Marino gdb_assert (gdbarch != NULL);
1970c50c785cSJohn Marino return gdbarch->ax_pseudo_register_push_stack != NULL;
1971c50c785cSJohn Marino }
1972c50c785cSJohn Marino
1973c50c785cSJohn Marino int
gdbarch_ax_pseudo_register_push_stack(struct gdbarch * gdbarch,struct agent_expr * ax,int reg)1974c50c785cSJohn Marino gdbarch_ax_pseudo_register_push_stack (struct gdbarch *gdbarch, struct agent_expr *ax, int reg)
1975c50c785cSJohn Marino {
1976c50c785cSJohn Marino gdb_assert (gdbarch != NULL);
1977c50c785cSJohn Marino gdb_assert (gdbarch->ax_pseudo_register_push_stack != NULL);
1978c50c785cSJohn Marino if (gdbarch_debug >= 2)
1979c50c785cSJohn Marino fprintf_unfiltered (gdb_stdlog, "gdbarch_ax_pseudo_register_push_stack called\n");
1980c50c785cSJohn Marino return gdbarch->ax_pseudo_register_push_stack (gdbarch, ax, reg);
1981c50c785cSJohn Marino }
1982c50c785cSJohn Marino
1983c50c785cSJohn Marino void
set_gdbarch_ax_pseudo_register_push_stack(struct gdbarch * gdbarch,gdbarch_ax_pseudo_register_push_stack_ftype ax_pseudo_register_push_stack)1984c50c785cSJohn Marino set_gdbarch_ax_pseudo_register_push_stack (struct gdbarch *gdbarch,
1985c50c785cSJohn Marino gdbarch_ax_pseudo_register_push_stack_ftype ax_pseudo_register_push_stack)
1986c50c785cSJohn Marino {
1987c50c785cSJohn Marino gdbarch->ax_pseudo_register_push_stack = ax_pseudo_register_push_stack;
1988c50c785cSJohn Marino }
1989c50c785cSJohn Marino
1990c50c785cSJohn Marino int
gdbarch_sp_regnum(struct gdbarch * gdbarch)19915796c8dcSSimon Schubert gdbarch_sp_regnum (struct gdbarch *gdbarch)
19925796c8dcSSimon Schubert {
19935796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
19945796c8dcSSimon Schubert /* Skip verify of sp_regnum, invalid_p == 0 */
19955796c8dcSSimon Schubert if (gdbarch_debug >= 2)
19965796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
19975796c8dcSSimon Schubert return gdbarch->sp_regnum;
19985796c8dcSSimon Schubert }
19995796c8dcSSimon Schubert
20005796c8dcSSimon Schubert void
set_gdbarch_sp_regnum(struct gdbarch * gdbarch,int sp_regnum)20015796c8dcSSimon Schubert set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
20025796c8dcSSimon Schubert int sp_regnum)
20035796c8dcSSimon Schubert {
20045796c8dcSSimon Schubert gdbarch->sp_regnum = sp_regnum;
20055796c8dcSSimon Schubert }
20065796c8dcSSimon Schubert
20075796c8dcSSimon Schubert int
gdbarch_pc_regnum(struct gdbarch * gdbarch)20085796c8dcSSimon Schubert gdbarch_pc_regnum (struct gdbarch *gdbarch)
20095796c8dcSSimon Schubert {
20105796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
20115796c8dcSSimon Schubert /* Skip verify of pc_regnum, invalid_p == 0 */
20125796c8dcSSimon Schubert if (gdbarch_debug >= 2)
20135796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
20145796c8dcSSimon Schubert return gdbarch->pc_regnum;
20155796c8dcSSimon Schubert }
20165796c8dcSSimon Schubert
20175796c8dcSSimon Schubert void
set_gdbarch_pc_regnum(struct gdbarch * gdbarch,int pc_regnum)20185796c8dcSSimon Schubert set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
20195796c8dcSSimon Schubert int pc_regnum)
20205796c8dcSSimon Schubert {
20215796c8dcSSimon Schubert gdbarch->pc_regnum = pc_regnum;
20225796c8dcSSimon Schubert }
20235796c8dcSSimon Schubert
20245796c8dcSSimon Schubert int
gdbarch_ps_regnum(struct gdbarch * gdbarch)20255796c8dcSSimon Schubert gdbarch_ps_regnum (struct gdbarch *gdbarch)
20265796c8dcSSimon Schubert {
20275796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
20285796c8dcSSimon Schubert /* Skip verify of ps_regnum, invalid_p == 0 */
20295796c8dcSSimon Schubert if (gdbarch_debug >= 2)
20305796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
20315796c8dcSSimon Schubert return gdbarch->ps_regnum;
20325796c8dcSSimon Schubert }
20335796c8dcSSimon Schubert
20345796c8dcSSimon Schubert void
set_gdbarch_ps_regnum(struct gdbarch * gdbarch,int ps_regnum)20355796c8dcSSimon Schubert set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
20365796c8dcSSimon Schubert int ps_regnum)
20375796c8dcSSimon Schubert {
20385796c8dcSSimon Schubert gdbarch->ps_regnum = ps_regnum;
20395796c8dcSSimon Schubert }
20405796c8dcSSimon Schubert
20415796c8dcSSimon Schubert int
gdbarch_fp0_regnum(struct gdbarch * gdbarch)20425796c8dcSSimon Schubert gdbarch_fp0_regnum (struct gdbarch *gdbarch)
20435796c8dcSSimon Schubert {
20445796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
20455796c8dcSSimon Schubert /* Skip verify of fp0_regnum, invalid_p == 0 */
20465796c8dcSSimon Schubert if (gdbarch_debug >= 2)
20475796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
20485796c8dcSSimon Schubert return gdbarch->fp0_regnum;
20495796c8dcSSimon Schubert }
20505796c8dcSSimon Schubert
20515796c8dcSSimon Schubert void
set_gdbarch_fp0_regnum(struct gdbarch * gdbarch,int fp0_regnum)20525796c8dcSSimon Schubert set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
20535796c8dcSSimon Schubert int fp0_regnum)
20545796c8dcSSimon Schubert {
20555796c8dcSSimon Schubert gdbarch->fp0_regnum = fp0_regnum;
20565796c8dcSSimon Schubert }
20575796c8dcSSimon Schubert
20585796c8dcSSimon Schubert int
gdbarch_stab_reg_to_regnum(struct gdbarch * gdbarch,int stab_regnr)20595796c8dcSSimon Schubert gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
20605796c8dcSSimon Schubert {
20615796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
20625796c8dcSSimon Schubert gdb_assert (gdbarch->stab_reg_to_regnum != NULL);
20635796c8dcSSimon Schubert if (gdbarch_debug >= 2)
20645796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
20655796c8dcSSimon Schubert return gdbarch->stab_reg_to_regnum (gdbarch, stab_regnr);
20665796c8dcSSimon Schubert }
20675796c8dcSSimon Schubert
20685796c8dcSSimon Schubert void
set_gdbarch_stab_reg_to_regnum(struct gdbarch * gdbarch,gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)20695796c8dcSSimon Schubert set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
20705796c8dcSSimon Schubert gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
20715796c8dcSSimon Schubert {
20725796c8dcSSimon Schubert gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
20735796c8dcSSimon Schubert }
20745796c8dcSSimon Schubert
20755796c8dcSSimon Schubert int
gdbarch_ecoff_reg_to_regnum(struct gdbarch * gdbarch,int ecoff_regnr)20765796c8dcSSimon Schubert gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
20775796c8dcSSimon Schubert {
20785796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
20795796c8dcSSimon Schubert gdb_assert (gdbarch->ecoff_reg_to_regnum != NULL);
20805796c8dcSSimon Schubert if (gdbarch_debug >= 2)
20815796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
20825796c8dcSSimon Schubert return gdbarch->ecoff_reg_to_regnum (gdbarch, ecoff_regnr);
20835796c8dcSSimon Schubert }
20845796c8dcSSimon Schubert
20855796c8dcSSimon Schubert void
set_gdbarch_ecoff_reg_to_regnum(struct gdbarch * gdbarch,gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)20865796c8dcSSimon Schubert set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
20875796c8dcSSimon Schubert gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
20885796c8dcSSimon Schubert {
20895796c8dcSSimon Schubert gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
20905796c8dcSSimon Schubert }
20915796c8dcSSimon Schubert
20925796c8dcSSimon Schubert int
gdbarch_sdb_reg_to_regnum(struct gdbarch * gdbarch,int sdb_regnr)20935796c8dcSSimon Schubert gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
20945796c8dcSSimon Schubert {
20955796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
20965796c8dcSSimon Schubert gdb_assert (gdbarch->sdb_reg_to_regnum != NULL);
20975796c8dcSSimon Schubert if (gdbarch_debug >= 2)
20985796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
20995796c8dcSSimon Schubert return gdbarch->sdb_reg_to_regnum (gdbarch, sdb_regnr);
21005796c8dcSSimon Schubert }
21015796c8dcSSimon Schubert
21025796c8dcSSimon Schubert void
set_gdbarch_sdb_reg_to_regnum(struct gdbarch * gdbarch,gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)21035796c8dcSSimon Schubert set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
21045796c8dcSSimon Schubert gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
21055796c8dcSSimon Schubert {
21065796c8dcSSimon Schubert gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
21075796c8dcSSimon Schubert }
21085796c8dcSSimon Schubert
21095796c8dcSSimon Schubert int
gdbarch_dwarf2_reg_to_regnum(struct gdbarch * gdbarch,int dwarf2_regnr)21105796c8dcSSimon Schubert gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
21115796c8dcSSimon Schubert {
21125796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
21135796c8dcSSimon Schubert gdb_assert (gdbarch->dwarf2_reg_to_regnum != NULL);
21145796c8dcSSimon Schubert if (gdbarch_debug >= 2)
21155796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
21165796c8dcSSimon Schubert return gdbarch->dwarf2_reg_to_regnum (gdbarch, dwarf2_regnr);
21175796c8dcSSimon Schubert }
21185796c8dcSSimon Schubert
21195796c8dcSSimon Schubert void
set_gdbarch_dwarf2_reg_to_regnum(struct gdbarch * gdbarch,gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)21205796c8dcSSimon Schubert set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
21215796c8dcSSimon Schubert gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
21225796c8dcSSimon Schubert {
21235796c8dcSSimon Schubert gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
21245796c8dcSSimon Schubert }
21255796c8dcSSimon Schubert
21265796c8dcSSimon Schubert const char *
gdbarch_register_name(struct gdbarch * gdbarch,int regnr)21275796c8dcSSimon Schubert gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
21285796c8dcSSimon Schubert {
21295796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
21305796c8dcSSimon Schubert gdb_assert (gdbarch->register_name != NULL);
21315796c8dcSSimon Schubert if (gdbarch_debug >= 2)
21325796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
21335796c8dcSSimon Schubert return gdbarch->register_name (gdbarch, regnr);
21345796c8dcSSimon Schubert }
21355796c8dcSSimon Schubert
21365796c8dcSSimon Schubert void
set_gdbarch_register_name(struct gdbarch * gdbarch,gdbarch_register_name_ftype register_name)21375796c8dcSSimon Schubert set_gdbarch_register_name (struct gdbarch *gdbarch,
21385796c8dcSSimon Schubert gdbarch_register_name_ftype register_name)
21395796c8dcSSimon Schubert {
21405796c8dcSSimon Schubert gdbarch->register_name = register_name;
21415796c8dcSSimon Schubert }
21425796c8dcSSimon Schubert
21435796c8dcSSimon Schubert int
gdbarch_register_type_p(struct gdbarch * gdbarch)21445796c8dcSSimon Schubert gdbarch_register_type_p (struct gdbarch *gdbarch)
21455796c8dcSSimon Schubert {
21465796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
21475796c8dcSSimon Schubert return gdbarch->register_type != NULL;
21485796c8dcSSimon Schubert }
21495796c8dcSSimon Schubert
21505796c8dcSSimon Schubert struct type *
gdbarch_register_type(struct gdbarch * gdbarch,int reg_nr)21515796c8dcSSimon Schubert gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
21525796c8dcSSimon Schubert {
21535796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
21545796c8dcSSimon Schubert gdb_assert (gdbarch->register_type != NULL);
21555796c8dcSSimon Schubert if (gdbarch_debug >= 2)
21565796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
21575796c8dcSSimon Schubert return gdbarch->register_type (gdbarch, reg_nr);
21585796c8dcSSimon Schubert }
21595796c8dcSSimon Schubert
21605796c8dcSSimon Schubert void
set_gdbarch_register_type(struct gdbarch * gdbarch,gdbarch_register_type_ftype register_type)21615796c8dcSSimon Schubert set_gdbarch_register_type (struct gdbarch *gdbarch,
21625796c8dcSSimon Schubert gdbarch_register_type_ftype register_type)
21635796c8dcSSimon Schubert {
21645796c8dcSSimon Schubert gdbarch->register_type = register_type;
21655796c8dcSSimon Schubert }
21665796c8dcSSimon Schubert
21675796c8dcSSimon Schubert int
gdbarch_dummy_id_p(struct gdbarch * gdbarch)21685796c8dcSSimon Schubert gdbarch_dummy_id_p (struct gdbarch *gdbarch)
21695796c8dcSSimon Schubert {
21705796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
21715796c8dcSSimon Schubert return gdbarch->dummy_id != NULL;
21725796c8dcSSimon Schubert }
21735796c8dcSSimon Schubert
21745796c8dcSSimon Schubert struct frame_id
gdbarch_dummy_id(struct gdbarch * gdbarch,struct frame_info * this_frame)21755796c8dcSSimon Schubert gdbarch_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
21765796c8dcSSimon Schubert {
21775796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
21785796c8dcSSimon Schubert gdb_assert (gdbarch->dummy_id != NULL);
21795796c8dcSSimon Schubert if (gdbarch_debug >= 2)
21805796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_dummy_id called\n");
21815796c8dcSSimon Schubert return gdbarch->dummy_id (gdbarch, this_frame);
21825796c8dcSSimon Schubert }
21835796c8dcSSimon Schubert
21845796c8dcSSimon Schubert void
set_gdbarch_dummy_id(struct gdbarch * gdbarch,gdbarch_dummy_id_ftype dummy_id)21855796c8dcSSimon Schubert set_gdbarch_dummy_id (struct gdbarch *gdbarch,
21865796c8dcSSimon Schubert gdbarch_dummy_id_ftype dummy_id)
21875796c8dcSSimon Schubert {
21885796c8dcSSimon Schubert gdbarch->dummy_id = dummy_id;
21895796c8dcSSimon Schubert }
21905796c8dcSSimon Schubert
21915796c8dcSSimon Schubert int
gdbarch_deprecated_fp_regnum(struct gdbarch * gdbarch)21925796c8dcSSimon Schubert gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch)
21935796c8dcSSimon Schubert {
21945796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
21955796c8dcSSimon Schubert /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
21965796c8dcSSimon Schubert if (gdbarch_debug >= 2)
21975796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n");
21985796c8dcSSimon Schubert return gdbarch->deprecated_fp_regnum;
21995796c8dcSSimon Schubert }
22005796c8dcSSimon Schubert
22015796c8dcSSimon Schubert void
set_gdbarch_deprecated_fp_regnum(struct gdbarch * gdbarch,int deprecated_fp_regnum)22025796c8dcSSimon Schubert set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch,
22035796c8dcSSimon Schubert int deprecated_fp_regnum)
22045796c8dcSSimon Schubert {
22055796c8dcSSimon Schubert gdbarch->deprecated_fp_regnum = deprecated_fp_regnum;
22065796c8dcSSimon Schubert }
22075796c8dcSSimon Schubert
22085796c8dcSSimon Schubert int
gdbarch_push_dummy_call_p(struct gdbarch * gdbarch)22095796c8dcSSimon Schubert gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
22105796c8dcSSimon Schubert {
22115796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
22125796c8dcSSimon Schubert return gdbarch->push_dummy_call != NULL;
22135796c8dcSSimon Schubert }
22145796c8dcSSimon Schubert
22155796c8dcSSimon Schubert CORE_ADDR
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)22165796c8dcSSimon 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)
22175796c8dcSSimon Schubert {
22185796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
22195796c8dcSSimon Schubert gdb_assert (gdbarch->push_dummy_call != NULL);
22205796c8dcSSimon Schubert if (gdbarch_debug >= 2)
22215796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
22225796c8dcSSimon Schubert return gdbarch->push_dummy_call (gdbarch, function, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr);
22235796c8dcSSimon Schubert }
22245796c8dcSSimon Schubert
22255796c8dcSSimon Schubert void
set_gdbarch_push_dummy_call(struct gdbarch * gdbarch,gdbarch_push_dummy_call_ftype push_dummy_call)22265796c8dcSSimon Schubert set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
22275796c8dcSSimon Schubert gdbarch_push_dummy_call_ftype push_dummy_call)
22285796c8dcSSimon Schubert {
22295796c8dcSSimon Schubert gdbarch->push_dummy_call = push_dummy_call;
22305796c8dcSSimon Schubert }
22315796c8dcSSimon Schubert
22325796c8dcSSimon Schubert int
gdbarch_call_dummy_location(struct gdbarch * gdbarch)22335796c8dcSSimon Schubert gdbarch_call_dummy_location (struct gdbarch *gdbarch)
22345796c8dcSSimon Schubert {
22355796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
22365796c8dcSSimon Schubert /* Skip verify of call_dummy_location, invalid_p == 0 */
22375796c8dcSSimon Schubert if (gdbarch_debug >= 2)
22385796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
22395796c8dcSSimon Schubert return gdbarch->call_dummy_location;
22405796c8dcSSimon Schubert }
22415796c8dcSSimon Schubert
22425796c8dcSSimon Schubert void
set_gdbarch_call_dummy_location(struct gdbarch * gdbarch,int call_dummy_location)22435796c8dcSSimon Schubert set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
22445796c8dcSSimon Schubert int call_dummy_location)
22455796c8dcSSimon Schubert {
22465796c8dcSSimon Schubert gdbarch->call_dummy_location = call_dummy_location;
22475796c8dcSSimon Schubert }
22485796c8dcSSimon Schubert
22495796c8dcSSimon Schubert int
gdbarch_push_dummy_code_p(struct gdbarch * gdbarch)22505796c8dcSSimon Schubert gdbarch_push_dummy_code_p (struct gdbarch *gdbarch)
22515796c8dcSSimon Schubert {
22525796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
22535796c8dcSSimon Schubert return gdbarch->push_dummy_code != NULL;
22545796c8dcSSimon Schubert }
22555796c8dcSSimon Schubert
22565796c8dcSSimon Schubert CORE_ADDR
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)22575796c8dcSSimon 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)
22585796c8dcSSimon Schubert {
22595796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
22605796c8dcSSimon Schubert gdb_assert (gdbarch->push_dummy_code != NULL);
22615796c8dcSSimon Schubert if (gdbarch_debug >= 2)
22625796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n");
22635796c8dcSSimon Schubert return gdbarch->push_dummy_code (gdbarch, sp, funaddr, args, nargs, value_type, real_pc, bp_addr, regcache);
22645796c8dcSSimon Schubert }
22655796c8dcSSimon Schubert
22665796c8dcSSimon Schubert void
set_gdbarch_push_dummy_code(struct gdbarch * gdbarch,gdbarch_push_dummy_code_ftype push_dummy_code)22675796c8dcSSimon Schubert set_gdbarch_push_dummy_code (struct gdbarch *gdbarch,
22685796c8dcSSimon Schubert gdbarch_push_dummy_code_ftype push_dummy_code)
22695796c8dcSSimon Schubert {
22705796c8dcSSimon Schubert gdbarch->push_dummy_code = push_dummy_code;
22715796c8dcSSimon Schubert }
22725796c8dcSSimon Schubert
22735796c8dcSSimon Schubert void
gdbarch_print_registers_info(struct gdbarch * gdbarch,struct ui_file * file,struct frame_info * frame,int regnum,int all)22745796c8dcSSimon Schubert gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
22755796c8dcSSimon Schubert {
22765796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
22775796c8dcSSimon Schubert gdb_assert (gdbarch->print_registers_info != NULL);
22785796c8dcSSimon Schubert if (gdbarch_debug >= 2)
22795796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
22805796c8dcSSimon Schubert gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
22815796c8dcSSimon Schubert }
22825796c8dcSSimon Schubert
22835796c8dcSSimon Schubert void
set_gdbarch_print_registers_info(struct gdbarch * gdbarch,gdbarch_print_registers_info_ftype print_registers_info)22845796c8dcSSimon Schubert set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
22855796c8dcSSimon Schubert gdbarch_print_registers_info_ftype print_registers_info)
22865796c8dcSSimon Schubert {
22875796c8dcSSimon Schubert gdbarch->print_registers_info = print_registers_info;
22885796c8dcSSimon Schubert }
22895796c8dcSSimon Schubert
22905796c8dcSSimon Schubert int
gdbarch_print_float_info_p(struct gdbarch * gdbarch)22915796c8dcSSimon Schubert gdbarch_print_float_info_p (struct gdbarch *gdbarch)
22925796c8dcSSimon Schubert {
22935796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
22945796c8dcSSimon Schubert return gdbarch->print_float_info != NULL;
22955796c8dcSSimon Schubert }
22965796c8dcSSimon Schubert
22975796c8dcSSimon Schubert void
gdbarch_print_float_info(struct gdbarch * gdbarch,struct ui_file * file,struct frame_info * frame,const char * args)22985796c8dcSSimon Schubert gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
22995796c8dcSSimon Schubert {
23005796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
23015796c8dcSSimon Schubert gdb_assert (gdbarch->print_float_info != NULL);
23025796c8dcSSimon Schubert if (gdbarch_debug >= 2)
23035796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
23045796c8dcSSimon Schubert gdbarch->print_float_info (gdbarch, file, frame, args);
23055796c8dcSSimon Schubert }
23065796c8dcSSimon Schubert
23075796c8dcSSimon Schubert void
set_gdbarch_print_float_info(struct gdbarch * gdbarch,gdbarch_print_float_info_ftype print_float_info)23085796c8dcSSimon Schubert set_gdbarch_print_float_info (struct gdbarch *gdbarch,
23095796c8dcSSimon Schubert gdbarch_print_float_info_ftype print_float_info)
23105796c8dcSSimon Schubert {
23115796c8dcSSimon Schubert gdbarch->print_float_info = print_float_info;
23125796c8dcSSimon Schubert }
23135796c8dcSSimon Schubert
23145796c8dcSSimon Schubert int
gdbarch_print_vector_info_p(struct gdbarch * gdbarch)23155796c8dcSSimon Schubert gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
23165796c8dcSSimon Schubert {
23175796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
23185796c8dcSSimon Schubert return gdbarch->print_vector_info != NULL;
23195796c8dcSSimon Schubert }
23205796c8dcSSimon Schubert
23215796c8dcSSimon Schubert void
gdbarch_print_vector_info(struct gdbarch * gdbarch,struct ui_file * file,struct frame_info * frame,const char * args)23225796c8dcSSimon Schubert gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
23235796c8dcSSimon Schubert {
23245796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
23255796c8dcSSimon Schubert gdb_assert (gdbarch->print_vector_info != NULL);
23265796c8dcSSimon Schubert if (gdbarch_debug >= 2)
23275796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
23285796c8dcSSimon Schubert gdbarch->print_vector_info (gdbarch, file, frame, args);
23295796c8dcSSimon Schubert }
23305796c8dcSSimon Schubert
23315796c8dcSSimon Schubert void
set_gdbarch_print_vector_info(struct gdbarch * gdbarch,gdbarch_print_vector_info_ftype print_vector_info)23325796c8dcSSimon Schubert set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
23335796c8dcSSimon Schubert gdbarch_print_vector_info_ftype print_vector_info)
23345796c8dcSSimon Schubert {
23355796c8dcSSimon Schubert gdbarch->print_vector_info = print_vector_info;
23365796c8dcSSimon Schubert }
23375796c8dcSSimon Schubert
23385796c8dcSSimon Schubert int
gdbarch_register_sim_regno(struct gdbarch * gdbarch,int reg_nr)23395796c8dcSSimon Schubert gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
23405796c8dcSSimon Schubert {
23415796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
23425796c8dcSSimon Schubert gdb_assert (gdbarch->register_sim_regno != NULL);
23435796c8dcSSimon Schubert if (gdbarch_debug >= 2)
23445796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
23455796c8dcSSimon Schubert return gdbarch->register_sim_regno (gdbarch, reg_nr);
23465796c8dcSSimon Schubert }
23475796c8dcSSimon Schubert
23485796c8dcSSimon Schubert void
set_gdbarch_register_sim_regno(struct gdbarch * gdbarch,gdbarch_register_sim_regno_ftype register_sim_regno)23495796c8dcSSimon Schubert set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
23505796c8dcSSimon Schubert gdbarch_register_sim_regno_ftype register_sim_regno)
23515796c8dcSSimon Schubert {
23525796c8dcSSimon Schubert gdbarch->register_sim_regno = register_sim_regno;
23535796c8dcSSimon Schubert }
23545796c8dcSSimon Schubert
23555796c8dcSSimon Schubert int
gdbarch_cannot_fetch_register(struct gdbarch * gdbarch,int regnum)23565796c8dcSSimon Schubert gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
23575796c8dcSSimon Schubert {
23585796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
23595796c8dcSSimon Schubert gdb_assert (gdbarch->cannot_fetch_register != NULL);
23605796c8dcSSimon Schubert if (gdbarch_debug >= 2)
23615796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
23625796c8dcSSimon Schubert return gdbarch->cannot_fetch_register (gdbarch, regnum);
23635796c8dcSSimon Schubert }
23645796c8dcSSimon Schubert
23655796c8dcSSimon Schubert void
set_gdbarch_cannot_fetch_register(struct gdbarch * gdbarch,gdbarch_cannot_fetch_register_ftype cannot_fetch_register)23665796c8dcSSimon Schubert set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
23675796c8dcSSimon Schubert gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
23685796c8dcSSimon Schubert {
23695796c8dcSSimon Schubert gdbarch->cannot_fetch_register = cannot_fetch_register;
23705796c8dcSSimon Schubert }
23715796c8dcSSimon Schubert
23725796c8dcSSimon Schubert int
gdbarch_cannot_store_register(struct gdbarch * gdbarch,int regnum)23735796c8dcSSimon Schubert gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
23745796c8dcSSimon Schubert {
23755796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
23765796c8dcSSimon Schubert gdb_assert (gdbarch->cannot_store_register != NULL);
23775796c8dcSSimon Schubert if (gdbarch_debug >= 2)
23785796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
23795796c8dcSSimon Schubert return gdbarch->cannot_store_register (gdbarch, regnum);
23805796c8dcSSimon Schubert }
23815796c8dcSSimon Schubert
23825796c8dcSSimon Schubert void
set_gdbarch_cannot_store_register(struct gdbarch * gdbarch,gdbarch_cannot_store_register_ftype cannot_store_register)23835796c8dcSSimon Schubert set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
23845796c8dcSSimon Schubert gdbarch_cannot_store_register_ftype cannot_store_register)
23855796c8dcSSimon Schubert {
23865796c8dcSSimon Schubert gdbarch->cannot_store_register = cannot_store_register;
23875796c8dcSSimon Schubert }
23885796c8dcSSimon Schubert
23895796c8dcSSimon Schubert int
gdbarch_get_longjmp_target_p(struct gdbarch * gdbarch)23905796c8dcSSimon Schubert gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
23915796c8dcSSimon Schubert {
23925796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
23935796c8dcSSimon Schubert return gdbarch->get_longjmp_target != NULL;
23945796c8dcSSimon Schubert }
23955796c8dcSSimon Schubert
23965796c8dcSSimon Schubert int
gdbarch_get_longjmp_target(struct gdbarch * gdbarch,struct frame_info * frame,CORE_ADDR * pc)23975796c8dcSSimon Schubert gdbarch_get_longjmp_target (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR *pc)
23985796c8dcSSimon Schubert {
23995796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
24005796c8dcSSimon Schubert gdb_assert (gdbarch->get_longjmp_target != NULL);
24015796c8dcSSimon Schubert if (gdbarch_debug >= 2)
24025796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
24035796c8dcSSimon Schubert return gdbarch->get_longjmp_target (frame, pc);
24045796c8dcSSimon Schubert }
24055796c8dcSSimon Schubert
24065796c8dcSSimon Schubert void
set_gdbarch_get_longjmp_target(struct gdbarch * gdbarch,gdbarch_get_longjmp_target_ftype get_longjmp_target)24075796c8dcSSimon Schubert set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
24085796c8dcSSimon Schubert gdbarch_get_longjmp_target_ftype get_longjmp_target)
24095796c8dcSSimon Schubert {
24105796c8dcSSimon Schubert gdbarch->get_longjmp_target = get_longjmp_target;
24115796c8dcSSimon Schubert }
24125796c8dcSSimon Schubert
24135796c8dcSSimon Schubert int
gdbarch_believe_pcc_promotion(struct gdbarch * gdbarch)24145796c8dcSSimon Schubert gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
24155796c8dcSSimon Schubert {
24165796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
24175796c8dcSSimon Schubert if (gdbarch_debug >= 2)
24185796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
24195796c8dcSSimon Schubert return gdbarch->believe_pcc_promotion;
24205796c8dcSSimon Schubert }
24215796c8dcSSimon Schubert
24225796c8dcSSimon Schubert void
set_gdbarch_believe_pcc_promotion(struct gdbarch * gdbarch,int believe_pcc_promotion)24235796c8dcSSimon Schubert set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
24245796c8dcSSimon Schubert int believe_pcc_promotion)
24255796c8dcSSimon Schubert {
24265796c8dcSSimon Schubert gdbarch->believe_pcc_promotion = believe_pcc_promotion;
24275796c8dcSSimon Schubert }
24285796c8dcSSimon Schubert
24295796c8dcSSimon Schubert int
gdbarch_convert_register_p(struct gdbarch * gdbarch,int regnum,struct type * type)24305796c8dcSSimon Schubert gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
24315796c8dcSSimon Schubert {
24325796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
24335796c8dcSSimon Schubert gdb_assert (gdbarch->convert_register_p != NULL);
24345796c8dcSSimon Schubert if (gdbarch_debug >= 2)
24355796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
24365796c8dcSSimon Schubert return gdbarch->convert_register_p (gdbarch, regnum, type);
24375796c8dcSSimon Schubert }
24385796c8dcSSimon Schubert
24395796c8dcSSimon Schubert void
set_gdbarch_convert_register_p(struct gdbarch * gdbarch,gdbarch_convert_register_p_ftype convert_register_p)24405796c8dcSSimon Schubert set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
24415796c8dcSSimon Schubert gdbarch_convert_register_p_ftype convert_register_p)
24425796c8dcSSimon Schubert {
24435796c8dcSSimon Schubert gdbarch->convert_register_p = convert_register_p;
24445796c8dcSSimon Schubert }
24455796c8dcSSimon Schubert
2446c50c785cSJohn Marino int
gdbarch_register_to_value(struct gdbarch * gdbarch,struct frame_info * frame,int regnum,struct type * type,gdb_byte * buf,int * optimizedp,int * unavailablep)2447c50c785cSJohn Marino gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, gdb_byte *buf, int *optimizedp, int *unavailablep)
24485796c8dcSSimon Schubert {
24495796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
24505796c8dcSSimon Schubert gdb_assert (gdbarch->register_to_value != NULL);
24515796c8dcSSimon Schubert if (gdbarch_debug >= 2)
24525796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
2453c50c785cSJohn Marino return gdbarch->register_to_value (frame, regnum, type, buf, optimizedp, unavailablep);
24545796c8dcSSimon Schubert }
24555796c8dcSSimon Schubert
24565796c8dcSSimon Schubert void
set_gdbarch_register_to_value(struct gdbarch * gdbarch,gdbarch_register_to_value_ftype register_to_value)24575796c8dcSSimon Schubert set_gdbarch_register_to_value (struct gdbarch *gdbarch,
24585796c8dcSSimon Schubert gdbarch_register_to_value_ftype register_to_value)
24595796c8dcSSimon Schubert {
24605796c8dcSSimon Schubert gdbarch->register_to_value = register_to_value;
24615796c8dcSSimon Schubert }
24625796c8dcSSimon Schubert
24635796c8dcSSimon Schubert void
gdbarch_value_to_register(struct gdbarch * gdbarch,struct frame_info * frame,int regnum,struct type * type,const gdb_byte * buf)24645796c8dcSSimon Schubert gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const gdb_byte *buf)
24655796c8dcSSimon Schubert {
24665796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
24675796c8dcSSimon Schubert gdb_assert (gdbarch->value_to_register != NULL);
24685796c8dcSSimon Schubert if (gdbarch_debug >= 2)
24695796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
24705796c8dcSSimon Schubert gdbarch->value_to_register (frame, regnum, type, buf);
24715796c8dcSSimon Schubert }
24725796c8dcSSimon Schubert
24735796c8dcSSimon Schubert void
set_gdbarch_value_to_register(struct gdbarch * gdbarch,gdbarch_value_to_register_ftype value_to_register)24745796c8dcSSimon Schubert set_gdbarch_value_to_register (struct gdbarch *gdbarch,
24755796c8dcSSimon Schubert gdbarch_value_to_register_ftype value_to_register)
24765796c8dcSSimon Schubert {
24775796c8dcSSimon Schubert gdbarch->value_to_register = value_to_register;
24785796c8dcSSimon Schubert }
24795796c8dcSSimon Schubert
24805796c8dcSSimon Schubert struct value *
gdbarch_value_from_register(struct gdbarch * gdbarch,struct type * type,int regnum,struct frame_info * frame)24815796c8dcSSimon Schubert gdbarch_value_from_register (struct gdbarch *gdbarch, struct type *type, int regnum, struct frame_info *frame)
24825796c8dcSSimon Schubert {
24835796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
24845796c8dcSSimon Schubert gdb_assert (gdbarch->value_from_register != NULL);
24855796c8dcSSimon Schubert if (gdbarch_debug >= 2)
24865796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_value_from_register called\n");
24875796c8dcSSimon Schubert return gdbarch->value_from_register (type, regnum, frame);
24885796c8dcSSimon Schubert }
24895796c8dcSSimon Schubert
24905796c8dcSSimon Schubert void
set_gdbarch_value_from_register(struct gdbarch * gdbarch,gdbarch_value_from_register_ftype value_from_register)24915796c8dcSSimon Schubert set_gdbarch_value_from_register (struct gdbarch *gdbarch,
24925796c8dcSSimon Schubert gdbarch_value_from_register_ftype value_from_register)
24935796c8dcSSimon Schubert {
24945796c8dcSSimon Schubert gdbarch->value_from_register = value_from_register;
24955796c8dcSSimon Schubert }
24965796c8dcSSimon Schubert
24975796c8dcSSimon Schubert CORE_ADDR
gdbarch_pointer_to_address(struct gdbarch * gdbarch,struct type * type,const gdb_byte * buf)24985796c8dcSSimon Schubert gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
24995796c8dcSSimon Schubert {
25005796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
25015796c8dcSSimon Schubert gdb_assert (gdbarch->pointer_to_address != NULL);
25025796c8dcSSimon Schubert if (gdbarch_debug >= 2)
25035796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
25045796c8dcSSimon Schubert return gdbarch->pointer_to_address (gdbarch, type, buf);
25055796c8dcSSimon Schubert }
25065796c8dcSSimon Schubert
25075796c8dcSSimon Schubert void
set_gdbarch_pointer_to_address(struct gdbarch * gdbarch,gdbarch_pointer_to_address_ftype pointer_to_address)25085796c8dcSSimon Schubert set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
25095796c8dcSSimon Schubert gdbarch_pointer_to_address_ftype pointer_to_address)
25105796c8dcSSimon Schubert {
25115796c8dcSSimon Schubert gdbarch->pointer_to_address = pointer_to_address;
25125796c8dcSSimon Schubert }
25135796c8dcSSimon Schubert
25145796c8dcSSimon Schubert void
gdbarch_address_to_pointer(struct gdbarch * gdbarch,struct type * type,gdb_byte * buf,CORE_ADDR addr)25155796c8dcSSimon Schubert gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, gdb_byte *buf, CORE_ADDR addr)
25165796c8dcSSimon Schubert {
25175796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
25185796c8dcSSimon Schubert gdb_assert (gdbarch->address_to_pointer != NULL);
25195796c8dcSSimon Schubert if (gdbarch_debug >= 2)
25205796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
25215796c8dcSSimon Schubert gdbarch->address_to_pointer (gdbarch, type, buf, addr);
25225796c8dcSSimon Schubert }
25235796c8dcSSimon Schubert
25245796c8dcSSimon Schubert void
set_gdbarch_address_to_pointer(struct gdbarch * gdbarch,gdbarch_address_to_pointer_ftype address_to_pointer)25255796c8dcSSimon Schubert set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
25265796c8dcSSimon Schubert gdbarch_address_to_pointer_ftype address_to_pointer)
25275796c8dcSSimon Schubert {
25285796c8dcSSimon Schubert gdbarch->address_to_pointer = address_to_pointer;
25295796c8dcSSimon Schubert }
25305796c8dcSSimon Schubert
25315796c8dcSSimon Schubert int
gdbarch_integer_to_address_p(struct gdbarch * gdbarch)25325796c8dcSSimon Schubert gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
25335796c8dcSSimon Schubert {
25345796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
25355796c8dcSSimon Schubert return gdbarch->integer_to_address != NULL;
25365796c8dcSSimon Schubert }
25375796c8dcSSimon Schubert
25385796c8dcSSimon Schubert CORE_ADDR
gdbarch_integer_to_address(struct gdbarch * gdbarch,struct type * type,const gdb_byte * buf)25395796c8dcSSimon Schubert gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
25405796c8dcSSimon Schubert {
25415796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
25425796c8dcSSimon Schubert gdb_assert (gdbarch->integer_to_address != NULL);
25435796c8dcSSimon Schubert if (gdbarch_debug >= 2)
25445796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
25455796c8dcSSimon Schubert return gdbarch->integer_to_address (gdbarch, type, buf);
25465796c8dcSSimon Schubert }
25475796c8dcSSimon Schubert
25485796c8dcSSimon Schubert void
set_gdbarch_integer_to_address(struct gdbarch * gdbarch,gdbarch_integer_to_address_ftype integer_to_address)25495796c8dcSSimon Schubert set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
25505796c8dcSSimon Schubert gdbarch_integer_to_address_ftype integer_to_address)
25515796c8dcSSimon Schubert {
25525796c8dcSSimon Schubert gdbarch->integer_to_address = integer_to_address;
25535796c8dcSSimon Schubert }
25545796c8dcSSimon Schubert
25555796c8dcSSimon Schubert int
gdbarch_return_value_p(struct gdbarch * gdbarch)25565796c8dcSSimon Schubert gdbarch_return_value_p (struct gdbarch *gdbarch)
25575796c8dcSSimon Schubert {
25585796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
25595796c8dcSSimon Schubert return gdbarch->return_value != NULL;
25605796c8dcSSimon Schubert }
25615796c8dcSSimon Schubert
25625796c8dcSSimon Schubert enum return_value_convention
gdbarch_return_value(struct gdbarch * gdbarch,struct value * function,struct type * valtype,struct regcache * regcache,gdb_byte * readbuf,const gdb_byte * writebuf)2563*ef5ccd6cSJohn Marino gdbarch_return_value (struct gdbarch *gdbarch, struct value *function, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
25645796c8dcSSimon Schubert {
25655796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
25665796c8dcSSimon Schubert gdb_assert (gdbarch->return_value != NULL);
25675796c8dcSSimon Schubert if (gdbarch_debug >= 2)
25685796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value called\n");
2569*ef5ccd6cSJohn Marino return gdbarch->return_value (gdbarch, function, valtype, regcache, readbuf, writebuf);
25705796c8dcSSimon Schubert }
25715796c8dcSSimon Schubert
25725796c8dcSSimon Schubert void
set_gdbarch_return_value(struct gdbarch * gdbarch,gdbarch_return_value_ftype return_value)25735796c8dcSSimon Schubert set_gdbarch_return_value (struct gdbarch *gdbarch,
25745796c8dcSSimon Schubert gdbarch_return_value_ftype return_value)
25755796c8dcSSimon Schubert {
25765796c8dcSSimon Schubert gdbarch->return_value = return_value;
25775796c8dcSSimon Schubert }
25785796c8dcSSimon Schubert
2579*ef5ccd6cSJohn Marino int
gdbarch_return_in_first_hidden_param_p(struct gdbarch * gdbarch,struct type * type)2580*ef5ccd6cSJohn Marino gdbarch_return_in_first_hidden_param_p (struct gdbarch *gdbarch, struct type *type)
2581*ef5ccd6cSJohn Marino {
2582*ef5ccd6cSJohn Marino gdb_assert (gdbarch != NULL);
2583*ef5ccd6cSJohn Marino gdb_assert (gdbarch->return_in_first_hidden_param_p != NULL);
2584*ef5ccd6cSJohn Marino if (gdbarch_debug >= 2)
2585*ef5ccd6cSJohn Marino fprintf_unfiltered (gdb_stdlog, "gdbarch_return_in_first_hidden_param_p called\n");
2586*ef5ccd6cSJohn Marino return gdbarch->return_in_first_hidden_param_p (gdbarch, type);
2587*ef5ccd6cSJohn Marino }
2588*ef5ccd6cSJohn Marino
2589*ef5ccd6cSJohn Marino void
set_gdbarch_return_in_first_hidden_param_p(struct gdbarch * gdbarch,gdbarch_return_in_first_hidden_param_p_ftype return_in_first_hidden_param_p)2590*ef5ccd6cSJohn Marino set_gdbarch_return_in_first_hidden_param_p (struct gdbarch *gdbarch,
2591*ef5ccd6cSJohn Marino gdbarch_return_in_first_hidden_param_p_ftype return_in_first_hidden_param_p)
2592*ef5ccd6cSJohn Marino {
2593*ef5ccd6cSJohn Marino gdbarch->return_in_first_hidden_param_p = return_in_first_hidden_param_p;
2594*ef5ccd6cSJohn Marino }
2595*ef5ccd6cSJohn Marino
25965796c8dcSSimon Schubert CORE_ADDR
gdbarch_skip_prologue(struct gdbarch * gdbarch,CORE_ADDR ip)25975796c8dcSSimon Schubert gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
25985796c8dcSSimon Schubert {
25995796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
26005796c8dcSSimon Schubert gdb_assert (gdbarch->skip_prologue != NULL);
26015796c8dcSSimon Schubert if (gdbarch_debug >= 2)
26025796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
26035796c8dcSSimon Schubert return gdbarch->skip_prologue (gdbarch, ip);
26045796c8dcSSimon Schubert }
26055796c8dcSSimon Schubert
26065796c8dcSSimon Schubert void
set_gdbarch_skip_prologue(struct gdbarch * gdbarch,gdbarch_skip_prologue_ftype skip_prologue)26075796c8dcSSimon Schubert set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
26085796c8dcSSimon Schubert gdbarch_skip_prologue_ftype skip_prologue)
26095796c8dcSSimon Schubert {
26105796c8dcSSimon Schubert gdbarch->skip_prologue = skip_prologue;
26115796c8dcSSimon Schubert }
26125796c8dcSSimon Schubert
26135796c8dcSSimon Schubert int
gdbarch_skip_main_prologue_p(struct gdbarch * gdbarch)26145796c8dcSSimon Schubert gdbarch_skip_main_prologue_p (struct gdbarch *gdbarch)
26155796c8dcSSimon Schubert {
26165796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
26175796c8dcSSimon Schubert return gdbarch->skip_main_prologue != NULL;
26185796c8dcSSimon Schubert }
26195796c8dcSSimon Schubert
26205796c8dcSSimon Schubert CORE_ADDR
gdbarch_skip_main_prologue(struct gdbarch * gdbarch,CORE_ADDR ip)26215796c8dcSSimon Schubert gdbarch_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
26225796c8dcSSimon Schubert {
26235796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
26245796c8dcSSimon Schubert gdb_assert (gdbarch->skip_main_prologue != NULL);
26255796c8dcSSimon Schubert if (gdbarch_debug >= 2)
26265796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_main_prologue called\n");
26275796c8dcSSimon Schubert return gdbarch->skip_main_prologue (gdbarch, ip);
26285796c8dcSSimon Schubert }
26295796c8dcSSimon Schubert
26305796c8dcSSimon Schubert void
set_gdbarch_skip_main_prologue(struct gdbarch * gdbarch,gdbarch_skip_main_prologue_ftype skip_main_prologue)26315796c8dcSSimon Schubert set_gdbarch_skip_main_prologue (struct gdbarch *gdbarch,
26325796c8dcSSimon Schubert gdbarch_skip_main_prologue_ftype skip_main_prologue)
26335796c8dcSSimon Schubert {
26345796c8dcSSimon Schubert gdbarch->skip_main_prologue = skip_main_prologue;
26355796c8dcSSimon Schubert }
26365796c8dcSSimon Schubert
26375796c8dcSSimon Schubert int
gdbarch_inner_than(struct gdbarch * gdbarch,CORE_ADDR lhs,CORE_ADDR rhs)26385796c8dcSSimon Schubert gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
26395796c8dcSSimon Schubert {
26405796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
26415796c8dcSSimon Schubert gdb_assert (gdbarch->inner_than != NULL);
26425796c8dcSSimon Schubert if (gdbarch_debug >= 2)
26435796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
26445796c8dcSSimon Schubert return gdbarch->inner_than (lhs, rhs);
26455796c8dcSSimon Schubert }
26465796c8dcSSimon Schubert
26475796c8dcSSimon Schubert void
set_gdbarch_inner_than(struct gdbarch * gdbarch,gdbarch_inner_than_ftype inner_than)26485796c8dcSSimon Schubert set_gdbarch_inner_than (struct gdbarch *gdbarch,
26495796c8dcSSimon Schubert gdbarch_inner_than_ftype inner_than)
26505796c8dcSSimon Schubert {
26515796c8dcSSimon Schubert gdbarch->inner_than = inner_than;
26525796c8dcSSimon Schubert }
26535796c8dcSSimon Schubert
26545796c8dcSSimon Schubert const gdb_byte *
gdbarch_breakpoint_from_pc(struct gdbarch * gdbarch,CORE_ADDR * pcptr,int * lenptr)26555796c8dcSSimon Schubert gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
26565796c8dcSSimon Schubert {
26575796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
26585796c8dcSSimon Schubert gdb_assert (gdbarch->breakpoint_from_pc != NULL);
26595796c8dcSSimon Schubert if (gdbarch_debug >= 2)
26605796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
26615796c8dcSSimon Schubert return gdbarch->breakpoint_from_pc (gdbarch, pcptr, lenptr);
26625796c8dcSSimon Schubert }
26635796c8dcSSimon Schubert
26645796c8dcSSimon Schubert void
set_gdbarch_breakpoint_from_pc(struct gdbarch * gdbarch,gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)26655796c8dcSSimon Schubert set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
26665796c8dcSSimon Schubert gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
26675796c8dcSSimon Schubert {
26685796c8dcSSimon Schubert gdbarch->breakpoint_from_pc = breakpoint_from_pc;
26695796c8dcSSimon Schubert }
26705796c8dcSSimon Schubert
2671cf7f2e2dSJohn Marino void
gdbarch_remote_breakpoint_from_pc(struct gdbarch * gdbarch,CORE_ADDR * pcptr,int * kindptr)2672cf7f2e2dSJohn Marino gdbarch_remote_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *kindptr)
2673cf7f2e2dSJohn Marino {
2674cf7f2e2dSJohn Marino gdb_assert (gdbarch != NULL);
2675cf7f2e2dSJohn Marino gdb_assert (gdbarch->remote_breakpoint_from_pc != NULL);
2676cf7f2e2dSJohn Marino if (gdbarch_debug >= 2)
2677cf7f2e2dSJohn Marino fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_breakpoint_from_pc called\n");
2678cf7f2e2dSJohn Marino gdbarch->remote_breakpoint_from_pc (gdbarch, pcptr, kindptr);
2679cf7f2e2dSJohn Marino }
2680cf7f2e2dSJohn Marino
2681cf7f2e2dSJohn Marino void
set_gdbarch_remote_breakpoint_from_pc(struct gdbarch * gdbarch,gdbarch_remote_breakpoint_from_pc_ftype remote_breakpoint_from_pc)2682cf7f2e2dSJohn Marino set_gdbarch_remote_breakpoint_from_pc (struct gdbarch *gdbarch,
2683cf7f2e2dSJohn Marino gdbarch_remote_breakpoint_from_pc_ftype remote_breakpoint_from_pc)
2684cf7f2e2dSJohn Marino {
2685cf7f2e2dSJohn Marino gdbarch->remote_breakpoint_from_pc = remote_breakpoint_from_pc;
2686cf7f2e2dSJohn Marino }
2687cf7f2e2dSJohn Marino
26885796c8dcSSimon Schubert int
gdbarch_adjust_breakpoint_address_p(struct gdbarch * gdbarch)26895796c8dcSSimon Schubert gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch)
26905796c8dcSSimon Schubert {
26915796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
26925796c8dcSSimon Schubert return gdbarch->adjust_breakpoint_address != NULL;
26935796c8dcSSimon Schubert }
26945796c8dcSSimon Schubert
26955796c8dcSSimon Schubert CORE_ADDR
gdbarch_adjust_breakpoint_address(struct gdbarch * gdbarch,CORE_ADDR bpaddr)26965796c8dcSSimon Schubert gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr)
26975796c8dcSSimon Schubert {
26985796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
26995796c8dcSSimon Schubert gdb_assert (gdbarch->adjust_breakpoint_address != NULL);
27005796c8dcSSimon Schubert if (gdbarch_debug >= 2)
27015796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_breakpoint_address called\n");
27025796c8dcSSimon Schubert return gdbarch->adjust_breakpoint_address (gdbarch, bpaddr);
27035796c8dcSSimon Schubert }
27045796c8dcSSimon Schubert
27055796c8dcSSimon Schubert void
set_gdbarch_adjust_breakpoint_address(struct gdbarch * gdbarch,gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address)27065796c8dcSSimon Schubert set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch,
27075796c8dcSSimon Schubert gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address)
27085796c8dcSSimon Schubert {
27095796c8dcSSimon Schubert gdbarch->adjust_breakpoint_address = adjust_breakpoint_address;
27105796c8dcSSimon Schubert }
27115796c8dcSSimon Schubert
27125796c8dcSSimon Schubert int
gdbarch_memory_insert_breakpoint(struct gdbarch * gdbarch,struct bp_target_info * bp_tgt)27135796c8dcSSimon Schubert gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
27145796c8dcSSimon Schubert {
27155796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
27165796c8dcSSimon Schubert gdb_assert (gdbarch->memory_insert_breakpoint != NULL);
27175796c8dcSSimon Schubert if (gdbarch_debug >= 2)
27185796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
27195796c8dcSSimon Schubert return gdbarch->memory_insert_breakpoint (gdbarch, bp_tgt);
27205796c8dcSSimon Schubert }
27215796c8dcSSimon Schubert
27225796c8dcSSimon Schubert void
set_gdbarch_memory_insert_breakpoint(struct gdbarch * gdbarch,gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)27235796c8dcSSimon Schubert set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
27245796c8dcSSimon Schubert gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
27255796c8dcSSimon Schubert {
27265796c8dcSSimon Schubert gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
27275796c8dcSSimon Schubert }
27285796c8dcSSimon Schubert
27295796c8dcSSimon Schubert int
gdbarch_memory_remove_breakpoint(struct gdbarch * gdbarch,struct bp_target_info * bp_tgt)27305796c8dcSSimon Schubert gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
27315796c8dcSSimon Schubert {
27325796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
27335796c8dcSSimon Schubert gdb_assert (gdbarch->memory_remove_breakpoint != NULL);
27345796c8dcSSimon Schubert if (gdbarch_debug >= 2)
27355796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
27365796c8dcSSimon Schubert return gdbarch->memory_remove_breakpoint (gdbarch, bp_tgt);
27375796c8dcSSimon Schubert }
27385796c8dcSSimon Schubert
27395796c8dcSSimon Schubert void
set_gdbarch_memory_remove_breakpoint(struct gdbarch * gdbarch,gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)27405796c8dcSSimon Schubert set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
27415796c8dcSSimon Schubert gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
27425796c8dcSSimon Schubert {
27435796c8dcSSimon Schubert gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
27445796c8dcSSimon Schubert }
27455796c8dcSSimon Schubert
27465796c8dcSSimon Schubert CORE_ADDR
gdbarch_decr_pc_after_break(struct gdbarch * gdbarch)27475796c8dcSSimon Schubert gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
27485796c8dcSSimon Schubert {
27495796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
27505796c8dcSSimon Schubert /* Skip verify of decr_pc_after_break, invalid_p == 0 */
27515796c8dcSSimon Schubert if (gdbarch_debug >= 2)
27525796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
27535796c8dcSSimon Schubert return gdbarch->decr_pc_after_break;
27545796c8dcSSimon Schubert }
27555796c8dcSSimon Schubert
27565796c8dcSSimon Schubert void
set_gdbarch_decr_pc_after_break(struct gdbarch * gdbarch,CORE_ADDR decr_pc_after_break)27575796c8dcSSimon Schubert set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
27585796c8dcSSimon Schubert CORE_ADDR decr_pc_after_break)
27595796c8dcSSimon Schubert {
27605796c8dcSSimon Schubert gdbarch->decr_pc_after_break = decr_pc_after_break;
27615796c8dcSSimon Schubert }
27625796c8dcSSimon Schubert
27635796c8dcSSimon Schubert CORE_ADDR
gdbarch_deprecated_function_start_offset(struct gdbarch * gdbarch)27645796c8dcSSimon Schubert gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch)
27655796c8dcSSimon Schubert {
27665796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
27675796c8dcSSimon Schubert /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
27685796c8dcSSimon Schubert if (gdbarch_debug >= 2)
27695796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_function_start_offset called\n");
27705796c8dcSSimon Schubert return gdbarch->deprecated_function_start_offset;
27715796c8dcSSimon Schubert }
27725796c8dcSSimon Schubert
27735796c8dcSSimon Schubert void
set_gdbarch_deprecated_function_start_offset(struct gdbarch * gdbarch,CORE_ADDR deprecated_function_start_offset)27745796c8dcSSimon Schubert set_gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch,
27755796c8dcSSimon Schubert CORE_ADDR deprecated_function_start_offset)
27765796c8dcSSimon Schubert {
27775796c8dcSSimon Schubert gdbarch->deprecated_function_start_offset = deprecated_function_start_offset;
27785796c8dcSSimon Schubert }
27795796c8dcSSimon Schubert
27805796c8dcSSimon Schubert int
gdbarch_remote_register_number(struct gdbarch * gdbarch,int regno)27815796c8dcSSimon Schubert gdbarch_remote_register_number (struct gdbarch *gdbarch, int regno)
27825796c8dcSSimon Schubert {
27835796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
27845796c8dcSSimon Schubert gdb_assert (gdbarch->remote_register_number != NULL);
27855796c8dcSSimon Schubert if (gdbarch_debug >= 2)
27865796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_register_number called\n");
27875796c8dcSSimon Schubert return gdbarch->remote_register_number (gdbarch, regno);
27885796c8dcSSimon Schubert }
27895796c8dcSSimon Schubert
27905796c8dcSSimon Schubert void
set_gdbarch_remote_register_number(struct gdbarch * gdbarch,gdbarch_remote_register_number_ftype remote_register_number)27915796c8dcSSimon Schubert set_gdbarch_remote_register_number (struct gdbarch *gdbarch,
27925796c8dcSSimon Schubert gdbarch_remote_register_number_ftype remote_register_number)
27935796c8dcSSimon Schubert {
27945796c8dcSSimon Schubert gdbarch->remote_register_number = remote_register_number;
27955796c8dcSSimon Schubert }
27965796c8dcSSimon Schubert
27975796c8dcSSimon Schubert int
gdbarch_fetch_tls_load_module_address_p(struct gdbarch * gdbarch)27985796c8dcSSimon Schubert gdbarch_fetch_tls_load_module_address_p (struct gdbarch *gdbarch)
27995796c8dcSSimon Schubert {
28005796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
28015796c8dcSSimon Schubert return gdbarch->fetch_tls_load_module_address != NULL;
28025796c8dcSSimon Schubert }
28035796c8dcSSimon Schubert
28045796c8dcSSimon Schubert CORE_ADDR
gdbarch_fetch_tls_load_module_address(struct gdbarch * gdbarch,struct objfile * objfile)28055796c8dcSSimon Schubert gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch, struct objfile *objfile)
28065796c8dcSSimon Schubert {
28075796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
28085796c8dcSSimon Schubert gdb_assert (gdbarch->fetch_tls_load_module_address != NULL);
28095796c8dcSSimon Schubert if (gdbarch_debug >= 2)
28105796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_tls_load_module_address called\n");
28115796c8dcSSimon Schubert return gdbarch->fetch_tls_load_module_address (objfile);
28125796c8dcSSimon Schubert }
28135796c8dcSSimon Schubert
28145796c8dcSSimon Schubert void
set_gdbarch_fetch_tls_load_module_address(struct gdbarch * gdbarch,gdbarch_fetch_tls_load_module_address_ftype fetch_tls_load_module_address)28155796c8dcSSimon Schubert set_gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch,
28165796c8dcSSimon Schubert gdbarch_fetch_tls_load_module_address_ftype fetch_tls_load_module_address)
28175796c8dcSSimon Schubert {
28185796c8dcSSimon Schubert gdbarch->fetch_tls_load_module_address = fetch_tls_load_module_address;
28195796c8dcSSimon Schubert }
28205796c8dcSSimon Schubert
28215796c8dcSSimon Schubert CORE_ADDR
gdbarch_frame_args_skip(struct gdbarch * gdbarch)28225796c8dcSSimon Schubert gdbarch_frame_args_skip (struct gdbarch *gdbarch)
28235796c8dcSSimon Schubert {
28245796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
28255796c8dcSSimon Schubert /* Skip verify of frame_args_skip, invalid_p == 0 */
28265796c8dcSSimon Schubert if (gdbarch_debug >= 2)
28275796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
28285796c8dcSSimon Schubert return gdbarch->frame_args_skip;
28295796c8dcSSimon Schubert }
28305796c8dcSSimon Schubert
28315796c8dcSSimon Schubert void
set_gdbarch_frame_args_skip(struct gdbarch * gdbarch,CORE_ADDR frame_args_skip)28325796c8dcSSimon Schubert set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
28335796c8dcSSimon Schubert CORE_ADDR frame_args_skip)
28345796c8dcSSimon Schubert {
28355796c8dcSSimon Schubert gdbarch->frame_args_skip = frame_args_skip;
28365796c8dcSSimon Schubert }
28375796c8dcSSimon Schubert
28385796c8dcSSimon Schubert int
gdbarch_unwind_pc_p(struct gdbarch * gdbarch)28395796c8dcSSimon Schubert gdbarch_unwind_pc_p (struct gdbarch *gdbarch)
28405796c8dcSSimon Schubert {
28415796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
28425796c8dcSSimon Schubert return gdbarch->unwind_pc != NULL;
28435796c8dcSSimon Schubert }
28445796c8dcSSimon Schubert
28455796c8dcSSimon Schubert CORE_ADDR
gdbarch_unwind_pc(struct gdbarch * gdbarch,struct frame_info * next_frame)28465796c8dcSSimon Schubert gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
28475796c8dcSSimon Schubert {
28485796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
28495796c8dcSSimon Schubert gdb_assert (gdbarch->unwind_pc != NULL);
28505796c8dcSSimon Schubert if (gdbarch_debug >= 2)
28515796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n");
28525796c8dcSSimon Schubert return gdbarch->unwind_pc (gdbarch, next_frame);
28535796c8dcSSimon Schubert }
28545796c8dcSSimon Schubert
28555796c8dcSSimon Schubert void
set_gdbarch_unwind_pc(struct gdbarch * gdbarch,gdbarch_unwind_pc_ftype unwind_pc)28565796c8dcSSimon Schubert set_gdbarch_unwind_pc (struct gdbarch *gdbarch,
28575796c8dcSSimon Schubert gdbarch_unwind_pc_ftype unwind_pc)
28585796c8dcSSimon Schubert {
28595796c8dcSSimon Schubert gdbarch->unwind_pc = unwind_pc;
28605796c8dcSSimon Schubert }
28615796c8dcSSimon Schubert
28625796c8dcSSimon Schubert int
gdbarch_unwind_sp_p(struct gdbarch * gdbarch)28635796c8dcSSimon Schubert gdbarch_unwind_sp_p (struct gdbarch *gdbarch)
28645796c8dcSSimon Schubert {
28655796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
28665796c8dcSSimon Schubert return gdbarch->unwind_sp != NULL;
28675796c8dcSSimon Schubert }
28685796c8dcSSimon Schubert
28695796c8dcSSimon Schubert CORE_ADDR
gdbarch_unwind_sp(struct gdbarch * gdbarch,struct frame_info * next_frame)28705796c8dcSSimon Schubert gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
28715796c8dcSSimon Schubert {
28725796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
28735796c8dcSSimon Schubert gdb_assert (gdbarch->unwind_sp != NULL);
28745796c8dcSSimon Schubert if (gdbarch_debug >= 2)
28755796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_sp called\n");
28765796c8dcSSimon Schubert return gdbarch->unwind_sp (gdbarch, next_frame);
28775796c8dcSSimon Schubert }
28785796c8dcSSimon Schubert
28795796c8dcSSimon Schubert void
set_gdbarch_unwind_sp(struct gdbarch * gdbarch,gdbarch_unwind_sp_ftype unwind_sp)28805796c8dcSSimon Schubert set_gdbarch_unwind_sp (struct gdbarch *gdbarch,
28815796c8dcSSimon Schubert gdbarch_unwind_sp_ftype unwind_sp)
28825796c8dcSSimon Schubert {
28835796c8dcSSimon Schubert gdbarch->unwind_sp = unwind_sp;
28845796c8dcSSimon Schubert }
28855796c8dcSSimon Schubert
28865796c8dcSSimon Schubert int
gdbarch_frame_num_args_p(struct gdbarch * gdbarch)28875796c8dcSSimon Schubert gdbarch_frame_num_args_p (struct gdbarch *gdbarch)
28885796c8dcSSimon Schubert {
28895796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
28905796c8dcSSimon Schubert return gdbarch->frame_num_args != NULL;
28915796c8dcSSimon Schubert }
28925796c8dcSSimon Schubert
28935796c8dcSSimon Schubert int
gdbarch_frame_num_args(struct gdbarch * gdbarch,struct frame_info * frame)28945796c8dcSSimon Schubert gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
28955796c8dcSSimon Schubert {
28965796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
28975796c8dcSSimon Schubert gdb_assert (gdbarch->frame_num_args != NULL);
28985796c8dcSSimon Schubert if (gdbarch_debug >= 2)
28995796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
29005796c8dcSSimon Schubert return gdbarch->frame_num_args (frame);
29015796c8dcSSimon Schubert }
29025796c8dcSSimon Schubert
29035796c8dcSSimon Schubert void
set_gdbarch_frame_num_args(struct gdbarch * gdbarch,gdbarch_frame_num_args_ftype frame_num_args)29045796c8dcSSimon Schubert set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
29055796c8dcSSimon Schubert gdbarch_frame_num_args_ftype frame_num_args)
29065796c8dcSSimon Schubert {
29075796c8dcSSimon Schubert gdbarch->frame_num_args = frame_num_args;
29085796c8dcSSimon Schubert }
29095796c8dcSSimon Schubert
29105796c8dcSSimon Schubert int
gdbarch_frame_align_p(struct gdbarch * gdbarch)29115796c8dcSSimon Schubert gdbarch_frame_align_p (struct gdbarch *gdbarch)
29125796c8dcSSimon Schubert {
29135796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
29145796c8dcSSimon Schubert return gdbarch->frame_align != NULL;
29155796c8dcSSimon Schubert }
29165796c8dcSSimon Schubert
29175796c8dcSSimon Schubert CORE_ADDR
gdbarch_frame_align(struct gdbarch * gdbarch,CORE_ADDR address)29185796c8dcSSimon Schubert gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
29195796c8dcSSimon Schubert {
29205796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
29215796c8dcSSimon Schubert gdb_assert (gdbarch->frame_align != NULL);
29225796c8dcSSimon Schubert if (gdbarch_debug >= 2)
29235796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
29245796c8dcSSimon Schubert return gdbarch->frame_align (gdbarch, address);
29255796c8dcSSimon Schubert }
29265796c8dcSSimon Schubert
29275796c8dcSSimon Schubert void
set_gdbarch_frame_align(struct gdbarch * gdbarch,gdbarch_frame_align_ftype frame_align)29285796c8dcSSimon Schubert set_gdbarch_frame_align (struct gdbarch *gdbarch,
29295796c8dcSSimon Schubert gdbarch_frame_align_ftype frame_align)
29305796c8dcSSimon Schubert {
29315796c8dcSSimon Schubert gdbarch->frame_align = frame_align;
29325796c8dcSSimon Schubert }
29335796c8dcSSimon Schubert
29345796c8dcSSimon Schubert int
gdbarch_stabs_argument_has_addr(struct gdbarch * gdbarch,struct type * type)29355796c8dcSSimon Schubert gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type)
29365796c8dcSSimon Schubert {
29375796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
29385796c8dcSSimon Schubert gdb_assert (gdbarch->stabs_argument_has_addr != NULL);
29395796c8dcSSimon Schubert if (gdbarch_debug >= 2)
29405796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_stabs_argument_has_addr called\n");
29415796c8dcSSimon Schubert return gdbarch->stabs_argument_has_addr (gdbarch, type);
29425796c8dcSSimon Schubert }
29435796c8dcSSimon Schubert
29445796c8dcSSimon Schubert void
set_gdbarch_stabs_argument_has_addr(struct gdbarch * gdbarch,gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr)29455796c8dcSSimon Schubert set_gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch,
29465796c8dcSSimon Schubert gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr)
29475796c8dcSSimon Schubert {
29485796c8dcSSimon Schubert gdbarch->stabs_argument_has_addr = stabs_argument_has_addr;
29495796c8dcSSimon Schubert }
29505796c8dcSSimon Schubert
29515796c8dcSSimon Schubert int
gdbarch_frame_red_zone_size(struct gdbarch * gdbarch)29525796c8dcSSimon Schubert gdbarch_frame_red_zone_size (struct gdbarch *gdbarch)
29535796c8dcSSimon Schubert {
29545796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
29555796c8dcSSimon Schubert if (gdbarch_debug >= 2)
29565796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_red_zone_size called\n");
29575796c8dcSSimon Schubert return gdbarch->frame_red_zone_size;
29585796c8dcSSimon Schubert }
29595796c8dcSSimon Schubert
29605796c8dcSSimon Schubert void
set_gdbarch_frame_red_zone_size(struct gdbarch * gdbarch,int frame_red_zone_size)29615796c8dcSSimon Schubert set_gdbarch_frame_red_zone_size (struct gdbarch *gdbarch,
29625796c8dcSSimon Schubert int frame_red_zone_size)
29635796c8dcSSimon Schubert {
29645796c8dcSSimon Schubert gdbarch->frame_red_zone_size = frame_red_zone_size;
29655796c8dcSSimon Schubert }
29665796c8dcSSimon Schubert
29675796c8dcSSimon Schubert CORE_ADDR
gdbarch_convert_from_func_ptr_addr(struct gdbarch * gdbarch,CORE_ADDR addr,struct target_ops * targ)29685796c8dcSSimon Schubert gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
29695796c8dcSSimon Schubert {
29705796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
29715796c8dcSSimon Schubert gdb_assert (gdbarch->convert_from_func_ptr_addr != NULL);
29725796c8dcSSimon Schubert if (gdbarch_debug >= 2)
29735796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
29745796c8dcSSimon Schubert return gdbarch->convert_from_func_ptr_addr (gdbarch, addr, targ);
29755796c8dcSSimon Schubert }
29765796c8dcSSimon Schubert
29775796c8dcSSimon Schubert void
set_gdbarch_convert_from_func_ptr_addr(struct gdbarch * gdbarch,gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)29785796c8dcSSimon Schubert set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
29795796c8dcSSimon Schubert gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
29805796c8dcSSimon Schubert {
29815796c8dcSSimon Schubert gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
29825796c8dcSSimon Schubert }
29835796c8dcSSimon Schubert
29845796c8dcSSimon Schubert CORE_ADDR
gdbarch_addr_bits_remove(struct gdbarch * gdbarch,CORE_ADDR addr)29855796c8dcSSimon Schubert gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
29865796c8dcSSimon Schubert {
29875796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
29885796c8dcSSimon Schubert gdb_assert (gdbarch->addr_bits_remove != NULL);
29895796c8dcSSimon Schubert if (gdbarch_debug >= 2)
29905796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
29915796c8dcSSimon Schubert return gdbarch->addr_bits_remove (gdbarch, addr);
29925796c8dcSSimon Schubert }
29935796c8dcSSimon Schubert
29945796c8dcSSimon Schubert void
set_gdbarch_addr_bits_remove(struct gdbarch * gdbarch,gdbarch_addr_bits_remove_ftype addr_bits_remove)29955796c8dcSSimon Schubert set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
29965796c8dcSSimon Schubert gdbarch_addr_bits_remove_ftype addr_bits_remove)
29975796c8dcSSimon Schubert {
29985796c8dcSSimon Schubert gdbarch->addr_bits_remove = addr_bits_remove;
29995796c8dcSSimon Schubert }
30005796c8dcSSimon Schubert
30015796c8dcSSimon Schubert int
gdbarch_software_single_step_p(struct gdbarch * gdbarch)30025796c8dcSSimon Schubert gdbarch_software_single_step_p (struct gdbarch *gdbarch)
30035796c8dcSSimon Schubert {
30045796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
30055796c8dcSSimon Schubert return gdbarch->software_single_step != NULL;
30065796c8dcSSimon Schubert }
30075796c8dcSSimon Schubert
30085796c8dcSSimon Schubert int
gdbarch_software_single_step(struct gdbarch * gdbarch,struct frame_info * frame)30095796c8dcSSimon Schubert gdbarch_software_single_step (struct gdbarch *gdbarch, struct frame_info *frame)
30105796c8dcSSimon Schubert {
30115796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
30125796c8dcSSimon Schubert gdb_assert (gdbarch->software_single_step != NULL);
30135796c8dcSSimon Schubert if (gdbarch_debug >= 2)
30145796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
30155796c8dcSSimon Schubert return gdbarch->software_single_step (frame);
30165796c8dcSSimon Schubert }
30175796c8dcSSimon Schubert
30185796c8dcSSimon Schubert void
set_gdbarch_software_single_step(struct gdbarch * gdbarch,gdbarch_software_single_step_ftype software_single_step)30195796c8dcSSimon Schubert set_gdbarch_software_single_step (struct gdbarch *gdbarch,
30205796c8dcSSimon Schubert gdbarch_software_single_step_ftype software_single_step)
30215796c8dcSSimon Schubert {
30225796c8dcSSimon Schubert gdbarch->software_single_step = software_single_step;
30235796c8dcSSimon Schubert }
30245796c8dcSSimon Schubert
30255796c8dcSSimon Schubert int
gdbarch_single_step_through_delay_p(struct gdbarch * gdbarch)30265796c8dcSSimon Schubert gdbarch_single_step_through_delay_p (struct gdbarch *gdbarch)
30275796c8dcSSimon Schubert {
30285796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
30295796c8dcSSimon Schubert return gdbarch->single_step_through_delay != NULL;
30305796c8dcSSimon Schubert }
30315796c8dcSSimon Schubert
30325796c8dcSSimon Schubert int
gdbarch_single_step_through_delay(struct gdbarch * gdbarch,struct frame_info * frame)30335796c8dcSSimon Schubert gdbarch_single_step_through_delay (struct gdbarch *gdbarch, struct frame_info *frame)
30345796c8dcSSimon Schubert {
30355796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
30365796c8dcSSimon Schubert gdb_assert (gdbarch->single_step_through_delay != NULL);
30375796c8dcSSimon Schubert if (gdbarch_debug >= 2)
30385796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_single_step_through_delay called\n");
30395796c8dcSSimon Schubert return gdbarch->single_step_through_delay (gdbarch, frame);
30405796c8dcSSimon Schubert }
30415796c8dcSSimon Schubert
30425796c8dcSSimon Schubert void
set_gdbarch_single_step_through_delay(struct gdbarch * gdbarch,gdbarch_single_step_through_delay_ftype single_step_through_delay)30435796c8dcSSimon Schubert set_gdbarch_single_step_through_delay (struct gdbarch *gdbarch,
30445796c8dcSSimon Schubert gdbarch_single_step_through_delay_ftype single_step_through_delay)
30455796c8dcSSimon Schubert {
30465796c8dcSSimon Schubert gdbarch->single_step_through_delay = single_step_through_delay;
30475796c8dcSSimon Schubert }
30485796c8dcSSimon Schubert
30495796c8dcSSimon Schubert int
gdbarch_print_insn(struct gdbarch * gdbarch,bfd_vma vma,struct disassemble_info * info)30505796c8dcSSimon Schubert gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info)
30515796c8dcSSimon Schubert {
30525796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
30535796c8dcSSimon Schubert gdb_assert (gdbarch->print_insn != NULL);
30545796c8dcSSimon Schubert if (gdbarch_debug >= 2)
30555796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
30565796c8dcSSimon Schubert return gdbarch->print_insn (vma, info);
30575796c8dcSSimon Schubert }
30585796c8dcSSimon Schubert
30595796c8dcSSimon Schubert void
set_gdbarch_print_insn(struct gdbarch * gdbarch,gdbarch_print_insn_ftype print_insn)30605796c8dcSSimon Schubert set_gdbarch_print_insn (struct gdbarch *gdbarch,
30615796c8dcSSimon Schubert gdbarch_print_insn_ftype print_insn)
30625796c8dcSSimon Schubert {
30635796c8dcSSimon Schubert gdbarch->print_insn = print_insn;
30645796c8dcSSimon Schubert }
30655796c8dcSSimon Schubert
30665796c8dcSSimon Schubert CORE_ADDR
gdbarch_skip_trampoline_code(struct gdbarch * gdbarch,struct frame_info * frame,CORE_ADDR pc)30675796c8dcSSimon Schubert gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR pc)
30685796c8dcSSimon Schubert {
30695796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
30705796c8dcSSimon Schubert gdb_assert (gdbarch->skip_trampoline_code != NULL);
30715796c8dcSSimon Schubert if (gdbarch_debug >= 2)
30725796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
30735796c8dcSSimon Schubert return gdbarch->skip_trampoline_code (frame, pc);
30745796c8dcSSimon Schubert }
30755796c8dcSSimon Schubert
30765796c8dcSSimon Schubert void
set_gdbarch_skip_trampoline_code(struct gdbarch * gdbarch,gdbarch_skip_trampoline_code_ftype skip_trampoline_code)30775796c8dcSSimon Schubert set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
30785796c8dcSSimon Schubert gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
30795796c8dcSSimon Schubert {
30805796c8dcSSimon Schubert gdbarch->skip_trampoline_code = skip_trampoline_code;
30815796c8dcSSimon Schubert }
30825796c8dcSSimon Schubert
30835796c8dcSSimon Schubert CORE_ADDR
gdbarch_skip_solib_resolver(struct gdbarch * gdbarch,CORE_ADDR pc)30845796c8dcSSimon Schubert gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
30855796c8dcSSimon Schubert {
30865796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
30875796c8dcSSimon Schubert gdb_assert (gdbarch->skip_solib_resolver != NULL);
30885796c8dcSSimon Schubert if (gdbarch_debug >= 2)
30895796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_solib_resolver called\n");
30905796c8dcSSimon Schubert return gdbarch->skip_solib_resolver (gdbarch, pc);
30915796c8dcSSimon Schubert }
30925796c8dcSSimon Schubert
30935796c8dcSSimon Schubert void
set_gdbarch_skip_solib_resolver(struct gdbarch * gdbarch,gdbarch_skip_solib_resolver_ftype skip_solib_resolver)30945796c8dcSSimon Schubert set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch,
30955796c8dcSSimon Schubert gdbarch_skip_solib_resolver_ftype skip_solib_resolver)
30965796c8dcSSimon Schubert {
30975796c8dcSSimon Schubert gdbarch->skip_solib_resolver = skip_solib_resolver;
30985796c8dcSSimon Schubert }
30995796c8dcSSimon Schubert
31005796c8dcSSimon Schubert int
gdbarch_in_solib_return_trampoline(struct gdbarch * gdbarch,CORE_ADDR pc,const char * name)3101*ef5ccd6cSJohn Marino gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, const char *name)
31025796c8dcSSimon Schubert {
31035796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
31045796c8dcSSimon Schubert gdb_assert (gdbarch->in_solib_return_trampoline != NULL);
31055796c8dcSSimon Schubert if (gdbarch_debug >= 2)
31065796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
31075796c8dcSSimon Schubert return gdbarch->in_solib_return_trampoline (gdbarch, pc, name);
31085796c8dcSSimon Schubert }
31095796c8dcSSimon Schubert
31105796c8dcSSimon Schubert void
set_gdbarch_in_solib_return_trampoline(struct gdbarch * gdbarch,gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)31115796c8dcSSimon Schubert set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
31125796c8dcSSimon Schubert gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
31135796c8dcSSimon Schubert {
31145796c8dcSSimon Schubert gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
31155796c8dcSSimon Schubert }
31165796c8dcSSimon Schubert
31175796c8dcSSimon Schubert int
gdbarch_in_function_epilogue_p(struct gdbarch * gdbarch,CORE_ADDR addr)31185796c8dcSSimon Schubert gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
31195796c8dcSSimon Schubert {
31205796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
31215796c8dcSSimon Schubert gdb_assert (gdbarch->in_function_epilogue_p != NULL);
31225796c8dcSSimon Schubert if (gdbarch_debug >= 2)
31235796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n");
31245796c8dcSSimon Schubert return gdbarch->in_function_epilogue_p (gdbarch, addr);
31255796c8dcSSimon Schubert }
31265796c8dcSSimon Schubert
31275796c8dcSSimon Schubert void
set_gdbarch_in_function_epilogue_p(struct gdbarch * gdbarch,gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p)31285796c8dcSSimon Schubert set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch,
31295796c8dcSSimon Schubert gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p)
31305796c8dcSSimon Schubert {
31315796c8dcSSimon Schubert gdbarch->in_function_epilogue_p = in_function_epilogue_p;
31325796c8dcSSimon Schubert }
31335796c8dcSSimon Schubert
31345796c8dcSSimon Schubert void
gdbarch_elf_make_msymbol_special(struct gdbarch * gdbarch,asymbol * sym,struct minimal_symbol * msym)31355796c8dcSSimon Schubert gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
31365796c8dcSSimon Schubert {
31375796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
31385796c8dcSSimon Schubert gdb_assert (gdbarch->elf_make_msymbol_special != NULL);
31395796c8dcSSimon Schubert if (gdbarch_debug >= 2)
31405796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
31415796c8dcSSimon Schubert gdbarch->elf_make_msymbol_special (sym, msym);
31425796c8dcSSimon Schubert }
31435796c8dcSSimon Schubert
31445796c8dcSSimon Schubert void
set_gdbarch_elf_make_msymbol_special(struct gdbarch * gdbarch,gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)31455796c8dcSSimon Schubert set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
31465796c8dcSSimon Schubert gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
31475796c8dcSSimon Schubert {
31485796c8dcSSimon Schubert gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
31495796c8dcSSimon Schubert }
31505796c8dcSSimon Schubert
31515796c8dcSSimon Schubert void
gdbarch_coff_make_msymbol_special(struct gdbarch * gdbarch,int val,struct minimal_symbol * msym)31525796c8dcSSimon Schubert gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
31535796c8dcSSimon Schubert {
31545796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
31555796c8dcSSimon Schubert gdb_assert (gdbarch->coff_make_msymbol_special != NULL);
31565796c8dcSSimon Schubert if (gdbarch_debug >= 2)
31575796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
31585796c8dcSSimon Schubert gdbarch->coff_make_msymbol_special (val, msym);
31595796c8dcSSimon Schubert }
31605796c8dcSSimon Schubert
31615796c8dcSSimon Schubert void
set_gdbarch_coff_make_msymbol_special(struct gdbarch * gdbarch,gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)31625796c8dcSSimon Schubert set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
31635796c8dcSSimon Schubert gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
31645796c8dcSSimon Schubert {
31655796c8dcSSimon Schubert gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
31665796c8dcSSimon Schubert }
31675796c8dcSSimon Schubert
31685796c8dcSSimon Schubert int
gdbarch_cannot_step_breakpoint(struct gdbarch * gdbarch)31695796c8dcSSimon Schubert gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
31705796c8dcSSimon Schubert {
31715796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
31725796c8dcSSimon Schubert /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
31735796c8dcSSimon Schubert if (gdbarch_debug >= 2)
31745796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
31755796c8dcSSimon Schubert return gdbarch->cannot_step_breakpoint;
31765796c8dcSSimon Schubert }
31775796c8dcSSimon Schubert
31785796c8dcSSimon Schubert void
set_gdbarch_cannot_step_breakpoint(struct gdbarch * gdbarch,int cannot_step_breakpoint)31795796c8dcSSimon Schubert set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
31805796c8dcSSimon Schubert int cannot_step_breakpoint)
31815796c8dcSSimon Schubert {
31825796c8dcSSimon Schubert gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
31835796c8dcSSimon Schubert }
31845796c8dcSSimon Schubert
31855796c8dcSSimon Schubert int
gdbarch_have_nonsteppable_watchpoint(struct gdbarch * gdbarch)31865796c8dcSSimon Schubert gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
31875796c8dcSSimon Schubert {
31885796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
31895796c8dcSSimon Schubert /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
31905796c8dcSSimon Schubert if (gdbarch_debug >= 2)
31915796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
31925796c8dcSSimon Schubert return gdbarch->have_nonsteppable_watchpoint;
31935796c8dcSSimon Schubert }
31945796c8dcSSimon Schubert
31955796c8dcSSimon Schubert void
set_gdbarch_have_nonsteppable_watchpoint(struct gdbarch * gdbarch,int have_nonsteppable_watchpoint)31965796c8dcSSimon Schubert set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
31975796c8dcSSimon Schubert int have_nonsteppable_watchpoint)
31985796c8dcSSimon Schubert {
31995796c8dcSSimon Schubert gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
32005796c8dcSSimon Schubert }
32015796c8dcSSimon Schubert
32025796c8dcSSimon Schubert int
gdbarch_address_class_type_flags_p(struct gdbarch * gdbarch)32035796c8dcSSimon Schubert gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
32045796c8dcSSimon Schubert {
32055796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
32065796c8dcSSimon Schubert return gdbarch->address_class_type_flags != NULL;
32075796c8dcSSimon Schubert }
32085796c8dcSSimon Schubert
32095796c8dcSSimon Schubert int
gdbarch_address_class_type_flags(struct gdbarch * gdbarch,int byte_size,int dwarf2_addr_class)32105796c8dcSSimon Schubert gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
32115796c8dcSSimon Schubert {
32125796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
32135796c8dcSSimon Schubert gdb_assert (gdbarch->address_class_type_flags != NULL);
32145796c8dcSSimon Schubert if (gdbarch_debug >= 2)
32155796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
32165796c8dcSSimon Schubert return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
32175796c8dcSSimon Schubert }
32185796c8dcSSimon Schubert
32195796c8dcSSimon Schubert void
set_gdbarch_address_class_type_flags(struct gdbarch * gdbarch,gdbarch_address_class_type_flags_ftype address_class_type_flags)32205796c8dcSSimon Schubert set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
32215796c8dcSSimon Schubert gdbarch_address_class_type_flags_ftype address_class_type_flags)
32225796c8dcSSimon Schubert {
32235796c8dcSSimon Schubert gdbarch->address_class_type_flags = address_class_type_flags;
32245796c8dcSSimon Schubert }
32255796c8dcSSimon Schubert
32265796c8dcSSimon Schubert int
gdbarch_address_class_type_flags_to_name_p(struct gdbarch * gdbarch)32275796c8dcSSimon Schubert gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
32285796c8dcSSimon Schubert {
32295796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
32305796c8dcSSimon Schubert return gdbarch->address_class_type_flags_to_name != NULL;
32315796c8dcSSimon Schubert }
32325796c8dcSSimon Schubert
32335796c8dcSSimon Schubert const char *
gdbarch_address_class_type_flags_to_name(struct gdbarch * gdbarch,int type_flags)32345796c8dcSSimon Schubert gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
32355796c8dcSSimon Schubert {
32365796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
32375796c8dcSSimon Schubert gdb_assert (gdbarch->address_class_type_flags_to_name != NULL);
32385796c8dcSSimon Schubert if (gdbarch_debug >= 2)
32395796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
32405796c8dcSSimon Schubert return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
32415796c8dcSSimon Schubert }
32425796c8dcSSimon Schubert
32435796c8dcSSimon Schubert void
set_gdbarch_address_class_type_flags_to_name(struct gdbarch * gdbarch,gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)32445796c8dcSSimon Schubert set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
32455796c8dcSSimon Schubert gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
32465796c8dcSSimon Schubert {
32475796c8dcSSimon Schubert gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
32485796c8dcSSimon Schubert }
32495796c8dcSSimon Schubert
32505796c8dcSSimon Schubert int
gdbarch_address_class_name_to_type_flags_p(struct gdbarch * gdbarch)32515796c8dcSSimon Schubert gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
32525796c8dcSSimon Schubert {
32535796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
32545796c8dcSSimon Schubert return gdbarch->address_class_name_to_type_flags != NULL;
32555796c8dcSSimon Schubert }
32565796c8dcSSimon Schubert
32575796c8dcSSimon Schubert int
gdbarch_address_class_name_to_type_flags(struct gdbarch * gdbarch,const char * name,int * type_flags_ptr)32585796c8dcSSimon Schubert gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
32595796c8dcSSimon Schubert {
32605796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
32615796c8dcSSimon Schubert gdb_assert (gdbarch->address_class_name_to_type_flags != NULL);
32625796c8dcSSimon Schubert if (gdbarch_debug >= 2)
32635796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
32645796c8dcSSimon Schubert return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
32655796c8dcSSimon Schubert }
32665796c8dcSSimon Schubert
32675796c8dcSSimon Schubert void
set_gdbarch_address_class_name_to_type_flags(struct gdbarch * gdbarch,gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)32685796c8dcSSimon Schubert set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
32695796c8dcSSimon Schubert gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
32705796c8dcSSimon Schubert {
32715796c8dcSSimon Schubert gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
32725796c8dcSSimon Schubert }
32735796c8dcSSimon Schubert
32745796c8dcSSimon Schubert int
gdbarch_register_reggroup_p(struct gdbarch * gdbarch,int regnum,struct reggroup * reggroup)32755796c8dcSSimon Schubert gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
32765796c8dcSSimon Schubert {
32775796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
32785796c8dcSSimon Schubert gdb_assert (gdbarch->register_reggroup_p != NULL);
32795796c8dcSSimon Schubert if (gdbarch_debug >= 2)
32805796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
32815796c8dcSSimon Schubert return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
32825796c8dcSSimon Schubert }
32835796c8dcSSimon Schubert
32845796c8dcSSimon Schubert void
set_gdbarch_register_reggroup_p(struct gdbarch * gdbarch,gdbarch_register_reggroup_p_ftype register_reggroup_p)32855796c8dcSSimon Schubert set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
32865796c8dcSSimon Schubert gdbarch_register_reggroup_p_ftype register_reggroup_p)
32875796c8dcSSimon Schubert {
32885796c8dcSSimon Schubert gdbarch->register_reggroup_p = register_reggroup_p;
32895796c8dcSSimon Schubert }
32905796c8dcSSimon Schubert
32915796c8dcSSimon Schubert int
gdbarch_fetch_pointer_argument_p(struct gdbarch * gdbarch)32925796c8dcSSimon Schubert gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch)
32935796c8dcSSimon Schubert {
32945796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
32955796c8dcSSimon Schubert return gdbarch->fetch_pointer_argument != NULL;
32965796c8dcSSimon Schubert }
32975796c8dcSSimon Schubert
32985796c8dcSSimon Schubert CORE_ADDR
gdbarch_fetch_pointer_argument(struct gdbarch * gdbarch,struct frame_info * frame,int argi,struct type * type)32995796c8dcSSimon Schubert gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type)
33005796c8dcSSimon Schubert {
33015796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
33025796c8dcSSimon Schubert gdb_assert (gdbarch->fetch_pointer_argument != NULL);
33035796c8dcSSimon Schubert if (gdbarch_debug >= 2)
33045796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n");
33055796c8dcSSimon Schubert return gdbarch->fetch_pointer_argument (frame, argi, type);
33065796c8dcSSimon Schubert }
33075796c8dcSSimon Schubert
33085796c8dcSSimon Schubert void
set_gdbarch_fetch_pointer_argument(struct gdbarch * gdbarch,gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument)33095796c8dcSSimon Schubert set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch,
33105796c8dcSSimon Schubert gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument)
33115796c8dcSSimon Schubert {
33125796c8dcSSimon Schubert gdbarch->fetch_pointer_argument = fetch_pointer_argument;
33135796c8dcSSimon Schubert }
33145796c8dcSSimon Schubert
33155796c8dcSSimon Schubert int
gdbarch_regset_from_core_section_p(struct gdbarch * gdbarch)33165796c8dcSSimon Schubert gdbarch_regset_from_core_section_p (struct gdbarch *gdbarch)
33175796c8dcSSimon Schubert {
33185796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
33195796c8dcSSimon Schubert return gdbarch->regset_from_core_section != NULL;
33205796c8dcSSimon Schubert }
33215796c8dcSSimon Schubert
33225796c8dcSSimon Schubert const struct regset *
gdbarch_regset_from_core_section(struct gdbarch * gdbarch,const char * sect_name,size_t sect_size)33235796c8dcSSimon Schubert gdbarch_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size)
33245796c8dcSSimon Schubert {
33255796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
33265796c8dcSSimon Schubert gdb_assert (gdbarch->regset_from_core_section != NULL);
33275796c8dcSSimon Schubert if (gdbarch_debug >= 2)
33285796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_regset_from_core_section called\n");
33295796c8dcSSimon Schubert return gdbarch->regset_from_core_section (gdbarch, sect_name, sect_size);
33305796c8dcSSimon Schubert }
33315796c8dcSSimon Schubert
33325796c8dcSSimon Schubert void
set_gdbarch_regset_from_core_section(struct gdbarch * gdbarch,gdbarch_regset_from_core_section_ftype regset_from_core_section)33335796c8dcSSimon Schubert set_gdbarch_regset_from_core_section (struct gdbarch *gdbarch,
33345796c8dcSSimon Schubert gdbarch_regset_from_core_section_ftype regset_from_core_section)
33355796c8dcSSimon Schubert {
33365796c8dcSSimon Schubert gdbarch->regset_from_core_section = regset_from_core_section;
33375796c8dcSSimon Schubert }
33385796c8dcSSimon Schubert
33395796c8dcSSimon Schubert struct core_regset_section *
gdbarch_core_regset_sections(struct gdbarch * gdbarch)33405796c8dcSSimon Schubert gdbarch_core_regset_sections (struct gdbarch *gdbarch)
33415796c8dcSSimon Schubert {
33425796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
33435796c8dcSSimon Schubert if (gdbarch_debug >= 2)
33445796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_core_regset_sections called\n");
33455796c8dcSSimon Schubert return gdbarch->core_regset_sections;
33465796c8dcSSimon Schubert }
33475796c8dcSSimon Schubert
33485796c8dcSSimon Schubert void
set_gdbarch_core_regset_sections(struct gdbarch * gdbarch,struct core_regset_section * core_regset_sections)33495796c8dcSSimon Schubert set_gdbarch_core_regset_sections (struct gdbarch *gdbarch,
33505796c8dcSSimon Schubert struct core_regset_section * core_regset_sections)
33515796c8dcSSimon Schubert {
33525796c8dcSSimon Schubert gdbarch->core_regset_sections = core_regset_sections;
33535796c8dcSSimon Schubert }
33545796c8dcSSimon Schubert
33555796c8dcSSimon Schubert int
gdbarch_make_corefile_notes_p(struct gdbarch * gdbarch)3356*ef5ccd6cSJohn Marino gdbarch_make_corefile_notes_p (struct gdbarch *gdbarch)
3357*ef5ccd6cSJohn Marino {
3358*ef5ccd6cSJohn Marino gdb_assert (gdbarch != NULL);
3359*ef5ccd6cSJohn Marino return gdbarch->make_corefile_notes != NULL;
3360*ef5ccd6cSJohn Marino }
3361*ef5ccd6cSJohn Marino
3362*ef5ccd6cSJohn Marino char *
gdbarch_make_corefile_notes(struct gdbarch * gdbarch,bfd * obfd,int * note_size)3363*ef5ccd6cSJohn Marino gdbarch_make_corefile_notes (struct gdbarch *gdbarch, bfd *obfd, int *note_size)
3364*ef5ccd6cSJohn Marino {
3365*ef5ccd6cSJohn Marino gdb_assert (gdbarch != NULL);
3366*ef5ccd6cSJohn Marino gdb_assert (gdbarch->make_corefile_notes != NULL);
3367*ef5ccd6cSJohn Marino if (gdbarch_debug >= 2)
3368*ef5ccd6cSJohn Marino fprintf_unfiltered (gdb_stdlog, "gdbarch_make_corefile_notes called\n");
3369*ef5ccd6cSJohn Marino return gdbarch->make_corefile_notes (gdbarch, obfd, note_size);
3370*ef5ccd6cSJohn Marino }
3371*ef5ccd6cSJohn Marino
3372*ef5ccd6cSJohn Marino void
set_gdbarch_make_corefile_notes(struct gdbarch * gdbarch,gdbarch_make_corefile_notes_ftype make_corefile_notes)3373*ef5ccd6cSJohn Marino set_gdbarch_make_corefile_notes (struct gdbarch *gdbarch,
3374*ef5ccd6cSJohn Marino gdbarch_make_corefile_notes_ftype make_corefile_notes)
3375*ef5ccd6cSJohn Marino {
3376*ef5ccd6cSJohn Marino gdbarch->make_corefile_notes = make_corefile_notes;
3377*ef5ccd6cSJohn Marino }
3378*ef5ccd6cSJohn Marino
3379*ef5ccd6cSJohn Marino int
gdbarch_elfcore_write_linux_prpsinfo_p(struct gdbarch * gdbarch)3380*ef5ccd6cSJohn Marino gdbarch_elfcore_write_linux_prpsinfo_p (struct gdbarch *gdbarch)
3381*ef5ccd6cSJohn Marino {
3382*ef5ccd6cSJohn Marino gdb_assert (gdbarch != NULL);
3383*ef5ccd6cSJohn Marino return gdbarch->elfcore_write_linux_prpsinfo != NULL;
3384*ef5ccd6cSJohn Marino }
3385*ef5ccd6cSJohn Marino
3386*ef5ccd6cSJohn Marino char *
gdbarch_elfcore_write_linux_prpsinfo(struct gdbarch * gdbarch,bfd * obfd,char * note_data,int * note_size,const struct elf_internal_linux_prpsinfo * info)3387*ef5ccd6cSJohn Marino gdbarch_elfcore_write_linux_prpsinfo (struct gdbarch *gdbarch, bfd *obfd, char *note_data, int *note_size, const struct elf_internal_linux_prpsinfo *info)
3388*ef5ccd6cSJohn Marino {
3389*ef5ccd6cSJohn Marino gdb_assert (gdbarch != NULL);
3390*ef5ccd6cSJohn Marino gdb_assert (gdbarch->elfcore_write_linux_prpsinfo != NULL);
3391*ef5ccd6cSJohn Marino if (gdbarch_debug >= 2)
3392*ef5ccd6cSJohn Marino fprintf_unfiltered (gdb_stdlog, "gdbarch_elfcore_write_linux_prpsinfo called\n");
3393*ef5ccd6cSJohn Marino return gdbarch->elfcore_write_linux_prpsinfo (obfd, note_data, note_size, info);
3394*ef5ccd6cSJohn Marino }
3395*ef5ccd6cSJohn Marino
3396*ef5ccd6cSJohn Marino void
set_gdbarch_elfcore_write_linux_prpsinfo(struct gdbarch * gdbarch,gdbarch_elfcore_write_linux_prpsinfo_ftype elfcore_write_linux_prpsinfo)3397*ef5ccd6cSJohn Marino set_gdbarch_elfcore_write_linux_prpsinfo (struct gdbarch *gdbarch,
3398*ef5ccd6cSJohn Marino gdbarch_elfcore_write_linux_prpsinfo_ftype elfcore_write_linux_prpsinfo)
3399*ef5ccd6cSJohn Marino {
3400*ef5ccd6cSJohn Marino gdbarch->elfcore_write_linux_prpsinfo = elfcore_write_linux_prpsinfo;
3401*ef5ccd6cSJohn Marino }
3402*ef5ccd6cSJohn Marino
3403*ef5ccd6cSJohn Marino int
gdbarch_find_memory_regions_p(struct gdbarch * gdbarch)3404*ef5ccd6cSJohn Marino gdbarch_find_memory_regions_p (struct gdbarch *gdbarch)
3405*ef5ccd6cSJohn Marino {
3406*ef5ccd6cSJohn Marino gdb_assert (gdbarch != NULL);
3407*ef5ccd6cSJohn Marino return gdbarch->find_memory_regions != NULL;
3408*ef5ccd6cSJohn Marino }
3409*ef5ccd6cSJohn Marino
3410*ef5ccd6cSJohn Marino int
gdbarch_find_memory_regions(struct gdbarch * gdbarch,find_memory_region_ftype func,void * data)3411*ef5ccd6cSJohn Marino gdbarch_find_memory_regions (struct gdbarch *gdbarch, find_memory_region_ftype func, void *data)
3412*ef5ccd6cSJohn Marino {
3413*ef5ccd6cSJohn Marino gdb_assert (gdbarch != NULL);
3414*ef5ccd6cSJohn Marino gdb_assert (gdbarch->find_memory_regions != NULL);
3415*ef5ccd6cSJohn Marino if (gdbarch_debug >= 2)
3416*ef5ccd6cSJohn Marino fprintf_unfiltered (gdb_stdlog, "gdbarch_find_memory_regions called\n");
3417*ef5ccd6cSJohn Marino return gdbarch->find_memory_regions (gdbarch, func, data);
3418*ef5ccd6cSJohn Marino }
3419*ef5ccd6cSJohn Marino
3420*ef5ccd6cSJohn Marino void
set_gdbarch_find_memory_regions(struct gdbarch * gdbarch,gdbarch_find_memory_regions_ftype find_memory_regions)3421*ef5ccd6cSJohn Marino set_gdbarch_find_memory_regions (struct gdbarch *gdbarch,
3422*ef5ccd6cSJohn Marino gdbarch_find_memory_regions_ftype find_memory_regions)
3423*ef5ccd6cSJohn Marino {
3424*ef5ccd6cSJohn Marino gdbarch->find_memory_regions = find_memory_regions;
3425*ef5ccd6cSJohn Marino }
3426*ef5ccd6cSJohn Marino
3427*ef5ccd6cSJohn Marino int
gdbarch_core_xfer_shared_libraries_p(struct gdbarch * gdbarch)34285796c8dcSSimon Schubert gdbarch_core_xfer_shared_libraries_p (struct gdbarch *gdbarch)
34295796c8dcSSimon Schubert {
34305796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
34315796c8dcSSimon Schubert return gdbarch->core_xfer_shared_libraries != NULL;
34325796c8dcSSimon Schubert }
34335796c8dcSSimon Schubert
34345796c8dcSSimon Schubert LONGEST
gdbarch_core_xfer_shared_libraries(struct gdbarch * gdbarch,gdb_byte * readbuf,ULONGEST offset,LONGEST len)34355796c8dcSSimon Schubert gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, LONGEST len)
34365796c8dcSSimon Schubert {
34375796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
34385796c8dcSSimon Schubert gdb_assert (gdbarch->core_xfer_shared_libraries != NULL);
34395796c8dcSSimon Schubert if (gdbarch_debug >= 2)
34405796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_core_xfer_shared_libraries called\n");
34415796c8dcSSimon Schubert return gdbarch->core_xfer_shared_libraries (gdbarch, readbuf, offset, len);
34425796c8dcSSimon Schubert }
34435796c8dcSSimon Schubert
34445796c8dcSSimon Schubert void
set_gdbarch_core_xfer_shared_libraries(struct gdbarch * gdbarch,gdbarch_core_xfer_shared_libraries_ftype core_xfer_shared_libraries)34455796c8dcSSimon Schubert set_gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch,
34465796c8dcSSimon Schubert gdbarch_core_xfer_shared_libraries_ftype core_xfer_shared_libraries)
34475796c8dcSSimon Schubert {
34485796c8dcSSimon Schubert gdbarch->core_xfer_shared_libraries = core_xfer_shared_libraries;
34495796c8dcSSimon Schubert }
34505796c8dcSSimon Schubert
34515796c8dcSSimon Schubert int
gdbarch_core_pid_to_str_p(struct gdbarch * gdbarch)34525796c8dcSSimon Schubert gdbarch_core_pid_to_str_p (struct gdbarch *gdbarch)
34535796c8dcSSimon Schubert {
34545796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
34555796c8dcSSimon Schubert return gdbarch->core_pid_to_str != NULL;
34565796c8dcSSimon Schubert }
34575796c8dcSSimon Schubert
34585796c8dcSSimon Schubert char *
gdbarch_core_pid_to_str(struct gdbarch * gdbarch,ptid_t ptid)34595796c8dcSSimon Schubert gdbarch_core_pid_to_str (struct gdbarch *gdbarch, ptid_t ptid)
34605796c8dcSSimon Schubert {
34615796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
34625796c8dcSSimon Schubert gdb_assert (gdbarch->core_pid_to_str != NULL);
34635796c8dcSSimon Schubert if (gdbarch_debug >= 2)
34645796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_core_pid_to_str called\n");
34655796c8dcSSimon Schubert return gdbarch->core_pid_to_str (gdbarch, ptid);
34665796c8dcSSimon Schubert }
34675796c8dcSSimon Schubert
34685796c8dcSSimon Schubert void
set_gdbarch_core_pid_to_str(struct gdbarch * gdbarch,gdbarch_core_pid_to_str_ftype core_pid_to_str)34695796c8dcSSimon Schubert set_gdbarch_core_pid_to_str (struct gdbarch *gdbarch,
34705796c8dcSSimon Schubert gdbarch_core_pid_to_str_ftype core_pid_to_str)
34715796c8dcSSimon Schubert {
34725796c8dcSSimon Schubert gdbarch->core_pid_to_str = core_pid_to_str;
34735796c8dcSSimon Schubert }
34745796c8dcSSimon Schubert
34755796c8dcSSimon Schubert int
gdbarch_gcore_bfd_target_p(struct gdbarch * gdbarch)34765796c8dcSSimon Schubert gdbarch_gcore_bfd_target_p (struct gdbarch *gdbarch)
34775796c8dcSSimon Schubert {
34785796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
34795796c8dcSSimon Schubert return gdbarch->gcore_bfd_target != 0;
34805796c8dcSSimon Schubert }
34815796c8dcSSimon Schubert
34825796c8dcSSimon Schubert const char *
gdbarch_gcore_bfd_target(struct gdbarch * gdbarch)34835796c8dcSSimon Schubert gdbarch_gcore_bfd_target (struct gdbarch *gdbarch)
34845796c8dcSSimon Schubert {
34855796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
34865796c8dcSSimon Schubert /* Check variable changed from pre-default. */
34875796c8dcSSimon Schubert gdb_assert (gdbarch->gcore_bfd_target != 0);
34885796c8dcSSimon Schubert if (gdbarch_debug >= 2)
34895796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_gcore_bfd_target called\n");
34905796c8dcSSimon Schubert return gdbarch->gcore_bfd_target;
34915796c8dcSSimon Schubert }
34925796c8dcSSimon Schubert
34935796c8dcSSimon Schubert void
set_gdbarch_gcore_bfd_target(struct gdbarch * gdbarch,const char * gcore_bfd_target)34945796c8dcSSimon Schubert set_gdbarch_gcore_bfd_target (struct gdbarch *gdbarch,
34955796c8dcSSimon Schubert const char * gcore_bfd_target)
34965796c8dcSSimon Schubert {
34975796c8dcSSimon Schubert gdbarch->gcore_bfd_target = gcore_bfd_target;
34985796c8dcSSimon Schubert }
34995796c8dcSSimon Schubert
35005796c8dcSSimon Schubert int
gdbarch_vtable_function_descriptors(struct gdbarch * gdbarch)35015796c8dcSSimon Schubert gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch)
35025796c8dcSSimon Schubert {
35035796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
35045796c8dcSSimon Schubert /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
35055796c8dcSSimon Schubert if (gdbarch_debug >= 2)
35065796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_vtable_function_descriptors called\n");
35075796c8dcSSimon Schubert return gdbarch->vtable_function_descriptors;
35085796c8dcSSimon Schubert }
35095796c8dcSSimon Schubert
35105796c8dcSSimon Schubert void
set_gdbarch_vtable_function_descriptors(struct gdbarch * gdbarch,int vtable_function_descriptors)35115796c8dcSSimon Schubert set_gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch,
35125796c8dcSSimon Schubert int vtable_function_descriptors)
35135796c8dcSSimon Schubert {
35145796c8dcSSimon Schubert gdbarch->vtable_function_descriptors = vtable_function_descriptors;
35155796c8dcSSimon Schubert }
35165796c8dcSSimon Schubert
35175796c8dcSSimon Schubert int
gdbarch_vbit_in_delta(struct gdbarch * gdbarch)35185796c8dcSSimon Schubert gdbarch_vbit_in_delta (struct gdbarch *gdbarch)
35195796c8dcSSimon Schubert {
35205796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
35215796c8dcSSimon Schubert /* Skip verify of vbit_in_delta, invalid_p == 0 */
35225796c8dcSSimon Schubert if (gdbarch_debug >= 2)
35235796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_vbit_in_delta called\n");
35245796c8dcSSimon Schubert return gdbarch->vbit_in_delta;
35255796c8dcSSimon Schubert }
35265796c8dcSSimon Schubert
35275796c8dcSSimon Schubert void
set_gdbarch_vbit_in_delta(struct gdbarch * gdbarch,int vbit_in_delta)35285796c8dcSSimon Schubert set_gdbarch_vbit_in_delta (struct gdbarch *gdbarch,
35295796c8dcSSimon Schubert int vbit_in_delta)
35305796c8dcSSimon Schubert {
35315796c8dcSSimon Schubert gdbarch->vbit_in_delta = vbit_in_delta;
35325796c8dcSSimon Schubert }
35335796c8dcSSimon Schubert
35345796c8dcSSimon Schubert int
gdbarch_skip_permanent_breakpoint_p(struct gdbarch * gdbarch)35355796c8dcSSimon Schubert gdbarch_skip_permanent_breakpoint_p (struct gdbarch *gdbarch)
35365796c8dcSSimon Schubert {
35375796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
35385796c8dcSSimon Schubert return gdbarch->skip_permanent_breakpoint != NULL;
35395796c8dcSSimon Schubert }
35405796c8dcSSimon Schubert
35415796c8dcSSimon Schubert void
gdbarch_skip_permanent_breakpoint(struct gdbarch * gdbarch,struct regcache * regcache)35425796c8dcSSimon Schubert gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch, struct regcache *regcache)
35435796c8dcSSimon Schubert {
35445796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
35455796c8dcSSimon Schubert gdb_assert (gdbarch->skip_permanent_breakpoint != NULL);
35465796c8dcSSimon Schubert if (gdbarch_debug >= 2)
35475796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_permanent_breakpoint called\n");
35485796c8dcSSimon Schubert gdbarch->skip_permanent_breakpoint (regcache);
35495796c8dcSSimon Schubert }
35505796c8dcSSimon Schubert
35515796c8dcSSimon Schubert void
set_gdbarch_skip_permanent_breakpoint(struct gdbarch * gdbarch,gdbarch_skip_permanent_breakpoint_ftype skip_permanent_breakpoint)35525796c8dcSSimon Schubert set_gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch,
35535796c8dcSSimon Schubert gdbarch_skip_permanent_breakpoint_ftype skip_permanent_breakpoint)
35545796c8dcSSimon Schubert {
35555796c8dcSSimon Schubert gdbarch->skip_permanent_breakpoint = skip_permanent_breakpoint;
35565796c8dcSSimon Schubert }
35575796c8dcSSimon Schubert
35585796c8dcSSimon Schubert int
gdbarch_max_insn_length_p(struct gdbarch * gdbarch)35595796c8dcSSimon Schubert gdbarch_max_insn_length_p (struct gdbarch *gdbarch)
35605796c8dcSSimon Schubert {
35615796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
35625796c8dcSSimon Schubert return gdbarch->max_insn_length != 0;
35635796c8dcSSimon Schubert }
35645796c8dcSSimon Schubert
35655796c8dcSSimon Schubert ULONGEST
gdbarch_max_insn_length(struct gdbarch * gdbarch)35665796c8dcSSimon Schubert gdbarch_max_insn_length (struct gdbarch *gdbarch)
35675796c8dcSSimon Schubert {
35685796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
35695796c8dcSSimon Schubert /* Check variable changed from pre-default. */
35705796c8dcSSimon Schubert gdb_assert (gdbarch->max_insn_length != 0);
35715796c8dcSSimon Schubert if (gdbarch_debug >= 2)
35725796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_max_insn_length called\n");
35735796c8dcSSimon Schubert return gdbarch->max_insn_length;
35745796c8dcSSimon Schubert }
35755796c8dcSSimon Schubert
35765796c8dcSSimon Schubert void
set_gdbarch_max_insn_length(struct gdbarch * gdbarch,ULONGEST max_insn_length)35775796c8dcSSimon Schubert set_gdbarch_max_insn_length (struct gdbarch *gdbarch,
35785796c8dcSSimon Schubert ULONGEST max_insn_length)
35795796c8dcSSimon Schubert {
35805796c8dcSSimon Schubert gdbarch->max_insn_length = max_insn_length;
35815796c8dcSSimon Schubert }
35825796c8dcSSimon Schubert
35835796c8dcSSimon Schubert int
gdbarch_displaced_step_copy_insn_p(struct gdbarch * gdbarch)35845796c8dcSSimon Schubert gdbarch_displaced_step_copy_insn_p (struct gdbarch *gdbarch)
35855796c8dcSSimon Schubert {
35865796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
35875796c8dcSSimon Schubert return gdbarch->displaced_step_copy_insn != NULL;
35885796c8dcSSimon Schubert }
35895796c8dcSSimon Schubert
35905796c8dcSSimon Schubert struct displaced_step_closure *
gdbarch_displaced_step_copy_insn(struct gdbarch * gdbarch,CORE_ADDR from,CORE_ADDR to,struct regcache * regs)35915796c8dcSSimon Schubert gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch, CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
35925796c8dcSSimon Schubert {
35935796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
35945796c8dcSSimon Schubert gdb_assert (gdbarch->displaced_step_copy_insn != NULL);
35955796c8dcSSimon Schubert if (gdbarch_debug >= 2)
35965796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_copy_insn called\n");
35975796c8dcSSimon Schubert return gdbarch->displaced_step_copy_insn (gdbarch, from, to, regs);
35985796c8dcSSimon Schubert }
35995796c8dcSSimon Schubert
36005796c8dcSSimon Schubert void
set_gdbarch_displaced_step_copy_insn(struct gdbarch * gdbarch,gdbarch_displaced_step_copy_insn_ftype displaced_step_copy_insn)36015796c8dcSSimon Schubert set_gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch,
36025796c8dcSSimon Schubert gdbarch_displaced_step_copy_insn_ftype displaced_step_copy_insn)
36035796c8dcSSimon Schubert {
36045796c8dcSSimon Schubert gdbarch->displaced_step_copy_insn = displaced_step_copy_insn;
36055796c8dcSSimon Schubert }
36065796c8dcSSimon Schubert
36075796c8dcSSimon Schubert int
gdbarch_displaced_step_hw_singlestep(struct gdbarch * gdbarch,struct displaced_step_closure * closure)36085796c8dcSSimon Schubert gdbarch_displaced_step_hw_singlestep (struct gdbarch *gdbarch, struct displaced_step_closure *closure)
36095796c8dcSSimon Schubert {
36105796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
36115796c8dcSSimon Schubert gdb_assert (gdbarch->displaced_step_hw_singlestep != NULL);
36125796c8dcSSimon Schubert if (gdbarch_debug >= 2)
36135796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_hw_singlestep called\n");
36145796c8dcSSimon Schubert return gdbarch->displaced_step_hw_singlestep (gdbarch, closure);
36155796c8dcSSimon Schubert }
36165796c8dcSSimon Schubert
36175796c8dcSSimon Schubert void
set_gdbarch_displaced_step_hw_singlestep(struct gdbarch * gdbarch,gdbarch_displaced_step_hw_singlestep_ftype displaced_step_hw_singlestep)36185796c8dcSSimon Schubert set_gdbarch_displaced_step_hw_singlestep (struct gdbarch *gdbarch,
36195796c8dcSSimon Schubert gdbarch_displaced_step_hw_singlestep_ftype displaced_step_hw_singlestep)
36205796c8dcSSimon Schubert {
36215796c8dcSSimon Schubert gdbarch->displaced_step_hw_singlestep = displaced_step_hw_singlestep;
36225796c8dcSSimon Schubert }
36235796c8dcSSimon Schubert
36245796c8dcSSimon Schubert int
gdbarch_displaced_step_fixup_p(struct gdbarch * gdbarch)36255796c8dcSSimon Schubert gdbarch_displaced_step_fixup_p (struct gdbarch *gdbarch)
36265796c8dcSSimon Schubert {
36275796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
36285796c8dcSSimon Schubert return gdbarch->displaced_step_fixup != NULL;
36295796c8dcSSimon Schubert }
36305796c8dcSSimon Schubert
36315796c8dcSSimon Schubert void
gdbarch_displaced_step_fixup(struct gdbarch * gdbarch,struct displaced_step_closure * closure,CORE_ADDR from,CORE_ADDR to,struct regcache * regs)36325796c8dcSSimon Schubert gdbarch_displaced_step_fixup (struct gdbarch *gdbarch, struct displaced_step_closure *closure, CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
36335796c8dcSSimon Schubert {
36345796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
36355796c8dcSSimon Schubert gdb_assert (gdbarch->displaced_step_fixup != NULL);
36365796c8dcSSimon Schubert /* Do not check predicate: gdbarch->displaced_step_fixup != NULL, allow call. */
36375796c8dcSSimon Schubert if (gdbarch_debug >= 2)
36385796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_fixup called\n");
36395796c8dcSSimon Schubert gdbarch->displaced_step_fixup (gdbarch, closure, from, to, regs);
36405796c8dcSSimon Schubert }
36415796c8dcSSimon Schubert
36425796c8dcSSimon Schubert void
set_gdbarch_displaced_step_fixup(struct gdbarch * gdbarch,gdbarch_displaced_step_fixup_ftype displaced_step_fixup)36435796c8dcSSimon Schubert set_gdbarch_displaced_step_fixup (struct gdbarch *gdbarch,
36445796c8dcSSimon Schubert gdbarch_displaced_step_fixup_ftype displaced_step_fixup)
36455796c8dcSSimon Schubert {
36465796c8dcSSimon Schubert gdbarch->displaced_step_fixup = displaced_step_fixup;
36475796c8dcSSimon Schubert }
36485796c8dcSSimon Schubert
36495796c8dcSSimon Schubert void
gdbarch_displaced_step_free_closure(struct gdbarch * gdbarch,struct displaced_step_closure * closure)36505796c8dcSSimon Schubert gdbarch_displaced_step_free_closure (struct gdbarch *gdbarch, struct displaced_step_closure *closure)
36515796c8dcSSimon Schubert {
36525796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
36535796c8dcSSimon Schubert gdb_assert (gdbarch->displaced_step_free_closure != NULL);
36545796c8dcSSimon Schubert if (gdbarch_debug >= 2)
36555796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_free_closure called\n");
36565796c8dcSSimon Schubert gdbarch->displaced_step_free_closure (gdbarch, closure);
36575796c8dcSSimon Schubert }
36585796c8dcSSimon Schubert
36595796c8dcSSimon Schubert void
set_gdbarch_displaced_step_free_closure(struct gdbarch * gdbarch,gdbarch_displaced_step_free_closure_ftype displaced_step_free_closure)36605796c8dcSSimon Schubert set_gdbarch_displaced_step_free_closure (struct gdbarch *gdbarch,
36615796c8dcSSimon Schubert gdbarch_displaced_step_free_closure_ftype displaced_step_free_closure)
36625796c8dcSSimon Schubert {
36635796c8dcSSimon Schubert gdbarch->displaced_step_free_closure = displaced_step_free_closure;
36645796c8dcSSimon Schubert }
36655796c8dcSSimon Schubert
36665796c8dcSSimon Schubert CORE_ADDR
gdbarch_displaced_step_location(struct gdbarch * gdbarch)36675796c8dcSSimon Schubert gdbarch_displaced_step_location (struct gdbarch *gdbarch)
36685796c8dcSSimon Schubert {
36695796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
36705796c8dcSSimon Schubert gdb_assert (gdbarch->displaced_step_location != NULL);
36715796c8dcSSimon Schubert if (gdbarch_debug >= 2)
36725796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_location called\n");
36735796c8dcSSimon Schubert return gdbarch->displaced_step_location (gdbarch);
36745796c8dcSSimon Schubert }
36755796c8dcSSimon Schubert
36765796c8dcSSimon Schubert void
set_gdbarch_displaced_step_location(struct gdbarch * gdbarch,gdbarch_displaced_step_location_ftype displaced_step_location)36775796c8dcSSimon Schubert set_gdbarch_displaced_step_location (struct gdbarch *gdbarch,
36785796c8dcSSimon Schubert gdbarch_displaced_step_location_ftype displaced_step_location)
36795796c8dcSSimon Schubert {
36805796c8dcSSimon Schubert gdbarch->displaced_step_location = displaced_step_location;
36815796c8dcSSimon Schubert }
36825796c8dcSSimon Schubert
36835796c8dcSSimon Schubert int
gdbarch_relocate_instruction_p(struct gdbarch * gdbarch)3684cf7f2e2dSJohn Marino gdbarch_relocate_instruction_p (struct gdbarch *gdbarch)
3685cf7f2e2dSJohn Marino {
3686cf7f2e2dSJohn Marino gdb_assert (gdbarch != NULL);
3687cf7f2e2dSJohn Marino return gdbarch->relocate_instruction != NULL;
3688cf7f2e2dSJohn Marino }
3689cf7f2e2dSJohn Marino
3690cf7f2e2dSJohn Marino void
gdbarch_relocate_instruction(struct gdbarch * gdbarch,CORE_ADDR * to,CORE_ADDR from)3691cf7f2e2dSJohn Marino gdbarch_relocate_instruction (struct gdbarch *gdbarch, CORE_ADDR *to, CORE_ADDR from)
3692cf7f2e2dSJohn Marino {
3693cf7f2e2dSJohn Marino gdb_assert (gdbarch != NULL);
3694cf7f2e2dSJohn Marino gdb_assert (gdbarch->relocate_instruction != NULL);
3695cf7f2e2dSJohn Marino /* Do not check predicate: gdbarch->relocate_instruction != NULL, allow call. */
3696cf7f2e2dSJohn Marino if (gdbarch_debug >= 2)
3697cf7f2e2dSJohn Marino fprintf_unfiltered (gdb_stdlog, "gdbarch_relocate_instruction called\n");
3698cf7f2e2dSJohn Marino gdbarch->relocate_instruction (gdbarch, to, from);
3699cf7f2e2dSJohn Marino }
3700cf7f2e2dSJohn Marino
3701cf7f2e2dSJohn Marino void
set_gdbarch_relocate_instruction(struct gdbarch * gdbarch,gdbarch_relocate_instruction_ftype relocate_instruction)3702cf7f2e2dSJohn Marino set_gdbarch_relocate_instruction (struct gdbarch *gdbarch,
3703cf7f2e2dSJohn Marino gdbarch_relocate_instruction_ftype relocate_instruction)
3704cf7f2e2dSJohn Marino {
3705cf7f2e2dSJohn Marino gdbarch->relocate_instruction = relocate_instruction;
3706cf7f2e2dSJohn Marino }
3707cf7f2e2dSJohn Marino
3708cf7f2e2dSJohn Marino int
gdbarch_overlay_update_p(struct gdbarch * gdbarch)37095796c8dcSSimon Schubert gdbarch_overlay_update_p (struct gdbarch *gdbarch)
37105796c8dcSSimon Schubert {
37115796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
37125796c8dcSSimon Schubert return gdbarch->overlay_update != NULL;
37135796c8dcSSimon Schubert }
37145796c8dcSSimon Schubert
37155796c8dcSSimon Schubert void
gdbarch_overlay_update(struct gdbarch * gdbarch,struct obj_section * osect)37165796c8dcSSimon Schubert gdbarch_overlay_update (struct gdbarch *gdbarch, struct obj_section *osect)
37175796c8dcSSimon Schubert {
37185796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
37195796c8dcSSimon Schubert gdb_assert (gdbarch->overlay_update != NULL);
37205796c8dcSSimon Schubert if (gdbarch_debug >= 2)
37215796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_overlay_update called\n");
37225796c8dcSSimon Schubert gdbarch->overlay_update (osect);
37235796c8dcSSimon Schubert }
37245796c8dcSSimon Schubert
37255796c8dcSSimon Schubert void
set_gdbarch_overlay_update(struct gdbarch * gdbarch,gdbarch_overlay_update_ftype overlay_update)37265796c8dcSSimon Schubert set_gdbarch_overlay_update (struct gdbarch *gdbarch,
37275796c8dcSSimon Schubert gdbarch_overlay_update_ftype overlay_update)
37285796c8dcSSimon Schubert {
37295796c8dcSSimon Schubert gdbarch->overlay_update = overlay_update;
37305796c8dcSSimon Schubert }
37315796c8dcSSimon Schubert
37325796c8dcSSimon Schubert int
gdbarch_core_read_description_p(struct gdbarch * gdbarch)37335796c8dcSSimon Schubert gdbarch_core_read_description_p (struct gdbarch *gdbarch)
37345796c8dcSSimon Schubert {
37355796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
37365796c8dcSSimon Schubert return gdbarch->core_read_description != NULL;
37375796c8dcSSimon Schubert }
37385796c8dcSSimon Schubert
37395796c8dcSSimon Schubert const struct target_desc *
gdbarch_core_read_description(struct gdbarch * gdbarch,struct target_ops * target,bfd * abfd)37405796c8dcSSimon Schubert gdbarch_core_read_description (struct gdbarch *gdbarch, struct target_ops *target, bfd *abfd)
37415796c8dcSSimon Schubert {
37425796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
37435796c8dcSSimon Schubert gdb_assert (gdbarch->core_read_description != NULL);
37445796c8dcSSimon Schubert if (gdbarch_debug >= 2)
37455796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_core_read_description called\n");
37465796c8dcSSimon Schubert return gdbarch->core_read_description (gdbarch, target, abfd);
37475796c8dcSSimon Schubert }
37485796c8dcSSimon Schubert
37495796c8dcSSimon Schubert void
set_gdbarch_core_read_description(struct gdbarch * gdbarch,gdbarch_core_read_description_ftype core_read_description)37505796c8dcSSimon Schubert set_gdbarch_core_read_description (struct gdbarch *gdbarch,
37515796c8dcSSimon Schubert gdbarch_core_read_description_ftype core_read_description)
37525796c8dcSSimon Schubert {
37535796c8dcSSimon Schubert gdbarch->core_read_description = core_read_description;
37545796c8dcSSimon Schubert }
37555796c8dcSSimon Schubert
37565796c8dcSSimon Schubert int
gdbarch_static_transform_name_p(struct gdbarch * gdbarch)37575796c8dcSSimon Schubert gdbarch_static_transform_name_p (struct gdbarch *gdbarch)
37585796c8dcSSimon Schubert {
37595796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
37605796c8dcSSimon Schubert return gdbarch->static_transform_name != NULL;
37615796c8dcSSimon Schubert }
37625796c8dcSSimon Schubert
3763*ef5ccd6cSJohn Marino const char *
gdbarch_static_transform_name(struct gdbarch * gdbarch,const char * name)3764*ef5ccd6cSJohn Marino gdbarch_static_transform_name (struct gdbarch *gdbarch, const char *name)
37655796c8dcSSimon Schubert {
37665796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
37675796c8dcSSimon Schubert gdb_assert (gdbarch->static_transform_name != NULL);
37685796c8dcSSimon Schubert if (gdbarch_debug >= 2)
37695796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_static_transform_name called\n");
37705796c8dcSSimon Schubert return gdbarch->static_transform_name (name);
37715796c8dcSSimon Schubert }
37725796c8dcSSimon Schubert
37735796c8dcSSimon Schubert void
set_gdbarch_static_transform_name(struct gdbarch * gdbarch,gdbarch_static_transform_name_ftype static_transform_name)37745796c8dcSSimon Schubert set_gdbarch_static_transform_name (struct gdbarch *gdbarch,
37755796c8dcSSimon Schubert gdbarch_static_transform_name_ftype static_transform_name)
37765796c8dcSSimon Schubert {
37775796c8dcSSimon Schubert gdbarch->static_transform_name = static_transform_name;
37785796c8dcSSimon Schubert }
37795796c8dcSSimon Schubert
37805796c8dcSSimon Schubert int
gdbarch_sofun_address_maybe_missing(struct gdbarch * gdbarch)37815796c8dcSSimon Schubert gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch)
37825796c8dcSSimon Schubert {
37835796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
37845796c8dcSSimon Schubert /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
37855796c8dcSSimon Schubert if (gdbarch_debug >= 2)
37865796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_sofun_address_maybe_missing called\n");
37875796c8dcSSimon Schubert return gdbarch->sofun_address_maybe_missing;
37885796c8dcSSimon Schubert }
37895796c8dcSSimon Schubert
37905796c8dcSSimon Schubert void
set_gdbarch_sofun_address_maybe_missing(struct gdbarch * gdbarch,int sofun_address_maybe_missing)37915796c8dcSSimon Schubert set_gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch,
37925796c8dcSSimon Schubert int sofun_address_maybe_missing)
37935796c8dcSSimon Schubert {
37945796c8dcSSimon Schubert gdbarch->sofun_address_maybe_missing = sofun_address_maybe_missing;
37955796c8dcSSimon Schubert }
37965796c8dcSSimon Schubert
37975796c8dcSSimon Schubert int
gdbarch_process_record_p(struct gdbarch * gdbarch)37985796c8dcSSimon Schubert gdbarch_process_record_p (struct gdbarch *gdbarch)
37995796c8dcSSimon Schubert {
38005796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
38015796c8dcSSimon Schubert return gdbarch->process_record != NULL;
38025796c8dcSSimon Schubert }
38035796c8dcSSimon Schubert
38045796c8dcSSimon Schubert int
gdbarch_process_record(struct gdbarch * gdbarch,struct regcache * regcache,CORE_ADDR addr)38055796c8dcSSimon Schubert gdbarch_process_record (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR addr)
38065796c8dcSSimon Schubert {
38075796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
38085796c8dcSSimon Schubert gdb_assert (gdbarch->process_record != NULL);
38095796c8dcSSimon Schubert if (gdbarch_debug >= 2)
38105796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_process_record called\n");
38115796c8dcSSimon Schubert return gdbarch->process_record (gdbarch, regcache, addr);
38125796c8dcSSimon Schubert }
38135796c8dcSSimon Schubert
38145796c8dcSSimon Schubert void
set_gdbarch_process_record(struct gdbarch * gdbarch,gdbarch_process_record_ftype process_record)38155796c8dcSSimon Schubert set_gdbarch_process_record (struct gdbarch *gdbarch,
38165796c8dcSSimon Schubert gdbarch_process_record_ftype process_record)
38175796c8dcSSimon Schubert {
38185796c8dcSSimon Schubert gdbarch->process_record = process_record;
38195796c8dcSSimon Schubert }
38205796c8dcSSimon Schubert
38215796c8dcSSimon Schubert int
gdbarch_process_record_signal_p(struct gdbarch * gdbarch)38225796c8dcSSimon Schubert gdbarch_process_record_signal_p (struct gdbarch *gdbarch)
38235796c8dcSSimon Schubert {
38245796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
38255796c8dcSSimon Schubert return gdbarch->process_record_signal != NULL;
38265796c8dcSSimon Schubert }
38275796c8dcSSimon Schubert
38285796c8dcSSimon Schubert int
gdbarch_process_record_signal(struct gdbarch * gdbarch,struct regcache * regcache,enum gdb_signal signal)3829*ef5ccd6cSJohn Marino gdbarch_process_record_signal (struct gdbarch *gdbarch, struct regcache *regcache, enum gdb_signal signal)
38305796c8dcSSimon Schubert {
38315796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
38325796c8dcSSimon Schubert gdb_assert (gdbarch->process_record_signal != NULL);
38335796c8dcSSimon Schubert if (gdbarch_debug >= 2)
38345796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_process_record_signal called\n");
38355796c8dcSSimon Schubert return gdbarch->process_record_signal (gdbarch, regcache, signal);
38365796c8dcSSimon Schubert }
38375796c8dcSSimon Schubert
38385796c8dcSSimon Schubert void
set_gdbarch_process_record_signal(struct gdbarch * gdbarch,gdbarch_process_record_signal_ftype process_record_signal)38395796c8dcSSimon Schubert set_gdbarch_process_record_signal (struct gdbarch *gdbarch,
38405796c8dcSSimon Schubert gdbarch_process_record_signal_ftype process_record_signal)
38415796c8dcSSimon Schubert {
38425796c8dcSSimon Schubert gdbarch->process_record_signal = process_record_signal;
38435796c8dcSSimon Schubert }
38445796c8dcSSimon Schubert
38455796c8dcSSimon Schubert int
gdbarch_gdb_signal_from_target_p(struct gdbarch * gdbarch)3846*ef5ccd6cSJohn Marino gdbarch_gdb_signal_from_target_p (struct gdbarch *gdbarch)
38475796c8dcSSimon Schubert {
38485796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
3849*ef5ccd6cSJohn Marino return gdbarch->gdb_signal_from_target != NULL;
3850*ef5ccd6cSJohn Marino }
3851*ef5ccd6cSJohn Marino
3852*ef5ccd6cSJohn Marino enum gdb_signal
gdbarch_gdb_signal_from_target(struct gdbarch * gdbarch,int signo)3853*ef5ccd6cSJohn Marino gdbarch_gdb_signal_from_target (struct gdbarch *gdbarch, int signo)
3854*ef5ccd6cSJohn Marino {
3855*ef5ccd6cSJohn Marino gdb_assert (gdbarch != NULL);
3856*ef5ccd6cSJohn Marino gdb_assert (gdbarch->gdb_signal_from_target != NULL);
38575796c8dcSSimon Schubert if (gdbarch_debug >= 2)
3858*ef5ccd6cSJohn Marino fprintf_unfiltered (gdb_stdlog, "gdbarch_gdb_signal_from_target called\n");
3859*ef5ccd6cSJohn Marino return gdbarch->gdb_signal_from_target (gdbarch, signo);
38605796c8dcSSimon Schubert }
38615796c8dcSSimon Schubert
38625796c8dcSSimon Schubert void
set_gdbarch_gdb_signal_from_target(struct gdbarch * gdbarch,gdbarch_gdb_signal_from_target_ftype gdb_signal_from_target)3863*ef5ccd6cSJohn Marino set_gdbarch_gdb_signal_from_target (struct gdbarch *gdbarch,
3864*ef5ccd6cSJohn Marino gdbarch_gdb_signal_from_target_ftype gdb_signal_from_target)
38655796c8dcSSimon Schubert {
3866*ef5ccd6cSJohn Marino gdbarch->gdb_signal_from_target = gdb_signal_from_target;
38675796c8dcSSimon Schubert }
38685796c8dcSSimon Schubert
38695796c8dcSSimon Schubert int
gdbarch_get_siginfo_type_p(struct gdbarch * gdbarch)38705796c8dcSSimon Schubert gdbarch_get_siginfo_type_p (struct gdbarch *gdbarch)
38715796c8dcSSimon Schubert {
38725796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
38735796c8dcSSimon Schubert return gdbarch->get_siginfo_type != NULL;
38745796c8dcSSimon Schubert }
38755796c8dcSSimon Schubert
38765796c8dcSSimon Schubert struct type *
gdbarch_get_siginfo_type(struct gdbarch * gdbarch)38775796c8dcSSimon Schubert gdbarch_get_siginfo_type (struct gdbarch *gdbarch)
38785796c8dcSSimon Schubert {
38795796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
38805796c8dcSSimon Schubert gdb_assert (gdbarch->get_siginfo_type != NULL);
38815796c8dcSSimon Schubert if (gdbarch_debug >= 2)
38825796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_get_siginfo_type called\n");
38835796c8dcSSimon Schubert return gdbarch->get_siginfo_type (gdbarch);
38845796c8dcSSimon Schubert }
38855796c8dcSSimon Schubert
38865796c8dcSSimon Schubert void
set_gdbarch_get_siginfo_type(struct gdbarch * gdbarch,gdbarch_get_siginfo_type_ftype get_siginfo_type)38875796c8dcSSimon Schubert set_gdbarch_get_siginfo_type (struct gdbarch *gdbarch,
38885796c8dcSSimon Schubert gdbarch_get_siginfo_type_ftype get_siginfo_type)
38895796c8dcSSimon Schubert {
38905796c8dcSSimon Schubert gdbarch->get_siginfo_type = get_siginfo_type;
38915796c8dcSSimon Schubert }
38925796c8dcSSimon Schubert
38935796c8dcSSimon Schubert int
gdbarch_record_special_symbol_p(struct gdbarch * gdbarch)38945796c8dcSSimon Schubert gdbarch_record_special_symbol_p (struct gdbarch *gdbarch)
38955796c8dcSSimon Schubert {
38965796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
38975796c8dcSSimon Schubert return gdbarch->record_special_symbol != NULL;
38985796c8dcSSimon Schubert }
38995796c8dcSSimon Schubert
39005796c8dcSSimon Schubert void
gdbarch_record_special_symbol(struct gdbarch * gdbarch,struct objfile * objfile,asymbol * sym)39015796c8dcSSimon Schubert gdbarch_record_special_symbol (struct gdbarch *gdbarch, struct objfile *objfile, asymbol *sym)
39025796c8dcSSimon Schubert {
39035796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
39045796c8dcSSimon Schubert gdb_assert (gdbarch->record_special_symbol != NULL);
39055796c8dcSSimon Schubert if (gdbarch_debug >= 2)
39065796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_record_special_symbol called\n");
39075796c8dcSSimon Schubert gdbarch->record_special_symbol (gdbarch, objfile, sym);
39085796c8dcSSimon Schubert }
39095796c8dcSSimon Schubert
39105796c8dcSSimon Schubert void
set_gdbarch_record_special_symbol(struct gdbarch * gdbarch,gdbarch_record_special_symbol_ftype record_special_symbol)39115796c8dcSSimon Schubert set_gdbarch_record_special_symbol (struct gdbarch *gdbarch,
39125796c8dcSSimon Schubert gdbarch_record_special_symbol_ftype record_special_symbol)
39135796c8dcSSimon Schubert {
39145796c8dcSSimon Schubert gdbarch->record_special_symbol = record_special_symbol;
39155796c8dcSSimon Schubert }
39165796c8dcSSimon Schubert
39175796c8dcSSimon Schubert int
gdbarch_get_syscall_number_p(struct gdbarch * gdbarch)39185796c8dcSSimon Schubert gdbarch_get_syscall_number_p (struct gdbarch *gdbarch)
39195796c8dcSSimon Schubert {
39205796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
39215796c8dcSSimon Schubert return gdbarch->get_syscall_number != NULL;
39225796c8dcSSimon Schubert }
39235796c8dcSSimon Schubert
39245796c8dcSSimon Schubert LONGEST
gdbarch_get_syscall_number(struct gdbarch * gdbarch,ptid_t ptid)39255796c8dcSSimon Schubert gdbarch_get_syscall_number (struct gdbarch *gdbarch, ptid_t ptid)
39265796c8dcSSimon Schubert {
39275796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
39285796c8dcSSimon Schubert gdb_assert (gdbarch->get_syscall_number != NULL);
39295796c8dcSSimon Schubert if (gdbarch_debug >= 2)
39305796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_get_syscall_number called\n");
39315796c8dcSSimon Schubert return gdbarch->get_syscall_number (gdbarch, ptid);
39325796c8dcSSimon Schubert }
39335796c8dcSSimon Schubert
39345796c8dcSSimon Schubert void
set_gdbarch_get_syscall_number(struct gdbarch * gdbarch,gdbarch_get_syscall_number_ftype get_syscall_number)39355796c8dcSSimon Schubert set_gdbarch_get_syscall_number (struct gdbarch *gdbarch,
39365796c8dcSSimon Schubert gdbarch_get_syscall_number_ftype get_syscall_number)
39375796c8dcSSimon Schubert {
39385796c8dcSSimon Schubert gdbarch->get_syscall_number = get_syscall_number;
39395796c8dcSSimon Schubert }
39405796c8dcSSimon Schubert
3941*ef5ccd6cSJohn Marino const char *
gdbarch_stap_integer_prefix(struct gdbarch * gdbarch)3942*ef5ccd6cSJohn Marino gdbarch_stap_integer_prefix (struct gdbarch *gdbarch)
3943*ef5ccd6cSJohn Marino {
3944*ef5ccd6cSJohn Marino gdb_assert (gdbarch != NULL);
3945*ef5ccd6cSJohn Marino /* Skip verify of stap_integer_prefix, invalid_p == 0 */
3946*ef5ccd6cSJohn Marino if (gdbarch_debug >= 2)
3947*ef5ccd6cSJohn Marino fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_integer_prefix called\n");
3948*ef5ccd6cSJohn Marino return gdbarch->stap_integer_prefix;
3949*ef5ccd6cSJohn Marino }
3950*ef5ccd6cSJohn Marino
3951*ef5ccd6cSJohn Marino void
set_gdbarch_stap_integer_prefix(struct gdbarch * gdbarch,const char * stap_integer_prefix)3952*ef5ccd6cSJohn Marino set_gdbarch_stap_integer_prefix (struct gdbarch *gdbarch,
3953*ef5ccd6cSJohn Marino const char * stap_integer_prefix)
3954*ef5ccd6cSJohn Marino {
3955*ef5ccd6cSJohn Marino gdbarch->stap_integer_prefix = stap_integer_prefix;
3956*ef5ccd6cSJohn Marino }
3957*ef5ccd6cSJohn Marino
3958*ef5ccd6cSJohn Marino const char *
gdbarch_stap_integer_suffix(struct gdbarch * gdbarch)3959*ef5ccd6cSJohn Marino gdbarch_stap_integer_suffix (struct gdbarch *gdbarch)
3960*ef5ccd6cSJohn Marino {
3961*ef5ccd6cSJohn Marino gdb_assert (gdbarch != NULL);
3962*ef5ccd6cSJohn Marino /* Skip verify of stap_integer_suffix, invalid_p == 0 */
3963*ef5ccd6cSJohn Marino if (gdbarch_debug >= 2)
3964*ef5ccd6cSJohn Marino fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_integer_suffix called\n");
3965*ef5ccd6cSJohn Marino return gdbarch->stap_integer_suffix;
3966*ef5ccd6cSJohn Marino }
3967*ef5ccd6cSJohn Marino
3968*ef5ccd6cSJohn Marino void
set_gdbarch_stap_integer_suffix(struct gdbarch * gdbarch,const char * stap_integer_suffix)3969*ef5ccd6cSJohn Marino set_gdbarch_stap_integer_suffix (struct gdbarch *gdbarch,
3970*ef5ccd6cSJohn Marino const char * stap_integer_suffix)
3971*ef5ccd6cSJohn Marino {
3972*ef5ccd6cSJohn Marino gdbarch->stap_integer_suffix = stap_integer_suffix;
3973*ef5ccd6cSJohn Marino }
3974*ef5ccd6cSJohn Marino
3975*ef5ccd6cSJohn Marino const char *
gdbarch_stap_register_prefix(struct gdbarch * gdbarch)3976*ef5ccd6cSJohn Marino gdbarch_stap_register_prefix (struct gdbarch *gdbarch)
3977*ef5ccd6cSJohn Marino {
3978*ef5ccd6cSJohn Marino gdb_assert (gdbarch != NULL);
3979*ef5ccd6cSJohn Marino /* Skip verify of stap_register_prefix, invalid_p == 0 */
3980*ef5ccd6cSJohn Marino if (gdbarch_debug >= 2)
3981*ef5ccd6cSJohn Marino fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_prefix called\n");
3982*ef5ccd6cSJohn Marino return gdbarch->stap_register_prefix;
3983*ef5ccd6cSJohn Marino }
3984*ef5ccd6cSJohn Marino
3985*ef5ccd6cSJohn Marino void
set_gdbarch_stap_register_prefix(struct gdbarch * gdbarch,const char * stap_register_prefix)3986*ef5ccd6cSJohn Marino set_gdbarch_stap_register_prefix (struct gdbarch *gdbarch,
3987*ef5ccd6cSJohn Marino const char * stap_register_prefix)
3988*ef5ccd6cSJohn Marino {
3989*ef5ccd6cSJohn Marino gdbarch->stap_register_prefix = stap_register_prefix;
3990*ef5ccd6cSJohn Marino }
3991*ef5ccd6cSJohn Marino
3992*ef5ccd6cSJohn Marino const char *
gdbarch_stap_register_suffix(struct gdbarch * gdbarch)3993*ef5ccd6cSJohn Marino gdbarch_stap_register_suffix (struct gdbarch *gdbarch)
3994*ef5ccd6cSJohn Marino {
3995*ef5ccd6cSJohn Marino gdb_assert (gdbarch != NULL);
3996*ef5ccd6cSJohn Marino /* Skip verify of stap_register_suffix, invalid_p == 0 */
3997*ef5ccd6cSJohn Marino if (gdbarch_debug >= 2)
3998*ef5ccd6cSJohn Marino fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_suffix called\n");
3999*ef5ccd6cSJohn Marino return gdbarch->stap_register_suffix;
4000*ef5ccd6cSJohn Marino }
4001*ef5ccd6cSJohn Marino
4002*ef5ccd6cSJohn Marino void
set_gdbarch_stap_register_suffix(struct gdbarch * gdbarch,const char * stap_register_suffix)4003*ef5ccd6cSJohn Marino set_gdbarch_stap_register_suffix (struct gdbarch *gdbarch,
4004*ef5ccd6cSJohn Marino const char * stap_register_suffix)
4005*ef5ccd6cSJohn Marino {
4006*ef5ccd6cSJohn Marino gdbarch->stap_register_suffix = stap_register_suffix;
4007*ef5ccd6cSJohn Marino }
4008*ef5ccd6cSJohn Marino
4009*ef5ccd6cSJohn Marino const char *
gdbarch_stap_register_indirection_prefix(struct gdbarch * gdbarch)4010*ef5ccd6cSJohn Marino gdbarch_stap_register_indirection_prefix (struct gdbarch *gdbarch)
4011*ef5ccd6cSJohn Marino {
4012*ef5ccd6cSJohn Marino gdb_assert (gdbarch != NULL);
4013*ef5ccd6cSJohn Marino /* Skip verify of stap_register_indirection_prefix, invalid_p == 0 */
4014*ef5ccd6cSJohn Marino if (gdbarch_debug >= 2)
4015*ef5ccd6cSJohn Marino fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_indirection_prefix called\n");
4016*ef5ccd6cSJohn Marino return gdbarch->stap_register_indirection_prefix;
4017*ef5ccd6cSJohn Marino }
4018*ef5ccd6cSJohn Marino
4019*ef5ccd6cSJohn Marino void
set_gdbarch_stap_register_indirection_prefix(struct gdbarch * gdbarch,const char * stap_register_indirection_prefix)4020*ef5ccd6cSJohn Marino set_gdbarch_stap_register_indirection_prefix (struct gdbarch *gdbarch,
4021*ef5ccd6cSJohn Marino const char * stap_register_indirection_prefix)
4022*ef5ccd6cSJohn Marino {
4023*ef5ccd6cSJohn Marino gdbarch->stap_register_indirection_prefix = stap_register_indirection_prefix;
4024*ef5ccd6cSJohn Marino }
4025*ef5ccd6cSJohn Marino
4026*ef5ccd6cSJohn Marino const char *
gdbarch_stap_register_indirection_suffix(struct gdbarch * gdbarch)4027*ef5ccd6cSJohn Marino gdbarch_stap_register_indirection_suffix (struct gdbarch *gdbarch)
4028*ef5ccd6cSJohn Marino {
4029*ef5ccd6cSJohn Marino gdb_assert (gdbarch != NULL);
4030*ef5ccd6cSJohn Marino /* Skip verify of stap_register_indirection_suffix, invalid_p == 0 */
4031*ef5ccd6cSJohn Marino if (gdbarch_debug >= 2)
4032*ef5ccd6cSJohn Marino fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_indirection_suffix called\n");
4033*ef5ccd6cSJohn Marino return gdbarch->stap_register_indirection_suffix;
4034*ef5ccd6cSJohn Marino }
4035*ef5ccd6cSJohn Marino
4036*ef5ccd6cSJohn Marino void
set_gdbarch_stap_register_indirection_suffix(struct gdbarch * gdbarch,const char * stap_register_indirection_suffix)4037*ef5ccd6cSJohn Marino set_gdbarch_stap_register_indirection_suffix (struct gdbarch *gdbarch,
4038*ef5ccd6cSJohn Marino const char * stap_register_indirection_suffix)
4039*ef5ccd6cSJohn Marino {
4040*ef5ccd6cSJohn Marino gdbarch->stap_register_indirection_suffix = stap_register_indirection_suffix;
4041*ef5ccd6cSJohn Marino }
4042*ef5ccd6cSJohn Marino
4043*ef5ccd6cSJohn Marino const char *
gdbarch_stap_gdb_register_prefix(struct gdbarch * gdbarch)4044*ef5ccd6cSJohn Marino gdbarch_stap_gdb_register_prefix (struct gdbarch *gdbarch)
4045*ef5ccd6cSJohn Marino {
4046*ef5ccd6cSJohn Marino gdb_assert (gdbarch != NULL);
4047*ef5ccd6cSJohn Marino /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */
4048*ef5ccd6cSJohn Marino if (gdbarch_debug >= 2)
4049*ef5ccd6cSJohn Marino fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_gdb_register_prefix called\n");
4050*ef5ccd6cSJohn Marino return gdbarch->stap_gdb_register_prefix;
4051*ef5ccd6cSJohn Marino }
4052*ef5ccd6cSJohn Marino
4053*ef5ccd6cSJohn Marino void
set_gdbarch_stap_gdb_register_prefix(struct gdbarch * gdbarch,const char * stap_gdb_register_prefix)4054*ef5ccd6cSJohn Marino set_gdbarch_stap_gdb_register_prefix (struct gdbarch *gdbarch,
4055*ef5ccd6cSJohn Marino const char * stap_gdb_register_prefix)
4056*ef5ccd6cSJohn Marino {
4057*ef5ccd6cSJohn Marino gdbarch->stap_gdb_register_prefix = stap_gdb_register_prefix;
4058*ef5ccd6cSJohn Marino }
4059*ef5ccd6cSJohn Marino
4060*ef5ccd6cSJohn Marino const char *
gdbarch_stap_gdb_register_suffix(struct gdbarch * gdbarch)4061*ef5ccd6cSJohn Marino gdbarch_stap_gdb_register_suffix (struct gdbarch *gdbarch)
4062*ef5ccd6cSJohn Marino {
4063*ef5ccd6cSJohn Marino gdb_assert (gdbarch != NULL);
4064*ef5ccd6cSJohn Marino /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */
4065*ef5ccd6cSJohn Marino if (gdbarch_debug >= 2)
4066*ef5ccd6cSJohn Marino fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_gdb_register_suffix called\n");
4067*ef5ccd6cSJohn Marino return gdbarch->stap_gdb_register_suffix;
4068*ef5ccd6cSJohn Marino }
4069*ef5ccd6cSJohn Marino
4070*ef5ccd6cSJohn Marino void
set_gdbarch_stap_gdb_register_suffix(struct gdbarch * gdbarch,const char * stap_gdb_register_suffix)4071*ef5ccd6cSJohn Marino set_gdbarch_stap_gdb_register_suffix (struct gdbarch *gdbarch,
4072*ef5ccd6cSJohn Marino const char * stap_gdb_register_suffix)
4073*ef5ccd6cSJohn Marino {
4074*ef5ccd6cSJohn Marino gdbarch->stap_gdb_register_suffix = stap_gdb_register_suffix;
4075*ef5ccd6cSJohn Marino }
4076*ef5ccd6cSJohn Marino
4077*ef5ccd6cSJohn Marino int
gdbarch_stap_is_single_operand_p(struct gdbarch * gdbarch)4078*ef5ccd6cSJohn Marino gdbarch_stap_is_single_operand_p (struct gdbarch *gdbarch)
4079*ef5ccd6cSJohn Marino {
4080*ef5ccd6cSJohn Marino gdb_assert (gdbarch != NULL);
4081*ef5ccd6cSJohn Marino return gdbarch->stap_is_single_operand != NULL;
4082*ef5ccd6cSJohn Marino }
4083*ef5ccd6cSJohn Marino
4084*ef5ccd6cSJohn Marino int
gdbarch_stap_is_single_operand(struct gdbarch * gdbarch,const char * s)4085*ef5ccd6cSJohn Marino gdbarch_stap_is_single_operand (struct gdbarch *gdbarch, const char *s)
4086*ef5ccd6cSJohn Marino {
4087*ef5ccd6cSJohn Marino gdb_assert (gdbarch != NULL);
4088*ef5ccd6cSJohn Marino gdb_assert (gdbarch->stap_is_single_operand != NULL);
4089*ef5ccd6cSJohn Marino if (gdbarch_debug >= 2)
4090*ef5ccd6cSJohn Marino fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_is_single_operand called\n");
4091*ef5ccd6cSJohn Marino return gdbarch->stap_is_single_operand (gdbarch, s);
4092*ef5ccd6cSJohn Marino }
4093*ef5ccd6cSJohn Marino
4094*ef5ccd6cSJohn Marino void
set_gdbarch_stap_is_single_operand(struct gdbarch * gdbarch,gdbarch_stap_is_single_operand_ftype stap_is_single_operand)4095*ef5ccd6cSJohn Marino set_gdbarch_stap_is_single_operand (struct gdbarch *gdbarch,
4096*ef5ccd6cSJohn Marino gdbarch_stap_is_single_operand_ftype stap_is_single_operand)
4097*ef5ccd6cSJohn Marino {
4098*ef5ccd6cSJohn Marino gdbarch->stap_is_single_operand = stap_is_single_operand;
4099*ef5ccd6cSJohn Marino }
4100*ef5ccd6cSJohn Marino
4101*ef5ccd6cSJohn Marino int
gdbarch_stap_parse_special_token_p(struct gdbarch * gdbarch)4102*ef5ccd6cSJohn Marino gdbarch_stap_parse_special_token_p (struct gdbarch *gdbarch)
4103*ef5ccd6cSJohn Marino {
4104*ef5ccd6cSJohn Marino gdb_assert (gdbarch != NULL);
4105*ef5ccd6cSJohn Marino return gdbarch->stap_parse_special_token != NULL;
4106*ef5ccd6cSJohn Marino }
4107*ef5ccd6cSJohn Marino
4108*ef5ccd6cSJohn Marino int
gdbarch_stap_parse_special_token(struct gdbarch * gdbarch,struct stap_parse_info * p)4109*ef5ccd6cSJohn Marino gdbarch_stap_parse_special_token (struct gdbarch *gdbarch, struct stap_parse_info *p)
4110*ef5ccd6cSJohn Marino {
4111*ef5ccd6cSJohn Marino gdb_assert (gdbarch != NULL);
4112*ef5ccd6cSJohn Marino gdb_assert (gdbarch->stap_parse_special_token != NULL);
4113*ef5ccd6cSJohn Marino if (gdbarch_debug >= 2)
4114*ef5ccd6cSJohn Marino fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_parse_special_token called\n");
4115*ef5ccd6cSJohn Marino return gdbarch->stap_parse_special_token (gdbarch, p);
4116*ef5ccd6cSJohn Marino }
4117*ef5ccd6cSJohn Marino
4118*ef5ccd6cSJohn Marino void
set_gdbarch_stap_parse_special_token(struct gdbarch * gdbarch,gdbarch_stap_parse_special_token_ftype stap_parse_special_token)4119*ef5ccd6cSJohn Marino set_gdbarch_stap_parse_special_token (struct gdbarch *gdbarch,
4120*ef5ccd6cSJohn Marino gdbarch_stap_parse_special_token_ftype stap_parse_special_token)
4121*ef5ccd6cSJohn Marino {
4122*ef5ccd6cSJohn Marino gdbarch->stap_parse_special_token = stap_parse_special_token;
4123*ef5ccd6cSJohn Marino }
4124*ef5ccd6cSJohn Marino
41255796c8dcSSimon Schubert int
gdbarch_has_global_solist(struct gdbarch * gdbarch)41265796c8dcSSimon Schubert gdbarch_has_global_solist (struct gdbarch *gdbarch)
41275796c8dcSSimon Schubert {
41285796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
41295796c8dcSSimon Schubert /* Skip verify of has_global_solist, invalid_p == 0 */
41305796c8dcSSimon Schubert if (gdbarch_debug >= 2)
41315796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_has_global_solist called\n");
41325796c8dcSSimon Schubert return gdbarch->has_global_solist;
41335796c8dcSSimon Schubert }
41345796c8dcSSimon Schubert
41355796c8dcSSimon Schubert void
set_gdbarch_has_global_solist(struct gdbarch * gdbarch,int has_global_solist)41365796c8dcSSimon Schubert set_gdbarch_has_global_solist (struct gdbarch *gdbarch,
41375796c8dcSSimon Schubert int has_global_solist)
41385796c8dcSSimon Schubert {
41395796c8dcSSimon Schubert gdbarch->has_global_solist = has_global_solist;
41405796c8dcSSimon Schubert }
41415796c8dcSSimon Schubert
41425796c8dcSSimon Schubert int
gdbarch_has_global_breakpoints(struct gdbarch * gdbarch)41435796c8dcSSimon Schubert gdbarch_has_global_breakpoints (struct gdbarch *gdbarch)
41445796c8dcSSimon Schubert {
41455796c8dcSSimon Schubert gdb_assert (gdbarch != NULL);
41465796c8dcSSimon Schubert /* Skip verify of has_global_breakpoints, invalid_p == 0 */
41475796c8dcSSimon Schubert if (gdbarch_debug >= 2)
41485796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_has_global_breakpoints called\n");
41495796c8dcSSimon Schubert return gdbarch->has_global_breakpoints;
41505796c8dcSSimon Schubert }
41515796c8dcSSimon Schubert
41525796c8dcSSimon Schubert void
set_gdbarch_has_global_breakpoints(struct gdbarch * gdbarch,int has_global_breakpoints)41535796c8dcSSimon Schubert set_gdbarch_has_global_breakpoints (struct gdbarch *gdbarch,
41545796c8dcSSimon Schubert int has_global_breakpoints)
41555796c8dcSSimon Schubert {
41565796c8dcSSimon Schubert gdbarch->has_global_breakpoints = has_global_breakpoints;
41575796c8dcSSimon Schubert }
41585796c8dcSSimon Schubert
4159cf7f2e2dSJohn Marino int
gdbarch_has_shared_address_space(struct gdbarch * gdbarch)4160cf7f2e2dSJohn Marino gdbarch_has_shared_address_space (struct gdbarch *gdbarch)
4161cf7f2e2dSJohn Marino {
4162cf7f2e2dSJohn Marino gdb_assert (gdbarch != NULL);
4163cf7f2e2dSJohn Marino gdb_assert (gdbarch->has_shared_address_space != NULL);
4164cf7f2e2dSJohn Marino if (gdbarch_debug >= 2)
4165cf7f2e2dSJohn Marino fprintf_unfiltered (gdb_stdlog, "gdbarch_has_shared_address_space called\n");
4166cf7f2e2dSJohn Marino return gdbarch->has_shared_address_space (gdbarch);
4167cf7f2e2dSJohn Marino }
4168cf7f2e2dSJohn Marino
4169cf7f2e2dSJohn Marino void
set_gdbarch_has_shared_address_space(struct gdbarch * gdbarch,gdbarch_has_shared_address_space_ftype has_shared_address_space)4170cf7f2e2dSJohn Marino set_gdbarch_has_shared_address_space (struct gdbarch *gdbarch,
4171cf7f2e2dSJohn Marino gdbarch_has_shared_address_space_ftype has_shared_address_space)
4172cf7f2e2dSJohn Marino {
4173cf7f2e2dSJohn Marino gdbarch->has_shared_address_space = has_shared_address_space;
4174cf7f2e2dSJohn Marino }
4175cf7f2e2dSJohn Marino
4176cf7f2e2dSJohn Marino int
gdbarch_fast_tracepoint_valid_at(struct gdbarch * gdbarch,CORE_ADDR addr,int * isize,char ** msg)4177cf7f2e2dSJohn Marino gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch, CORE_ADDR addr, int *isize, char **msg)
4178cf7f2e2dSJohn Marino {
4179cf7f2e2dSJohn Marino gdb_assert (gdbarch != NULL);
4180cf7f2e2dSJohn Marino gdb_assert (gdbarch->fast_tracepoint_valid_at != NULL);
4181cf7f2e2dSJohn Marino if (gdbarch_debug >= 2)
4182cf7f2e2dSJohn Marino fprintf_unfiltered (gdb_stdlog, "gdbarch_fast_tracepoint_valid_at called\n");
4183cf7f2e2dSJohn Marino return gdbarch->fast_tracepoint_valid_at (gdbarch, addr, isize, msg);
4184cf7f2e2dSJohn Marino }
4185cf7f2e2dSJohn Marino
4186cf7f2e2dSJohn Marino void
set_gdbarch_fast_tracepoint_valid_at(struct gdbarch * gdbarch,gdbarch_fast_tracepoint_valid_at_ftype fast_tracepoint_valid_at)4187cf7f2e2dSJohn Marino set_gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch,
4188cf7f2e2dSJohn Marino gdbarch_fast_tracepoint_valid_at_ftype fast_tracepoint_valid_at)
4189cf7f2e2dSJohn Marino {
4190cf7f2e2dSJohn Marino gdbarch->fast_tracepoint_valid_at = fast_tracepoint_valid_at;
4191cf7f2e2dSJohn Marino }
4192cf7f2e2dSJohn Marino
4193cf7f2e2dSJohn Marino const char *
gdbarch_auto_charset(struct gdbarch * gdbarch)4194cf7f2e2dSJohn Marino gdbarch_auto_charset (struct gdbarch *gdbarch)
4195cf7f2e2dSJohn Marino {
4196cf7f2e2dSJohn Marino gdb_assert (gdbarch != NULL);
4197cf7f2e2dSJohn Marino gdb_assert (gdbarch->auto_charset != NULL);
4198cf7f2e2dSJohn Marino if (gdbarch_debug >= 2)
4199cf7f2e2dSJohn Marino fprintf_unfiltered (gdb_stdlog, "gdbarch_auto_charset called\n");
4200cf7f2e2dSJohn Marino return gdbarch->auto_charset ();
4201cf7f2e2dSJohn Marino }
4202cf7f2e2dSJohn Marino
4203cf7f2e2dSJohn Marino void
set_gdbarch_auto_charset(struct gdbarch * gdbarch,gdbarch_auto_charset_ftype auto_charset)4204cf7f2e2dSJohn Marino set_gdbarch_auto_charset (struct gdbarch *gdbarch,
4205cf7f2e2dSJohn Marino gdbarch_auto_charset_ftype auto_charset)
4206cf7f2e2dSJohn Marino {
4207cf7f2e2dSJohn Marino gdbarch->auto_charset = auto_charset;
4208cf7f2e2dSJohn Marino }
4209cf7f2e2dSJohn Marino
4210cf7f2e2dSJohn Marino const char *
gdbarch_auto_wide_charset(struct gdbarch * gdbarch)4211cf7f2e2dSJohn Marino gdbarch_auto_wide_charset (struct gdbarch *gdbarch)
4212cf7f2e2dSJohn Marino {
4213cf7f2e2dSJohn Marino gdb_assert (gdbarch != NULL);
4214cf7f2e2dSJohn Marino gdb_assert (gdbarch->auto_wide_charset != NULL);
4215cf7f2e2dSJohn Marino if (gdbarch_debug >= 2)
4216cf7f2e2dSJohn Marino fprintf_unfiltered (gdb_stdlog, "gdbarch_auto_wide_charset called\n");
4217cf7f2e2dSJohn Marino return gdbarch->auto_wide_charset ();
4218cf7f2e2dSJohn Marino }
4219cf7f2e2dSJohn Marino
4220cf7f2e2dSJohn Marino void
set_gdbarch_auto_wide_charset(struct gdbarch * gdbarch,gdbarch_auto_wide_charset_ftype auto_wide_charset)4221cf7f2e2dSJohn Marino set_gdbarch_auto_wide_charset (struct gdbarch *gdbarch,
4222cf7f2e2dSJohn Marino gdbarch_auto_wide_charset_ftype auto_wide_charset)
4223cf7f2e2dSJohn Marino {
4224cf7f2e2dSJohn Marino gdbarch->auto_wide_charset = auto_wide_charset;
4225cf7f2e2dSJohn Marino }
4226cf7f2e2dSJohn Marino
4227cf7f2e2dSJohn Marino const char *
gdbarch_solib_symbols_extension(struct gdbarch * gdbarch)4228cf7f2e2dSJohn Marino gdbarch_solib_symbols_extension (struct gdbarch *gdbarch)
4229cf7f2e2dSJohn Marino {
4230cf7f2e2dSJohn Marino gdb_assert (gdbarch != NULL);
4231cf7f2e2dSJohn Marino if (gdbarch_debug >= 2)
4232cf7f2e2dSJohn Marino fprintf_unfiltered (gdb_stdlog, "gdbarch_solib_symbols_extension called\n");
4233cf7f2e2dSJohn Marino return gdbarch->solib_symbols_extension;
4234cf7f2e2dSJohn Marino }
4235cf7f2e2dSJohn Marino
4236cf7f2e2dSJohn Marino void
set_gdbarch_solib_symbols_extension(struct gdbarch * gdbarch,const char * solib_symbols_extension)4237cf7f2e2dSJohn Marino set_gdbarch_solib_symbols_extension (struct gdbarch *gdbarch,
4238cf7f2e2dSJohn Marino const char * solib_symbols_extension)
4239cf7f2e2dSJohn Marino {
4240cf7f2e2dSJohn Marino gdbarch->solib_symbols_extension = solib_symbols_extension;
4241cf7f2e2dSJohn Marino }
4242cf7f2e2dSJohn Marino
4243cf7f2e2dSJohn Marino int
gdbarch_has_dos_based_file_system(struct gdbarch * gdbarch)4244cf7f2e2dSJohn Marino gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch)
4245cf7f2e2dSJohn Marino {
4246cf7f2e2dSJohn Marino gdb_assert (gdbarch != NULL);
4247cf7f2e2dSJohn Marino /* Skip verify of has_dos_based_file_system, invalid_p == 0 */
4248cf7f2e2dSJohn Marino if (gdbarch_debug >= 2)
4249cf7f2e2dSJohn Marino fprintf_unfiltered (gdb_stdlog, "gdbarch_has_dos_based_file_system called\n");
4250cf7f2e2dSJohn Marino return gdbarch->has_dos_based_file_system;
4251cf7f2e2dSJohn Marino }
4252cf7f2e2dSJohn Marino
4253cf7f2e2dSJohn Marino void
set_gdbarch_has_dos_based_file_system(struct gdbarch * gdbarch,int has_dos_based_file_system)4254cf7f2e2dSJohn Marino set_gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch,
4255cf7f2e2dSJohn Marino int has_dos_based_file_system)
4256cf7f2e2dSJohn Marino {
4257cf7f2e2dSJohn Marino gdbarch->has_dos_based_file_system = has_dos_based_file_system;
4258cf7f2e2dSJohn Marino }
4259cf7f2e2dSJohn Marino
4260a45ae5f8SJohn Marino void
gdbarch_gen_return_address(struct gdbarch * gdbarch,struct agent_expr * ax,struct axs_value * value,CORE_ADDR scope)4261a45ae5f8SJohn Marino gdbarch_gen_return_address (struct gdbarch *gdbarch, struct agent_expr *ax, struct axs_value *value, CORE_ADDR scope)
4262a45ae5f8SJohn Marino {
4263a45ae5f8SJohn Marino gdb_assert (gdbarch != NULL);
4264a45ae5f8SJohn Marino gdb_assert (gdbarch->gen_return_address != NULL);
4265a45ae5f8SJohn Marino if (gdbarch_debug >= 2)
4266a45ae5f8SJohn Marino fprintf_unfiltered (gdb_stdlog, "gdbarch_gen_return_address called\n");
4267a45ae5f8SJohn Marino gdbarch->gen_return_address (gdbarch, ax, value, scope);
4268a45ae5f8SJohn Marino }
4269a45ae5f8SJohn Marino
4270a45ae5f8SJohn Marino void
set_gdbarch_gen_return_address(struct gdbarch * gdbarch,gdbarch_gen_return_address_ftype gen_return_address)4271a45ae5f8SJohn Marino set_gdbarch_gen_return_address (struct gdbarch *gdbarch,
4272a45ae5f8SJohn Marino gdbarch_gen_return_address_ftype gen_return_address)
4273a45ae5f8SJohn Marino {
4274a45ae5f8SJohn Marino gdbarch->gen_return_address = gen_return_address;
4275a45ae5f8SJohn Marino }
4276a45ae5f8SJohn Marino
4277*ef5ccd6cSJohn Marino int
gdbarch_info_proc_p(struct gdbarch * gdbarch)4278*ef5ccd6cSJohn Marino gdbarch_info_proc_p (struct gdbarch *gdbarch)
4279*ef5ccd6cSJohn Marino {
4280*ef5ccd6cSJohn Marino gdb_assert (gdbarch != NULL);
4281*ef5ccd6cSJohn Marino return gdbarch->info_proc != NULL;
4282*ef5ccd6cSJohn Marino }
4283*ef5ccd6cSJohn Marino
4284*ef5ccd6cSJohn Marino void
gdbarch_info_proc(struct gdbarch * gdbarch,char * args,enum info_proc_what what)4285*ef5ccd6cSJohn Marino gdbarch_info_proc (struct gdbarch *gdbarch, char *args, enum info_proc_what what)
4286*ef5ccd6cSJohn Marino {
4287*ef5ccd6cSJohn Marino gdb_assert (gdbarch != NULL);
4288*ef5ccd6cSJohn Marino gdb_assert (gdbarch->info_proc != NULL);
4289*ef5ccd6cSJohn Marino if (gdbarch_debug >= 2)
4290*ef5ccd6cSJohn Marino fprintf_unfiltered (gdb_stdlog, "gdbarch_info_proc called\n");
4291*ef5ccd6cSJohn Marino gdbarch->info_proc (gdbarch, args, what);
4292*ef5ccd6cSJohn Marino }
4293*ef5ccd6cSJohn Marino
4294*ef5ccd6cSJohn Marino void
set_gdbarch_info_proc(struct gdbarch * gdbarch,gdbarch_info_proc_ftype info_proc)4295*ef5ccd6cSJohn Marino set_gdbarch_info_proc (struct gdbarch *gdbarch,
4296*ef5ccd6cSJohn Marino gdbarch_info_proc_ftype info_proc)
4297*ef5ccd6cSJohn Marino {
4298*ef5ccd6cSJohn Marino gdbarch->info_proc = info_proc;
4299*ef5ccd6cSJohn Marino }
4300*ef5ccd6cSJohn Marino
4301*ef5ccd6cSJohn Marino int
gdbarch_core_info_proc_p(struct gdbarch * gdbarch)4302*ef5ccd6cSJohn Marino gdbarch_core_info_proc_p (struct gdbarch *gdbarch)
4303*ef5ccd6cSJohn Marino {
4304*ef5ccd6cSJohn Marino gdb_assert (gdbarch != NULL);
4305*ef5ccd6cSJohn Marino return gdbarch->core_info_proc != NULL;
4306*ef5ccd6cSJohn Marino }
4307*ef5ccd6cSJohn Marino
4308*ef5ccd6cSJohn Marino void
gdbarch_core_info_proc(struct gdbarch * gdbarch,char * args,enum info_proc_what what)4309*ef5ccd6cSJohn Marino gdbarch_core_info_proc (struct gdbarch *gdbarch, char *args, enum info_proc_what what)
4310*ef5ccd6cSJohn Marino {
4311*ef5ccd6cSJohn Marino gdb_assert (gdbarch != NULL);
4312*ef5ccd6cSJohn Marino gdb_assert (gdbarch->core_info_proc != NULL);
4313*ef5ccd6cSJohn Marino if (gdbarch_debug >= 2)
4314*ef5ccd6cSJohn Marino fprintf_unfiltered (gdb_stdlog, "gdbarch_core_info_proc called\n");
4315*ef5ccd6cSJohn Marino gdbarch->core_info_proc (gdbarch, args, what);
4316*ef5ccd6cSJohn Marino }
4317*ef5ccd6cSJohn Marino
4318*ef5ccd6cSJohn Marino void
set_gdbarch_core_info_proc(struct gdbarch * gdbarch,gdbarch_core_info_proc_ftype core_info_proc)4319*ef5ccd6cSJohn Marino set_gdbarch_core_info_proc (struct gdbarch *gdbarch,
4320*ef5ccd6cSJohn Marino gdbarch_core_info_proc_ftype core_info_proc)
4321*ef5ccd6cSJohn Marino {
4322*ef5ccd6cSJohn Marino gdbarch->core_info_proc = core_info_proc;
4323*ef5ccd6cSJohn Marino }
4324*ef5ccd6cSJohn Marino
4325*ef5ccd6cSJohn Marino void
gdbarch_iterate_over_objfiles_in_search_order(struct gdbarch * gdbarch,iterate_over_objfiles_in_search_order_cb_ftype * cb,void * cb_data,struct objfile * current_objfile)4326*ef5ccd6cSJohn Marino gdbarch_iterate_over_objfiles_in_search_order (struct gdbarch *gdbarch, iterate_over_objfiles_in_search_order_cb_ftype *cb, void *cb_data, struct objfile *current_objfile)
4327*ef5ccd6cSJohn Marino {
4328*ef5ccd6cSJohn Marino gdb_assert (gdbarch != NULL);
4329*ef5ccd6cSJohn Marino gdb_assert (gdbarch->iterate_over_objfiles_in_search_order != NULL);
4330*ef5ccd6cSJohn Marino if (gdbarch_debug >= 2)
4331*ef5ccd6cSJohn Marino fprintf_unfiltered (gdb_stdlog, "gdbarch_iterate_over_objfiles_in_search_order called\n");
4332*ef5ccd6cSJohn Marino gdbarch->iterate_over_objfiles_in_search_order (gdbarch, cb, cb_data, current_objfile);
4333*ef5ccd6cSJohn Marino }
4334*ef5ccd6cSJohn Marino
4335*ef5ccd6cSJohn Marino void
set_gdbarch_iterate_over_objfiles_in_search_order(struct gdbarch * gdbarch,gdbarch_iterate_over_objfiles_in_search_order_ftype iterate_over_objfiles_in_search_order)4336*ef5ccd6cSJohn Marino set_gdbarch_iterate_over_objfiles_in_search_order (struct gdbarch *gdbarch,
4337*ef5ccd6cSJohn Marino gdbarch_iterate_over_objfiles_in_search_order_ftype iterate_over_objfiles_in_search_order)
4338*ef5ccd6cSJohn Marino {
4339*ef5ccd6cSJohn Marino gdbarch->iterate_over_objfiles_in_search_order = iterate_over_objfiles_in_search_order;
4340*ef5ccd6cSJohn Marino }
4341*ef5ccd6cSJohn Marino
4342*ef5ccd6cSJohn Marino struct ravenscar_arch_ops *
gdbarch_ravenscar_ops(struct gdbarch * gdbarch)4343*ef5ccd6cSJohn Marino gdbarch_ravenscar_ops (struct gdbarch *gdbarch)
4344*ef5ccd6cSJohn Marino {
4345*ef5ccd6cSJohn Marino gdb_assert (gdbarch != NULL);
4346*ef5ccd6cSJohn Marino /* Skip verify of ravenscar_ops, invalid_p == 0 */
4347*ef5ccd6cSJohn Marino if (gdbarch_debug >= 2)
4348*ef5ccd6cSJohn Marino fprintf_unfiltered (gdb_stdlog, "gdbarch_ravenscar_ops called\n");
4349*ef5ccd6cSJohn Marino return gdbarch->ravenscar_ops;
4350*ef5ccd6cSJohn Marino }
4351*ef5ccd6cSJohn Marino
4352*ef5ccd6cSJohn Marino void
set_gdbarch_ravenscar_ops(struct gdbarch * gdbarch,struct ravenscar_arch_ops * ravenscar_ops)4353*ef5ccd6cSJohn Marino set_gdbarch_ravenscar_ops (struct gdbarch *gdbarch,
4354*ef5ccd6cSJohn Marino struct ravenscar_arch_ops * ravenscar_ops)
4355*ef5ccd6cSJohn Marino {
4356*ef5ccd6cSJohn Marino gdbarch->ravenscar_ops = ravenscar_ops;
4357*ef5ccd6cSJohn Marino }
4358*ef5ccd6cSJohn Marino
43595796c8dcSSimon Schubert
43605796c8dcSSimon Schubert /* Keep a registry of per-architecture data-pointers required by GDB
43615796c8dcSSimon Schubert modules. */
43625796c8dcSSimon Schubert
43635796c8dcSSimon Schubert struct gdbarch_data
43645796c8dcSSimon Schubert {
43655796c8dcSSimon Schubert unsigned index;
43665796c8dcSSimon Schubert int init_p;
43675796c8dcSSimon Schubert gdbarch_data_pre_init_ftype *pre_init;
43685796c8dcSSimon Schubert gdbarch_data_post_init_ftype *post_init;
43695796c8dcSSimon Schubert };
43705796c8dcSSimon Schubert
43715796c8dcSSimon Schubert struct gdbarch_data_registration
43725796c8dcSSimon Schubert {
43735796c8dcSSimon Schubert struct gdbarch_data *data;
43745796c8dcSSimon Schubert struct gdbarch_data_registration *next;
43755796c8dcSSimon Schubert };
43765796c8dcSSimon Schubert
43775796c8dcSSimon Schubert struct gdbarch_data_registry
43785796c8dcSSimon Schubert {
43795796c8dcSSimon Schubert unsigned nr;
43805796c8dcSSimon Schubert struct gdbarch_data_registration *registrations;
43815796c8dcSSimon Schubert };
43825796c8dcSSimon Schubert
43835796c8dcSSimon Schubert struct gdbarch_data_registry gdbarch_data_registry =
43845796c8dcSSimon Schubert {
43855796c8dcSSimon Schubert 0, NULL,
43865796c8dcSSimon Schubert };
43875796c8dcSSimon Schubert
43885796c8dcSSimon Schubert static struct gdbarch_data *
gdbarch_data_register(gdbarch_data_pre_init_ftype * pre_init,gdbarch_data_post_init_ftype * post_init)43895796c8dcSSimon Schubert gdbarch_data_register (gdbarch_data_pre_init_ftype *pre_init,
43905796c8dcSSimon Schubert gdbarch_data_post_init_ftype *post_init)
43915796c8dcSSimon Schubert {
43925796c8dcSSimon Schubert struct gdbarch_data_registration **curr;
4393cf7f2e2dSJohn Marino
4394cf7f2e2dSJohn Marino /* Append the new registration. */
43955796c8dcSSimon Schubert for (curr = &gdbarch_data_registry.registrations;
43965796c8dcSSimon Schubert (*curr) != NULL;
43975796c8dcSSimon Schubert curr = &(*curr)->next);
43985796c8dcSSimon Schubert (*curr) = XMALLOC (struct gdbarch_data_registration);
43995796c8dcSSimon Schubert (*curr)->next = NULL;
44005796c8dcSSimon Schubert (*curr)->data = XMALLOC (struct gdbarch_data);
44015796c8dcSSimon Schubert (*curr)->data->index = gdbarch_data_registry.nr++;
44025796c8dcSSimon Schubert (*curr)->data->pre_init = pre_init;
44035796c8dcSSimon Schubert (*curr)->data->post_init = post_init;
44045796c8dcSSimon Schubert (*curr)->data->init_p = 1;
44055796c8dcSSimon Schubert return (*curr)->data;
44065796c8dcSSimon Schubert }
44075796c8dcSSimon Schubert
44085796c8dcSSimon Schubert struct gdbarch_data *
gdbarch_data_register_pre_init(gdbarch_data_pre_init_ftype * pre_init)44095796c8dcSSimon Schubert gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype *pre_init)
44105796c8dcSSimon Schubert {
44115796c8dcSSimon Schubert return gdbarch_data_register (pre_init, NULL);
44125796c8dcSSimon Schubert }
44135796c8dcSSimon Schubert
44145796c8dcSSimon Schubert struct gdbarch_data *
gdbarch_data_register_post_init(gdbarch_data_post_init_ftype * post_init)44155796c8dcSSimon Schubert gdbarch_data_register_post_init (gdbarch_data_post_init_ftype *post_init)
44165796c8dcSSimon Schubert {
44175796c8dcSSimon Schubert return gdbarch_data_register (NULL, post_init);
44185796c8dcSSimon Schubert }
44195796c8dcSSimon Schubert
44205796c8dcSSimon Schubert /* Create/delete the gdbarch data vector. */
44215796c8dcSSimon Schubert
44225796c8dcSSimon Schubert static void
alloc_gdbarch_data(struct gdbarch * gdbarch)44235796c8dcSSimon Schubert alloc_gdbarch_data (struct gdbarch *gdbarch)
44245796c8dcSSimon Schubert {
44255796c8dcSSimon Schubert gdb_assert (gdbarch->data == NULL);
44265796c8dcSSimon Schubert gdbarch->nr_data = gdbarch_data_registry.nr;
44275796c8dcSSimon Schubert gdbarch->data = GDBARCH_OBSTACK_CALLOC (gdbarch, gdbarch->nr_data, void *);
44285796c8dcSSimon Schubert }
44295796c8dcSSimon Schubert
44305796c8dcSSimon Schubert /* Initialize the current value of the specified per-architecture
44315796c8dcSSimon Schubert data-pointer. */
44325796c8dcSSimon Schubert
44335796c8dcSSimon Schubert void
deprecated_set_gdbarch_data(struct gdbarch * gdbarch,struct gdbarch_data * data,void * pointer)44345796c8dcSSimon Schubert deprecated_set_gdbarch_data (struct gdbarch *gdbarch,
44355796c8dcSSimon Schubert struct gdbarch_data *data,
44365796c8dcSSimon Schubert void *pointer)
44375796c8dcSSimon Schubert {
44385796c8dcSSimon Schubert gdb_assert (data->index < gdbarch->nr_data);
44395796c8dcSSimon Schubert gdb_assert (gdbarch->data[data->index] == NULL);
44405796c8dcSSimon Schubert gdb_assert (data->pre_init == NULL);
44415796c8dcSSimon Schubert gdbarch->data[data->index] = pointer;
44425796c8dcSSimon Schubert }
44435796c8dcSSimon Schubert
44445796c8dcSSimon Schubert /* Return the current value of the specified per-architecture
44455796c8dcSSimon Schubert data-pointer. */
44465796c8dcSSimon Schubert
44475796c8dcSSimon Schubert void *
gdbarch_data(struct gdbarch * gdbarch,struct gdbarch_data * data)44485796c8dcSSimon Schubert gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
44495796c8dcSSimon Schubert {
44505796c8dcSSimon Schubert gdb_assert (data->index < gdbarch->nr_data);
44515796c8dcSSimon Schubert if (gdbarch->data[data->index] == NULL)
44525796c8dcSSimon Schubert {
44535796c8dcSSimon Schubert /* The data-pointer isn't initialized, call init() to get a
44545796c8dcSSimon Schubert value. */
44555796c8dcSSimon Schubert if (data->pre_init != NULL)
44565796c8dcSSimon Schubert /* Mid architecture creation: pass just the obstack, and not
44575796c8dcSSimon Schubert the entire architecture, as that way it isn't possible for
44585796c8dcSSimon Schubert pre-init code to refer to undefined architecture
44595796c8dcSSimon Schubert fields. */
44605796c8dcSSimon Schubert gdbarch->data[data->index] = data->pre_init (gdbarch->obstack);
44615796c8dcSSimon Schubert else if (gdbarch->initialized_p
44625796c8dcSSimon Schubert && data->post_init != NULL)
44635796c8dcSSimon Schubert /* Post architecture creation: pass the entire architecture
44645796c8dcSSimon Schubert (as all fields are valid), but be careful to also detect
44655796c8dcSSimon Schubert recursive references. */
44665796c8dcSSimon Schubert {
44675796c8dcSSimon Schubert gdb_assert (data->init_p);
44685796c8dcSSimon Schubert data->init_p = 0;
44695796c8dcSSimon Schubert gdbarch->data[data->index] = data->post_init (gdbarch);
44705796c8dcSSimon Schubert data->init_p = 1;
44715796c8dcSSimon Schubert }
44725796c8dcSSimon Schubert else
44735796c8dcSSimon Schubert /* The architecture initialization hasn't completed - punt -
44745796c8dcSSimon Schubert hope that the caller knows what they are doing. Once
44755796c8dcSSimon Schubert deprecated_set_gdbarch_data has been initialized, this can be
44765796c8dcSSimon Schubert changed to an internal error. */
44775796c8dcSSimon Schubert return NULL;
44785796c8dcSSimon Schubert gdb_assert (gdbarch->data[data->index] != NULL);
44795796c8dcSSimon Schubert }
44805796c8dcSSimon Schubert return gdbarch->data[data->index];
44815796c8dcSSimon Schubert }
44825796c8dcSSimon Schubert
44835796c8dcSSimon Schubert
44845796c8dcSSimon Schubert /* Keep a registry of the architectures known by GDB. */
44855796c8dcSSimon Schubert
44865796c8dcSSimon Schubert struct gdbarch_registration
44875796c8dcSSimon Schubert {
44885796c8dcSSimon Schubert enum bfd_architecture bfd_architecture;
44895796c8dcSSimon Schubert gdbarch_init_ftype *init;
44905796c8dcSSimon Schubert gdbarch_dump_tdep_ftype *dump_tdep;
44915796c8dcSSimon Schubert struct gdbarch_list *arches;
44925796c8dcSSimon Schubert struct gdbarch_registration *next;
44935796c8dcSSimon Schubert };
44945796c8dcSSimon Schubert
44955796c8dcSSimon Schubert static struct gdbarch_registration *gdbarch_registry = NULL;
44965796c8dcSSimon Schubert
44975796c8dcSSimon Schubert static void
append_name(const char *** buf,int * nr,const char * name)44985796c8dcSSimon Schubert append_name (const char ***buf, int *nr, const char *name)
44995796c8dcSSimon Schubert {
45005796c8dcSSimon Schubert *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
45015796c8dcSSimon Schubert (*buf)[*nr] = name;
45025796c8dcSSimon Schubert *nr += 1;
45035796c8dcSSimon Schubert }
45045796c8dcSSimon Schubert
45055796c8dcSSimon Schubert const char **
gdbarch_printable_names(void)45065796c8dcSSimon Schubert gdbarch_printable_names (void)
45075796c8dcSSimon Schubert {
45085796c8dcSSimon Schubert /* Accumulate a list of names based on the registed list of
45095796c8dcSSimon Schubert architectures. */
45105796c8dcSSimon Schubert int nr_arches = 0;
45115796c8dcSSimon Schubert const char **arches = NULL;
45125796c8dcSSimon Schubert struct gdbarch_registration *rego;
4513cf7f2e2dSJohn Marino
45145796c8dcSSimon Schubert for (rego = gdbarch_registry;
45155796c8dcSSimon Schubert rego != NULL;
45165796c8dcSSimon Schubert rego = rego->next)
45175796c8dcSSimon Schubert {
45185796c8dcSSimon Schubert const struct bfd_arch_info *ap;
45195796c8dcSSimon Schubert ap = bfd_lookup_arch (rego->bfd_architecture, 0);
45205796c8dcSSimon Schubert if (ap == NULL)
45215796c8dcSSimon Schubert internal_error (__FILE__, __LINE__,
45225796c8dcSSimon Schubert _("gdbarch_architecture_names: multi-arch unknown"));
45235796c8dcSSimon Schubert do
45245796c8dcSSimon Schubert {
45255796c8dcSSimon Schubert append_name (&arches, &nr_arches, ap->printable_name);
45265796c8dcSSimon Schubert ap = ap->next;
45275796c8dcSSimon Schubert }
45285796c8dcSSimon Schubert while (ap != NULL);
45295796c8dcSSimon Schubert }
45305796c8dcSSimon Schubert append_name (&arches, &nr_arches, NULL);
45315796c8dcSSimon Schubert return arches;
45325796c8dcSSimon Schubert }
45335796c8dcSSimon Schubert
45345796c8dcSSimon Schubert
45355796c8dcSSimon Schubert void
gdbarch_register(enum bfd_architecture bfd_architecture,gdbarch_init_ftype * init,gdbarch_dump_tdep_ftype * dump_tdep)45365796c8dcSSimon Schubert gdbarch_register (enum bfd_architecture bfd_architecture,
45375796c8dcSSimon Schubert gdbarch_init_ftype *init,
45385796c8dcSSimon Schubert gdbarch_dump_tdep_ftype *dump_tdep)
45395796c8dcSSimon Schubert {
45405796c8dcSSimon Schubert struct gdbarch_registration **curr;
45415796c8dcSSimon Schubert const struct bfd_arch_info *bfd_arch_info;
4542cf7f2e2dSJohn Marino
45435796c8dcSSimon Schubert /* Check that BFD recognizes this architecture */
45445796c8dcSSimon Schubert bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
45455796c8dcSSimon Schubert if (bfd_arch_info == NULL)
45465796c8dcSSimon Schubert {
45475796c8dcSSimon Schubert internal_error (__FILE__, __LINE__,
4548c50c785cSJohn Marino _("gdbarch: Attempt to register "
4549c50c785cSJohn Marino "unknown architecture (%d)"),
45505796c8dcSSimon Schubert bfd_architecture);
45515796c8dcSSimon Schubert }
4552c50c785cSJohn Marino /* Check that we haven't seen this architecture before. */
45535796c8dcSSimon Schubert for (curr = &gdbarch_registry;
45545796c8dcSSimon Schubert (*curr) != NULL;
45555796c8dcSSimon Schubert curr = &(*curr)->next)
45565796c8dcSSimon Schubert {
45575796c8dcSSimon Schubert if (bfd_architecture == (*curr)->bfd_architecture)
45585796c8dcSSimon Schubert internal_error (__FILE__, __LINE__,
4559a45ae5f8SJohn Marino _("gdbarch: Duplicate registration "
4560c50c785cSJohn Marino "of architecture (%s)"),
45615796c8dcSSimon Schubert bfd_arch_info->printable_name);
45625796c8dcSSimon Schubert }
45635796c8dcSSimon Schubert /* log it */
45645796c8dcSSimon Schubert if (gdbarch_debug)
45655796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, %s)\n",
45665796c8dcSSimon Schubert bfd_arch_info->printable_name,
45675796c8dcSSimon Schubert host_address_to_string (init));
45685796c8dcSSimon Schubert /* Append it */
45695796c8dcSSimon Schubert (*curr) = XMALLOC (struct gdbarch_registration);
45705796c8dcSSimon Schubert (*curr)->bfd_architecture = bfd_architecture;
45715796c8dcSSimon Schubert (*curr)->init = init;
45725796c8dcSSimon Schubert (*curr)->dump_tdep = dump_tdep;
45735796c8dcSSimon Schubert (*curr)->arches = NULL;
45745796c8dcSSimon Schubert (*curr)->next = NULL;
45755796c8dcSSimon Schubert }
45765796c8dcSSimon Schubert
45775796c8dcSSimon Schubert void
register_gdbarch_init(enum bfd_architecture bfd_architecture,gdbarch_init_ftype * init)45785796c8dcSSimon Schubert register_gdbarch_init (enum bfd_architecture bfd_architecture,
45795796c8dcSSimon Schubert gdbarch_init_ftype *init)
45805796c8dcSSimon Schubert {
45815796c8dcSSimon Schubert gdbarch_register (bfd_architecture, init, NULL);
45825796c8dcSSimon Schubert }
45835796c8dcSSimon Schubert
45845796c8dcSSimon Schubert
45855796c8dcSSimon Schubert /* Look for an architecture using gdbarch_info. */
45865796c8dcSSimon Schubert
45875796c8dcSSimon Schubert struct gdbarch_list *
gdbarch_list_lookup_by_info(struct gdbarch_list * arches,const struct gdbarch_info * info)45885796c8dcSSimon Schubert gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
45895796c8dcSSimon Schubert const struct gdbarch_info *info)
45905796c8dcSSimon Schubert {
45915796c8dcSSimon Schubert for (; arches != NULL; arches = arches->next)
45925796c8dcSSimon Schubert {
45935796c8dcSSimon Schubert if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
45945796c8dcSSimon Schubert continue;
45955796c8dcSSimon Schubert if (info->byte_order != arches->gdbarch->byte_order)
45965796c8dcSSimon Schubert continue;
45975796c8dcSSimon Schubert if (info->osabi != arches->gdbarch->osabi)
45985796c8dcSSimon Schubert continue;
45995796c8dcSSimon Schubert if (info->target_desc != arches->gdbarch->target_desc)
46005796c8dcSSimon Schubert continue;
46015796c8dcSSimon Schubert return arches;
46025796c8dcSSimon Schubert }
46035796c8dcSSimon Schubert return NULL;
46045796c8dcSSimon Schubert }
46055796c8dcSSimon Schubert
46065796c8dcSSimon Schubert
46075796c8dcSSimon Schubert /* Find an architecture that matches the specified INFO. Create a new
46085796c8dcSSimon Schubert architecture if needed. Return that new architecture. */
46095796c8dcSSimon Schubert
46105796c8dcSSimon Schubert struct gdbarch *
gdbarch_find_by_info(struct gdbarch_info info)46115796c8dcSSimon Schubert gdbarch_find_by_info (struct gdbarch_info info)
46125796c8dcSSimon Schubert {
46135796c8dcSSimon Schubert struct gdbarch *new_gdbarch;
46145796c8dcSSimon Schubert struct gdbarch_registration *rego;
46155796c8dcSSimon Schubert
46165796c8dcSSimon Schubert /* Fill in missing parts of the INFO struct using a number of
46175796c8dcSSimon Schubert sources: "set ..."; INFOabfd supplied; and the global
46185796c8dcSSimon Schubert defaults. */
46195796c8dcSSimon Schubert gdbarch_info_fill (&info);
46205796c8dcSSimon Schubert
46215796c8dcSSimon Schubert /* Must have found some sort of architecture. */
46225796c8dcSSimon Schubert gdb_assert (info.bfd_arch_info != NULL);
46235796c8dcSSimon Schubert
46245796c8dcSSimon Schubert if (gdbarch_debug)
46255796c8dcSSimon Schubert {
46265796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog,
46275796c8dcSSimon Schubert "gdbarch_find_by_info: info.bfd_arch_info %s\n",
46285796c8dcSSimon Schubert (info.bfd_arch_info != NULL
46295796c8dcSSimon Schubert ? info.bfd_arch_info->printable_name
46305796c8dcSSimon Schubert : "(null)"));
46315796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog,
46325796c8dcSSimon Schubert "gdbarch_find_by_info: info.byte_order %d (%s)\n",
46335796c8dcSSimon Schubert info.byte_order,
46345796c8dcSSimon Schubert (info.byte_order == BFD_ENDIAN_BIG ? "big"
46355796c8dcSSimon Schubert : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
46365796c8dcSSimon Schubert : "default"));
46375796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog,
46385796c8dcSSimon Schubert "gdbarch_find_by_info: info.osabi %d (%s)\n",
46395796c8dcSSimon Schubert info.osabi, gdbarch_osabi_name (info.osabi));
46405796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog,
46415796c8dcSSimon Schubert "gdbarch_find_by_info: info.abfd %s\n",
46425796c8dcSSimon Schubert host_address_to_string (info.abfd));
46435796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog,
46445796c8dcSSimon Schubert "gdbarch_find_by_info: info.tdep_info %s\n",
46455796c8dcSSimon Schubert host_address_to_string (info.tdep_info));
46465796c8dcSSimon Schubert }
46475796c8dcSSimon Schubert
46485796c8dcSSimon Schubert /* Find the tdep code that knows about this architecture. */
46495796c8dcSSimon Schubert for (rego = gdbarch_registry;
46505796c8dcSSimon Schubert rego != NULL;
46515796c8dcSSimon Schubert rego = rego->next)
46525796c8dcSSimon Schubert if (rego->bfd_architecture == info.bfd_arch_info->arch)
46535796c8dcSSimon Schubert break;
46545796c8dcSSimon Schubert if (rego == NULL)
46555796c8dcSSimon Schubert {
46565796c8dcSSimon Schubert if (gdbarch_debug)
46575796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
46585796c8dcSSimon Schubert "No matching architecture\n");
46595796c8dcSSimon Schubert return 0;
46605796c8dcSSimon Schubert }
46615796c8dcSSimon Schubert
46625796c8dcSSimon Schubert /* Ask the tdep code for an architecture that matches "info". */
46635796c8dcSSimon Schubert new_gdbarch = rego->init (info, rego->arches);
46645796c8dcSSimon Schubert
46655796c8dcSSimon Schubert /* Did the tdep code like it? No. Reject the change and revert to
46665796c8dcSSimon Schubert the old architecture. */
46675796c8dcSSimon Schubert if (new_gdbarch == NULL)
46685796c8dcSSimon Schubert {
46695796c8dcSSimon Schubert if (gdbarch_debug)
46705796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
46715796c8dcSSimon Schubert "Target rejected architecture\n");
46725796c8dcSSimon Schubert return NULL;
46735796c8dcSSimon Schubert }
46745796c8dcSSimon Schubert
46755796c8dcSSimon Schubert /* Is this a pre-existing architecture (as determined by already
46765796c8dcSSimon Schubert being initialized)? Move it to the front of the architecture
46775796c8dcSSimon Schubert list (keeping the list sorted Most Recently Used). */
46785796c8dcSSimon Schubert if (new_gdbarch->initialized_p)
46795796c8dcSSimon Schubert {
46805796c8dcSSimon Schubert struct gdbarch_list **list;
46815796c8dcSSimon Schubert struct gdbarch_list *this;
46825796c8dcSSimon Schubert if (gdbarch_debug)
46835796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
46845796c8dcSSimon Schubert "Previous architecture %s (%s) selected\n",
46855796c8dcSSimon Schubert host_address_to_string (new_gdbarch),
46865796c8dcSSimon Schubert new_gdbarch->bfd_arch_info->printable_name);
46875796c8dcSSimon Schubert /* Find the existing arch in the list. */
46885796c8dcSSimon Schubert for (list = ®o->arches;
46895796c8dcSSimon Schubert (*list) != NULL && (*list)->gdbarch != new_gdbarch;
46905796c8dcSSimon Schubert list = &(*list)->next);
46915796c8dcSSimon Schubert /* It had better be in the list of architectures. */
46925796c8dcSSimon Schubert gdb_assert ((*list) != NULL && (*list)->gdbarch == new_gdbarch);
46935796c8dcSSimon Schubert /* Unlink THIS. */
46945796c8dcSSimon Schubert this = (*list);
46955796c8dcSSimon Schubert (*list) = this->next;
46965796c8dcSSimon Schubert /* Insert THIS at the front. */
46975796c8dcSSimon Schubert this->next = rego->arches;
46985796c8dcSSimon Schubert rego->arches = this;
46995796c8dcSSimon Schubert /* Return it. */
47005796c8dcSSimon Schubert return new_gdbarch;
47015796c8dcSSimon Schubert }
47025796c8dcSSimon Schubert
47035796c8dcSSimon Schubert /* It's a new architecture. */
47045796c8dcSSimon Schubert if (gdbarch_debug)
47055796c8dcSSimon Schubert fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
47065796c8dcSSimon Schubert "New architecture %s (%s) selected\n",
47075796c8dcSSimon Schubert host_address_to_string (new_gdbarch),
47085796c8dcSSimon Schubert new_gdbarch->bfd_arch_info->printable_name);
47095796c8dcSSimon Schubert
47105796c8dcSSimon Schubert /* Insert the new architecture into the front of the architecture
47115796c8dcSSimon Schubert list (keep the list sorted Most Recently Used). */
47125796c8dcSSimon Schubert {
47135796c8dcSSimon Schubert struct gdbarch_list *this = XMALLOC (struct gdbarch_list);
47145796c8dcSSimon Schubert this->next = rego->arches;
47155796c8dcSSimon Schubert this->gdbarch = new_gdbarch;
47165796c8dcSSimon Schubert rego->arches = this;
47175796c8dcSSimon Schubert }
47185796c8dcSSimon Schubert
47195796c8dcSSimon Schubert /* Check that the newly installed architecture is valid. Plug in
47205796c8dcSSimon Schubert any post init values. */
47215796c8dcSSimon Schubert new_gdbarch->dump_tdep = rego->dump_tdep;
47225796c8dcSSimon Schubert verify_gdbarch (new_gdbarch);
47235796c8dcSSimon Schubert new_gdbarch->initialized_p = 1;
47245796c8dcSSimon Schubert
47255796c8dcSSimon Schubert if (gdbarch_debug)
47265796c8dcSSimon Schubert gdbarch_dump (new_gdbarch, gdb_stdlog);
47275796c8dcSSimon Schubert
47285796c8dcSSimon Schubert return new_gdbarch;
47295796c8dcSSimon Schubert }
47305796c8dcSSimon Schubert
47315796c8dcSSimon Schubert /* Make the specified architecture current. */
47325796c8dcSSimon Schubert
47335796c8dcSSimon Schubert void
set_target_gdbarch(struct gdbarch * new_gdbarch)4734*ef5ccd6cSJohn Marino set_target_gdbarch (struct gdbarch *new_gdbarch)
47355796c8dcSSimon Schubert {
47365796c8dcSSimon Schubert gdb_assert (new_gdbarch != NULL);
47375796c8dcSSimon Schubert gdb_assert (new_gdbarch->initialized_p);
4738*ef5ccd6cSJohn Marino current_inferior ()->gdbarch = new_gdbarch;
47395796c8dcSSimon Schubert observer_notify_architecture_changed (new_gdbarch);
47405796c8dcSSimon Schubert registers_changed ();
47415796c8dcSSimon Schubert }
47425796c8dcSSimon Schubert
4743*ef5ccd6cSJohn Marino /* Return the current inferior's arch. */
4744*ef5ccd6cSJohn Marino
4745*ef5ccd6cSJohn Marino struct gdbarch *
target_gdbarch(void)4746*ef5ccd6cSJohn Marino target_gdbarch (void)
4747*ef5ccd6cSJohn Marino {
4748*ef5ccd6cSJohn Marino return current_inferior ()->gdbarch;
4749*ef5ccd6cSJohn Marino }
4750*ef5ccd6cSJohn Marino
47515796c8dcSSimon Schubert extern void _initialize_gdbarch (void);
47525796c8dcSSimon Schubert
47535796c8dcSSimon Schubert void
_initialize_gdbarch(void)47545796c8dcSSimon Schubert _initialize_gdbarch (void)
47555796c8dcSSimon Schubert {
4756*ef5ccd6cSJohn Marino add_setshow_zuinteger_cmd ("arch", class_maintenance, &gdbarch_debug, _("\
47575796c8dcSSimon Schubert Set architecture debugging."), _("\
47585796c8dcSSimon Schubert Show architecture debugging."), _("\
47595796c8dcSSimon Schubert When non-zero, architecture debugging is enabled."),
47605796c8dcSSimon Schubert NULL,
47615796c8dcSSimon Schubert show_gdbarch_debug,
47625796c8dcSSimon Schubert &setdebuglist, &showdebuglist);
47635796c8dcSSimon Schubert }
4764