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