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