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