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