Handle "p S::method()::static_var" in the C++ parser
[deliverable/binutils-gdb.git] / gdb / gdbarch.c
CommitLineData
c4bfde41
JK
1/* *INDENT-OFF* */ /* THIS FILE IS GENERATED -*- buffer-read-only: t -*- */
2/* vi:set ro: */
59233f88 3
adf40b2e 4/* Dynamic architecture support for GDB, the GNU debugger.
79d45cd4 5
61baf725 6 Copyright (C) 1998-2017 Free Software Foundation, Inc.
c906108c 7
96baa820
JM
8 This file is part of GDB.
9
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
a9762ec7 12 the Free Software Foundation; either version 3 of the License, or
96baa820 13 (at your option) any later version.
618f726f 14
96baa820
JM
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
618f726f 19
96baa820 20 You should have received a copy of the GNU General Public License
a9762ec7 21 along with this program. If not, see <http://www.gnu.org/licenses/>. */
adf40b2e 22
104c1213
JM
23/* This file was created with the aid of ``gdbarch.sh''.
24
52204a0b 25 The Bourne shell script ``gdbarch.sh'' creates the files
104c1213
JM
26 ``new-gdbarch.c'' and ``new-gdbarch.h and then compares them
27 against the existing ``gdbarch.[hc]''. Any differences found
28 being reported.
29
30 If editing this file, please also run gdbarch.sh and merge any
52204a0b 31 changes into that script. Conversely, when making sweeping changes
104c1213 32 to this file, modifying gdbarch.sh and using its output may prove
0963b4bd 33 easier. */
c906108c 34
c906108c
SS
35
36#include "defs.h"
1ad03bde 37#include "arch-utils.h"
c906108c 38
0f71a2f6 39#include "gdbcmd.h"
faaf634c 40#include "inferior.h"
7a292a7a 41#include "symcat.h"
c906108c 42
f0d4cc9e 43#include "floatformat.h"
b59ff9d5 44#include "reggroups.h"
4be87837 45#include "osabi.h"
aebd7893 46#include "gdb_obstack.h"
383f836e 47#include "observer.h"
a3ecef73 48#include "regcache.h"
19630284 49#include "objfiles.h"
2faa3447 50#include "auxv.h"
95160752 51
104c1213
JM
52/* Static function declarations */
53
b3cc3077 54static void alloc_gdbarch_data (struct gdbarch *);
104c1213 55
0f71a2f6
JM
56/* Non-zero if we want to trace architecture code. */
57
58#ifndef GDBARCH_DEBUG
59#define GDBARCH_DEBUG 0
60#endif
ccce17b0 61unsigned int gdbarch_debug = GDBARCH_DEBUG;
920d2a44
AC
62static void
63show_gdbarch_debug (struct ui_file *file, int from_tty,
64 struct cmd_list_element *c, const char *value)
65{
66 fprintf_filtered (file, _("Architecture debugging is %s.\n"), value);
67}
0f71a2f6 68
456fcf94 69static const char *
8da61cc4 70pformat (const struct floatformat **format)
456fcf94
AC
71{
72 if (format == NULL)
73 return "(null)";
74 else
8da61cc4
DJ
75 /* Just print out one of them - this is only for diagnostics. */
76 return format[0]->name;
456fcf94
AC
77}
78
08105857
PA
79static const char *
80pstring (const char *string)
81{
82 if (string == NULL)
83 return "(null)";
84 return string;
85}
86
a121b7c1 87static const char *
f7bb4e3a
PB
88pstring_ptr (char **string)
89{
90 if (string == NULL || *string == NULL)
91 return "(null)";
92 return *string;
93}
94
05c0465e
SDJ
95/* Helper function to print a list of strings, represented as "const
96 char *const *". The list is printed comma-separated. */
97
a121b7c1 98static const char *
05c0465e
SDJ
99pstring_list (const char *const *list)
100{
101 static char ret[100];
102 const char *const *p;
103 size_t offset = 0;
104
105 if (list == NULL)
106 return "(null)";
107
108 ret[0] = '\0';
109 for (p = list; *p != NULL && offset < sizeof (ret); ++p)
110 {
111 size_t s = xsnprintf (ret + offset, sizeof (ret) - offset, "%s, ", *p);
112 offset += 2 + s;
113 }
114
115 if (offset > 0)
116 {
117 gdb_assert (offset - 2 < sizeof (ret));
118 ret[offset - 2] = '\0';
119 }
120
121 return ret;
122}
123
0f71a2f6 124
0963b4bd 125/* Maintain the struct gdbarch object. */
0f71a2f6
JM
126
127struct gdbarch
adf40b2e 128{
76860b5f
AC
129 /* Has this architecture been fully initialized? */
130 int initialized_p;
aebd7893
AC
131
132 /* An obstack bound to the lifetime of the architecture. */
133 struct obstack *obstack;
134
0963b4bd 135 /* basic architectural information. */
adf40b2e 136 const struct bfd_arch_info * bfd_arch_info;
94123b4f
YQ
137 enum bfd_endian byte_order;
138 enum bfd_endian byte_order_for_code;
4be87837 139 enum gdb_osabi osabi;
424163ea 140 const struct target_desc * target_desc;
0f71a2f6 141
0963b4bd 142 /* target specific vector. */
adf40b2e 143 struct gdbarch_tdep *tdep;
4b9b3959 144 gdbarch_dump_tdep_ftype *dump_tdep;
0f71a2f6 145
0963b4bd 146 /* per-architecture data-pointers. */
95160752 147 unsigned nr_data;
adf40b2e 148 void **data;
0f71a2f6 149
adf40b2e 150 /* Multi-arch values.
0f71a2f6 151
adf40b2e 152 When extending this structure you must:
0f71a2f6 153
adf40b2e 154 Add the field below.
0f71a2f6 155
adf40b2e
JM
156 Declare set/get functions and define the corresponding
157 macro in gdbarch.h.
0f71a2f6 158
adf40b2e
JM
159 gdbarch_alloc(): If zero/NULL is not a suitable default,
160 initialize the new field.
0f71a2f6 161
adf40b2e
JM
162 verify_gdbarch(): Confirm that the target updated the field
163 correctly.
0f71a2f6 164
7e73cedf 165 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
adf40b2e 166 field is dumped out
0f71a2f6 167
adf40b2e
JM
168 get_gdbarch(): Implement the set/get functions (probably using
169 the macro's as shortcuts).
0f71a2f6
JM
170
171 */
172
32c9a795 173 int bits_big_endian;
adf40b2e
JM
174 int short_bit;
175 int int_bit;
176 int long_bit;
177 int long_long_bit;
205c306f 178 int long_long_align_bit;
f9e9243a
UW
179 int half_bit;
180 const struct floatformat ** half_format;
adf40b2e 181 int float_bit;
8da61cc4 182 const struct floatformat ** float_format;
adf40b2e 183 int double_bit;
8da61cc4 184 const struct floatformat ** double_format;
adf40b2e 185 int long_double_bit;
8da61cc4 186 const struct floatformat ** long_double_format;
53375380
PA
187 int wchar_bit;
188 int wchar_signed;
9b790ce7 189 gdbarch_floatformat_for_type_ftype *floatformat_for_type;
66b43ecb 190 int ptr_bit;
52204a0b 191 int addr_bit;
8da614df 192 int dwarf2_addr_size;
4e409299 193 int char_signed;
adf40b2e
JM
194 gdbarch_read_pc_ftype *read_pc;
195 gdbarch_write_pc_ftype *write_pc;
39d4ef09 196 gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer;
d8124050 197 gdbarch_pseudo_register_read_ftype *pseudo_register_read;
3543a589 198 gdbarch_pseudo_register_read_value_ftype *pseudo_register_read_value;
d8124050 199 gdbarch_pseudo_register_write_ftype *pseudo_register_write;
adf40b2e 200 int num_regs;
0aba1244 201 int num_pseudo_regs;
175ff332
HZ
202 gdbarch_ax_pseudo_register_collect_ftype *ax_pseudo_register_collect;
203 gdbarch_ax_pseudo_register_push_stack_ftype *ax_pseudo_register_push_stack;
012b3a21 204 gdbarch_handle_segmentation_fault_ftype *handle_segmentation_fault;
adf40b2e 205 int sp_regnum;
adf40b2e 206 int pc_regnum;
c2169756 207 int ps_regnum;
60054393 208 int fp0_regnum;
88c72b7d
AC
209 gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum;
210 gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum;
88c72b7d
AC
211 gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum;
212 gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum;
adf40b2e 213 gdbarch_register_name_ftype *register_name;
9c04cab7 214 gdbarch_register_type_ftype *register_type;
669fac23 215 gdbarch_dummy_id_ftype *dummy_id;
f3be58bc 216 int deprecated_fp_regnum;
b8de8283 217 gdbarch_push_dummy_call_ftype *push_dummy_call;
adf40b2e 218 int call_dummy_location;
7043d8dc 219 gdbarch_push_dummy_code_ftype *push_dummy_code;
7eb89530 220 gdbarch_code_of_frame_writable_ftype *code_of_frame_writable;
b8de8283
AC
221 gdbarch_print_registers_info_ftype *print_registers_info;
222 gdbarch_print_float_info_ftype *print_float_info;
223 gdbarch_print_vector_info_ftype *print_vector_info;
224 gdbarch_register_sim_regno_ftype *register_sim_regno;
b8de8283
AC
225 gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
226 gdbarch_cannot_store_register_ftype *cannot_store_register;
227 gdbarch_get_longjmp_target_ftype *get_longjmp_target;
adf40b2e 228 int believe_pcc_promotion;
13d01224
AC
229 gdbarch_convert_register_p_ftype *convert_register_p;
230 gdbarch_register_to_value_ftype *register_to_value;
231 gdbarch_value_to_register_ftype *value_to_register;
9acbedc0 232 gdbarch_value_from_register_ftype *value_from_register;
4478b372
JB
233 gdbarch_pointer_to_address_ftype *pointer_to_address;
234 gdbarch_address_to_pointer_ftype *address_to_pointer;
fc0c74b1 235 gdbarch_integer_to_address_ftype *integer_to_address;
92ad9cd9 236 gdbarch_return_value_ftype *return_value;
18648a37 237 gdbarch_return_in_first_hidden_param_p_ftype *return_in_first_hidden_param_p;
adf40b2e 238 gdbarch_skip_prologue_ftype *skip_prologue;
4309257c 239 gdbarch_skip_main_prologue_ftype *skip_main_prologue;
591a12a1 240 gdbarch_skip_entrypoint_ftype *skip_entrypoint;
adf40b2e
JM
241 gdbarch_inner_than_ftype *inner_than;
242 gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
cd6c3b4f
YQ
243 gdbarch_breakpoint_kind_from_pc_ftype *breakpoint_kind_from_pc;
244 gdbarch_sw_breakpoint_from_kind_ftype *sw_breakpoint_from_kind;
833b7ab5 245 gdbarch_breakpoint_kind_from_current_state_ftype *breakpoint_kind_from_current_state;
a1131521 246 gdbarch_adjust_breakpoint_address_ftype *adjust_breakpoint_address;
917317f4
JM
247 gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
248 gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
adf40b2e 249 CORE_ADDR decr_pc_after_break;
782263ab 250 CORE_ADDR deprecated_function_start_offset;
123dc839 251 gdbarch_remote_register_number_ftype *remote_register_number;
b2756930 252 gdbarch_fetch_tls_load_module_address_ftype *fetch_tls_load_module_address;
adf40b2e 253 CORE_ADDR frame_args_skip;
12cc2063 254 gdbarch_unwind_pc_ftype *unwind_pc;
a9e5fdc2 255 gdbarch_unwind_sp_ftype *unwind_sp;
adf40b2e 256 gdbarch_frame_num_args_ftype *frame_num_args;
dc604539 257 gdbarch_frame_align_ftype *frame_align;
192cb3d4 258 gdbarch_stabs_argument_has_addr_ftype *stabs_argument_has_addr;
8b148df9 259 int frame_red_zone_size;
f517ea4e 260 gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
875e1767 261 gdbarch_addr_bits_remove_ftype *addr_bits_remove;
64c4637f 262 gdbarch_software_single_step_ftype *software_single_step;
3352ef37 263 gdbarch_single_step_through_delay_ftype *single_step_through_delay;
2bf0cb65 264 gdbarch_print_insn_ftype *print_insn;
bdcd319a 265 gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
dea0c52f 266 gdbarch_skip_solib_resolver_ftype *skip_solib_resolver;
d50355b6 267 gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
c9cf6e20 268 gdbarch_stack_frame_destroyed_p_ftype *stack_frame_destroyed_p;
a2cf933a
EZ
269 gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
270 gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
3e29f34a
MR
271 gdbarch_make_symbol_special_ftype *make_symbol_special;
272 gdbarch_adjust_dwarf2_addr_ftype *adjust_dwarf2_addr;
273 gdbarch_adjust_dwarf2_line_ftype *adjust_dwarf2_line;
c4ed33b9 274 int cannot_step_breakpoint;
f74fa174 275 int have_nonsteppable_watchpoint;
8b2dbe47
KB
276 gdbarch_address_class_type_flags_ftype *address_class_type_flags;
277 gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name;
b41c5a85 278 gdbarch_execute_dwarf_cfa_vendor_op_ftype *execute_dwarf_cfa_vendor_op;
8b2dbe47 279 gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
b59ff9d5 280 gdbarch_register_reggroup_p_ftype *register_reggroup_p;
143985b7 281 gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument;
5aa82d05 282 gdbarch_iterate_over_regset_sections_ftype *iterate_over_regset_sections;
6432734d 283 gdbarch_make_corefile_notes_ftype *make_corefile_notes;
b3ac9c77 284 gdbarch_elfcore_write_linux_prpsinfo_ftype *elfcore_write_linux_prpsinfo;
35c2fab7 285 gdbarch_find_memory_regions_ftype *find_memory_regions;
de584861 286 gdbarch_core_xfer_shared_libraries_ftype *core_xfer_shared_libraries;
356a5233 287 gdbarch_core_xfer_shared_libraries_aix_ftype *core_xfer_shared_libraries_aix;
28439f5e 288 gdbarch_core_pid_to_str_ftype *core_pid_to_str;
4dfc5dbc 289 gdbarch_core_thread_name_ftype *core_thread_name;
382b69bb 290 gdbarch_core_xfer_siginfo_ftype *core_xfer_siginfo;
a78c2d62 291 const char * gcore_bfd_target;
0d5de010
DJ
292 int vtable_function_descriptors;
293 int vbit_in_delta;
6d350bb5 294 gdbarch_skip_permanent_breakpoint_ftype *skip_permanent_breakpoint;
237fc4c9
PA
295 ULONGEST max_insn_length;
296 gdbarch_displaced_step_copy_insn_ftype *displaced_step_copy_insn;
99e40580 297 gdbarch_displaced_step_hw_singlestep_ftype *displaced_step_hw_singlestep;
237fc4c9 298 gdbarch_displaced_step_fixup_ftype *displaced_step_fixup;
237fc4c9 299 gdbarch_displaced_step_location_ftype *displaced_step_location;
dde08ee1 300 gdbarch_relocate_instruction_ftype *relocate_instruction;
1c772458 301 gdbarch_overlay_update_ftype *overlay_update;
4eb0ad19 302 gdbarch_core_read_description_ftype *core_read_description;
149ad273 303 gdbarch_static_transform_name_ftype *static_transform_name;
203c3895 304 int sofun_address_maybe_missing;
0508c3ec 305 gdbarch_process_record_ftype *process_record;
3846b520 306 gdbarch_process_record_signal_ftype *process_record_signal;
22203bbf 307 gdbarch_gdb_signal_from_target_ftype *gdb_signal_from_target;
eb14d406 308 gdbarch_gdb_signal_to_target_ftype *gdb_signal_to_target;
4aa995e1 309 gdbarch_get_siginfo_type_ftype *get_siginfo_type;
60c5725c 310 gdbarch_record_special_symbol_ftype *record_special_symbol;
a96d9b2e 311 gdbarch_get_syscall_number_ftype *get_syscall_number;
458c8db8
SDJ
312 const char * xml_syscall_file;
313 struct syscalls_info * syscalls_info;
05c0465e
SDJ
314 const char *const * stap_integer_prefixes;
315 const char *const * stap_integer_suffixes;
316 const char *const * stap_register_prefixes;
317 const char *const * stap_register_suffixes;
318 const char *const * stap_register_indirection_prefixes;
319 const char *const * stap_register_indirection_suffixes;
55aa24fb
SDJ
320 const char * stap_gdb_register_prefix;
321 const char * stap_gdb_register_suffix;
322 gdbarch_stap_is_single_operand_ftype *stap_is_single_operand;
323 gdbarch_stap_parse_special_token_ftype *stap_parse_special_token;
8b367e17
JM
324 gdbarch_dtrace_parse_probe_argument_ftype *dtrace_parse_probe_argument;
325 gdbarch_dtrace_probe_is_enabled_ftype *dtrace_probe_is_enabled;
326 gdbarch_dtrace_enable_probe_ftype *dtrace_enable_probe;
327 gdbarch_dtrace_disable_probe_ftype *dtrace_disable_probe;
50c71eaf 328 int has_global_solist;
2567c7d9 329 int has_global_breakpoints;
6c95b8df 330 gdbarch_has_shared_address_space_ftype *has_shared_address_space;
7a697b8d 331 gdbarch_fast_tracepoint_valid_at_ftype *fast_tracepoint_valid_at;
5f034a78 332 gdbarch_guess_tracepoint_registers_ftype *guess_tracepoint_registers;
f870a310
TT
333 gdbarch_auto_charset_ftype *auto_charset;
334 gdbarch_auto_wide_charset_ftype *auto_wide_charset;
08105857 335 const char * solib_symbols_extension;
ab38a727 336 int has_dos_based_file_system;
6710bf39 337 gdbarch_gen_return_address_ftype *gen_return_address;
3030c96e 338 gdbarch_info_proc_ftype *info_proc;
451b7c33 339 gdbarch_core_info_proc_ftype *core_info_proc;
19630284 340 gdbarch_iterate_over_objfiles_in_search_order_ftype *iterate_over_objfiles_in_search_order;
7e35103a 341 struct ravenscar_arch_ops * ravenscar_ops;
c2170eef
MM
342 gdbarch_insn_is_call_ftype *insn_is_call;
343 gdbarch_insn_is_ret_ftype *insn_is_ret;
344 gdbarch_insn_is_jump_ftype *insn_is_jump;
27a48a92 345 gdbarch_auxv_parse_ftype *auxv_parse;
2faa3447 346 gdbarch_print_auxv_entry_ftype *print_auxv_entry;
3437254d 347 gdbarch_vsyscall_range_ftype *vsyscall_range;
f208eee0 348 gdbarch_infcall_mmap_ftype *infcall_mmap;
7f361056 349 gdbarch_infcall_munmap_ftype *infcall_munmap;
f208eee0 350 gdbarch_gcc_target_options_ftype *gcc_target_options;
ac04f72b 351 gdbarch_gnu_triplet_regexp_ftype *gnu_triplet_regexp;
3374165f 352 gdbarch_addressable_memory_unit_size_ftype *addressable_memory_unit_size;
65b48a81
PB
353 char ** disassembler_options;
354 const disasm_options_t * valid_disassembler_options;
adf40b2e 355};
0f71a2f6 356
66b43ecb 357/* Create a new ``struct gdbarch'' based on information provided by
0963b4bd 358 ``struct gdbarch_info''. */
0f71a2f6
JM
359
360struct gdbarch *
104c1213
JM
361gdbarch_alloc (const struct gdbarch_info *info,
362 struct gdbarch_tdep *tdep)
0f71a2f6 363{
be7811ad 364 struct gdbarch *gdbarch;
aebd7893
AC
365
366 /* Create an obstack for allocating all the per-architecture memory,
367 then use that to allocate the architecture vector. */
70ba0933 368 struct obstack *obstack = XNEW (struct obstack);
aebd7893 369 obstack_init (obstack);
8d749320 370 gdbarch = XOBNEW (obstack, struct gdbarch);
be7811ad
MD
371 memset (gdbarch, 0, sizeof (*gdbarch));
372 gdbarch->obstack = obstack;
0f71a2f6 373
be7811ad 374 alloc_gdbarch_data (gdbarch);
b3cc3077 375
be7811ad 376 gdbarch->tdep = tdep;
0f71a2f6 377
be7811ad
MD
378 gdbarch->bfd_arch_info = info->bfd_arch_info;
379 gdbarch->byte_order = info->byte_order;
9d4fde75 380 gdbarch->byte_order_for_code = info->byte_order_for_code;
be7811ad
MD
381 gdbarch->osabi = info->osabi;
382 gdbarch->target_desc = info->target_desc;
0f71a2f6 383
0963b4bd 384 /* Force the explicit initialization of these. */
32c9a795 385 gdbarch->bits_big_endian = (gdbarch->byte_order == BFD_ENDIAN_BIG);
be7811ad
MD
386 gdbarch->short_bit = 2*TARGET_CHAR_BIT;
387 gdbarch->int_bit = 4*TARGET_CHAR_BIT;
388 gdbarch->long_bit = 4*TARGET_CHAR_BIT;
389 gdbarch->long_long_bit = 2*gdbarch->long_bit;
205c306f 390 gdbarch->long_long_align_bit = 2*gdbarch->long_bit;
f9e9243a 391 gdbarch->half_bit = 2*TARGET_CHAR_BIT;
be7811ad
MD
392 gdbarch->float_bit = 4*TARGET_CHAR_BIT;
393 gdbarch->double_bit = 8*TARGET_CHAR_BIT;
394 gdbarch->long_double_bit = 8*TARGET_CHAR_BIT;
53375380
PA
395 gdbarch->wchar_bit = 4*TARGET_CHAR_BIT;
396 gdbarch->wchar_signed = -1;
9b790ce7 397 gdbarch->floatformat_for_type = default_floatformat_for_type;
be7811ad
MD
398 gdbarch->ptr_bit = gdbarch->int_bit;
399 gdbarch->char_signed = -1;
400 gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
401 gdbarch->num_regs = -1;
402 gdbarch->sp_regnum = -1;
403 gdbarch->pc_regnum = -1;
404 gdbarch->ps_regnum = -1;
405 gdbarch->fp0_regnum = -1;
406 gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
407 gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
be7811ad
MD
408 gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
409 gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
410 gdbarch->deprecated_fp_regnum = -1;
411 gdbarch->call_dummy_location = AT_ENTRY_POINT;
7eb89530 412 gdbarch->code_of_frame_writable = default_code_of_frame_writable;
be7811ad 413 gdbarch->print_registers_info = default_print_registers_info;
cc86d1cb 414 gdbarch->print_float_info = default_print_float_info;
be7811ad
MD
415 gdbarch->register_sim_regno = legacy_register_sim_regno;
416 gdbarch->cannot_fetch_register = cannot_register_not;
417 gdbarch->cannot_store_register = cannot_register_not;
418 gdbarch->convert_register_p = generic_convert_register_p;
419 gdbarch->value_from_register = default_value_from_register;
420 gdbarch->pointer_to_address = unsigned_pointer_to_address;
421 gdbarch->address_to_pointer = unsigned_address_to_pointer;
18648a37 422 gdbarch->return_in_first_hidden_param_p = default_return_in_first_hidden_param_p;
22f13eb8 423 gdbarch->breakpoint_from_pc = default_breakpoint_from_pc;
cd6c3b4f 424 gdbarch->sw_breakpoint_from_kind = NULL;
833b7ab5 425 gdbarch->breakpoint_kind_from_current_state = default_breakpoint_kind_from_current_state;
be7811ad
MD
426 gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
427 gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
428 gdbarch->remote_register_number = default_remote_register_number;
429 gdbarch->stabs_argument_has_addr = default_stabs_argument_has_addr;
430 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr_identity;
431 gdbarch->addr_bits_remove = core_addr_identity;
39503f82 432 gdbarch->print_insn = default_print_insn;
be7811ad
MD
433 gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
434 gdbarch->skip_solib_resolver = generic_skip_solib_resolver;
435 gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
c9cf6e20 436 gdbarch->stack_frame_destroyed_p = generic_stack_frame_destroyed_p;
be7811ad 437 gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
3e29f34a
MR
438 gdbarch->make_symbol_special = default_make_symbol_special;
439 gdbarch->adjust_dwarf2_addr = default_adjust_dwarf2_addr;
440 gdbarch->adjust_dwarf2_line = default_adjust_dwarf2_line;
b41c5a85 441 gdbarch->execute_dwarf_cfa_vendor_op = default_execute_dwarf_cfa_vendor_op;
be7811ad 442 gdbarch->register_reggroup_p = default_register_reggroup_p;
ae9bb220 443 gdbarch->skip_permanent_breakpoint = default_skip_permanent_breakpoint;
99e40580 444 gdbarch->displaced_step_hw_singlestep = default_displaced_step_hw_singlestep;
237fc4c9 445 gdbarch->displaced_step_fixup = NULL;
237fc4c9 446 gdbarch->displaced_step_location = NULL;
dde08ee1 447 gdbarch->relocate_instruction = NULL;
6c95b8df 448 gdbarch->has_shared_address_space = default_has_shared_address_space;
7a697b8d 449 gdbarch->fast_tracepoint_valid_at = default_fast_tracepoint_valid_at;
5f034a78 450 gdbarch->guess_tracepoint_registers = default_guess_tracepoint_registers;
f870a310
TT
451 gdbarch->auto_charset = default_auto_charset;
452 gdbarch->auto_wide_charset = default_auto_wide_charset;
6710bf39 453 gdbarch->gen_return_address = default_gen_return_address;
19630284 454 gdbarch->iterate_over_objfiles_in_search_order = default_iterate_over_objfiles_in_search_order;
7e35103a 455 gdbarch->ravenscar_ops = NULL;
c2170eef
MM
456 gdbarch->insn_is_call = default_insn_is_call;
457 gdbarch->insn_is_ret = default_insn_is_ret;
458 gdbarch->insn_is_jump = default_insn_is_jump;
2faa3447 459 gdbarch->print_auxv_entry = default_print_auxv_entry;
3437254d 460 gdbarch->vsyscall_range = default_vsyscall_range;
f208eee0 461 gdbarch->infcall_mmap = default_infcall_mmap;
7f361056 462 gdbarch->infcall_munmap = default_infcall_munmap;
f208eee0 463 gdbarch->gcc_target_options = default_gcc_target_options;
ac04f72b 464 gdbarch->gnu_triplet_regexp = default_gnu_triplet_regexp;
3374165f 465 gdbarch->addressable_memory_unit_size = default_addressable_memory_unit_size;
0f71a2f6
JM
466 /* gdbarch_alloc() */
467
be7811ad 468 return gdbarch;
0f71a2f6
JM
469}
470
471
aebd7893
AC
472/* Allocate extra space using the per-architecture obstack. */
473
474void *
475gdbarch_obstack_zalloc (struct gdbarch *arch, long size)
476{
477 void *data = obstack_alloc (arch->obstack, size);
05c547f6 478
aebd7893
AC
479 memset (data, 0, size);
480 return data;
481}
482
6c214e7c
PP
483/* See gdbarch.h. */
484
485char *
486gdbarch_obstack_strdup (struct gdbarch *arch, const char *string)
487{
488 return obstack_strdup (arch->obstack, string);
489}
490
aebd7893 491
058f20d5
JB
492/* Free a gdbarch struct. This should never happen in normal
493 operation --- once you've created a gdbarch, you keep it around.
494 However, if an architecture's init function encounters an error
495 building the structure, it may need to clean up a partially
496 constructed gdbarch. */
4b9b3959 497
058f20d5
JB
498void
499gdbarch_free (struct gdbarch *arch)
500{
aebd7893 501 struct obstack *obstack;
05c547f6 502
95160752 503 gdb_assert (arch != NULL);
aebd7893
AC
504 gdb_assert (!arch->initialized_p);
505 obstack = arch->obstack;
506 obstack_free (obstack, 0); /* Includes the ARCH. */
507 xfree (obstack);
058f20d5
JB
508}
509
510
db446970
AC
511/* Ensure that all values in a GDBARCH are reasonable. */
512
0f71a2f6 513static void
be7811ad 514verify_gdbarch (struct gdbarch *gdbarch)
0f71a2f6 515{
d7e74731 516 string_file log;
05c547f6 517
0f71a2f6 518 /* fundamental */
be7811ad 519 if (gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
d7e74731 520 log.puts ("\n\tbyte-order");
be7811ad 521 if (gdbarch->bfd_arch_info == NULL)
d7e74731 522 log.puts ("\n\tbfd_arch_info");
0963b4bd 523 /* Check those that need to be defined for the given multi-arch level. */
32c9a795 524 /* Skip verify of bits_big_endian, invalid_p == 0 */
66b43ecb
AC
525 /* Skip verify of short_bit, invalid_p == 0 */
526 /* Skip verify of int_bit, invalid_p == 0 */
527 /* Skip verify of long_bit, invalid_p == 0 */
528 /* Skip verify of long_long_bit, invalid_p == 0 */
205c306f 529 /* Skip verify of long_long_align_bit, invalid_p == 0 */
f9e9243a
UW
530 /* Skip verify of half_bit, invalid_p == 0 */
531 if (gdbarch->half_format == 0)
532 gdbarch->half_format = floatformats_ieee_half;
66b43ecb 533 /* Skip verify of float_bit, invalid_p == 0 */
be7811ad
MD
534 if (gdbarch->float_format == 0)
535 gdbarch->float_format = floatformats_ieee_single;
66b43ecb 536 /* Skip verify of double_bit, invalid_p == 0 */
be7811ad
MD
537 if (gdbarch->double_format == 0)
538 gdbarch->double_format = floatformats_ieee_double;
66b43ecb 539 /* Skip verify of long_double_bit, invalid_p == 0 */
be7811ad
MD
540 if (gdbarch->long_double_format == 0)
541 gdbarch->long_double_format = floatformats_ieee_double;
53375380
PA
542 /* Skip verify of wchar_bit, invalid_p == 0 */
543 if (gdbarch->wchar_signed == -1)
544 gdbarch->wchar_signed = 1;
9b790ce7 545 /* Skip verify of floatformat_for_type, invalid_p == 0 */
66b43ecb 546 /* Skip verify of ptr_bit, invalid_p == 0 */
be7811ad
MD
547 if (gdbarch->addr_bit == 0)
548 gdbarch->addr_bit = gdbarch_ptr_bit (gdbarch);
8da614df
CV
549 if (gdbarch->dwarf2_addr_size == 0)
550 gdbarch->dwarf2_addr_size = gdbarch_ptr_bit (gdbarch) / TARGET_CHAR_BIT;
be7811ad
MD
551 if (gdbarch->char_signed == -1)
552 gdbarch->char_signed = 1;
0963b4bd
MS
553 /* Skip verify of read_pc, has predicate. */
554 /* Skip verify of write_pc, has predicate. */
39d4ef09 555 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
0963b4bd 556 /* Skip verify of pseudo_register_read, has predicate. */
3543a589 557 /* Skip verify of pseudo_register_read_value, has predicate. */
0963b4bd 558 /* Skip verify of pseudo_register_write, has predicate. */
be7811ad 559 if (gdbarch->num_regs == -1)
d7e74731 560 log.puts ("\n\tnum_regs");
0aba1244 561 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
0963b4bd
MS
562 /* Skip verify of ax_pseudo_register_collect, has predicate. */
563 /* Skip verify of ax_pseudo_register_push_stack, has predicate. */
012b3a21 564 /* Skip verify of handle_segmentation_fault, has predicate. */
1200cd6e 565 /* Skip verify of sp_regnum, invalid_p == 0 */
1200cd6e 566 /* Skip verify of pc_regnum, invalid_p == 0 */
c2169756 567 /* Skip verify of ps_regnum, invalid_p == 0 */
60054393 568 /* Skip verify of fp0_regnum, invalid_p == 0 */
88c72b7d
AC
569 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
570 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
88c72b7d
AC
571 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
572 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
be7811ad 573 if (gdbarch->register_name == 0)
d7e74731 574 log.puts ("\n\tregister_name");
0963b4bd
MS
575 /* Skip verify of register_type, has predicate. */
576 /* Skip verify of dummy_id, has predicate. */
f3be58bc 577 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
0963b4bd 578 /* Skip verify of push_dummy_call, has predicate. */
b8de8283 579 /* Skip verify of call_dummy_location, invalid_p == 0 */
0963b4bd 580 /* Skip verify of push_dummy_code, has predicate. */
7eb89530 581 /* Skip verify of code_of_frame_writable, invalid_p == 0 */
0ab7a791 582 /* Skip verify of print_registers_info, invalid_p == 0 */
cc86d1cb 583 /* Skip verify of print_float_info, invalid_p == 0 */
0963b4bd 584 /* Skip verify of print_vector_info, has predicate. */
7c7651b2 585 /* Skip verify of register_sim_regno, invalid_p == 0 */
01fb7433
AC
586 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
587 /* Skip verify of cannot_store_register, invalid_p == 0 */
0963b4bd 588 /* Skip verify of get_longjmp_target, has predicate. */
13d01224 589 /* Skip verify of convert_register_p, invalid_p == 0 */
9acbedc0 590 /* Skip verify of value_from_register, invalid_p == 0 */
4478b372
JB
591 /* Skip verify of pointer_to_address, invalid_p == 0 */
592 /* Skip verify of address_to_pointer, invalid_p == 0 */
0963b4bd
MS
593 /* Skip verify of integer_to_address, has predicate. */
594 /* Skip verify of return_value, has predicate. */
18648a37 595 /* Skip verify of return_in_first_hidden_param_p, invalid_p == 0 */
be7811ad 596 if (gdbarch->skip_prologue == 0)
d7e74731 597 log.puts ("\n\tskip_prologue");
0963b4bd 598 /* Skip verify of skip_main_prologue, has predicate. */
591a12a1 599 /* Skip verify of skip_entrypoint, has predicate. */
be7811ad 600 if (gdbarch->inner_than == 0)
d7e74731 601 log.puts ("\n\tinner_than");
22f13eb8 602 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
cd6c3b4f 603 if (gdbarch->breakpoint_kind_from_pc == 0)
d7e74731 604 log.puts ("\n\tbreakpoint_kind_from_pc");
cd6c3b4f 605 /* Skip verify of sw_breakpoint_from_kind, invalid_p == 0 */
833b7ab5 606 /* Skip verify of breakpoint_kind_from_current_state, invalid_p == 0 */
0963b4bd 607 /* Skip verify of adjust_breakpoint_address, has predicate. */
c0e8c252
AC
608 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
609 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
71bd6bd4 610 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
782263ab 611 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
123dc839 612 /* Skip verify of remote_register_number, invalid_p == 0 */
0963b4bd 613 /* Skip verify of fetch_tls_load_module_address, has predicate. */
5867a2fb 614 /* Skip verify of frame_args_skip, invalid_p == 0 */
0963b4bd
MS
615 /* Skip verify of unwind_pc, has predicate. */
616 /* Skip verify of unwind_sp, has predicate. */
617 /* Skip verify of frame_num_args, has predicate. */
618 /* Skip verify of frame_align, has predicate. */
192cb3d4 619 /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
f517ea4e 620 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
875e1767 621 /* Skip verify of addr_bits_remove, invalid_p == 0 */
0963b4bd
MS
622 /* Skip verify of software_single_step, has predicate. */
623 /* Skip verify of single_step_through_delay, has predicate. */
39503f82 624 /* Skip verify of print_insn, invalid_p == 0 */
bdcd319a 625 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
dea0c52f 626 /* Skip verify of skip_solib_resolver, invalid_p == 0 */
d50355b6 627 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
c9cf6e20 628 /* Skip verify of stack_frame_destroyed_p, invalid_p == 0 */
3e29f34a 629 /* Skip verify of elf_make_msymbol_special, has predicate. */
a2cf933a 630 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
3e29f34a
MR
631 /* Skip verify of make_symbol_special, invalid_p == 0 */
632 /* Skip verify of adjust_dwarf2_addr, invalid_p == 0 */
633 /* Skip verify of adjust_dwarf2_line, invalid_p == 0 */
c4ed33b9 634 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
f74fa174 635 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
0963b4bd
MS
636 /* Skip verify of address_class_type_flags, has predicate. */
637 /* Skip verify of address_class_type_flags_to_name, has predicate. */
b41c5a85 638 /* Skip verify of execute_dwarf_cfa_vendor_op, invalid_p == 0 */
0963b4bd 639 /* Skip verify of address_class_name_to_type_flags, has predicate. */
7e20f3fb 640 /* Skip verify of register_reggroup_p, invalid_p == 0 */
0963b4bd 641 /* Skip verify of fetch_pointer_argument, has predicate. */
5aa82d05 642 /* Skip verify of iterate_over_regset_sections, has predicate. */
6432734d 643 /* Skip verify of make_corefile_notes, has predicate. */
b3ac9c77 644 /* Skip verify of elfcore_write_linux_prpsinfo, has predicate. */
35c2fab7 645 /* Skip verify of find_memory_regions, has predicate. */
0963b4bd 646 /* Skip verify of core_xfer_shared_libraries, has predicate. */
356a5233 647 /* Skip verify of core_xfer_shared_libraries_aix, has predicate. */
0963b4bd 648 /* Skip verify of core_pid_to_str, has predicate. */
4dfc5dbc 649 /* Skip verify of core_thread_name, has predicate. */
382b69bb 650 /* Skip verify of core_xfer_siginfo, has predicate. */
0963b4bd 651 /* Skip verify of gcore_bfd_target, has predicate. */
0d5de010
DJ
652 /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
653 /* Skip verify of vbit_in_delta, invalid_p == 0 */
ae9bb220 654 /* Skip verify of skip_permanent_breakpoint, invalid_p == 0 */
0963b4bd
MS
655 /* Skip verify of max_insn_length, has predicate. */
656 /* Skip verify of displaced_step_copy_insn, has predicate. */
99e40580 657 /* Skip verify of displaced_step_hw_singlestep, invalid_p == 0 */
0963b4bd 658 /* Skip verify of displaced_step_fixup, has predicate. */
237fc4c9 659 if ((! gdbarch->displaced_step_location) != (! gdbarch->displaced_step_copy_insn))
d7e74731 660 log.puts ("\n\tdisplaced_step_location");
0963b4bd
MS
661 /* Skip verify of relocate_instruction, has predicate. */
662 /* Skip verify of overlay_update, has predicate. */
663 /* Skip verify of core_read_description, has predicate. */
664 /* Skip verify of static_transform_name, has predicate. */
203c3895 665 /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
0963b4bd
MS
666 /* Skip verify of process_record, has predicate. */
667 /* Skip verify of process_record_signal, has predicate. */
1f8cf220 668 /* Skip verify of gdb_signal_from_target, has predicate. */
eb14d406 669 /* Skip verify of gdb_signal_to_target, has predicate. */
0963b4bd
MS
670 /* Skip verify of get_siginfo_type, has predicate. */
671 /* Skip verify of record_special_symbol, has predicate. */
672 /* Skip verify of get_syscall_number, has predicate. */
458c8db8
SDJ
673 /* Skip verify of xml_syscall_file, invalid_p == 0 */
674 /* Skip verify of syscalls_info, invalid_p == 0 */
05c0465e
SDJ
675 /* Skip verify of stap_integer_prefixes, invalid_p == 0 */
676 /* Skip verify of stap_integer_suffixes, invalid_p == 0 */
677 /* Skip verify of stap_register_prefixes, invalid_p == 0 */
678 /* Skip verify of stap_register_suffixes, invalid_p == 0 */
679 /* Skip verify of stap_register_indirection_prefixes, invalid_p == 0 */
680 /* Skip verify of stap_register_indirection_suffixes, invalid_p == 0 */
55aa24fb
SDJ
681 /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */
682 /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */
683 /* Skip verify of stap_is_single_operand, has predicate. */
684 /* Skip verify of stap_parse_special_token, has predicate. */
8b367e17
JM
685 /* Skip verify of dtrace_parse_probe_argument, has predicate. */
686 /* Skip verify of dtrace_probe_is_enabled, has predicate. */
687 /* Skip verify of dtrace_enable_probe, has predicate. */
688 /* Skip verify of dtrace_disable_probe, has predicate. */
50c71eaf 689 /* Skip verify of has_global_solist, invalid_p == 0 */
2567c7d9 690 /* Skip verify of has_global_breakpoints, invalid_p == 0 */
6c95b8df 691 /* Skip verify of has_shared_address_space, invalid_p == 0 */
7a697b8d 692 /* Skip verify of fast_tracepoint_valid_at, invalid_p == 0 */
5f034a78 693 /* Skip verify of guess_tracepoint_registers, invalid_p == 0 */
f870a310
TT
694 /* Skip verify of auto_charset, invalid_p == 0 */
695 /* Skip verify of auto_wide_charset, invalid_p == 0 */
ab38a727 696 /* Skip verify of has_dos_based_file_system, invalid_p == 0 */
6710bf39 697 /* Skip verify of gen_return_address, invalid_p == 0 */
3030c96e 698 /* Skip verify of info_proc, has predicate. */
451b7c33 699 /* Skip verify of core_info_proc, has predicate. */
19630284 700 /* Skip verify of iterate_over_objfiles_in_search_order, invalid_p == 0 */
7e35103a 701 /* Skip verify of ravenscar_ops, invalid_p == 0 */
c2170eef
MM
702 /* Skip verify of insn_is_call, invalid_p == 0 */
703 /* Skip verify of insn_is_ret, invalid_p == 0 */
704 /* Skip verify of insn_is_jump, invalid_p == 0 */
27a48a92 705 /* Skip verify of auxv_parse, has predicate. */
2faa3447 706 /* Skip verify of print_auxv_entry, invalid_p == 0 */
3437254d 707 /* Skip verify of vsyscall_range, invalid_p == 0 */
f208eee0 708 /* Skip verify of infcall_mmap, invalid_p == 0 */
7f361056 709 /* Skip verify of infcall_munmap, invalid_p == 0 */
f208eee0 710 /* Skip verify of gcc_target_options, invalid_p == 0 */
ac04f72b 711 /* Skip verify of gnu_triplet_regexp, invalid_p == 0 */
3374165f 712 /* Skip verify of addressable_memory_unit_size, invalid_p == 0 */
65b48a81
PB
713 /* Skip verify of disassembler_options, invalid_p == 0 */
714 /* Skip verify of valid_disassembler_options, invalid_p == 0 */
d7e74731 715 if (!log.empty ())
f16a1923 716 internal_error (__FILE__, __LINE__,
e2e0b3e5 717 _("verify_gdbarch: the following are invalid ...%s"),
d7e74731 718 log.c_str ());
0f71a2f6
JM
719}
720
721
0963b4bd 722/* Print out the details of the current architecture. */
0f71a2f6
JM
723
724void
be7811ad 725gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
0f71a2f6 726{
b78960be 727 const char *gdb_nm_file = "<not-defined>";
05c547f6 728
b78960be
AC
729#if defined (GDB_NM_FILE)
730 gdb_nm_file = GDB_NM_FILE;
731#endif
732 fprintf_unfiltered (file,
733 "gdbarch_dump: GDB_NM_FILE = %s\n",
734 gdb_nm_file);
48f7351b
AC
735 fprintf_unfiltered (file,
736 "gdbarch_dump: addr_bit = %s\n",
623d3eb1 737 plongest (gdbarch->addr_bit));
48f7351b 738 fprintf_unfiltered (file,
30737ed9
JB
739 "gdbarch_dump: addr_bits_remove = <%s>\n",
740 host_address_to_string (gdbarch->addr_bits_remove));
7996bcec
AC
741 fprintf_unfiltered (file,
742 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
be7811ad 743 gdbarch_address_class_name_to_type_flags_p (gdbarch));
7996bcec 744 fprintf_unfiltered (file,
30737ed9
JB
745 "gdbarch_dump: address_class_name_to_type_flags = <%s>\n",
746 host_address_to_string (gdbarch->address_class_name_to_type_flags));
48f7351b
AC
747 fprintf_unfiltered (file,
748 "gdbarch_dump: gdbarch_address_class_type_flags_p() = %d\n",
be7811ad 749 gdbarch_address_class_type_flags_p (gdbarch));
48f7351b 750 fprintf_unfiltered (file,
30737ed9
JB
751 "gdbarch_dump: address_class_type_flags = <%s>\n",
752 host_address_to_string (gdbarch->address_class_type_flags));
7996bcec
AC
753 fprintf_unfiltered (file,
754 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
be7811ad 755 gdbarch_address_class_type_flags_to_name_p (gdbarch));
7996bcec 756 fprintf_unfiltered (file,
30737ed9
JB
757 "gdbarch_dump: address_class_type_flags_to_name = <%s>\n",
758 host_address_to_string (gdbarch->address_class_type_flags_to_name));
48f7351b 759 fprintf_unfiltered (file,
30737ed9
JB
760 "gdbarch_dump: address_to_pointer = <%s>\n",
761 host_address_to_string (gdbarch->address_to_pointer));
3374165f
SM
762 fprintf_unfiltered (file,
763 "gdbarch_dump: addressable_memory_unit_size = <%s>\n",
764 host_address_to_string (gdbarch->addressable_memory_unit_size));
a1131521
KB
765 fprintf_unfiltered (file,
766 "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n",
be7811ad 767 gdbarch_adjust_breakpoint_address_p (gdbarch));
a1131521 768 fprintf_unfiltered (file,
30737ed9
JB
769 "gdbarch_dump: adjust_breakpoint_address = <%s>\n",
770 host_address_to_string (gdbarch->adjust_breakpoint_address));
3e29f34a
MR
771 fprintf_unfiltered (file,
772 "gdbarch_dump: adjust_dwarf2_addr = <%s>\n",
773 host_address_to_string (gdbarch->adjust_dwarf2_addr));
774 fprintf_unfiltered (file,
775 "gdbarch_dump: adjust_dwarf2_line = <%s>\n",
776 host_address_to_string (gdbarch->adjust_dwarf2_line));
f870a310
TT
777 fprintf_unfiltered (file,
778 "gdbarch_dump: auto_charset = <%s>\n",
779 host_address_to_string (gdbarch->auto_charset));
780 fprintf_unfiltered (file,
781 "gdbarch_dump: auto_wide_charset = <%s>\n",
782 host_address_to_string (gdbarch->auto_wide_charset));
27a48a92
MK
783 fprintf_unfiltered (file,
784 "gdbarch_dump: gdbarch_auxv_parse_p() = %d\n",
785 gdbarch_auxv_parse_p (gdbarch));
786 fprintf_unfiltered (file,
787 "gdbarch_dump: auxv_parse = <%s>\n",
788 host_address_to_string (gdbarch->auxv_parse));
175ff332
HZ
789 fprintf_unfiltered (file,
790 "gdbarch_dump: gdbarch_ax_pseudo_register_collect_p() = %d\n",
791 gdbarch_ax_pseudo_register_collect_p (gdbarch));
792 fprintf_unfiltered (file,
793 "gdbarch_dump: ax_pseudo_register_collect = <%s>\n",
794 host_address_to_string (gdbarch->ax_pseudo_register_collect));
795 fprintf_unfiltered (file,
796 "gdbarch_dump: gdbarch_ax_pseudo_register_push_stack_p() = %d\n",
797 gdbarch_ax_pseudo_register_push_stack_p (gdbarch));
798 fprintf_unfiltered (file,
799 "gdbarch_dump: ax_pseudo_register_push_stack = <%s>\n",
800 host_address_to_string (gdbarch->ax_pseudo_register_push_stack));
48f7351b
AC
801 fprintf_unfiltered (file,
802 "gdbarch_dump: believe_pcc_promotion = %s\n",
623d3eb1 803 plongest (gdbarch->believe_pcc_promotion));
283354d8 804 fprintf_unfiltered (file,
48f7351b 805 "gdbarch_dump: bfd_arch_info = %s\n",
be7811ad 806 gdbarch_bfd_arch_info (gdbarch)->printable_name);
32c9a795
MD
807 fprintf_unfiltered (file,
808 "gdbarch_dump: bits_big_endian = %s\n",
623d3eb1 809 plongest (gdbarch->bits_big_endian));
48f7351b 810 fprintf_unfiltered (file,
30737ed9
JB
811 "gdbarch_dump: breakpoint_from_pc = <%s>\n",
812 host_address_to_string (gdbarch->breakpoint_from_pc));
833b7ab5
YQ
813 fprintf_unfiltered (file,
814 "gdbarch_dump: breakpoint_kind_from_current_state = <%s>\n",
815 host_address_to_string (gdbarch->breakpoint_kind_from_current_state));
cd6c3b4f
YQ
816 fprintf_unfiltered (file,
817 "gdbarch_dump: breakpoint_kind_from_pc = <%s>\n",
818 host_address_to_string (gdbarch->breakpoint_kind_from_pc));
48f7351b
AC
819 fprintf_unfiltered (file,
820 "gdbarch_dump: byte_order = %s\n",
623d3eb1 821 plongest (gdbarch->byte_order));
9d4fde75
SS
822 fprintf_unfiltered (file,
823 "gdbarch_dump: byte_order_for_code = %s\n",
623d3eb1 824 plongest (gdbarch->byte_order_for_code));
48f7351b
AC
825 fprintf_unfiltered (file,
826 "gdbarch_dump: call_dummy_location = %s\n",
623d3eb1 827 plongest (gdbarch->call_dummy_location));
48f7351b 828 fprintf_unfiltered (file,
30737ed9
JB
829 "gdbarch_dump: cannot_fetch_register = <%s>\n",
830 host_address_to_string (gdbarch->cannot_fetch_register));
48f7351b
AC
831 fprintf_unfiltered (file,
832 "gdbarch_dump: cannot_step_breakpoint = %s\n",
623d3eb1 833 plongest (gdbarch->cannot_step_breakpoint));
48f7351b 834 fprintf_unfiltered (file,
30737ed9
JB
835 "gdbarch_dump: cannot_store_register = <%s>\n",
836 host_address_to_string (gdbarch->cannot_store_register));
48f7351b
AC
837 fprintf_unfiltered (file,
838 "gdbarch_dump: char_signed = %s\n",
623d3eb1 839 plongest (gdbarch->char_signed));
7eb89530
YQ
840 fprintf_unfiltered (file,
841 "gdbarch_dump: code_of_frame_writable = <%s>\n",
842 host_address_to_string (gdbarch->code_of_frame_writable));
7996bcec 843 fprintf_unfiltered (file,
30737ed9
JB
844 "gdbarch_dump: coff_make_msymbol_special = <%s>\n",
845 host_address_to_string (gdbarch->coff_make_msymbol_special));
a2428dbe 846 fprintf_unfiltered (file,
30737ed9
JB
847 "gdbarch_dump: convert_from_func_ptr_addr = <%s>\n",
848 host_address_to_string (gdbarch->convert_from_func_ptr_addr));
48f7351b 849 fprintf_unfiltered (file,
30737ed9
JB
850 "gdbarch_dump: convert_register_p = <%s>\n",
851 host_address_to_string (gdbarch->convert_register_p));
451b7c33
TT
852 fprintf_unfiltered (file,
853 "gdbarch_dump: gdbarch_core_info_proc_p() = %d\n",
854 gdbarch_core_info_proc_p (gdbarch));
855 fprintf_unfiltered (file,
856 "gdbarch_dump: core_info_proc = <%s>\n",
857 host_address_to_string (gdbarch->core_info_proc));
28439f5e
PA
858 fprintf_unfiltered (file,
859 "gdbarch_dump: gdbarch_core_pid_to_str_p() = %d\n",
860 gdbarch_core_pid_to_str_p (gdbarch));
861 fprintf_unfiltered (file,
862 "gdbarch_dump: core_pid_to_str = <%s>\n",
863 host_address_to_string (gdbarch->core_pid_to_str));
4eb0ad19
DJ
864 fprintf_unfiltered (file,
865 "gdbarch_dump: gdbarch_core_read_description_p() = %d\n",
be7811ad 866 gdbarch_core_read_description_p (gdbarch));
4eb0ad19 867 fprintf_unfiltered (file,
30737ed9
JB
868 "gdbarch_dump: core_read_description = <%s>\n",
869 host_address_to_string (gdbarch->core_read_description));
4dfc5dbc
JB
870 fprintf_unfiltered (file,
871 "gdbarch_dump: gdbarch_core_thread_name_p() = %d\n",
872 gdbarch_core_thread_name_p (gdbarch));
873 fprintf_unfiltered (file,
874 "gdbarch_dump: core_thread_name = <%s>\n",
875 host_address_to_string (gdbarch->core_thread_name));
de584861
PA
876 fprintf_unfiltered (file,
877 "gdbarch_dump: gdbarch_core_xfer_shared_libraries_p() = %d\n",
be7811ad 878 gdbarch_core_xfer_shared_libraries_p (gdbarch));
de584861 879 fprintf_unfiltered (file,
30737ed9
JB
880 "gdbarch_dump: core_xfer_shared_libraries = <%s>\n",
881 host_address_to_string (gdbarch->core_xfer_shared_libraries));
356a5233
JB
882 fprintf_unfiltered (file,
883 "gdbarch_dump: gdbarch_core_xfer_shared_libraries_aix_p() = %d\n",
884 gdbarch_core_xfer_shared_libraries_aix_p (gdbarch));
885 fprintf_unfiltered (file,
886 "gdbarch_dump: core_xfer_shared_libraries_aix = <%s>\n",
887 host_address_to_string (gdbarch->core_xfer_shared_libraries_aix));
382b69bb
JB
888 fprintf_unfiltered (file,
889 "gdbarch_dump: gdbarch_core_xfer_siginfo_p() = %d\n",
890 gdbarch_core_xfer_siginfo_p (gdbarch));
891 fprintf_unfiltered (file,
892 "gdbarch_dump: core_xfer_siginfo = <%s>\n",
893 host_address_to_string (gdbarch->core_xfer_siginfo));
48f7351b 894 fprintf_unfiltered (file,
0b1553bc
UW
895 "gdbarch_dump: decr_pc_after_break = %s\n",
896 core_addr_to_string_nz (gdbarch->decr_pc_after_break));
48f7351b
AC
897 fprintf_unfiltered (file,
898 "gdbarch_dump: deprecated_fp_regnum = %s\n",
623d3eb1 899 plongest (gdbarch->deprecated_fp_regnum));
48f7351b 900 fprintf_unfiltered (file,
0b1553bc
UW
901 "gdbarch_dump: deprecated_function_start_offset = %s\n",
902 core_addr_to_string_nz (gdbarch->deprecated_function_start_offset));
65b48a81
PB
903 fprintf_unfiltered (file,
904 "gdbarch_dump: disassembler_options = %s\n",
f7bb4e3a 905 pstring_ptr (gdbarch->disassembler_options));
237fc4c9
PA
906 fprintf_unfiltered (file,
907 "gdbarch_dump: gdbarch_displaced_step_copy_insn_p() = %d\n",
908 gdbarch_displaced_step_copy_insn_p (gdbarch));
909 fprintf_unfiltered (file,
30737ed9
JB
910 "gdbarch_dump: displaced_step_copy_insn = <%s>\n",
911 host_address_to_string (gdbarch->displaced_step_copy_insn));
237fc4c9
PA
912 fprintf_unfiltered (file,
913 "gdbarch_dump: gdbarch_displaced_step_fixup_p() = %d\n",
914 gdbarch_displaced_step_fixup_p (gdbarch));
915 fprintf_unfiltered (file,
30737ed9
JB
916 "gdbarch_dump: displaced_step_fixup = <%s>\n",
917 host_address_to_string (gdbarch->displaced_step_fixup));
99e40580
UW
918 fprintf_unfiltered (file,
919 "gdbarch_dump: displaced_step_hw_singlestep = <%s>\n",
920 host_address_to_string (gdbarch->displaced_step_hw_singlestep));
237fc4c9 921 fprintf_unfiltered (file,
30737ed9
JB
922 "gdbarch_dump: displaced_step_location = <%s>\n",
923 host_address_to_string (gdbarch->displaced_step_location));
48f7351b
AC
924 fprintf_unfiltered (file,
925 "gdbarch_dump: double_bit = %s\n",
623d3eb1 926 plongest (gdbarch->double_bit));
a2428dbe 927 fprintf_unfiltered (file,
48f7351b 928 "gdbarch_dump: double_format = %s\n",
be7811ad 929 pformat (gdbarch->double_format));
8b367e17
JM
930 fprintf_unfiltered (file,
931 "gdbarch_dump: gdbarch_dtrace_disable_probe_p() = %d\n",
932 gdbarch_dtrace_disable_probe_p (gdbarch));
933 fprintf_unfiltered (file,
934 "gdbarch_dump: dtrace_disable_probe = <%s>\n",
935 host_address_to_string (gdbarch->dtrace_disable_probe));
936 fprintf_unfiltered (file,
937 "gdbarch_dump: gdbarch_dtrace_enable_probe_p() = %d\n",
938 gdbarch_dtrace_enable_probe_p (gdbarch));
939 fprintf_unfiltered (file,
940 "gdbarch_dump: dtrace_enable_probe = <%s>\n",
941 host_address_to_string (gdbarch->dtrace_enable_probe));
942 fprintf_unfiltered (file,
943 "gdbarch_dump: gdbarch_dtrace_parse_probe_argument_p() = %d\n",
944 gdbarch_dtrace_parse_probe_argument_p (gdbarch));
945 fprintf_unfiltered (file,
946 "gdbarch_dump: dtrace_parse_probe_argument = <%s>\n",
947 host_address_to_string (gdbarch->dtrace_parse_probe_argument));
948 fprintf_unfiltered (file,
949 "gdbarch_dump: gdbarch_dtrace_probe_is_enabled_p() = %d\n",
950 gdbarch_dtrace_probe_is_enabled_p (gdbarch));
951 fprintf_unfiltered (file,
952 "gdbarch_dump: dtrace_probe_is_enabled = <%s>\n",
953 host_address_to_string (gdbarch->dtrace_probe_is_enabled));
669fac23
DJ
954 fprintf_unfiltered (file,
955 "gdbarch_dump: gdbarch_dummy_id_p() = %d\n",
956 gdbarch_dummy_id_p (gdbarch));
957 fprintf_unfiltered (file,
30737ed9
JB
958 "gdbarch_dump: dummy_id = <%s>\n",
959 host_address_to_string (gdbarch->dummy_id));
8da614df
CV
960 fprintf_unfiltered (file,
961 "gdbarch_dump: dwarf2_addr_size = %s\n",
962 plongest (gdbarch->dwarf2_addr_size));
48f7351b 963 fprintf_unfiltered (file,
30737ed9
JB
964 "gdbarch_dump: dwarf2_reg_to_regnum = <%s>\n",
965 host_address_to_string (gdbarch->dwarf2_reg_to_regnum));
48f7351b 966 fprintf_unfiltered (file,
30737ed9
JB
967 "gdbarch_dump: ecoff_reg_to_regnum = <%s>\n",
968 host_address_to_string (gdbarch->ecoff_reg_to_regnum));
3e29f34a
MR
969 fprintf_unfiltered (file,
970 "gdbarch_dump: gdbarch_elf_make_msymbol_special_p() = %d\n",
971 gdbarch_elf_make_msymbol_special_p (gdbarch));
48f7351b 972 fprintf_unfiltered (file,
30737ed9
JB
973 "gdbarch_dump: elf_make_msymbol_special = <%s>\n",
974 host_address_to_string (gdbarch->elf_make_msymbol_special));
b3ac9c77
SDJ
975 fprintf_unfiltered (file,
976 "gdbarch_dump: gdbarch_elfcore_write_linux_prpsinfo_p() = %d\n",
977 gdbarch_elfcore_write_linux_prpsinfo_p (gdbarch));
978 fprintf_unfiltered (file,
979 "gdbarch_dump: elfcore_write_linux_prpsinfo = <%s>\n",
980 host_address_to_string (gdbarch->elfcore_write_linux_prpsinfo));
b41c5a85
JW
981 fprintf_unfiltered (file,
982 "gdbarch_dump: execute_dwarf_cfa_vendor_op = <%s>\n",
983 host_address_to_string (gdbarch->execute_dwarf_cfa_vendor_op));
7a697b8d
SS
984 fprintf_unfiltered (file,
985 "gdbarch_dump: fast_tracepoint_valid_at = <%s>\n",
986 host_address_to_string (gdbarch->fast_tracepoint_valid_at));
48f7351b
AC
987 fprintf_unfiltered (file,
988 "gdbarch_dump: gdbarch_fetch_pointer_argument_p() = %d\n",
be7811ad 989 gdbarch_fetch_pointer_argument_p (gdbarch));
48f7351b 990 fprintf_unfiltered (file,
30737ed9
JB
991 "gdbarch_dump: fetch_pointer_argument = <%s>\n",
992 host_address_to_string (gdbarch->fetch_pointer_argument));
b2756930
KB
993 fprintf_unfiltered (file,
994 "gdbarch_dump: gdbarch_fetch_tls_load_module_address_p() = %d\n",
be7811ad 995 gdbarch_fetch_tls_load_module_address_p (gdbarch));
b2756930 996 fprintf_unfiltered (file,
30737ed9
JB
997 "gdbarch_dump: fetch_tls_load_module_address = <%s>\n",
998 host_address_to_string (gdbarch->fetch_tls_load_module_address));
35c2fab7
UW
999 fprintf_unfiltered (file,
1000 "gdbarch_dump: gdbarch_find_memory_regions_p() = %d\n",
1001 gdbarch_find_memory_regions_p (gdbarch));
1002 fprintf_unfiltered (file,
1003 "gdbarch_dump: find_memory_regions = <%s>\n",
1004 host_address_to_string (gdbarch->find_memory_regions));
48f7351b
AC
1005 fprintf_unfiltered (file,
1006 "gdbarch_dump: float_bit = %s\n",
623d3eb1 1007 plongest (gdbarch->float_bit));
a2428dbe 1008 fprintf_unfiltered (file,
48f7351b 1009 "gdbarch_dump: float_format = %s\n",
be7811ad 1010 pformat (gdbarch->float_format));
9b790ce7
UW
1011 fprintf_unfiltered (file,
1012 "gdbarch_dump: floatformat_for_type = <%s>\n",
1013 host_address_to_string (gdbarch->floatformat_for_type));
48f7351b
AC
1014 fprintf_unfiltered (file,
1015 "gdbarch_dump: fp0_regnum = %s\n",
623d3eb1 1016 plongest (gdbarch->fp0_regnum));
a2428dbe
AC
1017 fprintf_unfiltered (file,
1018 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
be7811ad 1019 gdbarch_frame_align_p (gdbarch));
a2428dbe 1020 fprintf_unfiltered (file,
30737ed9
JB
1021 "gdbarch_dump: frame_align = <%s>\n",
1022 host_address_to_string (gdbarch->frame_align));
48f7351b 1023 fprintf_unfiltered (file,
0b1553bc
UW
1024 "gdbarch_dump: frame_args_skip = %s\n",
1025 core_addr_to_string_nz (gdbarch->frame_args_skip));
48f7351b
AC
1026 fprintf_unfiltered (file,
1027 "gdbarch_dump: gdbarch_frame_num_args_p() = %d\n",
be7811ad 1028 gdbarch_frame_num_args_p (gdbarch));
48f7351b 1029 fprintf_unfiltered (file,
30737ed9
JB
1030 "gdbarch_dump: frame_num_args = <%s>\n",
1031 host_address_to_string (gdbarch->frame_num_args));
48f7351b
AC
1032 fprintf_unfiltered (file,
1033 "gdbarch_dump: frame_red_zone_size = %s\n",
623d3eb1 1034 plongest (gdbarch->frame_red_zone_size));
f208eee0
JK
1035 fprintf_unfiltered (file,
1036 "gdbarch_dump: gcc_target_options = <%s>\n",
1037 host_address_to_string (gdbarch->gcc_target_options));
a78c2d62
UW
1038 fprintf_unfiltered (file,
1039 "gdbarch_dump: gdbarch_gcore_bfd_target_p() = %d\n",
1040 gdbarch_gcore_bfd_target_p (gdbarch));
1041 fprintf_unfiltered (file,
1042 "gdbarch_dump: gcore_bfd_target = %s\n",
86ba1042 1043 pstring (gdbarch->gcore_bfd_target));
1f8cf220
PA
1044 fprintf_unfiltered (file,
1045 "gdbarch_dump: gdbarch_gdb_signal_from_target_p() = %d\n",
1046 gdbarch_gdb_signal_from_target_p (gdbarch));
2ea28649 1047 fprintf_unfiltered (file,
22203bbf
PA
1048 "gdbarch_dump: gdb_signal_from_target = <%s>\n",
1049 host_address_to_string (gdbarch->gdb_signal_from_target));
eb14d406
SDJ
1050 fprintf_unfiltered (file,
1051 "gdbarch_dump: gdbarch_gdb_signal_to_target_p() = %d\n",
1052 gdbarch_gdb_signal_to_target_p (gdbarch));
1053 fprintf_unfiltered (file,
1054 "gdbarch_dump: gdb_signal_to_target = <%s>\n",
1055 host_address_to_string (gdbarch->gdb_signal_to_target));
6710bf39
SS
1056 fprintf_unfiltered (file,
1057 "gdbarch_dump: gen_return_address = <%s>\n",
1058 host_address_to_string (gdbarch->gen_return_address));
48f7351b
AC
1059 fprintf_unfiltered (file,
1060 "gdbarch_dump: gdbarch_get_longjmp_target_p() = %d\n",
be7811ad 1061 gdbarch_get_longjmp_target_p (gdbarch));
48f7351b 1062 fprintf_unfiltered (file,
30737ed9
JB
1063 "gdbarch_dump: get_longjmp_target = <%s>\n",
1064 host_address_to_string (gdbarch->get_longjmp_target));
4aa995e1
PA
1065 fprintf_unfiltered (file,
1066 "gdbarch_dump: gdbarch_get_siginfo_type_p() = %d\n",
1067 gdbarch_get_siginfo_type_p (gdbarch));
1068 fprintf_unfiltered (file,
315aef0a
PA
1069 "gdbarch_dump: get_siginfo_type = <%s>\n",
1070 host_address_to_string (gdbarch->get_siginfo_type));
a96d9b2e
SDJ
1071 fprintf_unfiltered (file,
1072 "gdbarch_dump: gdbarch_get_syscall_number_p() = %d\n",
1073 gdbarch_get_syscall_number_p (gdbarch));
1074 fprintf_unfiltered (file,
1075 "gdbarch_dump: get_syscall_number = <%s>\n",
1076 host_address_to_string (gdbarch->get_syscall_number));
ac04f72b
TT
1077 fprintf_unfiltered (file,
1078 "gdbarch_dump: gnu_triplet_regexp = <%s>\n",
1079 host_address_to_string (gdbarch->gnu_triplet_regexp));
5f034a78
MK
1080 fprintf_unfiltered (file,
1081 "gdbarch_dump: guess_tracepoint_registers = <%s>\n",
1082 host_address_to_string (gdbarch->guess_tracepoint_registers));
f9e9243a
UW
1083 fprintf_unfiltered (file,
1084 "gdbarch_dump: half_bit = %s\n",
1085 plongest (gdbarch->half_bit));
1086 fprintf_unfiltered (file,
1087 "gdbarch_dump: half_format = %s\n",
1088 pformat (gdbarch->half_format));
012b3a21
WT
1089 fprintf_unfiltered (file,
1090 "gdbarch_dump: gdbarch_handle_segmentation_fault_p() = %d\n",
1091 gdbarch_handle_segmentation_fault_p (gdbarch));
1092 fprintf_unfiltered (file,
1093 "gdbarch_dump: handle_segmentation_fault = <%s>\n",
1094 host_address_to_string (gdbarch->handle_segmentation_fault));
ab38a727
PA
1095 fprintf_unfiltered (file,
1096 "gdbarch_dump: has_dos_based_file_system = %s\n",
1097 plongest (gdbarch->has_dos_based_file_system));
2567c7d9
PA
1098 fprintf_unfiltered (file,
1099 "gdbarch_dump: has_global_breakpoints = %s\n",
1100 plongest (gdbarch->has_global_breakpoints));
50c71eaf
PA
1101 fprintf_unfiltered (file,
1102 "gdbarch_dump: has_global_solist = %s\n",
1103 plongest (gdbarch->has_global_solist));
6c95b8df
PA
1104 fprintf_unfiltered (file,
1105 "gdbarch_dump: has_shared_address_space = <%s>\n",
1106 host_address_to_string (gdbarch->has_shared_address_space));
a2428dbe 1107 fprintf_unfiltered (file,
48f7351b 1108 "gdbarch_dump: have_nonsteppable_watchpoint = %s\n",
623d3eb1 1109 plongest (gdbarch->have_nonsteppable_watchpoint));
48f7351b 1110 fprintf_unfiltered (file,
30737ed9
JB
1111 "gdbarch_dump: in_solib_return_trampoline = <%s>\n",
1112 host_address_to_string (gdbarch->in_solib_return_trampoline));
f208eee0
JK
1113 fprintf_unfiltered (file,
1114 "gdbarch_dump: infcall_mmap = <%s>\n",
1115 host_address_to_string (gdbarch->infcall_mmap));
7f361056
JK
1116 fprintf_unfiltered (file,
1117 "gdbarch_dump: infcall_munmap = <%s>\n",
1118 host_address_to_string (gdbarch->infcall_munmap));
3030c96e
UW
1119 fprintf_unfiltered (file,
1120 "gdbarch_dump: gdbarch_info_proc_p() = %d\n",
1121 gdbarch_info_proc_p (gdbarch));
1122 fprintf_unfiltered (file,
1123 "gdbarch_dump: info_proc = <%s>\n",
1124 host_address_to_string (gdbarch->info_proc));
48f7351b 1125 fprintf_unfiltered (file,
30737ed9
JB
1126 "gdbarch_dump: inner_than = <%s>\n",
1127 host_address_to_string (gdbarch->inner_than));
c2170eef
MM
1128 fprintf_unfiltered (file,
1129 "gdbarch_dump: insn_is_call = <%s>\n",
1130 host_address_to_string (gdbarch->insn_is_call));
1131 fprintf_unfiltered (file,
1132 "gdbarch_dump: insn_is_jump = <%s>\n",
1133 host_address_to_string (gdbarch->insn_is_jump));
1134 fprintf_unfiltered (file,
1135 "gdbarch_dump: insn_is_ret = <%s>\n",
1136 host_address_to_string (gdbarch->insn_is_ret));
48f7351b
AC
1137 fprintf_unfiltered (file,
1138 "gdbarch_dump: int_bit = %s\n",
623d3eb1 1139 plongest (gdbarch->int_bit));
48f7351b
AC
1140 fprintf_unfiltered (file,
1141 "gdbarch_dump: gdbarch_integer_to_address_p() = %d\n",
be7811ad 1142 gdbarch_integer_to_address_p (gdbarch));
48f7351b 1143 fprintf_unfiltered (file,
30737ed9
JB
1144 "gdbarch_dump: integer_to_address = <%s>\n",
1145 host_address_to_string (gdbarch->integer_to_address));
19630284
JB
1146 fprintf_unfiltered (file,
1147 "gdbarch_dump: iterate_over_objfiles_in_search_order = <%s>\n",
1148 host_address_to_string (gdbarch->iterate_over_objfiles_in_search_order));
5aa82d05
AA
1149 fprintf_unfiltered (file,
1150 "gdbarch_dump: gdbarch_iterate_over_regset_sections_p() = %d\n",
1151 gdbarch_iterate_over_regset_sections_p (gdbarch));
1152 fprintf_unfiltered (file,
1153 "gdbarch_dump: iterate_over_regset_sections = <%s>\n",
1154 host_address_to_string (gdbarch->iterate_over_regset_sections));
48f7351b
AC
1155 fprintf_unfiltered (file,
1156 "gdbarch_dump: long_bit = %s\n",
623d3eb1 1157 plongest (gdbarch->long_bit));
48f7351b
AC
1158 fprintf_unfiltered (file,
1159 "gdbarch_dump: long_double_bit = %s\n",
623d3eb1 1160 plongest (gdbarch->long_double_bit));
a2428dbe 1161 fprintf_unfiltered (file,
48f7351b 1162 "gdbarch_dump: long_double_format = %s\n",
be7811ad 1163 pformat (gdbarch->long_double_format));
205c306f
DM
1164 fprintf_unfiltered (file,
1165 "gdbarch_dump: long_long_align_bit = %s\n",
1166 plongest (gdbarch->long_long_align_bit));
48f7351b
AC
1167 fprintf_unfiltered (file,
1168 "gdbarch_dump: long_long_bit = %s\n",
623d3eb1 1169 plongest (gdbarch->long_long_bit));
6432734d
UW
1170 fprintf_unfiltered (file,
1171 "gdbarch_dump: gdbarch_make_corefile_notes_p() = %d\n",
1172 gdbarch_make_corefile_notes_p (gdbarch));
1173 fprintf_unfiltered (file,
1174 "gdbarch_dump: make_corefile_notes = <%s>\n",
1175 host_address_to_string (gdbarch->make_corefile_notes));
3e29f34a
MR
1176 fprintf_unfiltered (file,
1177 "gdbarch_dump: make_symbol_special = <%s>\n",
1178 host_address_to_string (gdbarch->make_symbol_special));
237fc4c9
PA
1179 fprintf_unfiltered (file,
1180 "gdbarch_dump: gdbarch_max_insn_length_p() = %d\n",
1181 gdbarch_max_insn_length_p (gdbarch));
1182 fprintf_unfiltered (file,
1183 "gdbarch_dump: max_insn_length = %s\n",
623d3eb1 1184 plongest (gdbarch->max_insn_length));
48f7351b 1185 fprintf_unfiltered (file,
30737ed9
JB
1186 "gdbarch_dump: memory_insert_breakpoint = <%s>\n",
1187 host_address_to_string (gdbarch->memory_insert_breakpoint));
48f7351b 1188 fprintf_unfiltered (file,
30737ed9
JB
1189 "gdbarch_dump: memory_remove_breakpoint = <%s>\n",
1190 host_address_to_string (gdbarch->memory_remove_breakpoint));
48f7351b
AC
1191 fprintf_unfiltered (file,
1192 "gdbarch_dump: num_pseudo_regs = %s\n",
623d3eb1 1193 plongest (gdbarch->num_pseudo_regs));
48f7351b
AC
1194 fprintf_unfiltered (file,
1195 "gdbarch_dump: num_regs = %s\n",
623d3eb1 1196 plongest (gdbarch->num_regs));
48f7351b
AC
1197 fprintf_unfiltered (file,
1198 "gdbarch_dump: osabi = %s\n",
623d3eb1 1199 plongest (gdbarch->osabi));
1c772458
UW
1200 fprintf_unfiltered (file,
1201 "gdbarch_dump: gdbarch_overlay_update_p() = %d\n",
be7811ad 1202 gdbarch_overlay_update_p (gdbarch));
1c772458 1203 fprintf_unfiltered (file,
30737ed9
JB
1204 "gdbarch_dump: overlay_update = <%s>\n",
1205 host_address_to_string (gdbarch->overlay_update));
48f7351b
AC
1206 fprintf_unfiltered (file,
1207 "gdbarch_dump: pc_regnum = %s\n",
623d3eb1 1208 plongest (gdbarch->pc_regnum));
48f7351b 1209 fprintf_unfiltered (file,
30737ed9
JB
1210 "gdbarch_dump: pointer_to_address = <%s>\n",
1211 host_address_to_string (gdbarch->pointer_to_address));
2faa3447
JB
1212 fprintf_unfiltered (file,
1213 "gdbarch_dump: print_auxv_entry = <%s>\n",
1214 host_address_to_string (gdbarch->print_auxv_entry));
7996bcec 1215 fprintf_unfiltered (file,
30737ed9
JB
1216 "gdbarch_dump: print_float_info = <%s>\n",
1217 host_address_to_string (gdbarch->print_float_info));
7996bcec 1218 fprintf_unfiltered (file,
30737ed9
JB
1219 "gdbarch_dump: print_insn = <%s>\n",
1220 host_address_to_string (gdbarch->print_insn));
48f7351b 1221 fprintf_unfiltered (file,
30737ed9
JB
1222 "gdbarch_dump: print_registers_info = <%s>\n",
1223 host_address_to_string (gdbarch->print_registers_info));
7996bcec
AC
1224 fprintf_unfiltered (file,
1225 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
be7811ad 1226 gdbarch_print_vector_info_p (gdbarch));
7996bcec 1227 fprintf_unfiltered (file,
30737ed9
JB
1228 "gdbarch_dump: print_vector_info = <%s>\n",
1229 host_address_to_string (gdbarch->print_vector_info));
0508c3ec
HZ
1230 fprintf_unfiltered (file,
1231 "gdbarch_dump: gdbarch_process_record_p() = %d\n",
1232 gdbarch_process_record_p (gdbarch));
1233 fprintf_unfiltered (file,
1234 "gdbarch_dump: process_record = <%s>\n",
1235 host_address_to_string (gdbarch->process_record));
3846b520
HZ
1236 fprintf_unfiltered (file,
1237 "gdbarch_dump: gdbarch_process_record_signal_p() = %d\n",
1238 gdbarch_process_record_signal_p (gdbarch));
1239 fprintf_unfiltered (file,
1240 "gdbarch_dump: process_record_signal = <%s>\n",
1241 host_address_to_string (gdbarch->process_record_signal));
48f7351b
AC
1242 fprintf_unfiltered (file,
1243 "gdbarch_dump: ps_regnum = %s\n",
623d3eb1 1244 plongest (gdbarch->ps_regnum));
a2428dbe
AC
1245 fprintf_unfiltered (file,
1246 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
be7811ad 1247 gdbarch_pseudo_register_read_p (gdbarch));
a2428dbe 1248 fprintf_unfiltered (file,
30737ed9
JB
1249 "gdbarch_dump: pseudo_register_read = <%s>\n",
1250 host_address_to_string (gdbarch->pseudo_register_read));
3543a589
TT
1251 fprintf_unfiltered (file,
1252 "gdbarch_dump: gdbarch_pseudo_register_read_value_p() = %d\n",
1253 gdbarch_pseudo_register_read_value_p (gdbarch));
1254 fprintf_unfiltered (file,
1255 "gdbarch_dump: pseudo_register_read_value = <%s>\n",
1256 host_address_to_string (gdbarch->pseudo_register_read_value));
a2428dbe
AC
1257 fprintf_unfiltered (file,
1258 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
be7811ad 1259 gdbarch_pseudo_register_write_p (gdbarch));
a2428dbe 1260 fprintf_unfiltered (file,
30737ed9
JB
1261 "gdbarch_dump: pseudo_register_write = <%s>\n",
1262 host_address_to_string (gdbarch->pseudo_register_write));
48f7351b
AC
1263 fprintf_unfiltered (file,
1264 "gdbarch_dump: ptr_bit = %s\n",
623d3eb1 1265 plongest (gdbarch->ptr_bit));
7996bcec
AC
1266 fprintf_unfiltered (file,
1267 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
be7811ad 1268 gdbarch_push_dummy_call_p (gdbarch));
7996bcec 1269 fprintf_unfiltered (file,
30737ed9
JB
1270 "gdbarch_dump: push_dummy_call = <%s>\n",
1271 host_address_to_string (gdbarch->push_dummy_call));
7996bcec
AC
1272 fprintf_unfiltered (file,
1273 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
be7811ad 1274 gdbarch_push_dummy_code_p (gdbarch));
7996bcec 1275 fprintf_unfiltered (file,
30737ed9
JB
1276 "gdbarch_dump: push_dummy_code = <%s>\n",
1277 host_address_to_string (gdbarch->push_dummy_code));
7e35103a
JB
1278 fprintf_unfiltered (file,
1279 "gdbarch_dump: ravenscar_ops = %s\n",
1280 host_address_to_string (gdbarch->ravenscar_ops));
48f7351b
AC
1281 fprintf_unfiltered (file,
1282 "gdbarch_dump: gdbarch_read_pc_p() = %d\n",
be7811ad 1283 gdbarch_read_pc_p (gdbarch));
48f7351b 1284 fprintf_unfiltered (file,
30737ed9
JB
1285 "gdbarch_dump: read_pc = <%s>\n",
1286 host_address_to_string (gdbarch->read_pc));
60c5725c
DJ
1287 fprintf_unfiltered (file,
1288 "gdbarch_dump: gdbarch_record_special_symbol_p() = %d\n",
1289 gdbarch_record_special_symbol_p (gdbarch));
1290 fprintf_unfiltered (file,
30737ed9
JB
1291 "gdbarch_dump: record_special_symbol = <%s>\n",
1292 host_address_to_string (gdbarch->record_special_symbol));
a2428dbe 1293 fprintf_unfiltered (file,
30737ed9
JB
1294 "gdbarch_dump: register_name = <%s>\n",
1295 host_address_to_string (gdbarch->register_name));
48f7351b 1296 fprintf_unfiltered (file,
30737ed9
JB
1297 "gdbarch_dump: register_reggroup_p = <%s>\n",
1298 host_address_to_string (gdbarch->register_reggroup_p));
48f7351b 1299 fprintf_unfiltered (file,
30737ed9
JB
1300 "gdbarch_dump: register_sim_regno = <%s>\n",
1301 host_address_to_string (gdbarch->register_sim_regno));
48f7351b 1302 fprintf_unfiltered (file,
30737ed9
JB
1303 "gdbarch_dump: register_to_value = <%s>\n",
1304 host_address_to_string (gdbarch->register_to_value));
7996bcec
AC
1305 fprintf_unfiltered (file,
1306 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
be7811ad 1307 gdbarch_register_type_p (gdbarch));
7996bcec 1308 fprintf_unfiltered (file,
30737ed9
JB
1309 "gdbarch_dump: register_type = <%s>\n",
1310 host_address_to_string (gdbarch->register_type));
dde08ee1
PA
1311 fprintf_unfiltered (file,
1312 "gdbarch_dump: gdbarch_relocate_instruction_p() = %d\n",
1313 gdbarch_relocate_instruction_p (gdbarch));
1314 fprintf_unfiltered (file,
1315 "gdbarch_dump: relocate_instruction = <%s>\n",
1316 host_address_to_string (gdbarch->relocate_instruction));
123dc839 1317 fprintf_unfiltered (file,
30737ed9
JB
1318 "gdbarch_dump: remote_register_number = <%s>\n",
1319 host_address_to_string (gdbarch->remote_register_number));
18648a37
YQ
1320 fprintf_unfiltered (file,
1321 "gdbarch_dump: return_in_first_hidden_param_p = <%s>\n",
1322 host_address_to_string (gdbarch->return_in_first_hidden_param_p));
a2428dbe
AC
1323 fprintf_unfiltered (file,
1324 "gdbarch_dump: gdbarch_return_value_p() = %d\n",
be7811ad 1325 gdbarch_return_value_p (gdbarch));
a2428dbe 1326 fprintf_unfiltered (file,
30737ed9
JB
1327 "gdbarch_dump: return_value = <%s>\n",
1328 host_address_to_string (gdbarch->return_value));
48f7351b 1329 fprintf_unfiltered (file,
30737ed9
JB
1330 "gdbarch_dump: sdb_reg_to_regnum = <%s>\n",
1331 host_address_to_string (gdbarch->sdb_reg_to_regnum));
48f7351b
AC
1332 fprintf_unfiltered (file,
1333 "gdbarch_dump: short_bit = %s\n",
623d3eb1 1334 plongest (gdbarch->short_bit));
3352ef37
AC
1335 fprintf_unfiltered (file,
1336 "gdbarch_dump: gdbarch_single_step_through_delay_p() = %d\n",
be7811ad 1337 gdbarch_single_step_through_delay_p (gdbarch));
3352ef37 1338 fprintf_unfiltered (file,
30737ed9
JB
1339 "gdbarch_dump: single_step_through_delay = <%s>\n",
1340 host_address_to_string (gdbarch->single_step_through_delay));
591a12a1
UW
1341 fprintf_unfiltered (file,
1342 "gdbarch_dump: gdbarch_skip_entrypoint_p() = %d\n",
1343 gdbarch_skip_entrypoint_p (gdbarch));
1344 fprintf_unfiltered (file,
1345 "gdbarch_dump: skip_entrypoint = <%s>\n",
1346 host_address_to_string (gdbarch->skip_entrypoint));
4309257c
PM
1347 fprintf_unfiltered (file,
1348 "gdbarch_dump: gdbarch_skip_main_prologue_p() = %d\n",
1349 gdbarch_skip_main_prologue_p (gdbarch));
1350 fprintf_unfiltered (file,
30737ed9
JB
1351 "gdbarch_dump: skip_main_prologue = <%s>\n",
1352 host_address_to_string (gdbarch->skip_main_prologue));
6d350bb5 1353 fprintf_unfiltered (file,
30737ed9
JB
1354 "gdbarch_dump: skip_permanent_breakpoint = <%s>\n",
1355 host_address_to_string (gdbarch->skip_permanent_breakpoint));
dea0c52f 1356 fprintf_unfiltered (file,
30737ed9
JB
1357 "gdbarch_dump: skip_prologue = <%s>\n",
1358 host_address_to_string (gdbarch->skip_prologue));
48f7351b 1359 fprintf_unfiltered (file,
30737ed9
JB
1360 "gdbarch_dump: skip_solib_resolver = <%s>\n",
1361 host_address_to_string (gdbarch->skip_solib_resolver));
48f7351b 1362 fprintf_unfiltered (file,
30737ed9
JB
1363 "gdbarch_dump: skip_trampoline_code = <%s>\n",
1364 host_address_to_string (gdbarch->skip_trampoline_code));
48f7351b
AC
1365 fprintf_unfiltered (file,
1366 "gdbarch_dump: gdbarch_software_single_step_p() = %d\n",
be7811ad 1367 gdbarch_software_single_step_p (gdbarch));
48f7351b 1368 fprintf_unfiltered (file,
30737ed9
JB
1369 "gdbarch_dump: software_single_step = <%s>\n",
1370 host_address_to_string (gdbarch->software_single_step));
203c3895
UW
1371 fprintf_unfiltered (file,
1372 "gdbarch_dump: sofun_address_maybe_missing = %s\n",
623d3eb1 1373 plongest (gdbarch->sofun_address_maybe_missing));
08105857
PA
1374 fprintf_unfiltered (file,
1375 "gdbarch_dump: solib_symbols_extension = %s\n",
1376 pstring (gdbarch->solib_symbols_extension));
48f7351b
AC
1377 fprintf_unfiltered (file,
1378 "gdbarch_dump: sp_regnum = %s\n",
623d3eb1 1379 plongest (gdbarch->sp_regnum));
a2428dbe 1380 fprintf_unfiltered (file,
30737ed9
JB
1381 "gdbarch_dump: stab_reg_to_regnum = <%s>\n",
1382 host_address_to_string (gdbarch->stab_reg_to_regnum));
48f7351b 1383 fprintf_unfiltered (file,
30737ed9
JB
1384 "gdbarch_dump: stabs_argument_has_addr = <%s>\n",
1385 host_address_to_string (gdbarch->stabs_argument_has_addr));
5b74bf7d
YQ
1386 fprintf_unfiltered (file,
1387 "gdbarch_dump: stack_frame_destroyed_p = <%s>\n",
1388 host_address_to_string (gdbarch->stack_frame_destroyed_p));
55aa24fb
SDJ
1389 fprintf_unfiltered (file,
1390 "gdbarch_dump: stap_gdb_register_prefix = %s\n",
08af7a40 1391 pstring (gdbarch->stap_gdb_register_prefix));
55aa24fb
SDJ
1392 fprintf_unfiltered (file,
1393 "gdbarch_dump: stap_gdb_register_suffix = %s\n",
08af7a40 1394 pstring (gdbarch->stap_gdb_register_suffix));
55aa24fb 1395 fprintf_unfiltered (file,
05c0465e
SDJ
1396 "gdbarch_dump: stap_integer_prefixes = %s\n",
1397 pstring_list (gdbarch->stap_integer_prefixes));
55aa24fb 1398 fprintf_unfiltered (file,
05c0465e
SDJ
1399 "gdbarch_dump: stap_integer_suffixes = %s\n",
1400 pstring_list (gdbarch->stap_integer_suffixes));
55aa24fb
SDJ
1401 fprintf_unfiltered (file,
1402 "gdbarch_dump: gdbarch_stap_is_single_operand_p() = %d\n",
1403 gdbarch_stap_is_single_operand_p (gdbarch));
1404 fprintf_unfiltered (file,
1405 "gdbarch_dump: stap_is_single_operand = <%s>\n",
1406 host_address_to_string (gdbarch->stap_is_single_operand));
1407 fprintf_unfiltered (file,
1408 "gdbarch_dump: gdbarch_stap_parse_special_token_p() = %d\n",
1409 gdbarch_stap_parse_special_token_p (gdbarch));
1410 fprintf_unfiltered (file,
1411 "gdbarch_dump: stap_parse_special_token = <%s>\n",
1412 host_address_to_string (gdbarch->stap_parse_special_token));
1413 fprintf_unfiltered (file,
05c0465e
SDJ
1414 "gdbarch_dump: stap_register_indirection_prefixes = %s\n",
1415 pstring_list (gdbarch->stap_register_indirection_prefixes));
55aa24fb 1416 fprintf_unfiltered (file,
05c0465e
SDJ
1417 "gdbarch_dump: stap_register_indirection_suffixes = %s\n",
1418 pstring_list (gdbarch->stap_register_indirection_suffixes));
55aa24fb 1419 fprintf_unfiltered (file,
05c0465e
SDJ
1420 "gdbarch_dump: stap_register_prefixes = %s\n",
1421 pstring_list (gdbarch->stap_register_prefixes));
55aa24fb 1422 fprintf_unfiltered (file,
05c0465e
SDJ
1423 "gdbarch_dump: stap_register_suffixes = %s\n",
1424 pstring_list (gdbarch->stap_register_suffixes));
149ad273
UW
1425 fprintf_unfiltered (file,
1426 "gdbarch_dump: gdbarch_static_transform_name_p() = %d\n",
be7811ad 1427 gdbarch_static_transform_name_p (gdbarch));
149ad273 1428 fprintf_unfiltered (file,
30737ed9
JB
1429 "gdbarch_dump: static_transform_name = <%s>\n",
1430 host_address_to_string (gdbarch->static_transform_name));
cd6c3b4f
YQ
1431 fprintf_unfiltered (file,
1432 "gdbarch_dump: sw_breakpoint_from_kind = <%s>\n",
1433 host_address_to_string (gdbarch->sw_breakpoint_from_kind));
458c8db8
SDJ
1434 fprintf_unfiltered (file,
1435 "gdbarch_dump: syscalls_info = %s\n",
1436 host_address_to_string (gdbarch->syscalls_info));
424163ea
DJ
1437 fprintf_unfiltered (file,
1438 "gdbarch_dump: target_desc = %s\n",
30737ed9 1439 host_address_to_string (gdbarch->target_desc));
08e45a40 1440 fprintf_unfiltered (file,
a2428dbe 1441 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
be7811ad 1442 gdbarch_unwind_pc_p (gdbarch));
7996bcec 1443 fprintf_unfiltered (file,
30737ed9
JB
1444 "gdbarch_dump: unwind_pc = <%s>\n",
1445 host_address_to_string (gdbarch->unwind_pc));
bd1ce8ba 1446 fprintf_unfiltered (file,
a2428dbe 1447 "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
be7811ad 1448 gdbarch_unwind_sp_p (gdbarch));
bd1ce8ba 1449 fprintf_unfiltered (file,
30737ed9
JB
1450 "gdbarch_dump: unwind_sp = <%s>\n",
1451 host_address_to_string (gdbarch->unwind_sp));
65b48a81
PB
1452 fprintf_unfiltered (file,
1453 "gdbarch_dump: valid_disassembler_options = %s\n",
f7bb4e3a 1454 host_address_to_string (gdbarch->valid_disassembler_options));
9acbedc0 1455 fprintf_unfiltered (file,
30737ed9
JB
1456 "gdbarch_dump: value_from_register = <%s>\n",
1457 host_address_to_string (gdbarch->value_from_register));
48f7351b 1458 fprintf_unfiltered (file,
30737ed9
JB
1459 "gdbarch_dump: value_to_register = <%s>\n",
1460 host_address_to_string (gdbarch->value_to_register));
0d5de010
DJ
1461 fprintf_unfiltered (file,
1462 "gdbarch_dump: vbit_in_delta = %s\n",
623d3eb1 1463 plongest (gdbarch->vbit_in_delta));
48f7351b 1464 fprintf_unfiltered (file,
30737ed9
JB
1465 "gdbarch_dump: virtual_frame_pointer = <%s>\n",
1466 host_address_to_string (gdbarch->virtual_frame_pointer));
3437254d
PA
1467 fprintf_unfiltered (file,
1468 "gdbarch_dump: vsyscall_range = <%s>\n",
1469 host_address_to_string (gdbarch->vsyscall_range));
0d5de010
DJ
1470 fprintf_unfiltered (file,
1471 "gdbarch_dump: vtable_function_descriptors = %s\n",
623d3eb1 1472 plongest (gdbarch->vtable_function_descriptors));
53375380
PA
1473 fprintf_unfiltered (file,
1474 "gdbarch_dump: wchar_bit = %s\n",
1475 plongest (gdbarch->wchar_bit));
1476 fprintf_unfiltered (file,
1477 "gdbarch_dump: wchar_signed = %s\n",
1478 plongest (gdbarch->wchar_signed));
4b9b3959 1479 fprintf_unfiltered (file,
61a1198a 1480 "gdbarch_dump: gdbarch_write_pc_p() = %d\n",
be7811ad 1481 gdbarch_write_pc_p (gdbarch));
48f7351b 1482 fprintf_unfiltered (file,
30737ed9
JB
1483 "gdbarch_dump: write_pc = <%s>\n",
1484 host_address_to_string (gdbarch->write_pc));
458c8db8
SDJ
1485 fprintf_unfiltered (file,
1486 "gdbarch_dump: xml_syscall_file = %s\n",
1487 pstring (gdbarch->xml_syscall_file));
be7811ad
MD
1488 if (gdbarch->dump_tdep != NULL)
1489 gdbarch->dump_tdep (gdbarch, file);
0f71a2f6
JM
1490}
1491
1492struct gdbarch_tdep *
104c1213 1493gdbarch_tdep (struct gdbarch *gdbarch)
0f71a2f6
JM
1494{
1495 if (gdbarch_debug >= 2)
0f71a2f6
JM
1496 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
1497 return gdbarch->tdep;
1498}
1499
1500
1501const struct bfd_arch_info *
104c1213 1502gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
0f71a2f6 1503{
8de9bdc4 1504 gdb_assert (gdbarch != NULL);
0f71a2f6 1505 if (gdbarch_debug >= 2)
0f71a2f6
JM
1506 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
1507 return gdbarch->bfd_arch_info;
1508}
1509
94123b4f 1510enum bfd_endian
104c1213 1511gdbarch_byte_order (struct gdbarch *gdbarch)
0f71a2f6 1512{
8de9bdc4 1513 gdb_assert (gdbarch != NULL);
0f71a2f6 1514 if (gdbarch_debug >= 2)
0f71a2f6
JM
1515 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
1516 return gdbarch->byte_order;
1517}
1518
94123b4f 1519enum bfd_endian
9d4fde75
SS
1520gdbarch_byte_order_for_code (struct gdbarch *gdbarch)
1521{
1522 gdb_assert (gdbarch != NULL);
1523 if (gdbarch_debug >= 2)
1524 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order_for_code called\n");
1525 return gdbarch->byte_order_for_code;
1526}
1527
4be87837
DJ
1528enum gdb_osabi
1529gdbarch_osabi (struct gdbarch *gdbarch)
1530{
1531 gdb_assert (gdbarch != NULL);
1532 if (gdbarch_debug >= 2)
1533 fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n");
1534 return gdbarch->osabi;
1535}
1536
424163ea
DJ
1537const struct target_desc *
1538gdbarch_target_desc (struct gdbarch *gdbarch)
1539{
1540 gdb_assert (gdbarch != NULL);
1541 if (gdbarch_debug >= 2)
1542 fprintf_unfiltered (gdb_stdlog, "gdbarch_target_desc called\n");
1543 return gdbarch->target_desc;
1544}
1545
32c9a795
MD
1546int
1547gdbarch_bits_big_endian (struct gdbarch *gdbarch)
1548{
1549 gdb_assert (gdbarch != NULL);
1550 /* Skip verify of bits_big_endian, invalid_p == 0 */
1551 if (gdbarch_debug >= 2)
1552 fprintf_unfiltered (gdb_stdlog, "gdbarch_bits_big_endian called\n");
1553 return gdbarch->bits_big_endian;
1554}
1555
1556void
1557set_gdbarch_bits_big_endian (struct gdbarch *gdbarch,
1558 int bits_big_endian)
1559{
1560 gdbarch->bits_big_endian = bits_big_endian;
1561}
1562
0f71a2f6 1563int
104c1213 1564gdbarch_short_bit (struct gdbarch *gdbarch)
0f71a2f6 1565{
8de9bdc4 1566 gdb_assert (gdbarch != NULL);
66b43ecb 1567 /* Skip verify of short_bit, invalid_p == 0 */
0f71a2f6 1568 if (gdbarch_debug >= 2)
0f71a2f6
JM
1569 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
1570 return gdbarch->short_bit;
1571}
1572
1573void
104c1213
JM
1574set_gdbarch_short_bit (struct gdbarch *gdbarch,
1575 int short_bit)
0f71a2f6
JM
1576{
1577 gdbarch->short_bit = short_bit;
1578}
1579
1580int
104c1213 1581gdbarch_int_bit (struct gdbarch *gdbarch)
0f71a2f6 1582{
8de9bdc4 1583 gdb_assert (gdbarch != NULL);
66b43ecb 1584 /* Skip verify of int_bit, invalid_p == 0 */
0f71a2f6 1585 if (gdbarch_debug >= 2)
0f71a2f6
JM
1586 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
1587 return gdbarch->int_bit;
1588}
1589
1590void
104c1213
JM
1591set_gdbarch_int_bit (struct gdbarch *gdbarch,
1592 int int_bit)
0f71a2f6
JM
1593{
1594 gdbarch->int_bit = int_bit;
1595}
1596
1597int
104c1213 1598gdbarch_long_bit (struct gdbarch *gdbarch)
0f71a2f6 1599{
8de9bdc4 1600 gdb_assert (gdbarch != NULL);
66b43ecb 1601 /* Skip verify of long_bit, invalid_p == 0 */
0f71a2f6 1602 if (gdbarch_debug >= 2)
0f71a2f6
JM
1603 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
1604 return gdbarch->long_bit;
1605}
1606
1607void
104c1213
JM
1608set_gdbarch_long_bit (struct gdbarch *gdbarch,
1609 int long_bit)
0f71a2f6
JM
1610{
1611 gdbarch->long_bit = long_bit;
1612}
1613
1614int
104c1213 1615gdbarch_long_long_bit (struct gdbarch *gdbarch)
0f71a2f6 1616{
8de9bdc4 1617 gdb_assert (gdbarch != NULL);
66b43ecb 1618 /* Skip verify of long_long_bit, invalid_p == 0 */
0f71a2f6 1619 if (gdbarch_debug >= 2)
0f71a2f6
JM
1620 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
1621 return gdbarch->long_long_bit;
1622}
1623
1624void
104c1213
JM
1625set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
1626 int long_long_bit)
0f71a2f6
JM
1627{
1628 gdbarch->long_long_bit = long_long_bit;
1629}
1630
205c306f
DM
1631int
1632gdbarch_long_long_align_bit (struct gdbarch *gdbarch)
1633{
1634 gdb_assert (gdbarch != NULL);
1635 /* Skip verify of long_long_align_bit, invalid_p == 0 */
1636 if (gdbarch_debug >= 2)
1637 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_align_bit called\n");
1638 return gdbarch->long_long_align_bit;
1639}
1640
1641void
1642set_gdbarch_long_long_align_bit (struct gdbarch *gdbarch,
1643 int long_long_align_bit)
1644{
1645 gdbarch->long_long_align_bit = long_long_align_bit;
1646}
1647
f9e9243a
UW
1648int
1649gdbarch_half_bit (struct gdbarch *gdbarch)
1650{
1651 gdb_assert (gdbarch != NULL);
1652 /* Skip verify of half_bit, invalid_p == 0 */
1653 if (gdbarch_debug >= 2)
1654 fprintf_unfiltered (gdb_stdlog, "gdbarch_half_bit called\n");
1655 return gdbarch->half_bit;
1656}
1657
1658void
1659set_gdbarch_half_bit (struct gdbarch *gdbarch,
1660 int half_bit)
1661{
1662 gdbarch->half_bit = half_bit;
1663}
1664
1665const struct floatformat **
1666gdbarch_half_format (struct gdbarch *gdbarch)
1667{
1668 gdb_assert (gdbarch != NULL);
1669 if (gdbarch_debug >= 2)
1670 fprintf_unfiltered (gdb_stdlog, "gdbarch_half_format called\n");
1671 return gdbarch->half_format;
1672}
1673
1674void
1675set_gdbarch_half_format (struct gdbarch *gdbarch,
1676 const struct floatformat ** half_format)
1677{
1678 gdbarch->half_format = half_format;
1679}
1680
0f71a2f6 1681int
104c1213 1682gdbarch_float_bit (struct gdbarch *gdbarch)
0f71a2f6 1683{
8de9bdc4 1684 gdb_assert (gdbarch != NULL);
66b43ecb 1685 /* Skip verify of float_bit, invalid_p == 0 */
0f71a2f6 1686 if (gdbarch_debug >= 2)
0f71a2f6
JM
1687 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
1688 return gdbarch->float_bit;
1689}
1690
1691void
104c1213
JM
1692set_gdbarch_float_bit (struct gdbarch *gdbarch,
1693 int float_bit)
0f71a2f6
JM
1694{
1695 gdbarch->float_bit = float_bit;
1696}
1697
8da61cc4 1698const struct floatformat **
456fcf94
AC
1699gdbarch_float_format (struct gdbarch *gdbarch)
1700{
1701 gdb_assert (gdbarch != NULL);
1702 if (gdbarch_debug >= 2)
1703 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
1704 return gdbarch->float_format;
1705}
1706
1707void
1708set_gdbarch_float_format (struct gdbarch *gdbarch,
8da61cc4 1709 const struct floatformat ** float_format)
456fcf94
AC
1710{
1711 gdbarch->float_format = float_format;
1712}
1713
0f71a2f6 1714int
104c1213 1715gdbarch_double_bit (struct gdbarch *gdbarch)
0f71a2f6 1716{
8de9bdc4 1717 gdb_assert (gdbarch != NULL);
66b43ecb 1718 /* Skip verify of double_bit, invalid_p == 0 */
0f71a2f6 1719 if (gdbarch_debug >= 2)
0f71a2f6
JM
1720 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
1721 return gdbarch->double_bit;
1722}
1723
1724void
104c1213
JM
1725set_gdbarch_double_bit (struct gdbarch *gdbarch,
1726 int double_bit)
0f71a2f6
JM
1727{
1728 gdbarch->double_bit = double_bit;
1729}
1730
8da61cc4 1731const struct floatformat **
456fcf94
AC
1732gdbarch_double_format (struct gdbarch *gdbarch)
1733{
1734 gdb_assert (gdbarch != NULL);
1735 if (gdbarch_debug >= 2)
1736 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
1737 return gdbarch->double_format;
1738}
1739
1740void
1741set_gdbarch_double_format (struct gdbarch *gdbarch,
8da61cc4 1742 const struct floatformat ** double_format)
456fcf94
AC
1743{
1744 gdbarch->double_format = double_format;
1745}
1746
0f71a2f6 1747int
104c1213 1748gdbarch_long_double_bit (struct gdbarch *gdbarch)
0f71a2f6 1749{
8de9bdc4 1750 gdb_assert (gdbarch != NULL);
66b43ecb 1751 /* Skip verify of long_double_bit, invalid_p == 0 */
0f71a2f6 1752 if (gdbarch_debug >= 2)
0f71a2f6
JM
1753 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
1754 return gdbarch->long_double_bit;
1755}
1756
1757void
104c1213
JM
1758set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
1759 int long_double_bit)
0f71a2f6
JM
1760{
1761 gdbarch->long_double_bit = long_double_bit;
1762}
1763
8da61cc4 1764const struct floatformat **
456fcf94
AC
1765gdbarch_long_double_format (struct gdbarch *gdbarch)
1766{
1767 gdb_assert (gdbarch != NULL);
1768 if (gdbarch_debug >= 2)
1769 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
1770 return gdbarch->long_double_format;
1771}
1772
1773void
1774set_gdbarch_long_double_format (struct gdbarch *gdbarch,
8da61cc4 1775 const struct floatformat ** long_double_format)
456fcf94
AC
1776{
1777 gdbarch->long_double_format = long_double_format;
1778}
1779
53375380
PA
1780int
1781gdbarch_wchar_bit (struct gdbarch *gdbarch)
1782{
1783 gdb_assert (gdbarch != NULL);
1784 /* Skip verify of wchar_bit, invalid_p == 0 */
1785 if (gdbarch_debug >= 2)
1786 fprintf_unfiltered (gdb_stdlog, "gdbarch_wchar_bit called\n");
1787 return gdbarch->wchar_bit;
1788}
1789
1790void
1791set_gdbarch_wchar_bit (struct gdbarch *gdbarch,
1792 int wchar_bit)
1793{
1794 gdbarch->wchar_bit = wchar_bit;
1795}
1796
1797int
1798gdbarch_wchar_signed (struct gdbarch *gdbarch)
1799{
1800 gdb_assert (gdbarch != NULL);
1801 /* Check variable changed from pre-default. */
1802 gdb_assert (gdbarch->wchar_signed != -1);
1803 if (gdbarch_debug >= 2)
1804 fprintf_unfiltered (gdb_stdlog, "gdbarch_wchar_signed called\n");
1805 return gdbarch->wchar_signed;
1806}
1807
1808void
1809set_gdbarch_wchar_signed (struct gdbarch *gdbarch,
1810 int wchar_signed)
1811{
1812 gdbarch->wchar_signed = wchar_signed;
1813}
1814
9b790ce7
UW
1815const struct floatformat **
1816gdbarch_floatformat_for_type (struct gdbarch *gdbarch, const char *name, int length)
1817{
1818 gdb_assert (gdbarch != NULL);
1819 gdb_assert (gdbarch->floatformat_for_type != NULL);
1820 if (gdbarch_debug >= 2)
1821 fprintf_unfiltered (gdb_stdlog, "gdbarch_floatformat_for_type called\n");
1822 return gdbarch->floatformat_for_type (gdbarch, name, length);
1823}
1824
1825void
1826set_gdbarch_floatformat_for_type (struct gdbarch *gdbarch,
1827 gdbarch_floatformat_for_type_ftype floatformat_for_type)
1828{
1829 gdbarch->floatformat_for_type = floatformat_for_type;
1830}
1831
66b43ecb
AC
1832int
1833gdbarch_ptr_bit (struct gdbarch *gdbarch)
1834{
8de9bdc4 1835 gdb_assert (gdbarch != NULL);
66b43ecb
AC
1836 /* Skip verify of ptr_bit, invalid_p == 0 */
1837 if (gdbarch_debug >= 2)
1838 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
1839 return gdbarch->ptr_bit;
1840}
1841
1842void
1843set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
1844 int ptr_bit)
1845{
1846 gdbarch->ptr_bit = ptr_bit;
1847}
1848
52204a0b
DT
1849int
1850gdbarch_addr_bit (struct gdbarch *gdbarch)
1851{
8de9bdc4 1852 gdb_assert (gdbarch != NULL);
956ac328
AC
1853 /* Check variable changed from pre-default. */
1854 gdb_assert (gdbarch->addr_bit != 0);
52204a0b
DT
1855 if (gdbarch_debug >= 2)
1856 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
1857 return gdbarch->addr_bit;
1858}
1859
1860void
1861set_gdbarch_addr_bit (struct gdbarch *gdbarch,
1862 int addr_bit)
1863{
1864 gdbarch->addr_bit = addr_bit;
1865}
1866
8da614df
CV
1867int
1868gdbarch_dwarf2_addr_size (struct gdbarch *gdbarch)
1869{
1870 gdb_assert (gdbarch != NULL);
1871 /* Check variable changed from pre-default. */
1872 gdb_assert (gdbarch->dwarf2_addr_size != 0);
1873 if (gdbarch_debug >= 2)
1874 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_addr_size called\n");
1875 return gdbarch->dwarf2_addr_size;
1876}
1877
1878void
1879set_gdbarch_dwarf2_addr_size (struct gdbarch *gdbarch,
1880 int dwarf2_addr_size)
1881{
1882 gdbarch->dwarf2_addr_size = dwarf2_addr_size;
1883}
1884
4e409299
JB
1885int
1886gdbarch_char_signed (struct gdbarch *gdbarch)
1887{
8de9bdc4 1888 gdb_assert (gdbarch != NULL);
956ac328
AC
1889 /* Check variable changed from pre-default. */
1890 gdb_assert (gdbarch->char_signed != -1);
4e409299
JB
1891 if (gdbarch_debug >= 2)
1892 fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
1893 return gdbarch->char_signed;
1894}
1895
1896void
1897set_gdbarch_char_signed (struct gdbarch *gdbarch,
1898 int char_signed)
1899{
1900 gdbarch->char_signed = char_signed;
1901}
1902
cde9ea48
AC
1903int
1904gdbarch_read_pc_p (struct gdbarch *gdbarch)
1905{
1906 gdb_assert (gdbarch != NULL);
956ac328 1907 return gdbarch->read_pc != NULL;
cde9ea48
AC
1908}
1909
0f71a2f6 1910CORE_ADDR
61a1198a 1911gdbarch_read_pc (struct gdbarch *gdbarch, struct regcache *regcache)
0f71a2f6 1912{
8de9bdc4 1913 gdb_assert (gdbarch != NULL);
956ac328 1914 gdb_assert (gdbarch->read_pc != NULL);
0f71a2f6 1915 if (gdbarch_debug >= 2)
0f71a2f6 1916 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
61a1198a 1917 return gdbarch->read_pc (regcache);
0f71a2f6
JM
1918}
1919
1920void
104c1213
JM
1921set_gdbarch_read_pc (struct gdbarch *gdbarch,
1922 gdbarch_read_pc_ftype read_pc)
0f71a2f6
JM
1923{
1924 gdbarch->read_pc = read_pc;
1925}
1926
61a1198a
UW
1927int
1928gdbarch_write_pc_p (struct gdbarch *gdbarch)
1929{
1930 gdb_assert (gdbarch != NULL);
1931 return gdbarch->write_pc != NULL;
1932}
1933
0f71a2f6 1934void
61a1198a 1935gdbarch_write_pc (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR val)
0f71a2f6 1936{
8de9bdc4 1937 gdb_assert (gdbarch != NULL);
956ac328 1938 gdb_assert (gdbarch->write_pc != NULL);
0f71a2f6 1939 if (gdbarch_debug >= 2)
0f71a2f6 1940 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
61a1198a 1941 gdbarch->write_pc (regcache, val);
0f71a2f6
JM
1942}
1943
1944void
104c1213
JM
1945set_gdbarch_write_pc (struct gdbarch *gdbarch,
1946 gdbarch_write_pc_ftype write_pc)
0f71a2f6
JM
1947{
1948 gdbarch->write_pc = write_pc;
1949}
1950
39d4ef09
AC
1951void
1952gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
1953{
8de9bdc4 1954 gdb_assert (gdbarch != NULL);
956ac328 1955 gdb_assert (gdbarch->virtual_frame_pointer != NULL);
39d4ef09
AC
1956 if (gdbarch_debug >= 2)
1957 fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
a54fba4c 1958 gdbarch->virtual_frame_pointer (gdbarch, pc, frame_regnum, frame_offset);
39d4ef09
AC
1959}
1960
1961void
1962set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
1963 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
1964{
1965 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
1966}
1967
61a0eb5b 1968int
d8124050 1969gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
61a0eb5b 1970{
8de9bdc4 1971 gdb_assert (gdbarch != NULL);
956ac328 1972 return gdbarch->pseudo_register_read != NULL;
61a0eb5b
AC
1973}
1974
05d1431c 1975enum register_status
b60c417a 1976gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, gdb_byte *buf)
61a0eb5b 1977{
8de9bdc4 1978 gdb_assert (gdbarch != NULL);
956ac328 1979 gdb_assert (gdbarch->pseudo_register_read != NULL);
61a0eb5b 1980 if (gdbarch_debug >= 2)
d8124050 1981 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
05d1431c 1982 return gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
61a0eb5b
AC
1983}
1984
1985void
d8124050
AC
1986set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
1987 gdbarch_pseudo_register_read_ftype pseudo_register_read)
61a0eb5b 1988{
d8124050 1989 gdbarch->pseudo_register_read = pseudo_register_read;
61a0eb5b
AC
1990}
1991
3543a589
TT
1992int
1993gdbarch_pseudo_register_read_value_p (struct gdbarch *gdbarch)
1994{
1995 gdb_assert (gdbarch != NULL);
1996 return gdbarch->pseudo_register_read_value != NULL;
1997}
1998
1999struct value *
2000gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum)
2001{
2002 gdb_assert (gdbarch != NULL);
2003 gdb_assert (gdbarch->pseudo_register_read_value != NULL);
2004 if (gdbarch_debug >= 2)
2005 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read_value called\n");
2006 return gdbarch->pseudo_register_read_value (gdbarch, regcache, cookednum);
2007}
2008
2009void
2010set_gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch,
2011 gdbarch_pseudo_register_read_value_ftype pseudo_register_read_value)
2012{
2013 gdbarch->pseudo_register_read_value = pseudo_register_read_value;
2014}
2015
61a0eb5b 2016int
d8124050 2017gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
61a0eb5b 2018{
8de9bdc4 2019 gdb_assert (gdbarch != NULL);
956ac328 2020 return gdbarch->pseudo_register_write != NULL;
61a0eb5b
AC
2021}
2022
2023void
b60c417a 2024gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const gdb_byte *buf)
61a0eb5b 2025{
8de9bdc4 2026 gdb_assert (gdbarch != NULL);
956ac328 2027 gdb_assert (gdbarch->pseudo_register_write != NULL);
61a0eb5b 2028 if (gdbarch_debug >= 2)
d8124050
AC
2029 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
2030 gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
61a0eb5b
AC
2031}
2032
2033void
d8124050
AC
2034set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
2035 gdbarch_pseudo_register_write_ftype pseudo_register_write)
61a0eb5b 2036{
d8124050 2037 gdbarch->pseudo_register_write = pseudo_register_write;
61a0eb5b
AC
2038}
2039
0f71a2f6 2040int
104c1213 2041gdbarch_num_regs (struct gdbarch *gdbarch)
0f71a2f6 2042{
8de9bdc4 2043 gdb_assert (gdbarch != NULL);
956ac328
AC
2044 /* Check variable changed from pre-default. */
2045 gdb_assert (gdbarch->num_regs != -1);
0f71a2f6 2046 if (gdbarch_debug >= 2)
0f71a2f6
JM
2047 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
2048 return gdbarch->num_regs;
2049}
2050
2051void
104c1213
JM
2052set_gdbarch_num_regs (struct gdbarch *gdbarch,
2053 int num_regs)
0f71a2f6
JM
2054{
2055 gdbarch->num_regs = num_regs;
2056}
2057
0aba1244
EZ
2058int
2059gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
2060{
8de9bdc4 2061 gdb_assert (gdbarch != NULL);
0aba1244
EZ
2062 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2063 if (gdbarch_debug >= 2)
2064 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
2065 return gdbarch->num_pseudo_regs;
2066}
2067
2068void
2069set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
2070 int num_pseudo_regs)
2071{
2072 gdbarch->num_pseudo_regs = num_pseudo_regs;
2073}
2074
175ff332
HZ
2075int
2076gdbarch_ax_pseudo_register_collect_p (struct gdbarch *gdbarch)
2077{
2078 gdb_assert (gdbarch != NULL);
2079 return gdbarch->ax_pseudo_register_collect != NULL;
2080}
2081
2082int
2083gdbarch_ax_pseudo_register_collect (struct gdbarch *gdbarch, struct agent_expr *ax, int reg)
2084{
2085 gdb_assert (gdbarch != NULL);
2086 gdb_assert (gdbarch->ax_pseudo_register_collect != NULL);
2087 if (gdbarch_debug >= 2)
2088 fprintf_unfiltered (gdb_stdlog, "gdbarch_ax_pseudo_register_collect called\n");
2089 return gdbarch->ax_pseudo_register_collect (gdbarch, ax, reg);
2090}
2091
2092void
2093set_gdbarch_ax_pseudo_register_collect (struct gdbarch *gdbarch,
2094 gdbarch_ax_pseudo_register_collect_ftype ax_pseudo_register_collect)
2095{
2096 gdbarch->ax_pseudo_register_collect = ax_pseudo_register_collect;
2097}
2098
2099int
2100gdbarch_ax_pseudo_register_push_stack_p (struct gdbarch *gdbarch)
2101{
2102 gdb_assert (gdbarch != NULL);
2103 return gdbarch->ax_pseudo_register_push_stack != NULL;
2104}
2105
2106int
2107gdbarch_ax_pseudo_register_push_stack (struct gdbarch *gdbarch, struct agent_expr *ax, int reg)
2108{
2109 gdb_assert (gdbarch != NULL);
2110 gdb_assert (gdbarch->ax_pseudo_register_push_stack != NULL);
2111 if (gdbarch_debug >= 2)
2112 fprintf_unfiltered (gdb_stdlog, "gdbarch_ax_pseudo_register_push_stack called\n");
2113 return gdbarch->ax_pseudo_register_push_stack (gdbarch, ax, reg);
2114}
2115
2116void
2117set_gdbarch_ax_pseudo_register_push_stack (struct gdbarch *gdbarch,
2118 gdbarch_ax_pseudo_register_push_stack_ftype ax_pseudo_register_push_stack)
2119{
2120 gdbarch->ax_pseudo_register_push_stack = ax_pseudo_register_push_stack;
2121}
2122
012b3a21
WT
2123int
2124gdbarch_handle_segmentation_fault_p (struct gdbarch *gdbarch)
2125{
2126 gdb_assert (gdbarch != NULL);
2127 return gdbarch->handle_segmentation_fault != NULL;
2128}
2129
2130void
2131gdbarch_handle_segmentation_fault (struct gdbarch *gdbarch, struct ui_out *uiout)
2132{
2133 gdb_assert (gdbarch != NULL);
2134 gdb_assert (gdbarch->handle_segmentation_fault != NULL);
2135 if (gdbarch_debug >= 2)
2136 fprintf_unfiltered (gdb_stdlog, "gdbarch_handle_segmentation_fault called\n");
2137 gdbarch->handle_segmentation_fault (gdbarch, uiout);
2138}
2139
2140void
2141set_gdbarch_handle_segmentation_fault (struct gdbarch *gdbarch,
2142 gdbarch_handle_segmentation_fault_ftype handle_segmentation_fault)
2143{
2144 gdbarch->handle_segmentation_fault = handle_segmentation_fault;
2145}
2146
0f71a2f6 2147int
104c1213 2148gdbarch_sp_regnum (struct gdbarch *gdbarch)
0f71a2f6 2149{
8de9bdc4 2150 gdb_assert (gdbarch != NULL);
1200cd6e 2151 /* Skip verify of sp_regnum, invalid_p == 0 */
0f71a2f6 2152 if (gdbarch_debug >= 2)
0f71a2f6
JM
2153 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
2154 return gdbarch->sp_regnum;
2155}
2156
2157void
104c1213
JM
2158set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
2159 int sp_regnum)
0f71a2f6
JM
2160{
2161 gdbarch->sp_regnum = sp_regnum;
2162}
2163
0f71a2f6 2164int
104c1213 2165gdbarch_pc_regnum (struct gdbarch *gdbarch)
0f71a2f6 2166{
8de9bdc4 2167 gdb_assert (gdbarch != NULL);
1200cd6e 2168 /* Skip verify of pc_regnum, invalid_p == 0 */
0f71a2f6 2169 if (gdbarch_debug >= 2)
0f71a2f6
JM
2170 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
2171 return gdbarch->pc_regnum;
2172}
2173
2174void
104c1213
JM
2175set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
2176 int pc_regnum)
0f71a2f6
JM
2177{
2178 gdbarch->pc_regnum = pc_regnum;
2179}
2180
c2169756
AC
2181int
2182gdbarch_ps_regnum (struct gdbarch *gdbarch)
2183{
8de9bdc4 2184 gdb_assert (gdbarch != NULL);
c2169756
AC
2185 /* Skip verify of ps_regnum, invalid_p == 0 */
2186 if (gdbarch_debug >= 2)
2187 fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
2188 return gdbarch->ps_regnum;
2189}
2190
2191void
2192set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
2193 int ps_regnum)
2194{
2195 gdbarch->ps_regnum = ps_regnum;
2196}
2197
60054393
MS
2198int
2199gdbarch_fp0_regnum (struct gdbarch *gdbarch)
2200{
8de9bdc4 2201 gdb_assert (gdbarch != NULL);
60054393
MS
2202 /* Skip verify of fp0_regnum, invalid_p == 0 */
2203 if (gdbarch_debug >= 2)
2204 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
2205 return gdbarch->fp0_regnum;
2206}
2207
2208void
2209set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
2210 int fp0_regnum)
2211{
2212 gdbarch->fp0_regnum = fp0_regnum;
2213}
2214
88c72b7d
AC
2215int
2216gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
2217{
8de9bdc4 2218 gdb_assert (gdbarch != NULL);
956ac328 2219 gdb_assert (gdbarch->stab_reg_to_regnum != NULL);
88c72b7d
AC
2220 if (gdbarch_debug >= 2)
2221 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
d3f73121 2222 return gdbarch->stab_reg_to_regnum (gdbarch, stab_regnr);
88c72b7d
AC
2223}
2224
2225void
2226set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
2227 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
2228{
2229 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
2230}
2231
2232int
2233gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
2234{
8de9bdc4 2235 gdb_assert (gdbarch != NULL);
956ac328 2236 gdb_assert (gdbarch->ecoff_reg_to_regnum != NULL);
88c72b7d
AC
2237 if (gdbarch_debug >= 2)
2238 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
d3f73121 2239 return gdbarch->ecoff_reg_to_regnum (gdbarch, ecoff_regnr);
88c72b7d
AC
2240}
2241
2242void
2243set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
2244 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
2245{
2246 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
2247}
2248
88c72b7d
AC
2249int
2250gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
2251{
8de9bdc4 2252 gdb_assert (gdbarch != NULL);
956ac328 2253 gdb_assert (gdbarch->sdb_reg_to_regnum != NULL);
88c72b7d
AC
2254 if (gdbarch_debug >= 2)
2255 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
d3f73121 2256 return gdbarch->sdb_reg_to_regnum (gdbarch, sdb_regnr);
88c72b7d
AC
2257}
2258
2259void
2260set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
2261 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
2262{
2263 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
2264}
2265
2266int
2267gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
2268{
8de9bdc4 2269 gdb_assert (gdbarch != NULL);
956ac328 2270 gdb_assert (gdbarch->dwarf2_reg_to_regnum != NULL);
88c72b7d
AC
2271 if (gdbarch_debug >= 2)
2272 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
d3f73121 2273 return gdbarch->dwarf2_reg_to_regnum (gdbarch, dwarf2_regnr);
88c72b7d
AC
2274}
2275
2276void
2277set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
2278 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
2279{
2280 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
2281}
2282
fa88f677 2283const char *
0f71a2f6
JM
2284gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
2285{
8de9bdc4 2286 gdb_assert (gdbarch != NULL);
956ac328 2287 gdb_assert (gdbarch->register_name != NULL);
0f71a2f6 2288 if (gdbarch_debug >= 2)
0f71a2f6 2289 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
d93859e2 2290 return gdbarch->register_name (gdbarch, regnr);
0f71a2f6
JM
2291}
2292
2293void
104c1213
JM
2294set_gdbarch_register_name (struct gdbarch *gdbarch,
2295 gdbarch_register_name_ftype register_name)
0f71a2f6
JM
2296{
2297 gdbarch->register_name = register_name;
2298}
2299
0f71a2f6 2300int
9c04cab7 2301gdbarch_register_type_p (struct gdbarch *gdbarch)
0f71a2f6 2302{
8de9bdc4 2303 gdb_assert (gdbarch != NULL);
956ac328 2304 return gdbarch->register_type != NULL;
9c04cab7
AC
2305}
2306
2307struct type *
2308gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
2309{
2310 gdb_assert (gdbarch != NULL);
956ac328 2311 gdb_assert (gdbarch->register_type != NULL);
0f71a2f6 2312 if (gdbarch_debug >= 2)
9c04cab7
AC
2313 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
2314 return gdbarch->register_type (gdbarch, reg_nr);
0f71a2f6
JM
2315}
2316
2317void
9c04cab7
AC
2318set_gdbarch_register_type (struct gdbarch *gdbarch,
2319 gdbarch_register_type_ftype register_type)
0f71a2f6 2320{
9c04cab7 2321 gdbarch->register_type = register_type;
0f71a2f6
JM
2322}
2323
f3be58bc 2324int
669fac23 2325gdbarch_dummy_id_p (struct gdbarch *gdbarch)
f3be58bc
AC
2326{
2327 gdb_assert (gdbarch != NULL);
669fac23 2328 return gdbarch->dummy_id != NULL;
f3be58bc
AC
2329}
2330
2331struct frame_id
669fac23 2332gdbarch_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
f3be58bc
AC
2333{
2334 gdb_assert (gdbarch != NULL);
669fac23 2335 gdb_assert (gdbarch->dummy_id != NULL);
f3be58bc 2336 if (gdbarch_debug >= 2)
669fac23
DJ
2337 fprintf_unfiltered (gdb_stdlog, "gdbarch_dummy_id called\n");
2338 return gdbarch->dummy_id (gdbarch, this_frame);
f3be58bc
AC
2339}
2340
2341void
669fac23
DJ
2342set_gdbarch_dummy_id (struct gdbarch *gdbarch,
2343 gdbarch_dummy_id_ftype dummy_id)
f3be58bc 2344{
669fac23 2345 gdbarch->dummy_id = dummy_id;
f3be58bc
AC
2346}
2347
f3be58bc
AC
2348int
2349gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch)
2350{
2351 gdb_assert (gdbarch != NULL);
2352 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
2353 if (gdbarch_debug >= 2)
2354 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n");
2355 return gdbarch->deprecated_fp_regnum;
2356}
2357
2358void
2359set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch,
2360 int deprecated_fp_regnum)
2361{
2362 gdbarch->deprecated_fp_regnum = deprecated_fp_regnum;
2363}
2364
0ab7a791 2365int
b8de8283 2366gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
0ab7a791
AC
2367{
2368 gdb_assert (gdbarch != NULL);
956ac328 2369 return gdbarch->push_dummy_call != NULL;
0ab7a791
AC
2370}
2371
b8de8283 2372CORE_ADDR
7d9b040b 2373gdbarch_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)
666e11c5 2374{
8de9bdc4 2375 gdb_assert (gdbarch != NULL);
956ac328 2376 gdb_assert (gdbarch->push_dummy_call != NULL);
666e11c5 2377 if (gdbarch_debug >= 2)
b8de8283 2378 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
7d9b040b 2379 return gdbarch->push_dummy_call (gdbarch, function, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr);
666e11c5
EZ
2380}
2381
2382void
b8de8283
AC
2383set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
2384 gdbarch_push_dummy_call_ftype push_dummy_call)
666e11c5 2385{
b8de8283 2386 gdbarch->push_dummy_call = push_dummy_call;
666e11c5
EZ
2387}
2388
2649061d 2389int
b8de8283 2390gdbarch_call_dummy_location (struct gdbarch *gdbarch)
2649061d 2391{
8de9bdc4 2392 gdb_assert (gdbarch != NULL);
b8de8283
AC
2393 /* Skip verify of call_dummy_location, invalid_p == 0 */
2394 if (gdbarch_debug >= 2)
2395 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
2396 return gdbarch->call_dummy_location;
2649061d
AC
2397}
2398
b8de8283
AC
2399void
2400set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
2401 int call_dummy_location)
2402{
2403 gdbarch->call_dummy_location = call_dummy_location;
2404}
2405
0f71a2f6 2406int
b8de8283 2407gdbarch_push_dummy_code_p (struct gdbarch *gdbarch)
0f71a2f6 2408{
8de9bdc4 2409 gdb_assert (gdbarch != NULL);
956ac328 2410 return gdbarch->push_dummy_code != NULL;
b8de8283
AC
2411}
2412
2413CORE_ADDR
82585c72 2414gdbarch_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)
b8de8283
AC
2415{
2416 gdb_assert (gdbarch != NULL);
956ac328 2417 gdb_assert (gdbarch->push_dummy_code != NULL);
0f71a2f6 2418 if (gdbarch_debug >= 2)
b8de8283 2419 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n");
82585c72 2420 return gdbarch->push_dummy_code (gdbarch, sp, funaddr, args, nargs, value_type, real_pc, bp_addr, regcache);
0f71a2f6
JM
2421}
2422
2423void
b8de8283
AC
2424set_gdbarch_push_dummy_code (struct gdbarch *gdbarch,
2425 gdbarch_push_dummy_code_ftype push_dummy_code)
0f71a2f6 2426{
b8de8283 2427 gdbarch->push_dummy_code = push_dummy_code;
0f71a2f6
JM
2428}
2429
7eb89530
YQ
2430int
2431gdbarch_code_of_frame_writable (struct gdbarch *gdbarch, struct frame_info *frame)
2432{
2433 gdb_assert (gdbarch != NULL);
2434 gdb_assert (gdbarch->code_of_frame_writable != NULL);
2435 if (gdbarch_debug >= 2)
2436 fprintf_unfiltered (gdb_stdlog, "gdbarch_code_of_frame_writable called\n");
2437 return gdbarch->code_of_frame_writable (gdbarch, frame);
2438}
2439
2440void
2441set_gdbarch_code_of_frame_writable (struct gdbarch *gdbarch,
2442 gdbarch_code_of_frame_writable_ftype code_of_frame_writable)
2443{
2444 gdbarch->code_of_frame_writable = code_of_frame_writable;
2445}
2446
b8de8283
AC
2447void
2448gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
2449{
2450 gdb_assert (gdbarch != NULL);
956ac328 2451 gdb_assert (gdbarch->print_registers_info != NULL);
b8de8283
AC
2452 if (gdbarch_debug >= 2)
2453 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
2454 gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
2455}
2456
2457void
2458set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
2459 gdbarch_print_registers_info_ftype print_registers_info)
2460{
2461 gdbarch->print_registers_info = print_registers_info;
0f71a2f6
JM
2462}
2463
b8de8283
AC
2464void
2465gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
0f71a2f6 2466{
8de9bdc4 2467 gdb_assert (gdbarch != NULL);
956ac328 2468 gdb_assert (gdbarch->print_float_info != NULL);
0f71a2f6 2469 if (gdbarch_debug >= 2)
b8de8283
AC
2470 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
2471 gdbarch->print_float_info (gdbarch, file, frame, args);
0f71a2f6
JM
2472}
2473
2474void
b8de8283
AC
2475set_gdbarch_print_float_info (struct gdbarch *gdbarch,
2476 gdbarch_print_float_info_ftype print_float_info)
0f71a2f6 2477{
b8de8283
AC
2478 gdbarch->print_float_info = print_float_info;
2479}
2480
2481int
2482gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
2483{
2484 gdb_assert (gdbarch != NULL);
956ac328 2485 return gdbarch->print_vector_info != NULL;
b8de8283
AC
2486}
2487
2488void
2489gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
2490{
2491 gdb_assert (gdbarch != NULL);
956ac328 2492 gdb_assert (gdbarch->print_vector_info != NULL);
b8de8283
AC
2493 if (gdbarch_debug >= 2)
2494 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
2495 gdbarch->print_vector_info (gdbarch, file, frame, args);
0f71a2f6
JM
2496}
2497
b8de8283
AC
2498void
2499set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
2500 gdbarch_print_vector_info_ftype print_vector_info)
ae45cd16 2501{
b8de8283 2502 gdbarch->print_vector_info = print_vector_info;
ae45cd16
AC
2503}
2504
2505int
b8de8283 2506gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
0f71a2f6 2507{
8de9bdc4 2508 gdb_assert (gdbarch != NULL);
956ac328 2509 gdb_assert (gdbarch->register_sim_regno != NULL);
0f71a2f6 2510 if (gdbarch_debug >= 2)
b8de8283 2511 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
e7faf938 2512 return gdbarch->register_sim_regno (gdbarch, reg_nr);
0f71a2f6
JM
2513}
2514
2515void
b8de8283
AC
2516set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
2517 gdbarch_register_sim_regno_ftype register_sim_regno)
0f71a2f6 2518{
b8de8283 2519 gdbarch->register_sim_regno = register_sim_regno;
0f71a2f6
JM
2520}
2521
0f71a2f6 2522int
b8de8283 2523gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
0f71a2f6 2524{
8de9bdc4 2525 gdb_assert (gdbarch != NULL);
956ac328 2526 gdb_assert (gdbarch->cannot_fetch_register != NULL);
b8de8283
AC
2527 if (gdbarch_debug >= 2)
2528 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
64a3914f 2529 return gdbarch->cannot_fetch_register (gdbarch, regnum);
b8de8283
AC
2530}
2531
2532void
2533set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
2534 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
2535{
2536 gdbarch->cannot_fetch_register = cannot_fetch_register;
0f71a2f6
JM
2537}
2538
2539int
b8de8283 2540gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
0f71a2f6 2541{
8de9bdc4 2542 gdb_assert (gdbarch != NULL);
956ac328 2543 gdb_assert (gdbarch->cannot_store_register != NULL);
0f71a2f6 2544 if (gdbarch_debug >= 2)
b8de8283 2545 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
64a3914f 2546 return gdbarch->cannot_store_register (gdbarch, regnum);
0f71a2f6
JM
2547}
2548
2549void
b8de8283
AC
2550set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
2551 gdbarch_cannot_store_register_ftype cannot_store_register)
0f71a2f6 2552{
b8de8283 2553 gdbarch->cannot_store_register = cannot_store_register;
0f71a2f6
JM
2554}
2555
e8ab51f7 2556int
b8de8283 2557gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
e8ab51f7
AC
2558{
2559 gdb_assert (gdbarch != NULL);
956ac328 2560 return gdbarch->get_longjmp_target != NULL;
e8ab51f7
AC
2561}
2562
b8de8283 2563int
60ade65d 2564gdbarch_get_longjmp_target (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR *pc)
0f71a2f6 2565{
8de9bdc4 2566 gdb_assert (gdbarch != NULL);
956ac328 2567 gdb_assert (gdbarch->get_longjmp_target != NULL);
0f71a2f6 2568 if (gdbarch_debug >= 2)
b8de8283 2569 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
60ade65d 2570 return gdbarch->get_longjmp_target (frame, pc);
0f71a2f6
JM
2571}
2572
2573void
b8de8283
AC
2574set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
2575 gdbarch_get_longjmp_target_ftype get_longjmp_target)
0f71a2f6 2576{
b8de8283 2577 gdbarch->get_longjmp_target = get_longjmp_target;
0f71a2f6
JM
2578}
2579
2580int
104c1213 2581gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
0f71a2f6 2582{
8de9bdc4 2583 gdb_assert (gdbarch != NULL);
0f71a2f6 2584 if (gdbarch_debug >= 2)
0f71a2f6
JM
2585 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
2586 return gdbarch->believe_pcc_promotion;
2587}
2588
2589void
104c1213
JM
2590set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
2591 int believe_pcc_promotion)
0f71a2f6
JM
2592{
2593 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
2594}
2595
13d01224 2596int
ff2e87ac 2597gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
13d01224
AC
2598{
2599 gdb_assert (gdbarch != NULL);
956ac328 2600 gdb_assert (gdbarch->convert_register_p != NULL);
13d01224
AC
2601 if (gdbarch_debug >= 2)
2602 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
0abe36f5 2603 return gdbarch->convert_register_p (gdbarch, regnum, type);
13d01224
AC
2604}
2605
2606void
2607set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
2608 gdbarch_convert_register_p_ftype convert_register_p)
2609{
2610 gdbarch->convert_register_p = convert_register_p;
2611}
2612
8dccd430
PA
2613int
2614gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, gdb_byte *buf, int *optimizedp, int *unavailablep)
13d01224
AC
2615{
2616 gdb_assert (gdbarch != NULL);
956ac328 2617 gdb_assert (gdbarch->register_to_value != NULL);
13d01224
AC
2618 if (gdbarch_debug >= 2)
2619 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
8dccd430 2620 return gdbarch->register_to_value (frame, regnum, type, buf, optimizedp, unavailablep);
13d01224
AC
2621}
2622
2623void
2624set_gdbarch_register_to_value (struct gdbarch *gdbarch,
2625 gdbarch_register_to_value_ftype register_to_value)
2626{
2627 gdbarch->register_to_value = register_to_value;
2628}
2629
2630void
b60c417a 2631gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const gdb_byte *buf)
13d01224
AC
2632{
2633 gdb_assert (gdbarch != NULL);
956ac328 2634 gdb_assert (gdbarch->value_to_register != NULL);
13d01224
AC
2635 if (gdbarch_debug >= 2)
2636 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
ff2e87ac 2637 gdbarch->value_to_register (frame, regnum, type, buf);
13d01224
AC
2638}
2639
2640void
2641set_gdbarch_value_to_register (struct gdbarch *gdbarch,
2642 gdbarch_value_to_register_ftype value_to_register)
2643{
2644 gdbarch->value_to_register = value_to_register;
2645}
2646
9acbedc0 2647struct value *
2ed3c037 2648gdbarch_value_from_register (struct gdbarch *gdbarch, struct type *type, int regnum, struct frame_id frame_id)
9acbedc0
UW
2649{
2650 gdb_assert (gdbarch != NULL);
2651 gdb_assert (gdbarch->value_from_register != NULL);
2652 if (gdbarch_debug >= 2)
2653 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_from_register called\n");
2ed3c037 2654 return gdbarch->value_from_register (gdbarch, type, regnum, frame_id);
9acbedc0
UW
2655}
2656
2657void
2658set_gdbarch_value_from_register (struct gdbarch *gdbarch,
2659 gdbarch_value_from_register_ftype value_from_register)
2660{
2661 gdbarch->value_from_register = value_from_register;
2662}
2663
4478b372 2664CORE_ADDR
b60c417a 2665gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
4478b372 2666{
8de9bdc4 2667 gdb_assert (gdbarch != NULL);
956ac328 2668 gdb_assert (gdbarch->pointer_to_address != NULL);
4478b372
JB
2669 if (gdbarch_debug >= 2)
2670 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
9898f801 2671 return gdbarch->pointer_to_address (gdbarch, type, buf);
4478b372
JB
2672}
2673
2674void
2675set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
2676 gdbarch_pointer_to_address_ftype pointer_to_address)
2677{
2678 gdbarch->pointer_to_address = pointer_to_address;
2679}
2680
2681void
b60c417a 2682gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, gdb_byte *buf, CORE_ADDR addr)
4478b372 2683{
8de9bdc4 2684 gdb_assert (gdbarch != NULL);
956ac328 2685 gdb_assert (gdbarch->address_to_pointer != NULL);
4478b372
JB
2686 if (gdbarch_debug >= 2)
2687 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
9898f801 2688 gdbarch->address_to_pointer (gdbarch, type, buf, addr);
4478b372
JB
2689}
2690
2691void
2692set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
2693 gdbarch_address_to_pointer_ftype address_to_pointer)
2694{
2695 gdbarch->address_to_pointer = address_to_pointer;
2696}
2697
fc0c74b1
AC
2698int
2699gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
2700{
8de9bdc4 2701 gdb_assert (gdbarch != NULL);
956ac328 2702 return gdbarch->integer_to_address != NULL;
fc0c74b1
AC
2703}
2704
2705CORE_ADDR
fc1a4b47 2706gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
fc0c74b1 2707{
8de9bdc4 2708 gdb_assert (gdbarch != NULL);
956ac328 2709 gdb_assert (gdbarch->integer_to_address != NULL);
fc0c74b1
AC
2710 if (gdbarch_debug >= 2)
2711 fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
79dd2d24 2712 return gdbarch->integer_to_address (gdbarch, type, buf);
fc0c74b1
AC
2713}
2714
2715void
2716set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
2717 gdbarch_integer_to_address_ftype integer_to_address)
2718{
2719 gdbarch->integer_to_address = integer_to_address;
2720}
2721
92ad9cd9
AC
2722int
2723gdbarch_return_value_p (struct gdbarch *gdbarch)
2724{
2725 gdb_assert (gdbarch != NULL);
c1874924 2726 return gdbarch->return_value != NULL;
92ad9cd9
AC
2727}
2728
2729enum return_value_convention
6a3a010b 2730gdbarch_return_value (struct gdbarch *gdbarch, struct value *function, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
92ad9cd9
AC
2731{
2732 gdb_assert (gdbarch != NULL);
2733 gdb_assert (gdbarch->return_value != NULL);
2734 if (gdbarch_debug >= 2)
2735 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value called\n");
6a3a010b 2736 return gdbarch->return_value (gdbarch, function, valtype, regcache, readbuf, writebuf);
92ad9cd9
AC
2737}
2738
2739void
2740set_gdbarch_return_value (struct gdbarch *gdbarch,
2741 gdbarch_return_value_ftype return_value)
2742{
2743 gdbarch->return_value = return_value;
2744}
2745
18648a37
YQ
2746int
2747gdbarch_return_in_first_hidden_param_p (struct gdbarch *gdbarch, struct type *type)
2748{
2749 gdb_assert (gdbarch != NULL);
2750 gdb_assert (gdbarch->return_in_first_hidden_param_p != NULL);
2751 if (gdbarch_debug >= 2)
2752 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_in_first_hidden_param_p called\n");
2753 return gdbarch->return_in_first_hidden_param_p (gdbarch, type);
2754}
2755
2756void
2757set_gdbarch_return_in_first_hidden_param_p (struct gdbarch *gdbarch,
2758 gdbarch_return_in_first_hidden_param_p_ftype return_in_first_hidden_param_p)
2759{
2760 gdbarch->return_in_first_hidden_param_p = return_in_first_hidden_param_p;
2761}
2762
0f71a2f6
JM
2763CORE_ADDR
2764gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
2765{
8de9bdc4 2766 gdb_assert (gdbarch != NULL);
956ac328 2767 gdb_assert (gdbarch->skip_prologue != NULL);
0f71a2f6 2768 if (gdbarch_debug >= 2)
0f71a2f6 2769 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
6093d2eb 2770 return gdbarch->skip_prologue (gdbarch, ip);
0f71a2f6
JM
2771}
2772
2773void
104c1213
JM
2774set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
2775 gdbarch_skip_prologue_ftype skip_prologue)
0f71a2f6
JM
2776{
2777 gdbarch->skip_prologue = skip_prologue;
2778}
2779
4309257c
PM
2780int
2781gdbarch_skip_main_prologue_p (struct gdbarch *gdbarch)
2782{
2783 gdb_assert (gdbarch != NULL);
2784 return gdbarch->skip_main_prologue != NULL;
2785}
2786
2787CORE_ADDR
2788gdbarch_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
2789{
2790 gdb_assert (gdbarch != NULL);
2791 gdb_assert (gdbarch->skip_main_prologue != NULL);
2792 if (gdbarch_debug >= 2)
2793 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_main_prologue called\n");
2794 return gdbarch->skip_main_prologue (gdbarch, ip);
2795}
2796
2797void
2798set_gdbarch_skip_main_prologue (struct gdbarch *gdbarch,
cfd8ab24 2799 gdbarch_skip_main_prologue_ftype skip_main_prologue)
4309257c
PM
2800{
2801 gdbarch->skip_main_prologue = skip_main_prologue;
2802}
2803
591a12a1
UW
2804int
2805gdbarch_skip_entrypoint_p (struct gdbarch *gdbarch)
2806{
2807 gdb_assert (gdbarch != NULL);
2808 return gdbarch->skip_entrypoint != NULL;
2809}
2810
2811CORE_ADDR
2812gdbarch_skip_entrypoint (struct gdbarch *gdbarch, CORE_ADDR ip)
2813{
2814 gdb_assert (gdbarch != NULL);
2815 gdb_assert (gdbarch->skip_entrypoint != NULL);
2816 if (gdbarch_debug >= 2)
2817 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_entrypoint called\n");
2818 return gdbarch->skip_entrypoint (gdbarch, ip);
2819}
2820
2821void
2822set_gdbarch_skip_entrypoint (struct gdbarch *gdbarch,
2823 gdbarch_skip_entrypoint_ftype skip_entrypoint)
2824{
2825 gdbarch->skip_entrypoint = skip_entrypoint;
2826}
2827
0f71a2f6
JM
2828int
2829gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
2830{
8de9bdc4 2831 gdb_assert (gdbarch != NULL);
956ac328 2832 gdb_assert (gdbarch->inner_than != NULL);
0f71a2f6 2833 if (gdbarch_debug >= 2)
0f71a2f6
JM
2834 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
2835 return gdbarch->inner_than (lhs, rhs);
2836}
2837
2838void
104c1213
JM
2839set_gdbarch_inner_than (struct gdbarch *gdbarch,
2840 gdbarch_inner_than_ftype inner_than)
0f71a2f6
JM
2841{
2842 gdbarch->inner_than = inner_than;
2843}
2844
fc1a4b47 2845const gdb_byte *
adf40b2e 2846gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
0f71a2f6 2847{
8de9bdc4 2848 gdb_assert (gdbarch != NULL);
956ac328 2849 gdb_assert (gdbarch->breakpoint_from_pc != NULL);
0f71a2f6 2850 if (gdbarch_debug >= 2)
0f71a2f6 2851 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
67d57894 2852 return gdbarch->breakpoint_from_pc (gdbarch, pcptr, lenptr);
0f71a2f6
JM
2853}
2854
2855void
104c1213
JM
2856set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
2857 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
0f71a2f6
JM
2858{
2859 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
2860}
2861
cd6c3b4f
YQ
2862int
2863gdbarch_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
2864{
2865 gdb_assert (gdbarch != NULL);
2866 gdb_assert (gdbarch->breakpoint_kind_from_pc != NULL);
2867 if (gdbarch_debug >= 2)
2868 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_kind_from_pc called\n");
2869 return gdbarch->breakpoint_kind_from_pc (gdbarch, pcptr);
2870}
2871
2872void
2873set_gdbarch_breakpoint_kind_from_pc (struct gdbarch *gdbarch,
2874 gdbarch_breakpoint_kind_from_pc_ftype breakpoint_kind_from_pc)
2875{
2876 gdbarch->breakpoint_kind_from_pc = breakpoint_kind_from_pc;
2877}
2878
2879const gdb_byte *
2880gdbarch_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
2881{
2882 gdb_assert (gdbarch != NULL);
2883 gdb_assert (gdbarch->sw_breakpoint_from_kind != NULL);
2884 if (gdbarch_debug >= 2)
2885 fprintf_unfiltered (gdb_stdlog, "gdbarch_sw_breakpoint_from_kind called\n");
2886 return gdbarch->sw_breakpoint_from_kind (gdbarch, kind, size);
2887}
2888
2889void
2890set_gdbarch_sw_breakpoint_from_kind (struct gdbarch *gdbarch,
2891 gdbarch_sw_breakpoint_from_kind_ftype sw_breakpoint_from_kind)
2892{
2893 gdbarch->sw_breakpoint_from_kind = sw_breakpoint_from_kind;
2894}
2895
833b7ab5
YQ
2896int
2897gdbarch_breakpoint_kind_from_current_state (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR *pcptr)
2898{
2899 gdb_assert (gdbarch != NULL);
2900 gdb_assert (gdbarch->breakpoint_kind_from_current_state != NULL);
2901 if (gdbarch_debug >= 2)
2902 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_kind_from_current_state called\n");
2903 return gdbarch->breakpoint_kind_from_current_state (gdbarch, regcache, pcptr);
2904}
2905
2906void
2907set_gdbarch_breakpoint_kind_from_current_state (struct gdbarch *gdbarch,
2908 gdbarch_breakpoint_kind_from_current_state_ftype breakpoint_kind_from_current_state)
2909{
2910 gdbarch->breakpoint_kind_from_current_state = breakpoint_kind_from_current_state;
2911}
2912
a1131521
KB
2913int
2914gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch)
2915{
2916 gdb_assert (gdbarch != NULL);
2917 return gdbarch->adjust_breakpoint_address != NULL;
2918}
2919
2920CORE_ADDR
2921gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr)
2922{
2923 gdb_assert (gdbarch != NULL);
2924 gdb_assert (gdbarch->adjust_breakpoint_address != NULL);
2925 if (gdbarch_debug >= 2)
2926 fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_breakpoint_address called\n");
2927 return gdbarch->adjust_breakpoint_address (gdbarch, bpaddr);
2928}
2929
2930void
2931set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch,
2932 gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address)
2933{
2934 gdbarch->adjust_breakpoint_address = adjust_breakpoint_address;
2935}
2936
917317f4 2937int
8181d85f 2938gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
917317f4 2939{
8de9bdc4 2940 gdb_assert (gdbarch != NULL);
956ac328 2941 gdb_assert (gdbarch->memory_insert_breakpoint != NULL);
917317f4 2942 if (gdbarch_debug >= 2)
917317f4 2943 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
ae4b2284 2944 return gdbarch->memory_insert_breakpoint (gdbarch, bp_tgt);
917317f4
JM
2945}
2946
2947void
2948set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
2949 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
2950{
2951 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
2952}
2953
2954int
8181d85f 2955gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
917317f4 2956{
8de9bdc4 2957 gdb_assert (gdbarch != NULL);
956ac328 2958 gdb_assert (gdbarch->memory_remove_breakpoint != NULL);
917317f4 2959 if (gdbarch_debug >= 2)
917317f4 2960 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
ae4b2284 2961 return gdbarch->memory_remove_breakpoint (gdbarch, bp_tgt);
917317f4
JM
2962}
2963
2964void
2965set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
2966 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
2967{
2968 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
2969}
2970
0f71a2f6 2971CORE_ADDR
104c1213 2972gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
0f71a2f6 2973{
8de9bdc4 2974 gdb_assert (gdbarch != NULL);
71bd6bd4 2975 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
0f71a2f6 2976 if (gdbarch_debug >= 2)
0f71a2f6
JM
2977 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
2978 return gdbarch->decr_pc_after_break;
2979}
2980
2981void
104c1213
JM
2982set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
2983 CORE_ADDR decr_pc_after_break)
0f71a2f6
JM
2984{
2985 gdbarch->decr_pc_after_break = decr_pc_after_break;
2986}
2987
2988CORE_ADDR
782263ab 2989gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch)
0f71a2f6 2990{
8de9bdc4 2991 gdb_assert (gdbarch != NULL);
782263ab 2992 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
0f71a2f6 2993 if (gdbarch_debug >= 2)
782263ab
AC
2994 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_function_start_offset called\n");
2995 return gdbarch->deprecated_function_start_offset;
0f71a2f6
JM
2996}
2997
2998void
782263ab
AC
2999set_gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch,
3000 CORE_ADDR deprecated_function_start_offset)
0f71a2f6 3001{
782263ab 3002 gdbarch->deprecated_function_start_offset = deprecated_function_start_offset;
0f71a2f6
JM
3003}
3004
123dc839
DJ
3005int
3006gdbarch_remote_register_number (struct gdbarch *gdbarch, int regno)
3007{
3008 gdb_assert (gdbarch != NULL);
3009 gdb_assert (gdbarch->remote_register_number != NULL);
3010 if (gdbarch_debug >= 2)
3011 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_register_number called\n");
3012 return gdbarch->remote_register_number (gdbarch, regno);
3013}
3014
3015void
3016set_gdbarch_remote_register_number (struct gdbarch *gdbarch,
3017 gdbarch_remote_register_number_ftype remote_register_number)
3018{
3019 gdbarch->remote_register_number = remote_register_number;
3020}
3021
b2756930
KB
3022int
3023gdbarch_fetch_tls_load_module_address_p (struct gdbarch *gdbarch)
3024{
3025 gdb_assert (gdbarch != NULL);
3026 return gdbarch->fetch_tls_load_module_address != NULL;
3027}
3028
3029CORE_ADDR
3030gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch, struct objfile *objfile)
3031{
3032 gdb_assert (gdbarch != NULL);
3033 gdb_assert (gdbarch->fetch_tls_load_module_address != NULL);
3034 if (gdbarch_debug >= 2)
3035 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_tls_load_module_address called\n");
3036 return gdbarch->fetch_tls_load_module_address (objfile);
3037}
3038
3039void
3040set_gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch,
3041 gdbarch_fetch_tls_load_module_address_ftype fetch_tls_load_module_address)
3042{
3043 gdbarch->fetch_tls_load_module_address = fetch_tls_load_module_address;
3044}
3045
0f71a2f6 3046CORE_ADDR
104c1213 3047gdbarch_frame_args_skip (struct gdbarch *gdbarch)
0f71a2f6 3048{
8de9bdc4 3049 gdb_assert (gdbarch != NULL);
5867a2fb 3050 /* Skip verify of frame_args_skip, invalid_p == 0 */
0f71a2f6 3051 if (gdbarch_debug >= 2)
0f71a2f6
JM
3052 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
3053 return gdbarch->frame_args_skip;
3054}
3055
3056void
104c1213
JM
3057set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
3058 CORE_ADDR frame_args_skip)
0f71a2f6
JM
3059{
3060 gdbarch->frame_args_skip = frame_args_skip;
3061}
3062
12cc2063
AC
3063int
3064gdbarch_unwind_pc_p (struct gdbarch *gdbarch)
3065{
3066 gdb_assert (gdbarch != NULL);
956ac328 3067 return gdbarch->unwind_pc != NULL;
12cc2063
AC
3068}
3069
3070CORE_ADDR
3071gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
3072{
3073 gdb_assert (gdbarch != NULL);
956ac328 3074 gdb_assert (gdbarch->unwind_pc != NULL);
12cc2063
AC
3075 if (gdbarch_debug >= 2)
3076 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n");
3077 return gdbarch->unwind_pc (gdbarch, next_frame);
3078}
3079
3080void
3081set_gdbarch_unwind_pc (struct gdbarch *gdbarch,
3082 gdbarch_unwind_pc_ftype unwind_pc)
3083{
3084 gdbarch->unwind_pc = unwind_pc;
3085}
3086
a9e5fdc2
AC
3087int
3088gdbarch_unwind_sp_p (struct gdbarch *gdbarch)
3089{
3090 gdb_assert (gdbarch != NULL);
956ac328 3091 return gdbarch->unwind_sp != NULL;
a9e5fdc2
AC
3092}
3093
3094CORE_ADDR
3095gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
3096{
3097 gdb_assert (gdbarch != NULL);
956ac328 3098 gdb_assert (gdbarch->unwind_sp != NULL);
a9e5fdc2
AC
3099 if (gdbarch_debug >= 2)
3100 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_sp called\n");
3101 return gdbarch->unwind_sp (gdbarch, next_frame);
3102}
3103
3104void
3105set_gdbarch_unwind_sp (struct gdbarch *gdbarch,
3106 gdbarch_unwind_sp_ftype unwind_sp)
3107{
3108 gdbarch->unwind_sp = unwind_sp;
3109}
3110
983a287a
AC
3111int
3112gdbarch_frame_num_args_p (struct gdbarch *gdbarch)
3113{
3114 gdb_assert (gdbarch != NULL);
956ac328 3115 return gdbarch->frame_num_args != NULL;
983a287a
AC
3116}
3117
0f71a2f6
JM
3118int
3119gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
3120{
8de9bdc4 3121 gdb_assert (gdbarch != NULL);
956ac328 3122 gdb_assert (gdbarch->frame_num_args != NULL);
0f71a2f6 3123 if (gdbarch_debug >= 2)
0f71a2f6
JM
3124 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
3125 return gdbarch->frame_num_args (frame);
3126}
3127
3128void
104c1213
JM
3129set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
3130 gdbarch_frame_num_args_ftype frame_num_args)
0f71a2f6
JM
3131{
3132 gdbarch->frame_num_args = frame_num_args;
3133}
3134
dc604539
AC
3135int
3136gdbarch_frame_align_p (struct gdbarch *gdbarch)
3137{
3138 gdb_assert (gdbarch != NULL);
956ac328 3139 return gdbarch->frame_align != NULL;
dc604539
AC
3140}
3141
3142CORE_ADDR
3143gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
3144{
3145 gdb_assert (gdbarch != NULL);
956ac328 3146 gdb_assert (gdbarch->frame_align != NULL);
dc604539
AC
3147 if (gdbarch_debug >= 2)
3148 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
3149 return gdbarch->frame_align (gdbarch, address);
3150}
3151
3152void
3153set_gdbarch_frame_align (struct gdbarch *gdbarch,
3154 gdbarch_frame_align_ftype frame_align)
3155{
3156 gdbarch->frame_align = frame_align;
3157}
3158
192cb3d4
MK
3159int
3160gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type)
3161{
3162 gdb_assert (gdbarch != NULL);
3163 gdb_assert (gdbarch->stabs_argument_has_addr != NULL);
3164 if (gdbarch_debug >= 2)
3165 fprintf_unfiltered (gdb_stdlog, "gdbarch_stabs_argument_has_addr called\n");
3166 return gdbarch->stabs_argument_has_addr (gdbarch, type);
3167}
3168
3169void
3170set_gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch,
3171 gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr)
3172{
3173 gdbarch->stabs_argument_has_addr = stabs_argument_has_addr;
3174}
3175
8b148df9
AC
3176int
3177gdbarch_frame_red_zone_size (struct gdbarch *gdbarch)
3178{
3179 gdb_assert (gdbarch != NULL);
3180 if (gdbarch_debug >= 2)
3181 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_red_zone_size called\n");
3182 return gdbarch->frame_red_zone_size;
3183}
3184
3185void
3186set_gdbarch_frame_red_zone_size (struct gdbarch *gdbarch,
3187 int frame_red_zone_size)
3188{
3189 gdbarch->frame_red_zone_size = frame_red_zone_size;
3190}
3191
f517ea4e 3192CORE_ADDR
e2d0e7eb 3193gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
f517ea4e 3194{
8de9bdc4 3195 gdb_assert (gdbarch != NULL);
956ac328 3196 gdb_assert (gdbarch->convert_from_func_ptr_addr != NULL);
f517ea4e
PS
3197 if (gdbarch_debug >= 2)
3198 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
e2d0e7eb 3199 return gdbarch->convert_from_func_ptr_addr (gdbarch, addr, targ);
f517ea4e
PS
3200}
3201
3202void
3203set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
3204 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
3205{
3206 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
3207}
3208
875e1767
AC
3209CORE_ADDR
3210gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
3211{
8de9bdc4 3212 gdb_assert (gdbarch != NULL);
956ac328 3213 gdb_assert (gdbarch->addr_bits_remove != NULL);
875e1767
AC
3214 if (gdbarch_debug >= 2)
3215 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
24568a2c 3216 return gdbarch->addr_bits_remove (gdbarch, addr);
875e1767
AC
3217}
3218
3219void
3220set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
3221 gdbarch_addr_bits_remove_ftype addr_bits_remove)
3222{
3223 gdbarch->addr_bits_remove = addr_bits_remove;
3224}
3225
64c4637f
AC
3226int
3227gdbarch_software_single_step_p (struct gdbarch *gdbarch)
3228{
8de9bdc4 3229 gdb_assert (gdbarch != NULL);
956ac328 3230 return gdbarch->software_single_step != NULL;
64c4637f
AC
3231}
3232
a0ff9e1a 3233std::vector<CORE_ADDR>
f5ea389a 3234gdbarch_software_single_step (struct gdbarch *gdbarch, struct regcache *regcache)
64c4637f 3235{
8de9bdc4 3236 gdb_assert (gdbarch != NULL);
956ac328 3237 gdb_assert (gdbarch->software_single_step != NULL);
64c4637f
AC
3238 if (gdbarch_debug >= 2)
3239 fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
f5ea389a 3240 return gdbarch->software_single_step (regcache);
64c4637f
AC
3241}
3242
3243void
3244set_gdbarch_software_single_step (struct gdbarch *gdbarch,
3245 gdbarch_software_single_step_ftype software_single_step)
3246{
3247 gdbarch->software_single_step = software_single_step;
3248}
3249
3352ef37
AC
3250int
3251gdbarch_single_step_through_delay_p (struct gdbarch *gdbarch)
3252{
3253 gdb_assert (gdbarch != NULL);
3254 return gdbarch->single_step_through_delay != NULL;
3255}
3256
3257int
3258gdbarch_single_step_through_delay (struct gdbarch *gdbarch, struct frame_info *frame)
3259{
3260 gdb_assert (gdbarch != NULL);
3261 gdb_assert (gdbarch->single_step_through_delay != NULL);
3262 if (gdbarch_debug >= 2)
3263 fprintf_unfiltered (gdb_stdlog, "gdbarch_single_step_through_delay called\n");
3264 return gdbarch->single_step_through_delay (gdbarch, frame);
3265}
3266
3267void
3268set_gdbarch_single_step_through_delay (struct gdbarch *gdbarch,
3269 gdbarch_single_step_through_delay_ftype single_step_through_delay)
3270{
3271 gdbarch->single_step_through_delay = single_step_through_delay;
3272}
3273
2bf0cb65 3274int
a89aa300 3275gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info)
2bf0cb65 3276{
8de9bdc4 3277 gdb_assert (gdbarch != NULL);
956ac328 3278 gdb_assert (gdbarch->print_insn != NULL);
2bf0cb65
EZ
3279 if (gdbarch_debug >= 2)
3280 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
3281 return gdbarch->print_insn (vma, info);
3282}
3283
3284void
3285set_gdbarch_print_insn (struct gdbarch *gdbarch,
3286 gdbarch_print_insn_ftype print_insn)
3287{
3288 gdbarch->print_insn = print_insn;
3289}
3290
bdcd319a 3291CORE_ADDR
52f729a7 3292gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR pc)
bdcd319a 3293{
8de9bdc4 3294 gdb_assert (gdbarch != NULL);
956ac328 3295 gdb_assert (gdbarch->skip_trampoline_code != NULL);
bdcd319a
CV
3296 if (gdbarch_debug >= 2)
3297 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
52f729a7 3298 return gdbarch->skip_trampoline_code (frame, pc);
bdcd319a
CV
3299}
3300
3301void
3302set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
3303 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
3304{
3305 gdbarch->skip_trampoline_code = skip_trampoline_code;
3306}
3307
dea0c52f
MK
3308CORE_ADDR
3309gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
3310{
3311 gdb_assert (gdbarch != NULL);
3312 gdb_assert (gdbarch->skip_solib_resolver != NULL);
3313 if (gdbarch_debug >= 2)
3314 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_solib_resolver called\n");
4c8c40e6 3315 return gdbarch->skip_solib_resolver (gdbarch, pc);
dea0c52f
MK
3316}
3317
3318void
3319set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch,
3320 gdbarch_skip_solib_resolver_ftype skip_solib_resolver)
3321{
3322 gdbarch->skip_solib_resolver = skip_solib_resolver;
3323}
3324
d50355b6 3325int
2c02bd72 3326gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, const char *name)
d50355b6
MS
3327{
3328 gdb_assert (gdbarch != NULL);
956ac328 3329 gdb_assert (gdbarch->in_solib_return_trampoline != NULL);
d50355b6
MS
3330 if (gdbarch_debug >= 2)
3331 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
e17a4113 3332 return gdbarch->in_solib_return_trampoline (gdbarch, pc, name);
d50355b6
MS
3333}
3334
3335void
3336set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
3337 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
3338{
3339 gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
3340}
3341
c12260ac 3342int
c9cf6e20 3343gdbarch_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR addr)
c12260ac 3344{
8de9bdc4 3345 gdb_assert (gdbarch != NULL);
c9cf6e20 3346 gdb_assert (gdbarch->stack_frame_destroyed_p != NULL);
c12260ac 3347 if (gdbarch_debug >= 2)
c9cf6e20
MG
3348 fprintf_unfiltered (gdb_stdlog, "gdbarch_stack_frame_destroyed_p called\n");
3349 return gdbarch->stack_frame_destroyed_p (gdbarch, addr);
c12260ac
CV
3350}
3351
3352void
c9cf6e20
MG
3353set_gdbarch_stack_frame_destroyed_p (struct gdbarch *gdbarch,
3354 gdbarch_stack_frame_destroyed_p_ftype stack_frame_destroyed_p)
c12260ac 3355{
c9cf6e20 3356 gdbarch->stack_frame_destroyed_p = stack_frame_destroyed_p;
c12260ac
CV
3357}
3358
3e29f34a
MR
3359int
3360gdbarch_elf_make_msymbol_special_p (struct gdbarch *gdbarch)
3361{
3362 gdb_assert (gdbarch != NULL);
3363 return gdbarch->elf_make_msymbol_special != NULL;
3364}
3365
a2cf933a
EZ
3366void
3367gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
3368{
8de9bdc4 3369 gdb_assert (gdbarch != NULL);
956ac328 3370 gdb_assert (gdbarch->elf_make_msymbol_special != NULL);
a2cf933a
EZ
3371 if (gdbarch_debug >= 2)
3372 fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
3373 gdbarch->elf_make_msymbol_special (sym, msym);
3374}
3375
3376void
3377set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
3378 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
3379{
3380 gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
3381}
3382
3383void
3384gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
3385{
8de9bdc4 3386 gdb_assert (gdbarch != NULL);
956ac328 3387 gdb_assert (gdbarch->coff_make_msymbol_special != NULL);
a2cf933a
EZ
3388 if (gdbarch_debug >= 2)
3389 fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
3390 gdbarch->coff_make_msymbol_special (val, msym);
3391}
3392
3393void
3394set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
3395 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
3396{
3397 gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
3398}
3399
3e29f34a
MR
3400void
3401gdbarch_make_symbol_special (struct gdbarch *gdbarch, struct symbol *sym, struct objfile *objfile)
3402{
3403 gdb_assert (gdbarch != NULL);
3404 gdb_assert (gdbarch->make_symbol_special != NULL);
3405 if (gdbarch_debug >= 2)
3406 fprintf_unfiltered (gdb_stdlog, "gdbarch_make_symbol_special called\n");
3407 gdbarch->make_symbol_special (sym, objfile);
3408}
3409
3410void
3411set_gdbarch_make_symbol_special (struct gdbarch *gdbarch,
3412 gdbarch_make_symbol_special_ftype make_symbol_special)
3413{
3414 gdbarch->make_symbol_special = make_symbol_special;
3415}
3416
3417CORE_ADDR
3418gdbarch_adjust_dwarf2_addr (struct gdbarch *gdbarch, CORE_ADDR pc)
3419{
3420 gdb_assert (gdbarch != NULL);
3421 gdb_assert (gdbarch->adjust_dwarf2_addr != NULL);
3422 if (gdbarch_debug >= 2)
3423 fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_dwarf2_addr called\n");
3424 return gdbarch->adjust_dwarf2_addr (pc);
3425}
3426
3427void
3428set_gdbarch_adjust_dwarf2_addr (struct gdbarch *gdbarch,
3429 gdbarch_adjust_dwarf2_addr_ftype adjust_dwarf2_addr)
3430{
3431 gdbarch->adjust_dwarf2_addr = adjust_dwarf2_addr;
3432}
3433
3434CORE_ADDR
3435gdbarch_adjust_dwarf2_line (struct gdbarch *gdbarch, CORE_ADDR addr, int rel)
3436{
3437 gdb_assert (gdbarch != NULL);
3438 gdb_assert (gdbarch->adjust_dwarf2_line != NULL);
3439 if (gdbarch_debug >= 2)
3440 fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_dwarf2_line called\n");
3441 return gdbarch->adjust_dwarf2_line (addr, rel);
3442}
3443
3444void
3445set_gdbarch_adjust_dwarf2_line (struct gdbarch *gdbarch,
3446 gdbarch_adjust_dwarf2_line_ftype adjust_dwarf2_line)
3447{
3448 gdbarch->adjust_dwarf2_line = adjust_dwarf2_line;
3449}
3450
c4ed33b9
AC
3451int
3452gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
3453{
3454 gdb_assert (gdbarch != NULL);
3455 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
3456 if (gdbarch_debug >= 2)
3457 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
3458 return gdbarch->cannot_step_breakpoint;
3459}
3460
3461void
3462set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
3463 int cannot_step_breakpoint)
3464{
3465 gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
3466}
3467
f74fa174
MM
3468int
3469gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
3470{
3471 gdb_assert (gdbarch != NULL);
3472 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
3473 if (gdbarch_debug >= 2)
3474 fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
3475 return gdbarch->have_nonsteppable_watchpoint;
3476}
3477
3478void
3479set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
967c0d83 3480 int have_nonsteppable_watchpoint)
f74fa174
MM
3481{
3482 gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
3483}
3484
8b2dbe47
KB
3485int
3486gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
3487{
3488 gdb_assert (gdbarch != NULL);
956ac328 3489 return gdbarch->address_class_type_flags != NULL;
8b2dbe47
KB
3490}
3491
3492int
3493gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
3494{
3495 gdb_assert (gdbarch != NULL);
956ac328 3496 gdb_assert (gdbarch->address_class_type_flags != NULL);
8b2dbe47
KB
3497 if (gdbarch_debug >= 2)
3498 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
3499 return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
3500}
3501
3502void
3503set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
3504 gdbarch_address_class_type_flags_ftype address_class_type_flags)
3505{
3506 gdbarch->address_class_type_flags = address_class_type_flags;
3507}
3508
3509int
3510gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
3511{
3512 gdb_assert (gdbarch != NULL);
956ac328 3513 return gdbarch->address_class_type_flags_to_name != NULL;
8b2dbe47
KB
3514}
3515
321432c0 3516const char *
8b2dbe47
KB
3517gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
3518{
3519 gdb_assert (gdbarch != NULL);
956ac328 3520 gdb_assert (gdbarch->address_class_type_flags_to_name != NULL);
8b2dbe47
KB
3521 if (gdbarch_debug >= 2)
3522 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
5f11f355 3523 return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
8b2dbe47
KB
3524}
3525
3526void
3527set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
3528 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
3529{
3530 gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
3531}
3532
b41c5a85
JW
3533bool
3534gdbarch_execute_dwarf_cfa_vendor_op (struct gdbarch *gdbarch, gdb_byte op, struct dwarf2_frame_state *fs)
3535{
3536 gdb_assert (gdbarch != NULL);
3537 gdb_assert (gdbarch->execute_dwarf_cfa_vendor_op != NULL);
3538 if (gdbarch_debug >= 2)
3539 fprintf_unfiltered (gdb_stdlog, "gdbarch_execute_dwarf_cfa_vendor_op called\n");
3540 return gdbarch->execute_dwarf_cfa_vendor_op (gdbarch, op, fs);
3541}
3542
3543void
3544set_gdbarch_execute_dwarf_cfa_vendor_op (struct gdbarch *gdbarch,
3545 gdbarch_execute_dwarf_cfa_vendor_op_ftype execute_dwarf_cfa_vendor_op)
3546{
3547 gdbarch->execute_dwarf_cfa_vendor_op = execute_dwarf_cfa_vendor_op;
3548}
3549
8b2dbe47
KB
3550int
3551gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
3552{
3553 gdb_assert (gdbarch != NULL);
956ac328 3554 return gdbarch->address_class_name_to_type_flags != NULL;
8b2dbe47
KB
3555}
3556
3557int
321432c0 3558gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
8b2dbe47
KB
3559{
3560 gdb_assert (gdbarch != NULL);
956ac328 3561 gdb_assert (gdbarch->address_class_name_to_type_flags != NULL);
8b2dbe47
KB
3562 if (gdbarch_debug >= 2)
3563 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
5f11f355 3564 return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
8b2dbe47
KB
3565}
3566
3567void
3568set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
3569 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
3570{
3571 gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
3572}
3573
b59ff9d5
AC
3574int
3575gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
3576{
3577 gdb_assert (gdbarch != NULL);
956ac328 3578 gdb_assert (gdbarch->register_reggroup_p != NULL);
b59ff9d5
AC
3579 if (gdbarch_debug >= 2)
3580 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
3581 return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
3582}
3583
3584void
3585set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
3586 gdbarch_register_reggroup_p_ftype register_reggroup_p)
3587{
3588 gdbarch->register_reggroup_p = register_reggroup_p;
3589}
3590
143985b7
AF
3591int
3592gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch)
3593{
3594 gdb_assert (gdbarch != NULL);
956ac328 3595 return gdbarch->fetch_pointer_argument != NULL;
143985b7
AF
3596}
3597
3598CORE_ADDR
3599gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type)
3600{
3601 gdb_assert (gdbarch != NULL);
956ac328 3602 gdb_assert (gdbarch->fetch_pointer_argument != NULL);
143985b7
AF
3603 if (gdbarch_debug >= 2)
3604 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n");
3605 return gdbarch->fetch_pointer_argument (frame, argi, type);
3606}
3607
3608void
3609set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch,
3610 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument)
3611{
3612 gdbarch->fetch_pointer_argument = fetch_pointer_argument;
3613}
3614
5aa82d05
AA
3615int
3616gdbarch_iterate_over_regset_sections_p (struct gdbarch *gdbarch)
3617{
3618 gdb_assert (gdbarch != NULL);
3619 return gdbarch->iterate_over_regset_sections != NULL;
3620}
3621
3622void
3623gdbarch_iterate_over_regset_sections (struct gdbarch *gdbarch, iterate_over_regset_sections_cb *cb, void *cb_data, const struct regcache *regcache)
17ea7499
CES
3624{
3625 gdb_assert (gdbarch != NULL);
5aa82d05 3626 gdb_assert (gdbarch->iterate_over_regset_sections != NULL);
17ea7499 3627 if (gdbarch_debug >= 2)
5aa82d05
AA
3628 fprintf_unfiltered (gdb_stdlog, "gdbarch_iterate_over_regset_sections called\n");
3629 gdbarch->iterate_over_regset_sections (gdbarch, cb, cb_data, regcache);
17ea7499
CES
3630}
3631
3632void
5aa82d05
AA
3633set_gdbarch_iterate_over_regset_sections (struct gdbarch *gdbarch,
3634 gdbarch_iterate_over_regset_sections_ftype iterate_over_regset_sections)
17ea7499 3635{
5aa82d05 3636 gdbarch->iterate_over_regset_sections = iterate_over_regset_sections;
17ea7499
CES
3637}
3638
6432734d
UW
3639int
3640gdbarch_make_corefile_notes_p (struct gdbarch *gdbarch)
3641{
3642 gdb_assert (gdbarch != NULL);
3643 return gdbarch->make_corefile_notes != NULL;
3644}
3645
3646char *
3647gdbarch_make_corefile_notes (struct gdbarch *gdbarch, bfd *obfd, int *note_size)
3648{
3649 gdb_assert (gdbarch != NULL);
3650 gdb_assert (gdbarch->make_corefile_notes != NULL);
3651 if (gdbarch_debug >= 2)
3652 fprintf_unfiltered (gdb_stdlog, "gdbarch_make_corefile_notes called\n");
3653 return gdbarch->make_corefile_notes (gdbarch, obfd, note_size);
3654}
3655
3656void
3657set_gdbarch_make_corefile_notes (struct gdbarch *gdbarch,
3658 gdbarch_make_corefile_notes_ftype make_corefile_notes)
3659{
3660 gdbarch->make_corefile_notes = make_corefile_notes;
3661}
3662
b3ac9c77
SDJ
3663int
3664gdbarch_elfcore_write_linux_prpsinfo_p (struct gdbarch *gdbarch)
3665{
3666 gdb_assert (gdbarch != NULL);
3667 return gdbarch->elfcore_write_linux_prpsinfo != NULL;
3668}
3669
3670char *
3671gdbarch_elfcore_write_linux_prpsinfo (struct gdbarch *gdbarch, bfd *obfd, char *note_data, int *note_size, const struct elf_internal_linux_prpsinfo *info)
3672{
3673 gdb_assert (gdbarch != NULL);
3674 gdb_assert (gdbarch->elfcore_write_linux_prpsinfo != NULL);
3675 if (gdbarch_debug >= 2)
3676 fprintf_unfiltered (gdb_stdlog, "gdbarch_elfcore_write_linux_prpsinfo called\n");
3677 return gdbarch->elfcore_write_linux_prpsinfo (obfd, note_data, note_size, info);
3678}
3679
3680void
3681set_gdbarch_elfcore_write_linux_prpsinfo (struct gdbarch *gdbarch,
3682 gdbarch_elfcore_write_linux_prpsinfo_ftype elfcore_write_linux_prpsinfo)
3683{
3684 gdbarch->elfcore_write_linux_prpsinfo = elfcore_write_linux_prpsinfo;
3685}
3686
35c2fab7
UW
3687int
3688gdbarch_find_memory_regions_p (struct gdbarch *gdbarch)
3689{
3690 gdb_assert (gdbarch != NULL);
3691 return gdbarch->find_memory_regions != NULL;
3692}
3693
3694int
3695gdbarch_find_memory_regions (struct gdbarch *gdbarch, find_memory_region_ftype func, void *data)
3696{
3697 gdb_assert (gdbarch != NULL);
3698 gdb_assert (gdbarch->find_memory_regions != NULL);
3699 if (gdbarch_debug >= 2)
3700 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_memory_regions called\n");
3701 return gdbarch->find_memory_regions (gdbarch, func, data);
3702}
3703
3704void
3705set_gdbarch_find_memory_regions (struct gdbarch *gdbarch,
3706 gdbarch_find_memory_regions_ftype find_memory_regions)
3707{
3708 gdbarch->find_memory_regions = find_memory_regions;
3709}
3710
de584861
PA
3711int
3712gdbarch_core_xfer_shared_libraries_p (struct gdbarch *gdbarch)
3713{
3714 gdb_assert (gdbarch != NULL);
3715 return gdbarch->core_xfer_shared_libraries != NULL;
3716}
3717
c09f20e4 3718ULONGEST
7ec1862d 3719gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len)
de584861
PA
3720{
3721 gdb_assert (gdbarch != NULL);
3722 gdb_assert (gdbarch->core_xfer_shared_libraries != NULL);
3723 if (gdbarch_debug >= 2)
3724 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_xfer_shared_libraries called\n");
3725 return gdbarch->core_xfer_shared_libraries (gdbarch, readbuf, offset, len);
3726}
3727
3728void
3729set_gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch,
3730 gdbarch_core_xfer_shared_libraries_ftype core_xfer_shared_libraries)
3731{
3732 gdbarch->core_xfer_shared_libraries = core_xfer_shared_libraries;
3733}
3734
356a5233
JB
3735int
3736gdbarch_core_xfer_shared_libraries_aix_p (struct gdbarch *gdbarch)
3737{
3738 gdb_assert (gdbarch != NULL);
3739 return gdbarch->core_xfer_shared_libraries_aix != NULL;
3740}
3741
c09f20e4 3742ULONGEST
7ec1862d 3743gdbarch_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len)
356a5233
JB
3744{
3745 gdb_assert (gdbarch != NULL);
3746 gdb_assert (gdbarch->core_xfer_shared_libraries_aix != NULL);
3747 if (gdbarch_debug >= 2)
3748 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_xfer_shared_libraries_aix called\n");
3749 return gdbarch->core_xfer_shared_libraries_aix (gdbarch, readbuf, offset, len);
3750}
3751
3752void
3753set_gdbarch_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch,
3754 gdbarch_core_xfer_shared_libraries_aix_ftype core_xfer_shared_libraries_aix)
3755{
3756 gdbarch->core_xfer_shared_libraries_aix = core_xfer_shared_libraries_aix;
3757}
3758
28439f5e
PA
3759int
3760gdbarch_core_pid_to_str_p (struct gdbarch *gdbarch)
3761{
3762 gdb_assert (gdbarch != NULL);
3763 return gdbarch->core_pid_to_str != NULL;
3764}
3765
7a114964 3766const char *
28439f5e
PA
3767gdbarch_core_pid_to_str (struct gdbarch *gdbarch, ptid_t ptid)
3768{
3769 gdb_assert (gdbarch != NULL);
3770 gdb_assert (gdbarch->core_pid_to_str != NULL);
3771 if (gdbarch_debug >= 2)
3772 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_pid_to_str called\n");
3773 return gdbarch->core_pid_to_str (gdbarch, ptid);
3774}
3775
3776void
3777set_gdbarch_core_pid_to_str (struct gdbarch *gdbarch,
3778 gdbarch_core_pid_to_str_ftype core_pid_to_str)
3779{
3780 gdbarch->core_pid_to_str = core_pid_to_str;
3781}
3782
4dfc5dbc
JB
3783int
3784gdbarch_core_thread_name_p (struct gdbarch *gdbarch)
3785{
3786 gdb_assert (gdbarch != NULL);
3787 return gdbarch->core_thread_name != NULL;
3788}
3789
3790const char *
3791gdbarch_core_thread_name (struct gdbarch *gdbarch, struct thread_info *thr)
3792{
3793 gdb_assert (gdbarch != NULL);
3794 gdb_assert (gdbarch->core_thread_name != NULL);
3795 if (gdbarch_debug >= 2)
3796 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_thread_name called\n");
3797 return gdbarch->core_thread_name (gdbarch, thr);
3798}
3799
3800void
3801set_gdbarch_core_thread_name (struct gdbarch *gdbarch,
3802 gdbarch_core_thread_name_ftype core_thread_name)
3803{
3804 gdbarch->core_thread_name = core_thread_name;
3805}
3806
382b69bb
JB
3807int
3808gdbarch_core_xfer_siginfo_p (struct gdbarch *gdbarch)
3809{
3810 gdb_assert (gdbarch != NULL);
3811 return gdbarch->core_xfer_siginfo != NULL;
3812}
3813
3814LONGEST
3815gdbarch_core_xfer_siginfo (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len)
3816{
3817 gdb_assert (gdbarch != NULL);
3818 gdb_assert (gdbarch->core_xfer_siginfo != NULL);
3819 if (gdbarch_debug >= 2)
3820 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_xfer_siginfo called\n");
3821 return gdbarch->core_xfer_siginfo (gdbarch, readbuf, offset, len);
3822}
3823
3824void
3825set_gdbarch_core_xfer_siginfo (struct gdbarch *gdbarch,
3826 gdbarch_core_xfer_siginfo_ftype core_xfer_siginfo)
3827{
3828 gdbarch->core_xfer_siginfo = core_xfer_siginfo;
3829}
3830
a78c2d62
UW
3831int
3832gdbarch_gcore_bfd_target_p (struct gdbarch *gdbarch)
3833{
3834 gdb_assert (gdbarch != NULL);
3835 return gdbarch->gcore_bfd_target != 0;
3836}
3837
3838const char *
3839gdbarch_gcore_bfd_target (struct gdbarch *gdbarch)
3840{
3841 gdb_assert (gdbarch != NULL);
3842 /* Check variable changed from pre-default. */
3843 gdb_assert (gdbarch->gcore_bfd_target != 0);
3844 if (gdbarch_debug >= 2)
3845 fprintf_unfiltered (gdb_stdlog, "gdbarch_gcore_bfd_target called\n");
3846 return gdbarch->gcore_bfd_target;
3847}
3848
3849void
3850set_gdbarch_gcore_bfd_target (struct gdbarch *gdbarch,
3851 const char * gcore_bfd_target)
3852{
3853 gdbarch->gcore_bfd_target = gcore_bfd_target;
3854}
3855
0d5de010
DJ
3856int
3857gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch)
3858{
3859 gdb_assert (gdbarch != NULL);
3860 /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
3861 if (gdbarch_debug >= 2)
3862 fprintf_unfiltered (gdb_stdlog, "gdbarch_vtable_function_descriptors called\n");
3863 return gdbarch->vtable_function_descriptors;
3864}
3865
3866void
3867set_gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch,
3868 int vtable_function_descriptors)
3869{
3870 gdbarch->vtable_function_descriptors = vtable_function_descriptors;
3871}
3872
3873int
3874gdbarch_vbit_in_delta (struct gdbarch *gdbarch)
3875{
3876 gdb_assert (gdbarch != NULL);
3877 /* Skip verify of vbit_in_delta, invalid_p == 0 */
3878 if (gdbarch_debug >= 2)
3879 fprintf_unfiltered (gdb_stdlog, "gdbarch_vbit_in_delta called\n");
3880 return gdbarch->vbit_in_delta;
3881}
3882
3883void
3884set_gdbarch_vbit_in_delta (struct gdbarch *gdbarch,
3885 int vbit_in_delta)
3886{
3887 gdbarch->vbit_in_delta = vbit_in_delta;
3888}
3889
6d350bb5
UW
3890void
3891gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch, struct regcache *regcache)
3892{
3893 gdb_assert (gdbarch != NULL);
3894 gdb_assert (gdbarch->skip_permanent_breakpoint != NULL);
3895 if (gdbarch_debug >= 2)
3896 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_permanent_breakpoint called\n");
3897 gdbarch->skip_permanent_breakpoint (regcache);
3898}
3899
3900void
3901set_gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch,
3902 gdbarch_skip_permanent_breakpoint_ftype skip_permanent_breakpoint)
3903{
3904 gdbarch->skip_permanent_breakpoint = skip_permanent_breakpoint;
3905}
3906
237fc4c9
PA
3907int
3908gdbarch_max_insn_length_p (struct gdbarch *gdbarch)
3909{
3910 gdb_assert (gdbarch != NULL);
3911 return gdbarch->max_insn_length != 0;
3912}
3913
3914ULONGEST
3915gdbarch_max_insn_length (struct gdbarch *gdbarch)
3916{
3917 gdb_assert (gdbarch != NULL);
3918 /* Check variable changed from pre-default. */
3919 gdb_assert (gdbarch->max_insn_length != 0);
3920 if (gdbarch_debug >= 2)
3921 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_insn_length called\n");
3922 return gdbarch->max_insn_length;
3923}
3924
3925void
3926set_gdbarch_max_insn_length (struct gdbarch *gdbarch,
3927 ULONGEST max_insn_length)
3928{
3929 gdbarch->max_insn_length = max_insn_length;
3930}
3931
3932int
3933gdbarch_displaced_step_copy_insn_p (struct gdbarch *gdbarch)
3934{
3935 gdb_assert (gdbarch != NULL);
3936 return gdbarch->displaced_step_copy_insn != NULL;
3937}
3938
3939struct displaced_step_closure *
3940gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch, CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
3941{
3942 gdb_assert (gdbarch != NULL);
3943 gdb_assert (gdbarch->displaced_step_copy_insn != NULL);
3944 if (gdbarch_debug >= 2)
3945 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_copy_insn called\n");
3946 return gdbarch->displaced_step_copy_insn (gdbarch, from, to, regs);
3947}
3948
3949void
3950set_gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch,
3951 gdbarch_displaced_step_copy_insn_ftype displaced_step_copy_insn)
3952{
3953 gdbarch->displaced_step_copy_insn = displaced_step_copy_insn;
3954}
3955
99e40580
UW
3956int
3957gdbarch_displaced_step_hw_singlestep (struct gdbarch *gdbarch, struct displaced_step_closure *closure)
3958{
3959 gdb_assert (gdbarch != NULL);
3960 gdb_assert (gdbarch->displaced_step_hw_singlestep != NULL);
3961 if (gdbarch_debug >= 2)
3962 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_hw_singlestep called\n");
3963 return gdbarch->displaced_step_hw_singlestep (gdbarch, closure);
3964}
3965
3966void
3967set_gdbarch_displaced_step_hw_singlestep (struct gdbarch *gdbarch,
3968 gdbarch_displaced_step_hw_singlestep_ftype displaced_step_hw_singlestep)
3969{
3970 gdbarch->displaced_step_hw_singlestep = displaced_step_hw_singlestep;
3971}
3972
237fc4c9
PA
3973int
3974gdbarch_displaced_step_fixup_p (struct gdbarch *gdbarch)
3975{
3976 gdb_assert (gdbarch != NULL);
3977 return gdbarch->displaced_step_fixup != NULL;
3978}
3979
3980void
3981gdbarch_displaced_step_fixup (struct gdbarch *gdbarch, struct displaced_step_closure *closure, CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
3982{
3983 gdb_assert (gdbarch != NULL);
3984 gdb_assert (gdbarch->displaced_step_fixup != NULL);
3985 /* Do not check predicate: gdbarch->displaced_step_fixup != NULL, allow call. */
3986 if (gdbarch_debug >= 2)
3987 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_fixup called\n");
3988 gdbarch->displaced_step_fixup (gdbarch, closure, from, to, regs);
3989}
3990
3991void
3992set_gdbarch_displaced_step_fixup (struct gdbarch *gdbarch,
3993 gdbarch_displaced_step_fixup_ftype displaced_step_fixup)
3994{
3995 gdbarch->displaced_step_fixup = displaced_step_fixup;
3996}
3997
237fc4c9
PA
3998CORE_ADDR
3999gdbarch_displaced_step_location (struct gdbarch *gdbarch)
4000{
4001 gdb_assert (gdbarch != NULL);
4002 gdb_assert (gdbarch->displaced_step_location != NULL);
4003 if (gdbarch_debug >= 2)
4004 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_location called\n");
4005 return gdbarch->displaced_step_location (gdbarch);
4006}
4007
4008void
4009set_gdbarch_displaced_step_location (struct gdbarch *gdbarch,
4010 gdbarch_displaced_step_location_ftype displaced_step_location)
4011{
4012 gdbarch->displaced_step_location = displaced_step_location;
4013}
4014
dde08ee1
PA
4015int
4016gdbarch_relocate_instruction_p (struct gdbarch *gdbarch)
4017{
4018 gdb_assert (gdbarch != NULL);
4019 return gdbarch->relocate_instruction != NULL;
4020}
4021
4022void
4023gdbarch_relocate_instruction (struct gdbarch *gdbarch, CORE_ADDR *to, CORE_ADDR from)
4024{
4025 gdb_assert (gdbarch != NULL);
4026 gdb_assert (gdbarch->relocate_instruction != NULL);
4027 /* Do not check predicate: gdbarch->relocate_instruction != NULL, allow call. */
4028 if (gdbarch_debug >= 2)
4029 fprintf_unfiltered (gdb_stdlog, "gdbarch_relocate_instruction called\n");
4030 gdbarch->relocate_instruction (gdbarch, to, from);
4031}
4032
4033void
4034set_gdbarch_relocate_instruction (struct gdbarch *gdbarch,
4035 gdbarch_relocate_instruction_ftype relocate_instruction)
4036{
4037 gdbarch->relocate_instruction = relocate_instruction;
4038}
4039
1c772458
UW
4040int
4041gdbarch_overlay_update_p (struct gdbarch *gdbarch)
4042{
4043 gdb_assert (gdbarch != NULL);
4044 return gdbarch->overlay_update != NULL;
4045}
4046
4047void
4048gdbarch_overlay_update (struct gdbarch *gdbarch, struct obj_section *osect)
4049{
4050 gdb_assert (gdbarch != NULL);
4051 gdb_assert (gdbarch->overlay_update != NULL);
4052 if (gdbarch_debug >= 2)
4053 fprintf_unfiltered (gdb_stdlog, "gdbarch_overlay_update called\n");
4054 gdbarch->overlay_update (osect);
4055}
4056
4057void
4058set_gdbarch_overlay_update (struct gdbarch *gdbarch,
4059 gdbarch_overlay_update_ftype overlay_update)
4060{
4061 gdbarch->overlay_update = overlay_update;
4062}
4063
4eb0ad19
DJ
4064int
4065gdbarch_core_read_description_p (struct gdbarch *gdbarch)
4066{
4067 gdb_assert (gdbarch != NULL);
4068 return gdbarch->core_read_description != NULL;
4069}
4070
4071const struct target_desc *
4072gdbarch_core_read_description (struct gdbarch *gdbarch, struct target_ops *target, bfd *abfd)
4073{
4074 gdb_assert (gdbarch != NULL);
4075 gdb_assert (gdbarch->core_read_description != NULL);
4076 if (gdbarch_debug >= 2)
4077 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_read_description called\n");
4078 return gdbarch->core_read_description (gdbarch, target, abfd);
4079}
4080
4081void
4082set_gdbarch_core_read_description (struct gdbarch *gdbarch,
4083 gdbarch_core_read_description_ftype core_read_description)
4084{
4085 gdbarch->core_read_description = core_read_description;
4086}
4087
149ad273
UW
4088int
4089gdbarch_static_transform_name_p (struct gdbarch *gdbarch)
4090{
4091 gdb_assert (gdbarch != NULL);
4092 return gdbarch->static_transform_name != NULL;
4093}
4094
0d5cff50
DE
4095const char *
4096gdbarch_static_transform_name (struct gdbarch *gdbarch, const char *name)
149ad273
UW
4097{
4098 gdb_assert (gdbarch != NULL);
4099 gdb_assert (gdbarch->static_transform_name != NULL);
4100 if (gdbarch_debug >= 2)
4101 fprintf_unfiltered (gdb_stdlog, "gdbarch_static_transform_name called\n");
4102 return gdbarch->static_transform_name (name);
4103}
4104
4105void
4106set_gdbarch_static_transform_name (struct gdbarch *gdbarch,
4107 gdbarch_static_transform_name_ftype static_transform_name)
4108{
4109 gdbarch->static_transform_name = static_transform_name;
4110}
4111
203c3895
UW
4112int
4113gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch)
4114{
4115 gdb_assert (gdbarch != NULL);
4116 /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
4117 if (gdbarch_debug >= 2)
4118 fprintf_unfiltered (gdb_stdlog, "gdbarch_sofun_address_maybe_missing called\n");
4119 return gdbarch->sofun_address_maybe_missing;
4120}
4121
4122void
4123set_gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch,
4124 int sofun_address_maybe_missing)
4125{
4126 gdbarch->sofun_address_maybe_missing = sofun_address_maybe_missing;
4127}
4128
0508c3ec
HZ
4129int
4130gdbarch_process_record_p (struct gdbarch *gdbarch)
4131{
4132 gdb_assert (gdbarch != NULL);
4133 return gdbarch->process_record != NULL;
4134}
4135
4136int
4137gdbarch_process_record (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR addr)
4138{
4139 gdb_assert (gdbarch != NULL);
4140 gdb_assert (gdbarch->process_record != NULL);
4141 if (gdbarch_debug >= 2)
4142 fprintf_unfiltered (gdb_stdlog, "gdbarch_process_record called\n");
4143 return gdbarch->process_record (gdbarch, regcache, addr);
4144}
4145
4146void
4147set_gdbarch_process_record (struct gdbarch *gdbarch,
4148 gdbarch_process_record_ftype process_record)
4149{
4150 gdbarch->process_record = process_record;
4151}
4152
3846b520
HZ
4153int
4154gdbarch_process_record_signal_p (struct gdbarch *gdbarch)
4155{
4156 gdb_assert (gdbarch != NULL);
4157 return gdbarch->process_record_signal != NULL;
4158}
4159
4160int
2ea28649 4161gdbarch_process_record_signal (struct gdbarch *gdbarch, struct regcache *regcache, enum gdb_signal signal)
3846b520
HZ
4162{
4163 gdb_assert (gdbarch != NULL);
4164 gdb_assert (gdbarch->process_record_signal != NULL);
4165 if (gdbarch_debug >= 2)
4166 fprintf_unfiltered (gdb_stdlog, "gdbarch_process_record_signal called\n");
4167 return gdbarch->process_record_signal (gdbarch, regcache, signal);
4168}
4169
4170void
4171set_gdbarch_process_record_signal (struct gdbarch *gdbarch,
4172 gdbarch_process_record_signal_ftype process_record_signal)
4173{
4174 gdbarch->process_record_signal = process_record_signal;
4175}
4176
1f8cf220
PA
4177int
4178gdbarch_gdb_signal_from_target_p (struct gdbarch *gdbarch)
4179{
4180 gdb_assert (gdbarch != NULL);
4181 return gdbarch->gdb_signal_from_target != NULL;
4182}
4183
2ea28649 4184enum gdb_signal
22203bbf 4185gdbarch_gdb_signal_from_target (struct gdbarch *gdbarch, int signo)
1cded358
AR
4186{
4187 gdb_assert (gdbarch != NULL);
22203bbf 4188 gdb_assert (gdbarch->gdb_signal_from_target != NULL);
1cded358 4189 if (gdbarch_debug >= 2)
22203bbf
PA
4190 fprintf_unfiltered (gdb_stdlog, "gdbarch_gdb_signal_from_target called\n");
4191 return gdbarch->gdb_signal_from_target (gdbarch, signo);
1cded358
AR
4192}
4193
4194void
22203bbf
PA
4195set_gdbarch_gdb_signal_from_target (struct gdbarch *gdbarch,
4196 gdbarch_gdb_signal_from_target_ftype gdb_signal_from_target)
1cded358 4197{
22203bbf 4198 gdbarch->gdb_signal_from_target = gdb_signal_from_target;
1cded358
AR
4199}
4200
eb14d406
SDJ
4201int
4202gdbarch_gdb_signal_to_target_p (struct gdbarch *gdbarch)
4203{
4204 gdb_assert (gdbarch != NULL);
4205 return gdbarch->gdb_signal_to_target != NULL;
4206}
4207
4208int
4209gdbarch_gdb_signal_to_target (struct gdbarch *gdbarch, enum gdb_signal signal)
4210{
4211 gdb_assert (gdbarch != NULL);
4212 gdb_assert (gdbarch->gdb_signal_to_target != NULL);
4213 if (gdbarch_debug >= 2)
4214 fprintf_unfiltered (gdb_stdlog, "gdbarch_gdb_signal_to_target called\n");
4215 return gdbarch->gdb_signal_to_target (gdbarch, signal);
4216}
4217
4218void
4219set_gdbarch_gdb_signal_to_target (struct gdbarch *gdbarch,
4220 gdbarch_gdb_signal_to_target_ftype gdb_signal_to_target)
4221{
4222 gdbarch->gdb_signal_to_target = gdb_signal_to_target;
4223}
4224
4aa995e1
PA
4225int
4226gdbarch_get_siginfo_type_p (struct gdbarch *gdbarch)
4227{
4228 gdb_assert (gdbarch != NULL);
4229 return gdbarch->get_siginfo_type != NULL;
4230}
4231
4232struct type *
4233gdbarch_get_siginfo_type (struct gdbarch *gdbarch)
4234{
4235 gdb_assert (gdbarch != NULL);
4236 gdb_assert (gdbarch->get_siginfo_type != NULL);
4237 if (gdbarch_debug >= 2)
4238 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_siginfo_type called\n");
4239 return gdbarch->get_siginfo_type (gdbarch);
4240}
4241
4242void
4243set_gdbarch_get_siginfo_type (struct gdbarch *gdbarch,
4244 gdbarch_get_siginfo_type_ftype get_siginfo_type)
4245{
4246 gdbarch->get_siginfo_type = get_siginfo_type;
4247}
4248
60c5725c
DJ
4249int
4250gdbarch_record_special_symbol_p (struct gdbarch *gdbarch)
4251{
4252 gdb_assert (gdbarch != NULL);
4253 return gdbarch->record_special_symbol != NULL;
4254}
4255
4256void
4257gdbarch_record_special_symbol (struct gdbarch *gdbarch, struct objfile *objfile, asymbol *sym)
4258{
4259 gdb_assert (gdbarch != NULL);
4260 gdb_assert (gdbarch->record_special_symbol != NULL);
4261 if (gdbarch_debug >= 2)
4262 fprintf_unfiltered (gdb_stdlog, "gdbarch_record_special_symbol called\n");
4263 gdbarch->record_special_symbol (gdbarch, objfile, sym);
4264}
4265
4266void
4267set_gdbarch_record_special_symbol (struct gdbarch *gdbarch,
4268 gdbarch_record_special_symbol_ftype record_special_symbol)
4269{
4270 gdbarch->record_special_symbol = record_special_symbol;
4271}
4272
a96d9b2e
SDJ
4273int
4274gdbarch_get_syscall_number_p (struct gdbarch *gdbarch)
4275{
4276 gdb_assert (gdbarch != NULL);
4277 return gdbarch->get_syscall_number != NULL;
4278}
4279
4280LONGEST
4281gdbarch_get_syscall_number (struct gdbarch *gdbarch, ptid_t ptid)
4282{
4283 gdb_assert (gdbarch != NULL);
4284 gdb_assert (gdbarch->get_syscall_number != NULL);
4285 if (gdbarch_debug >= 2)
4286 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_syscall_number called\n");
4287 return gdbarch->get_syscall_number (gdbarch, ptid);
4288}
4289
4290void
4291set_gdbarch_get_syscall_number (struct gdbarch *gdbarch,
4292 gdbarch_get_syscall_number_ftype get_syscall_number)
4293{
4294 gdbarch->get_syscall_number = get_syscall_number;
4295}
4296
458c8db8
SDJ
4297const char *
4298gdbarch_xml_syscall_file (struct gdbarch *gdbarch)
4299{
4300 gdb_assert (gdbarch != NULL);
4301 /* Skip verify of xml_syscall_file, invalid_p == 0 */
4302 if (gdbarch_debug >= 2)
4303 fprintf_unfiltered (gdb_stdlog, "gdbarch_xml_syscall_file called\n");
4304 return gdbarch->xml_syscall_file;
4305}
4306
4307void
4308set_gdbarch_xml_syscall_file (struct gdbarch *gdbarch,
4309 const char * xml_syscall_file)
4310{
4311 gdbarch->xml_syscall_file = xml_syscall_file;
4312}
4313
4314struct syscalls_info *
4315gdbarch_syscalls_info (struct gdbarch *gdbarch)
4316{
4317 gdb_assert (gdbarch != NULL);
4318 /* Skip verify of syscalls_info, invalid_p == 0 */
4319 if (gdbarch_debug >= 2)
4320 fprintf_unfiltered (gdb_stdlog, "gdbarch_syscalls_info called\n");
4321 return gdbarch->syscalls_info;
4322}
4323
4324void
4325set_gdbarch_syscalls_info (struct gdbarch *gdbarch,
4326 struct syscalls_info * syscalls_info)
4327{
4328 gdbarch->syscalls_info = syscalls_info;
4329}
4330
05c0465e
SDJ
4331const char *const *
4332gdbarch_stap_integer_prefixes (struct gdbarch *gdbarch)
55aa24fb
SDJ
4333{
4334 gdb_assert (gdbarch != NULL);
05c0465e 4335 /* Skip verify of stap_integer_prefixes, invalid_p == 0 */
55aa24fb 4336 if (gdbarch_debug >= 2)
05c0465e
SDJ
4337 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_integer_prefixes called\n");
4338 return gdbarch->stap_integer_prefixes;
55aa24fb
SDJ
4339}
4340
4341void
05c0465e
SDJ
4342set_gdbarch_stap_integer_prefixes (struct gdbarch *gdbarch,
4343 const char *const * stap_integer_prefixes)
55aa24fb 4344{
05c0465e 4345 gdbarch->stap_integer_prefixes = stap_integer_prefixes;
55aa24fb
SDJ
4346}
4347
05c0465e
SDJ
4348const char *const *
4349gdbarch_stap_integer_suffixes (struct gdbarch *gdbarch)
55aa24fb
SDJ
4350{
4351 gdb_assert (gdbarch != NULL);
05c0465e 4352 /* Skip verify of stap_integer_suffixes, invalid_p == 0 */
55aa24fb 4353 if (gdbarch_debug >= 2)
05c0465e
SDJ
4354 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_integer_suffixes called\n");
4355 return gdbarch->stap_integer_suffixes;
55aa24fb
SDJ
4356}
4357
4358void
05c0465e
SDJ
4359set_gdbarch_stap_integer_suffixes (struct gdbarch *gdbarch,
4360 const char *const * stap_integer_suffixes)
55aa24fb 4361{
05c0465e 4362 gdbarch->stap_integer_suffixes = stap_integer_suffixes;
55aa24fb
SDJ
4363}
4364
05c0465e
SDJ
4365const char *const *
4366gdbarch_stap_register_prefixes (struct gdbarch *gdbarch)
55aa24fb
SDJ
4367{
4368 gdb_assert (gdbarch != NULL);
05c0465e 4369 /* Skip verify of stap_register_prefixes, invalid_p == 0 */
55aa24fb 4370 if (gdbarch_debug >= 2)
05c0465e
SDJ
4371 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_prefixes called\n");
4372 return gdbarch->stap_register_prefixes;
55aa24fb
SDJ
4373}
4374
4375void
05c0465e
SDJ
4376set_gdbarch_stap_register_prefixes (struct gdbarch *gdbarch,
4377 const char *const * stap_register_prefixes)
55aa24fb 4378{
05c0465e 4379 gdbarch->stap_register_prefixes = stap_register_prefixes;
55aa24fb
SDJ
4380}
4381
05c0465e
SDJ
4382const char *const *
4383gdbarch_stap_register_suffixes (struct gdbarch *gdbarch)
55aa24fb
SDJ
4384{
4385 gdb_assert (gdbarch != NULL);
05c0465e 4386 /* Skip verify of stap_register_suffixes, invalid_p == 0 */
55aa24fb 4387 if (gdbarch_debug >= 2)
05c0465e
SDJ
4388 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_suffixes called\n");
4389 return gdbarch->stap_register_suffixes;
55aa24fb
SDJ
4390}
4391
4392void
05c0465e
SDJ
4393set_gdbarch_stap_register_suffixes (struct gdbarch *gdbarch,
4394 const char *const * stap_register_suffixes)
55aa24fb 4395{
05c0465e 4396 gdbarch->stap_register_suffixes = stap_register_suffixes;
55aa24fb
SDJ
4397}
4398
05c0465e
SDJ
4399const char *const *
4400gdbarch_stap_register_indirection_prefixes (struct gdbarch *gdbarch)
55aa24fb
SDJ
4401{
4402 gdb_assert (gdbarch != NULL);
05c0465e 4403 /* Skip verify of stap_register_indirection_prefixes, invalid_p == 0 */
55aa24fb 4404 if (gdbarch_debug >= 2)
05c0465e
SDJ
4405 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_indirection_prefixes called\n");
4406 return gdbarch->stap_register_indirection_prefixes;
55aa24fb
SDJ
4407}
4408
4409void
05c0465e
SDJ
4410set_gdbarch_stap_register_indirection_prefixes (struct gdbarch *gdbarch,
4411 const char *const * stap_register_indirection_prefixes)
55aa24fb 4412{
05c0465e 4413 gdbarch->stap_register_indirection_prefixes = stap_register_indirection_prefixes;
55aa24fb
SDJ
4414}
4415
05c0465e
SDJ
4416const char *const *
4417gdbarch_stap_register_indirection_suffixes (struct gdbarch *gdbarch)
55aa24fb
SDJ
4418{
4419 gdb_assert (gdbarch != NULL);
05c0465e 4420 /* Skip verify of stap_register_indirection_suffixes, invalid_p == 0 */
55aa24fb 4421 if (gdbarch_debug >= 2)
05c0465e
SDJ
4422 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_indirection_suffixes called\n");
4423 return gdbarch->stap_register_indirection_suffixes;
55aa24fb
SDJ
4424}
4425
4426void
05c0465e
SDJ
4427set_gdbarch_stap_register_indirection_suffixes (struct gdbarch *gdbarch,
4428 const char *const * stap_register_indirection_suffixes)
55aa24fb 4429{
05c0465e 4430 gdbarch->stap_register_indirection_suffixes = stap_register_indirection_suffixes;
55aa24fb
SDJ
4431}
4432
4433const char *
4434gdbarch_stap_gdb_register_prefix (struct gdbarch *gdbarch)
4435{
4436 gdb_assert (gdbarch != NULL);
4437 /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */
4438 if (gdbarch_debug >= 2)
4439 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_gdb_register_prefix called\n");
4440 return gdbarch->stap_gdb_register_prefix;
4441}
4442
4443void
4444set_gdbarch_stap_gdb_register_prefix (struct gdbarch *gdbarch,
4445 const char * stap_gdb_register_prefix)
4446{
4447 gdbarch->stap_gdb_register_prefix = stap_gdb_register_prefix;
4448}
4449
4450const char *
4451gdbarch_stap_gdb_register_suffix (struct gdbarch *gdbarch)
4452{
4453 gdb_assert (gdbarch != NULL);
4454 /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */
4455 if (gdbarch_debug >= 2)
4456 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_gdb_register_suffix called\n");
4457 return gdbarch->stap_gdb_register_suffix;
4458}
4459
4460void
4461set_gdbarch_stap_gdb_register_suffix (struct gdbarch *gdbarch,
4462 const char * stap_gdb_register_suffix)
4463{
4464 gdbarch->stap_gdb_register_suffix = stap_gdb_register_suffix;
4465}
4466
4467int
4468gdbarch_stap_is_single_operand_p (struct gdbarch *gdbarch)
4469{
4470 gdb_assert (gdbarch != NULL);
4471 return gdbarch->stap_is_single_operand != NULL;
4472}
4473
4474int
4475gdbarch_stap_is_single_operand (struct gdbarch *gdbarch, const char *s)
4476{
4477 gdb_assert (gdbarch != NULL);
4478 gdb_assert (gdbarch->stap_is_single_operand != NULL);
4479 if (gdbarch_debug >= 2)
4480 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_is_single_operand called\n");
4481 return gdbarch->stap_is_single_operand (gdbarch, s);
4482}
4483
4484void
4485set_gdbarch_stap_is_single_operand (struct gdbarch *gdbarch,
4486 gdbarch_stap_is_single_operand_ftype stap_is_single_operand)
4487{
4488 gdbarch->stap_is_single_operand = stap_is_single_operand;
4489}
4490
4491int
4492gdbarch_stap_parse_special_token_p (struct gdbarch *gdbarch)
4493{
4494 gdb_assert (gdbarch != NULL);
4495 return gdbarch->stap_parse_special_token != NULL;
4496}
4497
4498int
4499gdbarch_stap_parse_special_token (struct gdbarch *gdbarch, struct stap_parse_info *p)
4500{
4501 gdb_assert (gdbarch != NULL);
4502 gdb_assert (gdbarch->stap_parse_special_token != NULL);
4503 if (gdbarch_debug >= 2)
4504 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_parse_special_token called\n");
4505 return gdbarch->stap_parse_special_token (gdbarch, p);
4506}
4507
4508void
4509set_gdbarch_stap_parse_special_token (struct gdbarch *gdbarch,
4510 gdbarch_stap_parse_special_token_ftype stap_parse_special_token)
4511{
4512 gdbarch->stap_parse_special_token = stap_parse_special_token;
4513}
4514
8b367e17
JM
4515int
4516gdbarch_dtrace_parse_probe_argument_p (struct gdbarch *gdbarch)
4517{
4518 gdb_assert (gdbarch != NULL);
4519 return gdbarch->dtrace_parse_probe_argument != NULL;
4520}
4521
4522void
4523gdbarch_dtrace_parse_probe_argument (struct gdbarch *gdbarch, struct parser_state *pstate, int narg)
4524{
4525 gdb_assert (gdbarch != NULL);
4526 gdb_assert (gdbarch->dtrace_parse_probe_argument != NULL);
4527 if (gdbarch_debug >= 2)
4528 fprintf_unfiltered (gdb_stdlog, "gdbarch_dtrace_parse_probe_argument called\n");
4529 gdbarch->dtrace_parse_probe_argument (gdbarch, pstate, narg);
4530}
4531
4532void
4533set_gdbarch_dtrace_parse_probe_argument (struct gdbarch *gdbarch,
4534 gdbarch_dtrace_parse_probe_argument_ftype dtrace_parse_probe_argument)
4535{
4536 gdbarch->dtrace_parse_probe_argument = dtrace_parse_probe_argument;
4537}
4538
4539int
4540gdbarch_dtrace_probe_is_enabled_p (struct gdbarch *gdbarch)
4541{
4542 gdb_assert (gdbarch != NULL);
4543 return gdbarch->dtrace_probe_is_enabled != NULL;
4544}
4545
4546int
4547gdbarch_dtrace_probe_is_enabled (struct gdbarch *gdbarch, CORE_ADDR addr)
4548{
4549 gdb_assert (gdbarch != NULL);
4550 gdb_assert (gdbarch->dtrace_probe_is_enabled != NULL);
4551 if (gdbarch_debug >= 2)
4552 fprintf_unfiltered (gdb_stdlog, "gdbarch_dtrace_probe_is_enabled called\n");
4553 return gdbarch->dtrace_probe_is_enabled (gdbarch, addr);
4554}
4555
4556void
4557set_gdbarch_dtrace_probe_is_enabled (struct gdbarch *gdbarch,
4558 gdbarch_dtrace_probe_is_enabled_ftype dtrace_probe_is_enabled)
4559{
4560 gdbarch->dtrace_probe_is_enabled = dtrace_probe_is_enabled;
4561}
4562
4563int
4564gdbarch_dtrace_enable_probe_p (struct gdbarch *gdbarch)
4565{
4566 gdb_assert (gdbarch != NULL);
4567 return gdbarch->dtrace_enable_probe != NULL;
4568}
4569
4570void
4571gdbarch_dtrace_enable_probe (struct gdbarch *gdbarch, CORE_ADDR addr)
4572{
4573 gdb_assert (gdbarch != NULL);
4574 gdb_assert (gdbarch->dtrace_enable_probe != NULL);
4575 if (gdbarch_debug >= 2)
4576 fprintf_unfiltered (gdb_stdlog, "gdbarch_dtrace_enable_probe called\n");
4577 gdbarch->dtrace_enable_probe (gdbarch, addr);
4578}
4579
4580void
4581set_gdbarch_dtrace_enable_probe (struct gdbarch *gdbarch,
4582 gdbarch_dtrace_enable_probe_ftype dtrace_enable_probe)
4583{
4584 gdbarch->dtrace_enable_probe = dtrace_enable_probe;
4585}
4586
4587int
4588gdbarch_dtrace_disable_probe_p (struct gdbarch *gdbarch)
4589{
4590 gdb_assert (gdbarch != NULL);
4591 return gdbarch->dtrace_disable_probe != NULL;
4592}
4593
4594void
4595gdbarch_dtrace_disable_probe (struct gdbarch *gdbarch, CORE_ADDR addr)
4596{
4597 gdb_assert (gdbarch != NULL);
4598 gdb_assert (gdbarch->dtrace_disable_probe != NULL);
4599 if (gdbarch_debug >= 2)
4600 fprintf_unfiltered (gdb_stdlog, "gdbarch_dtrace_disable_probe called\n");
4601 gdbarch->dtrace_disable_probe (gdbarch, addr);
4602}
4603
4604void
4605set_gdbarch_dtrace_disable_probe (struct gdbarch *gdbarch,
4606 gdbarch_dtrace_disable_probe_ftype dtrace_disable_probe)
4607{
4608 gdbarch->dtrace_disable_probe = dtrace_disable_probe;
4609}
4610
50c71eaf
PA
4611int
4612gdbarch_has_global_solist (struct gdbarch *gdbarch)
4613{
4614 gdb_assert (gdbarch != NULL);
4615 /* Skip verify of has_global_solist, invalid_p == 0 */
4616 if (gdbarch_debug >= 2)
4617 fprintf_unfiltered (gdb_stdlog, "gdbarch_has_global_solist called\n");
4618 return gdbarch->has_global_solist;
4619}
4620
4621void
4622set_gdbarch_has_global_solist (struct gdbarch *gdbarch,
4623 int has_global_solist)
4624{
4625 gdbarch->has_global_solist = has_global_solist;
4626}
4627
2567c7d9
PA
4628int
4629gdbarch_has_global_breakpoints (struct gdbarch *gdbarch)
4630{
4631 gdb_assert (gdbarch != NULL);
4632 /* Skip verify of has_global_breakpoints, invalid_p == 0 */
4633 if (gdbarch_debug >= 2)
4634 fprintf_unfiltered (gdb_stdlog, "gdbarch_has_global_breakpoints called\n");
4635 return gdbarch->has_global_breakpoints;
4636}
4637
4638void
4639set_gdbarch_has_global_breakpoints (struct gdbarch *gdbarch,
4640 int has_global_breakpoints)
4641{
4642 gdbarch->has_global_breakpoints = has_global_breakpoints;
4643}
4644
6c95b8df
PA
4645int
4646gdbarch_has_shared_address_space (struct gdbarch *gdbarch)
4647{
4648 gdb_assert (gdbarch != NULL);
4649 gdb_assert (gdbarch->has_shared_address_space != NULL);
4650 if (gdbarch_debug >= 2)
4651 fprintf_unfiltered (gdb_stdlog, "gdbarch_has_shared_address_space called\n");
4652 return gdbarch->has_shared_address_space (gdbarch);
4653}
4654
4655void
4656set_gdbarch_has_shared_address_space (struct gdbarch *gdbarch,
4657 gdbarch_has_shared_address_space_ftype has_shared_address_space)
4658{
4659 gdbarch->has_shared_address_space = has_shared_address_space;
4660}
4661
7a697b8d 4662int
6b940e6a 4663gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch, CORE_ADDR addr, char **msg)
7a697b8d
SS
4664{
4665 gdb_assert (gdbarch != NULL);
4666 gdb_assert (gdbarch->fast_tracepoint_valid_at != NULL);
4667 if (gdbarch_debug >= 2)
4668 fprintf_unfiltered (gdb_stdlog, "gdbarch_fast_tracepoint_valid_at called\n");
6b940e6a 4669 return gdbarch->fast_tracepoint_valid_at (gdbarch, addr, msg);
7a697b8d
SS
4670}
4671
4672void
4673set_gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch,
4674 gdbarch_fast_tracepoint_valid_at_ftype fast_tracepoint_valid_at)
4675{
4676 gdbarch->fast_tracepoint_valid_at = fast_tracepoint_valid_at;
4677}
4678
5f034a78
MK
4679void
4680gdbarch_guess_tracepoint_registers (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR addr)
4681{
4682 gdb_assert (gdbarch != NULL);
4683 gdb_assert (gdbarch->guess_tracepoint_registers != NULL);
4684 if (gdbarch_debug >= 2)
4685 fprintf_unfiltered (gdb_stdlog, "gdbarch_guess_tracepoint_registers called\n");
4686 gdbarch->guess_tracepoint_registers (gdbarch, regcache, addr);
4687}
4688
4689void
4690set_gdbarch_guess_tracepoint_registers (struct gdbarch *gdbarch,
4691 gdbarch_guess_tracepoint_registers_ftype guess_tracepoint_registers)
4692{
4693 gdbarch->guess_tracepoint_registers = guess_tracepoint_registers;
4694}
4695
f870a310
TT
4696const char *
4697gdbarch_auto_charset (struct gdbarch *gdbarch)
4698{
4699 gdb_assert (gdbarch != NULL);
4700 gdb_assert (gdbarch->auto_charset != NULL);
4701 if (gdbarch_debug >= 2)
4702 fprintf_unfiltered (gdb_stdlog, "gdbarch_auto_charset called\n");
4703 return gdbarch->auto_charset ();
4704}
4705
4706void
4707set_gdbarch_auto_charset (struct gdbarch *gdbarch,
4708 gdbarch_auto_charset_ftype auto_charset)
4709{
4710 gdbarch->auto_charset = auto_charset;
4711}
4712
4713const char *
4714gdbarch_auto_wide_charset (struct gdbarch *gdbarch)
4715{
4716 gdb_assert (gdbarch != NULL);
4717 gdb_assert (gdbarch->auto_wide_charset != NULL);
4718 if (gdbarch_debug >= 2)
4719 fprintf_unfiltered (gdb_stdlog, "gdbarch_auto_wide_charset called\n");
4720 return gdbarch->auto_wide_charset ();
4721}
4722
4723void
4724set_gdbarch_auto_wide_charset (struct gdbarch *gdbarch,
4725 gdbarch_auto_wide_charset_ftype auto_wide_charset)
4726{
4727 gdbarch->auto_wide_charset = auto_wide_charset;
4728}
4729
08105857
PA
4730const char *
4731gdbarch_solib_symbols_extension (struct gdbarch *gdbarch)
4732{
4733 gdb_assert (gdbarch != NULL);
4734 if (gdbarch_debug >= 2)
4735 fprintf_unfiltered (gdb_stdlog, "gdbarch_solib_symbols_extension called\n");
4736 return gdbarch->solib_symbols_extension;
4737}
4738
4739void
4740set_gdbarch_solib_symbols_extension (struct gdbarch *gdbarch,
4741 const char * solib_symbols_extension)
4742{
4743 gdbarch->solib_symbols_extension = solib_symbols_extension;
4744}
4745
ab38a727
PA
4746int
4747gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch)
4748{
4749 gdb_assert (gdbarch != NULL);
4750 /* Skip verify of has_dos_based_file_system, invalid_p == 0 */
4751 if (gdbarch_debug >= 2)
4752 fprintf_unfiltered (gdb_stdlog, "gdbarch_has_dos_based_file_system called\n");
4753 return gdbarch->has_dos_based_file_system;
4754}
4755
4756void
4757set_gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch,
4758 int has_dos_based_file_system)
4759{
4760 gdbarch->has_dos_based_file_system = has_dos_based_file_system;
4761}
4762
6710bf39
SS
4763void
4764gdbarch_gen_return_address (struct gdbarch *gdbarch, struct agent_expr *ax, struct axs_value *value, CORE_ADDR scope)
4765{
4766 gdb_assert (gdbarch != NULL);
4767 gdb_assert (gdbarch->gen_return_address != NULL);
4768 if (gdbarch_debug >= 2)
4769 fprintf_unfiltered (gdb_stdlog, "gdbarch_gen_return_address called\n");
4770 gdbarch->gen_return_address (gdbarch, ax, value, scope);
4771}
4772
4773void
4774set_gdbarch_gen_return_address (struct gdbarch *gdbarch,
4775 gdbarch_gen_return_address_ftype gen_return_address)
4776{
4777 gdbarch->gen_return_address = gen_return_address;
4778}
4779
3030c96e
UW
4780int
4781gdbarch_info_proc_p (struct gdbarch *gdbarch)
4782{
4783 gdb_assert (gdbarch != NULL);
4784 return gdbarch->info_proc != NULL;
4785}
4786
4787void
7bc112c1 4788gdbarch_info_proc (struct gdbarch *gdbarch, const char *args, enum info_proc_what what)
3030c96e
UW
4789{
4790 gdb_assert (gdbarch != NULL);
4791 gdb_assert (gdbarch->info_proc != NULL);
4792 if (gdbarch_debug >= 2)
4793 fprintf_unfiltered (gdb_stdlog, "gdbarch_info_proc called\n");
4794 gdbarch->info_proc (gdbarch, args, what);
4795}
4796
4797void
4798set_gdbarch_info_proc (struct gdbarch *gdbarch,
4799 gdbarch_info_proc_ftype info_proc)
4800{
4801 gdbarch->info_proc = info_proc;
4802}
4803
451b7c33
TT
4804int
4805gdbarch_core_info_proc_p (struct gdbarch *gdbarch)
4806{
4807 gdb_assert (gdbarch != NULL);
4808 return gdbarch->core_info_proc != NULL;
4809}
4810
4811void
7bc112c1 4812gdbarch_core_info_proc (struct gdbarch *gdbarch, const char *args, enum info_proc_what what)
451b7c33
TT
4813{
4814 gdb_assert (gdbarch != NULL);
4815 gdb_assert (gdbarch->core_info_proc != NULL);
4816 if (gdbarch_debug >= 2)
4817 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_info_proc called\n");
4818 gdbarch->core_info_proc (gdbarch, args, what);
4819}
4820
4821void
4822set_gdbarch_core_info_proc (struct gdbarch *gdbarch,
4823 gdbarch_core_info_proc_ftype core_info_proc)
4824{
4825 gdbarch->core_info_proc = core_info_proc;
4826}
4827
19630284
JB
4828void
4829gdbarch_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)
4830{
4831 gdb_assert (gdbarch != NULL);
4832 gdb_assert (gdbarch->iterate_over_objfiles_in_search_order != NULL);
4833 if (gdbarch_debug >= 2)
4834 fprintf_unfiltered (gdb_stdlog, "gdbarch_iterate_over_objfiles_in_search_order called\n");
4835 gdbarch->iterate_over_objfiles_in_search_order (gdbarch, cb, cb_data, current_objfile);
4836}
4837
4838void
4839set_gdbarch_iterate_over_objfiles_in_search_order (struct gdbarch *gdbarch,
4840 gdbarch_iterate_over_objfiles_in_search_order_ftype iterate_over_objfiles_in_search_order)
4841{
4842 gdbarch->iterate_over_objfiles_in_search_order = iterate_over_objfiles_in_search_order;
4843}
4844
7e35103a
JB
4845struct ravenscar_arch_ops *
4846gdbarch_ravenscar_ops (struct gdbarch *gdbarch)
4847{
4848 gdb_assert (gdbarch != NULL);
4849 /* Skip verify of ravenscar_ops, invalid_p == 0 */
4850 if (gdbarch_debug >= 2)
4851 fprintf_unfiltered (gdb_stdlog, "gdbarch_ravenscar_ops called\n");
4852 return gdbarch->ravenscar_ops;
4853}
4854
4855void
4856set_gdbarch_ravenscar_ops (struct gdbarch *gdbarch,
4857 struct ravenscar_arch_ops * ravenscar_ops)
4858{
4859 gdbarch->ravenscar_ops = ravenscar_ops;
4860}
4861
c2170eef
MM
4862int
4863gdbarch_insn_is_call (struct gdbarch *gdbarch, CORE_ADDR addr)
4864{
4865 gdb_assert (gdbarch != NULL);
4866 gdb_assert (gdbarch->insn_is_call != NULL);
4867 if (gdbarch_debug >= 2)
4868 fprintf_unfiltered (gdb_stdlog, "gdbarch_insn_is_call called\n");
4869 return gdbarch->insn_is_call (gdbarch, addr);
4870}
4871
4872void
4873set_gdbarch_insn_is_call (struct gdbarch *gdbarch,
4874 gdbarch_insn_is_call_ftype insn_is_call)
4875{
4876 gdbarch->insn_is_call = insn_is_call;
4877}
4878
4879int
4880gdbarch_insn_is_ret (struct gdbarch *gdbarch, CORE_ADDR addr)
4881{
4882 gdb_assert (gdbarch != NULL);
4883 gdb_assert (gdbarch->insn_is_ret != NULL);
4884 if (gdbarch_debug >= 2)
4885 fprintf_unfiltered (gdb_stdlog, "gdbarch_insn_is_ret called\n");
4886 return gdbarch->insn_is_ret (gdbarch, addr);
4887}
4888
4889void
4890set_gdbarch_insn_is_ret (struct gdbarch *gdbarch,
4891 gdbarch_insn_is_ret_ftype insn_is_ret)
4892{
4893 gdbarch->insn_is_ret = insn_is_ret;
4894}
4895
4896int
4897gdbarch_insn_is_jump (struct gdbarch *gdbarch, CORE_ADDR addr)
4898{
4899 gdb_assert (gdbarch != NULL);
4900 gdb_assert (gdbarch->insn_is_jump != NULL);
4901 if (gdbarch_debug >= 2)
4902 fprintf_unfiltered (gdb_stdlog, "gdbarch_insn_is_jump called\n");
4903 return gdbarch->insn_is_jump (gdbarch, addr);
4904}
4905
4906void
4907set_gdbarch_insn_is_jump (struct gdbarch *gdbarch,
4908 gdbarch_insn_is_jump_ftype insn_is_jump)
4909{
4910 gdbarch->insn_is_jump = insn_is_jump;
4911}
4912
27a48a92
MK
4913int
4914gdbarch_auxv_parse_p (struct gdbarch *gdbarch)
4915{
4916 gdb_assert (gdbarch != NULL);
4917 return gdbarch->auxv_parse != NULL;
4918}
4919
4920int
4921gdbarch_auxv_parse (struct gdbarch *gdbarch, gdb_byte **readptr, gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp)
4922{
4923 gdb_assert (gdbarch != NULL);
4924 gdb_assert (gdbarch->auxv_parse != NULL);
4925 if (gdbarch_debug >= 2)
4926 fprintf_unfiltered (gdb_stdlog, "gdbarch_auxv_parse called\n");
4927 return gdbarch->auxv_parse (gdbarch, readptr, endptr, typep, valp);
4928}
4929
4930void
4931set_gdbarch_auxv_parse (struct gdbarch *gdbarch,
4932 gdbarch_auxv_parse_ftype auxv_parse)
4933{
4934 gdbarch->auxv_parse = auxv_parse;
4935}
4936
2faa3447
JB
4937void
4938gdbarch_print_auxv_entry (struct gdbarch *gdbarch, struct ui_file *file, CORE_ADDR type, CORE_ADDR val)
4939{
4940 gdb_assert (gdbarch != NULL);
4941 gdb_assert (gdbarch->print_auxv_entry != NULL);
4942 if (gdbarch_debug >= 2)
4943 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_auxv_entry called\n");
4944 gdbarch->print_auxv_entry (gdbarch, file, type, val);
4945}
4946
4947void
4948set_gdbarch_print_auxv_entry (struct gdbarch *gdbarch,
4949 gdbarch_print_auxv_entry_ftype print_auxv_entry)
4950{
4951 gdbarch->print_auxv_entry = print_auxv_entry;
4952}
4953
3437254d
PA
4954int
4955gdbarch_vsyscall_range (struct gdbarch *gdbarch, struct mem_range *range)
4956{
4957 gdb_assert (gdbarch != NULL);
4958 gdb_assert (gdbarch->vsyscall_range != NULL);
4959 if (gdbarch_debug >= 2)
4960 fprintf_unfiltered (gdb_stdlog, "gdbarch_vsyscall_range called\n");
4961 return gdbarch->vsyscall_range (gdbarch, range);
4962}
4963
4964void
4965set_gdbarch_vsyscall_range (struct gdbarch *gdbarch,
4966 gdbarch_vsyscall_range_ftype vsyscall_range)
4967{
4968 gdbarch->vsyscall_range = vsyscall_range;
4969}
4970
f208eee0
JK
4971CORE_ADDR
4972gdbarch_infcall_mmap (struct gdbarch *gdbarch, CORE_ADDR size, unsigned prot)
4973{
4974 gdb_assert (gdbarch != NULL);
4975 gdb_assert (gdbarch->infcall_mmap != NULL);
4976 if (gdbarch_debug >= 2)
4977 fprintf_unfiltered (gdb_stdlog, "gdbarch_infcall_mmap called\n");
4978 return gdbarch->infcall_mmap (size, prot);
4979}
4980
4981void
4982set_gdbarch_infcall_mmap (struct gdbarch *gdbarch,
4983 gdbarch_infcall_mmap_ftype infcall_mmap)
4984{
4985 gdbarch->infcall_mmap = infcall_mmap;
4986}
4987
7f361056
JK
4988void
4989gdbarch_infcall_munmap (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR size)
4990{
4991 gdb_assert (gdbarch != NULL);
4992 gdb_assert (gdbarch->infcall_munmap != NULL);
4993 if (gdbarch_debug >= 2)
4994 fprintf_unfiltered (gdb_stdlog, "gdbarch_infcall_munmap called\n");
4995 gdbarch->infcall_munmap (addr, size);
4996}
4997
4998void
4999set_gdbarch_infcall_munmap (struct gdbarch *gdbarch,
5000 gdbarch_infcall_munmap_ftype infcall_munmap)
5001{
5002 gdbarch->infcall_munmap = infcall_munmap;
5003}
5004
f208eee0
JK
5005char *
5006gdbarch_gcc_target_options (struct gdbarch *gdbarch)
5007{
5008 gdb_assert (gdbarch != NULL);
5009 gdb_assert (gdbarch->gcc_target_options != NULL);
5010 if (gdbarch_debug >= 2)
5011 fprintf_unfiltered (gdb_stdlog, "gdbarch_gcc_target_options called\n");
5012 return gdbarch->gcc_target_options (gdbarch);
5013}
5014
5015void
5016set_gdbarch_gcc_target_options (struct gdbarch *gdbarch,
5017 gdbarch_gcc_target_options_ftype gcc_target_options)
5018{
5019 gdbarch->gcc_target_options = gcc_target_options;
5020}
5021
ac04f72b
TT
5022const char *
5023gdbarch_gnu_triplet_regexp (struct gdbarch *gdbarch)
5024{
5025 gdb_assert (gdbarch != NULL);
5026 gdb_assert (gdbarch->gnu_triplet_regexp != NULL);
5027 if (gdbarch_debug >= 2)
5028 fprintf_unfiltered (gdb_stdlog, "gdbarch_gnu_triplet_regexp called\n");
5029 return gdbarch->gnu_triplet_regexp (gdbarch);
5030}
5031
5032void
5033set_gdbarch_gnu_triplet_regexp (struct gdbarch *gdbarch,
5034 gdbarch_gnu_triplet_regexp_ftype gnu_triplet_regexp)
5035{
5036 gdbarch->gnu_triplet_regexp = gnu_triplet_regexp;
5037}
5038
3374165f
SM
5039int
5040gdbarch_addressable_memory_unit_size (struct gdbarch *gdbarch)
5041{
5042 gdb_assert (gdbarch != NULL);
5043 gdb_assert (gdbarch->addressable_memory_unit_size != NULL);
5044 if (gdbarch_debug >= 2)
5045 fprintf_unfiltered (gdb_stdlog, "gdbarch_addressable_memory_unit_size called\n");
5046 return gdbarch->addressable_memory_unit_size (gdbarch);
5047}
5048
5049void
5050set_gdbarch_addressable_memory_unit_size (struct gdbarch *gdbarch,
5051 gdbarch_addressable_memory_unit_size_ftype addressable_memory_unit_size)
5052{
5053 gdbarch->addressable_memory_unit_size = addressable_memory_unit_size;
5054}
5055
65b48a81
PB
5056char **
5057gdbarch_disassembler_options (struct gdbarch *gdbarch)
5058{
5059 gdb_assert (gdbarch != NULL);
5060 /* Skip verify of disassembler_options, invalid_p == 0 */
5061 if (gdbarch_debug >= 2)
5062 fprintf_unfiltered (gdb_stdlog, "gdbarch_disassembler_options called\n");
5063 return gdbarch->disassembler_options;
5064}
5065
5066void
5067set_gdbarch_disassembler_options (struct gdbarch *gdbarch,
5068 char ** disassembler_options)
5069{
5070 gdbarch->disassembler_options = disassembler_options;
5071}
5072
5073const disasm_options_t *
5074gdbarch_valid_disassembler_options (struct gdbarch *gdbarch)
5075{
5076 gdb_assert (gdbarch != NULL);
5077 /* Skip verify of valid_disassembler_options, invalid_p == 0 */
5078 if (gdbarch_debug >= 2)
5079 fprintf_unfiltered (gdb_stdlog, "gdbarch_valid_disassembler_options called\n");
5080 return gdbarch->valid_disassembler_options;
5081}
5082
5083void
5084set_gdbarch_valid_disassembler_options (struct gdbarch *gdbarch,
5085 const disasm_options_t * valid_disassembler_options)
5086{
5087 gdbarch->valid_disassembler_options = valid_disassembler_options;
5088}
5089
0f71a2f6 5090
be5a57e1 5091/* Keep a registry of per-architecture data-pointers required by GDB
0963b4bd 5092 modules. */
0f71a2f6
JM
5093
5094struct gdbarch_data
5095{
95160752 5096 unsigned index;
76860b5f 5097 int init_p;
030f20e1
AC
5098 gdbarch_data_pre_init_ftype *pre_init;
5099 gdbarch_data_post_init_ftype *post_init;
0f71a2f6
JM
5100};
5101
5102struct gdbarch_data_registration
adf40b2e 5103{
adf40b2e
JM
5104 struct gdbarch_data *data;
5105 struct gdbarch_data_registration *next;
5106};
0f71a2f6 5107
be5a57e1 5108struct gdbarch_data_registry
adf40b2e 5109{
95160752 5110 unsigned nr;
adf40b2e
JM
5111 struct gdbarch_data_registration *registrations;
5112};
0f71a2f6 5113
be5a57e1 5114struct gdbarch_data_registry gdbarch_data_registry =
0f71a2f6
JM
5115{
5116 0, NULL,
5117};
5118
030f20e1
AC
5119static struct gdbarch_data *
5120gdbarch_data_register (gdbarch_data_pre_init_ftype *pre_init,
5121 gdbarch_data_post_init_ftype *post_init)
0f71a2f6
JM
5122{
5123 struct gdbarch_data_registration **curr;
05c547f6
MS
5124
5125 /* Append the new registration. */
be5a57e1 5126 for (curr = &gdbarch_data_registry.registrations;
0f71a2f6
JM
5127 (*curr) != NULL;
5128 curr = &(*curr)->next);
70ba0933 5129 (*curr) = XNEW (struct gdbarch_data_registration);
0f71a2f6 5130 (*curr)->next = NULL;
70ba0933 5131 (*curr)->data = XNEW (struct gdbarch_data);
be5a57e1 5132 (*curr)->data->index = gdbarch_data_registry.nr++;
030f20e1
AC
5133 (*curr)->data->pre_init = pre_init;
5134 (*curr)->data->post_init = post_init;
76860b5f 5135 (*curr)->data->init_p = 1;
0f71a2f6
JM
5136 return (*curr)->data;
5137}
5138
030f20e1
AC
5139struct gdbarch_data *
5140gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype *pre_init)
5141{
5142 return gdbarch_data_register (pre_init, NULL);
5143}
5144
5145struct gdbarch_data *
5146gdbarch_data_register_post_init (gdbarch_data_post_init_ftype *post_init)
5147{
5148 return gdbarch_data_register (NULL, post_init);
5149}
0f71a2f6 5150
0963b4bd 5151/* Create/delete the gdbarch data vector. */
95160752
AC
5152
5153static void
b3cc3077 5154alloc_gdbarch_data (struct gdbarch *gdbarch)
95160752 5155{
b3cc3077
JB
5156 gdb_assert (gdbarch->data == NULL);
5157 gdbarch->nr_data = gdbarch_data_registry.nr;
aebd7893 5158 gdbarch->data = GDBARCH_OBSTACK_CALLOC (gdbarch, gdbarch->nr_data, void *);
0f71a2f6
JM
5159}
5160
76860b5f 5161/* Initialize the current value of the specified per-architecture
0963b4bd 5162 data-pointer. */
b3cc3077 5163
95160752 5164void
030f20e1
AC
5165deprecated_set_gdbarch_data (struct gdbarch *gdbarch,
5166 struct gdbarch_data *data,
5167 void *pointer)
95160752
AC
5168{
5169 gdb_assert (data->index < gdbarch->nr_data);
aebd7893 5170 gdb_assert (gdbarch->data[data->index] == NULL);
030f20e1 5171 gdb_assert (data->pre_init == NULL);
95160752
AC
5172 gdbarch->data[data->index] = pointer;
5173}
5174
0f71a2f6 5175/* Return the current value of the specified per-architecture
0963b4bd 5176 data-pointer. */
0f71a2f6
JM
5177
5178void *
451fbdda 5179gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
0f71a2f6 5180{
451fbdda 5181 gdb_assert (data->index < gdbarch->nr_data);
030f20e1 5182 if (gdbarch->data[data->index] == NULL)
76860b5f 5183 {
030f20e1
AC
5184 /* The data-pointer isn't initialized, call init() to get a
5185 value. */
5186 if (data->pre_init != NULL)
5187 /* Mid architecture creation: pass just the obstack, and not
5188 the entire architecture, as that way it isn't possible for
5189 pre-init code to refer to undefined architecture
5190 fields. */
5191 gdbarch->data[data->index] = data->pre_init (gdbarch->obstack);
5192 else if (gdbarch->initialized_p
5193 && data->post_init != NULL)
5194 /* Post architecture creation: pass the entire architecture
5195 (as all fields are valid), but be careful to also detect
5196 recursive references. */
5197 {
5198 gdb_assert (data->init_p);
5199 data->init_p = 0;
5200 gdbarch->data[data->index] = data->post_init (gdbarch);
5201 data->init_p = 1;
5202 }
5203 else
5204 /* The architecture initialization hasn't completed - punt -
5205 hope that the caller knows what they are doing. Once
5206 deprecated_set_gdbarch_data has been initialized, this can be
5207 changed to an internal error. */
5208 return NULL;
76860b5f
AC
5209 gdb_assert (gdbarch->data[data->index] != NULL);
5210 }
451fbdda 5211 return gdbarch->data[data->index];
0f71a2f6
JM
5212}
5213
5214
0963b4bd 5215/* Keep a registry of the architectures known by GDB. */
0f71a2f6 5216
4b9b3959 5217struct gdbarch_registration
0f71a2f6
JM
5218{
5219 enum bfd_architecture bfd_architecture;
5220 gdbarch_init_ftype *init;
4b9b3959 5221 gdbarch_dump_tdep_ftype *dump_tdep;
0f71a2f6 5222 struct gdbarch_list *arches;
4b9b3959 5223 struct gdbarch_registration *next;
0f71a2f6
JM
5224};
5225
be5a57e1 5226static struct gdbarch_registration *gdbarch_registry = NULL;
0f71a2f6 5227
b4a20239
AC
5228static void
5229append_name (const char ***buf, int *nr, const char *name)
5230{
1dc7a623 5231 *buf = XRESIZEVEC (const char *, *buf, *nr + 1);
b4a20239
AC
5232 (*buf)[*nr] = name;
5233 *nr += 1;
5234}
5235
5236const char **
5237gdbarch_printable_names (void)
5238{
7996bcec 5239 /* Accumulate a list of names based on the registed list of
0963b4bd 5240 architectures. */
7996bcec
AC
5241 int nr_arches = 0;
5242 const char **arches = NULL;
5243 struct gdbarch_registration *rego;
05c547f6 5244
7996bcec
AC
5245 for (rego = gdbarch_registry;
5246 rego != NULL;
5247 rego = rego->next)
b4a20239 5248 {
7996bcec
AC
5249 const struct bfd_arch_info *ap;
5250 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
5251 if (ap == NULL)
5252 internal_error (__FILE__, __LINE__,
e2e0b3e5 5253 _("gdbarch_architecture_names: multi-arch unknown"));
7996bcec
AC
5254 do
5255 {
5256 append_name (&arches, &nr_arches, ap->printable_name);
5257 ap = ap->next;
5258 }
5259 while (ap != NULL);
b4a20239 5260 }
7996bcec
AC
5261 append_name (&arches, &nr_arches, NULL);
5262 return arches;
b4a20239
AC
5263}
5264
5265
0f71a2f6 5266void
4b9b3959
AC
5267gdbarch_register (enum bfd_architecture bfd_architecture,
5268 gdbarch_init_ftype *init,
5269 gdbarch_dump_tdep_ftype *dump_tdep)
0f71a2f6 5270{
4b9b3959 5271 struct gdbarch_registration **curr;
0f71a2f6 5272 const struct bfd_arch_info *bfd_arch_info;
05c547f6 5273
ec3d358c 5274 /* Check that BFD recognizes this architecture */
0f71a2f6
JM
5275 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
5276 if (bfd_arch_info == NULL)
5277 {
8e65ff28 5278 internal_error (__FILE__, __LINE__,
0963b4bd
MS
5279 _("gdbarch: Attempt to register "
5280 "unknown architecture (%d)"),
8e65ff28 5281 bfd_architecture);
0f71a2f6 5282 }
0963b4bd 5283 /* Check that we haven't seen this architecture before. */
be5a57e1 5284 for (curr = &gdbarch_registry;
0f71a2f6
JM
5285 (*curr) != NULL;
5286 curr = &(*curr)->next)
5287 {
5288 if (bfd_architecture == (*curr)->bfd_architecture)
8e65ff28 5289 internal_error (__FILE__, __LINE__,
64b9b334 5290 _("gdbarch: Duplicate registration "
0963b4bd 5291 "of architecture (%s)"),
8e65ff28 5292 bfd_arch_info->printable_name);
0f71a2f6
JM
5293 }
5294 /* log it */
5295 if (gdbarch_debug)
30737ed9 5296 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, %s)\n",
0f71a2f6 5297 bfd_arch_info->printable_name,
30737ed9 5298 host_address_to_string (init));
0f71a2f6 5299 /* Append it */
70ba0933 5300 (*curr) = XNEW (struct gdbarch_registration);
0f71a2f6
JM
5301 (*curr)->bfd_architecture = bfd_architecture;
5302 (*curr)->init = init;
4b9b3959 5303 (*curr)->dump_tdep = dump_tdep;
0f71a2f6
JM
5304 (*curr)->arches = NULL;
5305 (*curr)->next = NULL;
4b9b3959
AC
5306}
5307
5308void
5309register_gdbarch_init (enum bfd_architecture bfd_architecture,
5310 gdbarch_init_ftype *init)
5311{
5312 gdbarch_register (bfd_architecture, init, NULL);
0f71a2f6 5313}
0f71a2f6
JM
5314
5315
424163ea 5316/* Look for an architecture using gdbarch_info. */
0f71a2f6
JM
5317
5318struct gdbarch_list *
104c1213
JM
5319gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
5320 const struct gdbarch_info *info)
0f71a2f6
JM
5321{
5322 for (; arches != NULL; arches = arches->next)
5323 {
5324 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
5325 continue;
5326 if (info->byte_order != arches->gdbarch->byte_order)
5327 continue;
4be87837
DJ
5328 if (info->osabi != arches->gdbarch->osabi)
5329 continue;
424163ea
DJ
5330 if (info->target_desc != arches->gdbarch->target_desc)
5331 continue;
0f71a2f6
JM
5332 return arches;
5333 }
5334 return NULL;
5335}
5336
5337
ebdba546 5338/* Find an architecture that matches the specified INFO. Create a new
59837fe0 5339 architecture if needed. Return that new architecture. */
0f71a2f6 5340
59837fe0
UW
5341struct gdbarch *
5342gdbarch_find_by_info (struct gdbarch_info info)
0f71a2f6
JM
5343{
5344 struct gdbarch *new_gdbarch;
4b9b3959 5345 struct gdbarch_registration *rego;
0f71a2f6 5346
b732d07d 5347 /* Fill in missing parts of the INFO struct using a number of
7a107747
DJ
5348 sources: "set ..."; INFOabfd supplied; and the global
5349 defaults. */
5350 gdbarch_info_fill (&info);
4be87837 5351
0963b4bd 5352 /* Must have found some sort of architecture. */
b732d07d 5353 gdb_assert (info.bfd_arch_info != NULL);
0f71a2f6
JM
5354
5355 if (gdbarch_debug)
5356 {
0f71a2f6 5357 fprintf_unfiltered (gdb_stdlog,
59837fe0 5358 "gdbarch_find_by_info: info.bfd_arch_info %s\n",
0f71a2f6
JM
5359 (info.bfd_arch_info != NULL
5360 ? info.bfd_arch_info->printable_name
5361 : "(null)"));
5362 fprintf_unfiltered (gdb_stdlog,
59837fe0 5363 "gdbarch_find_by_info: info.byte_order %d (%s)\n",
0f71a2f6 5364 info.byte_order,
d7449b42 5365 (info.byte_order == BFD_ENDIAN_BIG ? "big"
778eb05e 5366 : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
0f71a2f6 5367 : "default"));
4be87837 5368 fprintf_unfiltered (gdb_stdlog,
59837fe0 5369 "gdbarch_find_by_info: info.osabi %d (%s)\n",
4be87837 5370 info.osabi, gdbarch_osabi_name (info.osabi));
0f71a2f6 5371 fprintf_unfiltered (gdb_stdlog,
59837fe0 5372 "gdbarch_find_by_info: info.abfd %s\n",
30737ed9 5373 host_address_to_string (info.abfd));
0f71a2f6 5374 fprintf_unfiltered (gdb_stdlog,
59837fe0 5375 "gdbarch_find_by_info: info.tdep_info %s\n",
30737ed9 5376 host_address_to_string (info.tdep_info));
0f71a2f6
JM
5377 }
5378
ebdba546 5379 /* Find the tdep code that knows about this architecture. */
b732d07d
AC
5380 for (rego = gdbarch_registry;
5381 rego != NULL;
5382 rego = rego->next)
5383 if (rego->bfd_architecture == info.bfd_arch_info->arch)
5384 break;
5385 if (rego == NULL)
5386 {
5387 if (gdbarch_debug)
59837fe0 5388 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
ebdba546 5389 "No matching architecture\n");
b732d07d
AC
5390 return 0;
5391 }
5392
ebdba546 5393 /* Ask the tdep code for an architecture that matches "info". */
0f71a2f6
JM
5394 new_gdbarch = rego->init (info, rego->arches);
5395
ebdba546
AC
5396 /* Did the tdep code like it? No. Reject the change and revert to
5397 the old architecture. */
0f71a2f6
JM
5398 if (new_gdbarch == NULL)
5399 {
5400 if (gdbarch_debug)
59837fe0 5401 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
ebdba546
AC
5402 "Target rejected architecture\n");
5403 return NULL;
0f71a2f6
JM
5404 }
5405
ebdba546
AC
5406 /* Is this a pre-existing architecture (as determined by already
5407 being initialized)? Move it to the front of the architecture
5408 list (keeping the list sorted Most Recently Used). */
5409 if (new_gdbarch->initialized_p)
0f71a2f6 5410 {
ebdba546 5411 struct gdbarch_list **list;
fe978cb0 5412 struct gdbarch_list *self;
0f71a2f6 5413 if (gdbarch_debug)
59837fe0 5414 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
30737ed9
JB
5415 "Previous architecture %s (%s) selected\n",
5416 host_address_to_string (new_gdbarch),
0f71a2f6 5417 new_gdbarch->bfd_arch_info->printable_name);
ebdba546
AC
5418 /* Find the existing arch in the list. */
5419 for (list = &rego->arches;
5420 (*list) != NULL && (*list)->gdbarch != new_gdbarch;
5421 list = &(*list)->next);
5422 /* It had better be in the list of architectures. */
5423 gdb_assert ((*list) != NULL && (*list)->gdbarch == new_gdbarch);
fe978cb0
PA
5424 /* Unlink SELF. */
5425 self = (*list);
5426 (*list) = self->next;
5427 /* Insert SELF at the front. */
5428 self->next = rego->arches;
5429 rego->arches = self;
ebdba546
AC
5430 /* Return it. */
5431 return new_gdbarch;
0f71a2f6
JM
5432 }
5433
ebdba546
AC
5434 /* It's a new architecture. */
5435 if (gdbarch_debug)
59837fe0 5436 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
30737ed9
JB
5437 "New architecture %s (%s) selected\n",
5438 host_address_to_string (new_gdbarch),
ebdba546
AC
5439 new_gdbarch->bfd_arch_info->printable_name);
5440
5441 /* Insert the new architecture into the front of the architecture
5442 list (keep the list sorted Most Recently Used). */
0f79675b 5443 {
fe978cb0
PA
5444 struct gdbarch_list *self = XNEW (struct gdbarch_list);
5445 self->next = rego->arches;
5446 self->gdbarch = new_gdbarch;
5447 rego->arches = self;
0f79675b 5448 }
0f71a2f6 5449
4b9b3959
AC
5450 /* Check that the newly installed architecture is valid. Plug in
5451 any post init values. */
5452 new_gdbarch->dump_tdep = rego->dump_tdep;
0f71a2f6 5453 verify_gdbarch (new_gdbarch);
ebdba546 5454 new_gdbarch->initialized_p = 1;
0f71a2f6 5455
4b9b3959 5456 if (gdbarch_debug)
ebdba546 5457 gdbarch_dump (new_gdbarch, gdb_stdlog);
4b9b3959 5458
ebdba546 5459 return new_gdbarch;
0f71a2f6 5460}
c906108c 5461
e487cc15 5462/* Make the specified architecture current. */
ebdba546
AC
5463
5464void
aff68abb 5465set_target_gdbarch (struct gdbarch *new_gdbarch)
ebdba546
AC
5466{
5467 gdb_assert (new_gdbarch != NULL);
ebdba546 5468 gdb_assert (new_gdbarch->initialized_p);
6ecd4729 5469 current_inferior ()->gdbarch = new_gdbarch;
383f836e 5470 observer_notify_architecture_changed (new_gdbarch);
a3ecef73 5471 registers_changed ();
ebdba546 5472}
c906108c 5473
f5656ead 5474/* Return the current inferior's arch. */
6ecd4729
PA
5475
5476struct gdbarch *
f5656ead 5477target_gdbarch (void)
6ecd4729
PA
5478{
5479 return current_inferior ()->gdbarch;
5480}
5481
104c1213 5482extern void _initialize_gdbarch (void);
b4a20239 5483
c906108c 5484void
7c7651b2 5485_initialize_gdbarch (void)
c906108c 5486{
ccce17b0 5487 add_setshow_zuinteger_cmd ("arch", class_maintenance, &gdbarch_debug, _("\
85c07804
AC
5488Set architecture debugging."), _("\
5489Show architecture debugging."), _("\
5490When non-zero, architecture debugging is enabled."),
5491 NULL,
920d2a44 5492 show_gdbarch_debug,
85c07804 5493 &setdebuglist, &showdebuglist);
c906108c 5494}
This page took 1.913246 seconds and 4 git commands to generate.