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