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