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