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