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