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