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