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