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