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