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