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