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