Include <signal.h>.
[deliverable/binutils-gdb.git] / gdb / gdbarch.c
CommitLineData
59233f88
AC
1/* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
2
adf40b2e 3/* Dynamic architecture support for GDB, the GNU debugger.
79d45cd4 4
197e01b6 5 Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free
79d45cd4 6 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
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
c906108c 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.
c906108c 19
96baa820
JM
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
197e01b6
EZ
22 Foundation, Inc., 51 Franklin Street, Fifth Floor,
23 Boston, MA 02110-1301, USA. */
adf40b2e 24
104c1213
JM
25/* This file was created with the aid of ``gdbarch.sh''.
26
52204a0b 27 The Bourne shell script ``gdbarch.sh'' creates the files
104c1213
JM
28 ``new-gdbarch.c'' and ``new-gdbarch.h and then compares them
29 against the existing ``gdbarch.[hc]''. Any differences found
30 being reported.
31
32 If editing this file, please also run gdbarch.sh and merge any
52204a0b 33 changes into that script. Conversely, when making sweeping changes
104c1213
JM
34 to this file, modifying gdbarch.sh and using its output may prove
35 easier. */
c906108c 36
c906108c
SS
37
38#include "defs.h"
1ad03bde 39#include "arch-utils.h"
c906108c 40
0f71a2f6 41#include "gdbcmd.h"
adf40b2e 42#include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */
7a292a7a 43#include "symcat.h"
c906108c 44
f0d4cc9e 45#include "floatformat.h"
c906108c 46
95160752 47#include "gdb_assert.h"
b66d6d2e 48#include "gdb_string.h"
67c2c32c 49#include "gdb-events.h"
b59ff9d5 50#include "reggroups.h"
4be87837 51#include "osabi.h"
aebd7893 52#include "gdb_obstack.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
63int 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
AC
71static const char *
72pformat (const struct floatformat *format)
73{
74 if (format == NULL)
75 return "(null)";
76 else
77 return format->name;
78}
79
0f71a2f6
JM
80
81/* Maintain the struct gdbarch object */
82
83struct gdbarch
adf40b2e 84{
76860b5f
AC
85 /* Has this architecture been fully initialized? */
86 int initialized_p;
aebd7893
AC
87
88 /* An obstack bound to the lifetime of the architecture. */
89 struct obstack *obstack;
90
adf40b2e
JM
91 /* basic architectural information */
92 const struct bfd_arch_info * bfd_arch_info;
93 int byte_order;
4be87837 94 enum gdb_osabi osabi;
0f71a2f6 95
adf40b2e
JM
96 /* target specific vector. */
97 struct gdbarch_tdep *tdep;
4b9b3959 98 gdbarch_dump_tdep_ftype *dump_tdep;
0f71a2f6 99
adf40b2e 100 /* per-architecture data-pointers */
95160752 101 unsigned nr_data;
adf40b2e 102 void **data;
0f71a2f6 103
adf40b2e
JM
104 /* per-architecture swap-regions */
105 struct gdbarch_swap *swap;
0f71a2f6 106
adf40b2e 107 /* Multi-arch values.
0f71a2f6 108
adf40b2e 109 When extending this structure you must:
0f71a2f6 110
adf40b2e 111 Add the field below.
0f71a2f6 112
adf40b2e
JM
113 Declare set/get functions and define the corresponding
114 macro in gdbarch.h.
0f71a2f6 115
adf40b2e
JM
116 gdbarch_alloc(): If zero/NULL is not a suitable default,
117 initialize the new field.
0f71a2f6 118
adf40b2e
JM
119 verify_gdbarch(): Confirm that the target updated the field
120 correctly.
0f71a2f6 121
7e73cedf 122 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
adf40b2e 123 field is dumped out
0f71a2f6 124
c0e8c252 125 ``startup_gdbarch()'': Append an initial value to the static
adf40b2e 126 variable (base values on the host's c-type system).
0f71a2f6 127
adf40b2e
JM
128 get_gdbarch(): Implement the set/get functions (probably using
129 the macro's as shortcuts).
0f71a2f6
JM
130
131 */
132
adf40b2e
JM
133 int short_bit;
134 int int_bit;
135 int long_bit;
136 int long_long_bit;
137 int float_bit;
456fcf94 138 const struct floatformat * float_format;
adf40b2e 139 int double_bit;
456fcf94 140 const struct floatformat * double_format;
adf40b2e 141 int long_double_bit;
456fcf94 142 const struct floatformat * long_double_format;
66b43ecb 143 int ptr_bit;
52204a0b 144 int addr_bit;
66b43ecb 145 int bfd_vma_bit;
4e409299 146 int char_signed;
adf40b2e
JM
147 gdbarch_read_pc_ftype *read_pc;
148 gdbarch_write_pc_ftype *write_pc;
adf40b2e 149 gdbarch_read_sp_ftype *read_sp;
39d4ef09 150 gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer;
d8124050
AC
151 gdbarch_pseudo_register_read_ftype *pseudo_register_read;
152 gdbarch_pseudo_register_write_ftype *pseudo_register_write;
adf40b2e 153 int num_regs;
0aba1244 154 int num_pseudo_regs;
adf40b2e 155 int sp_regnum;
adf40b2e 156 int pc_regnum;
c2169756 157 int ps_regnum;
60054393 158 int fp0_regnum;
88c72b7d
AC
159 gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum;
160 gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum;
161 gdbarch_dwarf_reg_to_regnum_ftype *dwarf_reg_to_regnum;
162 gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum;
163 gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum;
adf40b2e 164 gdbarch_register_name_ftype *register_name;
9c04cab7 165 gdbarch_register_type_ftype *register_type;
9c04cab7 166 gdbarch_deprecated_register_byte_ftype *deprecated_register_byte;
f3be58bc 167 gdbarch_unwind_dummy_id_ftype *unwind_dummy_id;
f3be58bc 168 int deprecated_fp_regnum;
b8de8283 169 gdbarch_push_dummy_call_ftype *push_dummy_call;
b8de8283 170 int deprecated_register_size;
adf40b2e 171 int call_dummy_location;
7043d8dc 172 gdbarch_push_dummy_code_ftype *push_dummy_code;
b8de8283
AC
173 gdbarch_print_registers_info_ftype *print_registers_info;
174 gdbarch_print_float_info_ftype *print_float_info;
175 gdbarch_print_vector_info_ftype *print_vector_info;
176 gdbarch_register_sim_regno_ftype *register_sim_regno;
177 gdbarch_register_bytes_ok_ftype *register_bytes_ok;
178 gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
179 gdbarch_cannot_store_register_ftype *cannot_store_register;
180 gdbarch_get_longjmp_target_ftype *get_longjmp_target;
adf40b2e 181 int believe_pcc_promotion;
13d01224
AC
182 gdbarch_convert_register_p_ftype *convert_register_p;
183 gdbarch_register_to_value_ftype *register_to_value;
184 gdbarch_value_to_register_ftype *value_to_register;
4478b372
JB
185 gdbarch_pointer_to_address_ftype *pointer_to_address;
186 gdbarch_address_to_pointer_ftype *address_to_pointer;
fc0c74b1 187 gdbarch_integer_to_address_ftype *integer_to_address;
4183d812 188 gdbarch_deprecated_store_struct_return_ftype *deprecated_store_struct_return;
92ad9cd9 189 gdbarch_return_value_ftype *return_value;
ebba8386 190 gdbarch_extract_return_value_ftype *extract_return_value;
adf40b2e 191 gdbarch_store_return_value_ftype *store_return_value;
ebba8386
AC
192 gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value;
193 gdbarch_deprecated_store_return_value_ftype *deprecated_store_return_value;
b5622e8d 194 gdbarch_deprecated_use_struct_convention_ftype *deprecated_use_struct_convention;
74055713 195 gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address;
adf40b2e
JM
196 gdbarch_skip_prologue_ftype *skip_prologue;
197 gdbarch_inner_than_ftype *inner_than;
198 gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
a1131521 199 gdbarch_adjust_breakpoint_address_ftype *adjust_breakpoint_address;
917317f4
JM
200 gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
201 gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
adf40b2e 202 CORE_ADDR decr_pc_after_break;
782263ab 203 CORE_ADDR deprecated_function_start_offset;
adf40b2e 204 gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address;
b2756930 205 gdbarch_fetch_tls_load_module_address_ftype *fetch_tls_load_module_address;
adf40b2e 206 CORE_ADDR frame_args_skip;
12cc2063 207 gdbarch_unwind_pc_ftype *unwind_pc;
a9e5fdc2 208 gdbarch_unwind_sp_ftype *unwind_sp;
adf40b2e 209 gdbarch_frame_num_args_ftype *frame_num_args;
f27dd7fd 210 gdbarch_deprecated_stack_align_ftype *deprecated_stack_align;
dc604539 211 gdbarch_frame_align_ftype *frame_align;
88d89dbb 212 gdbarch_deprecated_reg_struct_has_addr_ftype *deprecated_reg_struct_has_addr;
192cb3d4 213 gdbarch_stabs_argument_has_addr_ftype *stabs_argument_has_addr;
8b148df9 214 int frame_red_zone_size;
f517ea4e 215 gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
875e1767 216 gdbarch_addr_bits_remove_ftype *addr_bits_remove;
181c1381 217 gdbarch_smash_text_address_ftype *smash_text_address;
64c4637f 218 gdbarch_software_single_step_ftype *software_single_step;
3352ef37 219 gdbarch_single_step_through_delay_ftype *single_step_through_delay;
2bf0cb65 220 gdbarch_print_insn_ftype *print_insn;
bdcd319a 221 gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
dea0c52f 222 gdbarch_skip_solib_resolver_ftype *skip_solib_resolver;
d50355b6 223 gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
c12260ac 224 gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p;
552c04a7 225 gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments;
a2cf933a
EZ
226 gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
227 gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
5720643c 228 const char * name_of_malloc;
c4ed33b9 229 int cannot_step_breakpoint;
f74fa174 230 int have_nonsteppable_watchpoint;
8b2dbe47
KB
231 gdbarch_address_class_type_flags_ftype *address_class_type_flags;
232 gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name;
233 gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
b59ff9d5 234 gdbarch_register_reggroup_p_ftype *register_reggroup_p;
143985b7 235 gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument;
6ce6d90f 236 gdbarch_regset_from_core_section_ftype *regset_from_core_section;
adf40b2e 237};
0f71a2f6
JM
238
239
240/* The default architecture uses host values (for want of a better
241 choice). */
242
243extern const struct bfd_arch_info bfd_default_arch_struct;
244
4b9b3959
AC
245struct gdbarch startup_gdbarch =
246{
76860b5f 247 1, /* Always initialized. */
aebd7893 248 NULL, /* The obstack. */
0f71a2f6 249 /* basic architecture information */
ec5cbaec
AC
250 &bfd_default_arch_struct, /* bfd_arch_info */
251 BFD_ENDIAN_BIG, /* byte_order */
252 GDB_OSABI_UNKNOWN, /* osabi */
4b9b3959
AC
253 /* target specific vector and its dump routine */
254 NULL, NULL,
0f71a2f6
JM
255 /*per-architecture data-pointers and swap regions */
256 0, NULL, NULL,
257 /* Multi-arch values */
ec5cbaec
AC
258 8 * sizeof (short), /* short_bit */
259 8 * sizeof (int), /* int_bit */
260 8 * sizeof (long), /* long_bit */
261 8 * sizeof (LONGEST), /* long_long_bit */
262 8 * sizeof (float), /* float_bit */
456fcf94 263 0, /* float_format */
ec5cbaec 264 8 * sizeof (double), /* double_bit */
456fcf94 265 0, /* double_format */
ec5cbaec 266 8 * sizeof (long double), /* long_double_bit */
456fcf94 267 0, /* long_double_format */
ec5cbaec
AC
268 8 * sizeof (void*), /* ptr_bit */
269 8 * sizeof (void*), /* addr_bit */
270 8 * sizeof (void*), /* bfd_vma_bit */
271 1, /* char_signed */
272 0, /* read_pc */
273 0, /* write_pc */
ec5cbaec 274 0, /* read_sp */
ec5cbaec
AC
275 0, /* virtual_frame_pointer */
276 0, /* pseudo_register_read */
277 0, /* pseudo_register_write */
278 0, /* num_regs */
279 0, /* num_pseudo_regs */
280 -1, /* sp_regnum */
ec5cbaec
AC
281 -1, /* pc_regnum */
282 -1, /* ps_regnum */
283 0, /* fp0_regnum */
ec5cbaec
AC
284 0, /* stab_reg_to_regnum */
285 0, /* ecoff_reg_to_regnum */
286 0, /* dwarf_reg_to_regnum */
287 0, /* sdb_reg_to_regnum */
288 0, /* dwarf2_reg_to_regnum */
289 0, /* register_name */
9c04cab7 290 0, /* register_type */
9c04cab7 291 generic_register_byte, /* deprecated_register_byte */
f3be58bc 292 0, /* unwind_dummy_id */
f3be58bc 293 -1, /* deprecated_fp_regnum */
b8de8283 294 0, /* push_dummy_call */
b8de8283 295 0, /* deprecated_register_size */
ec5cbaec 296 0, /* call_dummy_location */
ec5cbaec 297 0, /* push_dummy_code */
b8de8283
AC
298 default_print_registers_info, /* print_registers_info */
299 0, /* print_float_info */
300 0, /* print_vector_info */
301 0, /* register_sim_regno */
302 0, /* register_bytes_ok */
303 0, /* cannot_fetch_register */
304 0, /* cannot_store_register */
305 0, /* get_longjmp_target */
ec5cbaec 306 0, /* believe_pcc_promotion */
ec5cbaec
AC
307 0, /* convert_register_p */
308 0, /* register_to_value */
309 0, /* value_to_register */
310 0, /* pointer_to_address */
311 0, /* address_to_pointer */
312 0, /* integer_to_address */
ec5cbaec 313 0, /* deprecated_store_struct_return */
92ad9cd9 314 0, /* return_value */
ec5cbaec
AC
315 0, /* extract_return_value */
316 0, /* store_return_value */
317 0, /* deprecated_extract_return_value */
318 0, /* deprecated_store_return_value */
b5622e8d 319 0, /* deprecated_use_struct_convention */
74055713 320 0, /* deprecated_extract_struct_value_address */
ec5cbaec 321 0, /* skip_prologue */
ec5cbaec
AC
322 0, /* inner_than */
323 0, /* breakpoint_from_pc */
a1131521 324 0, /* adjust_breakpoint_address */
ec5cbaec
AC
325 0, /* memory_insert_breakpoint */
326 0, /* memory_remove_breakpoint */
327 0, /* decr_pc_after_break */
782263ab 328 0, /* deprecated_function_start_offset */
ec5cbaec 329 generic_remote_translate_xfer_address, /* remote_translate_xfer_address */
b2756930 330 0, /* fetch_tls_load_module_address */
ec5cbaec 331 0, /* frame_args_skip */
ec5cbaec 332 0, /* unwind_pc */
a9e5fdc2 333 0, /* unwind_sp */
ec5cbaec 334 0, /* frame_num_args */
f27dd7fd 335 0, /* deprecated_stack_align */
ec5cbaec 336 0, /* frame_align */
88d89dbb 337 0, /* deprecated_reg_struct_has_addr */
192cb3d4 338 default_stabs_argument_has_addr, /* stabs_argument_has_addr */
8b148df9 339 0, /* frame_red_zone_size */
e2d0e7eb 340 convert_from_func_ptr_addr_identity, /* convert_from_func_ptr_addr */
ec5cbaec
AC
341 0, /* addr_bits_remove */
342 0, /* smash_text_address */
343 0, /* software_single_step */
3352ef37 344 0, /* single_step_through_delay */
ec5cbaec
AC
345 0, /* print_insn */
346 0, /* skip_trampoline_code */
4c8c40e6 347 generic_skip_solib_resolver, /* skip_solib_resolver */
ec5cbaec 348 0, /* in_solib_return_trampoline */
ec5cbaec
AC
349 generic_in_function_epilogue_p, /* in_function_epilogue_p */
350 construct_inferior_arguments, /* construct_inferior_arguments */
ec5cbaec
AC
351 0, /* elf_make_msymbol_special */
352 0, /* coff_make_msymbol_special */
353 "malloc", /* name_of_malloc */
354 0, /* cannot_step_breakpoint */
355 0, /* have_nonsteppable_watchpoint */
356 0, /* address_class_type_flags */
357 0, /* address_class_type_flags_to_name */
358 0, /* address_class_name_to_type_flags */
359 default_register_reggroup_p, /* register_reggroup_p */
360 0, /* fetch_pointer_argument */
6ce6d90f 361 0, /* regset_from_core_section */
c0e8c252 362 /* startup_gdbarch() */
0f71a2f6 363};
4b9b3959 364
c0e8c252 365struct gdbarch *current_gdbarch = &startup_gdbarch;
0f71a2f6 366
66b43ecb 367/* Create a new ``struct gdbarch'' based on information provided by
0f71a2f6
JM
368 ``struct gdbarch_info''. */
369
370struct gdbarch *
104c1213
JM
371gdbarch_alloc (const struct gdbarch_info *info,
372 struct gdbarch_tdep *tdep)
0f71a2f6 373{
85de9627
AC
374 /* NOTE: The new architecture variable is named ``current_gdbarch''
375 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
376 the current local architecture and not the previous global
377 architecture. This ensures that the new architectures initial
378 values are not influenced by the previous architecture. Once
379 everything is parameterised with gdbarch, this will go away. */
aebd7893
AC
380 struct gdbarch *current_gdbarch;
381
382 /* Create an obstack for allocating all the per-architecture memory,
383 then use that to allocate the architecture vector. */
384 struct obstack *obstack = XMALLOC (struct obstack);
385 obstack_init (obstack);
386 current_gdbarch = obstack_alloc (obstack, sizeof (*current_gdbarch));
85de9627 387 memset (current_gdbarch, 0, sizeof (*current_gdbarch));
aebd7893 388 current_gdbarch->obstack = obstack;
0f71a2f6 389
85de9627 390 alloc_gdbarch_data (current_gdbarch);
b3cc3077 391
85de9627 392 current_gdbarch->tdep = tdep;
0f71a2f6 393
85de9627
AC
394 current_gdbarch->bfd_arch_info = info->bfd_arch_info;
395 current_gdbarch->byte_order = info->byte_order;
4be87837 396 current_gdbarch->osabi = info->osabi;
0f71a2f6
JM
397
398 /* Force the explicit initialization of these. */
85de9627
AC
399 current_gdbarch->short_bit = 2*TARGET_CHAR_BIT;
400 current_gdbarch->int_bit = 4*TARGET_CHAR_BIT;
401 current_gdbarch->long_bit = 4*TARGET_CHAR_BIT;
402 current_gdbarch->long_long_bit = 2*TARGET_LONG_BIT;
403 current_gdbarch->float_bit = 4*TARGET_CHAR_BIT;
404 current_gdbarch->double_bit = 8*TARGET_CHAR_BIT;
17ef5d92 405 current_gdbarch->long_double_bit = 8*TARGET_CHAR_BIT;
85de9627
AC
406 current_gdbarch->ptr_bit = TARGET_INT_BIT;
407 current_gdbarch->bfd_vma_bit = TARGET_ARCHITECTURE->bits_per_address;
4e409299 408 current_gdbarch->char_signed = -1;
85de9627 409 current_gdbarch->write_pc = generic_target_write_pc;
85de9627
AC
410 current_gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
411 current_gdbarch->num_regs = -1;
412 current_gdbarch->sp_regnum = -1;
85de9627 413 current_gdbarch->pc_regnum = -1;
c2169756 414 current_gdbarch->ps_regnum = -1;
85de9627 415 current_gdbarch->fp0_regnum = -1;
85de9627
AC
416 current_gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
417 current_gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
418 current_gdbarch->dwarf_reg_to_regnum = no_op_reg_to_regnum;
419 current_gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
420 current_gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
9c04cab7 421 current_gdbarch->deprecated_register_byte = generic_register_byte;
f3be58bc 422 current_gdbarch->deprecated_fp_regnum = -1;
b99fa2d2 423 current_gdbarch->call_dummy_location = AT_ENTRY_POINT;
b8de8283
AC
424 current_gdbarch->print_registers_info = default_print_registers_info;
425 current_gdbarch->register_sim_regno = legacy_register_sim_regno;
426 current_gdbarch->cannot_fetch_register = cannot_register_not;
427 current_gdbarch->cannot_store_register = cannot_register_not;
a1f4a1b6 428 current_gdbarch->convert_register_p = generic_convert_register_p;
85de9627
AC
429 current_gdbarch->pointer_to_address = unsigned_pointer_to_address;
430 current_gdbarch->address_to_pointer = unsigned_address_to_pointer;
750eb019 431 current_gdbarch->return_value = legacy_return_value;
ebba8386
AC
432 current_gdbarch->extract_return_value = legacy_extract_return_value;
433 current_gdbarch->store_return_value = legacy_store_return_value;
b5622e8d 434 current_gdbarch->deprecated_use_struct_convention = generic_use_struct_convention;
85de9627
AC
435 current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
436 current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
85de9627 437 current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
192cb3d4 438 current_gdbarch->stabs_argument_has_addr = default_stabs_argument_has_addr;
e2d0e7eb 439 current_gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr_identity;
85de9627 440 current_gdbarch->addr_bits_remove = core_addr_identity;
181c1381 441 current_gdbarch->smash_text_address = core_addr_identity;
85de9627 442 current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
dea0c52f 443 current_gdbarch->skip_solib_resolver = generic_skip_solib_resolver;
d50355b6 444 current_gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
c12260ac 445 current_gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
552c04a7 446 current_gdbarch->construct_inferior_arguments = construct_inferior_arguments;
a2cf933a
EZ
447 current_gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
448 current_gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
5720643c 449 current_gdbarch->name_of_malloc = "malloc";
b59ff9d5 450 current_gdbarch->register_reggroup_p = default_register_reggroup_p;
0f71a2f6
JM
451 /* gdbarch_alloc() */
452
85de9627 453 return current_gdbarch;
0f71a2f6
JM
454}
455
456
aebd7893
AC
457/* Allocate extra space using the per-architecture obstack. */
458
459void *
460gdbarch_obstack_zalloc (struct gdbarch *arch, long size)
461{
462 void *data = obstack_alloc (arch->obstack, size);
463 memset (data, 0, size);
464 return data;
465}
466
467
058f20d5
JB
468/* Free a gdbarch struct. This should never happen in normal
469 operation --- once you've created a gdbarch, you keep it around.
470 However, if an architecture's init function encounters an error
471 building the structure, it may need to clean up a partially
472 constructed gdbarch. */
4b9b3959 473
058f20d5
JB
474void
475gdbarch_free (struct gdbarch *arch)
476{
aebd7893 477 struct obstack *obstack;
95160752 478 gdb_assert (arch != NULL);
aebd7893
AC
479 gdb_assert (!arch->initialized_p);
480 obstack = arch->obstack;
481 obstack_free (obstack, 0); /* Includes the ARCH. */
482 xfree (obstack);
058f20d5
JB
483}
484
485
db446970
AC
486/* Ensure that all values in a GDBARCH are reasonable. */
487
488/* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
489 just happens to match the global variable ``current_gdbarch''. That
490 way macros refering to that variable get the local and not the global
491 version - ulgh. Once everything is parameterised with gdbarch, this
492 will go away. */
0f71a2f6 493
0f71a2f6 494static void
db446970 495verify_gdbarch (struct gdbarch *current_gdbarch)
0f71a2f6 496{
f16a1923
AC
497 struct ui_file *log;
498 struct cleanup *cleanups;
499 long dummy;
500 char *buf;
f16a1923
AC
501 log = mem_fileopen ();
502 cleanups = make_cleanup_ui_file_delete (log);
0f71a2f6 503 /* fundamental */
db446970 504 if (current_gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
f16a1923 505 fprintf_unfiltered (log, "\n\tbyte-order");
db446970 506 if (current_gdbarch->bfd_arch_info == NULL)
f16a1923 507 fprintf_unfiltered (log, "\n\tbfd_arch_info");
0f71a2f6 508 /* Check those that need to be defined for the given multi-arch level. */
66b43ecb
AC
509 /* Skip verify of short_bit, invalid_p == 0 */
510 /* Skip verify of int_bit, invalid_p == 0 */
511 /* Skip verify of long_bit, invalid_p == 0 */
512 /* Skip verify of long_long_bit, invalid_p == 0 */
513 /* Skip verify of float_bit, invalid_p == 0 */
456fcf94
AC
514 if (current_gdbarch->float_format == 0)
515 current_gdbarch->float_format = default_float_format (current_gdbarch);
66b43ecb 516 /* Skip verify of double_bit, invalid_p == 0 */
456fcf94
AC
517 if (current_gdbarch->double_format == 0)
518 current_gdbarch->double_format = default_double_format (current_gdbarch);
66b43ecb 519 /* Skip verify of long_double_bit, invalid_p == 0 */
456fcf94
AC
520 if (current_gdbarch->long_double_format == 0)
521 current_gdbarch->long_double_format = default_double_format (current_gdbarch);
66b43ecb 522 /* Skip verify of ptr_bit, invalid_p == 0 */
db446970
AC
523 if (current_gdbarch->addr_bit == 0)
524 current_gdbarch->addr_bit = TARGET_PTR_BIT;
c0e8c252 525 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
db446970
AC
526 if (current_gdbarch->char_signed == -1)
527 current_gdbarch->char_signed = 1;
cde9ea48 528 /* Skip verify of read_pc, has predicate */
be8dfb87 529 /* Skip verify of write_pc, invalid_p == 0 */
bd1ce8ba 530 /* Skip verify of read_sp, has predicate */
39d4ef09 531 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
d8124050
AC
532 /* Skip verify of pseudo_register_read, has predicate */
533 /* Skip verify of pseudo_register_write, has predicate */
4d60522e 534 if (current_gdbarch->num_regs == -1)
f16a1923 535 fprintf_unfiltered (log, "\n\tnum_regs");
0aba1244 536 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
1200cd6e 537 /* Skip verify of sp_regnum, invalid_p == 0 */
1200cd6e 538 /* Skip verify of pc_regnum, invalid_p == 0 */
c2169756 539 /* Skip verify of ps_regnum, invalid_p == 0 */
60054393 540 /* Skip verify of fp0_regnum, invalid_p == 0 */
88c72b7d
AC
541 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
542 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
543 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
544 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
545 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
9c04cab7 546 /* Skip verify of register_type, has predicate */
9c04cab7 547 /* Skip verify of deprecated_register_byte, has predicate */
f3be58bc 548 /* Skip verify of unwind_dummy_id, has predicate */
f3be58bc 549 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
b8de8283 550 /* Skip verify of push_dummy_call, has predicate */
b8de8283 551 /* Skip verify of call_dummy_location, invalid_p == 0 */
b8de8283 552 /* Skip verify of push_dummy_code, has predicate */
0ab7a791 553 /* Skip verify of print_registers_info, invalid_p == 0 */
23e3a7ac 554 /* Skip verify of print_float_info, has predicate */
e76f1f2e 555 /* Skip verify of print_vector_info, has predicate */
7c7651b2 556 /* Skip verify of register_sim_regno, invalid_p == 0 */
2649061d 557 /* Skip verify of register_bytes_ok, has predicate */
01fb7433
AC
558 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
559 /* Skip verify of cannot_store_register, invalid_p == 0 */
9df628e0 560 /* Skip verify of get_longjmp_target, has predicate */
13d01224 561 /* Skip verify of convert_register_p, invalid_p == 0 */
4478b372
JB
562 /* Skip verify of pointer_to_address, invalid_p == 0 */
563 /* Skip verify of address_to_pointer, invalid_p == 0 */
fc0c74b1 564 /* Skip verify of integer_to_address, has predicate */
4183d812 565 /* Skip verify of deprecated_store_struct_return, has predicate */
92ad9cd9 566 /* Skip verify of return_value, has predicate */
ebba8386
AC
567 /* Skip verify of extract_return_value, invalid_p == 0 */
568 /* Skip verify of store_return_value, invalid_p == 0 */
b5622e8d 569 /* Skip verify of deprecated_use_struct_convention, invalid_p == 0 */
74055713 570 /* Skip verify of deprecated_extract_struct_value_address, has predicate */
4d60522e 571 if (current_gdbarch->skip_prologue == 0)
f16a1923 572 fprintf_unfiltered (log, "\n\tskip_prologue");
4d60522e 573 if (current_gdbarch->inner_than == 0)
f16a1923 574 fprintf_unfiltered (log, "\n\tinner_than");
4d60522e 575 if (current_gdbarch->breakpoint_from_pc == 0)
aaab4dba 576 fprintf_unfiltered (log, "\n\tbreakpoint_from_pc");
a1131521 577 /* Skip verify of adjust_breakpoint_address, has predicate */
c0e8c252
AC
578 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
579 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
71bd6bd4 580 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
782263ab 581 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
c0e8c252 582 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
b2756930 583 /* Skip verify of fetch_tls_load_module_address, has predicate */
5867a2fb 584 /* Skip verify of frame_args_skip, invalid_p == 0 */
12cc2063 585 /* Skip verify of unwind_pc, has predicate */
a9e5fdc2 586 /* Skip verify of unwind_sp, has predicate */
983a287a 587 /* Skip verify of frame_num_args, has predicate */
f27dd7fd 588 /* Skip verify of deprecated_stack_align, has predicate */
dc604539 589 /* Skip verify of frame_align, has predicate */
88d89dbb 590 /* Skip verify of deprecated_reg_struct_has_addr, has predicate */
192cb3d4 591 /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
f517ea4e 592 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
875e1767 593 /* Skip verify of addr_bits_remove, invalid_p == 0 */
181c1381 594 /* Skip verify of smash_text_address, invalid_p == 0 */
64c4637f 595 /* Skip verify of software_single_step, has predicate */
3352ef37 596 /* Skip verify of single_step_through_delay, has predicate */
4d60522e 597 if (current_gdbarch->print_insn == 0)
f6c40618 598 fprintf_unfiltered (log, "\n\tprint_insn");
bdcd319a 599 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
dea0c52f 600 /* Skip verify of skip_solib_resolver, invalid_p == 0 */
d50355b6 601 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
c12260ac 602 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
552c04a7 603 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
a2cf933a
EZ
604 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
605 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
5720643c 606 /* Skip verify of name_of_malloc, invalid_p == 0 */
c4ed33b9 607 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
f74fa174 608 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
8b2dbe47
KB
609 /* Skip verify of address_class_type_flags, has predicate */
610 /* Skip verify of address_class_type_flags_to_name, has predicate */
611 /* Skip verify of address_class_name_to_type_flags, has predicate */
7e20f3fb 612 /* Skip verify of register_reggroup_p, invalid_p == 0 */
143985b7 613 /* Skip verify of fetch_pointer_argument, has predicate */
6ce6d90f 614 /* Skip verify of regset_from_core_section, has predicate */
f16a1923
AC
615 buf = ui_file_xstrdup (log, &dummy);
616 make_cleanup (xfree, buf);
617 if (strlen (buf) > 0)
618 internal_error (__FILE__, __LINE__,
e2e0b3e5 619 _("verify_gdbarch: the following are invalid ...%s"),
f16a1923
AC
620 buf);
621 do_cleanups (cleanups);
0f71a2f6
JM
622}
623
624
625/* Print out the details of the current architecture. */
626
4b9b3959
AC
627/* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
628 just happens to match the global variable ``current_gdbarch''. That
629 way macros refering to that variable get the local and not the global
630 version - ulgh. Once everything is parameterised with gdbarch, this
631 will go away. */
632
0f71a2f6 633void
db446970 634gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
0f71a2f6 635{
b78960be
AC
636 const char *gdb_xm_file = "<not-defined>";
637 const char *gdb_nm_file = "<not-defined>";
638 const char *gdb_tm_file = "<not-defined>";
639#if defined (GDB_XM_FILE)
640 gdb_xm_file = GDB_XM_FILE;
641#endif
642 fprintf_unfiltered (file,
643 "gdbarch_dump: GDB_XM_FILE = %s\n",
644 gdb_xm_file);
645#if defined (GDB_NM_FILE)
646 gdb_nm_file = GDB_NM_FILE;
647#endif
648 fprintf_unfiltered (file,
649 "gdbarch_dump: GDB_NM_FILE = %s\n",
650 gdb_nm_file);
651#if defined (GDB_TM_FILE)
652 gdb_tm_file = GDB_TM_FILE;
653#endif
4b9b3959 654 fprintf_unfiltered (file,
b78960be
AC
655 "gdbarch_dump: GDB_TM_FILE = %s\n",
656 gdb_tm_file);
a2428dbe 657#ifdef TARGET_ADDR_BIT
e2d0e7eb 658 fprintf_unfiltered (file,
a2428dbe
AC
659 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
660 XSTRING (TARGET_ADDR_BIT));
a2428dbe 661#endif
48f7351b
AC
662 fprintf_unfiltered (file,
663 "gdbarch_dump: addr_bit = %s\n",
664 paddr_d (current_gdbarch->addr_bit));
a2428dbe 665#ifdef ADDR_BITS_REMOVE
7996bcec 666 fprintf_unfiltered (file,
a2428dbe
AC
667 "gdbarch_dump: %s # %s\n",
668 "ADDR_BITS_REMOVE(addr)",
669 XSTRING (ADDR_BITS_REMOVE (addr)));
a2428dbe 670#endif
48f7351b
AC
671 fprintf_unfiltered (file,
672 "gdbarch_dump: addr_bits_remove = <0x%lx>\n",
673 (long) current_gdbarch->addr_bits_remove);
7996bcec
AC
674 fprintf_unfiltered (file,
675 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
676 gdbarch_address_class_name_to_type_flags_p (current_gdbarch));
677 fprintf_unfiltered (file,
48f7351b 678 "gdbarch_dump: address_class_name_to_type_flags = <0x%lx>\n",
7996bcec 679 (long) current_gdbarch->address_class_name_to_type_flags);
1e9f55d0
AC
680#ifdef ADDRESS_CLASS_TYPE_FLAGS_P
681 fprintf_unfiltered (file,
682 "gdbarch_dump: %s # %s\n",
683 "ADDRESS_CLASS_TYPE_FLAGS_P()",
684 XSTRING (ADDRESS_CLASS_TYPE_FLAGS_P ()));
1e9f55d0 685#endif
48f7351b
AC
686 fprintf_unfiltered (file,
687 "gdbarch_dump: gdbarch_address_class_type_flags_p() = %d\n",
688 gdbarch_address_class_type_flags_p (current_gdbarch));
8b2dbe47
KB
689#ifdef ADDRESS_CLASS_TYPE_FLAGS
690 fprintf_unfiltered (file,
691 "gdbarch_dump: %s # %s\n",
692 "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)",
693 XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size, dwarf2_addr_class)));
8b2dbe47 694#endif
48f7351b
AC
695 fprintf_unfiltered (file,
696 "gdbarch_dump: address_class_type_flags = <0x%lx>\n",
697 (long) current_gdbarch->address_class_type_flags);
7996bcec
AC
698 fprintf_unfiltered (file,
699 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
700 gdbarch_address_class_type_flags_to_name_p (current_gdbarch));
701 fprintf_unfiltered (file,
48f7351b 702 "gdbarch_dump: address_class_type_flags_to_name = <0x%lx>\n",
7996bcec 703 (long) current_gdbarch->address_class_type_flags_to_name);
08e45a40 704#ifdef ADDRESS_TO_POINTER
4b9b3959 705 fprintf_unfiltered (file,
08e45a40
AC
706 "gdbarch_dump: %s # %s\n",
707 "ADDRESS_TO_POINTER(type, buf, addr)",
708 XSTRING (ADDRESS_TO_POINTER (type, buf, addr)));
5e74b15c 709#endif
48f7351b
AC
710 fprintf_unfiltered (file,
711 "gdbarch_dump: address_to_pointer = <0x%lx>\n",
712 (long) current_gdbarch->address_to_pointer);
a1131521
KB
713 fprintf_unfiltered (file,
714 "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n",
715 gdbarch_adjust_breakpoint_address_p (current_gdbarch));
716 fprintf_unfiltered (file,
48f7351b 717 "gdbarch_dump: adjust_breakpoint_address = <0x%lx>\n",
a1131521 718 (long) current_gdbarch->adjust_breakpoint_address);
08e45a40 719#ifdef BELIEVE_PCC_PROMOTION
4b9b3959 720 fprintf_unfiltered (file,
08e45a40
AC
721 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
722 XSTRING (BELIEVE_PCC_PROMOTION));
4b9b3959 723#endif
48f7351b
AC
724 fprintf_unfiltered (file,
725 "gdbarch_dump: believe_pcc_promotion = %s\n",
726 paddr_d (current_gdbarch->believe_pcc_promotion));
a2428dbe
AC
727#ifdef TARGET_ARCHITECTURE
728 fprintf_unfiltered (file,
729 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
730 XSTRING (TARGET_ARCHITECTURE));
48f7351b 731#endif
283354d8 732 fprintf_unfiltered (file,
48f7351b 733 "gdbarch_dump: bfd_arch_info = %s\n",
283354d8 734 TARGET_ARCHITECTURE->printable_name);
a2428dbe
AC
735#ifdef TARGET_BFD_VMA_BIT
736 fprintf_unfiltered (file,
737 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
738 XSTRING (TARGET_BFD_VMA_BIT));
a2428dbe 739#endif
48f7351b
AC
740 fprintf_unfiltered (file,
741 "gdbarch_dump: bfd_vma_bit = %s\n",
742 paddr_d (current_gdbarch->bfd_vma_bit));
08e45a40 743#ifdef BREAKPOINT_FROM_PC
4b9b3959 744 fprintf_unfiltered (file,
08e45a40
AC
745 "gdbarch_dump: %s # %s\n",
746 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
747 XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr)));
4b9b3959 748#endif
48f7351b
AC
749 fprintf_unfiltered (file,
750 "gdbarch_dump: breakpoint_from_pc = <0x%lx>\n",
751 (long) current_gdbarch->breakpoint_from_pc);
a2428dbe
AC
752#ifdef TARGET_BYTE_ORDER
753 fprintf_unfiltered (file,
754 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
755 XSTRING (TARGET_BYTE_ORDER));
a2428dbe 756#endif
48f7351b
AC
757 fprintf_unfiltered (file,
758 "gdbarch_dump: byte_order = %s\n",
759 paddr_d (current_gdbarch->byte_order));
08e45a40 760#ifdef CALL_DUMMY_LOCATION
52204a0b 761 fprintf_unfiltered (file,
08e45a40
AC
762 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
763 XSTRING (CALL_DUMMY_LOCATION));
52204a0b 764#endif
48f7351b
AC
765 fprintf_unfiltered (file,
766 "gdbarch_dump: call_dummy_location = %s\n",
767 paddr_d (current_gdbarch->call_dummy_location));
08e45a40 768#ifdef CANNOT_FETCH_REGISTER
4b9b3959
AC
769 fprintf_unfiltered (file,
770 "gdbarch_dump: %s # %s\n",
08e45a40
AC
771 "CANNOT_FETCH_REGISTER(regnum)",
772 XSTRING (CANNOT_FETCH_REGISTER (regnum)));
4b9b3959 773#endif
48f7351b
AC
774 fprintf_unfiltered (file,
775 "gdbarch_dump: cannot_fetch_register = <0x%lx>\n",
776 (long) current_gdbarch->cannot_fetch_register);
c4ed33b9
AC
777#ifdef CANNOT_STEP_BREAKPOINT
778 fprintf_unfiltered (file,
779 "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
780 XSTRING (CANNOT_STEP_BREAKPOINT));
c4ed33b9 781#endif
48f7351b
AC
782 fprintf_unfiltered (file,
783 "gdbarch_dump: cannot_step_breakpoint = %s\n",
784 paddr_d (current_gdbarch->cannot_step_breakpoint));
08e45a40 785#ifdef CANNOT_STORE_REGISTER
4b9b3959
AC
786 fprintf_unfiltered (file,
787 "gdbarch_dump: %s # %s\n",
08e45a40
AC
788 "CANNOT_STORE_REGISTER(regnum)",
789 XSTRING (CANNOT_STORE_REGISTER (regnum)));
4b9b3959 790#endif
48f7351b
AC
791 fprintf_unfiltered (file,
792 "gdbarch_dump: cannot_store_register = <0x%lx>\n",
793 (long) current_gdbarch->cannot_store_register);
a2428dbe
AC
794#ifdef TARGET_CHAR_SIGNED
795 fprintf_unfiltered (file,
796 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
797 XSTRING (TARGET_CHAR_SIGNED));
a2428dbe 798#endif
48f7351b
AC
799 fprintf_unfiltered (file,
800 "gdbarch_dump: char_signed = %s\n",
801 paddr_d (current_gdbarch->char_signed));
a2cf933a 802#ifdef COFF_MAKE_MSYMBOL_SPECIAL
a2cf933a
EZ
803 fprintf_unfiltered (file,
804 "gdbarch_dump: %s # %s\n",
805 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
806 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val, msym)));
807#endif
7996bcec 808 fprintf_unfiltered (file,
48f7351b
AC
809 "gdbarch_dump: coff_make_msymbol_special = <0x%lx>\n",
810 (long) current_gdbarch->coff_make_msymbol_special);
811 fprintf_unfiltered (file,
812 "gdbarch_dump: construct_inferior_arguments = <0x%lx>\n",
7996bcec 813 (long) current_gdbarch->construct_inferior_arguments);
a2428dbe 814 fprintf_unfiltered (file,
48f7351b 815 "gdbarch_dump: convert_from_func_ptr_addr = <0x%lx>\n",
a2428dbe 816 (long) current_gdbarch->convert_from_func_ptr_addr);
13d01224
AC
817#ifdef CONVERT_REGISTER_P
818 fprintf_unfiltered (file,
819 "gdbarch_dump: %s # %s\n",
ff2e87ac
AC
820 "CONVERT_REGISTER_P(regnum, type)",
821 XSTRING (CONVERT_REGISTER_P (regnum, type)));
13d01224 822#endif
48f7351b
AC
823 fprintf_unfiltered (file,
824 "gdbarch_dump: convert_register_p = <0x%lx>\n",
825 (long) current_gdbarch->convert_register_p);
08e45a40 826#ifdef DECR_PC_AFTER_BREAK
4b9b3959 827 fprintf_unfiltered (file,
08e45a40
AC
828 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
829 XSTRING (DECR_PC_AFTER_BREAK));
0aba1244 830#endif
48f7351b
AC
831 fprintf_unfiltered (file,
832 "gdbarch_dump: decr_pc_after_break = 0x%s\n",
833 paddr_nz (current_gdbarch->decr_pc_after_break));
26e9b323 834#ifdef DEPRECATED_EXTRACT_RETURN_VALUE
26e9b323
AC
835 fprintf_unfiltered (file,
836 "gdbarch_dump: %s # %s\n",
837 "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
838 XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type, regbuf, valbuf)));
26e9b323 839#endif
48f7351b
AC
840 fprintf_unfiltered (file,
841 "gdbarch_dump: deprecated_extract_return_value = <0x%lx>\n",
842 (long) current_gdbarch->deprecated_extract_return_value);
74055713
AC
843#ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P
844 fprintf_unfiltered (file,
845 "gdbarch_dump: %s # %s\n",
846 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P()",
847 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
74055713 848#endif
48f7351b
AC
849 fprintf_unfiltered (file,
850 "gdbarch_dump: gdbarch_deprecated_extract_struct_value_address_p() = %d\n",
851 gdbarch_deprecated_extract_struct_value_address_p (current_gdbarch));
74055713
AC
852#ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
853 fprintf_unfiltered (file,
854 "gdbarch_dump: %s # %s\n",
855 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
856 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regcache)));
74055713 857#endif
48f7351b
AC
858 fprintf_unfiltered (file,
859 "gdbarch_dump: deprecated_extract_struct_value_address = <0x%lx>\n",
860 (long) current_gdbarch->deprecated_extract_struct_value_address);
0ba6dca9
AC
861#ifdef DEPRECATED_FP_REGNUM
862 fprintf_unfiltered (file,
863 "gdbarch_dump: DEPRECATED_FP_REGNUM # %s\n",
864 XSTRING (DEPRECATED_FP_REGNUM));
0ba6dca9 865#endif
48f7351b
AC
866 fprintf_unfiltered (file,
867 "gdbarch_dump: deprecated_fp_regnum = %s\n",
868 paddr_d (current_gdbarch->deprecated_fp_regnum));
782263ab
AC
869#ifdef DEPRECATED_FUNCTION_START_OFFSET
870 fprintf_unfiltered (file,
871 "gdbarch_dump: DEPRECATED_FUNCTION_START_OFFSET # %s\n",
872 XSTRING (DEPRECATED_FUNCTION_START_OFFSET));
782263ab 873#endif
48f7351b
AC
874 fprintf_unfiltered (file,
875 "gdbarch_dump: deprecated_function_start_offset = 0x%s\n",
876 paddr_nz (current_gdbarch->deprecated_function_start_offset));
a2428dbe
AC
877#ifdef DEPRECATED_REG_STRUCT_HAS_ADDR_P
878 fprintf_unfiltered (file,
879 "gdbarch_dump: %s # %s\n",
880 "DEPRECATED_REG_STRUCT_HAS_ADDR_P()",
881 XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR_P ()));
a2428dbe 882#endif
48f7351b
AC
883 fprintf_unfiltered (file,
884 "gdbarch_dump: gdbarch_deprecated_reg_struct_has_addr_p() = %d\n",
885 gdbarch_deprecated_reg_struct_has_addr_p (current_gdbarch));
a2428dbe
AC
886#ifdef DEPRECATED_REG_STRUCT_HAS_ADDR
887 fprintf_unfiltered (file,
888 "gdbarch_dump: %s # %s\n",
889 "DEPRECATED_REG_STRUCT_HAS_ADDR(gcc_p, type)",
890 XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR (gcc_p, type)));
a2428dbe 891#endif
48f7351b
AC
892 fprintf_unfiltered (file,
893 "gdbarch_dump: deprecated_reg_struct_has_addr = <0x%lx>\n",
894 (long) current_gdbarch->deprecated_reg_struct_has_addr);
62700349
AC
895#ifdef DEPRECATED_REGISTER_BYTE_P
896 fprintf_unfiltered (file,
897 "gdbarch_dump: %s # %s\n",
898 "DEPRECATED_REGISTER_BYTE_P()",
899 XSTRING (DEPRECATED_REGISTER_BYTE_P ()));
62700349 900#endif
48f7351b
AC
901 fprintf_unfiltered (file,
902 "gdbarch_dump: gdbarch_deprecated_register_byte_p() = %d\n",
903 gdbarch_deprecated_register_byte_p (current_gdbarch));
62700349
AC
904#ifdef DEPRECATED_REGISTER_BYTE
905 fprintf_unfiltered (file,
906 "gdbarch_dump: %s # %s\n",
907 "DEPRECATED_REGISTER_BYTE(reg_nr)",
908 XSTRING (DEPRECATED_REGISTER_BYTE (reg_nr)));
62700349 909#endif
48f7351b
AC
910 fprintf_unfiltered (file,
911 "gdbarch_dump: deprecated_register_byte = <0x%lx>\n",
912 (long) current_gdbarch->deprecated_register_byte);
b1e29e33
AC
913#ifdef DEPRECATED_REGISTER_SIZE
914 fprintf_unfiltered (file,
915 "gdbarch_dump: DEPRECATED_REGISTER_SIZE # %s\n",
916 XSTRING (DEPRECATED_REGISTER_SIZE));
b1e29e33 917#endif
48f7351b
AC
918 fprintf_unfiltered (file,
919 "gdbarch_dump: deprecated_register_size = %s\n",
920 paddr_d (current_gdbarch->deprecated_register_size));
f27dd7fd
AC
921#ifdef DEPRECATED_STACK_ALIGN_P
922 fprintf_unfiltered (file,
923 "gdbarch_dump: %s # %s\n",
924 "DEPRECATED_STACK_ALIGN_P()",
925 XSTRING (DEPRECATED_STACK_ALIGN_P ()));
f27dd7fd 926#endif
48f7351b
AC
927 fprintf_unfiltered (file,
928 "gdbarch_dump: gdbarch_deprecated_stack_align_p() = %d\n",
929 gdbarch_deprecated_stack_align_p (current_gdbarch));
f27dd7fd
AC
930#ifdef DEPRECATED_STACK_ALIGN
931 fprintf_unfiltered (file,
932 "gdbarch_dump: %s # %s\n",
933 "DEPRECATED_STACK_ALIGN(sp)",
934 XSTRING (DEPRECATED_STACK_ALIGN (sp)));
f27dd7fd 935#endif
48f7351b
AC
936 fprintf_unfiltered (file,
937 "gdbarch_dump: deprecated_stack_align = <0x%lx>\n",
938 (long) current_gdbarch->deprecated_stack_align);
ebba8386 939#ifdef DEPRECATED_STORE_RETURN_VALUE
ebba8386
AC
940 fprintf_unfiltered (file,
941 "gdbarch_dump: %s # %s\n",
942 "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
943 XSTRING (DEPRECATED_STORE_RETURN_VALUE (type, valbuf)));
ebba8386 944#endif
48f7351b
AC
945 fprintf_unfiltered (file,
946 "gdbarch_dump: deprecated_store_return_value = <0x%lx>\n",
947 (long) current_gdbarch->deprecated_store_return_value);
4183d812
AC
948#ifdef DEPRECATED_STORE_STRUCT_RETURN_P
949 fprintf_unfiltered (file,
950 "gdbarch_dump: %s # %s\n",
951 "DEPRECATED_STORE_STRUCT_RETURN_P()",
952 XSTRING (DEPRECATED_STORE_STRUCT_RETURN_P ()));
4183d812 953#endif
48f7351b
AC
954 fprintf_unfiltered (file,
955 "gdbarch_dump: gdbarch_deprecated_store_struct_return_p() = %d\n",
956 gdbarch_deprecated_store_struct_return_p (current_gdbarch));
4183d812 957#ifdef DEPRECATED_STORE_STRUCT_RETURN
4183d812
AC
958 fprintf_unfiltered (file,
959 "gdbarch_dump: %s # %s\n",
960 "DEPRECATED_STORE_STRUCT_RETURN(addr, sp)",
961 XSTRING (DEPRECATED_STORE_STRUCT_RETURN (addr, sp)));
4183d812 962#endif
48f7351b
AC
963 fprintf_unfiltered (file,
964 "gdbarch_dump: deprecated_store_struct_return = <0x%lx>\n",
965 (long) current_gdbarch->deprecated_store_struct_return);
b5622e8d
AC
966#ifdef DEPRECATED_USE_STRUCT_CONVENTION
967 fprintf_unfiltered (file,
968 "gdbarch_dump: %s # %s\n",
969 "DEPRECATED_USE_STRUCT_CONVENTION(gcc_p, value_type)",
970 XSTRING (DEPRECATED_USE_STRUCT_CONVENTION (gcc_p, value_type)));
b5622e8d 971#endif
48f7351b
AC
972 fprintf_unfiltered (file,
973 "gdbarch_dump: deprecated_use_struct_convention = <0x%lx>\n",
974 (long) current_gdbarch->deprecated_use_struct_convention);
a2428dbe
AC
975#ifdef TARGET_DOUBLE_BIT
976 fprintf_unfiltered (file,
977 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
978 XSTRING (TARGET_DOUBLE_BIT));
a2428dbe 979#endif
48f7351b
AC
980 fprintf_unfiltered (file,
981 "gdbarch_dump: double_bit = %s\n",
982 paddr_d (current_gdbarch->double_bit));
a2428dbe
AC
983#ifdef TARGET_DOUBLE_FORMAT
984 fprintf_unfiltered (file,
985 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
986 XSTRING (TARGET_DOUBLE_FORMAT));
48f7351b 987#endif
a2428dbe 988 fprintf_unfiltered (file,
48f7351b 989 "gdbarch_dump: double_format = %s\n",
456fcf94 990 pformat (current_gdbarch->double_format));
08e45a40 991#ifdef DWARF2_REG_TO_REGNUM
4b9b3959 992 fprintf_unfiltered (file,
08e45a40
AC
993 "gdbarch_dump: %s # %s\n",
994 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
995 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr)));
4b9b3959 996#endif
48f7351b
AC
997 fprintf_unfiltered (file,
998 "gdbarch_dump: dwarf2_reg_to_regnum = <0x%lx>\n",
999 (long) current_gdbarch->dwarf2_reg_to_regnum);
08e45a40 1000#ifdef DWARF_REG_TO_REGNUM
88c72b7d
AC
1001 fprintf_unfiltered (file,
1002 "gdbarch_dump: %s # %s\n",
08e45a40
AC
1003 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1004 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr)));
88c72b7d 1005#endif
48f7351b
AC
1006 fprintf_unfiltered (file,
1007 "gdbarch_dump: dwarf_reg_to_regnum = <0x%lx>\n",
1008 (long) current_gdbarch->dwarf_reg_to_regnum);
88c72b7d
AC
1009#ifdef ECOFF_REG_TO_REGNUM
1010 fprintf_unfiltered (file,
1011 "gdbarch_dump: %s # %s\n",
1012 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1013 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr)));
1014#endif
48f7351b
AC
1015 fprintf_unfiltered (file,
1016 "gdbarch_dump: ecoff_reg_to_regnum = <0x%lx>\n",
1017 (long) current_gdbarch->ecoff_reg_to_regnum);
a2cf933a 1018#ifdef ELF_MAKE_MSYMBOL_SPECIAL
a2cf933a
EZ
1019 fprintf_unfiltered (file,
1020 "gdbarch_dump: %s # %s\n",
1021 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1022 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym, msym)));
a2cf933a 1023#endif
48f7351b
AC
1024 fprintf_unfiltered (file,
1025 "gdbarch_dump: elf_make_msymbol_special = <0x%lx>\n",
1026 (long) current_gdbarch->elf_make_msymbol_special);
049ee0e4 1027#ifdef EXTRACT_RETURN_VALUE
049ee0e4
AC
1028 fprintf_unfiltered (file,
1029 "gdbarch_dump: %s # %s\n",
1030 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1031 XSTRING (EXTRACT_RETURN_VALUE (type, regcache, valbuf)));
049ee0e4 1032#endif
48f7351b
AC
1033 fprintf_unfiltered (file,
1034 "gdbarch_dump: extract_return_value = <0x%lx>\n",
1035 (long) current_gdbarch->extract_return_value);
143985b7
AF
1036#ifdef FETCH_POINTER_ARGUMENT_P
1037 fprintf_unfiltered (file,
1038 "gdbarch_dump: %s # %s\n",
1039 "FETCH_POINTER_ARGUMENT_P()",
1040 XSTRING (FETCH_POINTER_ARGUMENT_P ()));
143985b7 1041#endif
48f7351b
AC
1042 fprintf_unfiltered (file,
1043 "gdbarch_dump: gdbarch_fetch_pointer_argument_p() = %d\n",
1044 gdbarch_fetch_pointer_argument_p (current_gdbarch));
143985b7
AF
1045#ifdef FETCH_POINTER_ARGUMENT
1046 fprintf_unfiltered (file,
1047 "gdbarch_dump: %s # %s\n",
1048 "FETCH_POINTER_ARGUMENT(frame, argi, type)",
1049 XSTRING (FETCH_POINTER_ARGUMENT (frame, argi, type)));
143985b7 1050#endif
48f7351b
AC
1051 fprintf_unfiltered (file,
1052 "gdbarch_dump: fetch_pointer_argument = <0x%lx>\n",
1053 (long) current_gdbarch->fetch_pointer_argument);
b2756930
KB
1054#ifdef FETCH_TLS_LOAD_MODULE_ADDRESS_P
1055 fprintf_unfiltered (file,
1056 "gdbarch_dump: %s # %s\n",
1057 "FETCH_TLS_LOAD_MODULE_ADDRESS_P()",
1058 XSTRING (FETCH_TLS_LOAD_MODULE_ADDRESS_P ()));
1059#endif
1060 fprintf_unfiltered (file,
1061 "gdbarch_dump: gdbarch_fetch_tls_load_module_address_p() = %d\n",
1062 gdbarch_fetch_tls_load_module_address_p (current_gdbarch));
1063#ifdef FETCH_TLS_LOAD_MODULE_ADDRESS
1064 fprintf_unfiltered (file,
1065 "gdbarch_dump: %s # %s\n",
1066 "FETCH_TLS_LOAD_MODULE_ADDRESS(objfile)",
1067 XSTRING (FETCH_TLS_LOAD_MODULE_ADDRESS (objfile)));
1068#endif
1069 fprintf_unfiltered (file,
1070 "gdbarch_dump: fetch_tls_load_module_address = <0x%lx>\n",
1071 (long) current_gdbarch->fetch_tls_load_module_address);
a2428dbe
AC
1072#ifdef TARGET_FLOAT_BIT
1073 fprintf_unfiltered (file,
1074 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
1075 XSTRING (TARGET_FLOAT_BIT));
a2428dbe 1076#endif
48f7351b
AC
1077 fprintf_unfiltered (file,
1078 "gdbarch_dump: float_bit = %s\n",
1079 paddr_d (current_gdbarch->float_bit));
a2428dbe
AC
1080#ifdef TARGET_FLOAT_FORMAT
1081 fprintf_unfiltered (file,
1082 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1083 XSTRING (TARGET_FLOAT_FORMAT));
48f7351b 1084#endif
a2428dbe 1085 fprintf_unfiltered (file,
48f7351b 1086 "gdbarch_dump: float_format = %s\n",
456fcf94 1087 pformat (current_gdbarch->float_format));
08e45a40 1088#ifdef FP0_REGNUM
4b9b3959 1089 fprintf_unfiltered (file,
08e45a40
AC
1090 "gdbarch_dump: FP0_REGNUM # %s\n",
1091 XSTRING (FP0_REGNUM));
4b9b3959 1092#endif
48f7351b
AC
1093 fprintf_unfiltered (file,
1094 "gdbarch_dump: fp0_regnum = %s\n",
1095 paddr_d (current_gdbarch->fp0_regnum));
a2428dbe
AC
1096 fprintf_unfiltered (file,
1097 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
1098 gdbarch_frame_align_p (current_gdbarch));
1099 fprintf_unfiltered (file,
48f7351b 1100 "gdbarch_dump: frame_align = <0x%lx>\n",
a2428dbe 1101 (long) current_gdbarch->frame_align);
08e45a40 1102#ifdef FRAME_ARGS_SKIP
4b9b3959 1103 fprintf_unfiltered (file,
08e45a40
AC
1104 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1105 XSTRING (FRAME_ARGS_SKIP));
4b9b3959 1106#endif
48f7351b
AC
1107 fprintf_unfiltered (file,
1108 "gdbarch_dump: frame_args_skip = 0x%s\n",
1109 paddr_nz (current_gdbarch->frame_args_skip));
983a287a
AC
1110#ifdef FRAME_NUM_ARGS_P
1111 fprintf_unfiltered (file,
1112 "gdbarch_dump: %s # %s\n",
1113 "FRAME_NUM_ARGS_P()",
1114 XSTRING (FRAME_NUM_ARGS_P ()));
983a287a 1115#endif
48f7351b
AC
1116 fprintf_unfiltered (file,
1117 "gdbarch_dump: gdbarch_frame_num_args_p() = %d\n",
1118 gdbarch_frame_num_args_p (current_gdbarch));
08e45a40 1119#ifdef FRAME_NUM_ARGS
01fb7433
AC
1120 fprintf_unfiltered (file,
1121 "gdbarch_dump: %s # %s\n",
08e45a40
AC
1122 "FRAME_NUM_ARGS(frame)",
1123 XSTRING (FRAME_NUM_ARGS (frame)));
01fb7433 1124#endif
48f7351b
AC
1125 fprintf_unfiltered (file,
1126 "gdbarch_dump: frame_num_args = <0x%lx>\n",
1127 (long) current_gdbarch->frame_num_args);
8b148df9
AC
1128#ifdef FRAME_RED_ZONE_SIZE
1129 fprintf_unfiltered (file,
1130 "gdbarch_dump: FRAME_RED_ZONE_SIZE # %s\n",
1131 XSTRING (FRAME_RED_ZONE_SIZE));
8b148df9 1132#endif
48f7351b
AC
1133 fprintf_unfiltered (file,
1134 "gdbarch_dump: frame_red_zone_size = %s\n",
1135 paddr_d (current_gdbarch->frame_red_zone_size));
1e9f55d0
AC
1136#ifdef GET_LONGJMP_TARGET_P
1137 fprintf_unfiltered (file,
1138 "gdbarch_dump: %s # %s\n",
1139 "GET_LONGJMP_TARGET_P()",
1140 XSTRING (GET_LONGJMP_TARGET_P ()));
1e9f55d0 1141#endif
48f7351b
AC
1142 fprintf_unfiltered (file,
1143 "gdbarch_dump: gdbarch_get_longjmp_target_p() = %d\n",
1144 gdbarch_get_longjmp_target_p (current_gdbarch));
9df628e0
RE
1145#ifdef GET_LONGJMP_TARGET
1146 fprintf_unfiltered (file,
1147 "gdbarch_dump: %s # %s\n",
1148 "GET_LONGJMP_TARGET(pc)",
1149 XSTRING (GET_LONGJMP_TARGET (pc)));
9df628e0 1150#endif
48f7351b
AC
1151 fprintf_unfiltered (file,
1152 "gdbarch_dump: get_longjmp_target = <0x%lx>\n",
1153 (long) current_gdbarch->get_longjmp_target);
967c0d83 1154#ifdef HAVE_NONSTEPPABLE_WATCHPOINT
f74fa174 1155 fprintf_unfiltered (file,
967c0d83
MM
1156 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
1157 XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT));
f74fa174 1158#endif
a2428dbe 1159 fprintf_unfiltered (file,
48f7351b
AC
1160 "gdbarch_dump: have_nonsteppable_watchpoint = %s\n",
1161 paddr_d (current_gdbarch->have_nonsteppable_watchpoint));
1162 fprintf_unfiltered (file,
1163 "gdbarch_dump: in_function_epilogue_p = <0x%lx>\n",
a2428dbe 1164 (long) current_gdbarch->in_function_epilogue_p);
a2428dbe 1165#ifdef IN_SOLIB_RETURN_TRAMPOLINE
1e9f55d0
AC
1166 fprintf_unfiltered (file,
1167 "gdbarch_dump: %s # %s\n",
a2428dbe
AC
1168 "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1169 XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc, name)));
a2428dbe 1170#endif
48f7351b
AC
1171 fprintf_unfiltered (file,
1172 "gdbarch_dump: in_solib_return_trampoline = <0x%lx>\n",
1173 (long) current_gdbarch->in_solib_return_trampoline);
a2428dbe
AC
1174#ifdef INNER_THAN
1175 fprintf_unfiltered (file,
1176 "gdbarch_dump: %s # %s\n",
1177 "INNER_THAN(lhs, rhs)",
1178 XSTRING (INNER_THAN (lhs, rhs)));
a2428dbe 1179#endif
48f7351b
AC
1180 fprintf_unfiltered (file,
1181 "gdbarch_dump: inner_than = <0x%lx>\n",
1182 (long) current_gdbarch->inner_than);
a2428dbe
AC
1183#ifdef TARGET_INT_BIT
1184 fprintf_unfiltered (file,
1185 "gdbarch_dump: TARGET_INT_BIT # %s\n",
1186 XSTRING (TARGET_INT_BIT));
a2428dbe 1187#endif
48f7351b
AC
1188 fprintf_unfiltered (file,
1189 "gdbarch_dump: int_bit = %s\n",
1190 paddr_d (current_gdbarch->int_bit));
48f7351b
AC
1191 fprintf_unfiltered (file,
1192 "gdbarch_dump: gdbarch_integer_to_address_p() = %d\n",
1193 gdbarch_integer_to_address_p (current_gdbarch));
48f7351b
AC
1194 fprintf_unfiltered (file,
1195 "gdbarch_dump: integer_to_address = <0x%lx>\n",
1196 (long) current_gdbarch->integer_to_address);
a2428dbe 1197#ifdef TARGET_LONG_BIT
5e74b15c 1198 fprintf_unfiltered (file,
a2428dbe
AC
1199 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
1200 XSTRING (TARGET_LONG_BIT));
5e74b15c 1201#endif
48f7351b
AC
1202 fprintf_unfiltered (file,
1203 "gdbarch_dump: long_bit = %s\n",
1204 paddr_d (current_gdbarch->long_bit));
a2428dbe 1205#ifdef TARGET_LONG_DOUBLE_BIT
d50355b6 1206 fprintf_unfiltered (file,
a2428dbe
AC
1207 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
1208 XSTRING (TARGET_LONG_DOUBLE_BIT));
a2428dbe 1209#endif
48f7351b
AC
1210 fprintf_unfiltered (file,
1211 "gdbarch_dump: long_double_bit = %s\n",
1212 paddr_d (current_gdbarch->long_double_bit));
a2428dbe
AC
1213#ifdef TARGET_LONG_DOUBLE_FORMAT
1214 fprintf_unfiltered (file,
1215 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
1216 XSTRING (TARGET_LONG_DOUBLE_FORMAT));
48f7351b 1217#endif
a2428dbe 1218 fprintf_unfiltered (file,
48f7351b 1219 "gdbarch_dump: long_double_format = %s\n",
456fcf94 1220 pformat (current_gdbarch->long_double_format));
a2428dbe
AC
1221#ifdef TARGET_LONG_LONG_BIT
1222 fprintf_unfiltered (file,
1223 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
1224 XSTRING (TARGET_LONG_LONG_BIT));
d50355b6 1225#endif
48f7351b
AC
1226 fprintf_unfiltered (file,
1227 "gdbarch_dump: long_long_bit = %s\n",
1228 paddr_d (current_gdbarch->long_long_bit));
08e45a40 1229#ifdef MEMORY_INSERT_BREAKPOINT
4b9b3959
AC
1230 fprintf_unfiltered (file,
1231 "gdbarch_dump: %s # %s\n",
8181d85f
DJ
1232 "MEMORY_INSERT_BREAKPOINT(bp_tgt)",
1233 XSTRING (MEMORY_INSERT_BREAKPOINT (bp_tgt)));
4b9b3959 1234#endif
48f7351b
AC
1235 fprintf_unfiltered (file,
1236 "gdbarch_dump: memory_insert_breakpoint = <0x%lx>\n",
1237 (long) current_gdbarch->memory_insert_breakpoint);
08e45a40 1238#ifdef MEMORY_REMOVE_BREAKPOINT
4b9b3959
AC
1239 fprintf_unfiltered (file,
1240 "gdbarch_dump: %s # %s\n",
8181d85f
DJ
1241 "MEMORY_REMOVE_BREAKPOINT(bp_tgt)",
1242 XSTRING (MEMORY_REMOVE_BREAKPOINT (bp_tgt)));
4b9b3959 1243#endif
48f7351b
AC
1244 fprintf_unfiltered (file,
1245 "gdbarch_dump: memory_remove_breakpoint = <0x%lx>\n",
1246 (long) current_gdbarch->memory_remove_breakpoint);
5720643c
JB
1247#ifdef NAME_OF_MALLOC
1248 fprintf_unfiltered (file,
1249 "gdbarch_dump: NAME_OF_MALLOC # %s\n",
1250 XSTRING (NAME_OF_MALLOC));
48f7351b 1251#endif
5720643c 1252 fprintf_unfiltered (file,
48f7351b 1253 "gdbarch_dump: name_of_malloc = %s\n",
31deffe5 1254 NAME_OF_MALLOC);
08e45a40 1255#ifdef NUM_PSEUDO_REGS
4b9b3959 1256 fprintf_unfiltered (file,
08e45a40
AC
1257 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1258 XSTRING (NUM_PSEUDO_REGS));
4b9b3959 1259#endif
48f7351b
AC
1260 fprintf_unfiltered (file,
1261 "gdbarch_dump: num_pseudo_regs = %s\n",
1262 paddr_d (current_gdbarch->num_pseudo_regs));
08e45a40 1263#ifdef NUM_REGS
7f1b2585 1264 fprintf_unfiltered (file,
08e45a40
AC
1265 "gdbarch_dump: NUM_REGS # %s\n",
1266 XSTRING (NUM_REGS));
7f1b2585 1267#endif
48f7351b
AC
1268 fprintf_unfiltered (file,
1269 "gdbarch_dump: num_regs = %s\n",
1270 paddr_d (current_gdbarch->num_regs));
a2428dbe
AC
1271#ifdef TARGET_OSABI
1272 fprintf_unfiltered (file,
1273 "gdbarch_dump: TARGET_OSABI # %s\n",
1274 XSTRING (TARGET_OSABI));
a2428dbe 1275#endif
48f7351b
AC
1276 fprintf_unfiltered (file,
1277 "gdbarch_dump: osabi = %s\n",
1278 paddr_d (current_gdbarch->osabi));
08e45a40
AC
1279#ifdef PC_REGNUM
1280 fprintf_unfiltered (file,
1281 "gdbarch_dump: PC_REGNUM # %s\n",
1282 XSTRING (PC_REGNUM));
7f1b2585 1283#endif
48f7351b
AC
1284 fprintf_unfiltered (file,
1285 "gdbarch_dump: pc_regnum = %s\n",
1286 paddr_d (current_gdbarch->pc_regnum));
4b9b3959
AC
1287#ifdef POINTER_TO_ADDRESS
1288 fprintf_unfiltered (file,
1289 "gdbarch_dump: %s # %s\n",
1290 "POINTER_TO_ADDRESS(type, buf)",
1291 XSTRING (POINTER_TO_ADDRESS (type, buf)));
5e74b15c 1292#endif
48f7351b
AC
1293 fprintf_unfiltered (file,
1294 "gdbarch_dump: pointer_to_address = <0x%lx>\n",
1295 (long) current_gdbarch->pointer_to_address);
7996bcec
AC
1296 fprintf_unfiltered (file,
1297 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
1298 gdbarch_print_float_info_p (current_gdbarch));
1299 fprintf_unfiltered (file,
48f7351b 1300 "gdbarch_dump: print_float_info = <0x%lx>\n",
7996bcec 1301 (long) current_gdbarch->print_float_info);
a2428dbe
AC
1302#ifdef TARGET_PRINT_INSN
1303 fprintf_unfiltered (file,
1304 "gdbarch_dump: %s # %s\n",
1305 "TARGET_PRINT_INSN(vma, info)",
1306 XSTRING (TARGET_PRINT_INSN (vma, info)));
a2428dbe 1307#endif
7996bcec 1308 fprintf_unfiltered (file,
48f7351b
AC
1309 "gdbarch_dump: print_insn = <0x%lx>\n",
1310 (long) current_gdbarch->print_insn);
1311 fprintf_unfiltered (file,
1312 "gdbarch_dump: print_registers_info = <0x%lx>\n",
7996bcec
AC
1313 (long) current_gdbarch->print_registers_info);
1314 fprintf_unfiltered (file,
1315 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1316 gdbarch_print_vector_info_p (current_gdbarch));
1317 fprintf_unfiltered (file,
48f7351b 1318 "gdbarch_dump: print_vector_info = <0x%lx>\n",
7996bcec 1319 (long) current_gdbarch->print_vector_info);
c2169756
AC
1320#ifdef PS_REGNUM
1321 fprintf_unfiltered (file,
1322 "gdbarch_dump: PS_REGNUM # %s\n",
1323 XSTRING (PS_REGNUM));
a2428dbe 1324#endif
48f7351b
AC
1325 fprintf_unfiltered (file,
1326 "gdbarch_dump: ps_regnum = %s\n",
1327 paddr_d (current_gdbarch->ps_regnum));
a2428dbe
AC
1328 fprintf_unfiltered (file,
1329 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
1330 gdbarch_pseudo_register_read_p (current_gdbarch));
1331 fprintf_unfiltered (file,
48f7351b 1332 "gdbarch_dump: pseudo_register_read = <0x%lx>\n",
a2428dbe
AC
1333 (long) current_gdbarch->pseudo_register_read);
1334 fprintf_unfiltered (file,
1335 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
1336 gdbarch_pseudo_register_write_p (current_gdbarch));
1337 fprintf_unfiltered (file,
48f7351b 1338 "gdbarch_dump: pseudo_register_write = <0x%lx>\n",
a2428dbe
AC
1339 (long) current_gdbarch->pseudo_register_write);
1340#ifdef TARGET_PTR_BIT
1341 fprintf_unfiltered (file,
1342 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
1343 XSTRING (TARGET_PTR_BIT));
c2169756 1344#endif
48f7351b
AC
1345 fprintf_unfiltered (file,
1346 "gdbarch_dump: ptr_bit = %s\n",
1347 paddr_d (current_gdbarch->ptr_bit));
7996bcec
AC
1348 fprintf_unfiltered (file,
1349 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
1350 gdbarch_push_dummy_call_p (current_gdbarch));
1351 fprintf_unfiltered (file,
48f7351b 1352 "gdbarch_dump: push_dummy_call = <0x%lx>\n",
7996bcec
AC
1353 (long) current_gdbarch->push_dummy_call);
1354 fprintf_unfiltered (file,
1355 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
1356 gdbarch_push_dummy_code_p (current_gdbarch));
1357 fprintf_unfiltered (file,
48f7351b 1358 "gdbarch_dump: push_dummy_code = <0x%lx>\n",
7996bcec 1359 (long) current_gdbarch->push_dummy_code);
a2428dbe
AC
1360#ifdef TARGET_READ_PC_P
1361 fprintf_unfiltered (file,
1362 "gdbarch_dump: %s # %s\n",
1363 "TARGET_READ_PC_P()",
1364 XSTRING (TARGET_READ_PC_P ()));
a2428dbe 1365#endif
48f7351b
AC
1366 fprintf_unfiltered (file,
1367 "gdbarch_dump: gdbarch_read_pc_p() = %d\n",
1368 gdbarch_read_pc_p (current_gdbarch));
a2428dbe
AC
1369#ifdef TARGET_READ_PC
1370 fprintf_unfiltered (file,
1371 "gdbarch_dump: %s # %s\n",
1372 "TARGET_READ_PC(ptid)",
1373 XSTRING (TARGET_READ_PC (ptid)));
a2428dbe 1374#endif
48f7351b
AC
1375 fprintf_unfiltered (file,
1376 "gdbarch_dump: read_pc = <0x%lx>\n",
1377 (long) current_gdbarch->read_pc);
a2428dbe
AC
1378#ifdef TARGET_READ_SP_P
1379 fprintf_unfiltered (file,
1380 "gdbarch_dump: %s # %s\n",
1381 "TARGET_READ_SP_P()",
1382 XSTRING (TARGET_READ_SP_P ()));
a2428dbe 1383#endif
48f7351b
AC
1384 fprintf_unfiltered (file,
1385 "gdbarch_dump: gdbarch_read_sp_p() = %d\n",
1386 gdbarch_read_sp_p (current_gdbarch));
a2428dbe
AC
1387#ifdef TARGET_READ_SP
1388 fprintf_unfiltered (file,
1389 "gdbarch_dump: %s # %s\n",
1390 "TARGET_READ_SP()",
1391 XSTRING (TARGET_READ_SP ()));
a2428dbe 1392#endif
48f7351b
AC
1393 fprintf_unfiltered (file,
1394 "gdbarch_dump: read_sp = <0x%lx>\n",
1395 (long) current_gdbarch->read_sp);
1e9f55d0
AC
1396#ifdef REGISTER_BYTES_OK_P
1397 fprintf_unfiltered (file,
1398 "gdbarch_dump: %s # %s\n",
1399 "REGISTER_BYTES_OK_P()",
1400 XSTRING (REGISTER_BYTES_OK_P ()));
1e9f55d0 1401#endif
48f7351b
AC
1402 fprintf_unfiltered (file,
1403 "gdbarch_dump: gdbarch_register_bytes_ok_p() = %d\n",
1404 gdbarch_register_bytes_ok_p (current_gdbarch));
08e45a40 1405#ifdef REGISTER_BYTES_OK
4b9b3959
AC
1406 fprintf_unfiltered (file,
1407 "gdbarch_dump: %s # %s\n",
08e45a40
AC
1408 "REGISTER_BYTES_OK(nr_bytes)",
1409 XSTRING (REGISTER_BYTES_OK (nr_bytes)));
4b9b3959 1410#endif
48f7351b
AC
1411 fprintf_unfiltered (file,
1412 "gdbarch_dump: register_bytes_ok = <0x%lx>\n",
1413 (long) current_gdbarch->register_bytes_ok);
08e45a40 1414#ifdef REGISTER_NAME
4b9b3959
AC
1415 fprintf_unfiltered (file,
1416 "gdbarch_dump: %s # %s\n",
08e45a40
AC
1417 "REGISTER_NAME(regnr)",
1418 XSTRING (REGISTER_NAME (regnr)));
4b9b3959 1419#endif
a2428dbe 1420 fprintf_unfiltered (file,
48f7351b
AC
1421 "gdbarch_dump: register_name = <0x%lx>\n",
1422 (long) current_gdbarch->register_name);
1423 fprintf_unfiltered (file,
1424 "gdbarch_dump: register_reggroup_p = <0x%lx>\n",
a2428dbe 1425 (long) current_gdbarch->register_reggroup_p);
08e45a40 1426#ifdef REGISTER_SIM_REGNO
4b9b3959
AC
1427 fprintf_unfiltered (file,
1428 "gdbarch_dump: %s # %s\n",
08e45a40
AC
1429 "REGISTER_SIM_REGNO(reg_nr)",
1430 XSTRING (REGISTER_SIM_REGNO (reg_nr)));
4b9b3959 1431#endif
48f7351b
AC
1432 fprintf_unfiltered (file,
1433 "gdbarch_dump: register_sim_regno = <0x%lx>\n",
1434 (long) current_gdbarch->register_sim_regno);
13d01224 1435#ifdef REGISTER_TO_VALUE
13d01224
AC
1436 fprintf_unfiltered (file,
1437 "gdbarch_dump: %s # %s\n",
ff2e87ac
AC
1438 "REGISTER_TO_VALUE(frame, regnum, type, buf)",
1439 XSTRING (REGISTER_TO_VALUE (frame, regnum, type, buf)));
13d01224 1440#endif
48f7351b
AC
1441 fprintf_unfiltered (file,
1442 "gdbarch_dump: register_to_value = <0x%lx>\n",
1443 (long) current_gdbarch->register_to_value);
7996bcec
AC
1444 fprintf_unfiltered (file,
1445 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
1446 gdbarch_register_type_p (current_gdbarch));
1447 fprintf_unfiltered (file,
48f7351b 1448 "gdbarch_dump: register_type = <0x%lx>\n",
7996bcec 1449 (long) current_gdbarch->register_type);
a2428dbe
AC
1450 fprintf_unfiltered (file,
1451 "gdbarch_dump: gdbarch_regset_from_core_section_p() = %d\n",
1452 gdbarch_regset_from_core_section_p (current_gdbarch));
1453 fprintf_unfiltered (file,
48f7351b 1454 "gdbarch_dump: regset_from_core_section = <0x%lx>\n",
a2428dbe 1455 (long) current_gdbarch->regset_from_core_section);
7996bcec 1456 fprintf_unfiltered (file,
48f7351b 1457 "gdbarch_dump: remote_translate_xfer_address = <0x%lx>\n",
7996bcec 1458 (long) current_gdbarch->remote_translate_xfer_address);
a2428dbe
AC
1459 fprintf_unfiltered (file,
1460 "gdbarch_dump: gdbarch_return_value_p() = %d\n",
1461 gdbarch_return_value_p (current_gdbarch));
1462 fprintf_unfiltered (file,
48f7351b 1463 "gdbarch_dump: return_value = <0x%lx>\n",
a2428dbe 1464 (long) current_gdbarch->return_value);
08e45a40 1465#ifdef SDB_REG_TO_REGNUM
4b9b3959
AC
1466 fprintf_unfiltered (file,
1467 "gdbarch_dump: %s # %s\n",
08e45a40
AC
1468 "SDB_REG_TO_REGNUM(sdb_regnr)",
1469 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr)));
4b9b3959 1470#endif
48f7351b
AC
1471 fprintf_unfiltered (file,
1472 "gdbarch_dump: sdb_reg_to_regnum = <0x%lx>\n",
1473 (long) current_gdbarch->sdb_reg_to_regnum);
a2428dbe
AC
1474#ifdef TARGET_SHORT_BIT
1475 fprintf_unfiltered (file,
1476 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
1477 XSTRING (TARGET_SHORT_BIT));
a2428dbe 1478#endif
48f7351b
AC
1479 fprintf_unfiltered (file,
1480 "gdbarch_dump: short_bit = %s\n",
1481 paddr_d (current_gdbarch->short_bit));
3352ef37
AC
1482 fprintf_unfiltered (file,
1483 "gdbarch_dump: gdbarch_single_step_through_delay_p() = %d\n",
1484 gdbarch_single_step_through_delay_p (current_gdbarch));
1485 fprintf_unfiltered (file,
1486 "gdbarch_dump: single_step_through_delay = <0x%lx>\n",
1487 (long) current_gdbarch->single_step_through_delay);
08e45a40 1488#ifdef SKIP_PROLOGUE
4b9b3959
AC
1489 fprintf_unfiltered (file,
1490 "gdbarch_dump: %s # %s\n",
08e45a40
AC
1491 "SKIP_PROLOGUE(ip)",
1492 XSTRING (SKIP_PROLOGUE (ip)));
4b9b3959 1493#endif
dea0c52f 1494 fprintf_unfiltered (file,
48f7351b
AC
1495 "gdbarch_dump: skip_prologue = <0x%lx>\n",
1496 (long) current_gdbarch->skip_prologue);
1497 fprintf_unfiltered (file,
1498 "gdbarch_dump: skip_solib_resolver = <0x%lx>\n",
4c8c40e6 1499 (long) current_gdbarch->skip_solib_resolver);
08e45a40 1500#ifdef SKIP_TRAMPOLINE_CODE
4b9b3959
AC
1501 fprintf_unfiltered (file,
1502 "gdbarch_dump: %s # %s\n",
08e45a40
AC
1503 "SKIP_TRAMPOLINE_CODE(pc)",
1504 XSTRING (SKIP_TRAMPOLINE_CODE (pc)));
4b9b3959 1505#endif
48f7351b
AC
1506 fprintf_unfiltered (file,
1507 "gdbarch_dump: skip_trampoline_code = <0x%lx>\n",
1508 (long) current_gdbarch->skip_trampoline_code);
181c1381
RE
1509#ifdef SMASH_TEXT_ADDRESS
1510 fprintf_unfiltered (file,
1511 "gdbarch_dump: %s # %s\n",
1512 "SMASH_TEXT_ADDRESS(addr)",
1513 XSTRING (SMASH_TEXT_ADDRESS (addr)));
181c1381 1514#endif
48f7351b
AC
1515 fprintf_unfiltered (file,
1516 "gdbarch_dump: smash_text_address = <0x%lx>\n",
1517 (long) current_gdbarch->smash_text_address);
1e9f55d0
AC
1518#ifdef SOFTWARE_SINGLE_STEP_P
1519 fprintf_unfiltered (file,
1520 "gdbarch_dump: %s # %s\n",
1521 "SOFTWARE_SINGLE_STEP_P()",
1522 XSTRING (SOFTWARE_SINGLE_STEP_P ()));
1e9f55d0 1523#endif
48f7351b
AC
1524 fprintf_unfiltered (file,
1525 "gdbarch_dump: gdbarch_software_single_step_p() = %d\n",
1526 gdbarch_software_single_step_p (current_gdbarch));
08e45a40 1527#ifdef SOFTWARE_SINGLE_STEP
4b9b3959
AC
1528 fprintf_unfiltered (file,
1529 "gdbarch_dump: %s # %s\n",
08e45a40
AC
1530 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1531 XSTRING (SOFTWARE_SINGLE_STEP (sig, insert_breakpoints_p)));
08e45a40 1532#endif
48f7351b
AC
1533 fprintf_unfiltered (file,
1534 "gdbarch_dump: software_single_step = <0x%lx>\n",
1535 (long) current_gdbarch->software_single_step);
08e45a40 1536#ifdef SP_REGNUM
1dd4193b 1537 fprintf_unfiltered (file,
08e45a40
AC
1538 "gdbarch_dump: SP_REGNUM # %s\n",
1539 XSTRING (SP_REGNUM));
1dd4193b 1540#endif
48f7351b
AC
1541 fprintf_unfiltered (file,
1542 "gdbarch_dump: sp_regnum = %s\n",
1543 paddr_d (current_gdbarch->sp_regnum));
08e45a40 1544#ifdef STAB_REG_TO_REGNUM
4b9b3959
AC
1545 fprintf_unfiltered (file,
1546 "gdbarch_dump: %s # %s\n",
08e45a40
AC
1547 "STAB_REG_TO_REGNUM(stab_regnr)",
1548 XSTRING (STAB_REG_TO_REGNUM (stab_regnr)));
4b9b3959 1549#endif
a2428dbe 1550 fprintf_unfiltered (file,
48f7351b
AC
1551 "gdbarch_dump: stab_reg_to_regnum = <0x%lx>\n",
1552 (long) current_gdbarch->stab_reg_to_regnum);
1553 fprintf_unfiltered (file,
1554 "gdbarch_dump: stabs_argument_has_addr = <0x%lx>\n",
a2428dbe 1555 (long) current_gdbarch->stabs_argument_has_addr);
08e45a40 1556#ifdef STORE_RETURN_VALUE
f517ea4e
PS
1557 fprintf_unfiltered (file,
1558 "gdbarch_dump: %s # %s\n",
ebba8386
AC
1559 "STORE_RETURN_VALUE(type, regcache, valbuf)",
1560 XSTRING (STORE_RETURN_VALUE (type, regcache, valbuf)));
875e1767 1561#endif
48f7351b
AC
1562 fprintf_unfiltered (file,
1563 "gdbarch_dump: store_return_value = <0x%lx>\n",
1564 (long) current_gdbarch->store_return_value);
7996bcec 1565 fprintf_unfiltered (file,
a2428dbe
AC
1566 "gdbarch_dump: gdbarch_unwind_dummy_id_p() = %d\n",
1567 gdbarch_unwind_dummy_id_p (current_gdbarch));
cde9ea48 1568 fprintf_unfiltered (file,
48f7351b 1569 "gdbarch_dump: unwind_dummy_id = <0x%lx>\n",
a2428dbe 1570 (long) current_gdbarch->unwind_dummy_id);
08e45a40 1571 fprintf_unfiltered (file,
a2428dbe
AC
1572 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
1573 gdbarch_unwind_pc_p (current_gdbarch));
7996bcec 1574 fprintf_unfiltered (file,
48f7351b 1575 "gdbarch_dump: unwind_pc = <0x%lx>\n",
a2428dbe 1576 (long) current_gdbarch->unwind_pc);
bd1ce8ba 1577 fprintf_unfiltered (file,
a2428dbe
AC
1578 "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
1579 gdbarch_unwind_sp_p (current_gdbarch));
bd1ce8ba 1580 fprintf_unfiltered (file,
48f7351b 1581 "gdbarch_dump: unwind_sp = <0x%lx>\n",
a2428dbe
AC
1582 (long) current_gdbarch->unwind_sp);
1583#ifdef VALUE_TO_REGISTER
08e45a40
AC
1584 fprintf_unfiltered (file,
1585 "gdbarch_dump: %s # %s\n",
a2428dbe
AC
1586 "VALUE_TO_REGISTER(frame, regnum, type, buf)",
1587 XSTRING (VALUE_TO_REGISTER (frame, regnum, type, buf)));
39d4ef09 1588#endif
48f7351b
AC
1589 fprintf_unfiltered (file,
1590 "gdbarch_dump: value_to_register = <0x%lx>\n",
1591 (long) current_gdbarch->value_to_register);
39d4ef09 1592#ifdef TARGET_VIRTUAL_FRAME_POINTER
08e45a40
AC
1593 fprintf_unfiltered (file,
1594 "gdbarch_dump: %s # %s\n",
1595 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
1596 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc, frame_regnum, frame_offset)));
381323f4 1597#endif
48f7351b
AC
1598 fprintf_unfiltered (file,
1599 "gdbarch_dump: virtual_frame_pointer = <0x%lx>\n",
1600 (long) current_gdbarch->virtual_frame_pointer);
08e45a40 1601#ifdef TARGET_WRITE_PC
4b9b3959 1602 fprintf_unfiltered (file,
08e45a40
AC
1603 "gdbarch_dump: %s # %s\n",
1604 "TARGET_WRITE_PC(val, ptid)",
1605 XSTRING (TARGET_WRITE_PC (val, ptid)));
381323f4 1606#endif
48f7351b
AC
1607 fprintf_unfiltered (file,
1608 "gdbarch_dump: write_pc = <0x%lx>\n",
1609 (long) current_gdbarch->write_pc);
4b9b3959
AC
1610 if (current_gdbarch->dump_tdep != NULL)
1611 current_gdbarch->dump_tdep (current_gdbarch, file);
0f71a2f6
JM
1612}
1613
1614struct gdbarch_tdep *
104c1213 1615gdbarch_tdep (struct gdbarch *gdbarch)
0f71a2f6
JM
1616{
1617 if (gdbarch_debug >= 2)
0f71a2f6
JM
1618 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
1619 return gdbarch->tdep;
1620}
1621
1622
1623const struct bfd_arch_info *
104c1213 1624gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
0f71a2f6 1625{
8de9bdc4 1626 gdb_assert (gdbarch != NULL);
0f71a2f6 1627 if (gdbarch_debug >= 2)
0f71a2f6
JM
1628 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
1629 return gdbarch->bfd_arch_info;
1630}
1631
1632int
104c1213 1633gdbarch_byte_order (struct gdbarch *gdbarch)
0f71a2f6 1634{
8de9bdc4 1635 gdb_assert (gdbarch != NULL);
0f71a2f6 1636 if (gdbarch_debug >= 2)
0f71a2f6
JM
1637 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
1638 return gdbarch->byte_order;
1639}
1640
4be87837
DJ
1641enum gdb_osabi
1642gdbarch_osabi (struct gdbarch *gdbarch)
1643{
1644 gdb_assert (gdbarch != NULL);
1645 if (gdbarch_debug >= 2)
1646 fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n");
1647 return gdbarch->osabi;
1648}
1649
0f71a2f6 1650int
104c1213 1651gdbarch_short_bit (struct gdbarch *gdbarch)
0f71a2f6 1652{
8de9bdc4 1653 gdb_assert (gdbarch != NULL);
66b43ecb 1654 /* Skip verify of short_bit, invalid_p == 0 */
0f71a2f6 1655 if (gdbarch_debug >= 2)
0f71a2f6
JM
1656 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
1657 return gdbarch->short_bit;
1658}
1659
1660void
104c1213
JM
1661set_gdbarch_short_bit (struct gdbarch *gdbarch,
1662 int short_bit)
0f71a2f6
JM
1663{
1664 gdbarch->short_bit = short_bit;
1665}
1666
1667int
104c1213 1668gdbarch_int_bit (struct gdbarch *gdbarch)
0f71a2f6 1669{
8de9bdc4 1670 gdb_assert (gdbarch != NULL);
66b43ecb 1671 /* Skip verify of int_bit, invalid_p == 0 */
0f71a2f6 1672 if (gdbarch_debug >= 2)
0f71a2f6
JM
1673 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
1674 return gdbarch->int_bit;
1675}
1676
1677void
104c1213
JM
1678set_gdbarch_int_bit (struct gdbarch *gdbarch,
1679 int int_bit)
0f71a2f6
JM
1680{
1681 gdbarch->int_bit = int_bit;
1682}
1683
1684int
104c1213 1685gdbarch_long_bit (struct gdbarch *gdbarch)
0f71a2f6 1686{
8de9bdc4 1687 gdb_assert (gdbarch != NULL);
66b43ecb 1688 /* Skip verify of long_bit, invalid_p == 0 */
0f71a2f6 1689 if (gdbarch_debug >= 2)
0f71a2f6
JM
1690 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
1691 return gdbarch->long_bit;
1692}
1693
1694void
104c1213
JM
1695set_gdbarch_long_bit (struct gdbarch *gdbarch,
1696 int long_bit)
0f71a2f6
JM
1697{
1698 gdbarch->long_bit = long_bit;
1699}
1700
1701int
104c1213 1702gdbarch_long_long_bit (struct gdbarch *gdbarch)
0f71a2f6 1703{
8de9bdc4 1704 gdb_assert (gdbarch != NULL);
66b43ecb 1705 /* Skip verify of long_long_bit, invalid_p == 0 */
0f71a2f6 1706 if (gdbarch_debug >= 2)
0f71a2f6
JM
1707 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
1708 return gdbarch->long_long_bit;
1709}
1710
1711void
104c1213
JM
1712set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
1713 int long_long_bit)
0f71a2f6
JM
1714{
1715 gdbarch->long_long_bit = long_long_bit;
1716}
1717
1718int
104c1213 1719gdbarch_float_bit (struct gdbarch *gdbarch)
0f71a2f6 1720{
8de9bdc4 1721 gdb_assert (gdbarch != NULL);
66b43ecb 1722 /* Skip verify of float_bit, invalid_p == 0 */
0f71a2f6 1723 if (gdbarch_debug >= 2)
0f71a2f6
JM
1724 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
1725 return gdbarch->float_bit;
1726}
1727
1728void
104c1213
JM
1729set_gdbarch_float_bit (struct gdbarch *gdbarch,
1730 int float_bit)
0f71a2f6
JM
1731{
1732 gdbarch->float_bit = float_bit;
1733}
1734
456fcf94
AC
1735const struct floatformat *
1736gdbarch_float_format (struct gdbarch *gdbarch)
1737{
1738 gdb_assert (gdbarch != NULL);
1739 if (gdbarch_debug >= 2)
1740 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
1741 return gdbarch->float_format;
1742}
1743
1744void
1745set_gdbarch_float_format (struct gdbarch *gdbarch,
1746 const struct floatformat * float_format)
1747{
1748 gdbarch->float_format = float_format;
1749}
1750
0f71a2f6 1751int
104c1213 1752gdbarch_double_bit (struct gdbarch *gdbarch)
0f71a2f6 1753{
8de9bdc4 1754 gdb_assert (gdbarch != NULL);
66b43ecb 1755 /* Skip verify of double_bit, invalid_p == 0 */
0f71a2f6 1756 if (gdbarch_debug >= 2)
0f71a2f6
JM
1757 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
1758 return gdbarch->double_bit;
1759}
1760
1761void
104c1213
JM
1762set_gdbarch_double_bit (struct gdbarch *gdbarch,
1763 int double_bit)
0f71a2f6
JM
1764{
1765 gdbarch->double_bit = double_bit;
1766}
1767
456fcf94
AC
1768const struct floatformat *
1769gdbarch_double_format (struct gdbarch *gdbarch)
1770{
1771 gdb_assert (gdbarch != NULL);
1772 if (gdbarch_debug >= 2)
1773 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
1774 return gdbarch->double_format;
1775}
1776
1777void
1778set_gdbarch_double_format (struct gdbarch *gdbarch,
1779 const struct floatformat * double_format)
1780{
1781 gdbarch->double_format = double_format;
1782}
1783
0f71a2f6 1784int
104c1213 1785gdbarch_long_double_bit (struct gdbarch *gdbarch)
0f71a2f6 1786{
8de9bdc4 1787 gdb_assert (gdbarch != NULL);
66b43ecb 1788 /* Skip verify of long_double_bit, invalid_p == 0 */
0f71a2f6 1789 if (gdbarch_debug >= 2)
0f71a2f6
JM
1790 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
1791 return gdbarch->long_double_bit;
1792}
1793
1794void
104c1213
JM
1795set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
1796 int long_double_bit)
0f71a2f6
JM
1797{
1798 gdbarch->long_double_bit = long_double_bit;
1799}
1800
456fcf94
AC
1801const struct floatformat *
1802gdbarch_long_double_format (struct gdbarch *gdbarch)
1803{
1804 gdb_assert (gdbarch != NULL);
1805 if (gdbarch_debug >= 2)
1806 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
1807 return gdbarch->long_double_format;
1808}
1809
1810void
1811set_gdbarch_long_double_format (struct gdbarch *gdbarch,
1812 const struct floatformat * long_double_format)
1813{
1814 gdbarch->long_double_format = long_double_format;
1815}
1816
66b43ecb
AC
1817int
1818gdbarch_ptr_bit (struct gdbarch *gdbarch)
1819{
8de9bdc4 1820 gdb_assert (gdbarch != NULL);
66b43ecb
AC
1821 /* Skip verify of ptr_bit, invalid_p == 0 */
1822 if (gdbarch_debug >= 2)
1823 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
1824 return gdbarch->ptr_bit;
1825}
1826
1827void
1828set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
1829 int ptr_bit)
1830{
1831 gdbarch->ptr_bit = ptr_bit;
1832}
1833
52204a0b
DT
1834int
1835gdbarch_addr_bit (struct gdbarch *gdbarch)
1836{
8de9bdc4 1837 gdb_assert (gdbarch != NULL);
956ac328
AC
1838 /* Check variable changed from pre-default. */
1839 gdb_assert (gdbarch->addr_bit != 0);
52204a0b
DT
1840 if (gdbarch_debug >= 2)
1841 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
1842 return gdbarch->addr_bit;
1843}
1844
1845void
1846set_gdbarch_addr_bit (struct gdbarch *gdbarch,
1847 int addr_bit)
1848{
1849 gdbarch->addr_bit = addr_bit;
1850}
1851
66b43ecb
AC
1852int
1853gdbarch_bfd_vma_bit (struct gdbarch *gdbarch)
1854{
8de9bdc4 1855 gdb_assert (gdbarch != NULL);
66b43ecb
AC
1856 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
1857 if (gdbarch_debug >= 2)
1858 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n");
1859 return gdbarch->bfd_vma_bit;
1860}
1861
1862void
1863set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch,
1864 int bfd_vma_bit)
1865{
1866 gdbarch->bfd_vma_bit = bfd_vma_bit;
1867}
1868
4e409299
JB
1869int
1870gdbarch_char_signed (struct gdbarch *gdbarch)
1871{
8de9bdc4 1872 gdb_assert (gdbarch != NULL);
956ac328
AC
1873 /* Check variable changed from pre-default. */
1874 gdb_assert (gdbarch->char_signed != -1);
4e409299
JB
1875 if (gdbarch_debug >= 2)
1876 fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
1877 return gdbarch->char_signed;
1878}
1879
1880void
1881set_gdbarch_char_signed (struct gdbarch *gdbarch,
1882 int char_signed)
1883{
1884 gdbarch->char_signed = char_signed;
1885}
1886
cde9ea48
AC
1887int
1888gdbarch_read_pc_p (struct gdbarch *gdbarch)
1889{
1890 gdb_assert (gdbarch != NULL);
956ac328 1891 return gdbarch->read_pc != NULL;
cde9ea48
AC
1892}
1893
0f71a2f6 1894CORE_ADDR
39f77062 1895gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid)
0f71a2f6 1896{
8de9bdc4 1897 gdb_assert (gdbarch != NULL);
956ac328 1898 gdb_assert (gdbarch->read_pc != NULL);
0f71a2f6 1899 if (gdbarch_debug >= 2)
0f71a2f6 1900 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
39f77062 1901 return gdbarch->read_pc (ptid);
0f71a2f6
JM
1902}
1903
1904void
104c1213
JM
1905set_gdbarch_read_pc (struct gdbarch *gdbarch,
1906 gdbarch_read_pc_ftype read_pc)
0f71a2f6
JM
1907{
1908 gdbarch->read_pc = read_pc;
1909}
1910
1911void
39f77062 1912gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid)
0f71a2f6 1913{
8de9bdc4 1914 gdb_assert (gdbarch != NULL);
956ac328 1915 gdb_assert (gdbarch->write_pc != NULL);
0f71a2f6 1916 if (gdbarch_debug >= 2)
0f71a2f6 1917 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
39f77062 1918 gdbarch->write_pc (val, ptid);
0f71a2f6
JM
1919}
1920
1921void
104c1213
JM
1922set_gdbarch_write_pc (struct gdbarch *gdbarch,
1923 gdbarch_write_pc_ftype write_pc)
0f71a2f6
JM
1924{
1925 gdbarch->write_pc = write_pc;
1926}
1927
bd1ce8ba
AC
1928int
1929gdbarch_read_sp_p (struct gdbarch *gdbarch)
1930{
1931 gdb_assert (gdbarch != NULL);
956ac328 1932 return gdbarch->read_sp != NULL;
bd1ce8ba
AC
1933}
1934
0f71a2f6
JM
1935CORE_ADDR
1936gdbarch_read_sp (struct gdbarch *gdbarch)
1937{
8de9bdc4 1938 gdb_assert (gdbarch != NULL);
956ac328 1939 gdb_assert (gdbarch->read_sp != NULL);
0f71a2f6 1940 if (gdbarch_debug >= 2)
0f71a2f6
JM
1941 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
1942 return gdbarch->read_sp ();
1943}
1944
1945void
104c1213
JM
1946set_gdbarch_read_sp (struct gdbarch *gdbarch,
1947 gdbarch_read_sp_ftype read_sp)
0f71a2f6
JM
1948{
1949 gdbarch->read_sp = read_sp;
1950}
1951
39d4ef09
AC
1952void
1953gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
1954{
8de9bdc4 1955 gdb_assert (gdbarch != NULL);
956ac328 1956 gdb_assert (gdbarch->virtual_frame_pointer != NULL);
39d4ef09
AC
1957 if (gdbarch_debug >= 2)
1958 fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
1959 gdbarch->virtual_frame_pointer (pc, frame_regnum, frame_offset);
1960}
1961
1962void
1963set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
1964 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
1965{
1966 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
1967}
1968
61a0eb5b 1969int
d8124050 1970gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
61a0eb5b 1971{
8de9bdc4 1972 gdb_assert (gdbarch != NULL);
956ac328 1973 return gdbarch->pseudo_register_read != NULL;
61a0eb5b
AC
1974}
1975
1976void
b60c417a 1977gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, gdb_byte *buf)
61a0eb5b 1978{
8de9bdc4 1979 gdb_assert (gdbarch != NULL);
956ac328 1980 gdb_assert (gdbarch->pseudo_register_read != NULL);
61a0eb5b 1981 if (gdbarch_debug >= 2)
d8124050
AC
1982 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
1983 gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
61a0eb5b
AC
1984}
1985
1986void
d8124050
AC
1987set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
1988 gdbarch_pseudo_register_read_ftype pseudo_register_read)
61a0eb5b 1989{
d8124050 1990 gdbarch->pseudo_register_read = pseudo_register_read;
61a0eb5b
AC
1991}
1992
1993int
d8124050 1994gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
61a0eb5b 1995{
8de9bdc4 1996 gdb_assert (gdbarch != NULL);
956ac328 1997 return gdbarch->pseudo_register_write != NULL;
61a0eb5b
AC
1998}
1999
2000void
b60c417a 2001gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const gdb_byte *buf)
61a0eb5b 2002{
8de9bdc4 2003 gdb_assert (gdbarch != NULL);
956ac328 2004 gdb_assert (gdbarch->pseudo_register_write != NULL);
61a0eb5b 2005 if (gdbarch_debug >= 2)
d8124050
AC
2006 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
2007 gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
61a0eb5b
AC
2008}
2009
2010void
d8124050
AC
2011set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
2012 gdbarch_pseudo_register_write_ftype pseudo_register_write)
61a0eb5b 2013{
d8124050 2014 gdbarch->pseudo_register_write = pseudo_register_write;
61a0eb5b
AC
2015}
2016
0f71a2f6 2017int
104c1213 2018gdbarch_num_regs (struct gdbarch *gdbarch)
0f71a2f6 2019{
8de9bdc4 2020 gdb_assert (gdbarch != NULL);
956ac328
AC
2021 /* Check variable changed from pre-default. */
2022 gdb_assert (gdbarch->num_regs != -1);
0f71a2f6 2023 if (gdbarch_debug >= 2)
0f71a2f6
JM
2024 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
2025 return gdbarch->num_regs;
2026}
2027
2028void
104c1213
JM
2029set_gdbarch_num_regs (struct gdbarch *gdbarch,
2030 int num_regs)
0f71a2f6
JM
2031{
2032 gdbarch->num_regs = num_regs;
2033}
2034
0aba1244
EZ
2035int
2036gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
2037{
8de9bdc4 2038 gdb_assert (gdbarch != NULL);
0aba1244
EZ
2039 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2040 if (gdbarch_debug >= 2)
2041 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
2042 return gdbarch->num_pseudo_regs;
2043}
2044
2045void
2046set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
2047 int num_pseudo_regs)
2048{
2049 gdbarch->num_pseudo_regs = num_pseudo_regs;
2050}
2051
0f71a2f6 2052int
104c1213 2053gdbarch_sp_regnum (struct gdbarch *gdbarch)
0f71a2f6 2054{
8de9bdc4 2055 gdb_assert (gdbarch != NULL);
1200cd6e 2056 /* Skip verify of sp_regnum, invalid_p == 0 */
0f71a2f6 2057 if (gdbarch_debug >= 2)
0f71a2f6
JM
2058 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
2059 return gdbarch->sp_regnum;
2060}
2061
2062void
104c1213
JM
2063set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
2064 int sp_regnum)
0f71a2f6
JM
2065{
2066 gdbarch->sp_regnum = sp_regnum;
2067}
2068
0f71a2f6 2069int
104c1213 2070gdbarch_pc_regnum (struct gdbarch *gdbarch)
0f71a2f6 2071{
8de9bdc4 2072 gdb_assert (gdbarch != NULL);
1200cd6e 2073 /* Skip verify of pc_regnum, invalid_p == 0 */
0f71a2f6 2074 if (gdbarch_debug >= 2)
0f71a2f6
JM
2075 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
2076 return gdbarch->pc_regnum;
2077}
2078
2079void
104c1213
JM
2080set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
2081 int pc_regnum)
0f71a2f6
JM
2082{
2083 gdbarch->pc_regnum = pc_regnum;
2084}
2085
c2169756
AC
2086int
2087gdbarch_ps_regnum (struct gdbarch *gdbarch)
2088{
8de9bdc4 2089 gdb_assert (gdbarch != NULL);
c2169756
AC
2090 /* Skip verify of ps_regnum, invalid_p == 0 */
2091 if (gdbarch_debug >= 2)
2092 fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
2093 return gdbarch->ps_regnum;
2094}
2095
2096void
2097set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
2098 int ps_regnum)
2099{
2100 gdbarch->ps_regnum = ps_regnum;
2101}
2102
60054393
MS
2103int
2104gdbarch_fp0_regnum (struct gdbarch *gdbarch)
2105{
8de9bdc4 2106 gdb_assert (gdbarch != NULL);
60054393
MS
2107 /* Skip verify of fp0_regnum, invalid_p == 0 */
2108 if (gdbarch_debug >= 2)
2109 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
2110 return gdbarch->fp0_regnum;
2111}
2112
2113void
2114set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
2115 int fp0_regnum)
2116{
2117 gdbarch->fp0_regnum = fp0_regnum;
2118}
2119
88c72b7d
AC
2120int
2121gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
2122{
8de9bdc4 2123 gdb_assert (gdbarch != NULL);
956ac328 2124 gdb_assert (gdbarch->stab_reg_to_regnum != NULL);
88c72b7d
AC
2125 if (gdbarch_debug >= 2)
2126 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
2127 return gdbarch->stab_reg_to_regnum (stab_regnr);
2128}
2129
2130void
2131set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
2132 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
2133{
2134 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
2135}
2136
2137int
2138gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
2139{
8de9bdc4 2140 gdb_assert (gdbarch != NULL);
956ac328 2141 gdb_assert (gdbarch->ecoff_reg_to_regnum != NULL);
88c72b7d
AC
2142 if (gdbarch_debug >= 2)
2143 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
2144 return gdbarch->ecoff_reg_to_regnum (ecoff_regnr);
2145}
2146
2147void
2148set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
2149 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
2150{
2151 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
2152}
2153
2154int
2155gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr)
2156{
8de9bdc4 2157 gdb_assert (gdbarch != NULL);
956ac328 2158 gdb_assert (gdbarch->dwarf_reg_to_regnum != NULL);
88c72b7d
AC
2159 if (gdbarch_debug >= 2)
2160 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf_reg_to_regnum called\n");
2161 return gdbarch->dwarf_reg_to_regnum (dwarf_regnr);
2162}
2163
2164void
2165set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch,
2166 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum)
2167{
2168 gdbarch->dwarf_reg_to_regnum = dwarf_reg_to_regnum;
2169}
2170
2171int
2172gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
2173{
8de9bdc4 2174 gdb_assert (gdbarch != NULL);
956ac328 2175 gdb_assert (gdbarch->sdb_reg_to_regnum != NULL);
88c72b7d
AC
2176 if (gdbarch_debug >= 2)
2177 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
2178 return gdbarch->sdb_reg_to_regnum (sdb_regnr);
2179}
2180
2181void
2182set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
2183 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
2184{
2185 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
2186}
2187
2188int
2189gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
2190{
8de9bdc4 2191 gdb_assert (gdbarch != NULL);
956ac328 2192 gdb_assert (gdbarch->dwarf2_reg_to_regnum != NULL);
88c72b7d
AC
2193 if (gdbarch_debug >= 2)
2194 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
2195 return gdbarch->dwarf2_reg_to_regnum (dwarf2_regnr);
2196}
2197
2198void
2199set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
2200 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
2201{
2202 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
2203}
2204
fa88f677 2205const char *
0f71a2f6
JM
2206gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
2207{
8de9bdc4 2208 gdb_assert (gdbarch != NULL);
956ac328 2209 gdb_assert (gdbarch->register_name != NULL);
0f71a2f6 2210 if (gdbarch_debug >= 2)
0f71a2f6
JM
2211 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
2212 return gdbarch->register_name (regnr);
2213}
2214
2215void
104c1213
JM
2216set_gdbarch_register_name (struct gdbarch *gdbarch,
2217 gdbarch_register_name_ftype register_name)
0f71a2f6
JM
2218{
2219 gdbarch->register_name = register_name;
2220}
2221
0f71a2f6 2222int
9c04cab7 2223gdbarch_register_type_p (struct gdbarch *gdbarch)
0f71a2f6 2224{
8de9bdc4 2225 gdb_assert (gdbarch != NULL);
956ac328 2226 return gdbarch->register_type != NULL;
9c04cab7
AC
2227}
2228
2229struct type *
2230gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
2231{
2232 gdb_assert (gdbarch != NULL);
956ac328 2233 gdb_assert (gdbarch->register_type != NULL);
0f71a2f6 2234 if (gdbarch_debug >= 2)
9c04cab7
AC
2235 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
2236 return gdbarch->register_type (gdbarch, reg_nr);
0f71a2f6
JM
2237}
2238
2239void
9c04cab7
AC
2240set_gdbarch_register_type (struct gdbarch *gdbarch,
2241 gdbarch_register_type_ftype register_type)
0f71a2f6 2242{
9c04cab7 2243 gdbarch->register_type = register_type;
0f71a2f6
JM
2244}
2245
0f71a2f6 2246int
9c04cab7 2247gdbarch_deprecated_register_byte_p (struct gdbarch *gdbarch)
a0ed5532
AC
2248{
2249 gdb_assert (gdbarch != NULL);
9c04cab7 2250 return gdbarch->deprecated_register_byte != generic_register_byte;
a0ed5532
AC
2251}
2252
2253int
9c04cab7 2254gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, int reg_nr)
0f71a2f6 2255{
8de9bdc4 2256 gdb_assert (gdbarch != NULL);
956ac328
AC
2257 gdb_assert (gdbarch->deprecated_register_byte != NULL);
2258 /* Do not check predicate: gdbarch->deprecated_register_byte != generic_register_byte, allow call. */
0f71a2f6 2259 if (gdbarch_debug >= 2)
9c04cab7
AC
2260 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_byte called\n");
2261 return gdbarch->deprecated_register_byte (reg_nr);
0f71a2f6
JM
2262}
2263
2264void
9c04cab7
AC
2265set_gdbarch_deprecated_register_byte (struct gdbarch *gdbarch,
2266 gdbarch_deprecated_register_byte_ftype deprecated_register_byte)
0f71a2f6 2267{
9c04cab7 2268 gdbarch->deprecated_register_byte = deprecated_register_byte;
0f71a2f6
JM
2269}
2270
f3be58bc
AC
2271int
2272gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch)
2273{
2274 gdb_assert (gdbarch != NULL);
956ac328 2275 return gdbarch->unwind_dummy_id != NULL;
f3be58bc
AC
2276}
2277
2278struct frame_id
2279gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *info)
2280{
2281 gdb_assert (gdbarch != NULL);
956ac328 2282 gdb_assert (gdbarch->unwind_dummy_id != NULL);
f3be58bc
AC
2283 if (gdbarch_debug >= 2)
2284 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_dummy_id called\n");
2285 return gdbarch->unwind_dummy_id (gdbarch, info);
2286}
2287
2288void
2289set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch,
2290 gdbarch_unwind_dummy_id_ftype unwind_dummy_id)
2291{
2292 gdbarch->unwind_dummy_id = unwind_dummy_id;
2293}
2294
f3be58bc
AC
2295int
2296gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch)
2297{
2298 gdb_assert (gdbarch != NULL);
2299 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
2300 if (gdbarch_debug >= 2)
2301 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n");
2302 return gdbarch->deprecated_fp_regnum;
2303}
2304
2305void
2306set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch,
2307 int deprecated_fp_regnum)
2308{
2309 gdbarch->deprecated_fp_regnum = deprecated_fp_regnum;
2310}
2311
0ab7a791 2312int
b8de8283 2313gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
0ab7a791
AC
2314{
2315 gdb_assert (gdbarch != NULL);
956ac328 2316 return gdbarch->push_dummy_call != NULL;
0ab7a791
AC
2317}
2318
b8de8283 2319CORE_ADDR
7d9b040b 2320gdbarch_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 2321{
8de9bdc4 2322 gdb_assert (gdbarch != NULL);
956ac328 2323 gdb_assert (gdbarch->push_dummy_call != NULL);
666e11c5 2324 if (gdbarch_debug >= 2)
b8de8283 2325 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
7d9b040b 2326 return gdbarch->push_dummy_call (gdbarch, function, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr);
666e11c5
EZ
2327}
2328
2329void
b8de8283
AC
2330set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
2331 gdbarch_push_dummy_call_ftype push_dummy_call)
666e11c5 2332{
b8de8283 2333 gdbarch->push_dummy_call = push_dummy_call;
666e11c5
EZ
2334}
2335
7c7651b2 2336int
b8de8283 2337gdbarch_deprecated_register_size (struct gdbarch *gdbarch)
7c7651b2 2338{
8de9bdc4 2339 gdb_assert (gdbarch != NULL);
7c7651b2 2340 if (gdbarch_debug >= 2)
b8de8283
AC
2341 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_size called\n");
2342 return gdbarch->deprecated_register_size;
7c7651b2
AC
2343}
2344
2345void
b8de8283
AC
2346set_gdbarch_deprecated_register_size (struct gdbarch *gdbarch,
2347 int deprecated_register_size)
7c7651b2 2348{
b8de8283 2349 gdbarch->deprecated_register_size = deprecated_register_size;
7c7651b2
AC
2350}
2351
2649061d 2352int
b8de8283 2353gdbarch_call_dummy_location (struct gdbarch *gdbarch)
2649061d 2354{
8de9bdc4 2355 gdb_assert (gdbarch != NULL);
b8de8283
AC
2356 /* Skip verify of call_dummy_location, invalid_p == 0 */
2357 if (gdbarch_debug >= 2)
2358 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
2359 return gdbarch->call_dummy_location;
2649061d
AC
2360}
2361
b8de8283
AC
2362void
2363set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
2364 int call_dummy_location)
2365{
2366 gdbarch->call_dummy_location = call_dummy_location;
2367}
2368
0f71a2f6 2369int
b8de8283 2370gdbarch_push_dummy_code_p (struct gdbarch *gdbarch)
0f71a2f6 2371{
8de9bdc4 2372 gdb_assert (gdbarch != NULL);
956ac328 2373 return gdbarch->push_dummy_code != NULL;
b8de8283
AC
2374}
2375
2376CORE_ADDR
2377gdbarch_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp, CORE_ADDR funaddr, int using_gcc, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr)
2378{
2379 gdb_assert (gdbarch != NULL);
956ac328 2380 gdb_assert (gdbarch->push_dummy_code != NULL);
0f71a2f6 2381 if (gdbarch_debug >= 2)
b8de8283
AC
2382 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n");
2383 return gdbarch->push_dummy_code (gdbarch, sp, funaddr, using_gcc, args, nargs, value_type, real_pc, bp_addr);
0f71a2f6
JM
2384}
2385
2386void
b8de8283
AC
2387set_gdbarch_push_dummy_code (struct gdbarch *gdbarch,
2388 gdbarch_push_dummy_code_ftype push_dummy_code)
0f71a2f6 2389{
b8de8283 2390 gdbarch->push_dummy_code = push_dummy_code;
0f71a2f6
JM
2391}
2392
b8de8283
AC
2393void
2394gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
2395{
2396 gdb_assert (gdbarch != NULL);
956ac328 2397 gdb_assert (gdbarch->print_registers_info != NULL);
b8de8283
AC
2398 if (gdbarch_debug >= 2)
2399 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
2400 gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
2401}
2402
2403void
2404set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
2405 gdbarch_print_registers_info_ftype print_registers_info)
2406{
2407 gdbarch->print_registers_info = print_registers_info;
0f71a2f6
JM
2408}
2409
0f71a2f6 2410int
b8de8283
AC
2411gdbarch_print_float_info_p (struct gdbarch *gdbarch)
2412{
2413 gdb_assert (gdbarch != NULL);
956ac328 2414 return gdbarch->print_float_info != NULL;
b8de8283
AC
2415}
2416
2417void
2418gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
0f71a2f6 2419{
8de9bdc4 2420 gdb_assert (gdbarch != NULL);
956ac328 2421 gdb_assert (gdbarch->print_float_info != NULL);
0f71a2f6 2422 if (gdbarch_debug >= 2)
b8de8283
AC
2423 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
2424 gdbarch->print_float_info (gdbarch, file, frame, args);
0f71a2f6
JM
2425}
2426
2427void
b8de8283
AC
2428set_gdbarch_print_float_info (struct gdbarch *gdbarch,
2429 gdbarch_print_float_info_ftype print_float_info)
0f71a2f6 2430{
b8de8283
AC
2431 gdbarch->print_float_info = print_float_info;
2432}
2433
2434int
2435gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
2436{
2437 gdb_assert (gdbarch != NULL);
956ac328 2438 return gdbarch->print_vector_info != NULL;
b8de8283
AC
2439}
2440
2441void
2442gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
2443{
2444 gdb_assert (gdbarch != NULL);
956ac328 2445 gdb_assert (gdbarch->print_vector_info != NULL);
b8de8283
AC
2446 if (gdbarch_debug >= 2)
2447 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
2448 gdbarch->print_vector_info (gdbarch, file, frame, args);
0f71a2f6
JM
2449}
2450
b8de8283
AC
2451void
2452set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
2453 gdbarch_print_vector_info_ftype print_vector_info)
ae45cd16 2454{
b8de8283 2455 gdbarch->print_vector_info = print_vector_info;
ae45cd16
AC
2456}
2457
2458int
b8de8283 2459gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
0f71a2f6 2460{
8de9bdc4 2461 gdb_assert (gdbarch != NULL);
956ac328 2462 gdb_assert (gdbarch->register_sim_regno != NULL);
0f71a2f6 2463 if (gdbarch_debug >= 2)
b8de8283
AC
2464 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
2465 return gdbarch->register_sim_regno (reg_nr);
0f71a2f6
JM
2466}
2467
2468void
b8de8283
AC
2469set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
2470 gdbarch_register_sim_regno_ftype register_sim_regno)
0f71a2f6 2471{
b8de8283 2472 gdbarch->register_sim_regno = register_sim_regno;
0f71a2f6
JM
2473}
2474
b8de8283
AC
2475int
2476gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch)
0f71a2f6 2477{
8de9bdc4 2478 gdb_assert (gdbarch != NULL);
956ac328 2479 return gdbarch->register_bytes_ok != NULL;
0f71a2f6
JM
2480}
2481
2482int
b8de8283 2483gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes)
0f71a2f6 2484{
8de9bdc4 2485 gdb_assert (gdbarch != NULL);
956ac328 2486 gdb_assert (gdbarch->register_bytes_ok != NULL);
0f71a2f6 2487 if (gdbarch_debug >= 2)
b8de8283
AC
2488 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n");
2489 return gdbarch->register_bytes_ok (nr_bytes);
0f71a2f6
JM
2490}
2491
2492void
b8de8283
AC
2493set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch,
2494 gdbarch_register_bytes_ok_ftype register_bytes_ok)
0f71a2f6 2495{
b8de8283 2496 gdbarch->register_bytes_ok = register_bytes_ok;
0f71a2f6
JM
2497}
2498
2499int
b8de8283 2500gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
0f71a2f6 2501{
8de9bdc4 2502 gdb_assert (gdbarch != NULL);
956ac328 2503 gdb_assert (gdbarch->cannot_fetch_register != NULL);
b8de8283
AC
2504 if (gdbarch_debug >= 2)
2505 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
2506 return gdbarch->cannot_fetch_register (regnum);
2507}
2508
2509void
2510set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
2511 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
2512{
2513 gdbarch->cannot_fetch_register = cannot_fetch_register;
0f71a2f6
JM
2514}
2515
2516int
b8de8283 2517gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
0f71a2f6 2518{
8de9bdc4 2519 gdb_assert (gdbarch != NULL);
956ac328 2520 gdb_assert (gdbarch->cannot_store_register != NULL);
0f71a2f6 2521 if (gdbarch_debug >= 2)
b8de8283
AC
2522 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
2523 return gdbarch->cannot_store_register (regnum);
0f71a2f6
JM
2524}
2525
2526void
b8de8283
AC
2527set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
2528 gdbarch_cannot_store_register_ftype cannot_store_register)
0f71a2f6 2529{
b8de8283 2530 gdbarch->cannot_store_register = cannot_store_register;
0f71a2f6
JM
2531}
2532
e8ab51f7 2533int
b8de8283 2534gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
e8ab51f7
AC
2535{
2536 gdb_assert (gdbarch != NULL);
956ac328 2537 return gdbarch->get_longjmp_target != NULL;
e8ab51f7
AC
2538}
2539
b8de8283
AC
2540int
2541gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc)
0f71a2f6 2542{
8de9bdc4 2543 gdb_assert (gdbarch != NULL);
956ac328 2544 gdb_assert (gdbarch->get_longjmp_target != NULL);
0f71a2f6 2545 if (gdbarch_debug >= 2)
b8de8283
AC
2546 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
2547 return gdbarch->get_longjmp_target (pc);
0f71a2f6
JM
2548}
2549
2550void
b8de8283
AC
2551set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
2552 gdbarch_get_longjmp_target_ftype get_longjmp_target)
0f71a2f6 2553{
b8de8283 2554 gdbarch->get_longjmp_target = get_longjmp_target;
0f71a2f6
JM
2555}
2556
2557int
104c1213 2558gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
0f71a2f6 2559{
8de9bdc4 2560 gdb_assert (gdbarch != NULL);
0f71a2f6 2561 if (gdbarch_debug >= 2)
0f71a2f6
JM
2562 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
2563 return gdbarch->believe_pcc_promotion;
2564}
2565
2566void
104c1213
JM
2567set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
2568 int believe_pcc_promotion)
0f71a2f6
JM
2569{
2570 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
2571}
2572
13d01224 2573int
ff2e87ac 2574gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
13d01224
AC
2575{
2576 gdb_assert (gdbarch != NULL);
956ac328 2577 gdb_assert (gdbarch->convert_register_p != NULL);
13d01224
AC
2578 if (gdbarch_debug >= 2)
2579 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
ff2e87ac 2580 return gdbarch->convert_register_p (regnum, type);
13d01224
AC
2581}
2582
2583void
2584set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
2585 gdbarch_convert_register_p_ftype convert_register_p)
2586{
2587 gdbarch->convert_register_p = convert_register_p;
2588}
2589
2590void
b60c417a 2591gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, gdb_byte *buf)
13d01224
AC
2592{
2593 gdb_assert (gdbarch != NULL);
956ac328 2594 gdb_assert (gdbarch->register_to_value != NULL);
13d01224
AC
2595 if (gdbarch_debug >= 2)
2596 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
ff2e87ac 2597 gdbarch->register_to_value (frame, regnum, type, buf);
13d01224
AC
2598}
2599
2600void
2601set_gdbarch_register_to_value (struct gdbarch *gdbarch,
2602 gdbarch_register_to_value_ftype register_to_value)
2603{
2604 gdbarch->register_to_value = register_to_value;
2605}
2606
2607void
b60c417a 2608gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const gdb_byte *buf)
13d01224
AC
2609{
2610 gdb_assert (gdbarch != NULL);
956ac328 2611 gdb_assert (gdbarch->value_to_register != NULL);
13d01224
AC
2612 if (gdbarch_debug >= 2)
2613 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
ff2e87ac 2614 gdbarch->value_to_register (frame, regnum, type, buf);
13d01224
AC
2615}
2616
2617void
2618set_gdbarch_value_to_register (struct gdbarch *gdbarch,
2619 gdbarch_value_to_register_ftype value_to_register)
2620{
2621 gdbarch->value_to_register = value_to_register;
2622}
2623
4478b372 2624CORE_ADDR
b60c417a 2625gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
4478b372 2626{
8de9bdc4 2627 gdb_assert (gdbarch != NULL);
956ac328 2628 gdb_assert (gdbarch->pointer_to_address != NULL);
4478b372
JB
2629 if (gdbarch_debug >= 2)
2630 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
2631 return gdbarch->pointer_to_address (type, buf);
2632}
2633
2634void
2635set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
2636 gdbarch_pointer_to_address_ftype pointer_to_address)
2637{
2638 gdbarch->pointer_to_address = pointer_to_address;
2639}
2640
2641void
b60c417a 2642gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, gdb_byte *buf, CORE_ADDR addr)
4478b372 2643{
8de9bdc4 2644 gdb_assert (gdbarch != NULL);
956ac328 2645 gdb_assert (gdbarch->address_to_pointer != NULL);
4478b372
JB
2646 if (gdbarch_debug >= 2)
2647 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
2648 gdbarch->address_to_pointer (type, buf, addr);
2649}
2650
2651void
2652set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
2653 gdbarch_address_to_pointer_ftype address_to_pointer)
2654{
2655 gdbarch->address_to_pointer = address_to_pointer;
2656}
2657
fc0c74b1
AC
2658int
2659gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
2660{
8de9bdc4 2661 gdb_assert (gdbarch != NULL);
956ac328 2662 return gdbarch->integer_to_address != NULL;
fc0c74b1
AC
2663}
2664
2665CORE_ADDR
fc1a4b47 2666gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
fc0c74b1 2667{
8de9bdc4 2668 gdb_assert (gdbarch != NULL);
956ac328 2669 gdb_assert (gdbarch->integer_to_address != NULL);
fc0c74b1
AC
2670 if (gdbarch_debug >= 2)
2671 fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
79dd2d24 2672 return gdbarch->integer_to_address (gdbarch, type, buf);
fc0c74b1
AC
2673}
2674
2675void
2676set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
2677 gdbarch_integer_to_address_ftype integer_to_address)
2678{
2679 gdbarch->integer_to_address = integer_to_address;
2680}
2681
4183d812
AC
2682int
2683gdbarch_deprecated_store_struct_return_p (struct gdbarch *gdbarch)
2684{
2685 gdb_assert (gdbarch != NULL);
956ac328 2686 return gdbarch->deprecated_store_struct_return != NULL;
4183d812
AC
2687}
2688
0f71a2f6 2689void
4183d812 2690gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
0f71a2f6 2691{
8de9bdc4 2692 gdb_assert (gdbarch != NULL);
956ac328 2693 gdb_assert (gdbarch->deprecated_store_struct_return != NULL);
0f71a2f6 2694 if (gdbarch_debug >= 2)
4183d812
AC
2695 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_struct_return called\n");
2696 gdbarch->deprecated_store_struct_return (addr, sp);
0f71a2f6
JM
2697}
2698
2699void
4183d812
AC
2700set_gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch,
2701 gdbarch_deprecated_store_struct_return_ftype deprecated_store_struct_return)
0f71a2f6 2702{
4183d812 2703 gdbarch->deprecated_store_struct_return = deprecated_store_struct_return;
0f71a2f6
JM
2704}
2705
92ad9cd9
AC
2706int
2707gdbarch_return_value_p (struct gdbarch *gdbarch)
2708{
2709 gdb_assert (gdbarch != NULL);
750eb019 2710 return gdbarch->return_value != legacy_return_value;
92ad9cd9
AC
2711}
2712
2713enum return_value_convention
b60c417a 2714gdbarch_return_value (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
92ad9cd9
AC
2715{
2716 gdb_assert (gdbarch != NULL);
2717 gdb_assert (gdbarch->return_value != NULL);
750eb019 2718 /* Do not check predicate: gdbarch->return_value != legacy_return_value, allow call. */
92ad9cd9
AC
2719 if (gdbarch_debug >= 2)
2720 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value called\n");
963e2bb7 2721 return gdbarch->return_value (gdbarch, valtype, regcache, readbuf, writebuf);
92ad9cd9
AC
2722}
2723
2724void
2725set_gdbarch_return_value (struct gdbarch *gdbarch,
2726 gdbarch_return_value_ftype return_value)
2727{
2728 gdbarch->return_value = return_value;
2729}
2730
0f71a2f6 2731void
b60c417a 2732gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, gdb_byte *valbuf)
ebba8386
AC
2733{
2734 gdb_assert (gdbarch != NULL);
956ac328 2735 gdb_assert (gdbarch->extract_return_value != NULL);
ebba8386
AC
2736 if (gdbarch_debug >= 2)
2737 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
2738 gdbarch->extract_return_value (type, regcache, valbuf);
2739}
2740
2741void
2742set_gdbarch_extract_return_value (struct gdbarch *gdbarch,
2743 gdbarch_extract_return_value_ftype extract_return_value)
2744{
2745 gdbarch->extract_return_value = extract_return_value;
2746}
2747
2748void
b60c417a 2749gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const gdb_byte *valbuf)
0f71a2f6 2750{
8de9bdc4 2751 gdb_assert (gdbarch != NULL);
956ac328 2752 gdb_assert (gdbarch->store_return_value != NULL);
0f71a2f6 2753 if (gdbarch_debug >= 2)
0f71a2f6 2754 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
ebba8386 2755 gdbarch->store_return_value (type, regcache, valbuf);
0f71a2f6
JM
2756}
2757
2758void
104c1213
JM
2759set_gdbarch_store_return_value (struct gdbarch *gdbarch,
2760 gdbarch_store_return_value_ftype store_return_value)
0f71a2f6
JM
2761{
2762 gdbarch->store_return_value = store_return_value;
2763}
2764
ebba8386 2765void
fc1a4b47 2766gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, gdb_byte *regbuf, gdb_byte *valbuf)
ebba8386
AC
2767{
2768 gdb_assert (gdbarch != NULL);
956ac328 2769 gdb_assert (gdbarch->deprecated_extract_return_value != NULL);
ebba8386
AC
2770 if (gdbarch_debug >= 2)
2771 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_return_value called\n");
2772 gdbarch->deprecated_extract_return_value (type, regbuf, valbuf);
2773}
2774
2775void
2776set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch,
2777 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value)
2778{
2779 gdbarch->deprecated_extract_return_value = deprecated_extract_return_value;
2780}
2781
2782void
fc1a4b47 2783gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, gdb_byte *valbuf)
ebba8386
AC
2784{
2785 gdb_assert (gdbarch != NULL);
956ac328 2786 gdb_assert (gdbarch->deprecated_store_return_value != NULL);
ebba8386
AC
2787 if (gdbarch_debug >= 2)
2788 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_return_value called\n");
2789 gdbarch->deprecated_store_return_value (type, valbuf);
2790}
2791
2792void
2793set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch,
2794 gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value)
2795{
2796 gdbarch->deprecated_store_return_value = deprecated_store_return_value;
2797}
2798
92ad9cd9 2799int
b5622e8d 2800gdbarch_deprecated_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
92ad9cd9
AC
2801{
2802 gdb_assert (gdbarch != NULL);
b5622e8d 2803 gdb_assert (gdbarch->deprecated_use_struct_convention != NULL);
92ad9cd9 2804 if (gdbarch_debug >= 2)
b5622e8d
AC
2805 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_use_struct_convention called\n");
2806 return gdbarch->deprecated_use_struct_convention (gcc_p, value_type);
92ad9cd9
AC
2807}
2808
2809void
b5622e8d
AC
2810set_gdbarch_deprecated_use_struct_convention (struct gdbarch *gdbarch,
2811 gdbarch_deprecated_use_struct_convention_ftype deprecated_use_struct_convention)
92ad9cd9 2812{
b5622e8d 2813 gdbarch->deprecated_use_struct_convention = deprecated_use_struct_convention;
92ad9cd9
AC
2814}
2815
049ee0e4 2816int
74055713 2817gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch)
049ee0e4
AC
2818{
2819 gdb_assert (gdbarch != NULL);
74055713 2820 return gdbarch->deprecated_extract_struct_value_address != NULL;
049ee0e4
AC
2821}
2822
2823CORE_ADDR
74055713 2824gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache)
049ee0e4
AC
2825{
2826 gdb_assert (gdbarch != NULL);
74055713 2827 gdb_assert (gdbarch->deprecated_extract_struct_value_address != NULL);
049ee0e4 2828 if (gdbarch_debug >= 2)
74055713
AC
2829 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_struct_value_address called\n");
2830 return gdbarch->deprecated_extract_struct_value_address (regcache);
049ee0e4
AC
2831}
2832
2833void
74055713
AC
2834set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch,
2835 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address)
049ee0e4 2836{
74055713 2837 gdbarch->deprecated_extract_struct_value_address = deprecated_extract_struct_value_address;
049ee0e4
AC
2838}
2839
0f71a2f6
JM
2840CORE_ADDR
2841gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
2842{
8de9bdc4 2843 gdb_assert (gdbarch != NULL);
956ac328 2844 gdb_assert (gdbarch->skip_prologue != NULL);
0f71a2f6 2845 if (gdbarch_debug >= 2)
0f71a2f6
JM
2846 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
2847 return gdbarch->skip_prologue (ip);
2848}
2849
2850void
104c1213
JM
2851set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
2852 gdbarch_skip_prologue_ftype skip_prologue)
0f71a2f6
JM
2853{
2854 gdbarch->skip_prologue = skip_prologue;
2855}
2856
2857int
2858gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
2859{
8de9bdc4 2860 gdb_assert (gdbarch != NULL);
956ac328 2861 gdb_assert (gdbarch->inner_than != NULL);
0f71a2f6 2862 if (gdbarch_debug >= 2)
0f71a2f6
JM
2863 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
2864 return gdbarch->inner_than (lhs, rhs);
2865}
2866
2867void
104c1213
JM
2868set_gdbarch_inner_than (struct gdbarch *gdbarch,
2869 gdbarch_inner_than_ftype inner_than)
0f71a2f6
JM
2870{
2871 gdbarch->inner_than = inner_than;
2872}
2873
fc1a4b47 2874const gdb_byte *
adf40b2e 2875gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
0f71a2f6 2876{
8de9bdc4 2877 gdb_assert (gdbarch != NULL);
956ac328 2878 gdb_assert (gdbarch->breakpoint_from_pc != NULL);
0f71a2f6 2879 if (gdbarch_debug >= 2)
0f71a2f6
JM
2880 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
2881 return gdbarch->breakpoint_from_pc (pcptr, lenptr);
2882}
2883
2884void
104c1213
JM
2885set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
2886 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
0f71a2f6
JM
2887{
2888 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
2889}
2890
a1131521
KB
2891int
2892gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch)
2893{
2894 gdb_assert (gdbarch != NULL);
2895 return gdbarch->adjust_breakpoint_address != NULL;
2896}
2897
2898CORE_ADDR
2899gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr)
2900{
2901 gdb_assert (gdbarch != NULL);
2902 gdb_assert (gdbarch->adjust_breakpoint_address != NULL);
2903 if (gdbarch_debug >= 2)
2904 fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_breakpoint_address called\n");
2905 return gdbarch->adjust_breakpoint_address (gdbarch, bpaddr);
2906}
2907
2908void
2909set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch,
2910 gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address)
2911{
2912 gdbarch->adjust_breakpoint_address = adjust_breakpoint_address;
2913}
2914
917317f4 2915int
8181d85f 2916gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
917317f4 2917{
8de9bdc4 2918 gdb_assert (gdbarch != NULL);
956ac328 2919 gdb_assert (gdbarch->memory_insert_breakpoint != NULL);
917317f4 2920 if (gdbarch_debug >= 2)
917317f4 2921 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
8181d85f 2922 return gdbarch->memory_insert_breakpoint (bp_tgt);
917317f4
JM
2923}
2924
2925void
2926set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
2927 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
2928{
2929 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
2930}
2931
2932int
8181d85f 2933gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
917317f4 2934{
8de9bdc4 2935 gdb_assert (gdbarch != NULL);
956ac328 2936 gdb_assert (gdbarch->memory_remove_breakpoint != NULL);
917317f4 2937 if (gdbarch_debug >= 2)
917317f4 2938 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
8181d85f 2939 return gdbarch->memory_remove_breakpoint (bp_tgt);
917317f4
JM
2940}
2941
2942void
2943set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
2944 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
2945{
2946 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
2947}
2948
0f71a2f6 2949CORE_ADDR
104c1213 2950gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
0f71a2f6 2951{
8de9bdc4 2952 gdb_assert (gdbarch != NULL);
71bd6bd4 2953 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
0f71a2f6 2954 if (gdbarch_debug >= 2)
0f71a2f6
JM
2955 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
2956 return gdbarch->decr_pc_after_break;
2957}
2958
2959void
104c1213
JM
2960set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
2961 CORE_ADDR decr_pc_after_break)
0f71a2f6
JM
2962{
2963 gdbarch->decr_pc_after_break = decr_pc_after_break;
2964}
2965
2966CORE_ADDR
782263ab 2967gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch)
0f71a2f6 2968{
8de9bdc4 2969 gdb_assert (gdbarch != NULL);
782263ab 2970 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
0f71a2f6 2971 if (gdbarch_debug >= 2)
782263ab
AC
2972 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_function_start_offset called\n");
2973 return gdbarch->deprecated_function_start_offset;
0f71a2f6
JM
2974}
2975
2976void
782263ab
AC
2977set_gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch,
2978 CORE_ADDR deprecated_function_start_offset)
0f71a2f6 2979{
782263ab 2980 gdbarch->deprecated_function_start_offset = deprecated_function_start_offset;
0f71a2f6
JM
2981}
2982
2983void
f6684c31 2984gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len)
0f71a2f6 2985{
8de9bdc4 2986 gdb_assert (gdbarch != NULL);
956ac328 2987 gdb_assert (gdbarch->remote_translate_xfer_address != NULL);
0f71a2f6 2988 if (gdbarch_debug >= 2)
0f71a2f6 2989 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
f6684c31 2990 gdbarch->remote_translate_xfer_address (gdbarch, regcache, gdb_addr, gdb_len, rem_addr, rem_len);
0f71a2f6
JM
2991}
2992
2993void
104c1213
JM
2994set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch,
2995 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address)
0f71a2f6
JM
2996{
2997 gdbarch->remote_translate_xfer_address = remote_translate_xfer_address;
2998}
2999
b2756930
KB
3000int
3001gdbarch_fetch_tls_load_module_address_p (struct gdbarch *gdbarch)
3002{
3003 gdb_assert (gdbarch != NULL);
3004 return gdbarch->fetch_tls_load_module_address != NULL;
3005}
3006
3007CORE_ADDR
3008gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch, struct objfile *objfile)
3009{
3010 gdb_assert (gdbarch != NULL);
3011 gdb_assert (gdbarch->fetch_tls_load_module_address != NULL);
3012 if (gdbarch_debug >= 2)
3013 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_tls_load_module_address called\n");
3014 return gdbarch->fetch_tls_load_module_address (objfile);
3015}
3016
3017void
3018set_gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch,
3019 gdbarch_fetch_tls_load_module_address_ftype fetch_tls_load_module_address)
3020{
3021 gdbarch->fetch_tls_load_module_address = fetch_tls_load_module_address;
3022}
3023
0f71a2f6 3024CORE_ADDR
104c1213 3025gdbarch_frame_args_skip (struct gdbarch *gdbarch)
0f71a2f6 3026{
8de9bdc4 3027 gdb_assert (gdbarch != NULL);
5867a2fb 3028 /* Skip verify of frame_args_skip, invalid_p == 0 */
0f71a2f6 3029 if (gdbarch_debug >= 2)
0f71a2f6
JM
3030 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
3031 return gdbarch->frame_args_skip;
3032}
3033
3034void
104c1213
JM
3035set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
3036 CORE_ADDR frame_args_skip)
0f71a2f6
JM
3037{
3038 gdbarch->frame_args_skip = frame_args_skip;
3039}
3040
12cc2063
AC
3041int
3042gdbarch_unwind_pc_p (struct gdbarch *gdbarch)
3043{
3044 gdb_assert (gdbarch != NULL);
956ac328 3045 return gdbarch->unwind_pc != NULL;
12cc2063
AC
3046}
3047
3048CORE_ADDR
3049gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
3050{
3051 gdb_assert (gdbarch != NULL);
956ac328 3052 gdb_assert (gdbarch->unwind_pc != NULL);
12cc2063
AC
3053 if (gdbarch_debug >= 2)
3054 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n");
3055 return gdbarch->unwind_pc (gdbarch, next_frame);
3056}
3057
3058void
3059set_gdbarch_unwind_pc (struct gdbarch *gdbarch,
3060 gdbarch_unwind_pc_ftype unwind_pc)
3061{
3062 gdbarch->unwind_pc = unwind_pc;
3063}
3064
a9e5fdc2
AC
3065int
3066gdbarch_unwind_sp_p (struct gdbarch *gdbarch)
3067{
3068 gdb_assert (gdbarch != NULL);
956ac328 3069 return gdbarch->unwind_sp != NULL;
a9e5fdc2
AC
3070}
3071
3072CORE_ADDR
3073gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
3074{
3075 gdb_assert (gdbarch != NULL);
956ac328 3076 gdb_assert (gdbarch->unwind_sp != NULL);
a9e5fdc2
AC
3077 if (gdbarch_debug >= 2)
3078 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_sp called\n");
3079 return gdbarch->unwind_sp (gdbarch, next_frame);
3080}
3081
3082void
3083set_gdbarch_unwind_sp (struct gdbarch *gdbarch,
3084 gdbarch_unwind_sp_ftype unwind_sp)
3085{
3086 gdbarch->unwind_sp = unwind_sp;
3087}
3088
983a287a
AC
3089int
3090gdbarch_frame_num_args_p (struct gdbarch *gdbarch)
3091{
3092 gdb_assert (gdbarch != NULL);
956ac328 3093 return gdbarch->frame_num_args != NULL;
983a287a
AC
3094}
3095
0f71a2f6
JM
3096int
3097gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
3098{
8de9bdc4 3099 gdb_assert (gdbarch != NULL);
956ac328 3100 gdb_assert (gdbarch->frame_num_args != NULL);
0f71a2f6 3101 if (gdbarch_debug >= 2)
0f71a2f6
JM
3102 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
3103 return gdbarch->frame_num_args (frame);
3104}
3105
3106void
104c1213
JM
3107set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
3108 gdbarch_frame_num_args_ftype frame_num_args)
0f71a2f6
JM
3109{
3110 gdbarch->frame_num_args = frame_num_args;
3111}
3112
2ada493a 3113int
f27dd7fd 3114gdbarch_deprecated_stack_align_p (struct gdbarch *gdbarch)
2ada493a 3115{
8de9bdc4 3116 gdb_assert (gdbarch != NULL);
f27dd7fd 3117 return gdbarch->deprecated_stack_align != NULL;
2ada493a
AC
3118}
3119
3120CORE_ADDR
f27dd7fd 3121gdbarch_deprecated_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp)
2ada493a 3122{
8de9bdc4 3123 gdb_assert (gdbarch != NULL);
f27dd7fd 3124 gdb_assert (gdbarch->deprecated_stack_align != NULL);
2ada493a 3125 if (gdbarch_debug >= 2)
f27dd7fd
AC
3126 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_stack_align called\n");
3127 return gdbarch->deprecated_stack_align (sp);
2ada493a
AC
3128}
3129
3130void
f27dd7fd
AC
3131set_gdbarch_deprecated_stack_align (struct gdbarch *gdbarch,
3132 gdbarch_deprecated_stack_align_ftype deprecated_stack_align)
2ada493a 3133{
f27dd7fd 3134 gdbarch->deprecated_stack_align = deprecated_stack_align;
2ada493a
AC
3135}
3136
dc604539
AC
3137int
3138gdbarch_frame_align_p (struct gdbarch *gdbarch)
3139{
3140 gdb_assert (gdbarch != NULL);
956ac328 3141 return gdbarch->frame_align != NULL;
dc604539
AC
3142}
3143
3144CORE_ADDR
3145gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
3146{
3147 gdb_assert (gdbarch != NULL);
956ac328 3148 gdb_assert (gdbarch->frame_align != NULL);
dc604539
AC
3149 if (gdbarch_debug >= 2)
3150 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
3151 return gdbarch->frame_align (gdbarch, address);
3152}
3153
3154void
3155set_gdbarch_frame_align (struct gdbarch *gdbarch,
3156 gdbarch_frame_align_ftype frame_align)
3157{
3158 gdbarch->frame_align = frame_align;
3159}
3160
d03e67c9 3161int
88d89dbb 3162gdbarch_deprecated_reg_struct_has_addr_p (struct gdbarch *gdbarch)
d03e67c9 3163{
8de9bdc4 3164 gdb_assert (gdbarch != NULL);
88d89dbb 3165 return gdbarch->deprecated_reg_struct_has_addr != NULL;
d03e67c9
AC
3166}
3167
3168int
88d89dbb 3169gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type)
d03e67c9 3170{
8de9bdc4 3171 gdb_assert (gdbarch != NULL);
88d89dbb 3172 gdb_assert (gdbarch->deprecated_reg_struct_has_addr != NULL);
d03e67c9 3173 if (gdbarch_debug >= 2)
88d89dbb
MK
3174 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_reg_struct_has_addr called\n");
3175 return gdbarch->deprecated_reg_struct_has_addr (gcc_p, type);
d03e67c9
AC
3176}
3177
3178void
88d89dbb
MK
3179set_gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch,
3180 gdbarch_deprecated_reg_struct_has_addr_ftype deprecated_reg_struct_has_addr)
d03e67c9 3181{
88d89dbb 3182 gdbarch->deprecated_reg_struct_has_addr = deprecated_reg_struct_has_addr;
d03e67c9
AC
3183}
3184
192cb3d4
MK
3185int
3186gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type)
3187{
3188 gdb_assert (gdbarch != NULL);
3189 gdb_assert (gdbarch->stabs_argument_has_addr != NULL);
3190 if (gdbarch_debug >= 2)
3191 fprintf_unfiltered (gdb_stdlog, "gdbarch_stabs_argument_has_addr called\n");
3192 return gdbarch->stabs_argument_has_addr (gdbarch, type);
3193}
3194
3195void
3196set_gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch,
3197 gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr)
3198{
3199 gdbarch->stabs_argument_has_addr = stabs_argument_has_addr;
3200}
3201
8b148df9
AC
3202int
3203gdbarch_frame_red_zone_size (struct gdbarch *gdbarch)
3204{
3205 gdb_assert (gdbarch != NULL);
3206 if (gdbarch_debug >= 2)
3207 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_red_zone_size called\n");
3208 return gdbarch->frame_red_zone_size;
3209}
3210
3211void
3212set_gdbarch_frame_red_zone_size (struct gdbarch *gdbarch,
3213 int frame_red_zone_size)
3214{
3215 gdbarch->frame_red_zone_size = frame_red_zone_size;
3216}
3217
f517ea4e 3218CORE_ADDR
e2d0e7eb 3219gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
f517ea4e 3220{
8de9bdc4 3221 gdb_assert (gdbarch != NULL);
956ac328 3222 gdb_assert (gdbarch->convert_from_func_ptr_addr != NULL);
f517ea4e
PS
3223 if (gdbarch_debug >= 2)
3224 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
e2d0e7eb 3225 return gdbarch->convert_from_func_ptr_addr (gdbarch, addr, targ);
f517ea4e
PS
3226}
3227
3228void
3229set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
3230 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
3231{
3232 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
3233}
3234
875e1767
AC
3235CORE_ADDR
3236gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
3237{
8de9bdc4 3238 gdb_assert (gdbarch != NULL);
956ac328 3239 gdb_assert (gdbarch->addr_bits_remove != NULL);
875e1767
AC
3240 if (gdbarch_debug >= 2)
3241 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
3242 return gdbarch->addr_bits_remove (addr);
3243}
3244
3245void
3246set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
3247 gdbarch_addr_bits_remove_ftype addr_bits_remove)
3248{
3249 gdbarch->addr_bits_remove = addr_bits_remove;
3250}
3251
181c1381
RE
3252CORE_ADDR
3253gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr)
3254{
8de9bdc4 3255 gdb_assert (gdbarch != NULL);
956ac328 3256 gdb_assert (gdbarch->smash_text_address != NULL);
181c1381
RE
3257 if (gdbarch_debug >= 2)
3258 fprintf_unfiltered (gdb_stdlog, "gdbarch_smash_text_address called\n");
3259 return gdbarch->smash_text_address (addr);
3260}
3261
3262void
3263set_gdbarch_smash_text_address (struct gdbarch *gdbarch,
3264 gdbarch_smash_text_address_ftype smash_text_address)
3265{
3266 gdbarch->smash_text_address = smash_text_address;
3267}
3268
64c4637f
AC
3269int
3270gdbarch_software_single_step_p (struct gdbarch *gdbarch)
3271{
8de9bdc4 3272 gdb_assert (gdbarch != NULL);
956ac328 3273 return gdbarch->software_single_step != NULL;
64c4637f
AC
3274}
3275
3276void
3277gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p)
3278{
8de9bdc4 3279 gdb_assert (gdbarch != NULL);
956ac328 3280 gdb_assert (gdbarch->software_single_step != NULL);
64c4637f
AC
3281 if (gdbarch_debug >= 2)
3282 fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
3283 gdbarch->software_single_step (sig, insert_breakpoints_p);
3284}
3285
3286void
3287set_gdbarch_software_single_step (struct gdbarch *gdbarch,
3288 gdbarch_software_single_step_ftype software_single_step)
3289{
3290 gdbarch->software_single_step = software_single_step;
3291}
3292
3352ef37
AC
3293int
3294gdbarch_single_step_through_delay_p (struct gdbarch *gdbarch)
3295{
3296 gdb_assert (gdbarch != NULL);
3297 return gdbarch->single_step_through_delay != NULL;
3298}
3299
3300int
3301gdbarch_single_step_through_delay (struct gdbarch *gdbarch, struct frame_info *frame)
3302{
3303 gdb_assert (gdbarch != NULL);
3304 gdb_assert (gdbarch->single_step_through_delay != NULL);
3305 if (gdbarch_debug >= 2)
3306 fprintf_unfiltered (gdb_stdlog, "gdbarch_single_step_through_delay called\n");
3307 return gdbarch->single_step_through_delay (gdbarch, frame);
3308}
3309
3310void
3311set_gdbarch_single_step_through_delay (struct gdbarch *gdbarch,
3312 gdbarch_single_step_through_delay_ftype single_step_through_delay)
3313{
3314 gdbarch->single_step_through_delay = single_step_through_delay;
3315}
3316
2bf0cb65 3317int
a89aa300 3318gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info)
2bf0cb65 3319{
8de9bdc4 3320 gdb_assert (gdbarch != NULL);
956ac328 3321 gdb_assert (gdbarch->print_insn != NULL);
2bf0cb65
EZ
3322 if (gdbarch_debug >= 2)
3323 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
3324 return gdbarch->print_insn (vma, info);
3325}
3326
3327void
3328set_gdbarch_print_insn (struct gdbarch *gdbarch,
3329 gdbarch_print_insn_ftype print_insn)
3330{
3331 gdbarch->print_insn = print_insn;
3332}
3333
bdcd319a
CV
3334CORE_ADDR
3335gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc)
3336{
8de9bdc4 3337 gdb_assert (gdbarch != NULL);
956ac328 3338 gdb_assert (gdbarch->skip_trampoline_code != NULL);
bdcd319a
CV
3339 if (gdbarch_debug >= 2)
3340 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
3341 return gdbarch->skip_trampoline_code (pc);
3342}
3343
3344void
3345set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
3346 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
3347{
3348 gdbarch->skip_trampoline_code = skip_trampoline_code;
3349}
3350
dea0c52f
MK
3351CORE_ADDR
3352gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
3353{
3354 gdb_assert (gdbarch != NULL);
3355 gdb_assert (gdbarch->skip_solib_resolver != NULL);
3356 if (gdbarch_debug >= 2)
3357 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_solib_resolver called\n");
4c8c40e6 3358 return gdbarch->skip_solib_resolver (gdbarch, pc);
dea0c52f
MK
3359}
3360
3361void
3362set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch,
3363 gdbarch_skip_solib_resolver_ftype skip_solib_resolver)
3364{
3365 gdbarch->skip_solib_resolver = skip_solib_resolver;
3366}
3367
d50355b6
MS
3368int
3369gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
3370{
3371 gdb_assert (gdbarch != NULL);
956ac328 3372 gdb_assert (gdbarch->in_solib_return_trampoline != NULL);
d50355b6
MS
3373 if (gdbarch_debug >= 2)
3374 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
3375 return gdbarch->in_solib_return_trampoline (pc, name);
3376}
3377
3378void
3379set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
3380 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
3381{
3382 gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
3383}
3384
c12260ac
CV
3385int
3386gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
3387{
8de9bdc4 3388 gdb_assert (gdbarch != NULL);
956ac328 3389 gdb_assert (gdbarch->in_function_epilogue_p != NULL);
c12260ac
CV
3390 if (gdbarch_debug >= 2)
3391 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n");
3392 return gdbarch->in_function_epilogue_p (gdbarch, addr);
3393}
3394
3395void
3396set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch,
3397 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p)
3398{
3399 gdbarch->in_function_epilogue_p = in_function_epilogue_p;
3400}
3401
552c04a7
TT
3402char *
3403gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv)
3404{
8de9bdc4 3405 gdb_assert (gdbarch != NULL);
956ac328 3406 gdb_assert (gdbarch->construct_inferior_arguments != NULL);
552c04a7
TT
3407 if (gdbarch_debug >= 2)
3408 fprintf_unfiltered (gdb_stdlog, "gdbarch_construct_inferior_arguments called\n");
3409 return gdbarch->construct_inferior_arguments (gdbarch, argc, argv);
3410}
3411
3412void
3413set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch,
3414 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments)
3415{
3416 gdbarch->construct_inferior_arguments = construct_inferior_arguments;
3417}
3418
a2cf933a
EZ
3419void
3420gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
3421{
8de9bdc4 3422 gdb_assert (gdbarch != NULL);
956ac328 3423 gdb_assert (gdbarch->elf_make_msymbol_special != NULL);
a2cf933a
EZ
3424 if (gdbarch_debug >= 2)
3425 fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
3426 gdbarch->elf_make_msymbol_special (sym, msym);
3427}
3428
3429void
3430set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
3431 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
3432{
3433 gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
3434}
3435
3436void
3437gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
3438{
8de9bdc4 3439 gdb_assert (gdbarch != NULL);
956ac328 3440 gdb_assert (gdbarch->coff_make_msymbol_special != NULL);
a2cf933a
EZ
3441 if (gdbarch_debug >= 2)
3442 fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
3443 gdbarch->coff_make_msymbol_special (val, msym);
3444}
3445
3446void
3447set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
3448 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
3449{
3450 gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
3451}
3452
5720643c
JB
3453const char *
3454gdbarch_name_of_malloc (struct gdbarch *gdbarch)
3455{
3456 gdb_assert (gdbarch != NULL);
3457 /* Skip verify of name_of_malloc, invalid_p == 0 */
3458 if (gdbarch_debug >= 2)
3459 fprintf_unfiltered (gdb_stdlog, "gdbarch_name_of_malloc called\n");
3460 return gdbarch->name_of_malloc;
3461}
3462
3463void
3464set_gdbarch_name_of_malloc (struct gdbarch *gdbarch,
3465 const char * name_of_malloc)
3466{
3467 gdbarch->name_of_malloc = name_of_malloc;
3468}
3469
c4ed33b9
AC
3470int
3471gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
3472{
3473 gdb_assert (gdbarch != NULL);
3474 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
3475 if (gdbarch_debug >= 2)
3476 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
3477 return gdbarch->cannot_step_breakpoint;
3478}
3479
3480void
3481set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
3482 int cannot_step_breakpoint)
3483{
3484 gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
3485}
3486
f74fa174
MM
3487int
3488gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
3489{
3490 gdb_assert (gdbarch != NULL);
3491 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
3492 if (gdbarch_debug >= 2)
3493 fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
3494 return gdbarch->have_nonsteppable_watchpoint;
3495}
3496
3497void
3498set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
967c0d83 3499 int have_nonsteppable_watchpoint)
f74fa174
MM
3500{
3501 gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
3502}
3503
8b2dbe47
KB
3504int
3505gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
3506{
3507 gdb_assert (gdbarch != NULL);
956ac328 3508 return gdbarch->address_class_type_flags != NULL;
8b2dbe47
KB
3509}
3510
3511int
3512gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
3513{
3514 gdb_assert (gdbarch != NULL);
956ac328 3515 gdb_assert (gdbarch->address_class_type_flags != NULL);
8b2dbe47
KB
3516 if (gdbarch_debug >= 2)
3517 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
3518 return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
3519}
3520
3521void
3522set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
3523 gdbarch_address_class_type_flags_ftype address_class_type_flags)
3524{
3525 gdbarch->address_class_type_flags = address_class_type_flags;
3526}
3527
3528int
3529gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
3530{
3531 gdb_assert (gdbarch != NULL);
956ac328 3532 return gdbarch->address_class_type_flags_to_name != NULL;
8b2dbe47
KB
3533}
3534
321432c0 3535const char *
8b2dbe47
KB
3536gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
3537{
3538 gdb_assert (gdbarch != NULL);
956ac328 3539 gdb_assert (gdbarch->address_class_type_flags_to_name != NULL);
8b2dbe47
KB
3540 if (gdbarch_debug >= 2)
3541 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
5f11f355 3542 return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
8b2dbe47
KB
3543}
3544
3545void
3546set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
3547 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
3548{
3549 gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
3550}
3551
3552int
3553gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
3554{
3555 gdb_assert (gdbarch != NULL);
956ac328 3556 return gdbarch->address_class_name_to_type_flags != NULL;
8b2dbe47
KB
3557}
3558
3559int
321432c0 3560gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
8b2dbe47
KB
3561{
3562 gdb_assert (gdbarch != NULL);
956ac328 3563 gdb_assert (gdbarch->address_class_name_to_type_flags != NULL);
8b2dbe47
KB
3564 if (gdbarch_debug >= 2)
3565 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
5f11f355 3566 return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
8b2dbe47
KB
3567}
3568
3569void
3570set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
3571 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
3572{
3573 gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
3574}
3575
b59ff9d5
AC
3576int
3577gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
3578{
3579 gdb_assert (gdbarch != NULL);
956ac328 3580 gdb_assert (gdbarch->register_reggroup_p != NULL);
b59ff9d5
AC
3581 if (gdbarch_debug >= 2)
3582 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
3583 return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
3584}
3585
3586void
3587set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
3588 gdbarch_register_reggroup_p_ftype register_reggroup_p)
3589{
3590 gdbarch->register_reggroup_p = register_reggroup_p;
3591}
3592
143985b7
AF
3593int
3594gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch)
3595{
3596 gdb_assert (gdbarch != NULL);
956ac328 3597 return gdbarch->fetch_pointer_argument != NULL;
143985b7
AF
3598}
3599
3600CORE_ADDR
3601gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type)
3602{
3603 gdb_assert (gdbarch != NULL);
956ac328 3604 gdb_assert (gdbarch->fetch_pointer_argument != NULL);
143985b7
AF
3605 if (gdbarch_debug >= 2)
3606 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n");
3607 return gdbarch->fetch_pointer_argument (frame, argi, type);
3608}
3609
3610void
3611set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch,
3612 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument)
3613{
3614 gdbarch->fetch_pointer_argument = fetch_pointer_argument;
3615}
3616
6ce6d90f
MK
3617int
3618gdbarch_regset_from_core_section_p (struct gdbarch *gdbarch)
3619{
3620 gdb_assert (gdbarch != NULL);
3621 return gdbarch->regset_from_core_section != NULL;
3622}
3623
3624const struct regset *
3625gdbarch_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size)
3626{
3627 gdb_assert (gdbarch != NULL);
3628 gdb_assert (gdbarch->regset_from_core_section != NULL);
3629 if (gdbarch_debug >= 2)
3630 fprintf_unfiltered (gdb_stdlog, "gdbarch_regset_from_core_section called\n");
3631 return gdbarch->regset_from_core_section (gdbarch, sect_name, sect_size);
3632}
3633
3634void
3635set_gdbarch_regset_from_core_section (struct gdbarch *gdbarch,
3636 gdbarch_regset_from_core_section_ftype regset_from_core_section)
3637{
3638 gdbarch->regset_from_core_section = regset_from_core_section;
3639}
3640
0f71a2f6 3641
be5a57e1 3642/* Keep a registry of per-architecture data-pointers required by GDB
0f71a2f6
JM
3643 modules. */
3644
3645struct gdbarch_data
3646{
95160752 3647 unsigned index;
76860b5f 3648 int init_p;
030f20e1
AC
3649 gdbarch_data_pre_init_ftype *pre_init;
3650 gdbarch_data_post_init_ftype *post_init;
0f71a2f6
JM
3651};
3652
3653struct gdbarch_data_registration
adf40b2e 3654{
adf40b2e
JM
3655 struct gdbarch_data *data;
3656 struct gdbarch_data_registration *next;
3657};
0f71a2f6 3658
be5a57e1 3659struct gdbarch_data_registry
adf40b2e 3660{
95160752 3661 unsigned nr;
adf40b2e
JM
3662 struct gdbarch_data_registration *registrations;
3663};
0f71a2f6 3664
be5a57e1 3665struct gdbarch_data_registry gdbarch_data_registry =
0f71a2f6
JM
3666{
3667 0, NULL,
3668};
3669
030f20e1
AC
3670static struct gdbarch_data *
3671gdbarch_data_register (gdbarch_data_pre_init_ftype *pre_init,
3672 gdbarch_data_post_init_ftype *post_init)
0f71a2f6
JM
3673{
3674 struct gdbarch_data_registration **curr;
76860b5f 3675 /* Append the new registraration. */
be5a57e1 3676 for (curr = &gdbarch_data_registry.registrations;
0f71a2f6
JM
3677 (*curr) != NULL;
3678 curr = &(*curr)->next);
3679 (*curr) = XMALLOC (struct gdbarch_data_registration);
3680 (*curr)->next = NULL;
0f71a2f6 3681 (*curr)->data = XMALLOC (struct gdbarch_data);
be5a57e1 3682 (*curr)->data->index = gdbarch_data_registry.nr++;
030f20e1
AC
3683 (*curr)->data->pre_init = pre_init;
3684 (*curr)->data->post_init = post_init;
76860b5f 3685 (*curr)->data->init_p = 1;
0f71a2f6
JM
3686 return (*curr)->data;
3687}
3688
030f20e1
AC
3689struct gdbarch_data *
3690gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype *pre_init)
3691{
3692 return gdbarch_data_register (pre_init, NULL);
3693}
3694
3695struct gdbarch_data *
3696gdbarch_data_register_post_init (gdbarch_data_post_init_ftype *post_init)
3697{
3698 return gdbarch_data_register (NULL, post_init);
3699}
0f71a2f6 3700
b3cc3077 3701/* Create/delete the gdbarch data vector. */
95160752
AC
3702
3703static void
b3cc3077 3704alloc_gdbarch_data (struct gdbarch *gdbarch)
95160752 3705{
b3cc3077
JB
3706 gdb_assert (gdbarch->data == NULL);
3707 gdbarch->nr_data = gdbarch_data_registry.nr;
aebd7893 3708 gdbarch->data = GDBARCH_OBSTACK_CALLOC (gdbarch, gdbarch->nr_data, void *);
0f71a2f6
JM
3709}
3710
76860b5f 3711/* Initialize the current value of the specified per-architecture
b3cc3077
JB
3712 data-pointer. */
3713
95160752 3714void
030f20e1
AC
3715deprecated_set_gdbarch_data (struct gdbarch *gdbarch,
3716 struct gdbarch_data *data,
3717 void *pointer)
95160752
AC
3718{
3719 gdb_assert (data->index < gdbarch->nr_data);
aebd7893 3720 gdb_assert (gdbarch->data[data->index] == NULL);
030f20e1 3721 gdb_assert (data->pre_init == NULL);
95160752
AC
3722 gdbarch->data[data->index] = pointer;
3723}
3724
0f71a2f6
JM
3725/* Return the current value of the specified per-architecture
3726 data-pointer. */
3727
3728void *
451fbdda 3729gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
0f71a2f6 3730{
451fbdda 3731 gdb_assert (data->index < gdbarch->nr_data);
030f20e1 3732 if (gdbarch->data[data->index] == NULL)
76860b5f 3733 {
030f20e1
AC
3734 /* The data-pointer isn't initialized, call init() to get a
3735 value. */
3736 if (data->pre_init != NULL)
3737 /* Mid architecture creation: pass just the obstack, and not
3738 the entire architecture, as that way it isn't possible for
3739 pre-init code to refer to undefined architecture
3740 fields. */
3741 gdbarch->data[data->index] = data->pre_init (gdbarch->obstack);
3742 else if (gdbarch->initialized_p
3743 && data->post_init != NULL)
3744 /* Post architecture creation: pass the entire architecture
3745 (as all fields are valid), but be careful to also detect
3746 recursive references. */
3747 {
3748 gdb_assert (data->init_p);
3749 data->init_p = 0;
3750 gdbarch->data[data->index] = data->post_init (gdbarch);
3751 data->init_p = 1;
3752 }
3753 else
3754 /* The architecture initialization hasn't completed - punt -
3755 hope that the caller knows what they are doing. Once
3756 deprecated_set_gdbarch_data has been initialized, this can be
3757 changed to an internal error. */
3758 return NULL;
76860b5f
AC
3759 gdb_assert (gdbarch->data[data->index] != NULL);
3760 }
451fbdda 3761 return gdbarch->data[data->index];
0f71a2f6
JM
3762}
3763
3764
3765
be5a57e1 3766/* Keep a registry of swapped data required by GDB modules. */
0f71a2f6
JM
3767
3768struct gdbarch_swap
3769{
3770 void *swap;
3771 struct gdbarch_swap_registration *source;
3772 struct gdbarch_swap *next;
3773};
3774
3775struct gdbarch_swap_registration
adf40b2e
JM
3776{
3777 void *data;
3778 unsigned long sizeof_data;
3779 gdbarch_swap_ftype *init;
3780 struct gdbarch_swap_registration *next;
3781};
0f71a2f6 3782
be5a57e1 3783struct gdbarch_swap_registry
adf40b2e
JM
3784{
3785 int nr;
3786 struct gdbarch_swap_registration *registrations;
3787};
0f71a2f6 3788
be5a57e1 3789struct gdbarch_swap_registry gdbarch_swap_registry =
0f71a2f6
JM
3790{
3791 0, NULL,
3792};
3793
3794void
046a4708
AC
3795deprecated_register_gdbarch_swap (void *data,
3796 unsigned long sizeof_data,
3797 gdbarch_swap_ftype *init)
0f71a2f6
JM
3798{
3799 struct gdbarch_swap_registration **rego;
be5a57e1 3800 for (rego = &gdbarch_swap_registry.registrations;
0f71a2f6
JM
3801 (*rego) != NULL;
3802 rego = &(*rego)->next);
3803 (*rego) = XMALLOC (struct gdbarch_swap_registration);
3804 (*rego)->next = NULL;
3805 (*rego)->init = init;
3806 (*rego)->data = data;
3807 (*rego)->sizeof_data = sizeof_data;
3808}
3809
40af4b0c 3810static void
7de2341d 3811current_gdbarch_swap_init_hack (void)
0f71a2f6
JM
3812{
3813 struct gdbarch_swap_registration *rego;
7de2341d 3814 struct gdbarch_swap **curr = &current_gdbarch->swap;
be5a57e1 3815 for (rego = gdbarch_swap_registry.registrations;
0f71a2f6
JM
3816 rego != NULL;
3817 rego = rego->next)
3818 {
3819 if (rego->data != NULL)
3820 {
7de2341d
AC
3821 (*curr) = GDBARCH_OBSTACK_ZALLOC (current_gdbarch,
3822 struct gdbarch_swap);
0f71a2f6 3823 (*curr)->source = rego;
7de2341d
AC
3824 (*curr)->swap = gdbarch_obstack_zalloc (current_gdbarch,
3825 rego->sizeof_data);
0f71a2f6 3826 (*curr)->next = NULL;
0f71a2f6
JM
3827 curr = &(*curr)->next;
3828 }
3829 if (rego->init != NULL)
3830 rego->init ();
3831 }
3832}
3833
7de2341d
AC
3834static struct gdbarch *
3835current_gdbarch_swap_out_hack (void)
0f71a2f6 3836{
7de2341d 3837 struct gdbarch *old_gdbarch = current_gdbarch;
0f71a2f6 3838 struct gdbarch_swap *curr;
7de2341d
AC
3839
3840 gdb_assert (old_gdbarch != NULL);
3841 for (curr = old_gdbarch->swap;
0f71a2f6
JM
3842 curr != NULL;
3843 curr = curr->next)
7de2341d
AC
3844 {
3845 memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
3846 memset (curr->source->data, 0, curr->source->sizeof_data);
3847 }
3848 current_gdbarch = NULL;
3849 return old_gdbarch;
0f71a2f6
JM
3850}
3851
0f71a2f6 3852static void
7de2341d 3853current_gdbarch_swap_in_hack (struct gdbarch *new_gdbarch)
0f71a2f6
JM
3854{
3855 struct gdbarch_swap *curr;
7de2341d
AC
3856
3857 gdb_assert (current_gdbarch == NULL);
3858 for (curr = new_gdbarch->swap;
0f71a2f6
JM
3859 curr != NULL;
3860 curr = curr->next)
3861 memcpy (curr->source->data, curr->swap, curr->source->sizeof_data);
7de2341d 3862 current_gdbarch = new_gdbarch;
0f71a2f6
JM
3863}
3864
3865
be5a57e1 3866/* Keep a registry of the architectures known by GDB. */
0f71a2f6 3867
4b9b3959 3868struct gdbarch_registration
0f71a2f6
JM
3869{
3870 enum bfd_architecture bfd_architecture;
3871 gdbarch_init_ftype *init;
4b9b3959 3872 gdbarch_dump_tdep_ftype *dump_tdep;
0f71a2f6 3873 struct gdbarch_list *arches;
4b9b3959 3874 struct gdbarch_registration *next;
0f71a2f6
JM
3875};
3876
be5a57e1 3877static struct gdbarch_registration *gdbarch_registry = NULL;
0f71a2f6 3878
b4a20239
AC
3879static void
3880append_name (const char ***buf, int *nr, const char *name)
3881{
3882 *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
3883 (*buf)[*nr] = name;
3884 *nr += 1;
3885}
3886
3887const char **
3888gdbarch_printable_names (void)
3889{
7996bcec
AC
3890 /* Accumulate a list of names based on the registed list of
3891 architectures. */
3892 enum bfd_architecture a;
3893 int nr_arches = 0;
3894 const char **arches = NULL;
3895 struct gdbarch_registration *rego;
3896 for (rego = gdbarch_registry;
3897 rego != NULL;
3898 rego = rego->next)
b4a20239 3899 {
7996bcec
AC
3900 const struct bfd_arch_info *ap;
3901 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
3902 if (ap == NULL)
3903 internal_error (__FILE__, __LINE__,
e2e0b3e5 3904 _("gdbarch_architecture_names: multi-arch unknown"));
7996bcec
AC
3905 do
3906 {
3907 append_name (&arches, &nr_arches, ap->printable_name);
3908 ap = ap->next;
3909 }
3910 while (ap != NULL);
b4a20239 3911 }
7996bcec
AC
3912 append_name (&arches, &nr_arches, NULL);
3913 return arches;
b4a20239
AC
3914}
3915
3916
0f71a2f6 3917void
4b9b3959
AC
3918gdbarch_register (enum bfd_architecture bfd_architecture,
3919 gdbarch_init_ftype *init,
3920 gdbarch_dump_tdep_ftype *dump_tdep)
0f71a2f6 3921{
4b9b3959 3922 struct gdbarch_registration **curr;
0f71a2f6 3923 const struct bfd_arch_info *bfd_arch_info;
ec3d358c 3924 /* Check that BFD recognizes this architecture */
0f71a2f6
JM
3925 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
3926 if (bfd_arch_info == NULL)
3927 {
8e65ff28 3928 internal_error (__FILE__, __LINE__,
85c07804 3929 _("gdbarch: Attempt to register unknown architecture (%d)"),
8e65ff28 3930 bfd_architecture);
0f71a2f6
JM
3931 }
3932 /* Check that we haven't seen this architecture before */
be5a57e1 3933 for (curr = &gdbarch_registry;
0f71a2f6
JM
3934 (*curr) != NULL;
3935 curr = &(*curr)->next)
3936 {
3937 if (bfd_architecture == (*curr)->bfd_architecture)
8e65ff28 3938 internal_error (__FILE__, __LINE__,
85c07804 3939 _("gdbarch: Duplicate registraration of architecture (%s)"),
8e65ff28 3940 bfd_arch_info->printable_name);
0f71a2f6
JM
3941 }
3942 /* log it */
3943 if (gdbarch_debug)
3944 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n",
3945 bfd_arch_info->printable_name,
3946 (long) init);
3947 /* Append it */
4b9b3959 3948 (*curr) = XMALLOC (struct gdbarch_registration);
0f71a2f6
JM
3949 (*curr)->bfd_architecture = bfd_architecture;
3950 (*curr)->init = init;
4b9b3959 3951 (*curr)->dump_tdep = dump_tdep;
0f71a2f6
JM
3952 (*curr)->arches = NULL;
3953 (*curr)->next = NULL;
4b9b3959
AC
3954}
3955
3956void
3957register_gdbarch_init (enum bfd_architecture bfd_architecture,
3958 gdbarch_init_ftype *init)
3959{
3960 gdbarch_register (bfd_architecture, init, NULL);
0f71a2f6 3961}
0f71a2f6
JM
3962
3963
3964/* Look for an architecture using gdbarch_info. Base search on only
3965 BFD_ARCH_INFO and BYTE_ORDER. */
3966
3967struct gdbarch_list *
104c1213
JM
3968gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
3969 const struct gdbarch_info *info)
0f71a2f6
JM
3970{
3971 for (; arches != NULL; arches = arches->next)
3972 {
3973 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
3974 continue;
3975 if (info->byte_order != arches->gdbarch->byte_order)
3976 continue;
4be87837
DJ
3977 if (info->osabi != arches->gdbarch->osabi)
3978 continue;
0f71a2f6
JM
3979 return arches;
3980 }
3981 return NULL;
3982}
3983
3984
ebdba546
AC
3985/* Find an architecture that matches the specified INFO. Create a new
3986 architecture if needed. Return that new architecture. Assumes
3987 that there is no current architecture. */
0f71a2f6 3988
ebdba546 3989static struct gdbarch *
7a107747 3990find_arch_by_info (struct gdbarch_info info)
0f71a2f6
JM
3991{
3992 struct gdbarch *new_gdbarch;
4b9b3959 3993 struct gdbarch_registration *rego;
0f71a2f6 3994
ebdba546
AC
3995 /* The existing architecture has been swapped out - all this code
3996 works from a clean slate. */
3997 gdb_assert (current_gdbarch == NULL);
3998
b732d07d 3999 /* Fill in missing parts of the INFO struct using a number of
7a107747
DJ
4000 sources: "set ..."; INFOabfd supplied; and the global
4001 defaults. */
4002 gdbarch_info_fill (&info);
4be87837 4003
b732d07d
AC
4004 /* Must have found some sort of architecture. */
4005 gdb_assert (info.bfd_arch_info != NULL);
0f71a2f6
JM
4006
4007 if (gdbarch_debug)
4008 {
0f71a2f6 4009 fprintf_unfiltered (gdb_stdlog,
ebdba546 4010 "find_arch_by_info: info.bfd_arch_info %s\n",
0f71a2f6
JM
4011 (info.bfd_arch_info != NULL
4012 ? info.bfd_arch_info->printable_name
4013 : "(null)"));
4014 fprintf_unfiltered (gdb_stdlog,
ebdba546 4015 "find_arch_by_info: info.byte_order %d (%s)\n",
0f71a2f6 4016 info.byte_order,
d7449b42 4017 (info.byte_order == BFD_ENDIAN_BIG ? "big"
778eb05e 4018 : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
0f71a2f6 4019 : "default"));
4be87837 4020 fprintf_unfiltered (gdb_stdlog,
ebdba546 4021 "find_arch_by_info: info.osabi %d (%s)\n",
4be87837 4022 info.osabi, gdbarch_osabi_name (info.osabi));
0f71a2f6 4023 fprintf_unfiltered (gdb_stdlog,
ebdba546 4024 "find_arch_by_info: info.abfd 0x%lx\n",
0f71a2f6
JM
4025 (long) info.abfd);
4026 fprintf_unfiltered (gdb_stdlog,
ebdba546 4027 "find_arch_by_info: info.tdep_info 0x%lx\n",
0f71a2f6
JM
4028 (long) info.tdep_info);
4029 }
4030
ebdba546 4031 /* Find the tdep code that knows about this architecture. */
b732d07d
AC
4032 for (rego = gdbarch_registry;
4033 rego != NULL;
4034 rego = rego->next)
4035 if (rego->bfd_architecture == info.bfd_arch_info->arch)
4036 break;
4037 if (rego == NULL)
4038 {
4039 if (gdbarch_debug)
ebdba546
AC
4040 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
4041 "No matching architecture\n");
b732d07d
AC
4042 return 0;
4043 }
4044
ebdba546 4045 /* Ask the tdep code for an architecture that matches "info". */
0f71a2f6
JM
4046 new_gdbarch = rego->init (info, rego->arches);
4047
ebdba546
AC
4048 /* Did the tdep code like it? No. Reject the change and revert to
4049 the old architecture. */
0f71a2f6
JM
4050 if (new_gdbarch == NULL)
4051 {
4052 if (gdbarch_debug)
ebdba546
AC
4053 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
4054 "Target rejected architecture\n");
4055 return NULL;
0f71a2f6
JM
4056 }
4057
ebdba546
AC
4058 /* Is this a pre-existing architecture (as determined by already
4059 being initialized)? Move it to the front of the architecture
4060 list (keeping the list sorted Most Recently Used). */
4061 if (new_gdbarch->initialized_p)
0f71a2f6 4062 {
ebdba546
AC
4063 struct gdbarch_list **list;
4064 struct gdbarch_list *this;
0f71a2f6 4065 if (gdbarch_debug)
ebdba546
AC
4066 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
4067 "Previous architecture 0x%08lx (%s) selected\n",
0f71a2f6
JM
4068 (long) new_gdbarch,
4069 new_gdbarch->bfd_arch_info->printable_name);
ebdba546
AC
4070 /* Find the existing arch in the list. */
4071 for (list = &rego->arches;
4072 (*list) != NULL && (*list)->gdbarch != new_gdbarch;
4073 list = &(*list)->next);
4074 /* It had better be in the list of architectures. */
4075 gdb_assert ((*list) != NULL && (*list)->gdbarch == new_gdbarch);
4076 /* Unlink THIS. */
4077 this = (*list);
4078 (*list) = this->next;
4079 /* Insert THIS at the front. */
4080 this->next = rego->arches;
4081 rego->arches = this;
4082 /* Return it. */
4083 return new_gdbarch;
0f71a2f6
JM
4084 }
4085
ebdba546
AC
4086 /* It's a new architecture. */
4087 if (gdbarch_debug)
4088 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
4089 "New architecture 0x%08lx (%s) selected\n",
4090 (long) new_gdbarch,
4091 new_gdbarch->bfd_arch_info->printable_name);
4092
4093 /* Insert the new architecture into the front of the architecture
4094 list (keep the list sorted Most Recently Used). */
0f79675b
AC
4095 {
4096 struct gdbarch_list *this = XMALLOC (struct gdbarch_list);
4097 this->next = rego->arches;
4098 this->gdbarch = new_gdbarch;
4099 rego->arches = this;
4100 }
0f71a2f6 4101
4b9b3959
AC
4102 /* Check that the newly installed architecture is valid. Plug in
4103 any post init values. */
4104 new_gdbarch->dump_tdep = rego->dump_tdep;
0f71a2f6 4105 verify_gdbarch (new_gdbarch);
ebdba546 4106 new_gdbarch->initialized_p = 1;
0f71a2f6 4107
ebdba546
AC
4108 /* Initialize any per-architecture swap areas. This phase requires
4109 a valid global CURRENT_GDBARCH. Set it momentarially, and then
4110 swap the entire architecture out. */
4111 current_gdbarch = new_gdbarch;
7de2341d 4112 current_gdbarch_swap_init_hack ();
ebdba546 4113 current_gdbarch_swap_out_hack ();
67c2c32c 4114
4b9b3959 4115 if (gdbarch_debug)
ebdba546 4116 gdbarch_dump (new_gdbarch, gdb_stdlog);
4b9b3959 4117
ebdba546 4118 return new_gdbarch;
0f71a2f6 4119}
c906108c 4120
ebdba546
AC
4121struct gdbarch *
4122gdbarch_find_by_info (struct gdbarch_info info)
4123{
4124 /* Save the previously selected architecture, setting the global to
4125 NULL. This stops things like gdbarch->init() trying to use the
4126 previous architecture's configuration. The previous architecture
4127 may not even be of the same architecture family. The most recent
4128 architecture of the same family is found at the head of the
4129 rego->arches list. */
4130 struct gdbarch *old_gdbarch = current_gdbarch_swap_out_hack ();
4131
4132 /* Find the specified architecture. */
7a107747 4133 struct gdbarch *new_gdbarch = find_arch_by_info (info);
ebdba546
AC
4134
4135 /* Restore the existing architecture. */
4136 gdb_assert (current_gdbarch == NULL);
4137 current_gdbarch_swap_in_hack (old_gdbarch);
4138
4139 return new_gdbarch;
4140}
4141
4142/* Make the specified architecture current, swapping the existing one
4143 out. */
4144
4145void
4146deprecated_current_gdbarch_select_hack (struct gdbarch *new_gdbarch)
4147{
4148 gdb_assert (new_gdbarch != NULL);
4149 gdb_assert (current_gdbarch != NULL);
4150 gdb_assert (new_gdbarch->initialized_p);
4151 current_gdbarch_swap_out_hack ();
4152 current_gdbarch_swap_in_hack (new_gdbarch);
4153 architecture_changed_event ();
5dbe23a3 4154 flush_cached_frames ();
ebdba546 4155}
c906108c 4156
104c1213 4157extern void _initialize_gdbarch (void);
b4a20239 4158
c906108c 4159void
7c7651b2 4160_initialize_gdbarch (void)
c906108c 4161{
5d161b24
DB
4162 struct cmd_list_element *c;
4163
85c07804
AC
4164 add_setshow_zinteger_cmd ("arch", class_maintenance, &gdbarch_debug, _("\
4165Set architecture debugging."), _("\
4166Show architecture debugging."), _("\
4167When non-zero, architecture debugging is enabled."),
4168 NULL,
920d2a44 4169 show_gdbarch_debug,
85c07804 4170 &setdebuglist, &showdebuglist);
c906108c 4171}
This page took 0.824924 seconds and 4 git commands to generate.