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