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