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