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