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