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