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