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