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