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