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