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