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