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