]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbarch.c
2003-05-03 Andrew Cagney <cagney@redhat.com>
[thirdparty/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.
1e698235 4 Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
c906108c 5
96baa820
JM
6 This file is part of GDB.
7
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
c906108c 12
96baa820
JM
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
c906108c 17
96baa820
JM
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA. */
adf40b2e 22
104c1213
JM
23/* This file was created with the aid of ``gdbarch.sh''.
24
52204a0b 25 The Bourne shell script ``gdbarch.sh'' creates the files
104c1213
JM
26 ``new-gdbarch.c'' and ``new-gdbarch.h and then compares them
27 against the existing ``gdbarch.[hc]''. Any differences found
28 being reported.
29
30 If editing this file, please also run gdbarch.sh and merge any
52204a0b 31 changes into that script. Conversely, when making sweeping changes
104c1213
JM
32 to this file, modifying gdbarch.sh and using its output may prove
33 easier. */
c906108c 34
c906108c
SS
35
36#include "defs.h"
1ad03bde 37#include "arch-utils.h"
c906108c 38
0f71a2f6
JM
39#if GDB_MULTI_ARCH
40#include "gdbcmd.h"
adf40b2e 41#include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */
0f71a2f6 42#else
7a292a7a
SS
43/* Just include everything in sight so that the every old definition
44 of macro is visible. */
45#include "gdb_string.h"
46#include <ctype.h>
47#include "symtab.h"
48#include "frame.h"
49#include "inferior.h"
50#include "breakpoint.h"
03f2053f 51#include "gdb_wait.h"
7a292a7a
SS
52#include "gdbcore.h"
53#include "gdbcmd.h"
54#include "target.h"
55#include "gdbthread.h"
56#include "annotate.h"
57#include "symfile.h" /* for overlay functions */
fd0407d6 58#include "value.h" /* For old tm.h/nm.h macros. */
0f71a2f6 59#endif
7a292a7a 60#include "symcat.h"
c906108c 61
f0d4cc9e 62#include "floatformat.h"
c906108c 63
95160752 64#include "gdb_assert.h"
b66d6d2e 65#include "gdb_string.h"
67c2c32c 66#include "gdb-events.h"
b59ff9d5 67#include "reggroups.h"
4be87837 68#include "osabi.h"
e9a2674e 69#include "symfile.h" /* For entry_point_address. */
95160752 70
104c1213
JM
71/* Static function declarations */
72
73static void verify_gdbarch (struct gdbarch *gdbarch);
b3cc3077 74static void alloc_gdbarch_data (struct gdbarch *);
95160752 75static void free_gdbarch_data (struct gdbarch *);
104c1213 76static void init_gdbarch_swap (struct gdbarch *);
40af4b0c 77static void clear_gdbarch_swap (struct gdbarch *);
104c1213
JM
78static void swapout_gdbarch_swap (struct gdbarch *);
79static void swapin_gdbarch_swap (struct gdbarch *);
80
0f71a2f6
JM
81/* Non-zero if we want to trace architecture code. */
82
83#ifndef GDBARCH_DEBUG
84#define GDBARCH_DEBUG 0
85#endif
86int gdbarch_debug = GDBARCH_DEBUG;
87
88
89/* Maintain the struct gdbarch object */
90
91struct gdbarch
adf40b2e 92{
76860b5f
AC
93 /* Has this architecture been fully initialized? */
94 int initialized_p;
adf40b2e
JM
95 /* basic architectural information */
96 const struct bfd_arch_info * bfd_arch_info;
97 int byte_order;
4be87837 98 enum gdb_osabi osabi;
0f71a2f6 99
adf40b2e
JM
100 /* target specific vector. */
101 struct gdbarch_tdep *tdep;
4b9b3959 102 gdbarch_dump_tdep_ftype *dump_tdep;
0f71a2f6 103
adf40b2e 104 /* per-architecture data-pointers */
95160752 105 unsigned nr_data;
adf40b2e 106 void **data;
0f71a2f6 107
adf40b2e
JM
108 /* per-architecture swap-regions */
109 struct gdbarch_swap *swap;
0f71a2f6 110
adf40b2e 111 /* Multi-arch values.
0f71a2f6 112
adf40b2e 113 When extending this structure you must:
0f71a2f6 114
adf40b2e 115 Add the field below.
0f71a2f6 116
adf40b2e
JM
117 Declare set/get functions and define the corresponding
118 macro in gdbarch.h.
0f71a2f6 119
adf40b2e
JM
120 gdbarch_alloc(): If zero/NULL is not a suitable default,
121 initialize the new field.
0f71a2f6 122
adf40b2e
JM
123 verify_gdbarch(): Confirm that the target updated the field
124 correctly.
0f71a2f6 125
7e73cedf 126 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
adf40b2e 127 field is dumped out
0f71a2f6 128
c0e8c252 129 ``startup_gdbarch()'': Append an initial value to the static
adf40b2e 130 variable (base values on the host's c-type system).
0f71a2f6 131
adf40b2e
JM
132 get_gdbarch(): Implement the set/get functions (probably using
133 the macro's as shortcuts).
0f71a2f6
JM
134
135 */
136
adf40b2e
JM
137 int short_bit;
138 int int_bit;
139 int long_bit;
140 int long_long_bit;
141 int float_bit;
142 int double_bit;
143 int long_double_bit;
66b43ecb 144 int ptr_bit;
52204a0b 145 int addr_bit;
66b43ecb 146 int bfd_vma_bit;
4e409299 147 int char_signed;
adf40b2e
JM
148 gdbarch_read_pc_ftype *read_pc;
149 gdbarch_write_pc_ftype *write_pc;
0ba6dca9 150 gdbarch_deprecated_target_read_fp_ftype *deprecated_target_read_fp;
adf40b2e 151 gdbarch_read_sp_ftype *read_sp;
6c0e89ed 152 gdbarch_deprecated_dummy_write_sp_ftype *deprecated_dummy_write_sp;
39d4ef09 153 gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer;
d8124050
AC
154 gdbarch_pseudo_register_read_ftype *pseudo_register_read;
155 gdbarch_pseudo_register_write_ftype *pseudo_register_write;
adf40b2e 156 int num_regs;
0aba1244 157 int num_pseudo_regs;
adf40b2e 158 int sp_regnum;
0ba6dca9 159 int deprecated_fp_regnum;
adf40b2e 160 int pc_regnum;
c2169756 161 int ps_regnum;
60054393 162 int fp0_regnum;
03863182 163 int npc_regnum;
88c72b7d
AC
164 gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum;
165 gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum;
166 gdbarch_dwarf_reg_to_regnum_ftype *dwarf_reg_to_regnum;
167 gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum;
168 gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum;
adf40b2e 169 gdbarch_register_name_ftype *register_name;
b1e29e33 170 int deprecated_register_size;
adf40b2e
JM
171 int register_bytes;
172 gdbarch_register_byte_ftype *register_byte;
173 gdbarch_register_raw_size_ftype *register_raw_size;
a0ed5532 174 int deprecated_max_register_raw_size;
adf40b2e 175 gdbarch_register_virtual_size_ftype *register_virtual_size;
a0ed5532 176 int deprecated_max_register_virtual_size;
adf40b2e 177 gdbarch_register_virtual_type_ftype *register_virtual_type;
35cac7cf 178 gdbarch_register_type_ftype *register_type;
903ad3a6 179 gdbarch_deprecated_do_registers_info_ftype *deprecated_do_registers_info;
0ab7a791 180 gdbarch_print_registers_info_ftype *print_registers_info;
5e74b15c 181 gdbarch_print_float_info_ftype *print_float_info;
e76f1f2e 182 gdbarch_print_vector_info_ftype *print_vector_info;
7c7651b2 183 gdbarch_register_sim_regno_ftype *register_sim_regno;
2649061d 184 gdbarch_register_bytes_ok_ftype *register_bytes_ok;
01fb7433
AC
185 gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
186 gdbarch_cannot_store_register_ftype *cannot_store_register;
9df628e0 187 gdbarch_get_longjmp_target_ftype *get_longjmp_target;
07555a72 188 int deprecated_use_generic_dummy_frames;
adf40b2e
JM
189 int call_dummy_location;
190 gdbarch_call_dummy_address_ftype *call_dummy_address;
b1e29e33
AC
191 CORE_ADDR deprecated_call_dummy_start_offset;
192 CORE_ADDR deprecated_call_dummy_breakpoint_offset;
193 int deprecated_call_dummy_length;
ae45cd16 194 gdbarch_deprecated_pc_in_call_dummy_ftype *deprecated_pc_in_call_dummy;
b1e29e33
AC
195 LONGEST * deprecated_call_dummy_words;
196 int deprecated_sizeof_call_dummy_words;
1bf6d5cc 197 int deprecated_call_dummy_stack_adjust;
b1e29e33 198 gdbarch_deprecated_fix_call_dummy_ftype *deprecated_fix_call_dummy;
7043d8dc 199 gdbarch_push_dummy_code_ftype *push_dummy_code;
2ca6c561 200 gdbarch_deprecated_init_frame_pc_first_ftype *deprecated_init_frame_pc_first;
a5afb99f 201 gdbarch_deprecated_init_frame_pc_ftype *deprecated_init_frame_pc;
adf40b2e
JM
202 int believe_pcc_promotion;
203 int believe_pcc_promotion_type;
129c1cd6 204 gdbarch_deprecated_get_saved_register_ftype *deprecated_get_saved_register;
adf40b2e
JM
205 gdbarch_register_convertible_ftype *register_convertible;
206 gdbarch_register_convert_to_virtual_ftype *register_convert_to_virtual;
207 gdbarch_register_convert_to_raw_ftype *register_convert_to_raw;
13d01224
AC
208 gdbarch_convert_register_p_ftype *convert_register_p;
209 gdbarch_register_to_value_ftype *register_to_value;
210 gdbarch_value_to_register_ftype *value_to_register;
4478b372
JB
211 gdbarch_pointer_to_address_ftype *pointer_to_address;
212 gdbarch_address_to_pointer_ftype *address_to_pointer;
fc0c74b1 213 gdbarch_integer_to_address_ftype *integer_to_address;
71a9f22e 214 gdbarch_return_value_on_stack_ftype *return_value_on_stack;
b81774d8
AC
215 gdbarch_deprecated_push_arguments_ftype *deprecated_push_arguments;
216 gdbarch_push_dummy_call_ftype *push_dummy_call;
f3824013 217 gdbarch_deprecated_push_dummy_frame_ftype *deprecated_push_dummy_frame;
28f617b3 218 gdbarch_deprecated_push_return_address_ftype *deprecated_push_return_address;
749b82f6 219 gdbarch_deprecated_pop_frame_ftype *deprecated_pop_frame;
4183d812 220 gdbarch_deprecated_store_struct_return_ftype *deprecated_store_struct_return;
ebba8386 221 gdbarch_extract_return_value_ftype *extract_return_value;
adf40b2e 222 gdbarch_store_return_value_ftype *store_return_value;
ebba8386
AC
223 gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value;
224 gdbarch_deprecated_store_return_value_ftype *deprecated_store_return_value;
049ee0e4 225 gdbarch_extract_struct_value_address_ftype *extract_struct_value_address;
26e9b323 226 gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address;
adf40b2e 227 gdbarch_use_struct_convention_ftype *use_struct_convention;
f30ee0bc 228 gdbarch_deprecated_frame_init_saved_regs_ftype *deprecated_frame_init_saved_regs;
e9582e71 229 gdbarch_deprecated_init_extra_frame_info_ftype *deprecated_init_extra_frame_info;
adf40b2e 230 gdbarch_skip_prologue_ftype *skip_prologue;
dad41f9a 231 gdbarch_prologue_frameless_p_ftype *prologue_frameless_p;
adf40b2e
JM
232 gdbarch_inner_than_ftype *inner_than;
233 gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
917317f4
JM
234 gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
235 gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
adf40b2e 236 CORE_ADDR decr_pc_after_break;
e02bc4cc 237 gdbarch_prepare_to_proceed_ftype *prepare_to_proceed;
adf40b2e
JM
238 CORE_ADDR function_start_offset;
239 gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address;
240 CORE_ADDR frame_args_skip;
241 gdbarch_frameless_function_invocation_ftype *frameless_function_invocation;
618ce49f
AC
242 gdbarch_deprecated_frame_chain_ftype *deprecated_frame_chain;
243 gdbarch_deprecated_frame_chain_valid_ftype *deprecated_frame_chain_valid;
8bedc050 244 gdbarch_deprecated_frame_saved_pc_ftype *deprecated_frame_saved_pc;
12cc2063 245 gdbarch_unwind_pc_ftype *unwind_pc;
adf40b2e
JM
246 gdbarch_frame_args_address_ftype *frame_args_address;
247 gdbarch_frame_locals_address_ftype *frame_locals_address;
6913c89a 248 gdbarch_deprecated_saved_pc_after_call_ftype *deprecated_saved_pc_after_call;
adf40b2e 249 gdbarch_frame_num_args_ftype *frame_num_args;
2ada493a 250 gdbarch_stack_align_ftype *stack_align;
dc604539 251 gdbarch_frame_align_ftype *frame_align;
f933a9c5 252 int deprecated_extra_stack_alignment_needed;
d03e67c9 253 gdbarch_reg_struct_has_addr_ftype *reg_struct_has_addr;
d1e3cf49 254 gdbarch_save_dummy_frame_tos_ftype *save_dummy_frame_tos;
6314f104 255 gdbarch_unwind_dummy_id_ftype *unwind_dummy_id;
58d5518e 256 int parm_boundary;
f0d4cc9e
AC
257 const struct floatformat * float_format;
258 const struct floatformat * double_format;
259 const struct floatformat * long_double_format;
f517ea4e 260 gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
875e1767 261 gdbarch_addr_bits_remove_ftype *addr_bits_remove;
181c1381 262 gdbarch_smash_text_address_ftype *smash_text_address;
64c4637f 263 gdbarch_software_single_step_ftype *software_single_step;
2bf0cb65 264 gdbarch_print_insn_ftype *print_insn;
bdcd319a 265 gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
68e9cc94 266 gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline;
d50355b6 267 gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
d7bd68ca 268 gdbarch_pc_in_sigtramp_ftype *pc_in_sigtramp;
43156d82
MK
269 gdbarch_sigtramp_start_ftype *sigtramp_start;
270 gdbarch_sigtramp_end_ftype *sigtramp_end;
c12260ac 271 gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p;
552c04a7 272 gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments;
b6af0555 273 gdbarch_dwarf2_build_frame_info_ftype *dwarf2_build_frame_info;
a2cf933a
EZ
274 gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
275 gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
5720643c 276 const char * name_of_malloc;
c4ed33b9 277 int cannot_step_breakpoint;
f74fa174 278 int have_nonsteppable_watchpoint;
8b2dbe47
KB
279 gdbarch_address_class_type_flags_ftype *address_class_type_flags;
280 gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name;
281 gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
b59ff9d5 282 gdbarch_register_reggroup_p_ftype *register_reggroup_p;
adf40b2e 283};
0f71a2f6
JM
284
285
286/* The default architecture uses host values (for want of a better
287 choice). */
288
289extern const struct bfd_arch_info bfd_default_arch_struct;
290
4b9b3959
AC
291struct gdbarch startup_gdbarch =
292{
76860b5f 293 1, /* Always initialized. */
0f71a2f6
JM
294 /* basic architecture information */
295 &bfd_default_arch_struct,
d7449b42 296 BFD_ENDIAN_BIG,
4be87837 297 GDB_OSABI_UNKNOWN,
4b9b3959
AC
298 /* target specific vector and its dump routine */
299 NULL, NULL,
0f71a2f6
JM
300 /*per-architecture data-pointers and swap regions */
301 0, NULL, NULL,
302 /* Multi-arch values */
0f71a2f6
JM
303 8 * sizeof (short),
304 8 * sizeof (int),
305 8 * sizeof (long),
306 8 * sizeof (LONGEST),
307 8 * sizeof (float),
308 8 * sizeof (double),
309 8 * sizeof (long double),
66b43ecb
AC
310 8 * sizeof (void*),
311 8 * sizeof (void*),
52204a0b 312 8 * sizeof (void*),
4e409299 313 1,
0f71a2f6
JM
314 0,
315 0,
316 0,
317 0,
318 0,
319 0,
320 0,
321 0,
322 0,
323 0,
1200cd6e
AC
324 -1,
325 -1,
326 -1,
c2169756 327 -1,
0f71a2f6
JM
328 0,
329 0,
330 0,
331 0,
332 0,
333 0,
334 0,
335 0,
336 0,
337 0,
a7e3c2ad 338 generic_register_byte,
b2e75d78 339 generic_register_size,
0f71a2f6 340 0,
b2e75d78 341 generic_register_size,
0f71a2f6
JM
342 0,
343 0,
344 0,
35cac7cf 345 0,
0ab7a791 346 default_print_registers_info,
23e3a7ac 347 0,
0f71a2f6 348 0,
b9a8e3bf 349 0,
7355ddba 350 0,
03863182
AC
351 0,
352 0,
60054393 353 0,
0aba1244 354 0,
666e11c5 355 0,
7c7651b2 356 0,
88c72b7d
AC
357 0,
358 0,
359 0,
ae45cd16 360 generic_pc_in_call_dummy,
2649061d 361 0,
61a0eb5b
AC
362 0,
363 0,
10312cc4
AC
364 0,
365 0,
01fb7433
AC
366 0,
367 0,
39d4ef09 368 0,
5e74b15c 369 0,
9df628e0 370 0,
e4b415d9 371 0,
0f71a2f6
JM
372 0,
373 0,
374 0,
375 0,
376 0,
377 0,
378 0,
379 0,
380 0,
381 0,
382 0,
383 0,
384 0,
385 0,
386 0,
387 0,
388 0,
389 0,
390 0,
391 0,
392 0,
393 0,
394 0,
395 0,
396 0,
397 0,
398 0,
399 0,
400 0,
401 0,
402 0,
403 0,
404 0,
405 0,
406 0,
917317f4
JM
407 0,
408 0,
4478b372
JB
409 0,
410 0,
71a9f22e 411 0,
2ada493a 412 0,
d03e67c9 413 0,
dad41f9a 414 0,
d1e3cf49 415 0,
f0d4cc9e
AC
416 0,
417 0,
418 0,
7f1b2585
EZ
419 0,
420 0,
bdcd319a 421 0,
2bf0cb65 422 0,
fc0c74b1 423 0,
68e9cc94 424 0,
181c1381 425 0,
d7bd68ca 426 0,
13d01224
AC
427 0,
428 0,
429 0,
e76f1f2e 430 0,
d50355b6 431 0,
ebba8386 432 0,
43156d82
MK
433 0,
434 0,
6314f104 435 0,
7043d8dc 436 0,
a72293e2 437 generic_in_function_epilogue_p,
552c04a7 438 construct_inferior_arguments,
b6af0555 439 0,
a2cf933a
EZ
440 0,
441 0,
5720643c 442 "malloc",
c4ed33b9 443 0,
967c0d83 444 0,
8b2dbe47
KB
445 0,
446 0,
447 0,
b59ff9d5 448 default_register_reggroup_p,
c0e8c252 449 /* startup_gdbarch() */
0f71a2f6 450};
4b9b3959 451
c0e8c252 452struct gdbarch *current_gdbarch = &startup_gdbarch;
0f71a2f6 453
ceaa8edf
JB
454/* Do any initialization needed for a non-multiarch configuration
455 after the _initialize_MODULE functions have been run. */
456void
5ae5f592 457initialize_non_multiarch (void)
ceaa8edf
JB
458{
459 alloc_gdbarch_data (&startup_gdbarch);
40af4b0c
AC
460 /* Ensure that all swap areas are zeroed so that they again think
461 they are starting from scratch. */
462 clear_gdbarch_swap (&startup_gdbarch);
6c1e5d11 463 init_gdbarch_swap (&startup_gdbarch);
ceaa8edf
JB
464}
465
0f71a2f6 466
66b43ecb 467/* Create a new ``struct gdbarch'' based on information provided by
0f71a2f6
JM
468 ``struct gdbarch_info''. */
469
470struct gdbarch *
104c1213
JM
471gdbarch_alloc (const struct gdbarch_info *info,
472 struct gdbarch_tdep *tdep)
0f71a2f6 473{
85de9627
AC
474 /* NOTE: The new architecture variable is named ``current_gdbarch''
475 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
476 the current local architecture and not the previous global
477 architecture. This ensures that the new architectures initial
478 values are not influenced by the previous architecture. Once
479 everything is parameterised with gdbarch, this will go away. */
480 struct gdbarch *current_gdbarch = XMALLOC (struct gdbarch);
481 memset (current_gdbarch, 0, sizeof (*current_gdbarch));
0f71a2f6 482
85de9627 483 alloc_gdbarch_data (current_gdbarch);
b3cc3077 484
85de9627 485 current_gdbarch->tdep = tdep;
0f71a2f6 486
85de9627
AC
487 current_gdbarch->bfd_arch_info = info->bfd_arch_info;
488 current_gdbarch->byte_order = info->byte_order;
4be87837 489 current_gdbarch->osabi = info->osabi;
0f71a2f6
JM
490
491 /* Force the explicit initialization of these. */
85de9627
AC
492 current_gdbarch->short_bit = 2*TARGET_CHAR_BIT;
493 current_gdbarch->int_bit = 4*TARGET_CHAR_BIT;
494 current_gdbarch->long_bit = 4*TARGET_CHAR_BIT;
495 current_gdbarch->long_long_bit = 2*TARGET_LONG_BIT;
496 current_gdbarch->float_bit = 4*TARGET_CHAR_BIT;
497 current_gdbarch->double_bit = 8*TARGET_CHAR_BIT;
17ef5d92 498 current_gdbarch->long_double_bit = 8*TARGET_CHAR_BIT;
85de9627
AC
499 current_gdbarch->ptr_bit = TARGET_INT_BIT;
500 current_gdbarch->bfd_vma_bit = TARGET_ARCHITECTURE->bits_per_address;
4e409299 501 current_gdbarch->char_signed = -1;
85de9627
AC
502 current_gdbarch->read_pc = generic_target_read_pc;
503 current_gdbarch->write_pc = generic_target_write_pc;
85de9627 504 current_gdbarch->read_sp = generic_target_read_sp;
85de9627
AC
505 current_gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
506 current_gdbarch->num_regs = -1;
507 current_gdbarch->sp_regnum = -1;
0ba6dca9 508 current_gdbarch->deprecated_fp_regnum = -1;
85de9627 509 current_gdbarch->pc_regnum = -1;
c2169756 510 current_gdbarch->ps_regnum = -1;
85de9627
AC
511 current_gdbarch->fp0_regnum = -1;
512 current_gdbarch->npc_regnum = -1;
85de9627
AC
513 current_gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
514 current_gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
515 current_gdbarch->dwarf_reg_to_regnum = no_op_reg_to_regnum;
516 current_gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
517 current_gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
518 current_gdbarch->register_name = legacy_register_name;
a7e3c2ad 519 current_gdbarch->register_byte = generic_register_byte;
b2e75d78 520 current_gdbarch->register_raw_size = generic_register_size;
b2e75d78 521 current_gdbarch->register_virtual_size = generic_register_size;
0ab7a791 522 current_gdbarch->print_registers_info = default_print_registers_info;
8238d0bf 523 current_gdbarch->register_sim_regno = legacy_register_sim_regno;
85de9627
AC
524 current_gdbarch->cannot_fetch_register = cannot_register_not;
525 current_gdbarch->cannot_store_register = cannot_register_not;
07555a72 526 current_gdbarch->deprecated_use_generic_dummy_frames = 1;
b99fa2d2 527 current_gdbarch->call_dummy_location = AT_ENTRY_POINT;
e9a2674e 528 current_gdbarch->call_dummy_address = entry_point_address;
ae45cd16 529 current_gdbarch->deprecated_pc_in_call_dummy = generic_pc_in_call_dummy;
b1e29e33
AC
530 current_gdbarch->deprecated_call_dummy_words = legacy_call_dummy_words;
531 current_gdbarch->deprecated_sizeof_call_dummy_words = legacy_sizeof_call_dummy_words;
85de9627 532 current_gdbarch->register_convertible = generic_register_convertible_not;
13d01224
AC
533 current_gdbarch->convert_register_p = legacy_convert_register_p;
534 current_gdbarch->register_to_value = legacy_register_to_value;
535 current_gdbarch->value_to_register = legacy_value_to_register;
85de9627
AC
536 current_gdbarch->pointer_to_address = unsigned_pointer_to_address;
537 current_gdbarch->address_to_pointer = unsigned_address_to_pointer;
538 current_gdbarch->return_value_on_stack = generic_return_value_on_stack_not;
ebba8386
AC
539 current_gdbarch->extract_return_value = legacy_extract_return_value;
540 current_gdbarch->store_return_value = legacy_store_return_value;
56f12751 541 current_gdbarch->use_struct_convention = generic_use_struct_convention;
85de9627
AC
542 current_gdbarch->prologue_frameless_p = generic_prologue_frameless_p;
543 current_gdbarch->breakpoint_from_pc = legacy_breakpoint_from_pc;
544 current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
545 current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
546 current_gdbarch->decr_pc_after_break = -1;
547 current_gdbarch->prepare_to_proceed = default_prepare_to_proceed;
548 current_gdbarch->function_start_offset = -1;
549 current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
550 current_gdbarch->frame_args_skip = -1;
551 current_gdbarch->frameless_function_invocation = generic_frameless_function_invocation_not;
7d6a26a7
AC
552 current_gdbarch->frame_args_address = get_frame_base;
553 current_gdbarch->frame_locals_address = get_frame_base;
85de9627
AC
554 current_gdbarch->convert_from_func_ptr_addr = core_addr_identity;
555 current_gdbarch->addr_bits_remove = core_addr_identity;
181c1381 556 current_gdbarch->smash_text_address = core_addr_identity;
85de9627
AC
557 current_gdbarch->print_insn = legacy_print_insn;
558 current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
68e9cc94 559 current_gdbarch->in_solib_call_trampoline = generic_in_solib_call_trampoline;
d50355b6 560 current_gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
d7bd68ca 561 current_gdbarch->pc_in_sigtramp = legacy_pc_in_sigtramp;
c12260ac 562 current_gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
552c04a7 563 current_gdbarch->construct_inferior_arguments = construct_inferior_arguments;
a2cf933a
EZ
564 current_gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
565 current_gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
5720643c 566 current_gdbarch->name_of_malloc = "malloc";
b59ff9d5 567 current_gdbarch->register_reggroup_p = default_register_reggroup_p;
0f71a2f6
JM
568 /* gdbarch_alloc() */
569
85de9627 570 return current_gdbarch;
0f71a2f6
JM
571}
572
573
058f20d5
JB
574/* Free a gdbarch struct. This should never happen in normal
575 operation --- once you've created a gdbarch, you keep it around.
576 However, if an architecture's init function encounters an error
577 building the structure, it may need to clean up a partially
578 constructed gdbarch. */
4b9b3959 579
058f20d5
JB
580void
581gdbarch_free (struct gdbarch *arch)
582{
95160752
AC
583 gdb_assert (arch != NULL);
584 free_gdbarch_data (arch);
338d7c5c 585 xfree (arch);
058f20d5
JB
586}
587
588
0f71a2f6
JM
589/* Ensure that all values in a GDBARCH are reasonable. */
590
0f71a2f6 591static void
104c1213 592verify_gdbarch (struct gdbarch *gdbarch)
0f71a2f6 593{
f16a1923
AC
594 struct ui_file *log;
595 struct cleanup *cleanups;
596 long dummy;
597 char *buf;
0f71a2f6 598 /* Only perform sanity checks on a multi-arch target. */
6166d547 599 if (!GDB_MULTI_ARCH)
0f71a2f6 600 return;
f16a1923
AC
601 log = mem_fileopen ();
602 cleanups = make_cleanup_ui_file_delete (log);
0f71a2f6 603 /* fundamental */
428721aa 604 if (gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
f16a1923 605 fprintf_unfiltered (log, "\n\tbyte-order");
0f71a2f6 606 if (gdbarch->bfd_arch_info == NULL)
f16a1923 607 fprintf_unfiltered (log, "\n\tbfd_arch_info");
0f71a2f6 608 /* Check those that need to be defined for the given multi-arch level. */
66b43ecb
AC
609 /* Skip verify of short_bit, invalid_p == 0 */
610 /* Skip verify of int_bit, invalid_p == 0 */
611 /* Skip verify of long_bit, invalid_p == 0 */
612 /* Skip verify of long_long_bit, invalid_p == 0 */
613 /* Skip verify of float_bit, invalid_p == 0 */
614 /* Skip verify of double_bit, invalid_p == 0 */
615 /* Skip verify of long_double_bit, invalid_p == 0 */
616 /* Skip verify of ptr_bit, invalid_p == 0 */
52204a0b
DT
617 if (gdbarch->addr_bit == 0)
618 gdbarch->addr_bit = TARGET_PTR_BIT;
c0e8c252 619 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
4e409299
JB
620 if (gdbarch->char_signed == -1)
621 gdbarch->char_signed = 1;
be8dfb87
AC
622 /* Skip verify of read_pc, invalid_p == 0 */
623 /* Skip verify of write_pc, invalid_p == 0 */
0ba6dca9 624 /* Skip verify of deprecated_target_read_fp, has predicate */
be8dfb87 625 /* Skip verify of read_sp, invalid_p == 0 */
6c0e89ed 626 /* Skip verify of deprecated_dummy_write_sp, has predicate */
39d4ef09 627 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
d8124050
AC
628 /* Skip verify of pseudo_register_read, has predicate */
629 /* Skip verify of pseudo_register_write, has predicate */
50248794 630 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
0f71a2f6 631 && (gdbarch->num_regs == -1))
f16a1923 632 fprintf_unfiltered (log, "\n\tnum_regs");
0aba1244 633 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
1200cd6e 634 /* Skip verify of sp_regnum, invalid_p == 0 */
0ba6dca9 635 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
1200cd6e 636 /* Skip verify of pc_regnum, invalid_p == 0 */
c2169756 637 /* Skip verify of ps_regnum, invalid_p == 0 */
60054393 638 /* Skip verify of fp0_regnum, invalid_p == 0 */
03863182 639 /* Skip verify of npc_regnum, invalid_p == 0 */
88c72b7d
AC
640 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
641 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
642 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
643 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
644 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
c0e8c252 645 /* Skip verify of register_name, invalid_p == 0 */
46654a5b 646 /* Skip verify of register_byte, has predicate */
b2e75d78 647 /* Skip verify of register_raw_size, invalid_p == 0 */
a0ed5532 648 /* Skip verify of deprecated_max_register_raw_size, has predicate */
b2e75d78 649 /* Skip verify of register_virtual_size, invalid_p == 0 */
a0ed5532 650 /* Skip verify of deprecated_max_register_virtual_size, has predicate */
35cac7cf
AC
651 /* Skip verify of register_virtual_type, has predicate */
652 /* Skip verify of register_type, has predicate */
903ad3a6 653 /* Skip verify of deprecated_do_registers_info, has predicate */
0ab7a791 654 /* Skip verify of print_registers_info, invalid_p == 0 */
23e3a7ac 655 /* Skip verify of print_float_info, has predicate */
e76f1f2e 656 /* Skip verify of print_vector_info, has predicate */
7c7651b2 657 /* Skip verify of register_sim_regno, invalid_p == 0 */
2649061d 658 /* Skip verify of register_bytes_ok, has predicate */
01fb7433
AC
659 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
660 /* Skip verify of cannot_store_register, invalid_p == 0 */
9df628e0 661 /* Skip verify of get_longjmp_target, has predicate */
07555a72 662 /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
b99fa2d2 663 /* Skip verify of call_dummy_location, invalid_p == 0 */
e9a2674e 664 /* Skip verify of call_dummy_address, invalid_p == 0 */
ae45cd16 665 /* Skip verify of deprecated_pc_in_call_dummy, has predicate */
b1e29e33
AC
666 /* Skip verify of deprecated_call_dummy_words, invalid_p == 0 */
667 /* Skip verify of deprecated_sizeof_call_dummy_words, invalid_p == 0 */
1bf6d5cc 668 /* Skip verify of deprecated_call_dummy_stack_adjust, has predicate */
b1e29e33 669 /* Skip verify of deprecated_fix_call_dummy, has predicate */
7043d8dc 670 /* Skip verify of push_dummy_code, has predicate */
2ca6c561 671 /* Skip verify of deprecated_init_frame_pc_first, has predicate */
a5afb99f 672 /* Skip verify of deprecated_init_frame_pc, has predicate */
129c1cd6 673 /* Skip verify of deprecated_get_saved_register, has predicate */
c0e8c252
AC
674 /* Skip verify of register_convertible, invalid_p == 0 */
675 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
676 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
13d01224
AC
677 /* Skip verify of convert_register_p, invalid_p == 0 */
678 /* Skip verify of register_to_value, invalid_p == 0 */
679 /* Skip verify of value_to_register, invalid_p == 0 */
4478b372
JB
680 /* Skip verify of pointer_to_address, invalid_p == 0 */
681 /* Skip verify of address_to_pointer, invalid_p == 0 */
fc0c74b1 682 /* Skip verify of integer_to_address, has predicate */
71a9f22e 683 /* Skip verify of return_value_on_stack, invalid_p == 0 */
b81774d8
AC
684 /* Skip verify of deprecated_push_arguments, has predicate */
685 /* Skip verify of push_dummy_call, has predicate */
f3824013 686 /* Skip verify of deprecated_push_dummy_frame, has predicate */
28f617b3 687 /* Skip verify of deprecated_push_return_address, has predicate */
749b82f6 688 /* Skip verify of deprecated_pop_frame, has predicate */
4183d812 689 /* Skip verify of deprecated_store_struct_return, has predicate */
ebba8386
AC
690 /* Skip verify of extract_return_value, invalid_p == 0 */
691 /* Skip verify of store_return_value, invalid_p == 0 */
049ee0e4 692 /* Skip verify of extract_struct_value_address, has predicate */
26e9b323 693 /* Skip verify of deprecated_extract_struct_value_address, has predicate */
56f12751 694 /* Skip verify of use_struct_convention, invalid_p == 0 */
f30ee0bc 695 /* Skip verify of deprecated_frame_init_saved_regs, has predicate */
e9582e71 696 /* Skip verify of deprecated_init_extra_frame_info, has predicate */
50248794 697 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
0f71a2f6 698 && (gdbarch->skip_prologue == 0))
f16a1923 699 fprintf_unfiltered (log, "\n\tskip_prologue");
dad41f9a 700 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
50248794 701 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
0f71a2f6 702 && (gdbarch->inner_than == 0))
f16a1923 703 fprintf_unfiltered (log, "\n\tinner_than");
c0e8c252
AC
704 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
705 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
706 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
50248794 707 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
0f71a2f6 708 && (gdbarch->decr_pc_after_break == -1))
f16a1923 709 fprintf_unfiltered (log, "\n\tdecr_pc_after_break");
e02bc4cc 710 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
50248794 711 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
0f71a2f6 712 && (gdbarch->function_start_offset == -1))
f16a1923 713 fprintf_unfiltered (log, "\n\tfunction_start_offset");
c0e8c252 714 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
50248794 715 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
0f71a2f6 716 && (gdbarch->frame_args_skip == -1))
f16a1923 717 fprintf_unfiltered (log, "\n\tframe_args_skip");
c0e8c252 718 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
618ce49f
AC
719 /* Skip verify of deprecated_frame_chain, has predicate */
720 /* Skip verify of deprecated_frame_chain_valid, has predicate */
8bedc050 721 /* Skip verify of deprecated_frame_saved_pc, has predicate */
12cc2063 722 /* Skip verify of unwind_pc, has predicate */
f4ded5b1
AC
723 /* Skip verify of frame_args_address, invalid_p == 0 */
724 /* Skip verify of frame_locals_address, invalid_p == 0 */
6913c89a 725 /* Skip verify of deprecated_saved_pc_after_call, has predicate */
50248794 726 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
0f71a2f6 727 && (gdbarch->frame_num_args == 0))
f16a1923 728 fprintf_unfiltered (log, "\n\tframe_num_args");
2ada493a 729 /* Skip verify of stack_align, has predicate */
dc604539 730 /* Skip verify of frame_align, has predicate */
f933a9c5 731 /* Skip verify of deprecated_extra_stack_alignment_needed, invalid_p == 0 */
d03e67c9 732 /* Skip verify of reg_struct_has_addr, has predicate */
d1e3cf49 733 /* Skip verify of save_dummy_frame_tos, has predicate */
6314f104 734 /* Skip verify of unwind_dummy_id, has predicate */
f0d4cc9e
AC
735 if (gdbarch->float_format == 0)
736 gdbarch->float_format = default_float_format (gdbarch);
737 if (gdbarch->double_format == 0)
738 gdbarch->double_format = default_double_format (gdbarch);
739 if (gdbarch->long_double_format == 0)
2fa5c1e0 740 gdbarch->long_double_format = default_double_format (gdbarch);
f517ea4e 741 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
875e1767 742 /* Skip verify of addr_bits_remove, invalid_p == 0 */
181c1381 743 /* Skip verify of smash_text_address, invalid_p == 0 */
64c4637f 744 /* Skip verify of software_single_step, has predicate */
2bf0cb65 745 /* Skip verify of print_insn, invalid_p == 0 */
bdcd319a 746 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
68e9cc94 747 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
d50355b6 748 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
d7bd68ca 749 /* Skip verify of pc_in_sigtramp, invalid_p == 0 */
43156d82 750 /* Skip verify of sigtramp_start, has predicate */
e76cff22 751 /* Skip verify of sigtramp_end, has predicate */
c12260ac 752 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
552c04a7 753 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
b6af0555 754 /* Skip verify of dwarf2_build_frame_info, has predicate */
a2cf933a
EZ
755 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
756 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
5720643c 757 /* Skip verify of name_of_malloc, invalid_p == 0 */
c4ed33b9 758 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
f74fa174 759 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
8b2dbe47
KB
760 /* Skip verify of address_class_type_flags, has predicate */
761 /* Skip verify of address_class_type_flags_to_name, has predicate */
762 /* Skip verify of address_class_name_to_type_flags, has predicate */
7e20f3fb 763 /* Skip verify of register_reggroup_p, invalid_p == 0 */
f16a1923
AC
764 buf = ui_file_xstrdup (log, &dummy);
765 make_cleanup (xfree, buf);
766 if (strlen (buf) > 0)
767 internal_error (__FILE__, __LINE__,
768 "verify_gdbarch: the following are invalid ...%s",
769 buf);
770 do_cleanups (cleanups);
0f71a2f6
JM
771}
772
773
774/* Print out the details of the current architecture. */
775
4b9b3959
AC
776/* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
777 just happens to match the global variable ``current_gdbarch''. That
778 way macros refering to that variable get the local and not the global
779 version - ulgh. Once everything is parameterised with gdbarch, this
780 will go away. */
781
0f71a2f6 782void
4b9b3959 783gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
0f71a2f6 784{
4b9b3959
AC
785 fprintf_unfiltered (file,
786 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
787 GDB_MULTI_ARCH);
1e9f55d0
AC
788 if (GDB_MULTI_ARCH)
789 fprintf_unfiltered (file,
790 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
791 gdbarch_frame_align_p (current_gdbarch));
dc604539
AC
792 if (GDB_MULTI_ARCH)
793 fprintf_unfiltered (file,
794 "gdbarch_dump: frame_align = 0x%08lx\n",
795 (long) current_gdbarch->frame_align);
c12260ac
CV
796 if (GDB_MULTI_ARCH)
797 fprintf_unfiltered (file,
5e74b15c
RE
798 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
799 (long) current_gdbarch->in_function_epilogue_p);
b59ff9d5
AC
800 if (GDB_MULTI_ARCH)
801 fprintf_unfiltered (file,
802 "gdbarch_dump: register_reggroup_p = 0x%08lx\n",
803 (long) current_gdbarch->register_reggroup_p);
1e9f55d0
AC
804 if (GDB_MULTI_ARCH)
805 fprintf_unfiltered (file,
806 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
807 gdbarch_pseudo_register_read_p (current_gdbarch));
5e74b15c
RE
808 if (GDB_MULTI_ARCH)
809 fprintf_unfiltered (file,
d8124050
AC
810 "gdbarch_dump: pseudo_register_read = 0x%08lx\n",
811 (long) current_gdbarch->pseudo_register_read);
1e9f55d0
AC
812 if (GDB_MULTI_ARCH)
813 fprintf_unfiltered (file,
814 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
815 gdbarch_pseudo_register_write_p (current_gdbarch));
5e74b15c
RE
816 if (GDB_MULTI_ARCH)
817 fprintf_unfiltered (file,
d8124050
AC
818 "gdbarch_dump: pseudo_register_write = 0x%08lx\n",
819 (long) current_gdbarch->pseudo_register_write);
1e9f55d0
AC
820 if (GDB_MULTI_ARCH)
821 fprintf_unfiltered (file,
822 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
823 gdbarch_address_class_name_to_type_flags_p (current_gdbarch));
8b2dbe47
KB
824 if (GDB_MULTI_ARCH)
825 fprintf_unfiltered (file,
5f11f355
AC
826 "gdbarch_dump: address_class_name_to_type_flags = 0x%08lx\n",
827 (long) current_gdbarch->address_class_name_to_type_flags);
1e9f55d0
AC
828#ifdef ADDRESS_CLASS_TYPE_FLAGS_P
829 fprintf_unfiltered (file,
830 "gdbarch_dump: %s # %s\n",
831 "ADDRESS_CLASS_TYPE_FLAGS_P()",
832 XSTRING (ADDRESS_CLASS_TYPE_FLAGS_P ()));
833 fprintf_unfiltered (file,
834 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS_P() = %d\n",
835 ADDRESS_CLASS_TYPE_FLAGS_P ());
836#endif
8b2dbe47
KB
837#ifdef ADDRESS_CLASS_TYPE_FLAGS
838 fprintf_unfiltered (file,
839 "gdbarch_dump: %s # %s\n",
840 "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)",
841 XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size, dwarf2_addr_class)));
842 if (GDB_MULTI_ARCH)
843 fprintf_unfiltered (file,
6cbda714 844 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS = <0x%08lx>\n",
8b2dbe47
KB
845 (long) current_gdbarch->address_class_type_flags
846 /*ADDRESS_CLASS_TYPE_FLAGS ()*/);
847#endif
1e9f55d0
AC
848 if (GDB_MULTI_ARCH)
849 fprintf_unfiltered (file,
850 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
851 gdbarch_address_class_type_flags_to_name_p (current_gdbarch));
8b2dbe47
KB
852 if (GDB_MULTI_ARCH)
853 fprintf_unfiltered (file,
5f11f355
AC
854 "gdbarch_dump: address_class_type_flags_to_name = 0x%08lx\n",
855 (long) current_gdbarch->address_class_type_flags_to_name);
08e45a40
AC
856#ifdef ADDRESS_TO_POINTER
857#if GDB_MULTI_ARCH
858 /* Macro might contain `[{}]' when not multi-arch */
4b9b3959 859 fprintf_unfiltered (file,
08e45a40
AC
860 "gdbarch_dump: %s # %s\n",
861 "ADDRESS_TO_POINTER(type, buf, addr)",
862 XSTRING (ADDRESS_TO_POINTER (type, buf, addr)));
4b9b3959 863#endif
08e45a40
AC
864 if (GDB_MULTI_ARCH)
865 fprintf_unfiltered (file,
6cbda714 866 "gdbarch_dump: ADDRESS_TO_POINTER = <0x%08lx>\n",
08e45a40
AC
867 (long) current_gdbarch->address_to_pointer
868 /*ADDRESS_TO_POINTER ()*/);
4b9b3959 869#endif
5e74b15c
RE
870#ifdef ADDR_BITS_REMOVE
871 fprintf_unfiltered (file,
872 "gdbarch_dump: %s # %s\n",
873 "ADDR_BITS_REMOVE(addr)",
874 XSTRING (ADDR_BITS_REMOVE (addr)));
875 if (GDB_MULTI_ARCH)
876 fprintf_unfiltered (file,
6cbda714 877 "gdbarch_dump: ADDR_BITS_REMOVE = <0x%08lx>\n",
5e74b15c
RE
878 (long) current_gdbarch->addr_bits_remove
879 /*ADDR_BITS_REMOVE ()*/);
880#endif
08e45a40 881#ifdef BELIEVE_PCC_PROMOTION
4b9b3959 882 fprintf_unfiltered (file,
08e45a40
AC
883 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
884 XSTRING (BELIEVE_PCC_PROMOTION));
885 fprintf_unfiltered (file,
06b25f14
AC
886 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
887 BELIEVE_PCC_PROMOTION);
4b9b3959 888#endif
08e45a40 889#ifdef BELIEVE_PCC_PROMOTION_TYPE
4b9b3959 890 fprintf_unfiltered (file,
08e45a40
AC
891 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
892 XSTRING (BELIEVE_PCC_PROMOTION_TYPE));
893 fprintf_unfiltered (file,
06b25f14
AC
894 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n",
895 BELIEVE_PCC_PROMOTION_TYPE);
4b9b3959 896#endif
08e45a40 897#ifdef BREAKPOINT_FROM_PC
4b9b3959 898 fprintf_unfiltered (file,
08e45a40
AC
899 "gdbarch_dump: %s # %s\n",
900 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
901 XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr)));
902 if (GDB_MULTI_ARCH)
903 fprintf_unfiltered (file,
6cbda714 904 "gdbarch_dump: BREAKPOINT_FROM_PC = <0x%08lx>\n",
08e45a40
AC
905 (long) current_gdbarch->breakpoint_from_pc
906 /*BREAKPOINT_FROM_PC ()*/);
4b9b3959 907#endif
08e45a40 908#ifdef CALL_DUMMY_ADDRESS
4b9b3959 909 fprintf_unfiltered (file,
08e45a40
AC
910 "gdbarch_dump: %s # %s\n",
911 "CALL_DUMMY_ADDRESS()",
912 XSTRING (CALL_DUMMY_ADDRESS ()));
913 if (GDB_MULTI_ARCH)
914 fprintf_unfiltered (file,
6cbda714 915 "gdbarch_dump: CALL_DUMMY_ADDRESS = <0x%08lx>\n",
08e45a40
AC
916 (long) current_gdbarch->call_dummy_address
917 /*CALL_DUMMY_ADDRESS ()*/);
4b9b3959 918#endif
08e45a40 919#ifdef CALL_DUMMY_LOCATION
52204a0b 920 fprintf_unfiltered (file,
08e45a40
AC
921 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
922 XSTRING (CALL_DUMMY_LOCATION));
923 fprintf_unfiltered (file,
06b25f14
AC
924 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
925 CALL_DUMMY_LOCATION);
52204a0b 926#endif
08e45a40 927#ifdef CANNOT_FETCH_REGISTER
4b9b3959
AC
928 fprintf_unfiltered (file,
929 "gdbarch_dump: %s # %s\n",
08e45a40
AC
930 "CANNOT_FETCH_REGISTER(regnum)",
931 XSTRING (CANNOT_FETCH_REGISTER (regnum)));
932 if (GDB_MULTI_ARCH)
933 fprintf_unfiltered (file,
6cbda714 934 "gdbarch_dump: CANNOT_FETCH_REGISTER = <0x%08lx>\n",
08e45a40
AC
935 (long) current_gdbarch->cannot_fetch_register
936 /*CANNOT_FETCH_REGISTER ()*/);
4b9b3959 937#endif
c4ed33b9
AC
938#ifdef CANNOT_STEP_BREAKPOINT
939 fprintf_unfiltered (file,
940 "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
941 XSTRING (CANNOT_STEP_BREAKPOINT));
942 fprintf_unfiltered (file,
943 "gdbarch_dump: CANNOT_STEP_BREAKPOINT = %d\n",
944 CANNOT_STEP_BREAKPOINT);
945#endif
08e45a40 946#ifdef CANNOT_STORE_REGISTER
4b9b3959
AC
947 fprintf_unfiltered (file,
948 "gdbarch_dump: %s # %s\n",
08e45a40
AC
949 "CANNOT_STORE_REGISTER(regnum)",
950 XSTRING (CANNOT_STORE_REGISTER (regnum)));
951 if (GDB_MULTI_ARCH)
952 fprintf_unfiltered (file,
6cbda714 953 "gdbarch_dump: CANNOT_STORE_REGISTER = <0x%08lx>\n",
08e45a40
AC
954 (long) current_gdbarch->cannot_store_register
955 /*CANNOT_STORE_REGISTER ()*/);
4b9b3959 956#endif
a2cf933a
EZ
957#ifdef COFF_MAKE_MSYMBOL_SPECIAL
958#if GDB_MULTI_ARCH
959 /* Macro might contain `[{}]' when not multi-arch */
960 fprintf_unfiltered (file,
961 "gdbarch_dump: %s # %s\n",
962 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
963 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val, msym)));
964#endif
965 if (GDB_MULTI_ARCH)
966 fprintf_unfiltered (file,
6cbda714 967 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
a2cf933a
EZ
968 (long) current_gdbarch->coff_make_msymbol_special
969 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
4b9b3959 970#endif
552c04a7
TT
971 if (GDB_MULTI_ARCH)
972 fprintf_unfiltered (file,
973 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
974 (long) current_gdbarch->construct_inferior_arguments);
08e45a40 975#ifdef CONVERT_FROM_FUNC_PTR_ADDR
39d4ef09
AC
976 fprintf_unfiltered (file,
977 "gdbarch_dump: %s # %s\n",
08e45a40
AC
978 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
979 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr)));
980 if (GDB_MULTI_ARCH)
981 fprintf_unfiltered (file,
6cbda714 982 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = <0x%08lx>\n",
08e45a40
AC
983 (long) current_gdbarch->convert_from_func_ptr_addr
984 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
39d4ef09 985#endif
13d01224
AC
986#ifdef CONVERT_REGISTER_P
987 fprintf_unfiltered (file,
988 "gdbarch_dump: %s # %s\n",
989 "CONVERT_REGISTER_P(regnum)",
990 XSTRING (CONVERT_REGISTER_P (regnum)));
991 if (GDB_MULTI_ARCH)
992 fprintf_unfiltered (file,
6cbda714 993 "gdbarch_dump: CONVERT_REGISTER_P = <0x%08lx>\n",
13d01224
AC
994 (long) current_gdbarch->convert_register_p
995 /*CONVERT_REGISTER_P ()*/);
996#endif
08e45a40 997#ifdef DECR_PC_AFTER_BREAK
4b9b3959 998 fprintf_unfiltered (file,
08e45a40
AC
999 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1000 XSTRING (DECR_PC_AFTER_BREAK));
0aba1244 1001 fprintf_unfiltered (file,
08e45a40
AC
1002 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1003 (long) DECR_PC_AFTER_BREAK);
0aba1244 1004#endif
b1e29e33
AC
1005#ifdef DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET
1006 fprintf_unfiltered (file,
1007 "gdbarch_dump: DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
1008 XSTRING (DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET));
1009 fprintf_unfiltered (file,
1010 "gdbarch_dump: DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET = %ld\n",
1011 (long) DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET);
1012#endif
1013#ifdef DEPRECATED_CALL_DUMMY_LENGTH
1014 fprintf_unfiltered (file,
1015 "gdbarch_dump: DEPRECATED_CALL_DUMMY_LENGTH # %s\n",
1016 XSTRING (DEPRECATED_CALL_DUMMY_LENGTH));
1017 fprintf_unfiltered (file,
1018 "gdbarch_dump: DEPRECATED_CALL_DUMMY_LENGTH = %d\n",
1019 DEPRECATED_CALL_DUMMY_LENGTH);
1020#endif
1bf6d5cc
AC
1021#ifdef DEPRECATED_CALL_DUMMY_STACK_ADJUST_P
1022 fprintf_unfiltered (file,
1023 "gdbarch_dump: %s # %s\n",
1024 "DEPRECATED_CALL_DUMMY_STACK_ADJUST_P()",
1025 XSTRING (DEPRECATED_CALL_DUMMY_STACK_ADJUST_P ()));
1026 fprintf_unfiltered (file,
1027 "gdbarch_dump: DEPRECATED_CALL_DUMMY_STACK_ADJUST_P() = %d\n",
1028 DEPRECATED_CALL_DUMMY_STACK_ADJUST_P ());
1029#endif
1030#ifdef DEPRECATED_CALL_DUMMY_STACK_ADJUST
1031 fprintf_unfiltered (file,
1032 "gdbarch_dump: DEPRECATED_CALL_DUMMY_STACK_ADJUST # %s\n",
1033 XSTRING (DEPRECATED_CALL_DUMMY_STACK_ADJUST));
1034 fprintf_unfiltered (file,
1035 "gdbarch_dump: DEPRECATED_CALL_DUMMY_STACK_ADJUST = %d\n",
1036 DEPRECATED_CALL_DUMMY_STACK_ADJUST);
1037#endif
b1e29e33
AC
1038#ifdef DEPRECATED_CALL_DUMMY_START_OFFSET
1039 fprintf_unfiltered (file,
1040 "gdbarch_dump: DEPRECATED_CALL_DUMMY_START_OFFSET # %s\n",
1041 XSTRING (DEPRECATED_CALL_DUMMY_START_OFFSET));
1042 fprintf_unfiltered (file,
1043 "gdbarch_dump: DEPRECATED_CALL_DUMMY_START_OFFSET = %ld\n",
1044 (long) DEPRECATED_CALL_DUMMY_START_OFFSET);
1045#endif
1046#ifdef DEPRECATED_CALL_DUMMY_WORDS
1047 fprintf_unfiltered (file,
1048 "gdbarch_dump: DEPRECATED_CALL_DUMMY_WORDS # %s\n",
1049 XSTRING (DEPRECATED_CALL_DUMMY_WORDS));
1050 fprintf_unfiltered (file,
1051 "gdbarch_dump: DEPRECATED_CALL_DUMMY_WORDS = 0x%08lx\n",
1052 (long) DEPRECATED_CALL_DUMMY_WORDS);
1053#endif
1e9f55d0
AC
1054#ifdef DEPRECATED_DO_REGISTERS_INFO_P
1055 fprintf_unfiltered (file,
1056 "gdbarch_dump: %s # %s\n",
1057 "DEPRECATED_DO_REGISTERS_INFO_P()",
1058 XSTRING (DEPRECATED_DO_REGISTERS_INFO_P ()));
1059 fprintf_unfiltered (file,
1060 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO_P() = %d\n",
1061 DEPRECATED_DO_REGISTERS_INFO_P ());
1062#endif
903ad3a6
AC
1063#ifdef DEPRECATED_DO_REGISTERS_INFO
1064#if GDB_MULTI_ARCH
1065 /* Macro might contain `[{}]' when not multi-arch */
1066 fprintf_unfiltered (file,
1067 "gdbarch_dump: %s # %s\n",
1068 "DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs)",
1069 XSTRING (DEPRECATED_DO_REGISTERS_INFO (reg_nr, fpregs)));
1070#endif
1071 if (GDB_MULTI_ARCH)
1072 fprintf_unfiltered (file,
6cbda714 1073 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO = <0x%08lx>\n",
903ad3a6
AC
1074 (long) current_gdbarch->deprecated_do_registers_info
1075 /*DEPRECATED_DO_REGISTERS_INFO ()*/);
1076#endif
6c0e89ed
AC
1077#ifdef DEPRECATED_DUMMY_WRITE_SP_P
1078 fprintf_unfiltered (file,
1079 "gdbarch_dump: %s # %s\n",
1080 "DEPRECATED_DUMMY_WRITE_SP_P()",
1081 XSTRING (DEPRECATED_DUMMY_WRITE_SP_P ()));
1082 fprintf_unfiltered (file,
1083 "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP_P() = %d\n",
1084 DEPRECATED_DUMMY_WRITE_SP_P ());
1085#endif
1086#ifdef DEPRECATED_DUMMY_WRITE_SP
1087#if GDB_MULTI_ARCH
1088 /* Macro might contain `[{}]' when not multi-arch */
1089 fprintf_unfiltered (file,
1090 "gdbarch_dump: %s # %s\n",
1091 "DEPRECATED_DUMMY_WRITE_SP(val)",
1092 XSTRING (DEPRECATED_DUMMY_WRITE_SP (val)));
1093#endif
1094 if (GDB_MULTI_ARCH)
1095 fprintf_unfiltered (file,
1096 "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP = <0x%08lx>\n",
1097 (long) current_gdbarch->deprecated_dummy_write_sp
1098 /*DEPRECATED_DUMMY_WRITE_SP ()*/);
1099#endif
26e9b323
AC
1100#ifdef DEPRECATED_EXTRACT_RETURN_VALUE
1101#if GDB_MULTI_ARCH
1102 /* Macro might contain `[{}]' when not multi-arch */
1103 fprintf_unfiltered (file,
1104 "gdbarch_dump: %s # %s\n",
1105 "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1106 XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type, regbuf, valbuf)));
1107#endif
1108 if (GDB_MULTI_ARCH)
1109 fprintf_unfiltered (file,
6cbda714 1110 "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = <0x%08lx>\n",
26e9b323
AC
1111 (long) current_gdbarch->deprecated_extract_return_value
1112 /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/);
1113#endif
1e9f55d0
AC
1114#ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P
1115 fprintf_unfiltered (file,
1116 "gdbarch_dump: %s # %s\n",
1117 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P()",
1118 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
1119 fprintf_unfiltered (file,
1120 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
1121 DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ());
1122#endif
26e9b323
AC
1123#ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
1124 fprintf_unfiltered (file,
1125 "gdbarch_dump: %s # %s\n",
1126 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1127 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regbuf)));
1128 if (GDB_MULTI_ARCH)
1129 fprintf_unfiltered (file,
6cbda714 1130 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
26e9b323
AC
1131 (long) current_gdbarch->deprecated_extract_struct_value_address
1132 /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1133#endif
f933a9c5
AC
1134#ifdef DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED
1135 fprintf_unfiltered (file,
1136 "gdbarch_dump: DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1137 XSTRING (DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED));
1138 fprintf_unfiltered (file,
1139 "gdbarch_dump: DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED = %d\n",
1140 DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED);
1141#endif
b1e29e33
AC
1142#ifdef DEPRECATED_FIX_CALL_DUMMY_P
1143 fprintf_unfiltered (file,
1144 "gdbarch_dump: %s # %s\n",
1145 "DEPRECATED_FIX_CALL_DUMMY_P()",
1146 XSTRING (DEPRECATED_FIX_CALL_DUMMY_P ()));
1147 fprintf_unfiltered (file,
1148 "gdbarch_dump: DEPRECATED_FIX_CALL_DUMMY_P() = %d\n",
1149 DEPRECATED_FIX_CALL_DUMMY_P ());
1150#endif
1151#ifdef DEPRECATED_FIX_CALL_DUMMY
1152#if GDB_MULTI_ARCH
1153 /* Macro might contain `[{}]' when not multi-arch */
1154 fprintf_unfiltered (file,
1155 "gdbarch_dump: %s # %s\n",
1156 "DEPRECATED_FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1157 XSTRING (DEPRECATED_FIX_CALL_DUMMY (dummy, pc, fun, nargs, args, type, gcc_p)));
1158#endif
1159 if (GDB_MULTI_ARCH)
1160 fprintf_unfiltered (file,
1161 "gdbarch_dump: DEPRECATED_FIX_CALL_DUMMY = <0x%08lx>\n",
1162 (long) current_gdbarch->deprecated_fix_call_dummy
1163 /*DEPRECATED_FIX_CALL_DUMMY ()*/);
1164#endif
0ba6dca9
AC
1165#ifdef DEPRECATED_FP_REGNUM
1166 fprintf_unfiltered (file,
1167 "gdbarch_dump: DEPRECATED_FP_REGNUM # %s\n",
1168 XSTRING (DEPRECATED_FP_REGNUM));
1169 fprintf_unfiltered (file,
1170 "gdbarch_dump: DEPRECATED_FP_REGNUM = %d\n",
1171 DEPRECATED_FP_REGNUM);
1172#endif
618ce49f
AC
1173#ifdef DEPRECATED_FRAME_CHAIN_P
1174 fprintf_unfiltered (file,
1175 "gdbarch_dump: %s # %s\n",
1176 "DEPRECATED_FRAME_CHAIN_P()",
1177 XSTRING (DEPRECATED_FRAME_CHAIN_P ()));
1178 fprintf_unfiltered (file,
1179 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_P() = %d\n",
1180 DEPRECATED_FRAME_CHAIN_P ());
1181#endif
1182#ifdef DEPRECATED_FRAME_CHAIN
1183 fprintf_unfiltered (file,
1184 "gdbarch_dump: %s # %s\n",
1185 "DEPRECATED_FRAME_CHAIN(frame)",
1186 XSTRING (DEPRECATED_FRAME_CHAIN (frame)));
1187 if (GDB_MULTI_ARCH)
1188 fprintf_unfiltered (file,
1189 "gdbarch_dump: DEPRECATED_FRAME_CHAIN = <0x%08lx>\n",
1190 (long) current_gdbarch->deprecated_frame_chain
1191 /*DEPRECATED_FRAME_CHAIN ()*/);
1192#endif
1193#ifdef DEPRECATED_FRAME_CHAIN_VALID_P
1194 fprintf_unfiltered (file,
1195 "gdbarch_dump: %s # %s\n",
1196 "DEPRECATED_FRAME_CHAIN_VALID_P()",
1197 XSTRING (DEPRECATED_FRAME_CHAIN_VALID_P ()));
1198 fprintf_unfiltered (file,
1199 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID_P() = %d\n",
1200 DEPRECATED_FRAME_CHAIN_VALID_P ());
1201#endif
1202#ifdef DEPRECATED_FRAME_CHAIN_VALID
1203 fprintf_unfiltered (file,
1204 "gdbarch_dump: %s # %s\n",
1205 "DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe)",
1206 XSTRING (DEPRECATED_FRAME_CHAIN_VALID (chain, thisframe)));
1207 if (GDB_MULTI_ARCH)
1208 fprintf_unfiltered (file,
1209 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID = <0x%08lx>\n",
1210 (long) current_gdbarch->deprecated_frame_chain_valid
1211 /*DEPRECATED_FRAME_CHAIN_VALID ()*/);
1212#endif
f30ee0bc
AC
1213#ifdef DEPRECATED_FRAME_INIT_SAVED_REGS_P
1214 fprintf_unfiltered (file,
1215 "gdbarch_dump: %s # %s\n",
1216 "DEPRECATED_FRAME_INIT_SAVED_REGS_P()",
1217 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS_P ()));
1218 fprintf_unfiltered (file,
1219 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS_P() = %d\n",
1220 DEPRECATED_FRAME_INIT_SAVED_REGS_P ());
1221#endif
1222#ifdef DEPRECATED_FRAME_INIT_SAVED_REGS
1223#if GDB_MULTI_ARCH
1224 /* Macro might contain `[{}]' when not multi-arch */
1225 fprintf_unfiltered (file,
1226 "gdbarch_dump: %s # %s\n",
1227 "DEPRECATED_FRAME_INIT_SAVED_REGS(frame)",
1228 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS (frame)));
1229#endif
1230 if (GDB_MULTI_ARCH)
1231 fprintf_unfiltered (file,
1232 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS = <0x%08lx>\n",
1233 (long) current_gdbarch->deprecated_frame_init_saved_regs
1234 /*DEPRECATED_FRAME_INIT_SAVED_REGS ()*/);
1235#endif
8bedc050
AC
1236#ifdef DEPRECATED_FRAME_SAVED_PC_P
1237 fprintf_unfiltered (file,
1238 "gdbarch_dump: %s # %s\n",
1239 "DEPRECATED_FRAME_SAVED_PC_P()",
1240 XSTRING (DEPRECATED_FRAME_SAVED_PC_P ()));
1241 fprintf_unfiltered (file,
1242 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC_P() = %d\n",
1243 DEPRECATED_FRAME_SAVED_PC_P ());
1244#endif
1245#ifdef DEPRECATED_FRAME_SAVED_PC
1246 fprintf_unfiltered (file,
1247 "gdbarch_dump: %s # %s\n",
1248 "DEPRECATED_FRAME_SAVED_PC(fi)",
1249 XSTRING (DEPRECATED_FRAME_SAVED_PC (fi)));
1250 if (GDB_MULTI_ARCH)
1251 fprintf_unfiltered (file,
1252 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC = <0x%08lx>\n",
1253 (long) current_gdbarch->deprecated_frame_saved_pc
1254 /*DEPRECATED_FRAME_SAVED_PC ()*/);
1255#endif
129c1cd6
AC
1256#ifdef DEPRECATED_GET_SAVED_REGISTER_P
1257 fprintf_unfiltered (file,
1258 "gdbarch_dump: %s # %s\n",
1259 "DEPRECATED_GET_SAVED_REGISTER_P()",
1260 XSTRING (DEPRECATED_GET_SAVED_REGISTER_P ()));
1261 fprintf_unfiltered (file,
1262 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER_P() = %d\n",
1263 DEPRECATED_GET_SAVED_REGISTER_P ());
1264#endif
1265#ifdef DEPRECATED_GET_SAVED_REGISTER
1266#if GDB_MULTI_ARCH
1267 /* Macro might contain `[{}]' when not multi-arch */
1268 fprintf_unfiltered (file,
1269 "gdbarch_dump: %s # %s\n",
1270 "DEPRECATED_GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1271 XSTRING (DEPRECATED_GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval)));
1272#endif
1273 if (GDB_MULTI_ARCH)
1274 fprintf_unfiltered (file,
1275 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER = <0x%08lx>\n",
1276 (long) current_gdbarch->deprecated_get_saved_register
1277 /*DEPRECATED_GET_SAVED_REGISTER ()*/);
1278#endif
e9582e71
AC
1279#ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO_P
1280 fprintf_unfiltered (file,
1281 "gdbarch_dump: %s # %s\n",
1282 "DEPRECATED_INIT_EXTRA_FRAME_INFO_P()",
1283 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO_P ()));
1284 fprintf_unfiltered (file,
1285 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO_P() = %d\n",
1286 DEPRECATED_INIT_EXTRA_FRAME_INFO_P ());
1287#endif
1288#ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO
1289#if GDB_MULTI_ARCH
1290 /* Macro might contain `[{}]' when not multi-arch */
1291 fprintf_unfiltered (file,
1292 "gdbarch_dump: %s # %s\n",
1293 "DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1294 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO (fromleaf, frame)));
1295#endif
1296 if (GDB_MULTI_ARCH)
1297 fprintf_unfiltered (file,
1298 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO = <0x%08lx>\n",
1299 (long) current_gdbarch->deprecated_init_extra_frame_info
1300 /*DEPRECATED_INIT_EXTRA_FRAME_INFO ()*/);
1301#endif
a5afb99f
AC
1302#ifdef DEPRECATED_INIT_FRAME_PC_P
1303 fprintf_unfiltered (file,
1304 "gdbarch_dump: %s # %s\n",
1305 "DEPRECATED_INIT_FRAME_PC_P()",
1306 XSTRING (DEPRECATED_INIT_FRAME_PC_P ()));
1307 fprintf_unfiltered (file,
1308 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_P() = %d\n",
1309 DEPRECATED_INIT_FRAME_PC_P ());
1310#endif
1311#ifdef DEPRECATED_INIT_FRAME_PC
1312 fprintf_unfiltered (file,
1313 "gdbarch_dump: %s # %s\n",
1314 "DEPRECATED_INIT_FRAME_PC(fromleaf, prev)",
1315 XSTRING (DEPRECATED_INIT_FRAME_PC (fromleaf, prev)));
1316 if (GDB_MULTI_ARCH)
1317 fprintf_unfiltered (file,
1318 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC = <0x%08lx>\n",
1319 (long) current_gdbarch->deprecated_init_frame_pc
1320 /*DEPRECATED_INIT_FRAME_PC ()*/);
1321#endif
2ca6c561
AC
1322#ifdef DEPRECATED_INIT_FRAME_PC_FIRST_P
1323 fprintf_unfiltered (file,
1324 "gdbarch_dump: %s # %s\n",
1325 "DEPRECATED_INIT_FRAME_PC_FIRST_P()",
1326 XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST_P ()));
1327 fprintf_unfiltered (file,
1328 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST_P() = %d\n",
1329 DEPRECATED_INIT_FRAME_PC_FIRST_P ());
1330#endif
1331#ifdef DEPRECATED_INIT_FRAME_PC_FIRST
2ca6c561
AC
1332 fprintf_unfiltered (file,
1333 "gdbarch_dump: %s # %s\n",
1334 "DEPRECATED_INIT_FRAME_PC_FIRST(fromleaf, prev)",
1335 XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST (fromleaf, prev)));
2ca6c561
AC
1336 if (GDB_MULTI_ARCH)
1337 fprintf_unfiltered (file,
6cbda714 1338 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST = <0x%08lx>\n",
2ca6c561
AC
1339 (long) current_gdbarch->deprecated_init_frame_pc_first
1340 /*DEPRECATED_INIT_FRAME_PC_FIRST ()*/);
1341#endif
a0ed5532
AC
1342#ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE_P
1343 fprintf_unfiltered (file,
1344 "gdbarch_dump: %s # %s\n",
1345 "DEPRECATED_MAX_REGISTER_RAW_SIZE_P()",
1346 XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE_P ()));
1347 fprintf_unfiltered (file,
1348 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE_P() = %d\n",
1349 DEPRECATED_MAX_REGISTER_RAW_SIZE_P ());
1350#endif
1351#ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE
1352 fprintf_unfiltered (file,
1353 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE # %s\n",
1354 XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE));
1355 fprintf_unfiltered (file,
1356 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE = %d\n",
1357 DEPRECATED_MAX_REGISTER_RAW_SIZE);
1358#endif
1359#ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P
1360 fprintf_unfiltered (file,
1361 "gdbarch_dump: %s # %s\n",
1362 "DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P()",
1363 XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ()));
1364 fprintf_unfiltered (file,
1365 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() = %d\n",
1366 DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ());
1367#endif
1368#ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE
1369 fprintf_unfiltered (file,
1370 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1371 XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE));
1372 fprintf_unfiltered (file,
1373 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1374 DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE);
1375#endif
1e9f55d0
AC
1376#ifdef DEPRECATED_PC_IN_CALL_DUMMY_P
1377 fprintf_unfiltered (file,
1378 "gdbarch_dump: %s # %s\n",
1379 "DEPRECATED_PC_IN_CALL_DUMMY_P()",
1380 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY_P ()));
1381 fprintf_unfiltered (file,
1382 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY_P() = %d\n",
1383 DEPRECATED_PC_IN_CALL_DUMMY_P ());
1384#endif
ae45cd16
AC
1385#ifdef DEPRECATED_PC_IN_CALL_DUMMY
1386 fprintf_unfiltered (file,
1387 "gdbarch_dump: %s # %s\n",
1388 "DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1389 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY (pc, sp, frame_address)));
1390 if (GDB_MULTI_ARCH)
1391 fprintf_unfiltered (file,
6cbda714 1392 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY = <0x%08lx>\n",
ae45cd16
AC
1393 (long) current_gdbarch->deprecated_pc_in_call_dummy
1394 /*DEPRECATED_PC_IN_CALL_DUMMY ()*/);
1395#endif
749b82f6
AC
1396#ifdef DEPRECATED_POP_FRAME_P
1397 fprintf_unfiltered (file,
1398 "gdbarch_dump: %s # %s\n",
1399 "DEPRECATED_POP_FRAME_P()",
1400 XSTRING (DEPRECATED_POP_FRAME_P ()));
1401 fprintf_unfiltered (file,
1402 "gdbarch_dump: DEPRECATED_POP_FRAME_P() = %d\n",
1403 DEPRECATED_POP_FRAME_P ());
1404#endif
1405#ifdef DEPRECATED_POP_FRAME
1406#if GDB_MULTI_ARCH
1407 /* Macro might contain `[{}]' when not multi-arch */
1408 fprintf_unfiltered (file,
1409 "gdbarch_dump: %s # %s\n",
1410 "DEPRECATED_POP_FRAME(-)",
1411 XSTRING (DEPRECATED_POP_FRAME (-)));
1412#endif
1413 if (GDB_MULTI_ARCH)
1414 fprintf_unfiltered (file,
1415 "gdbarch_dump: DEPRECATED_POP_FRAME = <0x%08lx>\n",
1416 (long) current_gdbarch->deprecated_pop_frame
1417 /*DEPRECATED_POP_FRAME ()*/);
1418#endif
b81774d8
AC
1419#ifdef DEPRECATED_PUSH_ARGUMENTS_P
1420 fprintf_unfiltered (file,
1421 "gdbarch_dump: %s # %s\n",
1422 "DEPRECATED_PUSH_ARGUMENTS_P()",
1423 XSTRING (DEPRECATED_PUSH_ARGUMENTS_P ()));
1424 fprintf_unfiltered (file,
1425 "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS_P() = %d\n",
1426 DEPRECATED_PUSH_ARGUMENTS_P ());
1427#endif
1428#ifdef DEPRECATED_PUSH_ARGUMENTS
1429 fprintf_unfiltered (file,
1430 "gdbarch_dump: %s # %s\n",
1431 "DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1432 XSTRING (DEPRECATED_PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr)));
1433 if (GDB_MULTI_ARCH)
1434 fprintf_unfiltered (file,
1435 "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS = <0x%08lx>\n",
1436 (long) current_gdbarch->deprecated_push_arguments
1437 /*DEPRECATED_PUSH_ARGUMENTS ()*/);
1438#endif
f3824013
AC
1439#ifdef DEPRECATED_PUSH_DUMMY_FRAME_P
1440 fprintf_unfiltered (file,
1441 "gdbarch_dump: %s # %s\n",
1442 "DEPRECATED_PUSH_DUMMY_FRAME_P()",
1443 XSTRING (DEPRECATED_PUSH_DUMMY_FRAME_P ()));
1444 fprintf_unfiltered (file,
1445 "gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME_P() = %d\n",
1446 DEPRECATED_PUSH_DUMMY_FRAME_P ());
1447#endif
1448#ifdef DEPRECATED_PUSH_DUMMY_FRAME
1449#if GDB_MULTI_ARCH
1450 /* Macro might contain `[{}]' when not multi-arch */
1451 fprintf_unfiltered (file,
1452 "gdbarch_dump: %s # %s\n",
1453 "DEPRECATED_PUSH_DUMMY_FRAME(-)",
1454 XSTRING (DEPRECATED_PUSH_DUMMY_FRAME (-)));
1455#endif
1456 if (GDB_MULTI_ARCH)
1457 fprintf_unfiltered (file,
1458 "gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME = <0x%08lx>\n",
1459 (long) current_gdbarch->deprecated_push_dummy_frame
1460 /*DEPRECATED_PUSH_DUMMY_FRAME ()*/);
1461#endif
28f617b3
AC
1462#ifdef DEPRECATED_PUSH_RETURN_ADDRESS_P
1463 fprintf_unfiltered (file,
1464 "gdbarch_dump: %s # %s\n",
1465 "DEPRECATED_PUSH_RETURN_ADDRESS_P()",
1466 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS_P ()));
1467 fprintf_unfiltered (file,
1468 "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS_P() = %d\n",
1469 DEPRECATED_PUSH_RETURN_ADDRESS_P ());
1470#endif
1471#ifdef DEPRECATED_PUSH_RETURN_ADDRESS
1472 fprintf_unfiltered (file,
1473 "gdbarch_dump: %s # %s\n",
1474 "DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp)",
1475 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS (pc, sp)));
1476 if (GDB_MULTI_ARCH)
1477 fprintf_unfiltered (file,
1478 "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS = <0x%08lx>\n",
1479 (long) current_gdbarch->deprecated_push_return_address
1480 /*DEPRECATED_PUSH_RETURN_ADDRESS ()*/);
1481#endif
b1e29e33
AC
1482#ifdef DEPRECATED_REGISTER_SIZE
1483 fprintf_unfiltered (file,
1484 "gdbarch_dump: DEPRECATED_REGISTER_SIZE # %s\n",
1485 XSTRING (DEPRECATED_REGISTER_SIZE));
1486 fprintf_unfiltered (file,
1487 "gdbarch_dump: DEPRECATED_REGISTER_SIZE = %d\n",
1488 DEPRECATED_REGISTER_SIZE);
1489#endif
6913c89a
AC
1490#ifdef DEPRECATED_SAVED_PC_AFTER_CALL_P
1491 fprintf_unfiltered (file,
1492 "gdbarch_dump: %s # %s\n",
1493 "DEPRECATED_SAVED_PC_AFTER_CALL_P()",
1494 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL_P ()));
1495 fprintf_unfiltered (file,
1496 "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL_P() = %d\n",
1497 DEPRECATED_SAVED_PC_AFTER_CALL_P ());
1498#endif
1499#ifdef DEPRECATED_SAVED_PC_AFTER_CALL
1500 fprintf_unfiltered (file,
1501 "gdbarch_dump: %s # %s\n",
1502 "DEPRECATED_SAVED_PC_AFTER_CALL(frame)",
1503 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL (frame)));
1504 if (GDB_MULTI_ARCH)
1505 fprintf_unfiltered (file,
1506 "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL = <0x%08lx>\n",
1507 (long) current_gdbarch->deprecated_saved_pc_after_call
1508 /*DEPRECATED_SAVED_PC_AFTER_CALL ()*/);
1509#endif
b1e29e33
AC
1510#ifdef DEPRECATED_SIZEOF_CALL_DUMMY_WORDS
1511 fprintf_unfiltered (file,
1512 "gdbarch_dump: DEPRECATED_SIZEOF_CALL_DUMMY_WORDS # %s\n",
1513 XSTRING (DEPRECATED_SIZEOF_CALL_DUMMY_WORDS));
1514 fprintf_unfiltered (file,
1515 "gdbarch_dump: DEPRECATED_SIZEOF_CALL_DUMMY_WORDS = %d\n",
1516 DEPRECATED_SIZEOF_CALL_DUMMY_WORDS);
1517#endif
ebba8386
AC
1518#ifdef DEPRECATED_STORE_RETURN_VALUE
1519#if GDB_MULTI_ARCH
1520 /* Macro might contain `[{}]' when not multi-arch */
1521 fprintf_unfiltered (file,
1522 "gdbarch_dump: %s # %s\n",
1523 "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
1524 XSTRING (DEPRECATED_STORE_RETURN_VALUE (type, valbuf)));
1525#endif
1526 if (GDB_MULTI_ARCH)
1527 fprintf_unfiltered (file,
6cbda714 1528 "gdbarch_dump: DEPRECATED_STORE_RETURN_VALUE = <0x%08lx>\n",
ebba8386
AC
1529 (long) current_gdbarch->deprecated_store_return_value
1530 /*DEPRECATED_STORE_RETURN_VALUE ()*/);
1531#endif
4183d812
AC
1532#ifdef DEPRECATED_STORE_STRUCT_RETURN_P
1533 fprintf_unfiltered (file,
1534 "gdbarch_dump: %s # %s\n",
1535 "DEPRECATED_STORE_STRUCT_RETURN_P()",
1536 XSTRING (DEPRECATED_STORE_STRUCT_RETURN_P ()));
1537 fprintf_unfiltered (file,
1538 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN_P() = %d\n",
1539 DEPRECATED_STORE_STRUCT_RETURN_P ());
1540#endif
1541#ifdef DEPRECATED_STORE_STRUCT_RETURN
1542#if GDB_MULTI_ARCH
1543 /* Macro might contain `[{}]' when not multi-arch */
1544 fprintf_unfiltered (file,
1545 "gdbarch_dump: %s # %s\n",
1546 "DEPRECATED_STORE_STRUCT_RETURN(addr, sp)",
1547 XSTRING (DEPRECATED_STORE_STRUCT_RETURN (addr, sp)));
1548#endif
1549 if (GDB_MULTI_ARCH)
1550 fprintf_unfiltered (file,
1551 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN = <0x%08lx>\n",
1552 (long) current_gdbarch->deprecated_store_struct_return
1553 /*DEPRECATED_STORE_STRUCT_RETURN ()*/);
1554#endif
0ba6dca9
AC
1555#ifdef DEPRECATED_TARGET_READ_FP_P
1556 fprintf_unfiltered (file,
1557 "gdbarch_dump: %s # %s\n",
1558 "DEPRECATED_TARGET_READ_FP_P()",
1559 XSTRING (DEPRECATED_TARGET_READ_FP_P ()));
1560 fprintf_unfiltered (file,
1561 "gdbarch_dump: DEPRECATED_TARGET_READ_FP_P() = %d\n",
1562 DEPRECATED_TARGET_READ_FP_P ());
1563#endif
1564#ifdef DEPRECATED_TARGET_READ_FP
1565 fprintf_unfiltered (file,
1566 "gdbarch_dump: %s # %s\n",
1567 "DEPRECATED_TARGET_READ_FP()",
1568 XSTRING (DEPRECATED_TARGET_READ_FP ()));
1569 if (GDB_MULTI_ARCH)
1570 fprintf_unfiltered (file,
1571 "gdbarch_dump: DEPRECATED_TARGET_READ_FP = <0x%08lx>\n",
1572 (long) current_gdbarch->deprecated_target_read_fp
1573 /*DEPRECATED_TARGET_READ_FP ()*/);
1574#endif
07555a72
AC
1575#ifdef DEPRECATED_USE_GENERIC_DUMMY_FRAMES
1576 fprintf_unfiltered (file,
1577 "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES # %s\n",
1578 XSTRING (DEPRECATED_USE_GENERIC_DUMMY_FRAMES));
1579 fprintf_unfiltered (file,
1580 "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES = %d\n",
1581 DEPRECATED_USE_GENERIC_DUMMY_FRAMES);
1582#endif
1e9f55d0
AC
1583#ifdef DWARF2_BUILD_FRAME_INFO_P
1584 fprintf_unfiltered (file,
1585 "gdbarch_dump: %s # %s\n",
1586 "DWARF2_BUILD_FRAME_INFO_P()",
1587 XSTRING (DWARF2_BUILD_FRAME_INFO_P ()));
1588 fprintf_unfiltered (file,
1589 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO_P() = %d\n",
1590 DWARF2_BUILD_FRAME_INFO_P ());
1591#endif
b6af0555
JS
1592#ifdef DWARF2_BUILD_FRAME_INFO
1593#if GDB_MULTI_ARCH
1594 /* Macro might contain `[{}]' when not multi-arch */
1595 fprintf_unfiltered (file,
1596 "gdbarch_dump: %s # %s\n",
1597 "DWARF2_BUILD_FRAME_INFO(objfile)",
1598 XSTRING (DWARF2_BUILD_FRAME_INFO (objfile)));
1599#endif
1600 if (GDB_MULTI_ARCH)
1601 fprintf_unfiltered (file,
6cbda714 1602 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = <0x%08lx>\n",
b6af0555
JS
1603 (long) current_gdbarch->dwarf2_build_frame_info
1604 /*DWARF2_BUILD_FRAME_INFO ()*/);
1605#endif
08e45a40 1606#ifdef DWARF2_REG_TO_REGNUM
4b9b3959 1607 fprintf_unfiltered (file,
08e45a40
AC
1608 "gdbarch_dump: %s # %s\n",
1609 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1610 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr)));
1611 if (GDB_MULTI_ARCH)
1612 fprintf_unfiltered (file,
6cbda714 1613 "gdbarch_dump: DWARF2_REG_TO_REGNUM = <0x%08lx>\n",
08e45a40
AC
1614 (long) current_gdbarch->dwarf2_reg_to_regnum
1615 /*DWARF2_REG_TO_REGNUM ()*/);
4b9b3959 1616#endif
08e45a40 1617#ifdef DWARF_REG_TO_REGNUM
88c72b7d
AC
1618 fprintf_unfiltered (file,
1619 "gdbarch_dump: %s # %s\n",
08e45a40
AC
1620 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1621 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr)));
1622 if (GDB_MULTI_ARCH)
1623 fprintf_unfiltered (file,
6cbda714 1624 "gdbarch_dump: DWARF_REG_TO_REGNUM = <0x%08lx>\n",
08e45a40
AC
1625 (long) current_gdbarch->dwarf_reg_to_regnum
1626 /*DWARF_REG_TO_REGNUM ()*/);
88c72b7d
AC
1627#endif
1628#ifdef ECOFF_REG_TO_REGNUM
1629 fprintf_unfiltered (file,
1630 "gdbarch_dump: %s # %s\n",
1631 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1632 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr)));
08e45a40
AC
1633 if (GDB_MULTI_ARCH)
1634 fprintf_unfiltered (file,
6cbda714 1635 "gdbarch_dump: ECOFF_REG_TO_REGNUM = <0x%08lx>\n",
08e45a40
AC
1636 (long) current_gdbarch->ecoff_reg_to_regnum
1637 /*ECOFF_REG_TO_REGNUM ()*/);
88c72b7d 1638#endif
a2cf933a
EZ
1639#ifdef ELF_MAKE_MSYMBOL_SPECIAL
1640#if GDB_MULTI_ARCH
1641 /* Macro might contain `[{}]' when not multi-arch */
1642 fprintf_unfiltered (file,
1643 "gdbarch_dump: %s # %s\n",
1644 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1645 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym, msym)));
1646#endif
1647 if (GDB_MULTI_ARCH)
1648 fprintf_unfiltered (file,
6cbda714 1649 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
a2cf933a
EZ
1650 (long) current_gdbarch->elf_make_msymbol_special
1651 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1652#endif
049ee0e4
AC
1653#ifdef EXTRACT_RETURN_VALUE
1654#if GDB_MULTI_ARCH
1655 /* Macro might contain `[{}]' when not multi-arch */
1656 fprintf_unfiltered (file,
1657 "gdbarch_dump: %s # %s\n",
1658 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1659 XSTRING (EXTRACT_RETURN_VALUE (type, regcache, valbuf)));
1660#endif
1661 if (GDB_MULTI_ARCH)
1662 fprintf_unfiltered (file,
6cbda714 1663 "gdbarch_dump: EXTRACT_RETURN_VALUE = <0x%08lx>\n",
049ee0e4
AC
1664 (long) current_gdbarch->extract_return_value
1665 /*EXTRACT_RETURN_VALUE ()*/);
1666#endif
1e9f55d0
AC
1667#ifdef EXTRACT_STRUCT_VALUE_ADDRESS_P
1668 fprintf_unfiltered (file,
1669 "gdbarch_dump: %s # %s\n",
1670 "EXTRACT_STRUCT_VALUE_ADDRESS_P()",
1671 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
1672 fprintf_unfiltered (file,
1673 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
1674 EXTRACT_STRUCT_VALUE_ADDRESS_P ());
1675#endif
049ee0e4
AC
1676#ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1677 fprintf_unfiltered (file,
1678 "gdbarch_dump: %s # %s\n",
1679 "EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
1680 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regcache)));
1681 if (GDB_MULTI_ARCH)
1682 fprintf_unfiltered (file,
6cbda714 1683 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
049ee0e4
AC
1684 (long) current_gdbarch->extract_struct_value_address
1685 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1686#endif
08e45a40 1687#ifdef FP0_REGNUM
4b9b3959 1688 fprintf_unfiltered (file,
08e45a40
AC
1689 "gdbarch_dump: FP0_REGNUM # %s\n",
1690 XSTRING (FP0_REGNUM));
1691 fprintf_unfiltered (file,
06b25f14
AC
1692 "gdbarch_dump: FP0_REGNUM = %d\n",
1693 FP0_REGNUM);
4b9b3959 1694#endif
5e74b15c
RE
1695#ifdef FRAMELESS_FUNCTION_INVOCATION
1696 fprintf_unfiltered (file,
1697 "gdbarch_dump: %s # %s\n",
1698 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1699 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi)));
1700 if (GDB_MULTI_ARCH)
1701 fprintf_unfiltered (file,
6cbda714 1702 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = <0x%08lx>\n",
5e74b15c
RE
1703 (long) current_gdbarch->frameless_function_invocation
1704 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1705#endif
08e45a40 1706#ifdef FRAME_ARGS_ADDRESS
4b9b3959
AC
1707 fprintf_unfiltered (file,
1708 "gdbarch_dump: %s # %s\n",
08e45a40
AC
1709 "FRAME_ARGS_ADDRESS(fi)",
1710 XSTRING (FRAME_ARGS_ADDRESS (fi)));
1711 if (GDB_MULTI_ARCH)
1712 fprintf_unfiltered (file,
6cbda714 1713 "gdbarch_dump: FRAME_ARGS_ADDRESS = <0x%08lx>\n",
08e45a40
AC
1714 (long) current_gdbarch->frame_args_address
1715 /*FRAME_ARGS_ADDRESS ()*/);
4b9b3959 1716#endif
08e45a40 1717#ifdef FRAME_ARGS_SKIP
4b9b3959 1718 fprintf_unfiltered (file,
08e45a40
AC
1719 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1720 XSTRING (FRAME_ARGS_SKIP));
4b9b3959 1721 fprintf_unfiltered (file,
08e45a40
AC
1722 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1723 (long) FRAME_ARGS_SKIP);
4b9b3959 1724#endif
08e45a40 1725#ifdef FRAME_LOCALS_ADDRESS
2649061d
AC
1726 fprintf_unfiltered (file,
1727 "gdbarch_dump: %s # %s\n",
08e45a40
AC
1728 "FRAME_LOCALS_ADDRESS(fi)",
1729 XSTRING (FRAME_LOCALS_ADDRESS (fi)));
1730 if (GDB_MULTI_ARCH)
1731 fprintf_unfiltered (file,
6cbda714 1732 "gdbarch_dump: FRAME_LOCALS_ADDRESS = <0x%08lx>\n",
08e45a40
AC
1733 (long) current_gdbarch->frame_locals_address
1734 /*FRAME_LOCALS_ADDRESS ()*/);
2649061d 1735#endif
08e45a40 1736#ifdef FRAME_NUM_ARGS
01fb7433
AC
1737 fprintf_unfiltered (file,
1738 "gdbarch_dump: %s # %s\n",
08e45a40
AC
1739 "FRAME_NUM_ARGS(frame)",
1740 XSTRING (FRAME_NUM_ARGS (frame)));
1741 if (GDB_MULTI_ARCH)
1742 fprintf_unfiltered (file,
6cbda714 1743 "gdbarch_dump: FRAME_NUM_ARGS = <0x%08lx>\n",
08e45a40
AC
1744 (long) current_gdbarch->frame_num_args
1745 /*FRAME_NUM_ARGS ()*/);
01fb7433 1746#endif
08e45a40 1747#ifdef FUNCTION_START_OFFSET
4b9b3959 1748 fprintf_unfiltered (file,
08e45a40
AC
1749 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1750 XSTRING (FUNCTION_START_OFFSET));
4b9b3959 1751 fprintf_unfiltered (file,
08e45a40
AC
1752 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1753 (long) FUNCTION_START_OFFSET);
4b9b3959 1754#endif
1e9f55d0
AC
1755#ifdef GET_LONGJMP_TARGET_P
1756 fprintf_unfiltered (file,
1757 "gdbarch_dump: %s # %s\n",
1758 "GET_LONGJMP_TARGET_P()",
1759 XSTRING (GET_LONGJMP_TARGET_P ()));
1760 fprintf_unfiltered (file,
1761 "gdbarch_dump: GET_LONGJMP_TARGET_P() = %d\n",
1762 GET_LONGJMP_TARGET_P ());
1763#endif
9df628e0
RE
1764#ifdef GET_LONGJMP_TARGET
1765 fprintf_unfiltered (file,
1766 "gdbarch_dump: %s # %s\n",
1767 "GET_LONGJMP_TARGET(pc)",
1768 XSTRING (GET_LONGJMP_TARGET (pc)));
1769 if (GDB_MULTI_ARCH)
1770 fprintf_unfiltered (file,
6cbda714 1771 "gdbarch_dump: GET_LONGJMP_TARGET = <0x%08lx>\n",
9df628e0
RE
1772 (long) current_gdbarch->get_longjmp_target
1773 /*GET_LONGJMP_TARGET ()*/);
1774#endif
967c0d83 1775#ifdef HAVE_NONSTEPPABLE_WATCHPOINT
f74fa174 1776 fprintf_unfiltered (file,
967c0d83
MM
1777 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
1778 XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT));
f74fa174 1779 fprintf_unfiltered (file,
967c0d83
MM
1780 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT = %d\n",
1781 HAVE_NONSTEPPABLE_WATCHPOINT);
f74fa174 1782#endif
08e45a40 1783#ifdef INNER_THAN
10312cc4
AC
1784 fprintf_unfiltered (file,
1785 "gdbarch_dump: %s # %s\n",
08e45a40
AC
1786 "INNER_THAN(lhs, rhs)",
1787 XSTRING (INNER_THAN (lhs, rhs)));
1788 if (GDB_MULTI_ARCH)
1789 fprintf_unfiltered (file,
6cbda714 1790 "gdbarch_dump: INNER_THAN = <0x%08lx>\n",
08e45a40
AC
1791 (long) current_gdbarch->inner_than
1792 /*INNER_THAN ()*/);
10312cc4 1793#endif
1e9f55d0
AC
1794#ifdef INTEGER_TO_ADDRESS_P
1795 fprintf_unfiltered (file,
1796 "gdbarch_dump: %s # %s\n",
1797 "INTEGER_TO_ADDRESS_P()",
1798 XSTRING (INTEGER_TO_ADDRESS_P ()));
1799 fprintf_unfiltered (file,
1800 "gdbarch_dump: INTEGER_TO_ADDRESS_P() = %d\n",
1801 INTEGER_TO_ADDRESS_P ());
1802#endif
fc0c74b1
AC
1803#ifdef INTEGER_TO_ADDRESS
1804 fprintf_unfiltered (file,
1805 "gdbarch_dump: %s # %s\n",
1806 "INTEGER_TO_ADDRESS(type, buf)",
1807 XSTRING (INTEGER_TO_ADDRESS (type, buf)));
1808 if (GDB_MULTI_ARCH)
1809 fprintf_unfiltered (file,
6cbda714 1810 "gdbarch_dump: INTEGER_TO_ADDRESS = <0x%08lx>\n",
fc0c74b1
AC
1811 (long) current_gdbarch->integer_to_address
1812 /*INTEGER_TO_ADDRESS ()*/);
1813#endif
5e74b15c
RE
1814#ifdef IN_SOLIB_CALL_TRAMPOLINE
1815 fprintf_unfiltered (file,
1816 "gdbarch_dump: %s # %s\n",
1817 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1818 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc, name)));
68e9cc94
CV
1819 if (GDB_MULTI_ARCH)
1820 fprintf_unfiltered (file,
6cbda714 1821 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = <0x%08lx>\n",
5e74b15c
RE
1822 (long) current_gdbarch->in_solib_call_trampoline
1823 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1824#endif
d50355b6
MS
1825#ifdef IN_SOLIB_RETURN_TRAMPOLINE
1826 fprintf_unfiltered (file,
1827 "gdbarch_dump: %s # %s\n",
1828 "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1829 XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc, name)));
1830 if (GDB_MULTI_ARCH)
1831 fprintf_unfiltered (file,
6cbda714 1832 "gdbarch_dump: IN_SOLIB_RETURN_TRAMPOLINE = <0x%08lx>\n",
d50355b6
MS
1833 (long) current_gdbarch->in_solib_return_trampoline
1834 /*IN_SOLIB_RETURN_TRAMPOLINE ()*/);
1835#endif
08e45a40 1836#ifdef MEMORY_INSERT_BREAKPOINT
4b9b3959
AC
1837 fprintf_unfiltered (file,
1838 "gdbarch_dump: %s # %s\n",
08e45a40
AC
1839 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1840 XSTRING (MEMORY_INSERT_BREAKPOINT (addr, contents_cache)));
1841 if (GDB_MULTI_ARCH)
1842 fprintf_unfiltered (file,
6cbda714 1843 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = <0x%08lx>\n",
08e45a40
AC
1844 (long) current_gdbarch->memory_insert_breakpoint
1845 /*MEMORY_INSERT_BREAKPOINT ()*/);
4b9b3959 1846#endif
08e45a40 1847#ifdef MEMORY_REMOVE_BREAKPOINT
4b9b3959
AC
1848 fprintf_unfiltered (file,
1849 "gdbarch_dump: %s # %s\n",
08e45a40
AC
1850 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1851 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr, contents_cache)));
1852 if (GDB_MULTI_ARCH)
1853 fprintf_unfiltered (file,
6cbda714 1854 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = <0x%08lx>\n",
08e45a40
AC
1855 (long) current_gdbarch->memory_remove_breakpoint
1856 /*MEMORY_REMOVE_BREAKPOINT ()*/);
4b9b3959 1857#endif
5720643c
JB
1858#ifdef NAME_OF_MALLOC
1859 fprintf_unfiltered (file,
1860 "gdbarch_dump: NAME_OF_MALLOC # %s\n",
1861 XSTRING (NAME_OF_MALLOC));
1862 fprintf_unfiltered (file,
31deffe5
AC
1863 "gdbarch_dump: NAME_OF_MALLOC = %s\n",
1864 NAME_OF_MALLOC);
5720643c 1865#endif
08e45a40 1866#ifdef NPC_REGNUM
4b9b3959 1867 fprintf_unfiltered (file,
08e45a40
AC
1868 "gdbarch_dump: NPC_REGNUM # %s\n",
1869 XSTRING (NPC_REGNUM));
1870 fprintf_unfiltered (file,
06b25f14
AC
1871 "gdbarch_dump: NPC_REGNUM = %d\n",
1872 NPC_REGNUM);
4b9b3959 1873#endif
08e45a40 1874#ifdef NUM_PSEUDO_REGS
4b9b3959 1875 fprintf_unfiltered (file,
08e45a40
AC
1876 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1877 XSTRING (NUM_PSEUDO_REGS));
1878 fprintf_unfiltered (file,
06b25f14
AC
1879 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1880 NUM_PSEUDO_REGS);
4b9b3959 1881#endif
08e45a40 1882#ifdef NUM_REGS
7f1b2585 1883 fprintf_unfiltered (file,
08e45a40
AC
1884 "gdbarch_dump: NUM_REGS # %s\n",
1885 XSTRING (NUM_REGS));
1886 fprintf_unfiltered (file,
06b25f14
AC
1887 "gdbarch_dump: NUM_REGS = %d\n",
1888 NUM_REGS);
7f1b2585 1889#endif
08e45a40
AC
1890#ifdef PARM_BOUNDARY
1891 fprintf_unfiltered (file,
1892 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1893 XSTRING (PARM_BOUNDARY));
1894 fprintf_unfiltered (file,
06b25f14
AC
1895 "gdbarch_dump: PARM_BOUNDARY = %d\n",
1896 PARM_BOUNDARY);
08e45a40 1897#endif
d7bd68ca
AC
1898#ifdef PC_IN_SIGTRAMP
1899 fprintf_unfiltered (file,
1900 "gdbarch_dump: %s # %s\n",
1901 "PC_IN_SIGTRAMP(pc, name)",
1902 XSTRING (PC_IN_SIGTRAMP (pc, name)));
1903 if (GDB_MULTI_ARCH)
1904 fprintf_unfiltered (file,
6cbda714 1905 "gdbarch_dump: PC_IN_SIGTRAMP = <0x%08lx>\n",
d7bd68ca
AC
1906 (long) current_gdbarch->pc_in_sigtramp
1907 /*PC_IN_SIGTRAMP ()*/);
1908#endif
08e45a40
AC
1909#ifdef PC_REGNUM
1910 fprintf_unfiltered (file,
1911 "gdbarch_dump: PC_REGNUM # %s\n",
1912 XSTRING (PC_REGNUM));
1913 fprintf_unfiltered (file,
06b25f14
AC
1914 "gdbarch_dump: PC_REGNUM = %d\n",
1915 PC_REGNUM);
7f1b2585 1916#endif
4b9b3959
AC
1917#ifdef POINTER_TO_ADDRESS
1918 fprintf_unfiltered (file,
1919 "gdbarch_dump: %s # %s\n",
1920 "POINTER_TO_ADDRESS(type, buf)",
1921 XSTRING (POINTER_TO_ADDRESS (type, buf)));
08e45a40
AC
1922 if (GDB_MULTI_ARCH)
1923 fprintf_unfiltered (file,
6cbda714 1924 "gdbarch_dump: POINTER_TO_ADDRESS = <0x%08lx>\n",
08e45a40
AC
1925 (long) current_gdbarch->pointer_to_address
1926 /*POINTER_TO_ADDRESS ()*/);
4b9b3959 1927#endif
08e45a40 1928#ifdef PREPARE_TO_PROCEED
4b9b3959
AC
1929 fprintf_unfiltered (file,
1930 "gdbarch_dump: %s # %s\n",
08e45a40
AC
1931 "PREPARE_TO_PROCEED(select_it)",
1932 XSTRING (PREPARE_TO_PROCEED (select_it)));
1933 if (GDB_MULTI_ARCH)
1934 fprintf_unfiltered (file,
6cbda714 1935 "gdbarch_dump: PREPARE_TO_PROCEED = <0x%08lx>\n",
08e45a40
AC
1936 (long) current_gdbarch->prepare_to_proceed
1937 /*PREPARE_TO_PROCEED ()*/);
5e74b15c 1938#endif
1e9f55d0
AC
1939 if (GDB_MULTI_ARCH)
1940 fprintf_unfiltered (file,
1941 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
1942 gdbarch_print_float_info_p (current_gdbarch));
5e74b15c
RE
1943 if (GDB_MULTI_ARCH)
1944 fprintf_unfiltered (file,
d855c300
AC
1945 "gdbarch_dump: print_float_info = 0x%08lx\n",
1946 (long) current_gdbarch->print_float_info);
0ab7a791
AC
1947 if (GDB_MULTI_ARCH)
1948 fprintf_unfiltered (file,
1949 "gdbarch_dump: print_registers_info = 0x%08lx\n",
1950 (long) current_gdbarch->print_registers_info);
1e9f55d0
AC
1951 if (GDB_MULTI_ARCH)
1952 fprintf_unfiltered (file,
1953 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1954 gdbarch_print_vector_info_p (current_gdbarch));
e76f1f2e
AC
1955 if (GDB_MULTI_ARCH)
1956 fprintf_unfiltered (file,
1957 "gdbarch_dump: print_vector_info = 0x%08lx\n",
1958 (long) current_gdbarch->print_vector_info);
08e45a40 1959#ifdef PROLOGUE_FRAMELESS_P
4b9b3959
AC
1960 fprintf_unfiltered (file,
1961 "gdbarch_dump: %s # %s\n",
08e45a40
AC
1962 "PROLOGUE_FRAMELESS_P(ip)",
1963 XSTRING (PROLOGUE_FRAMELESS_P (ip)));
1964 if (GDB_MULTI_ARCH)
1965 fprintf_unfiltered (file,
6cbda714 1966 "gdbarch_dump: PROLOGUE_FRAMELESS_P = <0x%08lx>\n",
08e45a40
AC
1967 (long) current_gdbarch->prologue_frameless_p
1968 /*PROLOGUE_FRAMELESS_P ()*/);
4b9b3959 1969#endif
c2169756
AC
1970#ifdef PS_REGNUM
1971 fprintf_unfiltered (file,
1972 "gdbarch_dump: PS_REGNUM # %s\n",
1973 XSTRING (PS_REGNUM));
1974 fprintf_unfiltered (file,
1975 "gdbarch_dump: PS_REGNUM = %d\n",
1976 PS_REGNUM);
1977#endif
08e45a40
AC
1978 if (GDB_MULTI_ARCH)
1979 fprintf_unfiltered (file,
b81774d8
AC
1980 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
1981 gdbarch_push_dummy_call_p (current_gdbarch));
1982 if (GDB_MULTI_ARCH)
1983 fprintf_unfiltered (file,
1984 "gdbarch_dump: push_dummy_call = 0x%08lx\n",
1985 (long) current_gdbarch->push_dummy_call);
7043d8dc
AC
1986 if (GDB_MULTI_ARCH)
1987 fprintf_unfiltered (file,
1988 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
1989 gdbarch_push_dummy_code_p (current_gdbarch));
1990 if (GDB_MULTI_ARCH)
1991 fprintf_unfiltered (file,
1992 "gdbarch_dump: push_dummy_code = 0x%08lx\n",
1993 (long) current_gdbarch->push_dummy_code);
46654a5b
AC
1994#ifdef REGISTER_BYTE_P
1995 fprintf_unfiltered (file,
1996 "gdbarch_dump: %s # %s\n",
1997 "REGISTER_BYTE_P()",
1998 XSTRING (REGISTER_BYTE_P ()));
1999 fprintf_unfiltered (file,
2000 "gdbarch_dump: REGISTER_BYTE_P() = %d\n",
2001 REGISTER_BYTE_P ());
2002#endif
08e45a40 2003#ifdef REGISTER_BYTE
4b9b3959
AC
2004 fprintf_unfiltered (file,
2005 "gdbarch_dump: %s # %s\n",
08e45a40
AC
2006 "REGISTER_BYTE(reg_nr)",
2007 XSTRING (REGISTER_BYTE (reg_nr)));
2008 if (GDB_MULTI_ARCH)
2009 fprintf_unfiltered (file,
6cbda714 2010 "gdbarch_dump: REGISTER_BYTE = <0x%08lx>\n",
08e45a40
AC
2011 (long) current_gdbarch->register_byte
2012 /*REGISTER_BYTE ()*/);
4b9b3959 2013#endif
08e45a40 2014#ifdef REGISTER_BYTES
4b9b3959 2015 fprintf_unfiltered (file,
08e45a40
AC
2016 "gdbarch_dump: REGISTER_BYTES # %s\n",
2017 XSTRING (REGISTER_BYTES));
4b9b3959 2018 fprintf_unfiltered (file,
06b25f14
AC
2019 "gdbarch_dump: REGISTER_BYTES = %d\n",
2020 REGISTER_BYTES);
4b9b3959 2021#endif
1e9f55d0
AC
2022#ifdef REGISTER_BYTES_OK_P
2023 fprintf_unfiltered (file,
2024 "gdbarch_dump: %s # %s\n",
2025 "REGISTER_BYTES_OK_P()",
2026 XSTRING (REGISTER_BYTES_OK_P ()));
2027 fprintf_unfiltered (file,
2028 "gdbarch_dump: REGISTER_BYTES_OK_P() = %d\n",
2029 REGISTER_BYTES_OK_P ());
2030#endif
08e45a40 2031#ifdef REGISTER_BYTES_OK
4b9b3959
AC
2032 fprintf_unfiltered (file,
2033 "gdbarch_dump: %s # %s\n",
08e45a40
AC
2034 "REGISTER_BYTES_OK(nr_bytes)",
2035 XSTRING (REGISTER_BYTES_OK (nr_bytes)));
2036 if (GDB_MULTI_ARCH)
2037 fprintf_unfiltered (file,
6cbda714 2038 "gdbarch_dump: REGISTER_BYTES_OK = <0x%08lx>\n",
08e45a40
AC
2039 (long) current_gdbarch->register_bytes_ok
2040 /*REGISTER_BYTES_OK ()*/);
4b9b3959 2041#endif
08e45a40 2042#ifdef REGISTER_CONVERTIBLE
4b9b3959
AC
2043 fprintf_unfiltered (file,
2044 "gdbarch_dump: %s # %s\n",
08e45a40
AC
2045 "REGISTER_CONVERTIBLE(nr)",
2046 XSTRING (REGISTER_CONVERTIBLE (nr)));
2047 if (GDB_MULTI_ARCH)
2048 fprintf_unfiltered (file,
6cbda714 2049 "gdbarch_dump: REGISTER_CONVERTIBLE = <0x%08lx>\n",
08e45a40
AC
2050 (long) current_gdbarch->register_convertible
2051 /*REGISTER_CONVERTIBLE ()*/);
4b9b3959 2052#endif
08e45a40
AC
2053#ifdef REGISTER_CONVERT_TO_RAW
2054#if GDB_MULTI_ARCH
63e69063 2055 /* Macro might contain `[{}]' when not multi-arch */
4b9b3959
AC
2056 fprintf_unfiltered (file,
2057 "gdbarch_dump: %s # %s\n",
08e45a40
AC
2058 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
2059 XSTRING (REGISTER_CONVERT_TO_RAW (type, regnum, from, to)));
2060#endif
2061 if (GDB_MULTI_ARCH)
2062 fprintf_unfiltered (file,
6cbda714 2063 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = <0x%08lx>\n",
08e45a40
AC
2064 (long) current_gdbarch->register_convert_to_raw
2065 /*REGISTER_CONVERT_TO_RAW ()*/);
4b9b3959 2066#endif
08e45a40
AC
2067#ifdef REGISTER_CONVERT_TO_VIRTUAL
2068#if GDB_MULTI_ARCH
63e69063 2069 /* Macro might contain `[{}]' when not multi-arch */
4b9b3959
AC
2070 fprintf_unfiltered (file,
2071 "gdbarch_dump: %s # %s\n",
08e45a40
AC
2072 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
2073 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to)));
4b9b3959 2074#endif
08e45a40
AC
2075 if (GDB_MULTI_ARCH)
2076 fprintf_unfiltered (file,
6cbda714 2077 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = <0x%08lx>\n",
08e45a40
AC
2078 (long) current_gdbarch->register_convert_to_virtual
2079 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
4b9b3959 2080#endif
08e45a40 2081#ifdef REGISTER_NAME
4b9b3959
AC
2082 fprintf_unfiltered (file,
2083 "gdbarch_dump: %s # %s\n",
08e45a40
AC
2084 "REGISTER_NAME(regnr)",
2085 XSTRING (REGISTER_NAME (regnr)));
2086 if (GDB_MULTI_ARCH)
2087 fprintf_unfiltered (file,
6cbda714 2088 "gdbarch_dump: REGISTER_NAME = <0x%08lx>\n",
08e45a40
AC
2089 (long) current_gdbarch->register_name
2090 /*REGISTER_NAME ()*/);
4b9b3959 2091#endif
08e45a40 2092#ifdef REGISTER_RAW_SIZE
4b9b3959
AC
2093 fprintf_unfiltered (file,
2094 "gdbarch_dump: %s # %s\n",
08e45a40
AC
2095 "REGISTER_RAW_SIZE(reg_nr)",
2096 XSTRING (REGISTER_RAW_SIZE (reg_nr)));
2097 if (GDB_MULTI_ARCH)
2098 fprintf_unfiltered (file,
6cbda714 2099 "gdbarch_dump: REGISTER_RAW_SIZE = <0x%08lx>\n",
08e45a40
AC
2100 (long) current_gdbarch->register_raw_size
2101 /*REGISTER_RAW_SIZE ()*/);
4b9b3959 2102#endif
08e45a40 2103#ifdef REGISTER_SIM_REGNO
4b9b3959
AC
2104 fprintf_unfiltered (file,
2105 "gdbarch_dump: %s # %s\n",
08e45a40
AC
2106 "REGISTER_SIM_REGNO(reg_nr)",
2107 XSTRING (REGISTER_SIM_REGNO (reg_nr)));
2108 if (GDB_MULTI_ARCH)
2109 fprintf_unfiltered (file,
6cbda714 2110 "gdbarch_dump: REGISTER_SIM_REGNO = <0x%08lx>\n",
08e45a40
AC
2111 (long) current_gdbarch->register_sim_regno
2112 /*REGISTER_SIM_REGNO ()*/);
4b9b3959 2113#endif
13d01224
AC
2114#ifdef REGISTER_TO_VALUE
2115#if GDB_MULTI_ARCH
2116 /* Macro might contain `[{}]' when not multi-arch */
2117 fprintf_unfiltered (file,
2118 "gdbarch_dump: %s # %s\n",
2119 "REGISTER_TO_VALUE(regnum, type, from, to)",
2120 XSTRING (REGISTER_TO_VALUE (regnum, type, from, to)));
2121#endif
2122 if (GDB_MULTI_ARCH)
2123 fprintf_unfiltered (file,
6cbda714 2124 "gdbarch_dump: REGISTER_TO_VALUE = <0x%08lx>\n",
13d01224
AC
2125 (long) current_gdbarch->register_to_value
2126 /*REGISTER_TO_VALUE ()*/);
2127#endif
35cac7cf
AC
2128 if (GDB_MULTI_ARCH)
2129 fprintf_unfiltered (file,
2130 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
2131 gdbarch_register_type_p (current_gdbarch));
2132 if (GDB_MULTI_ARCH)
2133 fprintf_unfiltered (file,
2134 "gdbarch_dump: register_type = 0x%08lx\n",
2135 (long) current_gdbarch->register_type);
08e45a40 2136#ifdef REGISTER_VIRTUAL_SIZE
4b9b3959 2137 fprintf_unfiltered (file,
08e45a40
AC
2138 "gdbarch_dump: %s # %s\n",
2139 "REGISTER_VIRTUAL_SIZE(reg_nr)",
2140 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr)));
2141 if (GDB_MULTI_ARCH)
2142 fprintf_unfiltered (file,
6cbda714 2143 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = <0x%08lx>\n",
08e45a40
AC
2144 (long) current_gdbarch->register_virtual_size
2145 /*REGISTER_VIRTUAL_SIZE ()*/);
4b9b3959 2146#endif
35cac7cf
AC
2147#ifdef REGISTER_VIRTUAL_TYPE_P
2148 fprintf_unfiltered (file,
2149 "gdbarch_dump: %s # %s\n",
2150 "REGISTER_VIRTUAL_TYPE_P()",
2151 XSTRING (REGISTER_VIRTUAL_TYPE_P ()));
2152 fprintf_unfiltered (file,
2153 "gdbarch_dump: REGISTER_VIRTUAL_TYPE_P() = %d\n",
2154 REGISTER_VIRTUAL_TYPE_P ());
2155#endif
08e45a40 2156#ifdef REGISTER_VIRTUAL_TYPE
e02bc4cc
DS
2157 fprintf_unfiltered (file,
2158 "gdbarch_dump: %s # %s\n",
08e45a40
AC
2159 "REGISTER_VIRTUAL_TYPE(reg_nr)",
2160 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr)));
2161 if (GDB_MULTI_ARCH)
2162 fprintf_unfiltered (file,
6cbda714 2163 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = <0x%08lx>\n",
08e45a40
AC
2164 (long) current_gdbarch->register_virtual_type
2165 /*REGISTER_VIRTUAL_TYPE ()*/);
e02bc4cc 2166#endif
1e9f55d0
AC
2167#ifdef REG_STRUCT_HAS_ADDR_P
2168 fprintf_unfiltered (file,
2169 "gdbarch_dump: %s # %s\n",
2170 "REG_STRUCT_HAS_ADDR_P()",
2171 XSTRING (REG_STRUCT_HAS_ADDR_P ()));
2172 fprintf_unfiltered (file,
2173 "gdbarch_dump: REG_STRUCT_HAS_ADDR_P() = %d\n",
2174 REG_STRUCT_HAS_ADDR_P ());
2175#endif
08e45a40 2176#ifdef REG_STRUCT_HAS_ADDR
4b9b3959 2177 fprintf_unfiltered (file,
08e45a40
AC
2178 "gdbarch_dump: %s # %s\n",
2179 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
2180 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p, type)));
2181 if (GDB_MULTI_ARCH)
2182 fprintf_unfiltered (file,
6cbda714 2183 "gdbarch_dump: REG_STRUCT_HAS_ADDR = <0x%08lx>\n",
08e45a40
AC
2184 (long) current_gdbarch->reg_struct_has_addr
2185 /*REG_STRUCT_HAS_ADDR ()*/);
4b9b3959 2186#endif
08e45a40
AC
2187#ifdef REMOTE_TRANSLATE_XFER_ADDRESS
2188#if GDB_MULTI_ARCH
63e69063 2189 /* Macro might contain `[{}]' when not multi-arch */
4b9b3959
AC
2190 fprintf_unfiltered (file,
2191 "gdbarch_dump: %s # %s\n",
2192 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
2193 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr, gdb_len, rem_addr, rem_len)));
2194#endif
08e45a40
AC
2195 if (GDB_MULTI_ARCH)
2196 fprintf_unfiltered (file,
6cbda714 2197 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = <0x%08lx>\n",
08e45a40
AC
2198 (long) current_gdbarch->remote_translate_xfer_address
2199 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
4b9b3959 2200#endif
08e45a40 2201#ifdef RETURN_VALUE_ON_STACK
4b9b3959
AC
2202 fprintf_unfiltered (file,
2203 "gdbarch_dump: %s # %s\n",
08e45a40
AC
2204 "RETURN_VALUE_ON_STACK(type)",
2205 XSTRING (RETURN_VALUE_ON_STACK (type)));
2206 if (GDB_MULTI_ARCH)
2207 fprintf_unfiltered (file,
6cbda714 2208 "gdbarch_dump: RETURN_VALUE_ON_STACK = <0x%08lx>\n",
08e45a40
AC
2209 (long) current_gdbarch->return_value_on_stack
2210 /*RETURN_VALUE_ON_STACK ()*/);
4b9b3959 2211#endif
1e9f55d0
AC
2212#ifdef SAVE_DUMMY_FRAME_TOS_P
2213 fprintf_unfiltered (file,
2214 "gdbarch_dump: %s # %s\n",
2215 "SAVE_DUMMY_FRAME_TOS_P()",
2216 XSTRING (SAVE_DUMMY_FRAME_TOS_P ()));
2217 fprintf_unfiltered (file,
2218 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS_P() = %d\n",
2219 SAVE_DUMMY_FRAME_TOS_P ());
2220#endif
08e45a40
AC
2221#ifdef SAVE_DUMMY_FRAME_TOS
2222#if GDB_MULTI_ARCH
2223 /* Macro might contain `[{}]' when not multi-arch */
4b9b3959
AC
2224 fprintf_unfiltered (file,
2225 "gdbarch_dump: %s # %s\n",
08e45a40
AC
2226 "SAVE_DUMMY_FRAME_TOS(sp)",
2227 XSTRING (SAVE_DUMMY_FRAME_TOS (sp)));
4b9b3959 2228#endif
08e45a40
AC
2229 if (GDB_MULTI_ARCH)
2230 fprintf_unfiltered (file,
6cbda714 2231 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = <0x%08lx>\n",
08e45a40
AC
2232 (long) current_gdbarch->save_dummy_frame_tos
2233 /*SAVE_DUMMY_FRAME_TOS ()*/);
4b9b3959 2234#endif
08e45a40 2235#ifdef SDB_REG_TO_REGNUM
4b9b3959
AC
2236 fprintf_unfiltered (file,
2237 "gdbarch_dump: %s # %s\n",
08e45a40
AC
2238 "SDB_REG_TO_REGNUM(sdb_regnr)",
2239 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr)));
2240 if (GDB_MULTI_ARCH)
2241 fprintf_unfiltered (file,
6cbda714 2242 "gdbarch_dump: SDB_REG_TO_REGNUM = <0x%08lx>\n",
08e45a40
AC
2243 (long) current_gdbarch->sdb_reg_to_regnum
2244 /*SDB_REG_TO_REGNUM ()*/);
4b9b3959 2245#endif
1e9f55d0
AC
2246#ifdef SIGTRAMP_END_P
2247 fprintf_unfiltered (file,
2248 "gdbarch_dump: %s # %s\n",
2249 "SIGTRAMP_END_P()",
2250 XSTRING (SIGTRAMP_END_P ()));
2251 fprintf_unfiltered (file,
2252 "gdbarch_dump: SIGTRAMP_END_P() = %d\n",
2253 SIGTRAMP_END_P ());
2254#endif
43156d82
MK
2255#ifdef SIGTRAMP_END
2256 fprintf_unfiltered (file,
2257 "gdbarch_dump: %s # %s\n",
2258 "SIGTRAMP_END(pc)",
2259 XSTRING (SIGTRAMP_END (pc)));
2260 if (GDB_MULTI_ARCH)
2261 fprintf_unfiltered (file,
6cbda714 2262 "gdbarch_dump: SIGTRAMP_END = <0x%08lx>\n",
43156d82
MK
2263 (long) current_gdbarch->sigtramp_end
2264 /*SIGTRAMP_END ()*/);
2265#endif
1e9f55d0
AC
2266#ifdef SIGTRAMP_START_P
2267 fprintf_unfiltered (file,
2268 "gdbarch_dump: %s # %s\n",
2269 "SIGTRAMP_START_P()",
2270 XSTRING (SIGTRAMP_START_P ()));
2271 fprintf_unfiltered (file,
2272 "gdbarch_dump: SIGTRAMP_START_P() = %d\n",
2273 SIGTRAMP_START_P ());
2274#endif
43156d82
MK
2275#ifdef SIGTRAMP_START
2276 fprintf_unfiltered (file,
2277 "gdbarch_dump: %s # %s\n",
2278 "SIGTRAMP_START(pc)",
2279 XSTRING (SIGTRAMP_START (pc)));
2280 if (GDB_MULTI_ARCH)
2281 fprintf_unfiltered (file,
6cbda714 2282 "gdbarch_dump: SIGTRAMP_START = <0x%08lx>\n",
43156d82
MK
2283 (long) current_gdbarch->sigtramp_start
2284 /*SIGTRAMP_START ()*/);
2285#endif
08e45a40 2286#ifdef SKIP_PROLOGUE
4b9b3959
AC
2287 fprintf_unfiltered (file,
2288 "gdbarch_dump: %s # %s\n",
08e45a40
AC
2289 "SKIP_PROLOGUE(ip)",
2290 XSTRING (SKIP_PROLOGUE (ip)));
2291 if (GDB_MULTI_ARCH)
2292 fprintf_unfiltered (file,
6cbda714 2293 "gdbarch_dump: SKIP_PROLOGUE = <0x%08lx>\n",
08e45a40
AC
2294 (long) current_gdbarch->skip_prologue
2295 /*SKIP_PROLOGUE ()*/);
4b9b3959 2296#endif
08e45a40 2297#ifdef SKIP_TRAMPOLINE_CODE
4b9b3959
AC
2298 fprintf_unfiltered (file,
2299 "gdbarch_dump: %s # %s\n",
08e45a40
AC
2300 "SKIP_TRAMPOLINE_CODE(pc)",
2301 XSTRING (SKIP_TRAMPOLINE_CODE (pc)));
2302 if (GDB_MULTI_ARCH)
2303 fprintf_unfiltered (file,
6cbda714 2304 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = <0x%08lx>\n",
08e45a40
AC
2305 (long) current_gdbarch->skip_trampoline_code
2306 /*SKIP_TRAMPOLINE_CODE ()*/);
4b9b3959 2307#endif
181c1381
RE
2308#ifdef SMASH_TEXT_ADDRESS
2309 fprintf_unfiltered (file,
2310 "gdbarch_dump: %s # %s\n",
2311 "SMASH_TEXT_ADDRESS(addr)",
2312 XSTRING (SMASH_TEXT_ADDRESS (addr)));
2313 if (GDB_MULTI_ARCH)
2314 fprintf_unfiltered (file,
6cbda714 2315 "gdbarch_dump: SMASH_TEXT_ADDRESS = <0x%08lx>\n",
181c1381
RE
2316 (long) current_gdbarch->smash_text_address
2317 /*SMASH_TEXT_ADDRESS ()*/);
2318#endif
1e9f55d0
AC
2319#ifdef SOFTWARE_SINGLE_STEP_P
2320 fprintf_unfiltered (file,
2321 "gdbarch_dump: %s # %s\n",
2322 "SOFTWARE_SINGLE_STEP_P()",
2323 XSTRING (SOFTWARE_SINGLE_STEP_P ()));
2324 fprintf_unfiltered (file,
2325 "gdbarch_dump: SOFTWARE_SINGLE_STEP_P() = %d\n",
2326 SOFTWARE_SINGLE_STEP_P ());
2327#endif
08e45a40
AC
2328#ifdef SOFTWARE_SINGLE_STEP
2329#if GDB_MULTI_ARCH
2330 /* Macro might contain `[{}]' when not multi-arch */
4b9b3959
AC
2331 fprintf_unfiltered (file,
2332 "gdbarch_dump: %s # %s\n",
08e45a40
AC
2333 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
2334 XSTRING (SOFTWARE_SINGLE_STEP (sig, insert_breakpoints_p)));
4b9b3959 2335#endif
08e45a40
AC
2336 if (GDB_MULTI_ARCH)
2337 fprintf_unfiltered (file,
6cbda714 2338 "gdbarch_dump: SOFTWARE_SINGLE_STEP = <0x%08lx>\n",
08e45a40
AC
2339 (long) current_gdbarch->software_single_step
2340 /*SOFTWARE_SINGLE_STEP ()*/);
2341#endif
2342#ifdef SP_REGNUM
1dd4193b 2343 fprintf_unfiltered (file,
08e45a40
AC
2344 "gdbarch_dump: SP_REGNUM # %s\n",
2345 XSTRING (SP_REGNUM));
2346 fprintf_unfiltered (file,
06b25f14
AC
2347 "gdbarch_dump: SP_REGNUM = %d\n",
2348 SP_REGNUM);
1dd4193b 2349#endif
08e45a40 2350#ifdef STAB_REG_TO_REGNUM
4b9b3959
AC
2351 fprintf_unfiltered (file,
2352 "gdbarch_dump: %s # %s\n",
08e45a40
AC
2353 "STAB_REG_TO_REGNUM(stab_regnr)",
2354 XSTRING (STAB_REG_TO_REGNUM (stab_regnr)));
2355 if (GDB_MULTI_ARCH)
2356 fprintf_unfiltered (file,
6cbda714 2357 "gdbarch_dump: STAB_REG_TO_REGNUM = <0x%08lx>\n",
08e45a40
AC
2358 (long) current_gdbarch->stab_reg_to_regnum
2359 /*STAB_REG_TO_REGNUM ()*/);
4b9b3959 2360#endif
1e9f55d0
AC
2361#ifdef STACK_ALIGN_P
2362 fprintf_unfiltered (file,
2363 "gdbarch_dump: %s # %s\n",
2364 "STACK_ALIGN_P()",
2365 XSTRING (STACK_ALIGN_P ()));
2366 fprintf_unfiltered (file,
2367 "gdbarch_dump: STACK_ALIGN_P() = %d\n",
2368 STACK_ALIGN_P ());
2369#endif
08e45a40 2370#ifdef STACK_ALIGN
4b9b3959
AC
2371 fprintf_unfiltered (file,
2372 "gdbarch_dump: %s # %s\n",
08e45a40
AC
2373 "STACK_ALIGN(sp)",
2374 XSTRING (STACK_ALIGN (sp)));
2375 if (GDB_MULTI_ARCH)
2376 fprintf_unfiltered (file,
6cbda714 2377 "gdbarch_dump: STACK_ALIGN = <0x%08lx>\n",
08e45a40
AC
2378 (long) current_gdbarch->stack_align
2379 /*STACK_ALIGN ()*/);
4b9b3959 2380#endif
08e45a40
AC
2381#ifdef STORE_RETURN_VALUE
2382#if GDB_MULTI_ARCH
2383 /* Macro might contain `[{}]' when not multi-arch */
f517ea4e
PS
2384 fprintf_unfiltered (file,
2385 "gdbarch_dump: %s # %s\n",
ebba8386
AC
2386 "STORE_RETURN_VALUE(type, regcache, valbuf)",
2387 XSTRING (STORE_RETURN_VALUE (type, regcache, valbuf)));
f517ea4e 2388#endif
08e45a40
AC
2389 if (GDB_MULTI_ARCH)
2390 fprintf_unfiltered (file,
6cbda714 2391 "gdbarch_dump: STORE_RETURN_VALUE = <0x%08lx>\n",
08e45a40
AC
2392 (long) current_gdbarch->store_return_value
2393 /*STORE_RETURN_VALUE ()*/);
875e1767 2394#endif
08e45a40 2395#ifdef TARGET_ADDR_BIT
bdcd319a 2396 fprintf_unfiltered (file,
08e45a40
AC
2397 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
2398 XSTRING (TARGET_ADDR_BIT));
2399 fprintf_unfiltered (file,
06b25f14
AC
2400 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
2401 TARGET_ADDR_BIT);
bdcd319a 2402#endif
381323f4 2403#ifdef TARGET_ARCHITECTURE
08e45a40
AC
2404 fprintf_unfiltered (file,
2405 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
2406 XSTRING (TARGET_ARCHITECTURE));
0f71a2f6 2407 if (TARGET_ARCHITECTURE != NULL)
4b9b3959
AC
2408 fprintf_unfiltered (file,
2409 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
adf40b2e 2410 TARGET_ARCHITECTURE->printable_name);
381323f4 2411#endif
08e45a40
AC
2412#ifdef TARGET_BFD_VMA_BIT
2413 fprintf_unfiltered (file,
2414 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
2415 XSTRING (TARGET_BFD_VMA_BIT));
2416 fprintf_unfiltered (file,
06b25f14
AC
2417 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
2418 TARGET_BFD_VMA_BIT);
08e45a40 2419#endif
381323f4 2420#ifdef TARGET_BYTE_ORDER
08e45a40
AC
2421 fprintf_unfiltered (file,
2422 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
2423 XSTRING (TARGET_BYTE_ORDER));
4b9b3959
AC
2424 fprintf_unfiltered (file,
2425 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
adf40b2e 2426 (long) TARGET_BYTE_ORDER);
381323f4 2427#endif
4e409299
JB
2428#ifdef TARGET_CHAR_SIGNED
2429 fprintf_unfiltered (file,
2430 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
2431 XSTRING (TARGET_CHAR_SIGNED));
2432 fprintf_unfiltered (file,
06b25f14
AC
2433 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
2434 TARGET_CHAR_SIGNED);
4e409299 2435#endif
08e45a40 2436#ifdef TARGET_DOUBLE_BIT
4b9b3959 2437 fprintf_unfiltered (file,
08e45a40
AC
2438 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
2439 XSTRING (TARGET_DOUBLE_BIT));
4b9b3959 2440 fprintf_unfiltered (file,
06b25f14
AC
2441 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
2442 TARGET_DOUBLE_BIT);
381323f4 2443#endif
08e45a40 2444#ifdef TARGET_DOUBLE_FORMAT
4b9b3959 2445 fprintf_unfiltered (file,
08e45a40
AC
2446 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
2447 XSTRING (TARGET_DOUBLE_FORMAT));
4b9b3959 2448 fprintf_unfiltered (file,
f09cffaa 2449 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %s\n",
52f87c51 2450 (TARGET_DOUBLE_FORMAT)->name);
381323f4
AC
2451#endif
2452#ifdef TARGET_FLOAT_BIT
08e45a40
AC
2453 fprintf_unfiltered (file,
2454 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
2455 XSTRING (TARGET_FLOAT_BIT));
4b9b3959 2456 fprintf_unfiltered (file,
06b25f14
AC
2457 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
2458 TARGET_FLOAT_BIT);
381323f4 2459#endif
08e45a40 2460#ifdef TARGET_FLOAT_FORMAT
4b9b3959 2461 fprintf_unfiltered (file,
08e45a40
AC
2462 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
2463 XSTRING (TARGET_FLOAT_FORMAT));
2464 fprintf_unfiltered (file,
f09cffaa 2465 "gdbarch_dump: TARGET_FLOAT_FORMAT = %s\n",
52f87c51 2466 (TARGET_FLOAT_FORMAT)->name);
08e45a40
AC
2467#endif
2468#ifdef TARGET_INT_BIT
2469 fprintf_unfiltered (file,
2470 "gdbarch_dump: TARGET_INT_BIT # %s\n",
2471 XSTRING (TARGET_INT_BIT));
2472 fprintf_unfiltered (file,
06b25f14
AC
2473 "gdbarch_dump: TARGET_INT_BIT = %d\n",
2474 TARGET_INT_BIT);
08e45a40
AC
2475#endif
2476#ifdef TARGET_LONG_BIT
2477 fprintf_unfiltered (file,
2478 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
2479 XSTRING (TARGET_LONG_BIT));
2480 fprintf_unfiltered (file,
06b25f14
AC
2481 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
2482 TARGET_LONG_BIT);
381323f4
AC
2483#endif
2484#ifdef TARGET_LONG_DOUBLE_BIT
08e45a40
AC
2485 fprintf_unfiltered (file,
2486 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2487 XSTRING (TARGET_LONG_DOUBLE_BIT));
4b9b3959 2488 fprintf_unfiltered (file,
06b25f14
AC
2489 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2490 TARGET_LONG_DOUBLE_BIT);
381323f4 2491#endif
08e45a40 2492#ifdef TARGET_LONG_DOUBLE_FORMAT
66b43ecb 2493 fprintf_unfiltered (file,
08e45a40
AC
2494 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2495 XSTRING (TARGET_LONG_DOUBLE_FORMAT));
52204a0b 2496 fprintf_unfiltered (file,
f09cffaa 2497 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %s\n",
52f87c51 2498 (TARGET_LONG_DOUBLE_FORMAT)->name);
52204a0b 2499#endif
08e45a40 2500#ifdef TARGET_LONG_LONG_BIT
66b43ecb 2501 fprintf_unfiltered (file,
08e45a40
AC
2502 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2503 XSTRING (TARGET_LONG_LONG_BIT));
4b9b3959 2504 fprintf_unfiltered (file,
06b25f14
AC
2505 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2506 TARGET_LONG_LONG_BIT);
381323f4 2507#endif
4be87837
DJ
2508#ifdef TARGET_OSABI
2509 fprintf_unfiltered (file,
2510 "gdbarch_dump: TARGET_OSABI # %s\n",
2511 XSTRING (TARGET_OSABI));
2512 fprintf_unfiltered (file,
2513 "gdbarch_dump: TARGET_OSABI = %ld\n",
2514 (long) TARGET_OSABI);
2515#endif
08e45a40
AC
2516#ifdef TARGET_PRINT_INSN
2517 fprintf_unfiltered (file,
2518 "gdbarch_dump: %s # %s\n",
2519 "TARGET_PRINT_INSN(vma, info)",
2520 XSTRING (TARGET_PRINT_INSN (vma, info)));
4b9b3959
AC
2521 if (GDB_MULTI_ARCH)
2522 fprintf_unfiltered (file,
6cbda714 2523 "gdbarch_dump: TARGET_PRINT_INSN = <0x%08lx>\n",
08e45a40
AC
2524 (long) current_gdbarch->print_insn
2525 /*TARGET_PRINT_INSN ()*/);
381323f4 2526#endif
08e45a40
AC
2527#ifdef TARGET_PTR_BIT
2528 fprintf_unfiltered (file,
2529 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2530 XSTRING (TARGET_PTR_BIT));
2531 fprintf_unfiltered (file,
06b25f14
AC
2532 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2533 TARGET_PTR_BIT);
381323f4 2534#endif
08e45a40
AC
2535#ifdef TARGET_READ_PC
2536 fprintf_unfiltered (file,
2537 "gdbarch_dump: %s # %s\n",
2538 "TARGET_READ_PC(ptid)",
2539 XSTRING (TARGET_READ_PC (ptid)));
4b9b3959
AC
2540 if (GDB_MULTI_ARCH)
2541 fprintf_unfiltered (file,
6cbda714 2542 "gdbarch_dump: TARGET_READ_PC = <0x%08lx>\n",
08e45a40
AC
2543 (long) current_gdbarch->read_pc
2544 /*TARGET_READ_PC ()*/);
381323f4
AC
2545#endif
2546#ifdef TARGET_READ_SP
08e45a40
AC
2547 fprintf_unfiltered (file,
2548 "gdbarch_dump: %s # %s\n",
2549 "TARGET_READ_SP()",
2550 XSTRING (TARGET_READ_SP ()));
4b9b3959
AC
2551 if (GDB_MULTI_ARCH)
2552 fprintf_unfiltered (file,
6cbda714 2553 "gdbarch_dump: TARGET_READ_SP = <0x%08lx>\n",
4b9b3959
AC
2554 (long) current_gdbarch->read_sp
2555 /*TARGET_READ_SP ()*/);
381323f4 2556#endif
08e45a40
AC
2557#ifdef TARGET_SHORT_BIT
2558 fprintf_unfiltered (file,
2559 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2560 XSTRING (TARGET_SHORT_BIT));
2561 fprintf_unfiltered (file,
06b25f14
AC
2562 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2563 TARGET_SHORT_BIT);
39d4ef09
AC
2564#endif
2565#ifdef TARGET_VIRTUAL_FRAME_POINTER
08e45a40
AC
2566#if GDB_MULTI_ARCH
2567 /* Macro might contain `[{}]' when not multi-arch */
2568 fprintf_unfiltered (file,
2569 "gdbarch_dump: %s # %s\n",
2570 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2571 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc, frame_regnum, frame_offset)));
2572#endif
39d4ef09
AC
2573 if (GDB_MULTI_ARCH)
2574 fprintf_unfiltered (file,
6cbda714 2575 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = <0x%08lx>\n",
39d4ef09
AC
2576 (long) current_gdbarch->virtual_frame_pointer
2577 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
381323f4 2578#endif
08e45a40
AC
2579#ifdef TARGET_WRITE_PC
2580#if GDB_MULTI_ARCH
2581 /* Macro might contain `[{}]' when not multi-arch */
4b9b3959 2582 fprintf_unfiltered (file,
08e45a40
AC
2583 "gdbarch_dump: %s # %s\n",
2584 "TARGET_WRITE_PC(val, ptid)",
2585 XSTRING (TARGET_WRITE_PC (val, ptid)));
381323f4 2586#endif
4b9b3959
AC
2587 if (GDB_MULTI_ARCH)
2588 fprintf_unfiltered (file,
6cbda714 2589 "gdbarch_dump: TARGET_WRITE_PC = <0x%08lx>\n",
08e45a40
AC
2590 (long) current_gdbarch->write_pc
2591 /*TARGET_WRITE_PC ()*/);
01fb7433 2592#endif
6314f104
AC
2593 if (GDB_MULTI_ARCH)
2594 fprintf_unfiltered (file,
2595 "gdbarch_dump: gdbarch_unwind_dummy_id_p() = %d\n",
2596 gdbarch_unwind_dummy_id_p (current_gdbarch));
2597 if (GDB_MULTI_ARCH)
2598 fprintf_unfiltered (file,
2599 "gdbarch_dump: unwind_dummy_id = 0x%08lx\n",
2600 (long) current_gdbarch->unwind_dummy_id);
12cc2063
AC
2601 if (GDB_MULTI_ARCH)
2602 fprintf_unfiltered (file,
2603 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
2604 gdbarch_unwind_pc_p (current_gdbarch));
2605 if (GDB_MULTI_ARCH)
2606 fprintf_unfiltered (file,
2607 "gdbarch_dump: unwind_pc = 0x%08lx\n",
2608 (long) current_gdbarch->unwind_pc);
08e45a40 2609#ifdef USE_STRUCT_CONVENTION
4b9b3959 2610 fprintf_unfiltered (file,
08e45a40
AC
2611 "gdbarch_dump: %s # %s\n",
2612 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2613 XSTRING (USE_STRUCT_CONVENTION (gcc_p, value_type)));
4b9b3959
AC
2614 if (GDB_MULTI_ARCH)
2615 fprintf_unfiltered (file,
6cbda714 2616 "gdbarch_dump: USE_STRUCT_CONVENTION = <0x%08lx>\n",
4b9b3959
AC
2617 (long) current_gdbarch->use_struct_convention
2618 /*USE_STRUCT_CONVENTION ()*/);
13d01224
AC
2619#endif
2620#ifdef VALUE_TO_REGISTER
2621#if GDB_MULTI_ARCH
2622 /* Macro might contain `[{}]' when not multi-arch */
2623 fprintf_unfiltered (file,
2624 "gdbarch_dump: %s # %s\n",
2625 "VALUE_TO_REGISTER(type, regnum, from, to)",
2626 XSTRING (VALUE_TO_REGISTER (type, regnum, from, to)));
2627#endif
2628 if (GDB_MULTI_ARCH)
2629 fprintf_unfiltered (file,
6cbda714 2630 "gdbarch_dump: VALUE_TO_REGISTER = <0x%08lx>\n",
13d01224
AC
2631 (long) current_gdbarch->value_to_register
2632 /*VALUE_TO_REGISTER ()*/);
381323f4 2633#endif
4b9b3959
AC
2634 if (current_gdbarch->dump_tdep != NULL)
2635 current_gdbarch->dump_tdep (current_gdbarch, file);
0f71a2f6
JM
2636}
2637
2638struct gdbarch_tdep *
104c1213 2639gdbarch_tdep (struct gdbarch *gdbarch)
0f71a2f6
JM
2640{
2641 if (gdbarch_debug >= 2)
0f71a2f6
JM
2642 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
2643 return gdbarch->tdep;
2644}
2645
2646
2647const struct bfd_arch_info *
104c1213 2648gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
0f71a2f6 2649{
8de9bdc4 2650 gdb_assert (gdbarch != NULL);
0f71a2f6 2651 if (gdbarch_debug >= 2)
0f71a2f6
JM
2652 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
2653 return gdbarch->bfd_arch_info;
2654}
2655
2656int
104c1213 2657gdbarch_byte_order (struct gdbarch *gdbarch)
0f71a2f6 2658{
8de9bdc4 2659 gdb_assert (gdbarch != NULL);
0f71a2f6 2660 if (gdbarch_debug >= 2)
0f71a2f6
JM
2661 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
2662 return gdbarch->byte_order;
2663}
2664
4be87837
DJ
2665enum gdb_osabi
2666gdbarch_osabi (struct gdbarch *gdbarch)
2667{
2668 gdb_assert (gdbarch != NULL);
2669 if (gdbarch_debug >= 2)
2670 fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n");
2671 return gdbarch->osabi;
2672}
2673
0f71a2f6 2674int
104c1213 2675gdbarch_short_bit (struct gdbarch *gdbarch)
0f71a2f6 2676{
8de9bdc4 2677 gdb_assert (gdbarch != NULL);
66b43ecb 2678 /* Skip verify of short_bit, invalid_p == 0 */
0f71a2f6 2679 if (gdbarch_debug >= 2)
0f71a2f6
JM
2680 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
2681 return gdbarch->short_bit;
2682}
2683
2684void
104c1213
JM
2685set_gdbarch_short_bit (struct gdbarch *gdbarch,
2686 int short_bit)
0f71a2f6
JM
2687{
2688 gdbarch->short_bit = short_bit;
2689}
2690
2691int
104c1213 2692gdbarch_int_bit (struct gdbarch *gdbarch)
0f71a2f6 2693{
8de9bdc4 2694 gdb_assert (gdbarch != NULL);
66b43ecb 2695 /* Skip verify of int_bit, invalid_p == 0 */
0f71a2f6 2696 if (gdbarch_debug >= 2)
0f71a2f6
JM
2697 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
2698 return gdbarch->int_bit;
2699}
2700
2701void
104c1213
JM
2702set_gdbarch_int_bit (struct gdbarch *gdbarch,
2703 int int_bit)
0f71a2f6
JM
2704{
2705 gdbarch->int_bit = int_bit;
2706}
2707
2708int
104c1213 2709gdbarch_long_bit (struct gdbarch *gdbarch)
0f71a2f6 2710{
8de9bdc4 2711 gdb_assert (gdbarch != NULL);
66b43ecb 2712 /* Skip verify of long_bit, invalid_p == 0 */
0f71a2f6 2713 if (gdbarch_debug >= 2)
0f71a2f6
JM
2714 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
2715 return gdbarch->long_bit;
2716}
2717
2718void
104c1213
JM
2719set_gdbarch_long_bit (struct gdbarch *gdbarch,
2720 int long_bit)
0f71a2f6
JM
2721{
2722 gdbarch->long_bit = long_bit;
2723}
2724
2725int
104c1213 2726gdbarch_long_long_bit (struct gdbarch *gdbarch)
0f71a2f6 2727{
8de9bdc4 2728 gdb_assert (gdbarch != NULL);
66b43ecb 2729 /* Skip verify of long_long_bit, invalid_p == 0 */
0f71a2f6 2730 if (gdbarch_debug >= 2)
0f71a2f6
JM
2731 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
2732 return gdbarch->long_long_bit;
2733}
2734
2735void
104c1213
JM
2736set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
2737 int long_long_bit)
0f71a2f6
JM
2738{
2739 gdbarch->long_long_bit = long_long_bit;
2740}
2741
2742int
104c1213 2743gdbarch_float_bit (struct gdbarch *gdbarch)
0f71a2f6 2744{
8de9bdc4 2745 gdb_assert (gdbarch != NULL);
66b43ecb 2746 /* Skip verify of float_bit, invalid_p == 0 */
0f71a2f6 2747 if (gdbarch_debug >= 2)
0f71a2f6
JM
2748 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
2749 return gdbarch->float_bit;
2750}
2751
2752void
104c1213
JM
2753set_gdbarch_float_bit (struct gdbarch *gdbarch,
2754 int float_bit)
0f71a2f6
JM
2755{
2756 gdbarch->float_bit = float_bit;
2757}
2758
2759int
104c1213 2760gdbarch_double_bit (struct gdbarch *gdbarch)
0f71a2f6 2761{
8de9bdc4 2762 gdb_assert (gdbarch != NULL);
66b43ecb 2763 /* Skip verify of double_bit, invalid_p == 0 */
0f71a2f6 2764 if (gdbarch_debug >= 2)
0f71a2f6
JM
2765 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
2766 return gdbarch->double_bit;
2767}
2768
2769void
104c1213
JM
2770set_gdbarch_double_bit (struct gdbarch *gdbarch,
2771 int double_bit)
0f71a2f6
JM
2772{
2773 gdbarch->double_bit = double_bit;
2774}
2775
2776int
104c1213 2777gdbarch_long_double_bit (struct gdbarch *gdbarch)
0f71a2f6 2778{
8de9bdc4 2779 gdb_assert (gdbarch != NULL);
66b43ecb 2780 /* Skip verify of long_double_bit, invalid_p == 0 */
0f71a2f6 2781 if (gdbarch_debug >= 2)
0f71a2f6
JM
2782 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
2783 return gdbarch->long_double_bit;
2784}
2785
2786void
104c1213
JM
2787set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
2788 int long_double_bit)
0f71a2f6
JM
2789{
2790 gdbarch->long_double_bit = long_double_bit;
2791}
2792
66b43ecb
AC
2793int
2794gdbarch_ptr_bit (struct gdbarch *gdbarch)
2795{
8de9bdc4 2796 gdb_assert (gdbarch != NULL);
66b43ecb
AC
2797 /* Skip verify of ptr_bit, invalid_p == 0 */
2798 if (gdbarch_debug >= 2)
2799 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
2800 return gdbarch->ptr_bit;
2801}
2802
2803void
2804set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
2805 int ptr_bit)
2806{
2807 gdbarch->ptr_bit = ptr_bit;
2808}
2809
52204a0b
DT
2810int
2811gdbarch_addr_bit (struct gdbarch *gdbarch)
2812{
8de9bdc4 2813 gdb_assert (gdbarch != NULL);
52204a0b 2814 if (gdbarch->addr_bit == 0)
8e65ff28
AC
2815 internal_error (__FILE__, __LINE__,
2816 "gdbarch: gdbarch_addr_bit invalid");
52204a0b
DT
2817 if (gdbarch_debug >= 2)
2818 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
2819 return gdbarch->addr_bit;
2820}
2821
2822void
2823set_gdbarch_addr_bit (struct gdbarch *gdbarch,
2824 int addr_bit)
2825{
2826 gdbarch->addr_bit = addr_bit;
2827}
2828
66b43ecb
AC
2829int
2830gdbarch_bfd_vma_bit (struct gdbarch *gdbarch)
2831{
8de9bdc4 2832 gdb_assert (gdbarch != NULL);
66b43ecb
AC
2833 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2834 if (gdbarch_debug >= 2)
2835 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n");
2836 return gdbarch->bfd_vma_bit;
2837}
2838
2839void
2840set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch,
2841 int bfd_vma_bit)
2842{
2843 gdbarch->bfd_vma_bit = bfd_vma_bit;
2844}
2845
4e409299
JB
2846int
2847gdbarch_char_signed (struct gdbarch *gdbarch)
2848{
8de9bdc4 2849 gdb_assert (gdbarch != NULL);
4e409299
JB
2850 if (gdbarch->char_signed == -1)
2851 internal_error (__FILE__, __LINE__,
2852 "gdbarch: gdbarch_char_signed invalid");
2853 if (gdbarch_debug >= 2)
2854 fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
2855 return gdbarch->char_signed;
2856}
2857
2858void
2859set_gdbarch_char_signed (struct gdbarch *gdbarch,
2860 int char_signed)
2861{
2862 gdbarch->char_signed = char_signed;
2863}
2864
0f71a2f6 2865CORE_ADDR
39f77062 2866gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid)
0f71a2f6 2867{
8de9bdc4 2868 gdb_assert (gdbarch != NULL);
0f71a2f6 2869 if (gdbarch->read_pc == 0)
8e65ff28
AC
2870 internal_error (__FILE__, __LINE__,
2871 "gdbarch: gdbarch_read_pc invalid");
0f71a2f6 2872 if (gdbarch_debug >= 2)
0f71a2f6 2873 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
39f77062 2874 return gdbarch->read_pc (ptid);
0f71a2f6
JM
2875}
2876
2877void
104c1213
JM
2878set_gdbarch_read_pc (struct gdbarch *gdbarch,
2879 gdbarch_read_pc_ftype read_pc)
0f71a2f6
JM
2880{
2881 gdbarch->read_pc = read_pc;
2882}
2883
2884void
39f77062 2885gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid)
0f71a2f6 2886{
8de9bdc4 2887 gdb_assert (gdbarch != NULL);
0f71a2f6 2888 if (gdbarch->write_pc == 0)
8e65ff28
AC
2889 internal_error (__FILE__, __LINE__,
2890 "gdbarch: gdbarch_write_pc invalid");
0f71a2f6 2891 if (gdbarch_debug >= 2)
0f71a2f6 2892 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
39f77062 2893 gdbarch->write_pc (val, ptid);
0f71a2f6
JM
2894}
2895
2896void
104c1213
JM
2897set_gdbarch_write_pc (struct gdbarch *gdbarch,
2898 gdbarch_write_pc_ftype write_pc)
0f71a2f6
JM
2899{
2900 gdbarch->write_pc = write_pc;
2901}
2902
0ba6dca9
AC
2903int
2904gdbarch_deprecated_target_read_fp_p (struct gdbarch *gdbarch)
2905{
2906 gdb_assert (gdbarch != NULL);
2907 return gdbarch->deprecated_target_read_fp != 0;
2908}
2909
0f71a2f6 2910CORE_ADDR
0ba6dca9 2911gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch)
0f71a2f6 2912{
8de9bdc4 2913 gdb_assert (gdbarch != NULL);
0ba6dca9 2914 if (gdbarch->deprecated_target_read_fp == 0)
8e65ff28 2915 internal_error (__FILE__, __LINE__,
0ba6dca9 2916 "gdbarch: gdbarch_deprecated_target_read_fp invalid");
0f71a2f6 2917 if (gdbarch_debug >= 2)
0ba6dca9
AC
2918 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_target_read_fp called\n");
2919 return gdbarch->deprecated_target_read_fp ();
0f71a2f6
JM
2920}
2921
2922void
0ba6dca9
AC
2923set_gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch,
2924 gdbarch_deprecated_target_read_fp_ftype deprecated_target_read_fp)
0f71a2f6 2925{
0ba6dca9 2926 gdbarch->deprecated_target_read_fp = deprecated_target_read_fp;
0f71a2f6
JM
2927}
2928
0f71a2f6
JM
2929CORE_ADDR
2930gdbarch_read_sp (struct gdbarch *gdbarch)
2931{
8de9bdc4 2932 gdb_assert (gdbarch != NULL);
0f71a2f6 2933 if (gdbarch->read_sp == 0)
8e65ff28
AC
2934 internal_error (__FILE__, __LINE__,
2935 "gdbarch: gdbarch_read_sp invalid");
0f71a2f6 2936 if (gdbarch_debug >= 2)
0f71a2f6
JM
2937 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
2938 return gdbarch->read_sp ();
2939}
2940
2941void
104c1213
JM
2942set_gdbarch_read_sp (struct gdbarch *gdbarch,
2943 gdbarch_read_sp_ftype read_sp)
0f71a2f6
JM
2944{
2945 gdbarch->read_sp = read_sp;
2946}
2947
6c0e89ed
AC
2948int
2949gdbarch_deprecated_dummy_write_sp_p (struct gdbarch *gdbarch)
2950{
2951 gdb_assert (gdbarch != NULL);
2952 return gdbarch->deprecated_dummy_write_sp != 0;
2953}
2954
0f71a2f6 2955void
6c0e89ed 2956gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
0f71a2f6 2957{
8de9bdc4 2958 gdb_assert (gdbarch != NULL);
6c0e89ed 2959 if (gdbarch->deprecated_dummy_write_sp == 0)
8e65ff28 2960 internal_error (__FILE__, __LINE__,
6c0e89ed 2961 "gdbarch: gdbarch_deprecated_dummy_write_sp invalid");
0f71a2f6 2962 if (gdbarch_debug >= 2)
6c0e89ed
AC
2963 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_dummy_write_sp called\n");
2964 gdbarch->deprecated_dummy_write_sp (val);
0f71a2f6
JM
2965}
2966
2967void
6c0e89ed
AC
2968set_gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch,
2969 gdbarch_deprecated_dummy_write_sp_ftype deprecated_dummy_write_sp)
0f71a2f6 2970{
6c0e89ed 2971 gdbarch->deprecated_dummy_write_sp = deprecated_dummy_write_sp;
0f71a2f6
JM
2972}
2973
39d4ef09
AC
2974void
2975gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
2976{
8de9bdc4 2977 gdb_assert (gdbarch != NULL);
39d4ef09
AC
2978 if (gdbarch->virtual_frame_pointer == 0)
2979 internal_error (__FILE__, __LINE__,
2980 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2981 if (gdbarch_debug >= 2)
2982 fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
2983 gdbarch->virtual_frame_pointer (pc, frame_regnum, frame_offset);
2984}
2985
2986void
2987set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
2988 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
2989{
2990 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
2991}
2992
61a0eb5b 2993int
d8124050 2994gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
61a0eb5b 2995{
8de9bdc4 2996 gdb_assert (gdbarch != NULL);
d8124050 2997 return gdbarch->pseudo_register_read != 0;
61a0eb5b
AC
2998}
2999
3000void
d8124050 3001gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf)
61a0eb5b 3002{
8de9bdc4 3003 gdb_assert (gdbarch != NULL);
d8124050 3004 if (gdbarch->pseudo_register_read == 0)
61a0eb5b 3005 internal_error (__FILE__, __LINE__,
d8124050 3006 "gdbarch: gdbarch_pseudo_register_read invalid");
61a0eb5b 3007 if (gdbarch_debug >= 2)
d8124050
AC
3008 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
3009 gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
61a0eb5b
AC
3010}
3011
3012void
d8124050
AC
3013set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
3014 gdbarch_pseudo_register_read_ftype pseudo_register_read)
61a0eb5b 3015{
d8124050 3016 gdbarch->pseudo_register_read = pseudo_register_read;
61a0eb5b
AC
3017}
3018
3019int
d8124050 3020gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
61a0eb5b 3021{
8de9bdc4 3022 gdb_assert (gdbarch != NULL);
d8124050 3023 return gdbarch->pseudo_register_write != 0;
61a0eb5b
AC
3024}
3025
3026void
d8124050 3027gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf)
61a0eb5b 3028{
8de9bdc4 3029 gdb_assert (gdbarch != NULL);
d8124050 3030 if (gdbarch->pseudo_register_write == 0)
61a0eb5b 3031 internal_error (__FILE__, __LINE__,
d8124050 3032 "gdbarch: gdbarch_pseudo_register_write invalid");
61a0eb5b 3033 if (gdbarch_debug >= 2)
d8124050
AC
3034 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
3035 gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
61a0eb5b
AC
3036}
3037
3038void
d8124050
AC
3039set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
3040 gdbarch_pseudo_register_write_ftype pseudo_register_write)
61a0eb5b 3041{
d8124050 3042 gdbarch->pseudo_register_write = pseudo_register_write;
61a0eb5b
AC
3043}
3044
0f71a2f6 3045int
104c1213 3046gdbarch_num_regs (struct gdbarch *gdbarch)
0f71a2f6 3047{
8de9bdc4 3048 gdb_assert (gdbarch != NULL);
0f71a2f6 3049 if (gdbarch->num_regs == -1)
8e65ff28
AC
3050 internal_error (__FILE__, __LINE__,
3051 "gdbarch: gdbarch_num_regs invalid");
0f71a2f6 3052 if (gdbarch_debug >= 2)
0f71a2f6
JM
3053 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
3054 return gdbarch->num_regs;
3055}
3056
3057void
104c1213
JM
3058set_gdbarch_num_regs (struct gdbarch *gdbarch,
3059 int num_regs)
0f71a2f6
JM
3060{
3061 gdbarch->num_regs = num_regs;
3062}
3063
0aba1244
EZ
3064int
3065gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
3066{
8de9bdc4 3067 gdb_assert (gdbarch != NULL);
0aba1244
EZ
3068 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
3069 if (gdbarch_debug >= 2)
3070 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
3071 return gdbarch->num_pseudo_regs;
3072}
3073
3074void
3075set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
3076 int num_pseudo_regs)
3077{
3078 gdbarch->num_pseudo_regs = num_pseudo_regs;
3079}
3080
0f71a2f6 3081int
104c1213 3082gdbarch_sp_regnum (struct gdbarch *gdbarch)
0f71a2f6 3083{
8de9bdc4 3084 gdb_assert (gdbarch != NULL);
1200cd6e 3085 /* Skip verify of sp_regnum, invalid_p == 0 */
0f71a2f6 3086 if (gdbarch_debug >= 2)
0f71a2f6
JM
3087 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
3088 return gdbarch->sp_regnum;
3089}
3090
3091void
104c1213
JM
3092set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
3093 int sp_regnum)
0f71a2f6
JM
3094{
3095 gdbarch->sp_regnum = sp_regnum;
3096}
3097
3098int
0ba6dca9 3099gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch)
0f71a2f6 3100{
8de9bdc4 3101 gdb_assert (gdbarch != NULL);
0ba6dca9 3102 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
0f71a2f6 3103 if (gdbarch_debug >= 2)
0ba6dca9
AC
3104 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n");
3105 return gdbarch->deprecated_fp_regnum;
0f71a2f6
JM
3106}
3107
3108void
0ba6dca9
AC
3109set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch,
3110 int deprecated_fp_regnum)
0f71a2f6 3111{
0ba6dca9 3112 gdbarch->deprecated_fp_regnum = deprecated_fp_regnum;
0f71a2f6
JM
3113}
3114
3115int
104c1213 3116gdbarch_pc_regnum (struct gdbarch *gdbarch)
0f71a2f6 3117{
8de9bdc4 3118 gdb_assert (gdbarch != NULL);
1200cd6e 3119 /* Skip verify of pc_regnum, invalid_p == 0 */
0f71a2f6 3120 if (gdbarch_debug >= 2)
0f71a2f6
JM
3121 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
3122 return gdbarch->pc_regnum;
3123}
3124
3125void
104c1213
JM
3126set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
3127 int pc_regnum)
0f71a2f6
JM
3128{
3129 gdbarch->pc_regnum = pc_regnum;
3130}
3131
c2169756
AC
3132int
3133gdbarch_ps_regnum (struct gdbarch *gdbarch)
3134{
8de9bdc4 3135 gdb_assert (gdbarch != NULL);
c2169756
AC
3136 /* Skip verify of ps_regnum, invalid_p == 0 */
3137 if (gdbarch_debug >= 2)
3138 fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
3139 return gdbarch->ps_regnum;
3140}
3141
3142void
3143set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
3144 int ps_regnum)
3145{
3146 gdbarch->ps_regnum = ps_regnum;
3147}
3148
60054393
MS
3149int
3150gdbarch_fp0_regnum (struct gdbarch *gdbarch)
3151{
8de9bdc4 3152 gdb_assert (gdbarch != NULL);
60054393
MS
3153 /* Skip verify of fp0_regnum, invalid_p == 0 */
3154 if (gdbarch_debug >= 2)
3155 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
3156 return gdbarch->fp0_regnum;
3157}
3158
3159void
3160set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
3161 int fp0_regnum)
3162{
3163 gdbarch->fp0_regnum = fp0_regnum;
3164}
3165
03863182
AC
3166int
3167gdbarch_npc_regnum (struct gdbarch *gdbarch)
3168{
8de9bdc4 3169 gdb_assert (gdbarch != NULL);
03863182
AC
3170 /* Skip verify of npc_regnum, invalid_p == 0 */
3171 if (gdbarch_debug >= 2)
3172 fprintf_unfiltered (gdb_stdlog, "gdbarch_npc_regnum called\n");
3173 return gdbarch->npc_regnum;
3174}
3175
3176void
3177set_gdbarch_npc_regnum (struct gdbarch *gdbarch,
3178 int npc_regnum)
3179{
3180 gdbarch->npc_regnum = npc_regnum;
3181}
3182
88c72b7d
AC
3183int
3184gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
3185{
8de9bdc4 3186 gdb_assert (gdbarch != NULL);
88c72b7d 3187 if (gdbarch->stab_reg_to_regnum == 0)
8e65ff28
AC
3188 internal_error (__FILE__, __LINE__,
3189 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
88c72b7d
AC
3190 if (gdbarch_debug >= 2)
3191 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
3192 return gdbarch->stab_reg_to_regnum (stab_regnr);
3193}
3194
3195void
3196set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
3197 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
3198{
3199 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
3200}
3201
3202int
3203gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
3204{
8de9bdc4 3205 gdb_assert (gdbarch != NULL);
88c72b7d 3206 if (gdbarch->ecoff_reg_to_regnum == 0)
8e65ff28
AC
3207 internal_error (__FILE__, __LINE__,
3208 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
88c72b7d
AC
3209 if (gdbarch_debug >= 2)
3210 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
3211 return gdbarch->ecoff_reg_to_regnum (ecoff_regnr);
3212}
3213
3214void
3215set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
3216 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
3217{
3218 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
3219}
3220
3221int
3222gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr)
3223{
8de9bdc4 3224 gdb_assert (gdbarch != NULL);
88c72b7d 3225 if (gdbarch->dwarf_reg_to_regnum == 0)
8e65ff28
AC
3226 internal_error (__FILE__, __LINE__,
3227 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
88c72b7d
AC
3228 if (gdbarch_debug >= 2)
3229 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf_reg_to_regnum called\n");
3230 return gdbarch->dwarf_reg_to_regnum (dwarf_regnr);
3231}
3232
3233void
3234set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch,
3235 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum)
3236{
3237 gdbarch->dwarf_reg_to_regnum = dwarf_reg_to_regnum;
3238}
3239
3240int
3241gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
3242{
8de9bdc4 3243 gdb_assert (gdbarch != NULL);
88c72b7d 3244 if (gdbarch->sdb_reg_to_regnum == 0)
8e65ff28
AC
3245 internal_error (__FILE__, __LINE__,
3246 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
88c72b7d
AC
3247 if (gdbarch_debug >= 2)
3248 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
3249 return gdbarch->sdb_reg_to_regnum (sdb_regnr);
3250}
3251
3252void
3253set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
3254 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
3255{
3256 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
3257}
3258
3259int
3260gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
3261{
8de9bdc4 3262 gdb_assert (gdbarch != NULL);
88c72b7d 3263 if (gdbarch->dwarf2_reg_to_regnum == 0)
8e65ff28
AC
3264 internal_error (__FILE__, __LINE__,
3265 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
88c72b7d
AC
3266 if (gdbarch_debug >= 2)
3267 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
3268 return gdbarch->dwarf2_reg_to_regnum (dwarf2_regnr);
3269}
3270
3271void
3272set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
3273 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
3274{
3275 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
3276}
3277
fa88f677 3278const char *
0f71a2f6
JM
3279gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
3280{
8de9bdc4 3281 gdb_assert (gdbarch != NULL);
7be570e7 3282 if (gdbarch->register_name == 0)
8e65ff28
AC
3283 internal_error (__FILE__, __LINE__,
3284 "gdbarch: gdbarch_register_name invalid");
0f71a2f6 3285 if (gdbarch_debug >= 2)
0f71a2f6
JM
3286 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
3287 return gdbarch->register_name (regnr);
3288}
3289
3290void
104c1213
JM
3291set_gdbarch_register_name (struct gdbarch *gdbarch,
3292 gdbarch_register_name_ftype register_name)
0f71a2f6
JM
3293{
3294 gdbarch->register_name = register_name;
3295}
3296
3297int
b1e29e33 3298gdbarch_deprecated_register_size (struct gdbarch *gdbarch)
0f71a2f6 3299{
8de9bdc4 3300 gdb_assert (gdbarch != NULL);
0f71a2f6 3301 if (gdbarch_debug >= 2)
b1e29e33
AC
3302 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_size called\n");
3303 return gdbarch->deprecated_register_size;
0f71a2f6
JM
3304}
3305
3306void
b1e29e33
AC
3307set_gdbarch_deprecated_register_size (struct gdbarch *gdbarch,
3308 int deprecated_register_size)
0f71a2f6 3309{
b1e29e33 3310 gdbarch->deprecated_register_size = deprecated_register_size;
0f71a2f6
JM
3311}
3312
3313int
104c1213 3314gdbarch_register_bytes (struct gdbarch *gdbarch)
0f71a2f6 3315{
8de9bdc4 3316 gdb_assert (gdbarch != NULL);
0f71a2f6 3317 if (gdbarch_debug >= 2)
0f71a2f6
JM
3318 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes called\n");
3319 return gdbarch->register_bytes;
3320}
3321
3322void
104c1213
JM
3323set_gdbarch_register_bytes (struct gdbarch *gdbarch,
3324 int register_bytes)
0f71a2f6
JM
3325{
3326 gdbarch->register_bytes = register_bytes;
3327}
3328
46654a5b
AC
3329int
3330gdbarch_register_byte_p (struct gdbarch *gdbarch)
3331{
3332 gdb_assert (gdbarch != NULL);
3333 return gdbarch->register_byte != generic_register_byte;
3334}
3335
0f71a2f6
JM
3336int
3337gdbarch_register_byte (struct gdbarch *gdbarch, int reg_nr)
3338{
8de9bdc4 3339 gdb_assert (gdbarch != NULL);
0f71a2f6 3340 if (gdbarch->register_byte == 0)
8e65ff28
AC
3341 internal_error (__FILE__, __LINE__,
3342 "gdbarch: gdbarch_register_byte invalid");
46654a5b 3343 /* Ignore predicate (gdbarch->register_byte != generic_register_byte). */
0f71a2f6 3344 if (gdbarch_debug >= 2)
0f71a2f6
JM
3345 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_byte called\n");
3346 return gdbarch->register_byte (reg_nr);
3347}
3348
3349void
104c1213
JM
3350set_gdbarch_register_byte (struct gdbarch *gdbarch,
3351 gdbarch_register_byte_ftype register_byte)
0f71a2f6
JM
3352{
3353 gdbarch->register_byte = register_byte;
3354}
3355
3356int
3357gdbarch_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
3358{
8de9bdc4 3359 gdb_assert (gdbarch != NULL);
0f71a2f6 3360 if (gdbarch->register_raw_size == 0)
8e65ff28
AC
3361 internal_error (__FILE__, __LINE__,
3362 "gdbarch: gdbarch_register_raw_size invalid");
0f71a2f6 3363 if (gdbarch_debug >= 2)
0f71a2f6
JM
3364 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_raw_size called\n");
3365 return gdbarch->register_raw_size (reg_nr);
3366}
3367
3368void
104c1213
JM
3369set_gdbarch_register_raw_size (struct gdbarch *gdbarch,
3370 gdbarch_register_raw_size_ftype register_raw_size)
0f71a2f6
JM
3371{
3372 gdbarch->register_raw_size = register_raw_size;
3373}
3374
3375int
a0ed5532
AC
3376gdbarch_deprecated_max_register_raw_size_p (struct gdbarch *gdbarch)
3377{
3378 gdb_assert (gdbarch != NULL);
3379 return gdbarch->deprecated_max_register_raw_size != 0;
3380}
3381
3382int
3383gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch)
0f71a2f6 3384{
8de9bdc4 3385 gdb_assert (gdbarch != NULL);
0f71a2f6 3386 if (gdbarch_debug >= 2)
a0ed5532
AC
3387 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_max_register_raw_size called\n");
3388 return gdbarch->deprecated_max_register_raw_size;
0f71a2f6
JM
3389}
3390
3391void
a0ed5532
AC
3392set_gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch,
3393 int deprecated_max_register_raw_size)
0f71a2f6 3394{
a0ed5532 3395 gdbarch->deprecated_max_register_raw_size = deprecated_max_register_raw_size;
0f71a2f6
JM
3396}
3397
3398int
3399gdbarch_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
3400{
8de9bdc4 3401 gdb_assert (gdbarch != NULL);
0f71a2f6 3402 if (gdbarch->register_virtual_size == 0)
8e65ff28
AC
3403 internal_error (__FILE__, __LINE__,
3404 "gdbarch: gdbarch_register_virtual_size invalid");
0f71a2f6 3405 if (gdbarch_debug >= 2)
0f71a2f6
JM
3406 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_size called\n");
3407 return gdbarch->register_virtual_size (reg_nr);
3408}
3409
3410void
104c1213
JM
3411set_gdbarch_register_virtual_size (struct gdbarch *gdbarch,
3412 gdbarch_register_virtual_size_ftype register_virtual_size)
0f71a2f6
JM
3413{
3414 gdbarch->register_virtual_size = register_virtual_size;
3415}
3416
3417int
a0ed5532
AC
3418gdbarch_deprecated_max_register_virtual_size_p (struct gdbarch *gdbarch)
3419{
3420 gdb_assert (gdbarch != NULL);
3421 return gdbarch->deprecated_max_register_virtual_size != 0;
3422}
3423
3424int
3425gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch)
0f71a2f6 3426{
8de9bdc4 3427 gdb_assert (gdbarch != NULL);
0f71a2f6 3428 if (gdbarch_debug >= 2)
a0ed5532
AC
3429 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_max_register_virtual_size called\n");
3430 return gdbarch->deprecated_max_register_virtual_size;
0f71a2f6
JM
3431}
3432
3433void
a0ed5532
AC
3434set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch,
3435 int deprecated_max_register_virtual_size)
0f71a2f6 3436{
a0ed5532 3437 gdbarch->deprecated_max_register_virtual_size = deprecated_max_register_virtual_size;
0f71a2f6
JM
3438}
3439
35cac7cf
AC
3440int
3441gdbarch_register_virtual_type_p (struct gdbarch *gdbarch)
3442{
3443 gdb_assert (gdbarch != NULL);
3444 return gdbarch->register_virtual_type != 0;
3445}
3446
0f71a2f6
JM
3447struct type *
3448gdbarch_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
3449{
8de9bdc4 3450 gdb_assert (gdbarch != NULL);
0f71a2f6 3451 if (gdbarch->register_virtual_type == 0)
8e65ff28
AC
3452 internal_error (__FILE__, __LINE__,
3453 "gdbarch: gdbarch_register_virtual_type invalid");
0f71a2f6 3454 if (gdbarch_debug >= 2)
0f71a2f6
JM
3455 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_type called\n");
3456 return gdbarch->register_virtual_type (reg_nr);
3457}
3458
3459void
104c1213
JM
3460set_gdbarch_register_virtual_type (struct gdbarch *gdbarch,
3461 gdbarch_register_virtual_type_ftype register_virtual_type)
0f71a2f6
JM
3462{
3463 gdbarch->register_virtual_type = register_virtual_type;
3464}
3465
35cac7cf
AC
3466int
3467gdbarch_register_type_p (struct gdbarch *gdbarch)
3468{
3469 gdb_assert (gdbarch != NULL);
3470 return gdbarch->register_type != 0;
3471}
3472
3473struct type *
3474gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
3475{
3476 gdb_assert (gdbarch != NULL);
3477 if (gdbarch->register_type == 0)
3478 internal_error (__FILE__, __LINE__,
3479 "gdbarch: gdbarch_register_type invalid");
3480 if (gdbarch_debug >= 2)
3481 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
3482 return gdbarch->register_type (gdbarch, reg_nr);
3483}
3484
3485void
3486set_gdbarch_register_type (struct gdbarch *gdbarch,
3487 gdbarch_register_type_ftype register_type)
3488{
3489 gdbarch->register_type = register_type;
3490}
3491
0ab7a791 3492int
903ad3a6 3493gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch)
0ab7a791
AC
3494{
3495 gdb_assert (gdbarch != NULL);
903ad3a6 3496 return gdbarch->deprecated_do_registers_info != 0;
0ab7a791
AC
3497}
3498
666e11c5 3499void
903ad3a6 3500gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs)
666e11c5 3501{
8de9bdc4 3502 gdb_assert (gdbarch != NULL);
903ad3a6 3503 if (gdbarch->deprecated_do_registers_info == 0)
8e65ff28 3504 internal_error (__FILE__, __LINE__,
903ad3a6 3505 "gdbarch: gdbarch_deprecated_do_registers_info invalid");
666e11c5 3506 if (gdbarch_debug >= 2)
903ad3a6
AC
3507 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_do_registers_info called\n");
3508 gdbarch->deprecated_do_registers_info (reg_nr, fpregs);
666e11c5
EZ
3509}
3510
3511void
903ad3a6
AC
3512set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch,
3513 gdbarch_deprecated_do_registers_info_ftype deprecated_do_registers_info)
666e11c5 3514{
903ad3a6 3515 gdbarch->deprecated_do_registers_info = deprecated_do_registers_info;
666e11c5
EZ
3516}
3517
0ab7a791
AC
3518void
3519gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
3520{
3521 gdb_assert (gdbarch != NULL);
3522 if (gdbarch->print_registers_info == 0)
3523 internal_error (__FILE__, __LINE__,
3524 "gdbarch: gdbarch_print_registers_info invalid");
3525 if (gdbarch_debug >= 2)
3526 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
3527 gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
3528}
3529
3530void
3531set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
3532 gdbarch_print_registers_info_ftype print_registers_info)
3533{
3534 gdbarch->print_registers_info = print_registers_info;
3535}
3536
23e3a7ac
AC
3537int
3538gdbarch_print_float_info_p (struct gdbarch *gdbarch)
3539{
3540 gdb_assert (gdbarch != NULL);
3541 return gdbarch->print_float_info != 0;
3542}
3543
5e74b15c 3544void
23e3a7ac 3545gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
5e74b15c 3546{
8de9bdc4 3547 gdb_assert (gdbarch != NULL);
5e74b15c
RE
3548 if (gdbarch->print_float_info == 0)
3549 internal_error (__FILE__, __LINE__,
3550 "gdbarch: gdbarch_print_float_info invalid");
3551 if (gdbarch_debug >= 2)
3552 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
23e3a7ac 3553 gdbarch->print_float_info (gdbarch, file, frame, args);
5e74b15c
RE
3554}
3555
3556void
3557set_gdbarch_print_float_info (struct gdbarch *gdbarch,
3558 gdbarch_print_float_info_ftype print_float_info)
3559{
3560 gdbarch->print_float_info = print_float_info;
3561}
3562
e76f1f2e
AC
3563int
3564gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
3565{
3566 gdb_assert (gdbarch != NULL);
3567 return gdbarch->print_vector_info != 0;
3568}
3569
3570void
3571gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
3572{
3573 gdb_assert (gdbarch != NULL);
3574 if (gdbarch->print_vector_info == 0)
3575 internal_error (__FILE__, __LINE__,
3576 "gdbarch: gdbarch_print_vector_info invalid");
3577 if (gdbarch_debug >= 2)
3578 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
3579 gdbarch->print_vector_info (gdbarch, file, frame, args);
3580}
3581
3582void
3583set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
3584 gdbarch_print_vector_info_ftype print_vector_info)
3585{
3586 gdbarch->print_vector_info = print_vector_info;
3587}
3588
7c7651b2
AC
3589int
3590gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
3591{
8de9bdc4 3592 gdb_assert (gdbarch != NULL);
7c7651b2 3593 if (gdbarch->register_sim_regno == 0)
8e65ff28
AC
3594 internal_error (__FILE__, __LINE__,
3595 "gdbarch: gdbarch_register_sim_regno invalid");
7c7651b2
AC
3596 if (gdbarch_debug >= 2)
3597 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
3598 return gdbarch->register_sim_regno (reg_nr);
3599}
3600
3601void
3602set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
3603 gdbarch_register_sim_regno_ftype register_sim_regno)
3604{
3605 gdbarch->register_sim_regno = register_sim_regno;
3606}
3607
2649061d
AC
3608int
3609gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch)
3610{
8de9bdc4 3611 gdb_assert (gdbarch != NULL);
2649061d
AC
3612 return gdbarch->register_bytes_ok != 0;
3613}
3614
3615int
3616gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes)
3617{
8de9bdc4 3618 gdb_assert (gdbarch != NULL);
2649061d 3619 if (gdbarch->register_bytes_ok == 0)
8e65ff28
AC
3620 internal_error (__FILE__, __LINE__,
3621 "gdbarch: gdbarch_register_bytes_ok invalid");
2649061d
AC
3622 if (gdbarch_debug >= 2)
3623 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n");
3624 return gdbarch->register_bytes_ok (nr_bytes);
3625}
3626
3627void
3628set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch,
3629 gdbarch_register_bytes_ok_ftype register_bytes_ok)
3630{
3631 gdbarch->register_bytes_ok = register_bytes_ok;
3632}
3633
01fb7433 3634int
1622c8f7 3635gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
01fb7433 3636{
8de9bdc4 3637 gdb_assert (gdbarch != NULL);
01fb7433
AC
3638 if (gdbarch->cannot_fetch_register == 0)
3639 internal_error (__FILE__, __LINE__,
3640 "gdbarch: gdbarch_cannot_fetch_register invalid");
3641 if (gdbarch_debug >= 2)
3642 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
1622c8f7 3643 return gdbarch->cannot_fetch_register (regnum);
01fb7433
AC
3644}
3645
3646void
3647set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
3648 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
3649{
3650 gdbarch->cannot_fetch_register = cannot_fetch_register;
3651}
3652
3653int
1622c8f7 3654gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
01fb7433 3655{
8de9bdc4 3656 gdb_assert (gdbarch != NULL);
01fb7433
AC
3657 if (gdbarch->cannot_store_register == 0)
3658 internal_error (__FILE__, __LINE__,
3659 "gdbarch: gdbarch_cannot_store_register invalid");
3660 if (gdbarch_debug >= 2)
3661 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
1622c8f7 3662 return gdbarch->cannot_store_register (regnum);
01fb7433
AC
3663}
3664
3665void
3666set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
3667 gdbarch_cannot_store_register_ftype cannot_store_register)
3668{
3669 gdbarch->cannot_store_register = cannot_store_register;
3670}
3671
9df628e0
RE
3672int
3673gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
3674{
8de9bdc4 3675 gdb_assert (gdbarch != NULL);
9df628e0
RE
3676 return gdbarch->get_longjmp_target != 0;
3677}
3678
3679int
3680gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc)
3681{
8de9bdc4 3682 gdb_assert (gdbarch != NULL);
9df628e0
RE
3683 if (gdbarch->get_longjmp_target == 0)
3684 internal_error (__FILE__, __LINE__,
3685 "gdbarch: gdbarch_get_longjmp_target invalid");
3686 if (gdbarch_debug >= 2)
3687 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
3688 return gdbarch->get_longjmp_target (pc);
3689}
3690
3691void
3692set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
3693 gdbarch_get_longjmp_target_ftype get_longjmp_target)
3694{
3695 gdbarch->get_longjmp_target = get_longjmp_target;
3696}
3697
0f71a2f6 3698int
07555a72 3699gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch)
0f71a2f6 3700{
8de9bdc4 3701 gdb_assert (gdbarch != NULL);
07555a72 3702 /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
0f71a2f6 3703 if (gdbarch_debug >= 2)
07555a72
AC
3704 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_use_generic_dummy_frames called\n");
3705 return gdbarch->deprecated_use_generic_dummy_frames;
0f71a2f6
JM
3706}
3707
3708void
07555a72
AC
3709set_gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch,
3710 int deprecated_use_generic_dummy_frames)
0f71a2f6 3711{
07555a72 3712 gdbarch->deprecated_use_generic_dummy_frames = deprecated_use_generic_dummy_frames;
0f71a2f6
JM
3713}
3714
3715int
104c1213 3716gdbarch_call_dummy_location (struct gdbarch *gdbarch)
0f71a2f6 3717{
8de9bdc4 3718 gdb_assert (gdbarch != NULL);
b99fa2d2 3719 /* Skip verify of call_dummy_location, invalid_p == 0 */
0f71a2f6 3720 if (gdbarch_debug >= 2)
0f71a2f6
JM
3721 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
3722 return gdbarch->call_dummy_location;
3723}
3724
3725void
104c1213
JM
3726set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
3727 int call_dummy_location)
0f71a2f6
JM
3728{
3729 gdbarch->call_dummy_location = call_dummy_location;
3730}
3731
3732CORE_ADDR
3733gdbarch_call_dummy_address (struct gdbarch *gdbarch)
3734{
8de9bdc4 3735 gdb_assert (gdbarch != NULL);
0f71a2f6 3736 if (gdbarch->call_dummy_address == 0)
8e65ff28
AC
3737 internal_error (__FILE__, __LINE__,
3738 "gdbarch: gdbarch_call_dummy_address invalid");
0f71a2f6 3739 if (gdbarch_debug >= 2)
0f71a2f6
JM
3740 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_address called\n");
3741 return gdbarch->call_dummy_address ();
3742}
3743
3744void
104c1213
JM
3745set_gdbarch_call_dummy_address (struct gdbarch *gdbarch,
3746 gdbarch_call_dummy_address_ftype call_dummy_address)
0f71a2f6
JM
3747{
3748 gdbarch->call_dummy_address = call_dummy_address;
3749}
3750
3751CORE_ADDR
b1e29e33 3752gdbarch_deprecated_call_dummy_start_offset (struct gdbarch *gdbarch)
0f71a2f6 3753{
8de9bdc4 3754 gdb_assert (gdbarch != NULL);
0f71a2f6 3755 if (gdbarch_debug >= 2)
b1e29e33
AC
3756 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_start_offset called\n");
3757 return gdbarch->deprecated_call_dummy_start_offset;
0f71a2f6
JM
3758}
3759
3760void
b1e29e33
AC
3761set_gdbarch_deprecated_call_dummy_start_offset (struct gdbarch *gdbarch,
3762 CORE_ADDR deprecated_call_dummy_start_offset)
0f71a2f6 3763{
b1e29e33 3764 gdbarch->deprecated_call_dummy_start_offset = deprecated_call_dummy_start_offset;
0f71a2f6
JM
3765}
3766
3767CORE_ADDR
b1e29e33 3768gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch *gdbarch)
0f71a2f6 3769{
8de9bdc4 3770 gdb_assert (gdbarch != NULL);
0f71a2f6 3771 if (gdbarch_debug >= 2)
b1e29e33
AC
3772 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_breakpoint_offset called\n");
3773 return gdbarch->deprecated_call_dummy_breakpoint_offset;
0f71a2f6
JM
3774}
3775
3776void
b1e29e33
AC
3777set_gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch *gdbarch,
3778 CORE_ADDR deprecated_call_dummy_breakpoint_offset)
0f71a2f6 3779{
b1e29e33 3780 gdbarch->deprecated_call_dummy_breakpoint_offset = deprecated_call_dummy_breakpoint_offset;
0f71a2f6
JM
3781}
3782
0f71a2f6 3783int
b1e29e33 3784gdbarch_deprecated_call_dummy_length (struct gdbarch *gdbarch)
0f71a2f6 3785{
8de9bdc4 3786 gdb_assert (gdbarch != NULL);
0f71a2f6 3787 if (gdbarch_debug >= 2)
b1e29e33
AC
3788 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_length called\n");
3789 return gdbarch->deprecated_call_dummy_length;
0f71a2f6
JM
3790}
3791
3792void
b1e29e33
AC
3793set_gdbarch_deprecated_call_dummy_length (struct gdbarch *gdbarch,
3794 int deprecated_call_dummy_length)
0f71a2f6 3795{
b1e29e33 3796 gdbarch->deprecated_call_dummy_length = deprecated_call_dummy_length;
0f71a2f6
JM
3797}
3798
3799int
ae45cd16
AC
3800gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch *gdbarch)
3801{
3802 gdb_assert (gdbarch != NULL);
3803 return gdbarch->deprecated_pc_in_call_dummy != generic_pc_in_call_dummy;
3804}
3805
3806int
3807gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address)
0f71a2f6 3808{
8de9bdc4 3809 gdb_assert (gdbarch != NULL);
ae45cd16 3810 if (gdbarch->deprecated_pc_in_call_dummy == 0)
8e65ff28 3811 internal_error (__FILE__, __LINE__,
ae45cd16
AC
3812 "gdbarch: gdbarch_deprecated_pc_in_call_dummy invalid");
3813 /* Ignore predicate (gdbarch->deprecated_pc_in_call_dummy != generic_pc_in_call_dummy). */
0f71a2f6 3814 if (gdbarch_debug >= 2)
ae45cd16
AC
3815 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pc_in_call_dummy called\n");
3816 return gdbarch->deprecated_pc_in_call_dummy (pc, sp, frame_address);
0f71a2f6
JM
3817}
3818
3819void
ae45cd16
AC
3820set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch,
3821 gdbarch_deprecated_pc_in_call_dummy_ftype deprecated_pc_in_call_dummy)
0f71a2f6 3822{
ae45cd16 3823 gdbarch->deprecated_pc_in_call_dummy = deprecated_pc_in_call_dummy;
0f71a2f6
JM
3824}
3825
0f71a2f6 3826LONGEST *
b1e29e33 3827gdbarch_deprecated_call_dummy_words (struct gdbarch *gdbarch)
0f71a2f6 3828{
8de9bdc4 3829 gdb_assert (gdbarch != NULL);
b1e29e33 3830 /* Skip verify of deprecated_call_dummy_words, invalid_p == 0 */
0f71a2f6 3831 if (gdbarch_debug >= 2)
b1e29e33
AC
3832 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_words called\n");
3833 return gdbarch->deprecated_call_dummy_words;
0f71a2f6
JM
3834}
3835
3836void
b1e29e33
AC
3837set_gdbarch_deprecated_call_dummy_words (struct gdbarch *gdbarch,
3838 LONGEST * deprecated_call_dummy_words)
0f71a2f6 3839{
b1e29e33 3840 gdbarch->deprecated_call_dummy_words = deprecated_call_dummy_words;
0f71a2f6
JM
3841}
3842
3843int
b1e29e33 3844gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch *gdbarch)
0f71a2f6 3845{
8de9bdc4 3846 gdb_assert (gdbarch != NULL);
b1e29e33 3847 /* Skip verify of deprecated_sizeof_call_dummy_words, invalid_p == 0 */
0f71a2f6 3848 if (gdbarch_debug >= 2)
b1e29e33
AC
3849 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_sizeof_call_dummy_words called\n");
3850 return gdbarch->deprecated_sizeof_call_dummy_words;
0f71a2f6
JM
3851}
3852
3853void
b1e29e33
AC
3854set_gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch *gdbarch,
3855 int deprecated_sizeof_call_dummy_words)
0f71a2f6 3856{
b1e29e33 3857 gdbarch->deprecated_sizeof_call_dummy_words = deprecated_sizeof_call_dummy_words;
0f71a2f6
JM
3858}
3859
3860int
1bf6d5cc 3861gdbarch_deprecated_call_dummy_stack_adjust_p (struct gdbarch *gdbarch)
0f71a2f6 3862{
8de9bdc4 3863 gdb_assert (gdbarch != NULL);
1bf6d5cc 3864 return gdbarch->deprecated_call_dummy_stack_adjust != 0;
0f71a2f6
JM
3865}
3866
3867int
1bf6d5cc 3868gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch *gdbarch)
0f71a2f6 3869{
8de9bdc4 3870 gdb_assert (gdbarch != NULL);
0f71a2f6 3871 if (gdbarch_debug >= 2)
1bf6d5cc
AC
3872 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_stack_adjust called\n");
3873 return gdbarch->deprecated_call_dummy_stack_adjust;
0f71a2f6
JM
3874}
3875
3876void
1bf6d5cc
AC
3877set_gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch *gdbarch,
3878 int deprecated_call_dummy_stack_adjust)
0f71a2f6 3879{
1bf6d5cc 3880 gdbarch->deprecated_call_dummy_stack_adjust = deprecated_call_dummy_stack_adjust;
0f71a2f6
JM
3881}
3882
e8ab51f7 3883int
b1e29e33 3884gdbarch_deprecated_fix_call_dummy_p (struct gdbarch *gdbarch)
e8ab51f7
AC
3885{
3886 gdb_assert (gdbarch != NULL);
b1e29e33 3887 return gdbarch->deprecated_fix_call_dummy != 0;
e8ab51f7
AC
3888}
3889
0f71a2f6 3890void
b1e29e33 3891gdbarch_deprecated_fix_call_dummy (struct gdbarch *gdbarch, char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p)
0f71a2f6 3892{
8de9bdc4 3893 gdb_assert (gdbarch != NULL);
b1e29e33 3894 if (gdbarch->deprecated_fix_call_dummy == 0)
8e65ff28 3895 internal_error (__FILE__, __LINE__,
b1e29e33 3896 "gdbarch: gdbarch_deprecated_fix_call_dummy invalid");
0f71a2f6 3897 if (gdbarch_debug >= 2)
b1e29e33
AC
3898 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fix_call_dummy called\n");
3899 gdbarch->deprecated_fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p);
0f71a2f6
JM
3900}
3901
3902void
b1e29e33
AC
3903set_gdbarch_deprecated_fix_call_dummy (struct gdbarch *gdbarch,
3904 gdbarch_deprecated_fix_call_dummy_ftype deprecated_fix_call_dummy)
0f71a2f6 3905{
b1e29e33 3906 gdbarch->deprecated_fix_call_dummy = deprecated_fix_call_dummy;
0f71a2f6
JM
3907}
3908
7043d8dc
AC
3909int
3910gdbarch_push_dummy_code_p (struct gdbarch *gdbarch)
3911{
3912 gdb_assert (gdbarch != NULL);
3913 return gdbarch->push_dummy_code != 0;
3914}
3915
3916CORE_ADDR
3917gdbarch_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)
3918{
3919 gdb_assert (gdbarch != NULL);
3920 if (gdbarch->push_dummy_code == 0)
3921 internal_error (__FILE__, __LINE__,
3922 "gdbarch: gdbarch_push_dummy_code invalid");
3923 if (gdbarch_debug >= 2)
3924 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n");
3925 return gdbarch->push_dummy_code (gdbarch, sp, funaddr, using_gcc, args, nargs, value_type, real_pc, bp_addr);
3926}
3927
3928void
3929set_gdbarch_push_dummy_code (struct gdbarch *gdbarch,
3930 gdbarch_push_dummy_code_ftype push_dummy_code)
3931{
3932 gdbarch->push_dummy_code = push_dummy_code;
3933}
3934
2ca6c561
AC
3935int
3936gdbarch_deprecated_init_frame_pc_first_p (struct gdbarch *gdbarch)
3937{
3938 gdb_assert (gdbarch != NULL);
3939 return gdbarch->deprecated_init_frame_pc_first != 0;
3940}
3941
97f46953 3942CORE_ADDR
2ca6c561 3943gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
10312cc4 3944{
8de9bdc4 3945 gdb_assert (gdbarch != NULL);
2ca6c561 3946 if (gdbarch->deprecated_init_frame_pc_first == 0)
10312cc4 3947 internal_error (__FILE__, __LINE__,
2ca6c561 3948 "gdbarch: gdbarch_deprecated_init_frame_pc_first invalid");
10312cc4 3949 if (gdbarch_debug >= 2)
2ca6c561 3950 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc_first called\n");
97f46953 3951 return gdbarch->deprecated_init_frame_pc_first (fromleaf, prev);
10312cc4
AC
3952}
3953
3954void
2ca6c561
AC
3955set_gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch,
3956 gdbarch_deprecated_init_frame_pc_first_ftype deprecated_init_frame_pc_first)
10312cc4 3957{
2ca6c561 3958 gdbarch->deprecated_init_frame_pc_first = deprecated_init_frame_pc_first;
10312cc4
AC
3959}
3960
a5afb99f
AC
3961int
3962gdbarch_deprecated_init_frame_pc_p (struct gdbarch *gdbarch)
3963{
3964 gdb_assert (gdbarch != NULL);
3965 return gdbarch->deprecated_init_frame_pc != 0;
3966}
3967
97f46953 3968CORE_ADDR
a5afb99f 3969gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
10312cc4 3970{
8de9bdc4 3971 gdb_assert (gdbarch != NULL);
a5afb99f 3972 if (gdbarch->deprecated_init_frame_pc == 0)
10312cc4 3973 internal_error (__FILE__, __LINE__,
a5afb99f 3974 "gdbarch: gdbarch_deprecated_init_frame_pc invalid");
10312cc4 3975 if (gdbarch_debug >= 2)
a5afb99f
AC
3976 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc called\n");
3977 return gdbarch->deprecated_init_frame_pc (fromleaf, prev);
10312cc4
AC
3978}
3979
3980void
a5afb99f
AC
3981set_gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch,
3982 gdbarch_deprecated_init_frame_pc_ftype deprecated_init_frame_pc)
10312cc4 3983{
a5afb99f 3984 gdbarch->deprecated_init_frame_pc = deprecated_init_frame_pc;
10312cc4
AC
3985}
3986
0f71a2f6 3987int
104c1213 3988gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
0f71a2f6 3989{
8de9bdc4 3990 gdb_assert (gdbarch != NULL);
0f71a2f6 3991 if (gdbarch_debug >= 2)
0f71a2f6
JM
3992 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
3993 return gdbarch->believe_pcc_promotion;
3994}
3995
3996void
104c1213
JM
3997set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
3998 int believe_pcc_promotion)
0f71a2f6
JM
3999{
4000 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
4001}
4002
4003int
104c1213 4004gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch)
0f71a2f6 4005{
8de9bdc4 4006 gdb_assert (gdbarch != NULL);
0f71a2f6 4007 if (gdbarch_debug >= 2)
0f71a2f6
JM
4008 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion_type called\n");
4009 return gdbarch->believe_pcc_promotion_type;
4010}
4011
4012void
104c1213
JM
4013set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch,
4014 int believe_pcc_promotion_type)
0f71a2f6
JM
4015{
4016 gdbarch->believe_pcc_promotion_type = believe_pcc_promotion_type;
4017}
4018
a216a322 4019int
129c1cd6 4020gdbarch_deprecated_get_saved_register_p (struct gdbarch *gdbarch)
a216a322
AC
4021{
4022 gdb_assert (gdbarch != NULL);
129c1cd6 4023 return gdbarch->deprecated_get_saved_register != 0;
a216a322
AC
4024}
4025
0f71a2f6 4026void
129c1cd6 4027gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch, char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval)
0f71a2f6 4028{
8de9bdc4 4029 gdb_assert (gdbarch != NULL);
129c1cd6 4030 if (gdbarch->deprecated_get_saved_register == 0)
8e65ff28 4031 internal_error (__FILE__, __LINE__,
129c1cd6 4032 "gdbarch: gdbarch_deprecated_get_saved_register invalid");
0f71a2f6 4033 if (gdbarch_debug >= 2)
129c1cd6
AC
4034 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_get_saved_register called\n");
4035 gdbarch->deprecated_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval);
0f71a2f6
JM
4036}
4037
4038void
129c1cd6
AC
4039set_gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch,
4040 gdbarch_deprecated_get_saved_register_ftype deprecated_get_saved_register)
0f71a2f6 4041{
129c1cd6 4042 gdbarch->deprecated_get_saved_register = deprecated_get_saved_register;
0f71a2f6
JM
4043}
4044
4045int
4046gdbarch_register_convertible (struct gdbarch *gdbarch, int nr)
4047{
8de9bdc4 4048 gdb_assert (gdbarch != NULL);
0f71a2f6 4049 if (gdbarch->register_convertible == 0)
8e65ff28
AC
4050 internal_error (__FILE__, __LINE__,
4051 "gdbarch: gdbarch_register_convertible invalid");
0f71a2f6 4052 if (gdbarch_debug >= 2)
0f71a2f6
JM
4053 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convertible called\n");
4054 return gdbarch->register_convertible (nr);
4055}
4056
4057void
104c1213
JM
4058set_gdbarch_register_convertible (struct gdbarch *gdbarch,
4059 gdbarch_register_convertible_ftype register_convertible)
0f71a2f6
JM
4060{
4061 gdbarch->register_convertible = register_convertible;
4062}
4063
4064void
4065gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
4066{
8de9bdc4 4067 gdb_assert (gdbarch != NULL);
0f71a2f6 4068 if (gdbarch->register_convert_to_virtual == 0)
8e65ff28
AC
4069 internal_error (__FILE__, __LINE__,
4070 "gdbarch: gdbarch_register_convert_to_virtual invalid");
0f71a2f6 4071 if (gdbarch_debug >= 2)
0f71a2f6
JM
4072 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_virtual called\n");
4073 gdbarch->register_convert_to_virtual (regnum, type, from, to);
4074}
4075
4076void
104c1213
JM
4077set_gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch,
4078 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual)
0f71a2f6
JM
4079{
4080 gdbarch->register_convert_to_virtual = register_convert_to_virtual;
4081}
4082
4083void
4084gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to)
4085{
8de9bdc4 4086 gdb_assert (gdbarch != NULL);
0f71a2f6 4087 if (gdbarch->register_convert_to_raw == 0)
8e65ff28
AC
4088 internal_error (__FILE__, __LINE__,
4089 "gdbarch: gdbarch_register_convert_to_raw invalid");
0f71a2f6 4090 if (gdbarch_debug >= 2)
0f71a2f6
JM
4091 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_raw called\n");
4092 gdbarch->register_convert_to_raw (type, regnum, from, to);
4093}
4094
4095void
104c1213
JM
4096set_gdbarch_register_convert_to_raw (struct gdbarch *gdbarch,
4097 gdbarch_register_convert_to_raw_ftype register_convert_to_raw)
0f71a2f6
JM
4098{
4099 gdbarch->register_convert_to_raw = register_convert_to_raw;
4100}
4101
13d01224
AC
4102int
4103gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum)
4104{
4105 gdb_assert (gdbarch != NULL);
4106 if (gdbarch->convert_register_p == 0)
4107 internal_error (__FILE__, __LINE__,
4108 "gdbarch: gdbarch_convert_register_p invalid");
4109 if (gdbarch_debug >= 2)
4110 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
4111 return gdbarch->convert_register_p (regnum);
4112}
4113
4114void
4115set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
4116 gdbarch_convert_register_p_ftype convert_register_p)
4117{
4118 gdbarch->convert_register_p = convert_register_p;
4119}
4120
4121void
4122gdbarch_register_to_value (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
4123{
4124 gdb_assert (gdbarch != NULL);
4125 if (gdbarch->register_to_value == 0)
4126 internal_error (__FILE__, __LINE__,
4127 "gdbarch: gdbarch_register_to_value invalid");
4128 if (gdbarch_debug >= 2)
4129 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
4130 gdbarch->register_to_value (regnum, type, from, to);
4131}
4132
4133void
4134set_gdbarch_register_to_value (struct gdbarch *gdbarch,
4135 gdbarch_register_to_value_ftype register_to_value)
4136{
4137 gdbarch->register_to_value = register_to_value;
4138}
4139
4140void
4141gdbarch_value_to_register (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to)
4142{
4143 gdb_assert (gdbarch != NULL);
4144 if (gdbarch->value_to_register == 0)
4145 internal_error (__FILE__, __LINE__,
4146 "gdbarch: gdbarch_value_to_register invalid");
4147 if (gdbarch_debug >= 2)
4148 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
4149 gdbarch->value_to_register (type, regnum, from, to);
4150}
4151
4152void
4153set_gdbarch_value_to_register (struct gdbarch *gdbarch,
4154 gdbarch_value_to_register_ftype value_to_register)
4155{
4156 gdbarch->value_to_register = value_to_register;
4157}
4158
4478b372 4159CORE_ADDR
66140c26 4160gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const void *buf)
4478b372 4161{
8de9bdc4 4162 gdb_assert (gdbarch != NULL);
4478b372 4163 if (gdbarch->pointer_to_address == 0)
8e65ff28
AC
4164 internal_error (__FILE__, __LINE__,
4165 "gdbarch: gdbarch_pointer_to_address invalid");
4478b372
JB
4166 if (gdbarch_debug >= 2)
4167 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
4168 return gdbarch->pointer_to_address (type, buf);
4169}
4170
4171void
4172set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
4173 gdbarch_pointer_to_address_ftype pointer_to_address)
4174{
4175 gdbarch->pointer_to_address = pointer_to_address;
4176}
4177
4178void
ac2e2ef7 4179gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr)
4478b372 4180{
8de9bdc4 4181 gdb_assert (gdbarch != NULL);
4478b372 4182 if (gdbarch->address_to_pointer == 0)
8e65ff28
AC
4183 internal_error (__FILE__, __LINE__,
4184 "gdbarch: gdbarch_address_to_pointer invalid");
4478b372
JB
4185 if (gdbarch_debug >= 2)
4186 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
4187 gdbarch->address_to_pointer (type, buf, addr);
4188}
4189
4190void
4191set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
4192 gdbarch_address_to_pointer_ftype address_to_pointer)
4193{
4194 gdbarch->address_to_pointer = address_to_pointer;
4195}
4196
fc0c74b1
AC
4197int
4198gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
4199{
8de9bdc4 4200 gdb_assert (gdbarch != NULL);
fc0c74b1
AC
4201 return gdbarch->integer_to_address != 0;
4202}
4203
4204CORE_ADDR
4205gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
4206{
8de9bdc4 4207 gdb_assert (gdbarch != NULL);
fc0c74b1
AC
4208 if (gdbarch->integer_to_address == 0)
4209 internal_error (__FILE__, __LINE__,
4210 "gdbarch: gdbarch_integer_to_address invalid");
4211 if (gdbarch_debug >= 2)
4212 fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
4213 return gdbarch->integer_to_address (type, buf);
4214}
4215
4216void
4217set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
4218 gdbarch_integer_to_address_ftype integer_to_address)
4219{
4220 gdbarch->integer_to_address = integer_to_address;
4221}
4222
71a9f22e
JB
4223int
4224gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type)
4225{
8de9bdc4 4226 gdb_assert (gdbarch != NULL);
71a9f22e 4227 if (gdbarch->return_value_on_stack == 0)
8e65ff28
AC
4228 internal_error (__FILE__, __LINE__,
4229 "gdbarch: gdbarch_return_value_on_stack invalid");
71a9f22e
JB
4230 if (gdbarch_debug >= 2)
4231 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value_on_stack called\n");
4232 return gdbarch->return_value_on_stack (type);
4233}
4234
4235void
4236set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch,
4237 gdbarch_return_value_on_stack_ftype return_value_on_stack)
4238{
4239 gdbarch->return_value_on_stack = return_value_on_stack;
4240}
4241
b81774d8
AC
4242int
4243gdbarch_deprecated_push_arguments_p (struct gdbarch *gdbarch)
4244{
4245 gdb_assert (gdbarch != NULL);
4246 return gdbarch->deprecated_push_arguments != 0;
4247}
4248
4249CORE_ADDR
4250gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
4251{
4252 gdb_assert (gdbarch != NULL);
4253 if (gdbarch->deprecated_push_arguments == 0)
4254 internal_error (__FILE__, __LINE__,
4255 "gdbarch: gdbarch_deprecated_push_arguments invalid");
4256 if (gdbarch_debug >= 2)
4257 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_arguments called\n");
4258 return gdbarch->deprecated_push_arguments (nargs, args, sp, struct_return, struct_addr);
4259}
4260
4261void
4262set_gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch,
4263 gdbarch_deprecated_push_arguments_ftype deprecated_push_arguments)
4264{
4265 gdbarch->deprecated_push_arguments = deprecated_push_arguments;
4266}
4267
4268int
4269gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
4270{
4271 gdb_assert (gdbarch != NULL);
4272 return gdbarch->push_dummy_call != 0;
4273}
4274
0f71a2f6 4275CORE_ADDR
b81774d8 4276gdbarch_push_dummy_call (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR dummy_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
0f71a2f6 4277{
8de9bdc4 4278 gdb_assert (gdbarch != NULL);
b81774d8 4279 if (gdbarch->push_dummy_call == 0)
8e65ff28 4280 internal_error (__FILE__, __LINE__,
b81774d8 4281 "gdbarch: gdbarch_push_dummy_call invalid");
0f71a2f6 4282 if (gdbarch_debug >= 2)
b81774d8
AC
4283 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
4284 return gdbarch->push_dummy_call (gdbarch, regcache, dummy_addr, nargs, args, sp, struct_return, struct_addr);
0f71a2f6
JM
4285}
4286
4287void
b81774d8
AC
4288set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
4289 gdbarch_push_dummy_call_ftype push_dummy_call)
0f71a2f6 4290{
b81774d8 4291 gdbarch->push_dummy_call = push_dummy_call;
0f71a2f6
JM
4292}
4293
f3824013
AC
4294int
4295gdbarch_deprecated_push_dummy_frame_p (struct gdbarch *gdbarch)
4296{
4297 gdb_assert (gdbarch != NULL);
4298 return gdbarch->deprecated_push_dummy_frame != 0;
4299}
4300
0f71a2f6 4301void
f3824013 4302gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch)
0f71a2f6 4303{
8de9bdc4 4304 gdb_assert (gdbarch != NULL);
f3824013 4305 if (gdbarch->deprecated_push_dummy_frame == 0)
8e65ff28 4306 internal_error (__FILE__, __LINE__,
f3824013 4307 "gdbarch: gdbarch_deprecated_push_dummy_frame invalid");
0f71a2f6 4308 if (gdbarch_debug >= 2)
f3824013
AC
4309 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_dummy_frame called\n");
4310 gdbarch->deprecated_push_dummy_frame ();
0f71a2f6
JM
4311}
4312
4313void
f3824013
AC
4314set_gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch,
4315 gdbarch_deprecated_push_dummy_frame_ftype deprecated_push_dummy_frame)
0f71a2f6 4316{
f3824013 4317 gdbarch->deprecated_push_dummy_frame = deprecated_push_dummy_frame;
0f71a2f6
JM
4318}
4319
69a0d5f4 4320int
28f617b3 4321gdbarch_deprecated_push_return_address_p (struct gdbarch *gdbarch)
69a0d5f4 4322{
8de9bdc4 4323 gdb_assert (gdbarch != NULL);
28f617b3 4324 return gdbarch->deprecated_push_return_address != 0;
69a0d5f4
AC
4325}
4326
0f71a2f6 4327CORE_ADDR
28f617b3 4328gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp)
0f71a2f6 4329{
8de9bdc4 4330 gdb_assert (gdbarch != NULL);
28f617b3 4331 if (gdbarch->deprecated_push_return_address == 0)
8e65ff28 4332 internal_error (__FILE__, __LINE__,
28f617b3 4333 "gdbarch: gdbarch_deprecated_push_return_address invalid");
0f71a2f6 4334 if (gdbarch_debug >= 2)
28f617b3
AC
4335 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_return_address called\n");
4336 return gdbarch->deprecated_push_return_address (pc, sp);
0f71a2f6
JM
4337}
4338
4339void
28f617b3
AC
4340set_gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch,
4341 gdbarch_deprecated_push_return_address_ftype deprecated_push_return_address)
0f71a2f6 4342{
28f617b3 4343 gdbarch->deprecated_push_return_address = deprecated_push_return_address;
0f71a2f6
JM
4344}
4345
dedc2a2b 4346int
749b82f6 4347gdbarch_deprecated_pop_frame_p (struct gdbarch *gdbarch)
dedc2a2b
AC
4348{
4349 gdb_assert (gdbarch != NULL);
749b82f6 4350 return gdbarch->deprecated_pop_frame != 0;
dedc2a2b
AC
4351}
4352
0f71a2f6 4353void
749b82f6 4354gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch)
0f71a2f6 4355{
8de9bdc4 4356 gdb_assert (gdbarch != NULL);
749b82f6 4357 if (gdbarch->deprecated_pop_frame == 0)
8e65ff28 4358 internal_error (__FILE__, __LINE__,
749b82f6 4359 "gdbarch: gdbarch_deprecated_pop_frame invalid");
0f71a2f6 4360 if (gdbarch_debug >= 2)
749b82f6
AC
4361 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pop_frame called\n");
4362 gdbarch->deprecated_pop_frame ();
0f71a2f6
JM
4363}
4364
4365void
749b82f6
AC
4366set_gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch,
4367 gdbarch_deprecated_pop_frame_ftype deprecated_pop_frame)
0f71a2f6 4368{
749b82f6 4369 gdbarch->deprecated_pop_frame = deprecated_pop_frame;
0f71a2f6
JM
4370}
4371
4183d812
AC
4372int
4373gdbarch_deprecated_store_struct_return_p (struct gdbarch *gdbarch)
4374{
4375 gdb_assert (gdbarch != NULL);
4376 return gdbarch->deprecated_store_struct_return != 0;
4377}
4378
0f71a2f6 4379void
4183d812 4380gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
0f71a2f6 4381{
8de9bdc4 4382 gdb_assert (gdbarch != NULL);
4183d812 4383 if (gdbarch->deprecated_store_struct_return == 0)
8e65ff28 4384 internal_error (__FILE__, __LINE__,
4183d812 4385 "gdbarch: gdbarch_deprecated_store_struct_return invalid");
0f71a2f6 4386 if (gdbarch_debug >= 2)
4183d812
AC
4387 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_struct_return called\n");
4388 gdbarch->deprecated_store_struct_return (addr, sp);
0f71a2f6
JM
4389}
4390
4391void
4183d812
AC
4392set_gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch,
4393 gdbarch_deprecated_store_struct_return_ftype deprecated_store_struct_return)
0f71a2f6 4394{
4183d812 4395 gdbarch->deprecated_store_struct_return = deprecated_store_struct_return;
0f71a2f6
JM
4396}
4397
4398void
ebba8386
AC
4399gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf)
4400{
4401 gdb_assert (gdbarch != NULL);
4402 if (gdbarch->extract_return_value == 0)
4403 internal_error (__FILE__, __LINE__,
4404 "gdbarch: gdbarch_extract_return_value invalid");
4405 if (gdbarch_debug >= 2)
4406 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
4407 gdbarch->extract_return_value (type, regcache, valbuf);
4408}
4409
4410void
4411set_gdbarch_extract_return_value (struct gdbarch *gdbarch,
4412 gdbarch_extract_return_value_ftype extract_return_value)
4413{
4414 gdbarch->extract_return_value = extract_return_value;
4415}
4416
4417void
4418gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const void *valbuf)
0f71a2f6 4419{
8de9bdc4 4420 gdb_assert (gdbarch != NULL);
0f71a2f6 4421 if (gdbarch->store_return_value == 0)
8e65ff28
AC
4422 internal_error (__FILE__, __LINE__,
4423 "gdbarch: gdbarch_store_return_value invalid");
0f71a2f6 4424 if (gdbarch_debug >= 2)
0f71a2f6 4425 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
ebba8386 4426 gdbarch->store_return_value (type, regcache, valbuf);
0f71a2f6
JM
4427}
4428
4429void
104c1213
JM
4430set_gdbarch_store_return_value (struct gdbarch *gdbarch,
4431 gdbarch_store_return_value_ftype store_return_value)
0f71a2f6
JM
4432{
4433 gdbarch->store_return_value = store_return_value;
4434}
4435
ebba8386
AC
4436void
4437gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
4438{
4439 gdb_assert (gdbarch != NULL);
4440 if (gdbarch->deprecated_extract_return_value == 0)
4441 internal_error (__FILE__, __LINE__,
4442 "gdbarch: gdbarch_deprecated_extract_return_value invalid");
4443 if (gdbarch_debug >= 2)
4444 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_return_value called\n");
4445 gdbarch->deprecated_extract_return_value (type, regbuf, valbuf);
4446}
4447
4448void
4449set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch,
4450 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value)
4451{
4452 gdbarch->deprecated_extract_return_value = deprecated_extract_return_value;
4453}
4454
4455void
4456gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf)
4457{
4458 gdb_assert (gdbarch != NULL);
4459 if (gdbarch->deprecated_store_return_value == 0)
4460 internal_error (__FILE__, __LINE__,
4461 "gdbarch: gdbarch_deprecated_store_return_value invalid");
4462 if (gdbarch_debug >= 2)
4463 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_return_value called\n");
4464 gdbarch->deprecated_store_return_value (type, valbuf);
4465}
4466
4467void
4468set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch,
4469 gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value)
4470{
4471 gdbarch->deprecated_store_return_value = deprecated_store_return_value;
4472}
4473
049ee0e4
AC
4474int
4475gdbarch_extract_struct_value_address_p (struct gdbarch *gdbarch)
4476{
4477 gdb_assert (gdbarch != NULL);
4478 return gdbarch->extract_struct_value_address != 0;
4479}
4480
4481CORE_ADDR
4482gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache)
4483{
4484 gdb_assert (gdbarch != NULL);
4485 if (gdbarch->extract_struct_value_address == 0)
4486 internal_error (__FILE__, __LINE__,
4487 "gdbarch: gdbarch_extract_struct_value_address invalid");
4488 if (gdbarch_debug >= 2)
4489 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_struct_value_address called\n");
4490 return gdbarch->extract_struct_value_address (regcache);
4491}
4492
4493void
4494set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch,
4495 gdbarch_extract_struct_value_address_ftype extract_struct_value_address)
4496{
4497 gdbarch->extract_struct_value_address = extract_struct_value_address;
4498}
4499
d6dd581e 4500int
26e9b323 4501gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch)
d6dd581e 4502{
8de9bdc4 4503 gdb_assert (gdbarch != NULL);
26e9b323 4504 return gdbarch->deprecated_extract_struct_value_address != 0;
d6dd581e
AC
4505}
4506
0f71a2f6 4507CORE_ADDR
26e9b323 4508gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf)
0f71a2f6 4509{
8de9bdc4 4510 gdb_assert (gdbarch != NULL);
26e9b323 4511 if (gdbarch->deprecated_extract_struct_value_address == 0)
8e65ff28 4512 internal_error (__FILE__, __LINE__,
26e9b323 4513 "gdbarch: gdbarch_deprecated_extract_struct_value_address invalid");
0f71a2f6 4514 if (gdbarch_debug >= 2)
26e9b323
AC
4515 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_struct_value_address called\n");
4516 return gdbarch->deprecated_extract_struct_value_address (regbuf);
0f71a2f6
JM
4517}
4518
4519void
26e9b323
AC
4520set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch,
4521 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address)
0f71a2f6 4522{
26e9b323 4523 gdbarch->deprecated_extract_struct_value_address = deprecated_extract_struct_value_address;
0f71a2f6
JM
4524}
4525
4526int
4527gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
4528{
8de9bdc4 4529 gdb_assert (gdbarch != NULL);
0f71a2f6 4530 if (gdbarch->use_struct_convention == 0)
8e65ff28
AC
4531 internal_error (__FILE__, __LINE__,
4532 "gdbarch: gdbarch_use_struct_convention invalid");
0f71a2f6 4533 if (gdbarch_debug >= 2)
0f71a2f6
JM
4534 fprintf_unfiltered (gdb_stdlog, "gdbarch_use_struct_convention called\n");
4535 return gdbarch->use_struct_convention (gcc_p, value_type);
4536}
4537
4538void
104c1213
JM
4539set_gdbarch_use_struct_convention (struct gdbarch *gdbarch,
4540 gdbarch_use_struct_convention_ftype use_struct_convention)
0f71a2f6
JM
4541{
4542 gdbarch->use_struct_convention = use_struct_convention;
4543}
4544
8f871025 4545int
f30ee0bc 4546gdbarch_deprecated_frame_init_saved_regs_p (struct gdbarch *gdbarch)
8f871025
AC
4547{
4548 gdb_assert (gdbarch != NULL);
f30ee0bc 4549 return gdbarch->deprecated_frame_init_saved_regs != 0;
8f871025
AC
4550}
4551
0f71a2f6 4552void
f30ee0bc 4553gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame)
0f71a2f6 4554{
8de9bdc4 4555 gdb_assert (gdbarch != NULL);
f30ee0bc 4556 if (gdbarch->deprecated_frame_init_saved_regs == 0)
8e65ff28 4557 internal_error (__FILE__, __LINE__,
f30ee0bc 4558 "gdbarch: gdbarch_deprecated_frame_init_saved_regs invalid");
0f71a2f6 4559 if (gdbarch_debug >= 2)
f30ee0bc
AC
4560 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_init_saved_regs called\n");
4561 gdbarch->deprecated_frame_init_saved_regs (frame);
0f71a2f6
JM
4562}
4563
4564void
f30ee0bc
AC
4565set_gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch,
4566 gdbarch_deprecated_frame_init_saved_regs_ftype deprecated_frame_init_saved_regs)
0f71a2f6 4567{
f30ee0bc 4568 gdbarch->deprecated_frame_init_saved_regs = deprecated_frame_init_saved_regs;
0f71a2f6
JM
4569}
4570
5fdff426 4571int
e9582e71 4572gdbarch_deprecated_init_extra_frame_info_p (struct gdbarch *gdbarch)
5fdff426 4573{
8de9bdc4 4574 gdb_assert (gdbarch != NULL);
e9582e71 4575 return gdbarch->deprecated_init_extra_frame_info != 0;
5fdff426
AC
4576}
4577
0f71a2f6 4578void
e9582e71 4579gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame)
0f71a2f6 4580{
8de9bdc4 4581 gdb_assert (gdbarch != NULL);
e9582e71 4582 if (gdbarch->deprecated_init_extra_frame_info == 0)
8e65ff28 4583 internal_error (__FILE__, __LINE__,
e9582e71 4584 "gdbarch: gdbarch_deprecated_init_extra_frame_info invalid");
0f71a2f6 4585 if (gdbarch_debug >= 2)
e9582e71
AC
4586 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_extra_frame_info called\n");
4587 gdbarch->deprecated_init_extra_frame_info (fromleaf, frame);
0f71a2f6
JM
4588}
4589
4590void
e9582e71
AC
4591set_gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch,
4592 gdbarch_deprecated_init_extra_frame_info_ftype deprecated_init_extra_frame_info)
0f71a2f6 4593{
e9582e71 4594 gdbarch->deprecated_init_extra_frame_info = deprecated_init_extra_frame_info;
0f71a2f6
JM
4595}
4596
4597CORE_ADDR
4598gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
4599{
8de9bdc4 4600 gdb_assert (gdbarch != NULL);
0f71a2f6 4601 if (gdbarch->skip_prologue == 0)
8e65ff28
AC
4602 internal_error (__FILE__, __LINE__,
4603 "gdbarch: gdbarch_skip_prologue invalid");
0f71a2f6 4604 if (gdbarch_debug >= 2)
0f71a2f6
JM
4605 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
4606 return gdbarch->skip_prologue (ip);
4607}
4608
4609void
104c1213
JM
4610set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
4611 gdbarch_skip_prologue_ftype skip_prologue)
0f71a2f6
JM
4612{
4613 gdbarch->skip_prologue = skip_prologue;
4614}
4615
dad41f9a
AC
4616int
4617gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, CORE_ADDR ip)
4618{
8de9bdc4 4619 gdb_assert (gdbarch != NULL);
dad41f9a 4620 if (gdbarch->prologue_frameless_p == 0)
8e65ff28
AC
4621 internal_error (__FILE__, __LINE__,
4622 "gdbarch: gdbarch_prologue_frameless_p invalid");
dad41f9a
AC
4623 if (gdbarch_debug >= 2)
4624 fprintf_unfiltered (gdb_stdlog, "gdbarch_prologue_frameless_p called\n");
4625 return gdbarch->prologue_frameless_p (ip);
4626}
4627
4628void
4629set_gdbarch_prologue_frameless_p (struct gdbarch *gdbarch,
4630 gdbarch_prologue_frameless_p_ftype prologue_frameless_p)
4631{
4632 gdbarch->prologue_frameless_p = prologue_frameless_p;
4633}
4634
0f71a2f6
JM
4635int
4636gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
4637{
8de9bdc4 4638 gdb_assert (gdbarch != NULL);
0f71a2f6 4639 if (gdbarch->inner_than == 0)
8e65ff28
AC
4640 internal_error (__FILE__, __LINE__,
4641 "gdbarch: gdbarch_inner_than invalid");
0f71a2f6 4642 if (gdbarch_debug >= 2)
0f71a2f6
JM
4643 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
4644 return gdbarch->inner_than (lhs, rhs);
4645}
4646
4647void
104c1213
JM
4648set_gdbarch_inner_than (struct gdbarch *gdbarch,
4649 gdbarch_inner_than_ftype inner_than)
0f71a2f6
JM
4650{
4651 gdbarch->inner_than = inner_than;
4652}
4653
f4f9705a 4654const unsigned char *
adf40b2e 4655gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
0f71a2f6 4656{
8de9bdc4 4657 gdb_assert (gdbarch != NULL);
0f71a2f6 4658 if (gdbarch->breakpoint_from_pc == 0)
8e65ff28
AC
4659 internal_error (__FILE__, __LINE__,
4660 "gdbarch: gdbarch_breakpoint_from_pc invalid");
0f71a2f6 4661 if (gdbarch_debug >= 2)
0f71a2f6
JM
4662 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
4663 return gdbarch->breakpoint_from_pc (pcptr, lenptr);
4664}
4665
4666void
104c1213
JM
4667set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
4668 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
0f71a2f6
JM
4669{
4670 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
4671}
4672
917317f4
JM
4673int
4674gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
4675{
8de9bdc4 4676 gdb_assert (gdbarch != NULL);
917317f4 4677 if (gdbarch->memory_insert_breakpoint == 0)
8e65ff28
AC
4678 internal_error (__FILE__, __LINE__,
4679 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
917317f4 4680 if (gdbarch_debug >= 2)
917317f4
JM
4681 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
4682 return gdbarch->memory_insert_breakpoint (addr, contents_cache);
4683}
4684
4685void
4686set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
4687 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
4688{
4689 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
4690}
4691
4692int
4693gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
4694{
8de9bdc4 4695 gdb_assert (gdbarch != NULL);
917317f4 4696 if (gdbarch->memory_remove_breakpoint == 0)
8e65ff28
AC
4697 internal_error (__FILE__, __LINE__,
4698 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
917317f4 4699 if (gdbarch_debug >= 2)
917317f4
JM
4700 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
4701 return gdbarch->memory_remove_breakpoint (addr, contents_cache);
4702}
4703
4704void
4705set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
4706 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
4707{
4708 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
4709}
4710
0f71a2f6 4711CORE_ADDR
104c1213 4712gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
0f71a2f6 4713{
8de9bdc4 4714 gdb_assert (gdbarch != NULL);
0f71a2f6 4715 if (gdbarch->decr_pc_after_break == -1)
8e65ff28
AC
4716 internal_error (__FILE__, __LINE__,
4717 "gdbarch: gdbarch_decr_pc_after_break invalid");
0f71a2f6 4718 if (gdbarch_debug >= 2)
0f71a2f6
JM
4719 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
4720 return gdbarch->decr_pc_after_break;
4721}
4722
4723void
104c1213
JM
4724set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
4725 CORE_ADDR decr_pc_after_break)
0f71a2f6
JM
4726{
4727 gdbarch->decr_pc_after_break = decr_pc_after_break;
4728}
4729
e02bc4cc
DS
4730int
4731gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, int select_it)
4732{
8de9bdc4 4733 gdb_assert (gdbarch != NULL);
e02bc4cc
DS
4734 if (gdbarch->prepare_to_proceed == 0)
4735 internal_error (__FILE__, __LINE__,
4736 "gdbarch: gdbarch_prepare_to_proceed invalid");
4737 if (gdbarch_debug >= 2)
4738 fprintf_unfiltered (gdb_stdlog, "gdbarch_prepare_to_proceed called\n");
4739 return gdbarch->prepare_to_proceed (select_it);
4740}
4741
4742void
4743set_gdbarch_prepare_to_proceed (struct gdbarch *gdbarch,
4744 gdbarch_prepare_to_proceed_ftype prepare_to_proceed)
4745{
4746 gdbarch->prepare_to_proceed = prepare_to_proceed;
4747}
4748
0f71a2f6 4749CORE_ADDR
104c1213 4750gdbarch_function_start_offset (struct gdbarch *gdbarch)
0f71a2f6 4751{
8de9bdc4 4752 gdb_assert (gdbarch != NULL);
0f71a2f6 4753 if (gdbarch->function_start_offset == -1)
8e65ff28
AC
4754 internal_error (__FILE__, __LINE__,
4755 "gdbarch: gdbarch_function_start_offset invalid");
0f71a2f6 4756 if (gdbarch_debug >= 2)
0f71a2f6
JM
4757 fprintf_unfiltered (gdb_stdlog, "gdbarch_function_start_offset called\n");
4758 return gdbarch->function_start_offset;
4759}
4760
4761void
104c1213
JM
4762set_gdbarch_function_start_offset (struct gdbarch *gdbarch,
4763 CORE_ADDR function_start_offset)
0f71a2f6
JM
4764{
4765 gdbarch->function_start_offset = function_start_offset;
4766}
4767
4768void
adf40b2e 4769gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len)
0f71a2f6 4770{
8de9bdc4 4771 gdb_assert (gdbarch != NULL);
0f71a2f6 4772 if (gdbarch->remote_translate_xfer_address == 0)
8e65ff28
AC
4773 internal_error (__FILE__, __LINE__,
4774 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
0f71a2f6 4775 if (gdbarch_debug >= 2)
0f71a2f6
JM
4776 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
4777 gdbarch->remote_translate_xfer_address (gdb_addr, gdb_len, rem_addr, rem_len);
4778}
4779
4780void
104c1213
JM
4781set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch,
4782 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address)
0f71a2f6
JM
4783{
4784 gdbarch->remote_translate_xfer_address = remote_translate_xfer_address;
4785}
4786
4787CORE_ADDR
104c1213 4788gdbarch_frame_args_skip (struct gdbarch *gdbarch)
0f71a2f6 4789{
8de9bdc4 4790 gdb_assert (gdbarch != NULL);
0f71a2f6 4791 if (gdbarch->frame_args_skip == -1)
8e65ff28
AC
4792 internal_error (__FILE__, __LINE__,
4793 "gdbarch: gdbarch_frame_args_skip invalid");
0f71a2f6 4794 if (gdbarch_debug >= 2)
0f71a2f6
JM
4795 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
4796 return gdbarch->frame_args_skip;
4797}
4798
4799void
104c1213
JM
4800set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
4801 CORE_ADDR frame_args_skip)
0f71a2f6
JM
4802{
4803 gdbarch->frame_args_skip = frame_args_skip;
4804}
4805
4806int
4807gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi)
4808{
8de9bdc4 4809 gdb_assert (gdbarch != NULL);
0f71a2f6 4810 if (gdbarch->frameless_function_invocation == 0)
8e65ff28
AC
4811 internal_error (__FILE__, __LINE__,
4812 "gdbarch: gdbarch_frameless_function_invocation invalid");
0f71a2f6 4813 if (gdbarch_debug >= 2)
0f71a2f6
JM
4814 fprintf_unfiltered (gdb_stdlog, "gdbarch_frameless_function_invocation called\n");
4815 return gdbarch->frameless_function_invocation (fi);
4816}
4817
4818void
104c1213
JM
4819set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch,
4820 gdbarch_frameless_function_invocation_ftype frameless_function_invocation)
0f71a2f6
JM
4821{
4822 gdbarch->frameless_function_invocation = frameless_function_invocation;
4823}
4824
d62d1979 4825int
618ce49f 4826gdbarch_deprecated_frame_chain_p (struct gdbarch *gdbarch)
d62d1979
AC
4827{
4828 gdb_assert (gdbarch != NULL);
618ce49f 4829 return gdbarch->deprecated_frame_chain != 0;
d62d1979
AC
4830}
4831
0f71a2f6 4832CORE_ADDR
618ce49f 4833gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame)
0f71a2f6 4834{
8de9bdc4 4835 gdb_assert (gdbarch != NULL);
618ce49f 4836 if (gdbarch->deprecated_frame_chain == 0)
8e65ff28 4837 internal_error (__FILE__, __LINE__,
618ce49f 4838 "gdbarch: gdbarch_deprecated_frame_chain invalid");
0f71a2f6 4839 if (gdbarch_debug >= 2)
618ce49f
AC
4840 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain called\n");
4841 return gdbarch->deprecated_frame_chain (frame);
0f71a2f6
JM
4842}
4843
4844void
618ce49f
AC
4845set_gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch,
4846 gdbarch_deprecated_frame_chain_ftype deprecated_frame_chain)
0f71a2f6 4847{
618ce49f 4848 gdbarch->deprecated_frame_chain = deprecated_frame_chain;
0f71a2f6
JM
4849}
4850
51603483 4851int
618ce49f 4852gdbarch_deprecated_frame_chain_valid_p (struct gdbarch *gdbarch)
51603483
DJ
4853{
4854 gdb_assert (gdbarch != NULL);
618ce49f 4855 return gdbarch->deprecated_frame_chain_valid != 0;
51603483
DJ
4856}
4857
0f71a2f6 4858int
618ce49f 4859gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe)
0f71a2f6 4860{
8de9bdc4 4861 gdb_assert (gdbarch != NULL);
618ce49f 4862 if (gdbarch->deprecated_frame_chain_valid == 0)
8e65ff28 4863 internal_error (__FILE__, __LINE__,
618ce49f 4864 "gdbarch: gdbarch_deprecated_frame_chain_valid invalid");
0f71a2f6 4865 if (gdbarch_debug >= 2)
618ce49f
AC
4866 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain_valid called\n");
4867 return gdbarch->deprecated_frame_chain_valid (chain, thisframe);
0f71a2f6
JM
4868}
4869
4870void
618ce49f
AC
4871set_gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch,
4872 gdbarch_deprecated_frame_chain_valid_ftype deprecated_frame_chain_valid)
0f71a2f6 4873{
618ce49f 4874 gdbarch->deprecated_frame_chain_valid = deprecated_frame_chain_valid;
0f71a2f6
JM
4875}
4876
d62d1979 4877int
8bedc050 4878gdbarch_deprecated_frame_saved_pc_p (struct gdbarch *gdbarch)
d62d1979
AC
4879{
4880 gdb_assert (gdbarch != NULL);
8bedc050 4881 return gdbarch->deprecated_frame_saved_pc != 0;
d62d1979
AC
4882}
4883
0f71a2f6 4884CORE_ADDR
8bedc050 4885gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi)
0f71a2f6 4886{
8de9bdc4 4887 gdb_assert (gdbarch != NULL);
8bedc050 4888 if (gdbarch->deprecated_frame_saved_pc == 0)
8e65ff28 4889 internal_error (__FILE__, __LINE__,
8bedc050 4890 "gdbarch: gdbarch_deprecated_frame_saved_pc invalid");
0f71a2f6 4891 if (gdbarch_debug >= 2)
8bedc050
AC
4892 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_saved_pc called\n");
4893 return gdbarch->deprecated_frame_saved_pc (fi);
0f71a2f6
JM
4894}
4895
4896void
8bedc050
AC
4897set_gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch,
4898 gdbarch_deprecated_frame_saved_pc_ftype deprecated_frame_saved_pc)
0f71a2f6 4899{
8bedc050 4900 gdbarch->deprecated_frame_saved_pc = deprecated_frame_saved_pc;
0f71a2f6
JM
4901}
4902
12cc2063
AC
4903int
4904gdbarch_unwind_pc_p (struct gdbarch *gdbarch)
4905{
4906 gdb_assert (gdbarch != NULL);
4907 return gdbarch->unwind_pc != 0;
4908}
4909
4910CORE_ADDR
4911gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
4912{
4913 gdb_assert (gdbarch != NULL);
4914 if (gdbarch->unwind_pc == 0)
4915 internal_error (__FILE__, __LINE__,
4916 "gdbarch: gdbarch_unwind_pc invalid");
4917 if (gdbarch_debug >= 2)
4918 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n");
4919 return gdbarch->unwind_pc (gdbarch, next_frame);
4920}
4921
4922void
4923set_gdbarch_unwind_pc (struct gdbarch *gdbarch,
4924 gdbarch_unwind_pc_ftype unwind_pc)
4925{
4926 gdbarch->unwind_pc = unwind_pc;
4927}
4928
0f71a2f6
JM
4929CORE_ADDR
4930gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
4931{
8de9bdc4 4932 gdb_assert (gdbarch != NULL);
0f71a2f6 4933 if (gdbarch->frame_args_address == 0)
8e65ff28
AC
4934 internal_error (__FILE__, __LINE__,
4935 "gdbarch: gdbarch_frame_args_address invalid");
0f71a2f6 4936 if (gdbarch_debug >= 2)
0f71a2f6
JM
4937 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_address called\n");
4938 return gdbarch->frame_args_address (fi);
4939}
4940
4941void
104c1213
JM
4942set_gdbarch_frame_args_address (struct gdbarch *gdbarch,
4943 gdbarch_frame_args_address_ftype frame_args_address)
0f71a2f6
JM
4944{
4945 gdbarch->frame_args_address = frame_args_address;
4946}
4947
4948CORE_ADDR
4949gdbarch_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
4950{
8de9bdc4 4951 gdb_assert (gdbarch != NULL);
0f71a2f6 4952 if (gdbarch->frame_locals_address == 0)
8e65ff28
AC
4953 internal_error (__FILE__, __LINE__,
4954 "gdbarch: gdbarch_frame_locals_address invalid");
0f71a2f6 4955 if (gdbarch_debug >= 2)
0f71a2f6
JM
4956 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_locals_address called\n");
4957 return gdbarch->frame_locals_address (fi);
4958}
4959
4960void
104c1213
JM
4961set_gdbarch_frame_locals_address (struct gdbarch *gdbarch,
4962 gdbarch_frame_locals_address_ftype frame_locals_address)
0f71a2f6
JM
4963{
4964 gdbarch->frame_locals_address = frame_locals_address;
4965}
4966
4443bd83 4967int
6913c89a 4968gdbarch_deprecated_saved_pc_after_call_p (struct gdbarch *gdbarch)
4443bd83
AC
4969{
4970 gdb_assert (gdbarch != NULL);
6913c89a 4971 return gdbarch->deprecated_saved_pc_after_call != 0;
4443bd83
AC
4972}
4973
0f71a2f6 4974CORE_ADDR
6913c89a 4975gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame)
0f71a2f6 4976{
8de9bdc4 4977 gdb_assert (gdbarch != NULL);
6913c89a 4978 if (gdbarch->deprecated_saved_pc_after_call == 0)
8e65ff28 4979 internal_error (__FILE__, __LINE__,
6913c89a 4980 "gdbarch: gdbarch_deprecated_saved_pc_after_call invalid");
0f71a2f6 4981 if (gdbarch_debug >= 2)
6913c89a
AC
4982 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_saved_pc_after_call called\n");
4983 return gdbarch->deprecated_saved_pc_after_call (frame);
0f71a2f6
JM
4984}
4985
4986void
6913c89a
AC
4987set_gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch,
4988 gdbarch_deprecated_saved_pc_after_call_ftype deprecated_saved_pc_after_call)
0f71a2f6 4989{
6913c89a 4990 gdbarch->deprecated_saved_pc_after_call = deprecated_saved_pc_after_call;
0f71a2f6
JM
4991}
4992
4993int
4994gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
4995{
8de9bdc4 4996 gdb_assert (gdbarch != NULL);
0f71a2f6 4997 if (gdbarch->frame_num_args == 0)
8e65ff28
AC
4998 internal_error (__FILE__, __LINE__,
4999 "gdbarch: gdbarch_frame_num_args invalid");
0f71a2f6 5000 if (gdbarch_debug >= 2)
0f71a2f6
JM
5001 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
5002 return gdbarch->frame_num_args (frame);
5003}
5004
5005void
104c1213
JM
5006set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
5007 gdbarch_frame_num_args_ftype frame_num_args)
0f71a2f6
JM
5008{
5009 gdbarch->frame_num_args = frame_num_args;
5010}
5011
2ada493a
AC
5012int
5013gdbarch_stack_align_p (struct gdbarch *gdbarch)
5014{
8de9bdc4 5015 gdb_assert (gdbarch != NULL);
2ada493a
AC
5016 return gdbarch->stack_align != 0;
5017}
5018
5019CORE_ADDR
5020gdbarch_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp)
5021{
8de9bdc4 5022 gdb_assert (gdbarch != NULL);
2ada493a 5023 if (gdbarch->stack_align == 0)
8e65ff28
AC
5024 internal_error (__FILE__, __LINE__,
5025 "gdbarch: gdbarch_stack_align invalid");
2ada493a
AC
5026 if (gdbarch_debug >= 2)
5027 fprintf_unfiltered (gdb_stdlog, "gdbarch_stack_align called\n");
5028 return gdbarch->stack_align (sp);
5029}
5030
5031void
5032set_gdbarch_stack_align (struct gdbarch *gdbarch,
5033 gdbarch_stack_align_ftype stack_align)
5034{
5035 gdbarch->stack_align = stack_align;
5036}
5037
dc604539
AC
5038int
5039gdbarch_frame_align_p (struct gdbarch *gdbarch)
5040{
5041 gdb_assert (gdbarch != NULL);
5042 return gdbarch->frame_align != 0;
5043}
5044
5045CORE_ADDR
5046gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
5047{
5048 gdb_assert (gdbarch != NULL);
5049 if (gdbarch->frame_align == 0)
5050 internal_error (__FILE__, __LINE__,
5051 "gdbarch: gdbarch_frame_align invalid");
5052 if (gdbarch_debug >= 2)
5053 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
5054 return gdbarch->frame_align (gdbarch, address);
5055}
5056
5057void
5058set_gdbarch_frame_align (struct gdbarch *gdbarch,
5059 gdbarch_frame_align_ftype frame_align)
5060{
5061 gdbarch->frame_align = frame_align;
5062}
5063
1dd4193b 5064int
f933a9c5 5065gdbarch_deprecated_extra_stack_alignment_needed (struct gdbarch *gdbarch)
1dd4193b 5066{
8de9bdc4 5067 gdb_assert (gdbarch != NULL);
f933a9c5 5068 /* Skip verify of deprecated_extra_stack_alignment_needed, invalid_p == 0 */
1dd4193b 5069 if (gdbarch_debug >= 2)
f933a9c5
AC
5070 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extra_stack_alignment_needed called\n");
5071 return gdbarch->deprecated_extra_stack_alignment_needed;
1dd4193b
AC
5072}
5073
5074void
f933a9c5
AC
5075set_gdbarch_deprecated_extra_stack_alignment_needed (struct gdbarch *gdbarch,
5076 int deprecated_extra_stack_alignment_needed)
1dd4193b 5077{
f933a9c5 5078 gdbarch->deprecated_extra_stack_alignment_needed = deprecated_extra_stack_alignment_needed;
1dd4193b
AC
5079}
5080
d03e67c9
AC
5081int
5082gdbarch_reg_struct_has_addr_p (struct gdbarch *gdbarch)
5083{
8de9bdc4 5084 gdb_assert (gdbarch != NULL);
d03e67c9
AC
5085 return gdbarch->reg_struct_has_addr != 0;
5086}
5087
5088int
5089gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type)
5090{
8de9bdc4 5091 gdb_assert (gdbarch != NULL);
d03e67c9 5092 if (gdbarch->reg_struct_has_addr == 0)
8e65ff28
AC
5093 internal_error (__FILE__, __LINE__,
5094 "gdbarch: gdbarch_reg_struct_has_addr invalid");
d03e67c9
AC
5095 if (gdbarch_debug >= 2)
5096 fprintf_unfiltered (gdb_stdlog, "gdbarch_reg_struct_has_addr called\n");
5097 return gdbarch->reg_struct_has_addr (gcc_p, type);
5098}
5099
5100void
5101set_gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch,
5102 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr)
5103{
5104 gdbarch->reg_struct_has_addr = reg_struct_has_addr;
5105}
5106
d1e3cf49
AC
5107int
5108gdbarch_save_dummy_frame_tos_p (struct gdbarch *gdbarch)
5109{
8de9bdc4 5110 gdb_assert (gdbarch != NULL);
d1e3cf49
AC
5111 return gdbarch->save_dummy_frame_tos != 0;
5112}
5113
5114void
5115gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp)
5116{
8de9bdc4 5117 gdb_assert (gdbarch != NULL);
d1e3cf49 5118 if (gdbarch->save_dummy_frame_tos == 0)
8e65ff28
AC
5119 internal_error (__FILE__, __LINE__,
5120 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
d1e3cf49
AC
5121 if (gdbarch_debug >= 2)
5122 fprintf_unfiltered (gdb_stdlog, "gdbarch_save_dummy_frame_tos called\n");
5123 gdbarch->save_dummy_frame_tos (sp);
5124}
5125
5126void
5127set_gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch,
5128 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos)
5129{
5130 gdbarch->save_dummy_frame_tos = save_dummy_frame_tos;
5131}
5132
6314f104
AC
5133int
5134gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch)
5135{
5136 gdb_assert (gdbarch != NULL);
5137 return gdbarch->unwind_dummy_id != 0;
5138}
5139
5140struct frame_id
5141gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *info)
5142{
5143 gdb_assert (gdbarch != NULL);
5144 if (gdbarch->unwind_dummy_id == 0)
5145 internal_error (__FILE__, __LINE__,
5146 "gdbarch: gdbarch_unwind_dummy_id invalid");
5147 if (gdbarch_debug >= 2)
5148 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_dummy_id called\n");
5149 return gdbarch->unwind_dummy_id (gdbarch, info);
5150}
5151
5152void
5153set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch,
5154 gdbarch_unwind_dummy_id_ftype unwind_dummy_id)
5155{
5156 gdbarch->unwind_dummy_id = unwind_dummy_id;
5157}
5158
58d5518e
ND
5159int
5160gdbarch_parm_boundary (struct gdbarch *gdbarch)
5161{
8de9bdc4 5162 gdb_assert (gdbarch != NULL);
58d5518e
ND
5163 if (gdbarch_debug >= 2)
5164 fprintf_unfiltered (gdb_stdlog, "gdbarch_parm_boundary called\n");
5165 return gdbarch->parm_boundary;
5166}
5167
5168void
5169set_gdbarch_parm_boundary (struct gdbarch *gdbarch,
5170 int parm_boundary)
5171{
5172 gdbarch->parm_boundary = parm_boundary;
5173}
5174
f0d4cc9e
AC
5175const struct floatformat *
5176gdbarch_float_format (struct gdbarch *gdbarch)
5177{
8de9bdc4 5178 gdb_assert (gdbarch != NULL);
f0d4cc9e
AC
5179 if (gdbarch_debug >= 2)
5180 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
5181 return gdbarch->float_format;
5182}
5183
5184void
5185set_gdbarch_float_format (struct gdbarch *gdbarch,
5186 const struct floatformat * float_format)
5187{
5188 gdbarch->float_format = float_format;
5189}
5190
5191const struct floatformat *
5192gdbarch_double_format (struct gdbarch *gdbarch)
5193{
8de9bdc4 5194 gdb_assert (gdbarch != NULL);
f0d4cc9e
AC
5195 if (gdbarch_debug >= 2)
5196 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
5197 return gdbarch->double_format;
5198}
5199
5200void
5201set_gdbarch_double_format (struct gdbarch *gdbarch,
5202 const struct floatformat * double_format)
5203{
5204 gdbarch->double_format = double_format;
5205}
5206
5207const struct floatformat *
5208gdbarch_long_double_format (struct gdbarch *gdbarch)
5209{
8de9bdc4 5210 gdb_assert (gdbarch != NULL);
f0d4cc9e
AC
5211 if (gdbarch_debug >= 2)
5212 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
5213 return gdbarch->long_double_format;
5214}
5215
5216void
5217set_gdbarch_long_double_format (struct gdbarch *gdbarch,
5218 const struct floatformat * long_double_format)
5219{
5220 gdbarch->long_double_format = long_double_format;
5221}
5222
f517ea4e
PS
5223CORE_ADDR
5224gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr)
5225{
8de9bdc4 5226 gdb_assert (gdbarch != NULL);
f517ea4e 5227 if (gdbarch->convert_from_func_ptr_addr == 0)
8e65ff28
AC
5228 internal_error (__FILE__, __LINE__,
5229 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
f517ea4e
PS
5230 if (gdbarch_debug >= 2)
5231 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
5232 return gdbarch->convert_from_func_ptr_addr (addr);
5233}
5234
5235void
5236set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
5237 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
5238{
5239 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
5240}
5241
875e1767
AC
5242CORE_ADDR
5243gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
5244{
8de9bdc4 5245 gdb_assert (gdbarch != NULL);
875e1767
AC
5246 if (gdbarch->addr_bits_remove == 0)
5247 internal_error (__FILE__, __LINE__,
5248 "gdbarch: gdbarch_addr_bits_remove invalid");
5249 if (gdbarch_debug >= 2)
5250 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
5251 return gdbarch->addr_bits_remove (addr);
5252}
5253
5254void
5255set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
5256 gdbarch_addr_bits_remove_ftype addr_bits_remove)
5257{
5258 gdbarch->addr_bits_remove = addr_bits_remove;
5259}
5260
181c1381
RE
5261CORE_ADDR
5262gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr)
5263{
8de9bdc4 5264 gdb_assert (gdbarch != NULL);
181c1381
RE
5265 if (gdbarch->smash_text_address == 0)
5266 internal_error (__FILE__, __LINE__,
5267 "gdbarch: gdbarch_smash_text_address invalid");
5268 if (gdbarch_debug >= 2)
5269 fprintf_unfiltered (gdb_stdlog, "gdbarch_smash_text_address called\n");
5270 return gdbarch->smash_text_address (addr);
5271}
5272
5273void
5274set_gdbarch_smash_text_address (struct gdbarch *gdbarch,
5275 gdbarch_smash_text_address_ftype smash_text_address)
5276{
5277 gdbarch->smash_text_address = smash_text_address;
5278}
5279
64c4637f
AC
5280int
5281gdbarch_software_single_step_p (struct gdbarch *gdbarch)
5282{
8de9bdc4 5283 gdb_assert (gdbarch != NULL);
64c4637f
AC
5284 return gdbarch->software_single_step != 0;
5285}
5286
5287void
5288gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p)
5289{
8de9bdc4 5290 gdb_assert (gdbarch != NULL);
64c4637f
AC
5291 if (gdbarch->software_single_step == 0)
5292 internal_error (__FILE__, __LINE__,
5293 "gdbarch: gdbarch_software_single_step invalid");
5294 if (gdbarch_debug >= 2)
5295 fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
5296 gdbarch->software_single_step (sig, insert_breakpoints_p);
5297}
5298
5299void
5300set_gdbarch_software_single_step (struct gdbarch *gdbarch,
5301 gdbarch_software_single_step_ftype software_single_step)
5302{
5303 gdbarch->software_single_step = software_single_step;
5304}
5305
2bf0cb65
EZ
5306int
5307gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, disassemble_info *info)
5308{
8de9bdc4 5309 gdb_assert (gdbarch != NULL);
2bf0cb65
EZ
5310 if (gdbarch->print_insn == 0)
5311 internal_error (__FILE__, __LINE__,
5312 "gdbarch: gdbarch_print_insn invalid");
5313 if (gdbarch_debug >= 2)
5314 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
5315 return gdbarch->print_insn (vma, info);
5316}
5317
5318void
5319set_gdbarch_print_insn (struct gdbarch *gdbarch,
5320 gdbarch_print_insn_ftype print_insn)
5321{
5322 gdbarch->print_insn = print_insn;
5323}
5324
bdcd319a
CV
5325CORE_ADDR
5326gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc)
5327{
8de9bdc4 5328 gdb_assert (gdbarch != NULL);
bdcd319a
CV
5329 if (gdbarch->skip_trampoline_code == 0)
5330 internal_error (__FILE__, __LINE__,
5331 "gdbarch: gdbarch_skip_trampoline_code invalid");
5332 if (gdbarch_debug >= 2)
5333 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
5334 return gdbarch->skip_trampoline_code (pc);
5335}
5336
5337void
5338set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
5339 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
5340{
5341 gdbarch->skip_trampoline_code = skip_trampoline_code;
5342}
5343
68e9cc94
CV
5344int
5345gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
5346{
8de9bdc4 5347 gdb_assert (gdbarch != NULL);
68e9cc94
CV
5348 if (gdbarch->in_solib_call_trampoline == 0)
5349 internal_error (__FILE__, __LINE__,
5350 "gdbarch: gdbarch_in_solib_call_trampoline invalid");
5351 if (gdbarch_debug >= 2)
5352 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_call_trampoline called\n");
5353 return gdbarch->in_solib_call_trampoline (pc, name);
5354}
5355
5356void
5357set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch,
5358 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline)
5359{
5360 gdbarch->in_solib_call_trampoline = in_solib_call_trampoline;
5361}
5362
d50355b6
MS
5363int
5364gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
5365{
5366 gdb_assert (gdbarch != NULL);
5367 if (gdbarch->in_solib_return_trampoline == 0)
5368 internal_error (__FILE__, __LINE__,
5369 "gdbarch: gdbarch_in_solib_return_trampoline invalid");
5370 if (gdbarch_debug >= 2)
5371 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
5372 return gdbarch->in_solib_return_trampoline (pc, name);
5373}
5374
5375void
5376set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
5377 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
5378{
5379 gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
5380}
5381
d7bd68ca
AC
5382int
5383gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
5384{
8de9bdc4 5385 gdb_assert (gdbarch != NULL);
d7bd68ca
AC
5386 if (gdbarch->pc_in_sigtramp == 0)
5387 internal_error (__FILE__, __LINE__,
5388 "gdbarch: gdbarch_pc_in_sigtramp invalid");
5389 if (gdbarch_debug >= 2)
5390 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_in_sigtramp called\n");
5391 return gdbarch->pc_in_sigtramp (pc, name);
5392}
5393
5394void
5395set_gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch,
5396 gdbarch_pc_in_sigtramp_ftype pc_in_sigtramp)
5397{
5398 gdbarch->pc_in_sigtramp = pc_in_sigtramp;
5399}
5400
43156d82
MK
5401int
5402gdbarch_sigtramp_start_p (struct gdbarch *gdbarch)
5403{
5404 gdb_assert (gdbarch != NULL);
5405 return gdbarch->sigtramp_start != 0;
5406}
5407
5408CORE_ADDR
5409gdbarch_sigtramp_start (struct gdbarch *gdbarch, CORE_ADDR pc)
5410{
5411 gdb_assert (gdbarch != NULL);
5412 if (gdbarch->sigtramp_start == 0)
5413 internal_error (__FILE__, __LINE__,
5414 "gdbarch: gdbarch_sigtramp_start invalid");
5415 if (gdbarch_debug >= 2)
5416 fprintf_unfiltered (gdb_stdlog, "gdbarch_sigtramp_start called\n");
5417 return gdbarch->sigtramp_start (pc);
5418}
5419
5420void
5421set_gdbarch_sigtramp_start (struct gdbarch *gdbarch,
5422 gdbarch_sigtramp_start_ftype sigtramp_start)
5423{
5424 gdbarch->sigtramp_start = sigtramp_start;
5425}
5426
e76cff22
AC
5427int
5428gdbarch_sigtramp_end_p (struct gdbarch *gdbarch)
5429{
5430 gdb_assert (gdbarch != NULL);
5431 return gdbarch->sigtramp_end != 0;
5432}
5433
43156d82
MK
5434CORE_ADDR
5435gdbarch_sigtramp_end (struct gdbarch *gdbarch, CORE_ADDR pc)
5436{
5437 gdb_assert (gdbarch != NULL);
5438 if (gdbarch->sigtramp_end == 0)
5439 internal_error (__FILE__, __LINE__,
5440 "gdbarch: gdbarch_sigtramp_end invalid");
5441 if (gdbarch_debug >= 2)
5442 fprintf_unfiltered (gdb_stdlog, "gdbarch_sigtramp_end called\n");
5443 return gdbarch->sigtramp_end (pc);
5444}
5445
5446void
5447set_gdbarch_sigtramp_end (struct gdbarch *gdbarch,
5448 gdbarch_sigtramp_end_ftype sigtramp_end)
5449{
5450 gdbarch->sigtramp_end = sigtramp_end;
5451}
5452
c12260ac
CV
5453int
5454gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
5455{
8de9bdc4 5456 gdb_assert (gdbarch != NULL);
c12260ac
CV
5457 if (gdbarch->in_function_epilogue_p == 0)
5458 internal_error (__FILE__, __LINE__,
5459 "gdbarch: gdbarch_in_function_epilogue_p invalid");
5460 if (gdbarch_debug >= 2)
5461 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n");
5462 return gdbarch->in_function_epilogue_p (gdbarch, addr);
5463}
5464
5465void
5466set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch,
5467 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p)
5468{
5469 gdbarch->in_function_epilogue_p = in_function_epilogue_p;
5470}
5471
552c04a7
TT
5472char *
5473gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv)
5474{
8de9bdc4 5475 gdb_assert (gdbarch != NULL);
552c04a7
TT
5476 if (gdbarch->construct_inferior_arguments == 0)
5477 internal_error (__FILE__, __LINE__,
5478 "gdbarch: gdbarch_construct_inferior_arguments invalid");
5479 if (gdbarch_debug >= 2)
5480 fprintf_unfiltered (gdb_stdlog, "gdbarch_construct_inferior_arguments called\n");
5481 return gdbarch->construct_inferior_arguments (gdbarch, argc, argv);
5482}
5483
5484void
5485set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch,
5486 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments)
5487{
5488 gdbarch->construct_inferior_arguments = construct_inferior_arguments;
5489}
5490
b6af0555
JS
5491int
5492gdbarch_dwarf2_build_frame_info_p (struct gdbarch *gdbarch)
5493{
8de9bdc4 5494 gdb_assert (gdbarch != NULL);
b6af0555
JS
5495 return gdbarch->dwarf2_build_frame_info != 0;
5496}
5497
5498void
5499gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch, struct objfile *objfile)
5500{
8de9bdc4 5501 gdb_assert (gdbarch != NULL);
b6af0555
JS
5502 if (gdbarch->dwarf2_build_frame_info == 0)
5503 internal_error (__FILE__, __LINE__,
5504 "gdbarch: gdbarch_dwarf2_build_frame_info invalid");
5505 if (gdbarch_debug >= 2)
5506 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_build_frame_info called\n");
5507 gdbarch->dwarf2_build_frame_info (objfile);
5508}
5509
5510void
5511set_gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch,
5512 gdbarch_dwarf2_build_frame_info_ftype dwarf2_build_frame_info)
5513{
5514 gdbarch->dwarf2_build_frame_info = dwarf2_build_frame_info;
5515}
5516
a2cf933a
EZ
5517void
5518gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
5519{
8de9bdc4 5520 gdb_assert (gdbarch != NULL);
a2cf933a
EZ
5521 if (gdbarch->elf_make_msymbol_special == 0)
5522 internal_error (__FILE__, __LINE__,
5523 "gdbarch: gdbarch_elf_make_msymbol_special invalid");
5524 if (gdbarch_debug >= 2)
5525 fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
5526 gdbarch->elf_make_msymbol_special (sym, msym);
5527}
5528
5529void
5530set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
5531 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
5532{
5533 gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
5534}
5535
5536void
5537gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
5538{
8de9bdc4 5539 gdb_assert (gdbarch != NULL);
a2cf933a
EZ
5540 if (gdbarch->coff_make_msymbol_special == 0)
5541 internal_error (__FILE__, __LINE__,
5542 "gdbarch: gdbarch_coff_make_msymbol_special invalid");
5543 if (gdbarch_debug >= 2)
5544 fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
5545 gdbarch->coff_make_msymbol_special (val, msym);
5546}
5547
5548void
5549set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
5550 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
5551{
5552 gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
5553}
5554
5720643c
JB
5555const char *
5556gdbarch_name_of_malloc (struct gdbarch *gdbarch)
5557{
5558 gdb_assert (gdbarch != NULL);
5559 /* Skip verify of name_of_malloc, invalid_p == 0 */
5560 if (gdbarch_debug >= 2)
5561 fprintf_unfiltered (gdb_stdlog, "gdbarch_name_of_malloc called\n");
5562 return gdbarch->name_of_malloc;
5563}
5564
5565void
5566set_gdbarch_name_of_malloc (struct gdbarch *gdbarch,
5567 const char * name_of_malloc)
5568{
5569 gdbarch->name_of_malloc = name_of_malloc;
5570}
5571
c4ed33b9
AC
5572int
5573gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
5574{
5575 gdb_assert (gdbarch != NULL);
5576 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
5577 if (gdbarch_debug >= 2)
5578 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
5579 return gdbarch->cannot_step_breakpoint;
5580}
5581
5582void
5583set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
5584 int cannot_step_breakpoint)
5585{
5586 gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
5587}
5588
f74fa174
MM
5589int
5590gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
5591{
5592 gdb_assert (gdbarch != NULL);
5593 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
5594 if (gdbarch_debug >= 2)
5595 fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
5596 return gdbarch->have_nonsteppable_watchpoint;
5597}
5598
5599void
5600set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
967c0d83 5601 int have_nonsteppable_watchpoint)
f74fa174
MM
5602{
5603 gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
5604}
5605
8b2dbe47
KB
5606int
5607gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
5608{
5609 gdb_assert (gdbarch != NULL);
5610 return gdbarch->address_class_type_flags != 0;
5611}
5612
5613int
5614gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
5615{
5616 gdb_assert (gdbarch != NULL);
5617 if (gdbarch->address_class_type_flags == 0)
5618 internal_error (__FILE__, __LINE__,
5619 "gdbarch: gdbarch_address_class_type_flags invalid");
5620 if (gdbarch_debug >= 2)
5621 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
5622 return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
5623}
5624
5625void
5626set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
5627 gdbarch_address_class_type_flags_ftype address_class_type_flags)
5628{
5629 gdbarch->address_class_type_flags = address_class_type_flags;
5630}
5631
5632int
5633gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
5634{
5635 gdb_assert (gdbarch != NULL);
5636 return gdbarch->address_class_type_flags_to_name != 0;
5637}
5638
321432c0 5639const char *
8b2dbe47
KB
5640gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
5641{
5642 gdb_assert (gdbarch != NULL);
5643 if (gdbarch->address_class_type_flags_to_name == 0)
5644 internal_error (__FILE__, __LINE__,
5645 "gdbarch: gdbarch_address_class_type_flags_to_name invalid");
5646 if (gdbarch_debug >= 2)
5647 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
5f11f355 5648 return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
8b2dbe47
KB
5649}
5650
5651void
5652set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
5653 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
5654{
5655 gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
5656}
5657
5658int
5659gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
5660{
5661 gdb_assert (gdbarch != NULL);
5662 return gdbarch->address_class_name_to_type_flags != 0;
5663}
5664
5665int
321432c0 5666gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
8b2dbe47
KB
5667{
5668 gdb_assert (gdbarch != NULL);
5669 if (gdbarch->address_class_name_to_type_flags == 0)
5670 internal_error (__FILE__, __LINE__,
5671 "gdbarch: gdbarch_address_class_name_to_type_flags invalid");
5672 if (gdbarch_debug >= 2)
5673 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
5f11f355 5674 return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
8b2dbe47
KB
5675}
5676
5677void
5678set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
5679 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
5680{
5681 gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
5682}
5683
b59ff9d5
AC
5684int
5685gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
5686{
5687 gdb_assert (gdbarch != NULL);
5688 if (gdbarch->register_reggroup_p == 0)
5689 internal_error (__FILE__, __LINE__,
5690 "gdbarch: gdbarch_register_reggroup_p invalid");
5691 if (gdbarch_debug >= 2)
5692 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
5693 return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
5694}
5695
5696void
5697set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
5698 gdbarch_register_reggroup_p_ftype register_reggroup_p)
5699{
5700 gdbarch->register_reggroup_p = register_reggroup_p;
5701}
5702
0f71a2f6 5703
be5a57e1 5704/* Keep a registry of per-architecture data-pointers required by GDB
0f71a2f6
JM
5705 modules. */
5706
5707struct gdbarch_data
5708{
95160752 5709 unsigned index;
76860b5f 5710 int init_p;
95160752
AC
5711 gdbarch_data_init_ftype *init;
5712 gdbarch_data_free_ftype *free;
0f71a2f6
JM
5713};
5714
5715struct gdbarch_data_registration
adf40b2e 5716{
adf40b2e
JM
5717 struct gdbarch_data *data;
5718 struct gdbarch_data_registration *next;
5719};
0f71a2f6 5720
be5a57e1 5721struct gdbarch_data_registry
adf40b2e 5722{
95160752 5723 unsigned nr;
adf40b2e
JM
5724 struct gdbarch_data_registration *registrations;
5725};
0f71a2f6 5726
be5a57e1 5727struct gdbarch_data_registry gdbarch_data_registry =
0f71a2f6
JM
5728{
5729 0, NULL,
5730};
5731
5732struct gdbarch_data *
95160752
AC
5733register_gdbarch_data (gdbarch_data_init_ftype *init,
5734 gdbarch_data_free_ftype *free)
0f71a2f6
JM
5735{
5736 struct gdbarch_data_registration **curr;
76860b5f 5737 /* Append the new registraration. */
be5a57e1 5738 for (curr = &gdbarch_data_registry.registrations;
0f71a2f6
JM
5739 (*curr) != NULL;
5740 curr = &(*curr)->next);
5741 (*curr) = XMALLOC (struct gdbarch_data_registration);
5742 (*curr)->next = NULL;
0f71a2f6 5743 (*curr)->data = XMALLOC (struct gdbarch_data);
be5a57e1 5744 (*curr)->data->index = gdbarch_data_registry.nr++;
95160752 5745 (*curr)->data->init = init;
76860b5f 5746 (*curr)->data->init_p = 1;
95160752 5747 (*curr)->data->free = free;
0f71a2f6
JM
5748 return (*curr)->data;
5749}
5750
5751
b3cc3077 5752/* Create/delete the gdbarch data vector. */
95160752
AC
5753
5754static void
b3cc3077 5755alloc_gdbarch_data (struct gdbarch *gdbarch)
95160752 5756{
b3cc3077
JB
5757 gdb_assert (gdbarch->data == NULL);
5758 gdbarch->nr_data = gdbarch_data_registry.nr;
5759 gdbarch->data = xcalloc (gdbarch->nr_data, sizeof (void*));
5760}
3c875b6f 5761
b3cc3077
JB
5762static void
5763free_gdbarch_data (struct gdbarch *gdbarch)
5764{
5765 struct gdbarch_data_registration *rego;
5766 gdb_assert (gdbarch->data != NULL);
5767 for (rego = gdbarch_data_registry.registrations;
5768 rego != NULL;
5769 rego = rego->next)
95160752 5770 {
b3cc3077
JB
5771 struct gdbarch_data *data = rego->data;
5772 gdb_assert (data->index < gdbarch->nr_data);
5773 if (data->free != NULL && gdbarch->data[data->index] != NULL)
95160752 5774 {
b3cc3077
JB
5775 data->free (gdbarch, gdbarch->data[data->index]);
5776 gdbarch->data[data->index] = NULL;
95160752 5777 }
0f71a2f6 5778 }
b3cc3077
JB
5779 xfree (gdbarch->data);
5780 gdbarch->data = NULL;
0f71a2f6
JM
5781}
5782
5783
76860b5f 5784/* Initialize the current value of the specified per-architecture
b3cc3077
JB
5785 data-pointer. */
5786
95160752
AC
5787void
5788set_gdbarch_data (struct gdbarch *gdbarch,
5789 struct gdbarch_data *data,
5790 void *pointer)
5791{
5792 gdb_assert (data->index < gdbarch->nr_data);
76860b5f
AC
5793 if (gdbarch->data[data->index] != NULL)
5794 {
5795 gdb_assert (data->free != NULL);
5796 data->free (gdbarch, gdbarch->data[data->index]);
5797 }
95160752
AC
5798 gdbarch->data[data->index] = pointer;
5799}
5800
0f71a2f6
JM
5801/* Return the current value of the specified per-architecture
5802 data-pointer. */
5803
5804void *
451fbdda 5805gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
0f71a2f6 5806{
451fbdda 5807 gdb_assert (data->index < gdbarch->nr_data);
76860b5f
AC
5808 /* The data-pointer isn't initialized, call init() to get a value but
5809 only if the architecture initializaiton has completed. Otherwise
5810 punt - hope that the caller knows what they are doing. */
5811 if (gdbarch->data[data->index] == NULL
5812 && gdbarch->initialized_p)
5813 {
5814 /* Be careful to detect an initialization cycle. */
5815 gdb_assert (data->init_p);
5816 data->init_p = 0;
5817 gdb_assert (data->init != NULL);
5818 gdbarch->data[data->index] = data->init (gdbarch);
5819 data->init_p = 1;
5820 gdb_assert (gdbarch->data[data->index] != NULL);
5821 }
451fbdda 5822 return gdbarch->data[data->index];
0f71a2f6
JM
5823}
5824
5825
5826
be5a57e1 5827/* Keep a registry of swapped data required by GDB modules. */
0f71a2f6
JM
5828
5829struct gdbarch_swap
5830{
5831 void *swap;
5832 struct gdbarch_swap_registration *source;
5833 struct gdbarch_swap *next;
5834};
5835
5836struct gdbarch_swap_registration
adf40b2e
JM
5837{
5838 void *data;
5839 unsigned long sizeof_data;
5840 gdbarch_swap_ftype *init;
5841 struct gdbarch_swap_registration *next;
5842};
0f71a2f6 5843
be5a57e1 5844struct gdbarch_swap_registry
adf40b2e
JM
5845{
5846 int nr;
5847 struct gdbarch_swap_registration *registrations;
5848};
0f71a2f6 5849
be5a57e1 5850struct gdbarch_swap_registry gdbarch_swap_registry =
0f71a2f6
JM
5851{
5852 0, NULL,
5853};
5854
5855void
104c1213
JM
5856register_gdbarch_swap (void *data,
5857 unsigned long sizeof_data,
5858 gdbarch_swap_ftype *init)
0f71a2f6
JM
5859{
5860 struct gdbarch_swap_registration **rego;
be5a57e1 5861 for (rego = &gdbarch_swap_registry.registrations;
0f71a2f6
JM
5862 (*rego) != NULL;
5863 rego = &(*rego)->next);
5864 (*rego) = XMALLOC (struct gdbarch_swap_registration);
5865 (*rego)->next = NULL;
5866 (*rego)->init = init;
5867 (*rego)->data = data;
5868 (*rego)->sizeof_data = sizeof_data;
5869}
5870
40af4b0c
AC
5871static void
5872clear_gdbarch_swap (struct gdbarch *gdbarch)
5873{
5874 struct gdbarch_swap *curr;
5875 for (curr = gdbarch->swap;
5876 curr != NULL;
5877 curr = curr->next)
5878 {
5879 memset (curr->source->data, 0, curr->source->sizeof_data);
5880 }
5881}
0f71a2f6 5882
0f71a2f6 5883static void
104c1213 5884init_gdbarch_swap (struct gdbarch *gdbarch)
0f71a2f6
JM
5885{
5886 struct gdbarch_swap_registration *rego;
5887 struct gdbarch_swap **curr = &gdbarch->swap;
be5a57e1 5888 for (rego = gdbarch_swap_registry.registrations;
0f71a2f6
JM
5889 rego != NULL;
5890 rego = rego->next)
5891 {
5892 if (rego->data != NULL)
5893 {
5894 (*curr) = XMALLOC (struct gdbarch_swap);
5895 (*curr)->source = rego;
5896 (*curr)->swap = xmalloc (rego->sizeof_data);
5897 (*curr)->next = NULL;
0f71a2f6
JM
5898 curr = &(*curr)->next;
5899 }
5900 if (rego->init != NULL)
5901 rego->init ();
5902 }
5903}
5904
0f71a2f6 5905static void
104c1213 5906swapout_gdbarch_swap (struct gdbarch *gdbarch)
0f71a2f6
JM
5907{
5908 struct gdbarch_swap *curr;
5909 for (curr = gdbarch->swap;
5910 curr != NULL;
5911 curr = curr->next)
5912 memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
5913}
5914
0f71a2f6 5915static void
104c1213 5916swapin_gdbarch_swap (struct gdbarch *gdbarch)
0f71a2f6
JM
5917{
5918 struct gdbarch_swap *curr;
5919 for (curr = gdbarch->swap;
5920 curr != NULL;
5921 curr = curr->next)
5922 memcpy (curr->source->data, curr->swap, curr->source->sizeof_data);
5923}
5924
5925
be5a57e1 5926/* Keep a registry of the architectures known by GDB. */
0f71a2f6 5927
4b9b3959 5928struct gdbarch_registration
0f71a2f6
JM
5929{
5930 enum bfd_architecture bfd_architecture;
5931 gdbarch_init_ftype *init;
4b9b3959 5932 gdbarch_dump_tdep_ftype *dump_tdep;
0f71a2f6 5933 struct gdbarch_list *arches;
4b9b3959 5934 struct gdbarch_registration *next;
0f71a2f6
JM
5935};
5936
be5a57e1 5937static struct gdbarch_registration *gdbarch_registry = NULL;
0f71a2f6 5938
b4a20239
AC
5939static void
5940append_name (const char ***buf, int *nr, const char *name)
5941{
5942 *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
5943 (*buf)[*nr] = name;
5944 *nr += 1;
5945}
5946
5947const char **
5948gdbarch_printable_names (void)
5949{
5950 if (GDB_MULTI_ARCH)
5951 {
5952 /* Accumulate a list of names based on the registed list of
5953 architectures. */
5954 enum bfd_architecture a;
5955 int nr_arches = 0;
5956 const char **arches = NULL;
4b9b3959 5957 struct gdbarch_registration *rego;
be5a57e1 5958 for (rego = gdbarch_registry;
b4a20239
AC
5959 rego != NULL;
5960 rego = rego->next)
5961 {
5962 const struct bfd_arch_info *ap;
5963 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
5964 if (ap == NULL)
8e65ff28
AC
5965 internal_error (__FILE__, __LINE__,
5966 "gdbarch_architecture_names: multi-arch unknown");
b4a20239
AC
5967 do
5968 {
5969 append_name (&arches, &nr_arches, ap->printable_name);
5970 ap = ap->next;
5971 }
5972 while (ap != NULL);
5973 }
5974 append_name (&arches, &nr_arches, NULL);
5975 return arches;
5976 }
5977 else
5978 /* Just return all the architectures that BFD knows. Assume that
5979 the legacy architecture framework supports them. */
5980 return bfd_arch_list ();
5981}
5982
5983
0f71a2f6 5984void
4b9b3959
AC
5985gdbarch_register (enum bfd_architecture bfd_architecture,
5986 gdbarch_init_ftype *init,
5987 gdbarch_dump_tdep_ftype *dump_tdep)
0f71a2f6 5988{
4b9b3959 5989 struct gdbarch_registration **curr;
0f71a2f6 5990 const struct bfd_arch_info *bfd_arch_info;
ec3d358c 5991 /* Check that BFD recognizes this architecture */
0f71a2f6
JM
5992 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
5993 if (bfd_arch_info == NULL)
5994 {
8e65ff28
AC
5995 internal_error (__FILE__, __LINE__,
5996 "gdbarch: Attempt to register unknown architecture (%d)",
5997 bfd_architecture);
0f71a2f6
JM
5998 }
5999 /* Check that we haven't seen this architecture before */
be5a57e1 6000 for (curr = &gdbarch_registry;
0f71a2f6
JM
6001 (*curr) != NULL;
6002 curr = &(*curr)->next)
6003 {
6004 if (bfd_architecture == (*curr)->bfd_architecture)
8e65ff28
AC
6005 internal_error (__FILE__, __LINE__,
6006 "gdbarch: Duplicate registraration of architecture (%s)",
6007 bfd_arch_info->printable_name);
0f71a2f6
JM
6008 }
6009 /* log it */
6010 if (gdbarch_debug)
6011 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n",
6012 bfd_arch_info->printable_name,
6013 (long) init);
6014 /* Append it */
4b9b3959 6015 (*curr) = XMALLOC (struct gdbarch_registration);
0f71a2f6
JM
6016 (*curr)->bfd_architecture = bfd_architecture;
6017 (*curr)->init = init;
4b9b3959 6018 (*curr)->dump_tdep = dump_tdep;
0f71a2f6
JM
6019 (*curr)->arches = NULL;
6020 (*curr)->next = NULL;
8e1a459b
C
6021 /* When non- multi-arch, install whatever target dump routine we've
6022 been provided - hopefully that routine has been written correctly
4b9b3959
AC
6023 and works regardless of multi-arch. */
6024 if (!GDB_MULTI_ARCH && dump_tdep != NULL
6025 && startup_gdbarch.dump_tdep == NULL)
6026 startup_gdbarch.dump_tdep = dump_tdep;
6027}
6028
6029void
6030register_gdbarch_init (enum bfd_architecture bfd_architecture,
6031 gdbarch_init_ftype *init)
6032{
6033 gdbarch_register (bfd_architecture, init, NULL);
0f71a2f6 6034}
0f71a2f6
JM
6035
6036
6037/* Look for an architecture using gdbarch_info. Base search on only
6038 BFD_ARCH_INFO and BYTE_ORDER. */
6039
6040struct gdbarch_list *
104c1213
JM
6041gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
6042 const struct gdbarch_info *info)
0f71a2f6
JM
6043{
6044 for (; arches != NULL; arches = arches->next)
6045 {
6046 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
6047 continue;
6048 if (info->byte_order != arches->gdbarch->byte_order)
6049 continue;
4be87837
DJ
6050 if (info->osabi != arches->gdbarch->osabi)
6051 continue;
0f71a2f6
JM
6052 return arches;
6053 }
6054 return NULL;
6055}
6056
6057
6058/* Update the current architecture. Return ZERO if the update request
6059 failed. */
6060
6061int
16f33e29 6062gdbarch_update_p (struct gdbarch_info info)
0f71a2f6
JM
6063{
6064 struct gdbarch *new_gdbarch;
40af4b0c 6065 struct gdbarch *old_gdbarch;
4b9b3959 6066 struct gdbarch_registration *rego;
0f71a2f6 6067
b732d07d
AC
6068 /* Fill in missing parts of the INFO struct using a number of
6069 sources: ``set ...''; INFOabfd supplied; existing target. */
6070
6071 /* ``(gdb) set architecture ...'' */
6072 if (info.bfd_arch_info == NULL
6073 && !TARGET_ARCHITECTURE_AUTO)
6074 info.bfd_arch_info = TARGET_ARCHITECTURE;
6075 if (info.bfd_arch_info == NULL
6076 && info.abfd != NULL
6077 && bfd_get_arch (info.abfd) != bfd_arch_unknown
6078 && bfd_get_arch (info.abfd) != bfd_arch_obscure)
6079 info.bfd_arch_info = bfd_get_arch_info (info.abfd);
0f71a2f6 6080 if (info.bfd_arch_info == NULL)
b732d07d
AC
6081 info.bfd_arch_info = TARGET_ARCHITECTURE;
6082
6083 /* ``(gdb) set byte-order ...'' */
428721aa 6084 if (info.byte_order == BFD_ENDIAN_UNKNOWN
b732d07d
AC
6085 && !TARGET_BYTE_ORDER_AUTO)
6086 info.byte_order = TARGET_BYTE_ORDER;
6087 /* From the INFO struct. */
428721aa 6088 if (info.byte_order == BFD_ENDIAN_UNKNOWN
b732d07d 6089 && info.abfd != NULL)
d7449b42 6090 info.byte_order = (bfd_big_endian (info.abfd) ? BFD_ENDIAN_BIG
778eb05e 6091 : bfd_little_endian (info.abfd) ? BFD_ENDIAN_LITTLE
428721aa 6092 : BFD_ENDIAN_UNKNOWN);
b732d07d 6093 /* From the current target. */
428721aa 6094 if (info.byte_order == BFD_ENDIAN_UNKNOWN)
b732d07d 6095 info.byte_order = TARGET_BYTE_ORDER;
0f71a2f6 6096
4be87837
DJ
6097 /* ``(gdb) set osabi ...'' is handled by gdbarch_lookup_osabi. */
6098 if (info.osabi == GDB_OSABI_UNINITIALIZED)
6099 info.osabi = gdbarch_lookup_osabi (info.abfd);
6100 if (info.osabi == GDB_OSABI_UNINITIALIZED)
6101 info.osabi = current_gdbarch->osabi;
6102
b732d07d
AC
6103 /* Must have found some sort of architecture. */
6104 gdb_assert (info.bfd_arch_info != NULL);
0f71a2f6
JM
6105
6106 if (gdbarch_debug)
6107 {
0f71a2f6
JM
6108 fprintf_unfiltered (gdb_stdlog,
6109 "gdbarch_update: info.bfd_arch_info %s\n",
6110 (info.bfd_arch_info != NULL
6111 ? info.bfd_arch_info->printable_name
6112 : "(null)"));
6113 fprintf_unfiltered (gdb_stdlog,
6114 "gdbarch_update: info.byte_order %d (%s)\n",
6115 info.byte_order,
d7449b42 6116 (info.byte_order == BFD_ENDIAN_BIG ? "big"
778eb05e 6117 : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
0f71a2f6 6118 : "default"));
4be87837
DJ
6119 fprintf_unfiltered (gdb_stdlog,
6120 "gdbarch_update: info.osabi %d (%s)\n",
6121 info.osabi, gdbarch_osabi_name (info.osabi));
0f71a2f6
JM
6122 fprintf_unfiltered (gdb_stdlog,
6123 "gdbarch_update: info.abfd 0x%lx\n",
6124 (long) info.abfd);
6125 fprintf_unfiltered (gdb_stdlog,
6126 "gdbarch_update: info.tdep_info 0x%lx\n",
6127 (long) info.tdep_info);
6128 }
6129
b732d07d
AC
6130 /* Find the target that knows about this architecture. */
6131 for (rego = gdbarch_registry;
6132 rego != NULL;
6133 rego = rego->next)
6134 if (rego->bfd_architecture == info.bfd_arch_info->arch)
6135 break;
6136 if (rego == NULL)
6137 {
6138 if (gdbarch_debug)
6139 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: No matching architecture\n");
6140 return 0;
6141 }
6142
40af4b0c
AC
6143 /* Swap the data belonging to the old target out setting the
6144 installed data to zero. This stops the ->init() function trying
6145 to refer to the previous architecture's global data structures. */
6146 swapout_gdbarch_swap (current_gdbarch);
6147 clear_gdbarch_swap (current_gdbarch);
6148
6149 /* Save the previously selected architecture, setting the global to
6150 NULL. This stops ->init() trying to use the previous
6151 architecture's configuration. The previous architecture may not
6152 even be of the same architecture family. The most recent
6153 architecture of the same family is found at the head of the
6154 rego->arches list. */
6155 old_gdbarch = current_gdbarch;
6156 current_gdbarch = NULL;
6157
0f71a2f6
JM
6158 /* Ask the target for a replacement architecture. */
6159 new_gdbarch = rego->init (info, rego->arches);
6160
40af4b0c
AC
6161 /* Did the target like it? No. Reject the change and revert to the
6162 old architecture. */
0f71a2f6
JM
6163 if (new_gdbarch == NULL)
6164 {
6165 if (gdbarch_debug)
6166 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Target rejected architecture\n");
40af4b0c
AC
6167 swapin_gdbarch_swap (old_gdbarch);
6168 current_gdbarch = old_gdbarch;
0f71a2f6
JM
6169 return 0;
6170 }
6171
40af4b0c
AC
6172 /* Did the architecture change? No. Oops, put the old architecture
6173 back. */
6174 if (old_gdbarch == new_gdbarch)
0f71a2f6
JM
6175 {
6176 if (gdbarch_debug)
6177 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
6178 (long) new_gdbarch,
6179 new_gdbarch->bfd_arch_info->printable_name);
40af4b0c
AC
6180 swapin_gdbarch_swap (old_gdbarch);
6181 current_gdbarch = old_gdbarch;
0f71a2f6
JM
6182 return 1;
6183 }
6184
0f79675b
AC
6185 /* Is this a pre-existing architecture? Yes. Move it to the front
6186 of the list of architectures (keeping the list sorted Most
6187 Recently Used) and then copy it in. */
6188 {
6189 struct gdbarch_list **list;
6190 for (list = &rego->arches;
6191 (*list) != NULL;
6192 list = &(*list)->next)
6193 {
6194 if ((*list)->gdbarch == new_gdbarch)
6195 {
6196 struct gdbarch_list *this;
6197 if (gdbarch_debug)
6198 fprintf_unfiltered (gdb_stdlog,
6199 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
6200 (long) new_gdbarch,
6201 new_gdbarch->bfd_arch_info->printable_name);
6202 /* Unlink this. */
6203 this = (*list);
6204 (*list) = this->next;
6205 /* Insert in the front. */
6206 this->next = rego->arches;
6207 rego->arches = this;
6208 /* Copy the new architecture in. */
6209 current_gdbarch = new_gdbarch;
6210 swapin_gdbarch_swap (new_gdbarch);
6211 architecture_changed_event ();
6212 return 1;
6213 }
6214 }
6215 }
6216
6217 /* Prepend this new architecture to the architecture list (keep the
6218 list sorted Most Recently Used). */
6219 {
6220 struct gdbarch_list *this = XMALLOC (struct gdbarch_list);
6221 this->next = rego->arches;
6222 this->gdbarch = new_gdbarch;
6223 rego->arches = this;
6224 }
0f71a2f6 6225
76860b5f 6226 /* Switch to this new architecture marking it initialized. */
0f71a2f6 6227 current_gdbarch = new_gdbarch;
76860b5f 6228 current_gdbarch->initialized_p = 1;
0f71a2f6
JM
6229 if (gdbarch_debug)
6230 {
6231 fprintf_unfiltered (gdb_stdlog,
adf40b2e 6232 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
0f71a2f6
JM
6233 (long) new_gdbarch,
6234 new_gdbarch->bfd_arch_info->printable_name);
0f71a2f6 6235 }
adf40b2e 6236
4b9b3959
AC
6237 /* Check that the newly installed architecture is valid. Plug in
6238 any post init values. */
6239 new_gdbarch->dump_tdep = rego->dump_tdep;
0f71a2f6
JM
6240 verify_gdbarch (new_gdbarch);
6241
cf17c188
AC
6242 /* Initialize the per-architecture memory (swap) areas.
6243 CURRENT_GDBARCH must be update before these modules are
6244 called. */
6245 init_gdbarch_swap (new_gdbarch);
6246
76860b5f 6247 /* Initialize the per-architecture data. CURRENT_GDBARCH
cf17c188 6248 must be updated before these modules are called. */
67c2c32c
KS
6249 architecture_changed_event ();
6250
4b9b3959
AC
6251 if (gdbarch_debug)
6252 gdbarch_dump (current_gdbarch, gdb_stdlog);
6253
0f71a2f6
JM
6254 return 1;
6255}
c906108c 6256
c906108c 6257
c906108c
SS
6258/* Disassembler */
6259
6260/* Pointer to the target-dependent disassembly function. */
d7a27068 6261int (*deprecated_tm_print_insn) (bfd_vma, disassemble_info *);
c906108c 6262
104c1213 6263extern void _initialize_gdbarch (void);
b4a20239 6264
c906108c 6265void
7c7651b2 6266_initialize_gdbarch (void)
c906108c 6267{
5d161b24
DB
6268 struct cmd_list_element *c;
6269
5d161b24 6270 add_show_from_set (add_set_cmd ("arch",
c906108c
SS
6271 class_maintenance,
6272 var_zinteger,
adf40b2e 6273 (char *)&gdbarch_debug,
c906108c 6274 "Set architecture debugging.\n\
5d161b24
DB
6275When non-zero, architecture debugging is enabled.", &setdebuglist),
6276 &showdebuglist);
59233f88
AC
6277 c = add_set_cmd ("archdebug",
6278 class_maintenance,
6279 var_zinteger,
6280 (char *)&gdbarch_debug,
6281 "Set architecture debugging.\n\
5d161b24
DB
6282When non-zero, architecture debugging is enabled.", &setlist);
6283
59233f88
AC
6284 deprecate_cmd (c, "set debug arch");
6285 deprecate_cmd (add_show_from_set (c, &showlist), "show debug arch");
c906108c 6286}