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