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