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