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