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