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