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