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