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