2003-05-02 Andrew Cagney <cagney@redhat.com>
[external/binutils.git] / gdb / gdbarch.c
1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
2
3 /* Dynamic architecture support for GDB, the GNU debugger.
4    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_deprecated_target_read_fp_ftype *deprecated_target_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 deprecated_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_deprecated_saved_pc_after_call_ftype *deprecated_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_sp = generic_target_read_sp;
503   current_gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
504   current_gdbarch->num_regs = -1;
505   current_gdbarch->sp_regnum = -1;
506   current_gdbarch->deprecated_fp_regnum = -1;
507   current_gdbarch->pc_regnum = -1;
508   current_gdbarch->ps_regnum = -1;
509   current_gdbarch->fp0_regnum = -1;
510   current_gdbarch->npc_regnum = -1;
511   current_gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
512   current_gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
513   current_gdbarch->dwarf_reg_to_regnum = no_op_reg_to_regnum;
514   current_gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
515   current_gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
516   current_gdbarch->register_name = legacy_register_name;
517   current_gdbarch->register_byte = generic_register_byte;
518   current_gdbarch->register_raw_size = generic_register_size;
519   current_gdbarch->register_virtual_size = generic_register_size;
520   current_gdbarch->print_registers_info = default_print_registers_info;
521   current_gdbarch->register_sim_regno = legacy_register_sim_regno;
522   current_gdbarch->cannot_fetch_register = cannot_register_not;
523   current_gdbarch->cannot_store_register = cannot_register_not;
524   current_gdbarch->deprecated_use_generic_dummy_frames = 1;
525   current_gdbarch->call_dummy_location = AT_ENTRY_POINT;
526   current_gdbarch->call_dummy_address = entry_point_address;
527   current_gdbarch->deprecated_pc_in_call_dummy = generic_pc_in_call_dummy;
528   current_gdbarch->call_dummy_words = legacy_call_dummy_words;
529   current_gdbarch->sizeof_call_dummy_words = legacy_sizeof_call_dummy_words;
530   current_gdbarch->register_convertible = generic_register_convertible_not;
531   current_gdbarch->convert_register_p = legacy_convert_register_p;
532   current_gdbarch->register_to_value = legacy_register_to_value;
533   current_gdbarch->value_to_register = legacy_value_to_register;
534   current_gdbarch->pointer_to_address = unsigned_pointer_to_address;
535   current_gdbarch->address_to_pointer = unsigned_address_to_pointer;
536   current_gdbarch->return_value_on_stack = generic_return_value_on_stack_not;
537   current_gdbarch->extract_return_value = legacy_extract_return_value;
538   current_gdbarch->store_return_value = legacy_store_return_value;
539   current_gdbarch->use_struct_convention = generic_use_struct_convention;
540   current_gdbarch->prologue_frameless_p = generic_prologue_frameless_p;
541   current_gdbarch->breakpoint_from_pc = legacy_breakpoint_from_pc;
542   current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
543   current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
544   current_gdbarch->decr_pc_after_break = -1;
545   current_gdbarch->prepare_to_proceed = default_prepare_to_proceed;
546   current_gdbarch->function_start_offset = -1;
547   current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
548   current_gdbarch->frame_args_skip = -1;
549   current_gdbarch->frameless_function_invocation = generic_frameless_function_invocation_not;
550   current_gdbarch->frame_args_address = get_frame_base;
551   current_gdbarch->frame_locals_address = get_frame_base;
552   current_gdbarch->convert_from_func_ptr_addr = core_addr_identity;
553   current_gdbarch->addr_bits_remove = core_addr_identity;
554   current_gdbarch->smash_text_address = core_addr_identity;
555   current_gdbarch->print_insn = legacy_print_insn;
556   current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
557   current_gdbarch->in_solib_call_trampoline = generic_in_solib_call_trampoline;
558   current_gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
559   current_gdbarch->pc_in_sigtramp = legacy_pc_in_sigtramp;
560   current_gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
561   current_gdbarch->construct_inferior_arguments = construct_inferior_arguments;
562   current_gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
563   current_gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
564   current_gdbarch->name_of_malloc = "malloc";
565   current_gdbarch->register_reggroup_p = default_register_reggroup_p;
566   /* gdbarch_alloc() */
567
568   return current_gdbarch;
569 }
570
571
572 /* Free a gdbarch struct.  This should never happen in normal
573    operation --- once you've created a gdbarch, you keep it around.
574    However, if an architecture's init function encounters an error
575    building the structure, it may need to clean up a partially
576    constructed gdbarch.  */
577
578 void
579 gdbarch_free (struct gdbarch *arch)
580 {
581   gdb_assert (arch != NULL);
582   free_gdbarch_data (arch);
583   xfree (arch);
584 }
585
586
587 /* Ensure that all values in a GDBARCH are reasonable. */
588
589 static void
590 verify_gdbarch (struct gdbarch *gdbarch)
591 {
592   struct ui_file *log;
593   struct cleanup *cleanups;
594   long dummy;
595   char *buf;
596   /* Only perform sanity checks on a multi-arch target. */
597   if (!GDB_MULTI_ARCH)
598     return;
599   log = mem_fileopen ();
600   cleanups = make_cleanup_ui_file_delete (log);
601   /* fundamental */
602   if (gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
603     fprintf_unfiltered (log, "\n\tbyte-order");
604   if (gdbarch->bfd_arch_info == NULL)
605     fprintf_unfiltered (log, "\n\tbfd_arch_info");
606   /* Check those that need to be defined for the given multi-arch level. */
607   /* Skip verify of short_bit, invalid_p == 0 */
608   /* Skip verify of int_bit, invalid_p == 0 */
609   /* Skip verify of long_bit, invalid_p == 0 */
610   /* Skip verify of long_long_bit, invalid_p == 0 */
611   /* Skip verify of float_bit, invalid_p == 0 */
612   /* Skip verify of double_bit, invalid_p == 0 */
613   /* Skip verify of long_double_bit, invalid_p == 0 */
614   /* Skip verify of ptr_bit, invalid_p == 0 */
615   if (gdbarch->addr_bit == 0)
616     gdbarch->addr_bit = TARGET_PTR_BIT;
617   /* Skip verify of bfd_vma_bit, invalid_p == 0 */
618   if (gdbarch->char_signed == -1)
619     gdbarch->char_signed = 1;
620   /* Skip verify of read_pc, invalid_p == 0 */
621   /* Skip verify of write_pc, invalid_p == 0 */
622   /* Skip verify of deprecated_target_read_fp, has predicate */
623   /* Skip verify of read_sp, invalid_p == 0 */
624   /* Skip verify of deprecated_dummy_write_sp, has predicate */
625   /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
626   /* Skip verify of pseudo_register_read, has predicate */
627   /* Skip verify of pseudo_register_write, has predicate */
628   if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
629       && (gdbarch->num_regs == -1))
630     fprintf_unfiltered (log, "\n\tnum_regs");
631   /* Skip verify of num_pseudo_regs, invalid_p == 0 */
632   /* Skip verify of sp_regnum, invalid_p == 0 */
633   /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
634   /* Skip verify of pc_regnum, invalid_p == 0 */
635   /* Skip verify of ps_regnum, invalid_p == 0 */
636   /* Skip verify of fp0_regnum, invalid_p == 0 */
637   /* Skip verify of npc_regnum, invalid_p == 0 */
638   /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
639   /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
640   /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
641   /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
642   /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
643   /* Skip verify of register_name, invalid_p == 0 */
644   /* Skip verify of register_byte, invalid_p == 0 */
645   /* Skip verify of register_raw_size, invalid_p == 0 */
646   /* Skip verify of deprecated_max_register_raw_size, has predicate */
647   /* Skip verify of register_virtual_size, invalid_p == 0 */
648   /* Skip verify of deprecated_max_register_virtual_size, has predicate */
649   /* Skip verify of register_virtual_type, has predicate */
650   /* Skip verify of register_type, has predicate */
651   /* Skip verify of deprecated_do_registers_info, has predicate */
652   /* Skip verify of print_registers_info, invalid_p == 0 */
653   /* Skip verify of print_float_info, has predicate */
654   /* Skip verify of print_vector_info, has predicate */
655   /* Skip verify of register_sim_regno, invalid_p == 0 */
656   /* Skip verify of register_bytes_ok, has predicate */
657   /* Skip verify of cannot_fetch_register, invalid_p == 0 */
658   /* Skip verify of cannot_store_register, invalid_p == 0 */
659   /* Skip verify of get_longjmp_target, has predicate */
660   /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
661   /* Skip verify of call_dummy_location, invalid_p == 0 */
662   /* Skip verify of call_dummy_address, invalid_p == 0 */
663   /* Skip verify of deprecated_pc_in_call_dummy, has predicate */
664   /* Skip verify of call_dummy_words, invalid_p == 0 */
665   /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
666   /* Skip verify of deprecated_call_dummy_stack_adjust, has predicate */
667   /* Skip verify of fix_call_dummy, has predicate */
668   /* Skip verify of deprecated_init_frame_pc_first, has predicate */
669   /* Skip verify of deprecated_init_frame_pc, has predicate */
670   /* Skip verify of deprecated_get_saved_register, has predicate */
671   /* Skip verify of register_convertible, invalid_p == 0 */
672   /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
673   /* Skip verify of register_convert_to_raw, invalid_p == 0 */
674   /* Skip verify of convert_register_p, invalid_p == 0 */
675   /* Skip verify of register_to_value, invalid_p == 0 */
676   /* Skip verify of value_to_register, invalid_p == 0 */
677   /* Skip verify of pointer_to_address, invalid_p == 0 */
678   /* Skip verify of address_to_pointer, invalid_p == 0 */
679   /* Skip verify of integer_to_address, has predicate */
680   /* Skip verify of return_value_on_stack, invalid_p == 0 */
681   /* Skip verify of deprecated_push_arguments, has predicate */
682   /* Skip verify of push_dummy_call, has predicate */
683   /* Skip verify of deprecated_push_dummy_frame, has predicate */
684   /* Skip verify of deprecated_push_return_address, has predicate */
685   /* Skip verify of deprecated_pop_frame, has predicate */
686   /* Skip verify of deprecated_store_struct_return, has predicate */
687   /* Skip verify of extract_return_value, invalid_p == 0 */
688   /* Skip verify of store_return_value, invalid_p == 0 */
689   /* Skip verify of extract_struct_value_address, has predicate */
690   /* Skip verify of deprecated_extract_struct_value_address, has predicate */
691   /* Skip verify of use_struct_convention, invalid_p == 0 */
692   /* Skip verify of deprecated_frame_init_saved_regs, has predicate */
693   /* Skip verify of deprecated_init_extra_frame_info, has predicate */
694   if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
695       && (gdbarch->skip_prologue == 0))
696     fprintf_unfiltered (log, "\n\tskip_prologue");
697   /* Skip verify of prologue_frameless_p, invalid_p == 0 */
698   if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
699       && (gdbarch->inner_than == 0))
700     fprintf_unfiltered (log, "\n\tinner_than");
701   /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
702   /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
703   /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
704   if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
705       && (gdbarch->decr_pc_after_break == -1))
706     fprintf_unfiltered (log, "\n\tdecr_pc_after_break");
707   /* Skip verify of prepare_to_proceed, invalid_p == 0 */
708   if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
709       && (gdbarch->function_start_offset == -1))
710     fprintf_unfiltered (log, "\n\tfunction_start_offset");
711   /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
712   if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
713       && (gdbarch->frame_args_skip == -1))
714     fprintf_unfiltered (log, "\n\tframe_args_skip");
715   /* Skip verify of frameless_function_invocation, invalid_p == 0 */
716   /* Skip verify of deprecated_frame_chain, has predicate */
717   /* Skip verify of deprecated_frame_chain_valid, has predicate */
718   /* Skip verify of deprecated_frame_saved_pc, has predicate */
719   /* Skip verify of unwind_pc, has predicate */
720   /* Skip verify of frame_args_address, invalid_p == 0 */
721   /* Skip verify of frame_locals_address, invalid_p == 0 */
722   /* Skip verify of deprecated_saved_pc_after_call, has predicate */
723   if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
724       && (gdbarch->frame_num_args == 0))
725     fprintf_unfiltered (log, "\n\tframe_num_args");
726   /* Skip verify of stack_align, has predicate */
727   /* Skip verify of frame_align, has predicate */
728   /* Skip verify of deprecated_extra_stack_alignment_needed, invalid_p == 0 */
729   /* Skip verify of reg_struct_has_addr, has predicate */
730   /* Skip verify of save_dummy_frame_tos, has predicate */
731   /* Skip verify of unwind_dummy_id, has predicate */
732   if (gdbarch->float_format == 0)
733     gdbarch->float_format = default_float_format (gdbarch);
734   if (gdbarch->double_format == 0)
735     gdbarch->double_format = default_double_format (gdbarch);
736   if (gdbarch->long_double_format == 0)
737     gdbarch->long_double_format = default_double_format (gdbarch);
738   /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
739   /* Skip verify of addr_bits_remove, invalid_p == 0 */
740   /* Skip verify of smash_text_address, invalid_p == 0 */
741   /* Skip verify of software_single_step, has predicate */
742   /* Skip verify of print_insn, invalid_p == 0 */
743   /* Skip verify of skip_trampoline_code, invalid_p == 0 */
744   /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
745   /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
746   /* Skip verify of pc_in_sigtramp, invalid_p == 0 */
747   /* Skip verify of sigtramp_start, has predicate */
748   /* Skip verify of sigtramp_end, has predicate */
749   /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
750   /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
751   /* Skip verify of dwarf2_build_frame_info, has predicate */
752   /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
753   /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
754   /* Skip verify of name_of_malloc, invalid_p == 0 */
755   /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
756   /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
757   /* Skip verify of address_class_type_flags, has predicate */
758   /* Skip verify of address_class_type_flags_to_name, has predicate */
759   /* Skip verify of address_class_name_to_type_flags, has predicate */
760   /* Skip verify of register_reggroup_p, invalid_p == 0 */
761   buf = ui_file_xstrdup (log, &dummy);
762   make_cleanup (xfree, buf);
763   if (strlen (buf) > 0)
764     internal_error (__FILE__, __LINE__,
765                     "verify_gdbarch: the following are invalid ...%s",
766                     buf);
767   do_cleanups (cleanups);
768 }
769
770
771 /* Print out the details of the current architecture. */
772
773 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
774    just happens to match the global variable ``current_gdbarch''.  That
775    way macros refering to that variable get the local and not the global
776    version - ulgh.  Once everything is parameterised with gdbarch, this
777    will go away. */
778
779 void
780 gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
781 {
782   fprintf_unfiltered (file,
783                       "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
784                       GDB_MULTI_ARCH);
785   if (GDB_MULTI_ARCH)
786     fprintf_unfiltered (file,
787                         "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
788                         gdbarch_frame_align_p (current_gdbarch));
789   if (GDB_MULTI_ARCH)
790     fprintf_unfiltered (file,
791                         "gdbarch_dump: frame_align = 0x%08lx\n",
792                         (long) current_gdbarch->frame_align);
793   if (GDB_MULTI_ARCH)
794     fprintf_unfiltered (file,
795                         "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
796                         (long) current_gdbarch->in_function_epilogue_p);
797   if (GDB_MULTI_ARCH)
798     fprintf_unfiltered (file,
799                         "gdbarch_dump: register_reggroup_p = 0x%08lx\n",
800                         (long) current_gdbarch->register_reggroup_p);
801   if (GDB_MULTI_ARCH)
802     fprintf_unfiltered (file,
803                         "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
804                         gdbarch_pseudo_register_read_p (current_gdbarch));
805   if (GDB_MULTI_ARCH)
806     fprintf_unfiltered (file,
807                         "gdbarch_dump: pseudo_register_read = 0x%08lx\n",
808                         (long) current_gdbarch->pseudo_register_read);
809   if (GDB_MULTI_ARCH)
810     fprintf_unfiltered (file,
811                         "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
812                         gdbarch_pseudo_register_write_p (current_gdbarch));
813   if (GDB_MULTI_ARCH)
814     fprintf_unfiltered (file,
815                         "gdbarch_dump: pseudo_register_write = 0x%08lx\n",
816                         (long) current_gdbarch->pseudo_register_write);
817   if (GDB_MULTI_ARCH)
818     fprintf_unfiltered (file,
819                         "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
820                         gdbarch_address_class_name_to_type_flags_p (current_gdbarch));
821   if (GDB_MULTI_ARCH)
822     fprintf_unfiltered (file,
823                         "gdbarch_dump: address_class_name_to_type_flags = 0x%08lx\n",
824                         (long) current_gdbarch->address_class_name_to_type_flags);
825 #ifdef ADDRESS_CLASS_TYPE_FLAGS_P
826   fprintf_unfiltered (file,
827                       "gdbarch_dump: %s # %s\n",
828                       "ADDRESS_CLASS_TYPE_FLAGS_P()",
829                       XSTRING (ADDRESS_CLASS_TYPE_FLAGS_P ()));
830   fprintf_unfiltered (file,
831                       "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS_P() = %d\n",
832                       ADDRESS_CLASS_TYPE_FLAGS_P ());
833 #endif
834 #ifdef ADDRESS_CLASS_TYPE_FLAGS
835   fprintf_unfiltered (file,
836                       "gdbarch_dump: %s # %s\n",
837                       "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)",
838                       XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size, dwarf2_addr_class)));
839   if (GDB_MULTI_ARCH)
840     fprintf_unfiltered (file,
841                         "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS = <0x%08lx>\n",
842                         (long) current_gdbarch->address_class_type_flags
843                         /*ADDRESS_CLASS_TYPE_FLAGS ()*/);
844 #endif
845   if (GDB_MULTI_ARCH)
846     fprintf_unfiltered (file,
847                         "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
848                         gdbarch_address_class_type_flags_to_name_p (current_gdbarch));
849   if (GDB_MULTI_ARCH)
850     fprintf_unfiltered (file,
851                         "gdbarch_dump: address_class_type_flags_to_name = 0x%08lx\n",
852                         (long) current_gdbarch->address_class_type_flags_to_name);
853 #ifdef ADDRESS_TO_POINTER
854 #if GDB_MULTI_ARCH
855   /* Macro might contain `[{}]' when not multi-arch */
856   fprintf_unfiltered (file,
857                       "gdbarch_dump: %s # %s\n",
858                       "ADDRESS_TO_POINTER(type, buf, addr)",
859                       XSTRING (ADDRESS_TO_POINTER (type, buf, addr)));
860 #endif
861   if (GDB_MULTI_ARCH)
862     fprintf_unfiltered (file,
863                         "gdbarch_dump: ADDRESS_TO_POINTER = <0x%08lx>\n",
864                         (long) current_gdbarch->address_to_pointer
865                         /*ADDRESS_TO_POINTER ()*/);
866 #endif
867 #ifdef ADDR_BITS_REMOVE
868   fprintf_unfiltered (file,
869                       "gdbarch_dump: %s # %s\n",
870                       "ADDR_BITS_REMOVE(addr)",
871                       XSTRING (ADDR_BITS_REMOVE (addr)));
872   if (GDB_MULTI_ARCH)
873     fprintf_unfiltered (file,
874                         "gdbarch_dump: ADDR_BITS_REMOVE = <0x%08lx>\n",
875                         (long) current_gdbarch->addr_bits_remove
876                         /*ADDR_BITS_REMOVE ()*/);
877 #endif
878 #ifdef BELIEVE_PCC_PROMOTION
879   fprintf_unfiltered (file,
880                       "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
881                       XSTRING (BELIEVE_PCC_PROMOTION));
882   fprintf_unfiltered (file,
883                       "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
884                       BELIEVE_PCC_PROMOTION);
885 #endif
886 #ifdef BELIEVE_PCC_PROMOTION_TYPE
887   fprintf_unfiltered (file,
888                       "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
889                       XSTRING (BELIEVE_PCC_PROMOTION_TYPE));
890   fprintf_unfiltered (file,
891                       "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n",
892                       BELIEVE_PCC_PROMOTION_TYPE);
893 #endif
894 #ifdef BREAKPOINT_FROM_PC
895   fprintf_unfiltered (file,
896                       "gdbarch_dump: %s # %s\n",
897                       "BREAKPOINT_FROM_PC(pcptr, lenptr)",
898                       XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr)));
899   if (GDB_MULTI_ARCH)
900     fprintf_unfiltered (file,
901                         "gdbarch_dump: BREAKPOINT_FROM_PC = <0x%08lx>\n",
902                         (long) current_gdbarch->breakpoint_from_pc
903                         /*BREAKPOINT_FROM_PC ()*/);
904 #endif
905 #ifdef CALL_DUMMY_ADDRESS
906   fprintf_unfiltered (file,
907                       "gdbarch_dump: %s # %s\n",
908                       "CALL_DUMMY_ADDRESS()",
909                       XSTRING (CALL_DUMMY_ADDRESS ()));
910   if (GDB_MULTI_ARCH)
911     fprintf_unfiltered (file,
912                         "gdbarch_dump: CALL_DUMMY_ADDRESS = <0x%08lx>\n",
913                         (long) current_gdbarch->call_dummy_address
914                         /*CALL_DUMMY_ADDRESS ()*/);
915 #endif
916 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
917   fprintf_unfiltered (file,
918                       "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
919                       XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET));
920   fprintf_unfiltered (file,
921                       "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = %ld\n",
922                       (long) CALL_DUMMY_BREAKPOINT_OFFSET);
923 #endif
924 #ifdef CALL_DUMMY_LENGTH
925   fprintf_unfiltered (file,
926                       "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
927                       XSTRING (CALL_DUMMY_LENGTH));
928   fprintf_unfiltered (file,
929                       "gdbarch_dump: CALL_DUMMY_LENGTH = %d\n",
930                       CALL_DUMMY_LENGTH);
931 #endif
932 #ifdef CALL_DUMMY_LOCATION
933   fprintf_unfiltered (file,
934                       "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
935                       XSTRING (CALL_DUMMY_LOCATION));
936   fprintf_unfiltered (file,
937                       "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
938                       CALL_DUMMY_LOCATION);
939 #endif
940 #ifdef CALL_DUMMY_START_OFFSET
941   fprintf_unfiltered (file,
942                       "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
943                       XSTRING (CALL_DUMMY_START_OFFSET));
944   fprintf_unfiltered (file,
945                       "gdbarch_dump: CALL_DUMMY_START_OFFSET = %ld\n",
946                       (long) CALL_DUMMY_START_OFFSET);
947 #endif
948 #ifdef CALL_DUMMY_WORDS
949   fprintf_unfiltered (file,
950                       "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
951                       XSTRING (CALL_DUMMY_WORDS));
952   fprintf_unfiltered (file,
953                       "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
954                       (long) CALL_DUMMY_WORDS);
955 #endif
956 #ifdef CANNOT_FETCH_REGISTER
957   fprintf_unfiltered (file,
958                       "gdbarch_dump: %s # %s\n",
959                       "CANNOT_FETCH_REGISTER(regnum)",
960                       XSTRING (CANNOT_FETCH_REGISTER (regnum)));
961   if (GDB_MULTI_ARCH)
962     fprintf_unfiltered (file,
963                         "gdbarch_dump: CANNOT_FETCH_REGISTER = <0x%08lx>\n",
964                         (long) current_gdbarch->cannot_fetch_register
965                         /*CANNOT_FETCH_REGISTER ()*/);
966 #endif
967 #ifdef CANNOT_STEP_BREAKPOINT
968   fprintf_unfiltered (file,
969                       "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
970                       XSTRING (CANNOT_STEP_BREAKPOINT));
971   fprintf_unfiltered (file,
972                       "gdbarch_dump: CANNOT_STEP_BREAKPOINT = %d\n",
973                       CANNOT_STEP_BREAKPOINT);
974 #endif
975 #ifdef CANNOT_STORE_REGISTER
976   fprintf_unfiltered (file,
977                       "gdbarch_dump: %s # %s\n",
978                       "CANNOT_STORE_REGISTER(regnum)",
979                       XSTRING (CANNOT_STORE_REGISTER (regnum)));
980   if (GDB_MULTI_ARCH)
981     fprintf_unfiltered (file,
982                         "gdbarch_dump: CANNOT_STORE_REGISTER = <0x%08lx>\n",
983                         (long) current_gdbarch->cannot_store_register
984                         /*CANNOT_STORE_REGISTER ()*/);
985 #endif
986 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
987 #if GDB_MULTI_ARCH
988   /* Macro might contain `[{}]' when not multi-arch */
989   fprintf_unfiltered (file,
990                       "gdbarch_dump: %s # %s\n",
991                       "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
992                       XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val, msym)));
993 #endif
994   if (GDB_MULTI_ARCH)
995     fprintf_unfiltered (file,
996                         "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
997                         (long) current_gdbarch->coff_make_msymbol_special
998                         /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
999 #endif
1000   if (GDB_MULTI_ARCH)
1001     fprintf_unfiltered (file,
1002                         "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
1003                         (long) current_gdbarch->construct_inferior_arguments);
1004 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
1005   fprintf_unfiltered (file,
1006                       "gdbarch_dump: %s # %s\n",
1007                       "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1008                       XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr)));
1009   if (GDB_MULTI_ARCH)
1010     fprintf_unfiltered (file,
1011                         "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = <0x%08lx>\n",
1012                         (long) current_gdbarch->convert_from_func_ptr_addr
1013                         /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
1014 #endif
1015 #ifdef CONVERT_REGISTER_P
1016   fprintf_unfiltered (file,
1017                       "gdbarch_dump: %s # %s\n",
1018                       "CONVERT_REGISTER_P(regnum)",
1019                       XSTRING (CONVERT_REGISTER_P (regnum)));
1020   if (GDB_MULTI_ARCH)
1021     fprintf_unfiltered (file,
1022                         "gdbarch_dump: CONVERT_REGISTER_P = <0x%08lx>\n",
1023                         (long) current_gdbarch->convert_register_p
1024                         /*CONVERT_REGISTER_P ()*/);
1025 #endif
1026 #ifdef DECR_PC_AFTER_BREAK
1027   fprintf_unfiltered (file,
1028                       "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1029                       XSTRING (DECR_PC_AFTER_BREAK));
1030   fprintf_unfiltered (file,
1031                       "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1032                       (long) DECR_PC_AFTER_BREAK);
1033 #endif
1034 #ifdef DEPRECATED_CALL_DUMMY_STACK_ADJUST_P
1035   fprintf_unfiltered (file,
1036                       "gdbarch_dump: %s # %s\n",
1037                       "DEPRECATED_CALL_DUMMY_STACK_ADJUST_P()",
1038                       XSTRING (DEPRECATED_CALL_DUMMY_STACK_ADJUST_P ()));
1039   fprintf_unfiltered (file,
1040                       "gdbarch_dump: DEPRECATED_CALL_DUMMY_STACK_ADJUST_P() = %d\n",
1041                       DEPRECATED_CALL_DUMMY_STACK_ADJUST_P ());
1042 #endif
1043 #ifdef DEPRECATED_CALL_DUMMY_STACK_ADJUST
1044   fprintf_unfiltered (file,
1045                       "gdbarch_dump: DEPRECATED_CALL_DUMMY_STACK_ADJUST # %s\n",
1046                       XSTRING (DEPRECATED_CALL_DUMMY_STACK_ADJUST));
1047   fprintf_unfiltered (file,
1048                       "gdbarch_dump: DEPRECATED_CALL_DUMMY_STACK_ADJUST = %d\n",
1049                       DEPRECATED_CALL_DUMMY_STACK_ADJUST);
1050 #endif
1051 #ifdef DEPRECATED_DO_REGISTERS_INFO_P
1052   fprintf_unfiltered (file,
1053                       "gdbarch_dump: %s # %s\n",
1054                       "DEPRECATED_DO_REGISTERS_INFO_P()",
1055                       XSTRING (DEPRECATED_DO_REGISTERS_INFO_P ()));
1056   fprintf_unfiltered (file,
1057                       "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO_P() = %d\n",
1058                       DEPRECATED_DO_REGISTERS_INFO_P ());
1059 #endif
1060 #ifdef DEPRECATED_DO_REGISTERS_INFO
1061 #if GDB_MULTI_ARCH
1062   /* Macro might contain `[{}]' when not multi-arch */
1063   fprintf_unfiltered (file,
1064                       "gdbarch_dump: %s # %s\n",
1065                       "DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs)",
1066                       XSTRING (DEPRECATED_DO_REGISTERS_INFO (reg_nr, fpregs)));
1067 #endif
1068   if (GDB_MULTI_ARCH)
1069     fprintf_unfiltered (file,
1070                         "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO = <0x%08lx>\n",
1071                         (long) current_gdbarch->deprecated_do_registers_info
1072                         /*DEPRECATED_DO_REGISTERS_INFO ()*/);
1073 #endif
1074 #ifdef DEPRECATED_DUMMY_WRITE_SP_P
1075   fprintf_unfiltered (file,
1076                       "gdbarch_dump: %s # %s\n",
1077                       "DEPRECATED_DUMMY_WRITE_SP_P()",
1078                       XSTRING (DEPRECATED_DUMMY_WRITE_SP_P ()));
1079   fprintf_unfiltered (file,
1080                       "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP_P() = %d\n",
1081                       DEPRECATED_DUMMY_WRITE_SP_P ());
1082 #endif
1083 #ifdef DEPRECATED_DUMMY_WRITE_SP
1084 #if GDB_MULTI_ARCH
1085   /* Macro might contain `[{}]' when not multi-arch */
1086   fprintf_unfiltered (file,
1087                       "gdbarch_dump: %s # %s\n",
1088                       "DEPRECATED_DUMMY_WRITE_SP(val)",
1089                       XSTRING (DEPRECATED_DUMMY_WRITE_SP (val)));
1090 #endif
1091   if (GDB_MULTI_ARCH)
1092     fprintf_unfiltered (file,
1093                         "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP = <0x%08lx>\n",
1094                         (long) current_gdbarch->deprecated_dummy_write_sp
1095                         /*DEPRECATED_DUMMY_WRITE_SP ()*/);
1096 #endif
1097 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
1098 #if GDB_MULTI_ARCH
1099   /* Macro might contain `[{}]' when not multi-arch */
1100   fprintf_unfiltered (file,
1101                       "gdbarch_dump: %s # %s\n",
1102                       "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1103                       XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type, regbuf, valbuf)));
1104 #endif
1105   if (GDB_MULTI_ARCH)
1106     fprintf_unfiltered (file,
1107                         "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1108                         (long) current_gdbarch->deprecated_extract_return_value
1109                         /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/);
1110 #endif
1111 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P
1112   fprintf_unfiltered (file,
1113                       "gdbarch_dump: %s # %s\n",
1114                       "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P()",
1115                       XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
1116   fprintf_unfiltered (file,
1117                       "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
1118                       DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ());
1119 #endif
1120 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
1121   fprintf_unfiltered (file,
1122                       "gdbarch_dump: %s # %s\n",
1123                       "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1124                       XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regbuf)));
1125   if (GDB_MULTI_ARCH)
1126     fprintf_unfiltered (file,
1127                         "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
1128                         (long) current_gdbarch->deprecated_extract_struct_value_address
1129                         /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1130 #endif
1131 #ifdef DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED
1132   fprintf_unfiltered (file,
1133                       "gdbarch_dump: DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1134                       XSTRING (DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED));
1135   fprintf_unfiltered (file,
1136                       "gdbarch_dump: DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED = %d\n",
1137                       DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED);
1138 #endif
1139 #ifdef DEPRECATED_FP_REGNUM
1140   fprintf_unfiltered (file,
1141                       "gdbarch_dump: DEPRECATED_FP_REGNUM # %s\n",
1142                       XSTRING (DEPRECATED_FP_REGNUM));
1143   fprintf_unfiltered (file,
1144                       "gdbarch_dump: DEPRECATED_FP_REGNUM = %d\n",
1145                       DEPRECATED_FP_REGNUM);
1146 #endif
1147 #ifdef DEPRECATED_FRAME_CHAIN_P
1148   fprintf_unfiltered (file,
1149                       "gdbarch_dump: %s # %s\n",
1150                       "DEPRECATED_FRAME_CHAIN_P()",
1151                       XSTRING (DEPRECATED_FRAME_CHAIN_P ()));
1152   fprintf_unfiltered (file,
1153                       "gdbarch_dump: DEPRECATED_FRAME_CHAIN_P() = %d\n",
1154                       DEPRECATED_FRAME_CHAIN_P ());
1155 #endif
1156 #ifdef DEPRECATED_FRAME_CHAIN
1157   fprintf_unfiltered (file,
1158                       "gdbarch_dump: %s # %s\n",
1159                       "DEPRECATED_FRAME_CHAIN(frame)",
1160                       XSTRING (DEPRECATED_FRAME_CHAIN (frame)));
1161   if (GDB_MULTI_ARCH)
1162     fprintf_unfiltered (file,
1163                         "gdbarch_dump: DEPRECATED_FRAME_CHAIN = <0x%08lx>\n",
1164                         (long) current_gdbarch->deprecated_frame_chain
1165                         /*DEPRECATED_FRAME_CHAIN ()*/);
1166 #endif
1167 #ifdef DEPRECATED_FRAME_CHAIN_VALID_P
1168   fprintf_unfiltered (file,
1169                       "gdbarch_dump: %s # %s\n",
1170                       "DEPRECATED_FRAME_CHAIN_VALID_P()",
1171                       XSTRING (DEPRECATED_FRAME_CHAIN_VALID_P ()));
1172   fprintf_unfiltered (file,
1173                       "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID_P() = %d\n",
1174                       DEPRECATED_FRAME_CHAIN_VALID_P ());
1175 #endif
1176 #ifdef DEPRECATED_FRAME_CHAIN_VALID
1177   fprintf_unfiltered (file,
1178                       "gdbarch_dump: %s # %s\n",
1179                       "DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe)",
1180                       XSTRING (DEPRECATED_FRAME_CHAIN_VALID (chain, thisframe)));
1181   if (GDB_MULTI_ARCH)
1182     fprintf_unfiltered (file,
1183                         "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID = <0x%08lx>\n",
1184                         (long) current_gdbarch->deprecated_frame_chain_valid
1185                         /*DEPRECATED_FRAME_CHAIN_VALID ()*/);
1186 #endif
1187 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS_P
1188   fprintf_unfiltered (file,
1189                       "gdbarch_dump: %s # %s\n",
1190                       "DEPRECATED_FRAME_INIT_SAVED_REGS_P()",
1191                       XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS_P ()));
1192   fprintf_unfiltered (file,
1193                       "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS_P() = %d\n",
1194                       DEPRECATED_FRAME_INIT_SAVED_REGS_P ());
1195 #endif
1196 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS
1197 #if GDB_MULTI_ARCH
1198   /* Macro might contain `[{}]' when not multi-arch */
1199   fprintf_unfiltered (file,
1200                       "gdbarch_dump: %s # %s\n",
1201                       "DEPRECATED_FRAME_INIT_SAVED_REGS(frame)",
1202                       XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS (frame)));
1203 #endif
1204   if (GDB_MULTI_ARCH)
1205     fprintf_unfiltered (file,
1206                         "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS = <0x%08lx>\n",
1207                         (long) current_gdbarch->deprecated_frame_init_saved_regs
1208                         /*DEPRECATED_FRAME_INIT_SAVED_REGS ()*/);
1209 #endif
1210 #ifdef DEPRECATED_FRAME_SAVED_PC_P
1211   fprintf_unfiltered (file,
1212                       "gdbarch_dump: %s # %s\n",
1213                       "DEPRECATED_FRAME_SAVED_PC_P()",
1214                       XSTRING (DEPRECATED_FRAME_SAVED_PC_P ()));
1215   fprintf_unfiltered (file,
1216                       "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC_P() = %d\n",
1217                       DEPRECATED_FRAME_SAVED_PC_P ());
1218 #endif
1219 #ifdef DEPRECATED_FRAME_SAVED_PC
1220   fprintf_unfiltered (file,
1221                       "gdbarch_dump: %s # %s\n",
1222                       "DEPRECATED_FRAME_SAVED_PC(fi)",
1223                       XSTRING (DEPRECATED_FRAME_SAVED_PC (fi)));
1224   if (GDB_MULTI_ARCH)
1225     fprintf_unfiltered (file,
1226                         "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC = <0x%08lx>\n",
1227                         (long) current_gdbarch->deprecated_frame_saved_pc
1228                         /*DEPRECATED_FRAME_SAVED_PC ()*/);
1229 #endif
1230 #ifdef DEPRECATED_GET_SAVED_REGISTER_P
1231   fprintf_unfiltered (file,
1232                       "gdbarch_dump: %s # %s\n",
1233                       "DEPRECATED_GET_SAVED_REGISTER_P()",
1234                       XSTRING (DEPRECATED_GET_SAVED_REGISTER_P ()));
1235   fprintf_unfiltered (file,
1236                       "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER_P() = %d\n",
1237                       DEPRECATED_GET_SAVED_REGISTER_P ());
1238 #endif
1239 #ifdef DEPRECATED_GET_SAVED_REGISTER
1240 #if GDB_MULTI_ARCH
1241   /* Macro might contain `[{}]' when not multi-arch */
1242   fprintf_unfiltered (file,
1243                       "gdbarch_dump: %s # %s\n",
1244                       "DEPRECATED_GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1245                       XSTRING (DEPRECATED_GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval)));
1246 #endif
1247   if (GDB_MULTI_ARCH)
1248     fprintf_unfiltered (file,
1249                         "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER = <0x%08lx>\n",
1250                         (long) current_gdbarch->deprecated_get_saved_register
1251                         /*DEPRECATED_GET_SAVED_REGISTER ()*/);
1252 #endif
1253 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO_P
1254   fprintf_unfiltered (file,
1255                       "gdbarch_dump: %s # %s\n",
1256                       "DEPRECATED_INIT_EXTRA_FRAME_INFO_P()",
1257                       XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO_P ()));
1258   fprintf_unfiltered (file,
1259                       "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO_P() = %d\n",
1260                       DEPRECATED_INIT_EXTRA_FRAME_INFO_P ());
1261 #endif
1262 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO
1263 #if GDB_MULTI_ARCH
1264   /* Macro might contain `[{}]' when not multi-arch */
1265   fprintf_unfiltered (file,
1266                       "gdbarch_dump: %s # %s\n",
1267                       "DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1268                       XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO (fromleaf, frame)));
1269 #endif
1270   if (GDB_MULTI_ARCH)
1271     fprintf_unfiltered (file,
1272                         "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO = <0x%08lx>\n",
1273                         (long) current_gdbarch->deprecated_init_extra_frame_info
1274                         /*DEPRECATED_INIT_EXTRA_FRAME_INFO ()*/);
1275 #endif
1276 #ifdef DEPRECATED_INIT_FRAME_PC_P
1277   fprintf_unfiltered (file,
1278                       "gdbarch_dump: %s # %s\n",
1279                       "DEPRECATED_INIT_FRAME_PC_P()",
1280                       XSTRING (DEPRECATED_INIT_FRAME_PC_P ()));
1281   fprintf_unfiltered (file,
1282                       "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_P() = %d\n",
1283                       DEPRECATED_INIT_FRAME_PC_P ());
1284 #endif
1285 #ifdef DEPRECATED_INIT_FRAME_PC
1286   fprintf_unfiltered (file,
1287                       "gdbarch_dump: %s # %s\n",
1288                       "DEPRECATED_INIT_FRAME_PC(fromleaf, prev)",
1289                       XSTRING (DEPRECATED_INIT_FRAME_PC (fromleaf, prev)));
1290   if (GDB_MULTI_ARCH)
1291     fprintf_unfiltered (file,
1292                         "gdbarch_dump: DEPRECATED_INIT_FRAME_PC = <0x%08lx>\n",
1293                         (long) current_gdbarch->deprecated_init_frame_pc
1294                         /*DEPRECATED_INIT_FRAME_PC ()*/);
1295 #endif
1296 #ifdef DEPRECATED_INIT_FRAME_PC_FIRST_P
1297   fprintf_unfiltered (file,
1298                       "gdbarch_dump: %s # %s\n",
1299                       "DEPRECATED_INIT_FRAME_PC_FIRST_P()",
1300                       XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST_P ()));
1301   fprintf_unfiltered (file,
1302                       "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST_P() = %d\n",
1303                       DEPRECATED_INIT_FRAME_PC_FIRST_P ());
1304 #endif
1305 #ifdef DEPRECATED_INIT_FRAME_PC_FIRST
1306   fprintf_unfiltered (file,
1307                       "gdbarch_dump: %s # %s\n",
1308                       "DEPRECATED_INIT_FRAME_PC_FIRST(fromleaf, prev)",
1309                       XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST (fromleaf, prev)));
1310   if (GDB_MULTI_ARCH)
1311     fprintf_unfiltered (file,
1312                         "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST = <0x%08lx>\n",
1313                         (long) current_gdbarch->deprecated_init_frame_pc_first
1314                         /*DEPRECATED_INIT_FRAME_PC_FIRST ()*/);
1315 #endif
1316 #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE_P
1317   fprintf_unfiltered (file,
1318                       "gdbarch_dump: %s # %s\n",
1319                       "DEPRECATED_MAX_REGISTER_RAW_SIZE_P()",
1320                       XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE_P ()));
1321   fprintf_unfiltered (file,
1322                       "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE_P() = %d\n",
1323                       DEPRECATED_MAX_REGISTER_RAW_SIZE_P ());
1324 #endif
1325 #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE
1326   fprintf_unfiltered (file,
1327                       "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE # %s\n",
1328                       XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE));
1329   fprintf_unfiltered (file,
1330                       "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE = %d\n",
1331                       DEPRECATED_MAX_REGISTER_RAW_SIZE);
1332 #endif
1333 #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P
1334   fprintf_unfiltered (file,
1335                       "gdbarch_dump: %s # %s\n",
1336                       "DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P()",
1337                       XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ()));
1338   fprintf_unfiltered (file,
1339                       "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() = %d\n",
1340                       DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ());
1341 #endif
1342 #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE
1343   fprintf_unfiltered (file,
1344                       "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1345                       XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE));
1346   fprintf_unfiltered (file,
1347                       "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1348                       DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE);
1349 #endif
1350 #ifdef DEPRECATED_PC_IN_CALL_DUMMY_P
1351   fprintf_unfiltered (file,
1352                       "gdbarch_dump: %s # %s\n",
1353                       "DEPRECATED_PC_IN_CALL_DUMMY_P()",
1354                       XSTRING (DEPRECATED_PC_IN_CALL_DUMMY_P ()));
1355   fprintf_unfiltered (file,
1356                       "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY_P() = %d\n",
1357                       DEPRECATED_PC_IN_CALL_DUMMY_P ());
1358 #endif
1359 #ifdef DEPRECATED_PC_IN_CALL_DUMMY
1360   fprintf_unfiltered (file,
1361                       "gdbarch_dump: %s # %s\n",
1362                       "DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1363                       XSTRING (DEPRECATED_PC_IN_CALL_DUMMY (pc, sp, frame_address)));
1364   if (GDB_MULTI_ARCH)
1365     fprintf_unfiltered (file,
1366                         "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY = <0x%08lx>\n",
1367                         (long) current_gdbarch->deprecated_pc_in_call_dummy
1368                         /*DEPRECATED_PC_IN_CALL_DUMMY ()*/);
1369 #endif
1370 #ifdef DEPRECATED_POP_FRAME_P
1371   fprintf_unfiltered (file,
1372                       "gdbarch_dump: %s # %s\n",
1373                       "DEPRECATED_POP_FRAME_P()",
1374                       XSTRING (DEPRECATED_POP_FRAME_P ()));
1375   fprintf_unfiltered (file,
1376                       "gdbarch_dump: DEPRECATED_POP_FRAME_P() = %d\n",
1377                       DEPRECATED_POP_FRAME_P ());
1378 #endif
1379 #ifdef DEPRECATED_POP_FRAME
1380 #if GDB_MULTI_ARCH
1381   /* Macro might contain `[{}]' when not multi-arch */
1382   fprintf_unfiltered (file,
1383                       "gdbarch_dump: %s # %s\n",
1384                       "DEPRECATED_POP_FRAME(-)",
1385                       XSTRING (DEPRECATED_POP_FRAME (-)));
1386 #endif
1387   if (GDB_MULTI_ARCH)
1388     fprintf_unfiltered (file,
1389                         "gdbarch_dump: DEPRECATED_POP_FRAME = <0x%08lx>\n",
1390                         (long) current_gdbarch->deprecated_pop_frame
1391                         /*DEPRECATED_POP_FRAME ()*/);
1392 #endif
1393 #ifdef DEPRECATED_PUSH_ARGUMENTS_P
1394   fprintf_unfiltered (file,
1395                       "gdbarch_dump: %s # %s\n",
1396                       "DEPRECATED_PUSH_ARGUMENTS_P()",
1397                       XSTRING (DEPRECATED_PUSH_ARGUMENTS_P ()));
1398   fprintf_unfiltered (file,
1399                       "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS_P() = %d\n",
1400                       DEPRECATED_PUSH_ARGUMENTS_P ());
1401 #endif
1402 #ifdef DEPRECATED_PUSH_ARGUMENTS
1403   fprintf_unfiltered (file,
1404                       "gdbarch_dump: %s # %s\n",
1405                       "DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1406                       XSTRING (DEPRECATED_PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr)));
1407   if (GDB_MULTI_ARCH)
1408     fprintf_unfiltered (file,
1409                         "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS = <0x%08lx>\n",
1410                         (long) current_gdbarch->deprecated_push_arguments
1411                         /*DEPRECATED_PUSH_ARGUMENTS ()*/);
1412 #endif
1413 #ifdef DEPRECATED_PUSH_DUMMY_FRAME_P
1414   fprintf_unfiltered (file,
1415                       "gdbarch_dump: %s # %s\n",
1416                       "DEPRECATED_PUSH_DUMMY_FRAME_P()",
1417                       XSTRING (DEPRECATED_PUSH_DUMMY_FRAME_P ()));
1418   fprintf_unfiltered (file,
1419                       "gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME_P() = %d\n",
1420                       DEPRECATED_PUSH_DUMMY_FRAME_P ());
1421 #endif
1422 #ifdef DEPRECATED_PUSH_DUMMY_FRAME
1423 #if GDB_MULTI_ARCH
1424   /* Macro might contain `[{}]' when not multi-arch */
1425   fprintf_unfiltered (file,
1426                       "gdbarch_dump: %s # %s\n",
1427                       "DEPRECATED_PUSH_DUMMY_FRAME(-)",
1428                       XSTRING (DEPRECATED_PUSH_DUMMY_FRAME (-)));
1429 #endif
1430   if (GDB_MULTI_ARCH)
1431     fprintf_unfiltered (file,
1432                         "gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME = <0x%08lx>\n",
1433                         (long) current_gdbarch->deprecated_push_dummy_frame
1434                         /*DEPRECATED_PUSH_DUMMY_FRAME ()*/);
1435 #endif
1436 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS_P
1437   fprintf_unfiltered (file,
1438                       "gdbarch_dump: %s # %s\n",
1439                       "DEPRECATED_PUSH_RETURN_ADDRESS_P()",
1440                       XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS_P ()));
1441   fprintf_unfiltered (file,
1442                       "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS_P() = %d\n",
1443                       DEPRECATED_PUSH_RETURN_ADDRESS_P ());
1444 #endif
1445 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS
1446   fprintf_unfiltered (file,
1447                       "gdbarch_dump: %s # %s\n",
1448                       "DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp)",
1449                       XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS (pc, sp)));
1450   if (GDB_MULTI_ARCH)
1451     fprintf_unfiltered (file,
1452                         "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS = <0x%08lx>\n",
1453                         (long) current_gdbarch->deprecated_push_return_address
1454                         /*DEPRECATED_PUSH_RETURN_ADDRESS ()*/);
1455 #endif
1456 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL_P
1457   fprintf_unfiltered (file,
1458                       "gdbarch_dump: %s # %s\n",
1459                       "DEPRECATED_SAVED_PC_AFTER_CALL_P()",
1460                       XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL_P ()));
1461   fprintf_unfiltered (file,
1462                       "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL_P() = %d\n",
1463                       DEPRECATED_SAVED_PC_AFTER_CALL_P ());
1464 #endif
1465 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL
1466   fprintf_unfiltered (file,
1467                       "gdbarch_dump: %s # %s\n",
1468                       "DEPRECATED_SAVED_PC_AFTER_CALL(frame)",
1469                       XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL (frame)));
1470   if (GDB_MULTI_ARCH)
1471     fprintf_unfiltered (file,
1472                         "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL = <0x%08lx>\n",
1473                         (long) current_gdbarch->deprecated_saved_pc_after_call
1474                         /*DEPRECATED_SAVED_PC_AFTER_CALL ()*/);
1475 #endif
1476 #ifdef DEPRECATED_STORE_RETURN_VALUE
1477 #if GDB_MULTI_ARCH
1478   /* Macro might contain `[{}]' when not multi-arch */
1479   fprintf_unfiltered (file,
1480                       "gdbarch_dump: %s # %s\n",
1481                       "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
1482                       XSTRING (DEPRECATED_STORE_RETURN_VALUE (type, valbuf)));
1483 #endif
1484   if (GDB_MULTI_ARCH)
1485     fprintf_unfiltered (file,
1486                         "gdbarch_dump: DEPRECATED_STORE_RETURN_VALUE = <0x%08lx>\n",
1487                         (long) current_gdbarch->deprecated_store_return_value
1488                         /*DEPRECATED_STORE_RETURN_VALUE ()*/);
1489 #endif
1490 #ifdef DEPRECATED_STORE_STRUCT_RETURN_P
1491   fprintf_unfiltered (file,
1492                       "gdbarch_dump: %s # %s\n",
1493                       "DEPRECATED_STORE_STRUCT_RETURN_P()",
1494                       XSTRING (DEPRECATED_STORE_STRUCT_RETURN_P ()));
1495   fprintf_unfiltered (file,
1496                       "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN_P() = %d\n",
1497                       DEPRECATED_STORE_STRUCT_RETURN_P ());
1498 #endif
1499 #ifdef DEPRECATED_STORE_STRUCT_RETURN
1500 #if GDB_MULTI_ARCH
1501   /* Macro might contain `[{}]' when not multi-arch */
1502   fprintf_unfiltered (file,
1503                       "gdbarch_dump: %s # %s\n",
1504                       "DEPRECATED_STORE_STRUCT_RETURN(addr, sp)",
1505                       XSTRING (DEPRECATED_STORE_STRUCT_RETURN (addr, sp)));
1506 #endif
1507   if (GDB_MULTI_ARCH)
1508     fprintf_unfiltered (file,
1509                         "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN = <0x%08lx>\n",
1510                         (long) current_gdbarch->deprecated_store_struct_return
1511                         /*DEPRECATED_STORE_STRUCT_RETURN ()*/);
1512 #endif
1513 #ifdef DEPRECATED_TARGET_READ_FP_P
1514   fprintf_unfiltered (file,
1515                       "gdbarch_dump: %s # %s\n",
1516                       "DEPRECATED_TARGET_READ_FP_P()",
1517                       XSTRING (DEPRECATED_TARGET_READ_FP_P ()));
1518   fprintf_unfiltered (file,
1519                       "gdbarch_dump: DEPRECATED_TARGET_READ_FP_P() = %d\n",
1520                       DEPRECATED_TARGET_READ_FP_P ());
1521 #endif
1522 #ifdef DEPRECATED_TARGET_READ_FP
1523   fprintf_unfiltered (file,
1524                       "gdbarch_dump: %s # %s\n",
1525                       "DEPRECATED_TARGET_READ_FP()",
1526                       XSTRING (DEPRECATED_TARGET_READ_FP ()));
1527   if (GDB_MULTI_ARCH)
1528     fprintf_unfiltered (file,
1529                         "gdbarch_dump: DEPRECATED_TARGET_READ_FP = <0x%08lx>\n",
1530                         (long) current_gdbarch->deprecated_target_read_fp
1531                         /*DEPRECATED_TARGET_READ_FP ()*/);
1532 #endif
1533 #ifdef DEPRECATED_USE_GENERIC_DUMMY_FRAMES
1534   fprintf_unfiltered (file,
1535                       "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES # %s\n",
1536                       XSTRING (DEPRECATED_USE_GENERIC_DUMMY_FRAMES));
1537   fprintf_unfiltered (file,
1538                       "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES = %d\n",
1539                       DEPRECATED_USE_GENERIC_DUMMY_FRAMES);
1540 #endif
1541 #ifdef DWARF2_BUILD_FRAME_INFO_P
1542   fprintf_unfiltered (file,
1543                       "gdbarch_dump: %s # %s\n",
1544                       "DWARF2_BUILD_FRAME_INFO_P()",
1545                       XSTRING (DWARF2_BUILD_FRAME_INFO_P ()));
1546   fprintf_unfiltered (file,
1547                       "gdbarch_dump: DWARF2_BUILD_FRAME_INFO_P() = %d\n",
1548                       DWARF2_BUILD_FRAME_INFO_P ());
1549 #endif
1550 #ifdef DWARF2_BUILD_FRAME_INFO
1551 #if GDB_MULTI_ARCH
1552   /* Macro might contain `[{}]' when not multi-arch */
1553   fprintf_unfiltered (file,
1554                       "gdbarch_dump: %s # %s\n",
1555                       "DWARF2_BUILD_FRAME_INFO(objfile)",
1556                       XSTRING (DWARF2_BUILD_FRAME_INFO (objfile)));
1557 #endif
1558   if (GDB_MULTI_ARCH)
1559     fprintf_unfiltered (file,
1560                         "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = <0x%08lx>\n",
1561                         (long) current_gdbarch->dwarf2_build_frame_info
1562                         /*DWARF2_BUILD_FRAME_INFO ()*/);
1563 #endif
1564 #ifdef DWARF2_REG_TO_REGNUM
1565   fprintf_unfiltered (file,
1566                       "gdbarch_dump: %s # %s\n",
1567                       "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1568                       XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr)));
1569   if (GDB_MULTI_ARCH)
1570     fprintf_unfiltered (file,
1571                         "gdbarch_dump: DWARF2_REG_TO_REGNUM = <0x%08lx>\n",
1572                         (long) current_gdbarch->dwarf2_reg_to_regnum
1573                         /*DWARF2_REG_TO_REGNUM ()*/);
1574 #endif
1575 #ifdef DWARF_REG_TO_REGNUM
1576   fprintf_unfiltered (file,
1577                       "gdbarch_dump: %s # %s\n",
1578                       "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1579                       XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr)));
1580   if (GDB_MULTI_ARCH)
1581     fprintf_unfiltered (file,
1582                         "gdbarch_dump: DWARF_REG_TO_REGNUM = <0x%08lx>\n",
1583                         (long) current_gdbarch->dwarf_reg_to_regnum
1584                         /*DWARF_REG_TO_REGNUM ()*/);
1585 #endif
1586 #ifdef ECOFF_REG_TO_REGNUM
1587   fprintf_unfiltered (file,
1588                       "gdbarch_dump: %s # %s\n",
1589                       "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1590                       XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr)));
1591   if (GDB_MULTI_ARCH)
1592     fprintf_unfiltered (file,
1593                         "gdbarch_dump: ECOFF_REG_TO_REGNUM = <0x%08lx>\n",
1594                         (long) current_gdbarch->ecoff_reg_to_regnum
1595                         /*ECOFF_REG_TO_REGNUM ()*/);
1596 #endif
1597 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1598 #if GDB_MULTI_ARCH
1599   /* Macro might contain `[{}]' when not multi-arch */
1600   fprintf_unfiltered (file,
1601                       "gdbarch_dump: %s # %s\n",
1602                       "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1603                       XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym, msym)));
1604 #endif
1605   if (GDB_MULTI_ARCH)
1606     fprintf_unfiltered (file,
1607                         "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
1608                         (long) current_gdbarch->elf_make_msymbol_special
1609                         /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1610 #endif
1611 #ifdef EXTRACT_RETURN_VALUE
1612 #if GDB_MULTI_ARCH
1613   /* Macro might contain `[{}]' when not multi-arch */
1614   fprintf_unfiltered (file,
1615                       "gdbarch_dump: %s # %s\n",
1616                       "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1617                       XSTRING (EXTRACT_RETURN_VALUE (type, regcache, valbuf)));
1618 #endif
1619   if (GDB_MULTI_ARCH)
1620     fprintf_unfiltered (file,
1621                         "gdbarch_dump: EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1622                         (long) current_gdbarch->extract_return_value
1623                         /*EXTRACT_RETURN_VALUE ()*/);
1624 #endif
1625 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS_P
1626   fprintf_unfiltered (file,
1627                       "gdbarch_dump: %s # %s\n",
1628                       "EXTRACT_STRUCT_VALUE_ADDRESS_P()",
1629                       XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
1630   fprintf_unfiltered (file,
1631                       "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
1632                       EXTRACT_STRUCT_VALUE_ADDRESS_P ());
1633 #endif
1634 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1635   fprintf_unfiltered (file,
1636                       "gdbarch_dump: %s # %s\n",
1637                       "EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
1638                       XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regcache)));
1639   if (GDB_MULTI_ARCH)
1640     fprintf_unfiltered (file,
1641                         "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
1642                         (long) current_gdbarch->extract_struct_value_address
1643                         /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1644 #endif
1645 #ifdef FIX_CALL_DUMMY_P
1646   fprintf_unfiltered (file,
1647                       "gdbarch_dump: %s # %s\n",
1648                       "FIX_CALL_DUMMY_P()",
1649                       XSTRING (FIX_CALL_DUMMY_P ()));
1650   fprintf_unfiltered (file,
1651                       "gdbarch_dump: FIX_CALL_DUMMY_P() = %d\n",
1652                       FIX_CALL_DUMMY_P ());
1653 #endif
1654 #ifdef FIX_CALL_DUMMY
1655 #if GDB_MULTI_ARCH
1656   /* Macro might contain `[{}]' when not multi-arch */
1657   fprintf_unfiltered (file,
1658                       "gdbarch_dump: %s # %s\n",
1659                       "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1660                       XSTRING (FIX_CALL_DUMMY (dummy, pc, fun, nargs, args, type, gcc_p)));
1661 #endif
1662   if (GDB_MULTI_ARCH)
1663     fprintf_unfiltered (file,
1664                         "gdbarch_dump: FIX_CALL_DUMMY = <0x%08lx>\n",
1665                         (long) current_gdbarch->fix_call_dummy
1666                         /*FIX_CALL_DUMMY ()*/);
1667 #endif
1668 #ifdef FP0_REGNUM
1669   fprintf_unfiltered (file,
1670                       "gdbarch_dump: FP0_REGNUM # %s\n",
1671                       XSTRING (FP0_REGNUM));
1672   fprintf_unfiltered (file,
1673                       "gdbarch_dump: FP0_REGNUM = %d\n",
1674                       FP0_REGNUM);
1675 #endif
1676 #ifdef FRAMELESS_FUNCTION_INVOCATION
1677   fprintf_unfiltered (file,
1678                       "gdbarch_dump: %s # %s\n",
1679                       "FRAMELESS_FUNCTION_INVOCATION(fi)",
1680                       XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi)));
1681   if (GDB_MULTI_ARCH)
1682     fprintf_unfiltered (file,
1683                         "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = <0x%08lx>\n",
1684                         (long) current_gdbarch->frameless_function_invocation
1685                         /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1686 #endif
1687 #ifdef FRAME_ARGS_ADDRESS
1688   fprintf_unfiltered (file,
1689                       "gdbarch_dump: %s # %s\n",
1690                       "FRAME_ARGS_ADDRESS(fi)",
1691                       XSTRING (FRAME_ARGS_ADDRESS (fi)));
1692   if (GDB_MULTI_ARCH)
1693     fprintf_unfiltered (file,
1694                         "gdbarch_dump: FRAME_ARGS_ADDRESS = <0x%08lx>\n",
1695                         (long) current_gdbarch->frame_args_address
1696                         /*FRAME_ARGS_ADDRESS ()*/);
1697 #endif
1698 #ifdef FRAME_ARGS_SKIP
1699   fprintf_unfiltered (file,
1700                       "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1701                       XSTRING (FRAME_ARGS_SKIP));
1702   fprintf_unfiltered (file,
1703                       "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1704                       (long) FRAME_ARGS_SKIP);
1705 #endif
1706 #ifdef FRAME_LOCALS_ADDRESS
1707   fprintf_unfiltered (file,
1708                       "gdbarch_dump: %s # %s\n",
1709                       "FRAME_LOCALS_ADDRESS(fi)",
1710                       XSTRING (FRAME_LOCALS_ADDRESS (fi)));
1711   if (GDB_MULTI_ARCH)
1712     fprintf_unfiltered (file,
1713                         "gdbarch_dump: FRAME_LOCALS_ADDRESS = <0x%08lx>\n",
1714                         (long) current_gdbarch->frame_locals_address
1715                         /*FRAME_LOCALS_ADDRESS ()*/);
1716 #endif
1717 #ifdef FRAME_NUM_ARGS
1718   fprintf_unfiltered (file,
1719                       "gdbarch_dump: %s # %s\n",
1720                       "FRAME_NUM_ARGS(frame)",
1721                       XSTRING (FRAME_NUM_ARGS (frame)));
1722   if (GDB_MULTI_ARCH)
1723     fprintf_unfiltered (file,
1724                         "gdbarch_dump: FRAME_NUM_ARGS = <0x%08lx>\n",
1725                         (long) current_gdbarch->frame_num_args
1726                         /*FRAME_NUM_ARGS ()*/);
1727 #endif
1728 #ifdef FUNCTION_START_OFFSET
1729   fprintf_unfiltered (file,
1730                       "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1731                       XSTRING (FUNCTION_START_OFFSET));
1732   fprintf_unfiltered (file,
1733                       "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1734                       (long) FUNCTION_START_OFFSET);
1735 #endif
1736 #ifdef GET_LONGJMP_TARGET_P
1737   fprintf_unfiltered (file,
1738                       "gdbarch_dump: %s # %s\n",
1739                       "GET_LONGJMP_TARGET_P()",
1740                       XSTRING (GET_LONGJMP_TARGET_P ()));
1741   fprintf_unfiltered (file,
1742                       "gdbarch_dump: GET_LONGJMP_TARGET_P() = %d\n",
1743                       GET_LONGJMP_TARGET_P ());
1744 #endif
1745 #ifdef GET_LONGJMP_TARGET
1746   fprintf_unfiltered (file,
1747                       "gdbarch_dump: %s # %s\n",
1748                       "GET_LONGJMP_TARGET(pc)",
1749                       XSTRING (GET_LONGJMP_TARGET (pc)));
1750   if (GDB_MULTI_ARCH)
1751     fprintf_unfiltered (file,
1752                         "gdbarch_dump: GET_LONGJMP_TARGET = <0x%08lx>\n",
1753                         (long) current_gdbarch->get_longjmp_target
1754                         /*GET_LONGJMP_TARGET ()*/);
1755 #endif
1756 #ifdef HAVE_NONSTEPPABLE_WATCHPOINT
1757   fprintf_unfiltered (file,
1758                       "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
1759                       XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT));
1760   fprintf_unfiltered (file,
1761                       "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT = %d\n",
1762                       HAVE_NONSTEPPABLE_WATCHPOINT);
1763 #endif
1764 #ifdef INNER_THAN
1765   fprintf_unfiltered (file,
1766                       "gdbarch_dump: %s # %s\n",
1767                       "INNER_THAN(lhs, rhs)",
1768                       XSTRING (INNER_THAN (lhs, rhs)));
1769   if (GDB_MULTI_ARCH)
1770     fprintf_unfiltered (file,
1771                         "gdbarch_dump: INNER_THAN = <0x%08lx>\n",
1772                         (long) current_gdbarch->inner_than
1773                         /*INNER_THAN ()*/);
1774 #endif
1775 #ifdef INTEGER_TO_ADDRESS_P
1776   fprintf_unfiltered (file,
1777                       "gdbarch_dump: %s # %s\n",
1778                       "INTEGER_TO_ADDRESS_P()",
1779                       XSTRING (INTEGER_TO_ADDRESS_P ()));
1780   fprintf_unfiltered (file,
1781                       "gdbarch_dump: INTEGER_TO_ADDRESS_P() = %d\n",
1782                       INTEGER_TO_ADDRESS_P ());
1783 #endif
1784 #ifdef INTEGER_TO_ADDRESS
1785   fprintf_unfiltered (file,
1786                       "gdbarch_dump: %s # %s\n",
1787                       "INTEGER_TO_ADDRESS(type, buf)",
1788                       XSTRING (INTEGER_TO_ADDRESS (type, buf)));
1789   if (GDB_MULTI_ARCH)
1790     fprintf_unfiltered (file,
1791                         "gdbarch_dump: INTEGER_TO_ADDRESS = <0x%08lx>\n",
1792                         (long) current_gdbarch->integer_to_address
1793                         /*INTEGER_TO_ADDRESS ()*/);
1794 #endif
1795 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1796   fprintf_unfiltered (file,
1797                       "gdbarch_dump: %s # %s\n",
1798                       "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1799                       XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc, name)));
1800   if (GDB_MULTI_ARCH)
1801     fprintf_unfiltered (file,
1802                         "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = <0x%08lx>\n",
1803                         (long) current_gdbarch->in_solib_call_trampoline
1804                         /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1805 #endif
1806 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
1807   fprintf_unfiltered (file,
1808                       "gdbarch_dump: %s # %s\n",
1809                       "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1810                       XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc, name)));
1811   if (GDB_MULTI_ARCH)
1812     fprintf_unfiltered (file,
1813                         "gdbarch_dump: IN_SOLIB_RETURN_TRAMPOLINE = <0x%08lx>\n",
1814                         (long) current_gdbarch->in_solib_return_trampoline
1815                         /*IN_SOLIB_RETURN_TRAMPOLINE ()*/);
1816 #endif
1817 #ifdef MEMORY_INSERT_BREAKPOINT
1818   fprintf_unfiltered (file,
1819                       "gdbarch_dump: %s # %s\n",
1820                       "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1821                       XSTRING (MEMORY_INSERT_BREAKPOINT (addr, contents_cache)));
1822   if (GDB_MULTI_ARCH)
1823     fprintf_unfiltered (file,
1824                         "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = <0x%08lx>\n",
1825                         (long) current_gdbarch->memory_insert_breakpoint
1826                         /*MEMORY_INSERT_BREAKPOINT ()*/);
1827 #endif
1828 #ifdef MEMORY_REMOVE_BREAKPOINT
1829   fprintf_unfiltered (file,
1830                       "gdbarch_dump: %s # %s\n",
1831                       "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1832                       XSTRING (MEMORY_REMOVE_BREAKPOINT (addr, contents_cache)));
1833   if (GDB_MULTI_ARCH)
1834     fprintf_unfiltered (file,
1835                         "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = <0x%08lx>\n",
1836                         (long) current_gdbarch->memory_remove_breakpoint
1837                         /*MEMORY_REMOVE_BREAKPOINT ()*/);
1838 #endif
1839 #ifdef NAME_OF_MALLOC
1840   fprintf_unfiltered (file,
1841                       "gdbarch_dump: NAME_OF_MALLOC # %s\n",
1842                       XSTRING (NAME_OF_MALLOC));
1843   fprintf_unfiltered (file,
1844                       "gdbarch_dump: NAME_OF_MALLOC = %s\n",
1845                       NAME_OF_MALLOC);
1846 #endif
1847 #ifdef NPC_REGNUM
1848   fprintf_unfiltered (file,
1849                       "gdbarch_dump: NPC_REGNUM # %s\n",
1850                       XSTRING (NPC_REGNUM));
1851   fprintf_unfiltered (file,
1852                       "gdbarch_dump: NPC_REGNUM = %d\n",
1853                       NPC_REGNUM);
1854 #endif
1855 #ifdef NUM_PSEUDO_REGS
1856   fprintf_unfiltered (file,
1857                       "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1858                       XSTRING (NUM_PSEUDO_REGS));
1859   fprintf_unfiltered (file,
1860                       "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1861                       NUM_PSEUDO_REGS);
1862 #endif
1863 #ifdef NUM_REGS
1864   fprintf_unfiltered (file,
1865                       "gdbarch_dump: NUM_REGS # %s\n",
1866                       XSTRING (NUM_REGS));
1867   fprintf_unfiltered (file,
1868                       "gdbarch_dump: NUM_REGS = %d\n",
1869                       NUM_REGS);
1870 #endif
1871 #ifdef PARM_BOUNDARY
1872   fprintf_unfiltered (file,
1873                       "gdbarch_dump: PARM_BOUNDARY # %s\n",
1874                       XSTRING (PARM_BOUNDARY));
1875   fprintf_unfiltered (file,
1876                       "gdbarch_dump: PARM_BOUNDARY = %d\n",
1877                       PARM_BOUNDARY);
1878 #endif
1879 #ifdef PC_IN_SIGTRAMP
1880   fprintf_unfiltered (file,
1881                       "gdbarch_dump: %s # %s\n",
1882                       "PC_IN_SIGTRAMP(pc, name)",
1883                       XSTRING (PC_IN_SIGTRAMP (pc, name)));
1884   if (GDB_MULTI_ARCH)
1885     fprintf_unfiltered (file,
1886                         "gdbarch_dump: PC_IN_SIGTRAMP = <0x%08lx>\n",
1887                         (long) current_gdbarch->pc_in_sigtramp
1888                         /*PC_IN_SIGTRAMP ()*/);
1889 #endif
1890 #ifdef PC_REGNUM
1891   fprintf_unfiltered (file,
1892                       "gdbarch_dump: PC_REGNUM # %s\n",
1893                       XSTRING (PC_REGNUM));
1894   fprintf_unfiltered (file,
1895                       "gdbarch_dump: PC_REGNUM = %d\n",
1896                       PC_REGNUM);
1897 #endif
1898 #ifdef POINTER_TO_ADDRESS
1899   fprintf_unfiltered (file,
1900                       "gdbarch_dump: %s # %s\n",
1901                       "POINTER_TO_ADDRESS(type, buf)",
1902                       XSTRING (POINTER_TO_ADDRESS (type, buf)));
1903   if (GDB_MULTI_ARCH)
1904     fprintf_unfiltered (file,
1905                         "gdbarch_dump: POINTER_TO_ADDRESS = <0x%08lx>\n",
1906                         (long) current_gdbarch->pointer_to_address
1907                         /*POINTER_TO_ADDRESS ()*/);
1908 #endif
1909 #ifdef PREPARE_TO_PROCEED
1910   fprintf_unfiltered (file,
1911                       "gdbarch_dump: %s # %s\n",
1912                       "PREPARE_TO_PROCEED(select_it)",
1913                       XSTRING (PREPARE_TO_PROCEED (select_it)));
1914   if (GDB_MULTI_ARCH)
1915     fprintf_unfiltered (file,
1916                         "gdbarch_dump: PREPARE_TO_PROCEED = <0x%08lx>\n",
1917                         (long) current_gdbarch->prepare_to_proceed
1918                         /*PREPARE_TO_PROCEED ()*/);
1919 #endif
1920   if (GDB_MULTI_ARCH)
1921     fprintf_unfiltered (file,
1922                         "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
1923                         gdbarch_print_float_info_p (current_gdbarch));
1924   if (GDB_MULTI_ARCH)
1925     fprintf_unfiltered (file,
1926                         "gdbarch_dump: print_float_info = 0x%08lx\n",
1927                         (long) current_gdbarch->print_float_info);
1928   if (GDB_MULTI_ARCH)
1929     fprintf_unfiltered (file,
1930                         "gdbarch_dump: print_registers_info = 0x%08lx\n",
1931                         (long) current_gdbarch->print_registers_info);
1932   if (GDB_MULTI_ARCH)
1933     fprintf_unfiltered (file,
1934                         "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1935                         gdbarch_print_vector_info_p (current_gdbarch));
1936   if (GDB_MULTI_ARCH)
1937     fprintf_unfiltered (file,
1938                         "gdbarch_dump: print_vector_info = 0x%08lx\n",
1939                         (long) current_gdbarch->print_vector_info);
1940 #ifdef PROLOGUE_FRAMELESS_P
1941   fprintf_unfiltered (file,
1942                       "gdbarch_dump: %s # %s\n",
1943                       "PROLOGUE_FRAMELESS_P(ip)",
1944                       XSTRING (PROLOGUE_FRAMELESS_P (ip)));
1945   if (GDB_MULTI_ARCH)
1946     fprintf_unfiltered (file,
1947                         "gdbarch_dump: PROLOGUE_FRAMELESS_P = <0x%08lx>\n",
1948                         (long) current_gdbarch->prologue_frameless_p
1949                         /*PROLOGUE_FRAMELESS_P ()*/);
1950 #endif
1951 #ifdef PS_REGNUM
1952   fprintf_unfiltered (file,
1953                       "gdbarch_dump: PS_REGNUM # %s\n",
1954                       XSTRING (PS_REGNUM));
1955   fprintf_unfiltered (file,
1956                       "gdbarch_dump: PS_REGNUM = %d\n",
1957                       PS_REGNUM);
1958 #endif
1959   if (GDB_MULTI_ARCH)
1960     fprintf_unfiltered (file,
1961                         "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
1962                         gdbarch_push_dummy_call_p (current_gdbarch));
1963   if (GDB_MULTI_ARCH)
1964     fprintf_unfiltered (file,
1965                         "gdbarch_dump: push_dummy_call = 0x%08lx\n",
1966                         (long) current_gdbarch->push_dummy_call);
1967 #ifdef REGISTER_BYTE
1968   fprintf_unfiltered (file,
1969                       "gdbarch_dump: %s # %s\n",
1970                       "REGISTER_BYTE(reg_nr)",
1971                       XSTRING (REGISTER_BYTE (reg_nr)));
1972   if (GDB_MULTI_ARCH)
1973     fprintf_unfiltered (file,
1974                         "gdbarch_dump: REGISTER_BYTE = <0x%08lx>\n",
1975                         (long) current_gdbarch->register_byte
1976                         /*REGISTER_BYTE ()*/);
1977 #endif
1978 #ifdef REGISTER_BYTES
1979   fprintf_unfiltered (file,
1980                       "gdbarch_dump: REGISTER_BYTES # %s\n",
1981                       XSTRING (REGISTER_BYTES));
1982   fprintf_unfiltered (file,
1983                       "gdbarch_dump: REGISTER_BYTES = %d\n",
1984                       REGISTER_BYTES);
1985 #endif
1986 #ifdef REGISTER_BYTES_OK_P
1987   fprintf_unfiltered (file,
1988                       "gdbarch_dump: %s # %s\n",
1989                       "REGISTER_BYTES_OK_P()",
1990                       XSTRING (REGISTER_BYTES_OK_P ()));
1991   fprintf_unfiltered (file,
1992                       "gdbarch_dump: REGISTER_BYTES_OK_P() = %d\n",
1993                       REGISTER_BYTES_OK_P ());
1994 #endif
1995 #ifdef REGISTER_BYTES_OK
1996   fprintf_unfiltered (file,
1997                       "gdbarch_dump: %s # %s\n",
1998                       "REGISTER_BYTES_OK(nr_bytes)",
1999                       XSTRING (REGISTER_BYTES_OK (nr_bytes)));
2000   if (GDB_MULTI_ARCH)
2001     fprintf_unfiltered (file,
2002                         "gdbarch_dump: REGISTER_BYTES_OK = <0x%08lx>\n",
2003                         (long) current_gdbarch->register_bytes_ok
2004                         /*REGISTER_BYTES_OK ()*/);
2005 #endif
2006 #ifdef REGISTER_CONVERTIBLE
2007   fprintf_unfiltered (file,
2008                       "gdbarch_dump: %s # %s\n",
2009                       "REGISTER_CONVERTIBLE(nr)",
2010                       XSTRING (REGISTER_CONVERTIBLE (nr)));
2011   if (GDB_MULTI_ARCH)
2012     fprintf_unfiltered (file,
2013                         "gdbarch_dump: REGISTER_CONVERTIBLE = <0x%08lx>\n",
2014                         (long) current_gdbarch->register_convertible
2015                         /*REGISTER_CONVERTIBLE ()*/);
2016 #endif
2017 #ifdef REGISTER_CONVERT_TO_RAW
2018 #if GDB_MULTI_ARCH
2019   /* Macro might contain `[{}]' when not multi-arch */
2020   fprintf_unfiltered (file,
2021                       "gdbarch_dump: %s # %s\n",
2022                       "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
2023                       XSTRING (REGISTER_CONVERT_TO_RAW (type, regnum, from, to)));
2024 #endif
2025   if (GDB_MULTI_ARCH)
2026     fprintf_unfiltered (file,
2027                         "gdbarch_dump: REGISTER_CONVERT_TO_RAW = <0x%08lx>\n",
2028                         (long) current_gdbarch->register_convert_to_raw
2029                         /*REGISTER_CONVERT_TO_RAW ()*/);
2030 #endif
2031 #ifdef REGISTER_CONVERT_TO_VIRTUAL
2032 #if GDB_MULTI_ARCH
2033   /* Macro might contain `[{}]' when not multi-arch */
2034   fprintf_unfiltered (file,
2035                       "gdbarch_dump: %s # %s\n",
2036                       "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
2037                       XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to)));
2038 #endif
2039   if (GDB_MULTI_ARCH)
2040     fprintf_unfiltered (file,
2041                         "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = <0x%08lx>\n",
2042                         (long) current_gdbarch->register_convert_to_virtual
2043                         /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
2044 #endif
2045 #ifdef REGISTER_NAME
2046   fprintf_unfiltered (file,
2047                       "gdbarch_dump: %s # %s\n",
2048                       "REGISTER_NAME(regnr)",
2049                       XSTRING (REGISTER_NAME (regnr)));
2050   if (GDB_MULTI_ARCH)
2051     fprintf_unfiltered (file,
2052                         "gdbarch_dump: REGISTER_NAME = <0x%08lx>\n",
2053                         (long) current_gdbarch->register_name
2054                         /*REGISTER_NAME ()*/);
2055 #endif
2056 #ifdef REGISTER_RAW_SIZE
2057   fprintf_unfiltered (file,
2058                       "gdbarch_dump: %s # %s\n",
2059                       "REGISTER_RAW_SIZE(reg_nr)",
2060                       XSTRING (REGISTER_RAW_SIZE (reg_nr)));
2061   if (GDB_MULTI_ARCH)
2062     fprintf_unfiltered (file,
2063                         "gdbarch_dump: REGISTER_RAW_SIZE = <0x%08lx>\n",
2064                         (long) current_gdbarch->register_raw_size
2065                         /*REGISTER_RAW_SIZE ()*/);
2066 #endif
2067 #ifdef REGISTER_SIM_REGNO
2068   fprintf_unfiltered (file,
2069                       "gdbarch_dump: %s # %s\n",
2070                       "REGISTER_SIM_REGNO(reg_nr)",
2071                       XSTRING (REGISTER_SIM_REGNO (reg_nr)));
2072   if (GDB_MULTI_ARCH)
2073     fprintf_unfiltered (file,
2074                         "gdbarch_dump: REGISTER_SIM_REGNO = <0x%08lx>\n",
2075                         (long) current_gdbarch->register_sim_regno
2076                         /*REGISTER_SIM_REGNO ()*/);
2077 #endif
2078 #ifdef REGISTER_SIZE
2079   fprintf_unfiltered (file,
2080                       "gdbarch_dump: REGISTER_SIZE # %s\n",
2081                       XSTRING (REGISTER_SIZE));
2082   fprintf_unfiltered (file,
2083                       "gdbarch_dump: REGISTER_SIZE = %d\n",
2084                       REGISTER_SIZE);
2085 #endif
2086 #ifdef REGISTER_TO_VALUE
2087 #if GDB_MULTI_ARCH
2088   /* Macro might contain `[{}]' when not multi-arch */
2089   fprintf_unfiltered (file,
2090                       "gdbarch_dump: %s # %s\n",
2091                       "REGISTER_TO_VALUE(regnum, type, from, to)",
2092                       XSTRING (REGISTER_TO_VALUE (regnum, type, from, to)));
2093 #endif
2094   if (GDB_MULTI_ARCH)
2095     fprintf_unfiltered (file,
2096                         "gdbarch_dump: REGISTER_TO_VALUE = <0x%08lx>\n",
2097                         (long) current_gdbarch->register_to_value
2098                         /*REGISTER_TO_VALUE ()*/);
2099 #endif
2100   if (GDB_MULTI_ARCH)
2101     fprintf_unfiltered (file,
2102                         "gdbarch_dump: gdbarch_register_type_p() = %d\n",
2103                         gdbarch_register_type_p (current_gdbarch));
2104   if (GDB_MULTI_ARCH)
2105     fprintf_unfiltered (file,
2106                         "gdbarch_dump: register_type = 0x%08lx\n",
2107                         (long) current_gdbarch->register_type);
2108 #ifdef REGISTER_VIRTUAL_SIZE
2109   fprintf_unfiltered (file,
2110                       "gdbarch_dump: %s # %s\n",
2111                       "REGISTER_VIRTUAL_SIZE(reg_nr)",
2112                       XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr)));
2113   if (GDB_MULTI_ARCH)
2114     fprintf_unfiltered (file,
2115                         "gdbarch_dump: REGISTER_VIRTUAL_SIZE = <0x%08lx>\n",
2116                         (long) current_gdbarch->register_virtual_size
2117                         /*REGISTER_VIRTUAL_SIZE ()*/);
2118 #endif
2119 #ifdef REGISTER_VIRTUAL_TYPE_P
2120   fprintf_unfiltered (file,
2121                       "gdbarch_dump: %s # %s\n",
2122                       "REGISTER_VIRTUAL_TYPE_P()",
2123                       XSTRING (REGISTER_VIRTUAL_TYPE_P ()));
2124   fprintf_unfiltered (file,
2125                       "gdbarch_dump: REGISTER_VIRTUAL_TYPE_P() = %d\n",
2126                       REGISTER_VIRTUAL_TYPE_P ());
2127 #endif
2128 #ifdef REGISTER_VIRTUAL_TYPE
2129   fprintf_unfiltered (file,
2130                       "gdbarch_dump: %s # %s\n",
2131                       "REGISTER_VIRTUAL_TYPE(reg_nr)",
2132                       XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr)));
2133   if (GDB_MULTI_ARCH)
2134     fprintf_unfiltered (file,
2135                         "gdbarch_dump: REGISTER_VIRTUAL_TYPE = <0x%08lx>\n",
2136                         (long) current_gdbarch->register_virtual_type
2137                         /*REGISTER_VIRTUAL_TYPE ()*/);
2138 #endif
2139 #ifdef REG_STRUCT_HAS_ADDR_P
2140   fprintf_unfiltered (file,
2141                       "gdbarch_dump: %s # %s\n",
2142                       "REG_STRUCT_HAS_ADDR_P()",
2143                       XSTRING (REG_STRUCT_HAS_ADDR_P ()));
2144   fprintf_unfiltered (file,
2145                       "gdbarch_dump: REG_STRUCT_HAS_ADDR_P() = %d\n",
2146                       REG_STRUCT_HAS_ADDR_P ());
2147 #endif
2148 #ifdef REG_STRUCT_HAS_ADDR
2149   fprintf_unfiltered (file,
2150                       "gdbarch_dump: %s # %s\n",
2151                       "REG_STRUCT_HAS_ADDR(gcc_p, type)",
2152                       XSTRING (REG_STRUCT_HAS_ADDR (gcc_p, type)));
2153   if (GDB_MULTI_ARCH)
2154     fprintf_unfiltered (file,
2155                         "gdbarch_dump: REG_STRUCT_HAS_ADDR = <0x%08lx>\n",
2156                         (long) current_gdbarch->reg_struct_has_addr
2157                         /*REG_STRUCT_HAS_ADDR ()*/);
2158 #endif
2159 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
2160 #if GDB_MULTI_ARCH
2161   /* Macro might contain `[{}]' when not multi-arch */
2162   fprintf_unfiltered (file,
2163                       "gdbarch_dump: %s # %s\n",
2164                       "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
2165                       XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr, gdb_len, rem_addr, rem_len)));
2166 #endif
2167   if (GDB_MULTI_ARCH)
2168     fprintf_unfiltered (file,
2169                         "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = <0x%08lx>\n",
2170                         (long) current_gdbarch->remote_translate_xfer_address
2171                         /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
2172 #endif
2173 #ifdef RETURN_VALUE_ON_STACK
2174   fprintf_unfiltered (file,
2175                       "gdbarch_dump: %s # %s\n",
2176                       "RETURN_VALUE_ON_STACK(type)",
2177                       XSTRING (RETURN_VALUE_ON_STACK (type)));
2178   if (GDB_MULTI_ARCH)
2179     fprintf_unfiltered (file,
2180                         "gdbarch_dump: RETURN_VALUE_ON_STACK = <0x%08lx>\n",
2181                         (long) current_gdbarch->return_value_on_stack
2182                         /*RETURN_VALUE_ON_STACK ()*/);
2183 #endif
2184 #ifdef SAVE_DUMMY_FRAME_TOS_P
2185   fprintf_unfiltered (file,
2186                       "gdbarch_dump: %s # %s\n",
2187                       "SAVE_DUMMY_FRAME_TOS_P()",
2188                       XSTRING (SAVE_DUMMY_FRAME_TOS_P ()));
2189   fprintf_unfiltered (file,
2190                       "gdbarch_dump: SAVE_DUMMY_FRAME_TOS_P() = %d\n",
2191                       SAVE_DUMMY_FRAME_TOS_P ());
2192 #endif
2193 #ifdef SAVE_DUMMY_FRAME_TOS
2194 #if GDB_MULTI_ARCH
2195   /* Macro might contain `[{}]' when not multi-arch */
2196   fprintf_unfiltered (file,
2197                       "gdbarch_dump: %s # %s\n",
2198                       "SAVE_DUMMY_FRAME_TOS(sp)",
2199                       XSTRING (SAVE_DUMMY_FRAME_TOS (sp)));
2200 #endif
2201   if (GDB_MULTI_ARCH)
2202     fprintf_unfiltered (file,
2203                         "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = <0x%08lx>\n",
2204                         (long) current_gdbarch->save_dummy_frame_tos
2205                         /*SAVE_DUMMY_FRAME_TOS ()*/);
2206 #endif
2207 #ifdef SDB_REG_TO_REGNUM
2208   fprintf_unfiltered (file,
2209                       "gdbarch_dump: %s # %s\n",
2210                       "SDB_REG_TO_REGNUM(sdb_regnr)",
2211                       XSTRING (SDB_REG_TO_REGNUM (sdb_regnr)));
2212   if (GDB_MULTI_ARCH)
2213     fprintf_unfiltered (file,
2214                         "gdbarch_dump: SDB_REG_TO_REGNUM = <0x%08lx>\n",
2215                         (long) current_gdbarch->sdb_reg_to_regnum
2216                         /*SDB_REG_TO_REGNUM ()*/);
2217 #endif
2218 #ifdef SIGTRAMP_END_P
2219   fprintf_unfiltered (file,
2220                       "gdbarch_dump: %s # %s\n",
2221                       "SIGTRAMP_END_P()",
2222                       XSTRING (SIGTRAMP_END_P ()));
2223   fprintf_unfiltered (file,
2224                       "gdbarch_dump: SIGTRAMP_END_P() = %d\n",
2225                       SIGTRAMP_END_P ());
2226 #endif
2227 #ifdef SIGTRAMP_END
2228   fprintf_unfiltered (file,
2229                       "gdbarch_dump: %s # %s\n",
2230                       "SIGTRAMP_END(pc)",
2231                       XSTRING (SIGTRAMP_END (pc)));
2232   if (GDB_MULTI_ARCH)
2233     fprintf_unfiltered (file,
2234                         "gdbarch_dump: SIGTRAMP_END = <0x%08lx>\n",
2235                         (long) current_gdbarch->sigtramp_end
2236                         /*SIGTRAMP_END ()*/);
2237 #endif
2238 #ifdef SIGTRAMP_START_P
2239   fprintf_unfiltered (file,
2240                       "gdbarch_dump: %s # %s\n",
2241                       "SIGTRAMP_START_P()",
2242                       XSTRING (SIGTRAMP_START_P ()));
2243   fprintf_unfiltered (file,
2244                       "gdbarch_dump: SIGTRAMP_START_P() = %d\n",
2245                       SIGTRAMP_START_P ());
2246 #endif
2247 #ifdef SIGTRAMP_START
2248   fprintf_unfiltered (file,
2249                       "gdbarch_dump: %s # %s\n",
2250                       "SIGTRAMP_START(pc)",
2251                       XSTRING (SIGTRAMP_START (pc)));
2252   if (GDB_MULTI_ARCH)
2253     fprintf_unfiltered (file,
2254                         "gdbarch_dump: SIGTRAMP_START = <0x%08lx>\n",
2255                         (long) current_gdbarch->sigtramp_start
2256                         /*SIGTRAMP_START ()*/);
2257 #endif
2258 #ifdef SIZEOF_CALL_DUMMY_WORDS
2259   fprintf_unfiltered (file,
2260                       "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
2261                       XSTRING (SIZEOF_CALL_DUMMY_WORDS));
2262   fprintf_unfiltered (file,
2263                       "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = %d\n",
2264                       SIZEOF_CALL_DUMMY_WORDS);
2265 #endif
2266 #ifdef SKIP_PROLOGUE
2267   fprintf_unfiltered (file,
2268                       "gdbarch_dump: %s # %s\n",
2269                       "SKIP_PROLOGUE(ip)",
2270                       XSTRING (SKIP_PROLOGUE (ip)));
2271   if (GDB_MULTI_ARCH)
2272     fprintf_unfiltered (file,
2273                         "gdbarch_dump: SKIP_PROLOGUE = <0x%08lx>\n",
2274                         (long) current_gdbarch->skip_prologue
2275                         /*SKIP_PROLOGUE ()*/);
2276 #endif
2277 #ifdef SKIP_TRAMPOLINE_CODE
2278   fprintf_unfiltered (file,
2279                       "gdbarch_dump: %s # %s\n",
2280                       "SKIP_TRAMPOLINE_CODE(pc)",
2281                       XSTRING (SKIP_TRAMPOLINE_CODE (pc)));
2282   if (GDB_MULTI_ARCH)
2283     fprintf_unfiltered (file,
2284                         "gdbarch_dump: SKIP_TRAMPOLINE_CODE = <0x%08lx>\n",
2285                         (long) current_gdbarch->skip_trampoline_code
2286                         /*SKIP_TRAMPOLINE_CODE ()*/);
2287 #endif
2288 #ifdef SMASH_TEXT_ADDRESS
2289   fprintf_unfiltered (file,
2290                       "gdbarch_dump: %s # %s\n",
2291                       "SMASH_TEXT_ADDRESS(addr)",
2292                       XSTRING (SMASH_TEXT_ADDRESS (addr)));
2293   if (GDB_MULTI_ARCH)
2294     fprintf_unfiltered (file,
2295                         "gdbarch_dump: SMASH_TEXT_ADDRESS = <0x%08lx>\n",
2296                         (long) current_gdbarch->smash_text_address
2297                         /*SMASH_TEXT_ADDRESS ()*/);
2298 #endif
2299 #ifdef SOFTWARE_SINGLE_STEP_P
2300   fprintf_unfiltered (file,
2301                       "gdbarch_dump: %s # %s\n",
2302                       "SOFTWARE_SINGLE_STEP_P()",
2303                       XSTRING (SOFTWARE_SINGLE_STEP_P ()));
2304   fprintf_unfiltered (file,
2305                       "gdbarch_dump: SOFTWARE_SINGLE_STEP_P() = %d\n",
2306                       SOFTWARE_SINGLE_STEP_P ());
2307 #endif
2308 #ifdef SOFTWARE_SINGLE_STEP
2309 #if GDB_MULTI_ARCH
2310   /* Macro might contain `[{}]' when not multi-arch */
2311   fprintf_unfiltered (file,
2312                       "gdbarch_dump: %s # %s\n",
2313                       "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
2314                       XSTRING (SOFTWARE_SINGLE_STEP (sig, insert_breakpoints_p)));
2315 #endif
2316   if (GDB_MULTI_ARCH)
2317     fprintf_unfiltered (file,
2318                         "gdbarch_dump: SOFTWARE_SINGLE_STEP = <0x%08lx>\n",
2319                         (long) current_gdbarch->software_single_step
2320                         /*SOFTWARE_SINGLE_STEP ()*/);
2321 #endif
2322 #ifdef SP_REGNUM
2323   fprintf_unfiltered (file,
2324                       "gdbarch_dump: SP_REGNUM # %s\n",
2325                       XSTRING (SP_REGNUM));
2326   fprintf_unfiltered (file,
2327                       "gdbarch_dump: SP_REGNUM = %d\n",
2328                       SP_REGNUM);
2329 #endif
2330 #ifdef STAB_REG_TO_REGNUM
2331   fprintf_unfiltered (file,
2332                       "gdbarch_dump: %s # %s\n",
2333                       "STAB_REG_TO_REGNUM(stab_regnr)",
2334                       XSTRING (STAB_REG_TO_REGNUM (stab_regnr)));
2335   if (GDB_MULTI_ARCH)
2336     fprintf_unfiltered (file,
2337                         "gdbarch_dump: STAB_REG_TO_REGNUM = <0x%08lx>\n",
2338                         (long) current_gdbarch->stab_reg_to_regnum
2339                         /*STAB_REG_TO_REGNUM ()*/);
2340 #endif
2341 #ifdef STACK_ALIGN_P
2342   fprintf_unfiltered (file,
2343                       "gdbarch_dump: %s # %s\n",
2344                       "STACK_ALIGN_P()",
2345                       XSTRING (STACK_ALIGN_P ()));
2346   fprintf_unfiltered (file,
2347                       "gdbarch_dump: STACK_ALIGN_P() = %d\n",
2348                       STACK_ALIGN_P ());
2349 #endif
2350 #ifdef STACK_ALIGN
2351   fprintf_unfiltered (file,
2352                       "gdbarch_dump: %s # %s\n",
2353                       "STACK_ALIGN(sp)",
2354                       XSTRING (STACK_ALIGN (sp)));
2355   if (GDB_MULTI_ARCH)
2356     fprintf_unfiltered (file,
2357                         "gdbarch_dump: STACK_ALIGN = <0x%08lx>\n",
2358                         (long) current_gdbarch->stack_align
2359                         /*STACK_ALIGN ()*/);
2360 #endif
2361 #ifdef STORE_RETURN_VALUE
2362 #if GDB_MULTI_ARCH
2363   /* Macro might contain `[{}]' when not multi-arch */
2364   fprintf_unfiltered (file,
2365                       "gdbarch_dump: %s # %s\n",
2366                       "STORE_RETURN_VALUE(type, regcache, valbuf)",
2367                       XSTRING (STORE_RETURN_VALUE (type, regcache, valbuf)));
2368 #endif
2369   if (GDB_MULTI_ARCH)
2370     fprintf_unfiltered (file,
2371                         "gdbarch_dump: STORE_RETURN_VALUE = <0x%08lx>\n",
2372                         (long) current_gdbarch->store_return_value
2373                         /*STORE_RETURN_VALUE ()*/);
2374 #endif
2375 #ifdef TARGET_ADDR_BIT
2376   fprintf_unfiltered (file,
2377                       "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
2378                       XSTRING (TARGET_ADDR_BIT));
2379   fprintf_unfiltered (file,
2380                       "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
2381                       TARGET_ADDR_BIT);
2382 #endif
2383 #ifdef TARGET_ARCHITECTURE
2384   fprintf_unfiltered (file,
2385                       "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
2386                       XSTRING (TARGET_ARCHITECTURE));
2387   if (TARGET_ARCHITECTURE != NULL)
2388     fprintf_unfiltered (file,
2389                         "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
2390                         TARGET_ARCHITECTURE->printable_name);
2391 #endif
2392 #ifdef TARGET_BFD_VMA_BIT
2393   fprintf_unfiltered (file,
2394                       "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
2395                       XSTRING (TARGET_BFD_VMA_BIT));
2396   fprintf_unfiltered (file,
2397                       "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
2398                       TARGET_BFD_VMA_BIT);
2399 #endif
2400 #ifdef TARGET_BYTE_ORDER
2401   fprintf_unfiltered (file,
2402                       "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
2403                       XSTRING (TARGET_BYTE_ORDER));
2404   fprintf_unfiltered (file,
2405                       "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
2406                       (long) TARGET_BYTE_ORDER);
2407 #endif
2408 #ifdef TARGET_CHAR_SIGNED
2409   fprintf_unfiltered (file,
2410                       "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
2411                       XSTRING (TARGET_CHAR_SIGNED));
2412   fprintf_unfiltered (file,
2413                       "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
2414                       TARGET_CHAR_SIGNED);
2415 #endif
2416 #ifdef TARGET_DOUBLE_BIT
2417   fprintf_unfiltered (file,
2418                       "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
2419                       XSTRING (TARGET_DOUBLE_BIT));
2420   fprintf_unfiltered (file,
2421                       "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
2422                       TARGET_DOUBLE_BIT);
2423 #endif
2424 #ifdef TARGET_DOUBLE_FORMAT
2425   fprintf_unfiltered (file,
2426                       "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
2427                       XSTRING (TARGET_DOUBLE_FORMAT));
2428   fprintf_unfiltered (file,
2429                       "gdbarch_dump: TARGET_DOUBLE_FORMAT = %s\n",
2430                       (TARGET_DOUBLE_FORMAT)->name);
2431 #endif
2432 #ifdef TARGET_FLOAT_BIT
2433   fprintf_unfiltered (file,
2434                       "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
2435                       XSTRING (TARGET_FLOAT_BIT));
2436   fprintf_unfiltered (file,
2437                       "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
2438                       TARGET_FLOAT_BIT);
2439 #endif
2440 #ifdef TARGET_FLOAT_FORMAT
2441   fprintf_unfiltered (file,
2442                       "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
2443                       XSTRING (TARGET_FLOAT_FORMAT));
2444   fprintf_unfiltered (file,
2445                       "gdbarch_dump: TARGET_FLOAT_FORMAT = %s\n",
2446                       (TARGET_FLOAT_FORMAT)->name);
2447 #endif
2448 #ifdef TARGET_INT_BIT
2449   fprintf_unfiltered (file,
2450                       "gdbarch_dump: TARGET_INT_BIT # %s\n",
2451                       XSTRING (TARGET_INT_BIT));
2452   fprintf_unfiltered (file,
2453                       "gdbarch_dump: TARGET_INT_BIT = %d\n",
2454                       TARGET_INT_BIT);
2455 #endif
2456 #ifdef TARGET_LONG_BIT
2457   fprintf_unfiltered (file,
2458                       "gdbarch_dump: TARGET_LONG_BIT # %s\n",
2459                       XSTRING (TARGET_LONG_BIT));
2460   fprintf_unfiltered (file,
2461                       "gdbarch_dump: TARGET_LONG_BIT = %d\n",
2462                       TARGET_LONG_BIT);
2463 #endif
2464 #ifdef TARGET_LONG_DOUBLE_BIT
2465   fprintf_unfiltered (file,
2466                       "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2467                       XSTRING (TARGET_LONG_DOUBLE_BIT));
2468   fprintf_unfiltered (file,
2469                       "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2470                       TARGET_LONG_DOUBLE_BIT);
2471 #endif
2472 #ifdef TARGET_LONG_DOUBLE_FORMAT
2473   fprintf_unfiltered (file,
2474                       "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2475                       XSTRING (TARGET_LONG_DOUBLE_FORMAT));
2476   fprintf_unfiltered (file,
2477                       "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %s\n",
2478                       (TARGET_LONG_DOUBLE_FORMAT)->name);
2479 #endif
2480 #ifdef TARGET_LONG_LONG_BIT
2481   fprintf_unfiltered (file,
2482                       "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2483                       XSTRING (TARGET_LONG_LONG_BIT));
2484   fprintf_unfiltered (file,
2485                       "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2486                       TARGET_LONG_LONG_BIT);
2487 #endif
2488 #ifdef TARGET_OSABI
2489   fprintf_unfiltered (file,
2490                       "gdbarch_dump: TARGET_OSABI # %s\n",
2491                       XSTRING (TARGET_OSABI));
2492   fprintf_unfiltered (file,
2493                       "gdbarch_dump: TARGET_OSABI = %ld\n",
2494                       (long) TARGET_OSABI);
2495 #endif
2496 #ifdef TARGET_PRINT_INSN
2497   fprintf_unfiltered (file,
2498                       "gdbarch_dump: %s # %s\n",
2499                       "TARGET_PRINT_INSN(vma, info)",
2500                       XSTRING (TARGET_PRINT_INSN (vma, info)));
2501   if (GDB_MULTI_ARCH)
2502     fprintf_unfiltered (file,
2503                         "gdbarch_dump: TARGET_PRINT_INSN = <0x%08lx>\n",
2504                         (long) current_gdbarch->print_insn
2505                         /*TARGET_PRINT_INSN ()*/);
2506 #endif
2507 #ifdef TARGET_PTR_BIT
2508   fprintf_unfiltered (file,
2509                       "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2510                       XSTRING (TARGET_PTR_BIT));
2511   fprintf_unfiltered (file,
2512                       "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2513                       TARGET_PTR_BIT);
2514 #endif
2515 #ifdef TARGET_READ_PC
2516   fprintf_unfiltered (file,
2517                       "gdbarch_dump: %s # %s\n",
2518                       "TARGET_READ_PC(ptid)",
2519                       XSTRING (TARGET_READ_PC (ptid)));
2520   if (GDB_MULTI_ARCH)
2521     fprintf_unfiltered (file,
2522                         "gdbarch_dump: TARGET_READ_PC = <0x%08lx>\n",
2523                         (long) current_gdbarch->read_pc
2524                         /*TARGET_READ_PC ()*/);
2525 #endif
2526 #ifdef TARGET_READ_SP
2527   fprintf_unfiltered (file,
2528                       "gdbarch_dump: %s # %s\n",
2529                       "TARGET_READ_SP()",
2530                       XSTRING (TARGET_READ_SP ()));
2531   if (GDB_MULTI_ARCH)
2532     fprintf_unfiltered (file,
2533                         "gdbarch_dump: TARGET_READ_SP = <0x%08lx>\n",
2534                         (long) current_gdbarch->read_sp
2535                         /*TARGET_READ_SP ()*/);
2536 #endif
2537 #ifdef TARGET_SHORT_BIT
2538   fprintf_unfiltered (file,
2539                       "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2540                       XSTRING (TARGET_SHORT_BIT));
2541   fprintf_unfiltered (file,
2542                       "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2543                       TARGET_SHORT_BIT);
2544 #endif
2545 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2546 #if GDB_MULTI_ARCH
2547   /* Macro might contain `[{}]' when not multi-arch */
2548   fprintf_unfiltered (file,
2549                       "gdbarch_dump: %s # %s\n",
2550                       "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2551                       XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc, frame_regnum, frame_offset)));
2552 #endif
2553   if (GDB_MULTI_ARCH)
2554     fprintf_unfiltered (file,
2555                         "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = <0x%08lx>\n",
2556                         (long) current_gdbarch->virtual_frame_pointer
2557                         /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2558 #endif
2559 #ifdef TARGET_WRITE_PC
2560 #if GDB_MULTI_ARCH
2561   /* Macro might contain `[{}]' when not multi-arch */
2562   fprintf_unfiltered (file,
2563                       "gdbarch_dump: %s # %s\n",
2564                       "TARGET_WRITE_PC(val, ptid)",
2565                       XSTRING (TARGET_WRITE_PC (val, ptid)));
2566 #endif
2567   if (GDB_MULTI_ARCH)
2568     fprintf_unfiltered (file,
2569                         "gdbarch_dump: TARGET_WRITE_PC = <0x%08lx>\n",
2570                         (long) current_gdbarch->write_pc
2571                         /*TARGET_WRITE_PC ()*/);
2572 #endif
2573   if (GDB_MULTI_ARCH)
2574     fprintf_unfiltered (file,
2575                         "gdbarch_dump: gdbarch_unwind_dummy_id_p() = %d\n",
2576                         gdbarch_unwind_dummy_id_p (current_gdbarch));
2577   if (GDB_MULTI_ARCH)
2578     fprintf_unfiltered (file,
2579                         "gdbarch_dump: unwind_dummy_id = 0x%08lx\n",
2580                         (long) current_gdbarch->unwind_dummy_id);
2581   if (GDB_MULTI_ARCH)
2582     fprintf_unfiltered (file,
2583                         "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
2584                         gdbarch_unwind_pc_p (current_gdbarch));
2585   if (GDB_MULTI_ARCH)
2586     fprintf_unfiltered (file,
2587                         "gdbarch_dump: unwind_pc = 0x%08lx\n",
2588                         (long) current_gdbarch->unwind_pc);
2589 #ifdef USE_STRUCT_CONVENTION
2590   fprintf_unfiltered (file,
2591                       "gdbarch_dump: %s # %s\n",
2592                       "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2593                       XSTRING (USE_STRUCT_CONVENTION (gcc_p, value_type)));
2594   if (GDB_MULTI_ARCH)
2595     fprintf_unfiltered (file,
2596                         "gdbarch_dump: USE_STRUCT_CONVENTION = <0x%08lx>\n",
2597                         (long) current_gdbarch->use_struct_convention
2598                         /*USE_STRUCT_CONVENTION ()*/);
2599 #endif
2600 #ifdef VALUE_TO_REGISTER
2601 #if GDB_MULTI_ARCH
2602   /* Macro might contain `[{}]' when not multi-arch */
2603   fprintf_unfiltered (file,
2604                       "gdbarch_dump: %s # %s\n",
2605                       "VALUE_TO_REGISTER(type, regnum, from, to)",
2606                       XSTRING (VALUE_TO_REGISTER (type, regnum, from, to)));
2607 #endif
2608   if (GDB_MULTI_ARCH)
2609     fprintf_unfiltered (file,
2610                         "gdbarch_dump: VALUE_TO_REGISTER = <0x%08lx>\n",
2611                         (long) current_gdbarch->value_to_register
2612                         /*VALUE_TO_REGISTER ()*/);
2613 #endif
2614   if (current_gdbarch->dump_tdep != NULL)
2615     current_gdbarch->dump_tdep (current_gdbarch, file);
2616 }
2617
2618 struct gdbarch_tdep *
2619 gdbarch_tdep (struct gdbarch *gdbarch)
2620 {
2621   if (gdbarch_debug >= 2)
2622     fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
2623   return gdbarch->tdep;
2624 }
2625
2626
2627 const struct bfd_arch_info *
2628 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
2629 {
2630   gdb_assert (gdbarch != NULL);
2631   if (gdbarch_debug >= 2)
2632     fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
2633   return gdbarch->bfd_arch_info;
2634 }
2635
2636 int
2637 gdbarch_byte_order (struct gdbarch *gdbarch)
2638 {
2639   gdb_assert (gdbarch != NULL);
2640   if (gdbarch_debug >= 2)
2641     fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
2642   return gdbarch->byte_order;
2643 }
2644
2645 enum gdb_osabi
2646 gdbarch_osabi (struct gdbarch *gdbarch)
2647 {
2648   gdb_assert (gdbarch != NULL);
2649   if (gdbarch_debug >= 2)
2650     fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n");
2651   return gdbarch->osabi;
2652 }
2653
2654 int
2655 gdbarch_short_bit (struct gdbarch *gdbarch)
2656 {
2657   gdb_assert (gdbarch != NULL);
2658   /* Skip verify of short_bit, invalid_p == 0 */
2659   if (gdbarch_debug >= 2)
2660     fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
2661   return gdbarch->short_bit;
2662 }
2663
2664 void
2665 set_gdbarch_short_bit (struct gdbarch *gdbarch,
2666                        int short_bit)
2667 {
2668   gdbarch->short_bit = short_bit;
2669 }
2670
2671 int
2672 gdbarch_int_bit (struct gdbarch *gdbarch)
2673 {
2674   gdb_assert (gdbarch != NULL);
2675   /* Skip verify of int_bit, invalid_p == 0 */
2676   if (gdbarch_debug >= 2)
2677     fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
2678   return gdbarch->int_bit;
2679 }
2680
2681 void
2682 set_gdbarch_int_bit (struct gdbarch *gdbarch,
2683                      int int_bit)
2684 {
2685   gdbarch->int_bit = int_bit;
2686 }
2687
2688 int
2689 gdbarch_long_bit (struct gdbarch *gdbarch)
2690 {
2691   gdb_assert (gdbarch != NULL);
2692   /* Skip verify of long_bit, invalid_p == 0 */
2693   if (gdbarch_debug >= 2)
2694     fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
2695   return gdbarch->long_bit;
2696 }
2697
2698 void
2699 set_gdbarch_long_bit (struct gdbarch *gdbarch,
2700                       int long_bit)
2701 {
2702   gdbarch->long_bit = long_bit;
2703 }
2704
2705 int
2706 gdbarch_long_long_bit (struct gdbarch *gdbarch)
2707 {
2708   gdb_assert (gdbarch != NULL);
2709   /* Skip verify of long_long_bit, invalid_p == 0 */
2710   if (gdbarch_debug >= 2)
2711     fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
2712   return gdbarch->long_long_bit;
2713 }
2714
2715 void
2716 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
2717                            int long_long_bit)
2718 {
2719   gdbarch->long_long_bit = long_long_bit;
2720 }
2721
2722 int
2723 gdbarch_float_bit (struct gdbarch *gdbarch)
2724 {
2725   gdb_assert (gdbarch != NULL);
2726   /* Skip verify of float_bit, invalid_p == 0 */
2727   if (gdbarch_debug >= 2)
2728     fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
2729   return gdbarch->float_bit;
2730 }
2731
2732 void
2733 set_gdbarch_float_bit (struct gdbarch *gdbarch,
2734                        int float_bit)
2735 {
2736   gdbarch->float_bit = float_bit;
2737 }
2738
2739 int
2740 gdbarch_double_bit (struct gdbarch *gdbarch)
2741 {
2742   gdb_assert (gdbarch != NULL);
2743   /* Skip verify of double_bit, invalid_p == 0 */
2744   if (gdbarch_debug >= 2)
2745     fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
2746   return gdbarch->double_bit;
2747 }
2748
2749 void
2750 set_gdbarch_double_bit (struct gdbarch *gdbarch,
2751                         int double_bit)
2752 {
2753   gdbarch->double_bit = double_bit;
2754 }
2755
2756 int
2757 gdbarch_long_double_bit (struct gdbarch *gdbarch)
2758 {
2759   gdb_assert (gdbarch != NULL);
2760   /* Skip verify of long_double_bit, invalid_p == 0 */
2761   if (gdbarch_debug >= 2)
2762     fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
2763   return gdbarch->long_double_bit;
2764 }
2765
2766 void
2767 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
2768                              int long_double_bit)
2769 {
2770   gdbarch->long_double_bit = long_double_bit;
2771 }
2772
2773 int
2774 gdbarch_ptr_bit (struct gdbarch *gdbarch)
2775 {
2776   gdb_assert (gdbarch != NULL);
2777   /* Skip verify of ptr_bit, invalid_p == 0 */
2778   if (gdbarch_debug >= 2)
2779     fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
2780   return gdbarch->ptr_bit;
2781 }
2782
2783 void
2784 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
2785                      int ptr_bit)
2786 {
2787   gdbarch->ptr_bit = ptr_bit;
2788 }
2789
2790 int
2791 gdbarch_addr_bit (struct gdbarch *gdbarch)
2792 {
2793   gdb_assert (gdbarch != NULL);
2794   if (gdbarch->addr_bit == 0)
2795     internal_error (__FILE__, __LINE__,
2796                     "gdbarch: gdbarch_addr_bit invalid");
2797   if (gdbarch_debug >= 2)
2798     fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
2799   return gdbarch->addr_bit;
2800 }
2801
2802 void
2803 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
2804                       int addr_bit)
2805 {
2806   gdbarch->addr_bit = addr_bit;
2807 }
2808
2809 int
2810 gdbarch_bfd_vma_bit (struct gdbarch *gdbarch)
2811 {
2812   gdb_assert (gdbarch != NULL);
2813   /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2814   if (gdbarch_debug >= 2)
2815     fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n");
2816   return gdbarch->bfd_vma_bit;
2817 }
2818
2819 void
2820 set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch,
2821                          int bfd_vma_bit)
2822 {
2823   gdbarch->bfd_vma_bit = bfd_vma_bit;
2824 }
2825
2826 int
2827 gdbarch_char_signed (struct gdbarch *gdbarch)
2828 {
2829   gdb_assert (gdbarch != NULL);
2830   if (gdbarch->char_signed == -1)
2831     internal_error (__FILE__, __LINE__,
2832                     "gdbarch: gdbarch_char_signed invalid");
2833   if (gdbarch_debug >= 2)
2834     fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
2835   return gdbarch->char_signed;
2836 }
2837
2838 void
2839 set_gdbarch_char_signed (struct gdbarch *gdbarch,
2840                          int char_signed)
2841 {
2842   gdbarch->char_signed = char_signed;
2843 }
2844
2845 CORE_ADDR
2846 gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid)
2847 {
2848   gdb_assert (gdbarch != NULL);
2849   if (gdbarch->read_pc == 0)
2850     internal_error (__FILE__, __LINE__,
2851                     "gdbarch: gdbarch_read_pc invalid");
2852   if (gdbarch_debug >= 2)
2853     fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
2854   return gdbarch->read_pc (ptid);
2855 }
2856
2857 void
2858 set_gdbarch_read_pc (struct gdbarch *gdbarch,
2859                      gdbarch_read_pc_ftype read_pc)
2860 {
2861   gdbarch->read_pc = read_pc;
2862 }
2863
2864 void
2865 gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid)
2866 {
2867   gdb_assert (gdbarch != NULL);
2868   if (gdbarch->write_pc == 0)
2869     internal_error (__FILE__, __LINE__,
2870                     "gdbarch: gdbarch_write_pc invalid");
2871   if (gdbarch_debug >= 2)
2872     fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
2873   gdbarch->write_pc (val, ptid);
2874 }
2875
2876 void
2877 set_gdbarch_write_pc (struct gdbarch *gdbarch,
2878                       gdbarch_write_pc_ftype write_pc)
2879 {
2880   gdbarch->write_pc = write_pc;
2881 }
2882
2883 int
2884 gdbarch_deprecated_target_read_fp_p (struct gdbarch *gdbarch)
2885 {
2886   gdb_assert (gdbarch != NULL);
2887   return gdbarch->deprecated_target_read_fp != 0;
2888 }
2889
2890 CORE_ADDR
2891 gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch)
2892 {
2893   gdb_assert (gdbarch != NULL);
2894   if (gdbarch->deprecated_target_read_fp == 0)
2895     internal_error (__FILE__, __LINE__,
2896                     "gdbarch: gdbarch_deprecated_target_read_fp invalid");
2897   if (gdbarch_debug >= 2)
2898     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_target_read_fp called\n");
2899   return gdbarch->deprecated_target_read_fp ();
2900 }
2901
2902 void
2903 set_gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch,
2904                                        gdbarch_deprecated_target_read_fp_ftype deprecated_target_read_fp)
2905 {
2906   gdbarch->deprecated_target_read_fp = deprecated_target_read_fp;
2907 }
2908
2909 CORE_ADDR
2910 gdbarch_read_sp (struct gdbarch *gdbarch)
2911 {
2912   gdb_assert (gdbarch != NULL);
2913   if (gdbarch->read_sp == 0)
2914     internal_error (__FILE__, __LINE__,
2915                     "gdbarch: gdbarch_read_sp invalid");
2916   if (gdbarch_debug >= 2)
2917     fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
2918   return gdbarch->read_sp ();
2919 }
2920
2921 void
2922 set_gdbarch_read_sp (struct gdbarch *gdbarch,
2923                      gdbarch_read_sp_ftype read_sp)
2924 {
2925   gdbarch->read_sp = read_sp;
2926 }
2927
2928 int
2929 gdbarch_deprecated_dummy_write_sp_p (struct gdbarch *gdbarch)
2930 {
2931   gdb_assert (gdbarch != NULL);
2932   return gdbarch->deprecated_dummy_write_sp != 0;
2933 }
2934
2935 void
2936 gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
2937 {
2938   gdb_assert (gdbarch != NULL);
2939   if (gdbarch->deprecated_dummy_write_sp == 0)
2940     internal_error (__FILE__, __LINE__,
2941                     "gdbarch: gdbarch_deprecated_dummy_write_sp invalid");
2942   if (gdbarch_debug >= 2)
2943     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_dummy_write_sp called\n");
2944   gdbarch->deprecated_dummy_write_sp (val);
2945 }
2946
2947 void
2948 set_gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch,
2949                                        gdbarch_deprecated_dummy_write_sp_ftype deprecated_dummy_write_sp)
2950 {
2951   gdbarch->deprecated_dummy_write_sp = deprecated_dummy_write_sp;
2952 }
2953
2954 void
2955 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
2956 {
2957   gdb_assert (gdbarch != NULL);
2958   if (gdbarch->virtual_frame_pointer == 0)
2959     internal_error (__FILE__, __LINE__,
2960                     "gdbarch: gdbarch_virtual_frame_pointer invalid");
2961   if (gdbarch_debug >= 2)
2962     fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
2963   gdbarch->virtual_frame_pointer (pc, frame_regnum, frame_offset);
2964 }
2965
2966 void
2967 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
2968                                    gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
2969 {
2970   gdbarch->virtual_frame_pointer = virtual_frame_pointer;
2971 }
2972
2973 int
2974 gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
2975 {
2976   gdb_assert (gdbarch != NULL);
2977   return gdbarch->pseudo_register_read != 0;
2978 }
2979
2980 void
2981 gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf)
2982 {
2983   gdb_assert (gdbarch != NULL);
2984   if (gdbarch->pseudo_register_read == 0)
2985     internal_error (__FILE__, __LINE__,
2986                     "gdbarch: gdbarch_pseudo_register_read invalid");
2987   if (gdbarch_debug >= 2)
2988     fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
2989   gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
2990 }
2991
2992 void
2993 set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
2994                                   gdbarch_pseudo_register_read_ftype pseudo_register_read)
2995 {
2996   gdbarch->pseudo_register_read = pseudo_register_read;
2997 }
2998
2999 int
3000 gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
3001 {
3002   gdb_assert (gdbarch != NULL);
3003   return gdbarch->pseudo_register_write != 0;
3004 }
3005
3006 void
3007 gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf)
3008 {
3009   gdb_assert (gdbarch != NULL);
3010   if (gdbarch->pseudo_register_write == 0)
3011     internal_error (__FILE__, __LINE__,
3012                     "gdbarch: gdbarch_pseudo_register_write invalid");
3013   if (gdbarch_debug >= 2)
3014     fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
3015   gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
3016 }
3017
3018 void
3019 set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
3020                                    gdbarch_pseudo_register_write_ftype pseudo_register_write)
3021 {
3022   gdbarch->pseudo_register_write = pseudo_register_write;
3023 }
3024
3025 int
3026 gdbarch_num_regs (struct gdbarch *gdbarch)
3027 {
3028   gdb_assert (gdbarch != NULL);
3029   if (gdbarch->num_regs == -1)
3030     internal_error (__FILE__, __LINE__,
3031                     "gdbarch: gdbarch_num_regs invalid");
3032   if (gdbarch_debug >= 2)
3033     fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
3034   return gdbarch->num_regs;
3035 }
3036
3037 void
3038 set_gdbarch_num_regs (struct gdbarch *gdbarch,
3039                       int num_regs)
3040 {
3041   gdbarch->num_regs = num_regs;
3042 }
3043
3044 int
3045 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
3046 {
3047   gdb_assert (gdbarch != NULL);
3048   /* Skip verify of num_pseudo_regs, invalid_p == 0 */
3049   if (gdbarch_debug >= 2)
3050     fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
3051   return gdbarch->num_pseudo_regs;
3052 }
3053
3054 void
3055 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
3056                              int num_pseudo_regs)
3057 {
3058   gdbarch->num_pseudo_regs = num_pseudo_regs;
3059 }
3060
3061 int
3062 gdbarch_sp_regnum (struct gdbarch *gdbarch)
3063 {
3064   gdb_assert (gdbarch != NULL);
3065   /* Skip verify of sp_regnum, invalid_p == 0 */
3066   if (gdbarch_debug >= 2)
3067     fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
3068   return gdbarch->sp_regnum;
3069 }
3070
3071 void
3072 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
3073                        int sp_regnum)
3074 {
3075   gdbarch->sp_regnum = sp_regnum;
3076 }
3077
3078 int
3079 gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch)
3080 {
3081   gdb_assert (gdbarch != NULL);
3082   /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
3083   if (gdbarch_debug >= 2)
3084     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n");
3085   return gdbarch->deprecated_fp_regnum;
3086 }
3087
3088 void
3089 set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch,
3090                                   int deprecated_fp_regnum)
3091 {
3092   gdbarch->deprecated_fp_regnum = deprecated_fp_regnum;
3093 }
3094
3095 int
3096 gdbarch_pc_regnum (struct gdbarch *gdbarch)
3097 {
3098   gdb_assert (gdbarch != NULL);
3099   /* Skip verify of pc_regnum, invalid_p == 0 */
3100   if (gdbarch_debug >= 2)
3101     fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
3102   return gdbarch->pc_regnum;
3103 }
3104
3105 void
3106 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
3107                        int pc_regnum)
3108 {
3109   gdbarch->pc_regnum = pc_regnum;
3110 }
3111
3112 int
3113 gdbarch_ps_regnum (struct gdbarch *gdbarch)
3114 {
3115   gdb_assert (gdbarch != NULL);
3116   /* Skip verify of ps_regnum, invalid_p == 0 */
3117   if (gdbarch_debug >= 2)
3118     fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
3119   return gdbarch->ps_regnum;
3120 }
3121
3122 void
3123 set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
3124                        int ps_regnum)
3125 {
3126   gdbarch->ps_regnum = ps_regnum;
3127 }
3128
3129 int
3130 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
3131 {
3132   gdb_assert (gdbarch != NULL);
3133   /* Skip verify of fp0_regnum, invalid_p == 0 */
3134   if (gdbarch_debug >= 2)
3135     fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
3136   return gdbarch->fp0_regnum;
3137 }
3138
3139 void
3140 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
3141                         int fp0_regnum)
3142 {
3143   gdbarch->fp0_regnum = fp0_regnum;
3144 }
3145
3146 int
3147 gdbarch_npc_regnum (struct gdbarch *gdbarch)
3148 {
3149   gdb_assert (gdbarch != NULL);
3150   /* Skip verify of npc_regnum, invalid_p == 0 */
3151   if (gdbarch_debug >= 2)
3152     fprintf_unfiltered (gdb_stdlog, "gdbarch_npc_regnum called\n");
3153   return gdbarch->npc_regnum;
3154 }
3155
3156 void
3157 set_gdbarch_npc_regnum (struct gdbarch *gdbarch,
3158                         int npc_regnum)
3159 {
3160   gdbarch->npc_regnum = npc_regnum;
3161 }
3162
3163 int
3164 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
3165 {
3166   gdb_assert (gdbarch != NULL);
3167   if (gdbarch->stab_reg_to_regnum == 0)
3168     internal_error (__FILE__, __LINE__,
3169                     "gdbarch: gdbarch_stab_reg_to_regnum invalid");
3170   if (gdbarch_debug >= 2)
3171     fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
3172   return gdbarch->stab_reg_to_regnum (stab_regnr);
3173 }
3174
3175 void
3176 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
3177                                 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
3178 {
3179   gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
3180 }
3181
3182 int
3183 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
3184 {
3185   gdb_assert (gdbarch != NULL);
3186   if (gdbarch->ecoff_reg_to_regnum == 0)
3187     internal_error (__FILE__, __LINE__,
3188                     "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
3189   if (gdbarch_debug >= 2)
3190     fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
3191   return gdbarch->ecoff_reg_to_regnum (ecoff_regnr);
3192 }
3193
3194 void
3195 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
3196                                  gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
3197 {
3198   gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
3199 }
3200
3201 int
3202 gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr)
3203 {
3204   gdb_assert (gdbarch != NULL);
3205   if (gdbarch->dwarf_reg_to_regnum == 0)
3206     internal_error (__FILE__, __LINE__,
3207                     "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
3208   if (gdbarch_debug >= 2)
3209     fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf_reg_to_regnum called\n");
3210   return gdbarch->dwarf_reg_to_regnum (dwarf_regnr);
3211 }
3212
3213 void
3214 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch,
3215                                  gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum)
3216 {
3217   gdbarch->dwarf_reg_to_regnum = dwarf_reg_to_regnum;
3218 }
3219
3220 int
3221 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
3222 {
3223   gdb_assert (gdbarch != NULL);
3224   if (gdbarch->sdb_reg_to_regnum == 0)
3225     internal_error (__FILE__, __LINE__,
3226                     "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
3227   if (gdbarch_debug >= 2)
3228     fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
3229   return gdbarch->sdb_reg_to_regnum (sdb_regnr);
3230 }
3231
3232 void
3233 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
3234                                gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
3235 {
3236   gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
3237 }
3238
3239 int
3240 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
3241 {
3242   gdb_assert (gdbarch != NULL);
3243   if (gdbarch->dwarf2_reg_to_regnum == 0)
3244     internal_error (__FILE__, __LINE__,
3245                     "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
3246   if (gdbarch_debug >= 2)
3247     fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
3248   return gdbarch->dwarf2_reg_to_regnum (dwarf2_regnr);
3249 }
3250
3251 void
3252 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
3253                                   gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
3254 {
3255   gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
3256 }
3257
3258 const char *
3259 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
3260 {
3261   gdb_assert (gdbarch != NULL);
3262   if (gdbarch->register_name == 0)
3263     internal_error (__FILE__, __LINE__,
3264                     "gdbarch: gdbarch_register_name invalid");
3265   if (gdbarch_debug >= 2)
3266     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
3267   return gdbarch->register_name (regnr);
3268 }
3269
3270 void
3271 set_gdbarch_register_name (struct gdbarch *gdbarch,
3272                            gdbarch_register_name_ftype register_name)
3273 {
3274   gdbarch->register_name = register_name;
3275 }
3276
3277 int
3278 gdbarch_register_size (struct gdbarch *gdbarch)
3279 {
3280   gdb_assert (gdbarch != NULL);
3281   if (gdbarch_debug >= 2)
3282     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_size called\n");
3283   return gdbarch->register_size;
3284 }
3285
3286 void
3287 set_gdbarch_register_size (struct gdbarch *gdbarch,
3288                            int register_size)
3289 {
3290   gdbarch->register_size = register_size;
3291 }
3292
3293 int
3294 gdbarch_register_bytes (struct gdbarch *gdbarch)
3295 {
3296   gdb_assert (gdbarch != NULL);
3297   if (gdbarch_debug >= 2)
3298     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes called\n");
3299   return gdbarch->register_bytes;
3300 }
3301
3302 void
3303 set_gdbarch_register_bytes (struct gdbarch *gdbarch,
3304                             int register_bytes)
3305 {
3306   gdbarch->register_bytes = register_bytes;
3307 }
3308
3309 int
3310 gdbarch_register_byte (struct gdbarch *gdbarch, int reg_nr)
3311 {
3312   gdb_assert (gdbarch != NULL);
3313   if (gdbarch->register_byte == 0)
3314     internal_error (__FILE__, __LINE__,
3315                     "gdbarch: gdbarch_register_byte invalid");
3316   if (gdbarch_debug >= 2)
3317     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_byte called\n");
3318   return gdbarch->register_byte (reg_nr);
3319 }
3320
3321 void
3322 set_gdbarch_register_byte (struct gdbarch *gdbarch,
3323                            gdbarch_register_byte_ftype register_byte)
3324 {
3325   gdbarch->register_byte = register_byte;
3326 }
3327
3328 int
3329 gdbarch_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
3330 {
3331   gdb_assert (gdbarch != NULL);
3332   if (gdbarch->register_raw_size == 0)
3333     internal_error (__FILE__, __LINE__,
3334                     "gdbarch: gdbarch_register_raw_size invalid");
3335   if (gdbarch_debug >= 2)
3336     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_raw_size called\n");
3337   return gdbarch->register_raw_size (reg_nr);
3338 }
3339
3340 void
3341 set_gdbarch_register_raw_size (struct gdbarch *gdbarch,
3342                                gdbarch_register_raw_size_ftype register_raw_size)
3343 {
3344   gdbarch->register_raw_size = register_raw_size;
3345 }
3346
3347 int
3348 gdbarch_deprecated_max_register_raw_size_p (struct gdbarch *gdbarch)
3349 {
3350   gdb_assert (gdbarch != NULL);
3351   return gdbarch->deprecated_max_register_raw_size != 0;
3352 }
3353
3354 int
3355 gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch)
3356 {
3357   gdb_assert (gdbarch != NULL);
3358   if (gdbarch_debug >= 2)
3359     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_max_register_raw_size called\n");
3360   return gdbarch->deprecated_max_register_raw_size;
3361 }
3362
3363 void
3364 set_gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch,
3365                                               int deprecated_max_register_raw_size)
3366 {
3367   gdbarch->deprecated_max_register_raw_size = deprecated_max_register_raw_size;
3368 }
3369
3370 int
3371 gdbarch_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
3372 {
3373   gdb_assert (gdbarch != NULL);
3374   if (gdbarch->register_virtual_size == 0)
3375     internal_error (__FILE__, __LINE__,
3376                     "gdbarch: gdbarch_register_virtual_size invalid");
3377   if (gdbarch_debug >= 2)
3378     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_size called\n");
3379   return gdbarch->register_virtual_size (reg_nr);
3380 }
3381
3382 void
3383 set_gdbarch_register_virtual_size (struct gdbarch *gdbarch,
3384                                    gdbarch_register_virtual_size_ftype register_virtual_size)
3385 {
3386   gdbarch->register_virtual_size = register_virtual_size;
3387 }
3388
3389 int
3390 gdbarch_deprecated_max_register_virtual_size_p (struct gdbarch *gdbarch)
3391 {
3392   gdb_assert (gdbarch != NULL);
3393   return gdbarch->deprecated_max_register_virtual_size != 0;
3394 }
3395
3396 int
3397 gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch)
3398 {
3399   gdb_assert (gdbarch != NULL);
3400   if (gdbarch_debug >= 2)
3401     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_max_register_virtual_size called\n");
3402   return gdbarch->deprecated_max_register_virtual_size;
3403 }
3404
3405 void
3406 set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch,
3407                                                   int deprecated_max_register_virtual_size)
3408 {
3409   gdbarch->deprecated_max_register_virtual_size = deprecated_max_register_virtual_size;
3410 }
3411
3412 int
3413 gdbarch_register_virtual_type_p (struct gdbarch *gdbarch)
3414 {
3415   gdb_assert (gdbarch != NULL);
3416   return gdbarch->register_virtual_type != 0;
3417 }
3418
3419 struct type *
3420 gdbarch_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
3421 {
3422   gdb_assert (gdbarch != NULL);
3423   if (gdbarch->register_virtual_type == 0)
3424     internal_error (__FILE__, __LINE__,
3425                     "gdbarch: gdbarch_register_virtual_type invalid");
3426   if (gdbarch_debug >= 2)
3427     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_type called\n");
3428   return gdbarch->register_virtual_type (reg_nr);
3429 }
3430
3431 void
3432 set_gdbarch_register_virtual_type (struct gdbarch *gdbarch,
3433                                    gdbarch_register_virtual_type_ftype register_virtual_type)
3434 {
3435   gdbarch->register_virtual_type = register_virtual_type;
3436 }
3437
3438 int
3439 gdbarch_register_type_p (struct gdbarch *gdbarch)
3440 {
3441   gdb_assert (gdbarch != NULL);
3442   return gdbarch->register_type != 0;
3443 }
3444
3445 struct type *
3446 gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
3447 {
3448   gdb_assert (gdbarch != NULL);
3449   if (gdbarch->register_type == 0)
3450     internal_error (__FILE__, __LINE__,
3451                     "gdbarch: gdbarch_register_type invalid");
3452   if (gdbarch_debug >= 2)
3453     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
3454   return gdbarch->register_type (gdbarch, reg_nr);
3455 }
3456
3457 void
3458 set_gdbarch_register_type (struct gdbarch *gdbarch,
3459                            gdbarch_register_type_ftype register_type)
3460 {
3461   gdbarch->register_type = register_type;
3462 }
3463
3464 int
3465 gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch)
3466 {
3467   gdb_assert (gdbarch != NULL);
3468   return gdbarch->deprecated_do_registers_info != 0;
3469 }
3470
3471 void
3472 gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs)
3473 {
3474   gdb_assert (gdbarch != NULL);
3475   if (gdbarch->deprecated_do_registers_info == 0)
3476     internal_error (__FILE__, __LINE__,
3477                     "gdbarch: gdbarch_deprecated_do_registers_info invalid");
3478   if (gdbarch_debug >= 2)
3479     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_do_registers_info called\n");
3480   gdbarch->deprecated_do_registers_info (reg_nr, fpregs);
3481 }
3482
3483 void
3484 set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch,
3485                                           gdbarch_deprecated_do_registers_info_ftype deprecated_do_registers_info)
3486 {
3487   gdbarch->deprecated_do_registers_info = deprecated_do_registers_info;
3488 }
3489
3490 void
3491 gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
3492 {
3493   gdb_assert (gdbarch != NULL);
3494   if (gdbarch->print_registers_info == 0)
3495     internal_error (__FILE__, __LINE__,
3496                     "gdbarch: gdbarch_print_registers_info invalid");
3497   if (gdbarch_debug >= 2)
3498     fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
3499   gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
3500 }
3501
3502 void
3503 set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
3504                                   gdbarch_print_registers_info_ftype print_registers_info)
3505 {
3506   gdbarch->print_registers_info = print_registers_info;
3507 }
3508
3509 int
3510 gdbarch_print_float_info_p (struct gdbarch *gdbarch)
3511 {
3512   gdb_assert (gdbarch != NULL);
3513   return gdbarch->print_float_info != 0;
3514 }
3515
3516 void
3517 gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
3518 {
3519   gdb_assert (gdbarch != NULL);
3520   if (gdbarch->print_float_info == 0)
3521     internal_error (__FILE__, __LINE__,
3522                     "gdbarch: gdbarch_print_float_info invalid");
3523   if (gdbarch_debug >= 2)
3524     fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
3525   gdbarch->print_float_info (gdbarch, file, frame, args);
3526 }
3527
3528 void
3529 set_gdbarch_print_float_info (struct gdbarch *gdbarch,
3530                               gdbarch_print_float_info_ftype print_float_info)
3531 {
3532   gdbarch->print_float_info = print_float_info;
3533 }
3534
3535 int
3536 gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
3537 {
3538   gdb_assert (gdbarch != NULL);
3539   return gdbarch->print_vector_info != 0;
3540 }
3541
3542 void
3543 gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
3544 {
3545   gdb_assert (gdbarch != NULL);
3546   if (gdbarch->print_vector_info == 0)
3547     internal_error (__FILE__, __LINE__,
3548                     "gdbarch: gdbarch_print_vector_info invalid");
3549   if (gdbarch_debug >= 2)
3550     fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
3551   gdbarch->print_vector_info (gdbarch, file, frame, args);
3552 }
3553
3554 void
3555 set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
3556                                gdbarch_print_vector_info_ftype print_vector_info)
3557 {
3558   gdbarch->print_vector_info = print_vector_info;
3559 }
3560
3561 int
3562 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
3563 {
3564   gdb_assert (gdbarch != NULL);
3565   if (gdbarch->register_sim_regno == 0)
3566     internal_error (__FILE__, __LINE__,
3567                     "gdbarch: gdbarch_register_sim_regno invalid");
3568   if (gdbarch_debug >= 2)
3569     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
3570   return gdbarch->register_sim_regno (reg_nr);
3571 }
3572
3573 void
3574 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
3575                                 gdbarch_register_sim_regno_ftype register_sim_regno)
3576 {
3577   gdbarch->register_sim_regno = register_sim_regno;
3578 }
3579
3580 int
3581 gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch)
3582 {
3583   gdb_assert (gdbarch != NULL);
3584   return gdbarch->register_bytes_ok != 0;
3585 }
3586
3587 int
3588 gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes)
3589 {
3590   gdb_assert (gdbarch != NULL);
3591   if (gdbarch->register_bytes_ok == 0)
3592     internal_error (__FILE__, __LINE__,
3593                     "gdbarch: gdbarch_register_bytes_ok invalid");
3594   if (gdbarch_debug >= 2)
3595     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n");
3596   return gdbarch->register_bytes_ok (nr_bytes);
3597 }
3598
3599 void
3600 set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch,
3601                                gdbarch_register_bytes_ok_ftype register_bytes_ok)
3602 {
3603   gdbarch->register_bytes_ok = register_bytes_ok;
3604 }
3605
3606 int
3607 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
3608 {
3609   gdb_assert (gdbarch != NULL);
3610   if (gdbarch->cannot_fetch_register == 0)
3611     internal_error (__FILE__, __LINE__,
3612                     "gdbarch: gdbarch_cannot_fetch_register invalid");
3613   if (gdbarch_debug >= 2)
3614     fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
3615   return gdbarch->cannot_fetch_register (regnum);
3616 }
3617
3618 void
3619 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
3620                                    gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
3621 {
3622   gdbarch->cannot_fetch_register = cannot_fetch_register;
3623 }
3624
3625 int
3626 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
3627 {
3628   gdb_assert (gdbarch != NULL);
3629   if (gdbarch->cannot_store_register == 0)
3630     internal_error (__FILE__, __LINE__,
3631                     "gdbarch: gdbarch_cannot_store_register invalid");
3632   if (gdbarch_debug >= 2)
3633     fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
3634   return gdbarch->cannot_store_register (regnum);
3635 }
3636
3637 void
3638 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
3639                                    gdbarch_cannot_store_register_ftype cannot_store_register)
3640 {
3641   gdbarch->cannot_store_register = cannot_store_register;
3642 }
3643
3644 int
3645 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
3646 {
3647   gdb_assert (gdbarch != NULL);
3648   return gdbarch->get_longjmp_target != 0;
3649 }
3650
3651 int
3652 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc)
3653 {
3654   gdb_assert (gdbarch != NULL);
3655   if (gdbarch->get_longjmp_target == 0)
3656     internal_error (__FILE__, __LINE__,
3657                     "gdbarch: gdbarch_get_longjmp_target invalid");
3658   if (gdbarch_debug >= 2)
3659     fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
3660   return gdbarch->get_longjmp_target (pc);
3661 }
3662
3663 void
3664 set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
3665                                 gdbarch_get_longjmp_target_ftype get_longjmp_target)
3666 {
3667   gdbarch->get_longjmp_target = get_longjmp_target;
3668 }
3669
3670 int
3671 gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch)
3672 {
3673   gdb_assert (gdbarch != NULL);
3674   /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
3675   if (gdbarch_debug >= 2)
3676     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_use_generic_dummy_frames called\n");
3677   return gdbarch->deprecated_use_generic_dummy_frames;
3678 }
3679
3680 void
3681 set_gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch,
3682                                                  int deprecated_use_generic_dummy_frames)
3683 {
3684   gdbarch->deprecated_use_generic_dummy_frames = deprecated_use_generic_dummy_frames;
3685 }
3686
3687 int
3688 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
3689 {
3690   gdb_assert (gdbarch != NULL);
3691   /* Skip verify of call_dummy_location, invalid_p == 0 */
3692   if (gdbarch_debug >= 2)
3693     fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
3694   return gdbarch->call_dummy_location;
3695 }
3696
3697 void
3698 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
3699                                  int call_dummy_location)
3700 {
3701   gdbarch->call_dummy_location = call_dummy_location;
3702 }
3703
3704 CORE_ADDR
3705 gdbarch_call_dummy_address (struct gdbarch *gdbarch)
3706 {
3707   gdb_assert (gdbarch != NULL);
3708   if (gdbarch->call_dummy_address == 0)
3709     internal_error (__FILE__, __LINE__,
3710                     "gdbarch: gdbarch_call_dummy_address invalid");
3711   if (gdbarch_debug >= 2)
3712     fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_address called\n");
3713   return gdbarch->call_dummy_address ();
3714 }
3715
3716 void
3717 set_gdbarch_call_dummy_address (struct gdbarch *gdbarch,
3718                                 gdbarch_call_dummy_address_ftype call_dummy_address)
3719 {
3720   gdbarch->call_dummy_address = call_dummy_address;
3721 }
3722
3723 CORE_ADDR
3724 gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch)
3725 {
3726   gdb_assert (gdbarch != NULL);
3727   if (gdbarch_debug >= 2)
3728     fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_start_offset called\n");
3729   return gdbarch->call_dummy_start_offset;
3730 }
3731
3732 void
3733 set_gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch,
3734                                      CORE_ADDR call_dummy_start_offset)
3735 {
3736   gdbarch->call_dummy_start_offset = call_dummy_start_offset;
3737 }
3738
3739 CORE_ADDR
3740 gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch)
3741 {
3742   gdb_assert (gdbarch != NULL);
3743   if (gdbarch_debug >= 2)
3744     fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset called\n");
3745   return gdbarch->call_dummy_breakpoint_offset;
3746 }
3747
3748 void
3749 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch,
3750                                           CORE_ADDR call_dummy_breakpoint_offset)
3751 {
3752   gdbarch->call_dummy_breakpoint_offset = call_dummy_breakpoint_offset;
3753 }
3754
3755 int
3756 gdbarch_call_dummy_length (struct gdbarch *gdbarch)
3757 {
3758   gdb_assert (gdbarch != NULL);
3759   if (gdbarch_debug >= 2)
3760     fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_length called\n");
3761   return gdbarch->call_dummy_length;
3762 }
3763
3764 void
3765 set_gdbarch_call_dummy_length (struct gdbarch *gdbarch,
3766                                int call_dummy_length)
3767 {
3768   gdbarch->call_dummy_length = call_dummy_length;
3769 }
3770
3771 int
3772 gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch *gdbarch)
3773 {
3774   gdb_assert (gdbarch != NULL);
3775   return gdbarch->deprecated_pc_in_call_dummy != generic_pc_in_call_dummy;
3776 }
3777
3778 int
3779 gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address)
3780 {
3781   gdb_assert (gdbarch != NULL);
3782   if (gdbarch->deprecated_pc_in_call_dummy == 0)
3783     internal_error (__FILE__, __LINE__,
3784                     "gdbarch: gdbarch_deprecated_pc_in_call_dummy invalid");
3785   /* Ignore predicate (gdbarch->deprecated_pc_in_call_dummy != generic_pc_in_call_dummy).  */
3786   if (gdbarch_debug >= 2)
3787     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pc_in_call_dummy called\n");
3788   return gdbarch->deprecated_pc_in_call_dummy (pc, sp, frame_address);
3789 }
3790
3791 void
3792 set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch,
3793                                          gdbarch_deprecated_pc_in_call_dummy_ftype deprecated_pc_in_call_dummy)
3794 {
3795   gdbarch->deprecated_pc_in_call_dummy = deprecated_pc_in_call_dummy;
3796 }
3797
3798 LONGEST *
3799 gdbarch_call_dummy_words (struct gdbarch *gdbarch)
3800 {
3801   gdb_assert (gdbarch != NULL);
3802   /* Skip verify of call_dummy_words, invalid_p == 0 */
3803   if (gdbarch_debug >= 2)
3804     fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_words called\n");
3805   return gdbarch->call_dummy_words;
3806 }
3807
3808 void
3809 set_gdbarch_call_dummy_words (struct gdbarch *gdbarch,
3810                               LONGEST * call_dummy_words)
3811 {
3812   gdbarch->call_dummy_words = call_dummy_words;
3813 }
3814
3815 int
3816 gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch)
3817 {
3818   gdb_assert (gdbarch != NULL);
3819   /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3820   if (gdbarch_debug >= 2)
3821     fprintf_unfiltered (gdb_stdlog, "gdbarch_sizeof_call_dummy_words called\n");
3822   return gdbarch->sizeof_call_dummy_words;
3823 }
3824
3825 void
3826 set_gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch,
3827                                      int sizeof_call_dummy_words)
3828 {
3829   gdbarch->sizeof_call_dummy_words = sizeof_call_dummy_words;
3830 }
3831
3832 int
3833 gdbarch_deprecated_call_dummy_stack_adjust_p (struct gdbarch *gdbarch)
3834 {
3835   gdb_assert (gdbarch != NULL);
3836   return gdbarch->deprecated_call_dummy_stack_adjust != 0;
3837 }
3838
3839 int
3840 gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch *gdbarch)
3841 {
3842   gdb_assert (gdbarch != NULL);
3843   if (gdbarch_debug >= 2)
3844     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_stack_adjust called\n");
3845   return gdbarch->deprecated_call_dummy_stack_adjust;
3846 }
3847
3848 void
3849 set_gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch *gdbarch,
3850                                                 int deprecated_call_dummy_stack_adjust)
3851 {
3852   gdbarch->deprecated_call_dummy_stack_adjust = deprecated_call_dummy_stack_adjust;
3853 }
3854
3855 int
3856 gdbarch_fix_call_dummy_p (struct gdbarch *gdbarch)
3857 {
3858   gdb_assert (gdbarch != NULL);
3859   return gdbarch->fix_call_dummy != 0;
3860 }
3861
3862 void
3863 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)
3864 {
3865   gdb_assert (gdbarch != NULL);
3866   if (gdbarch->fix_call_dummy == 0)
3867     internal_error (__FILE__, __LINE__,
3868                     "gdbarch: gdbarch_fix_call_dummy invalid");
3869   if (gdbarch_debug >= 2)
3870     fprintf_unfiltered (gdb_stdlog, "gdbarch_fix_call_dummy called\n");
3871   gdbarch->fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p);
3872 }
3873
3874 void
3875 set_gdbarch_fix_call_dummy (struct gdbarch *gdbarch,
3876                             gdbarch_fix_call_dummy_ftype fix_call_dummy)
3877 {
3878   gdbarch->fix_call_dummy = fix_call_dummy;
3879 }
3880
3881 int
3882 gdbarch_deprecated_init_frame_pc_first_p (struct gdbarch *gdbarch)
3883 {
3884   gdb_assert (gdbarch != NULL);
3885   return gdbarch->deprecated_init_frame_pc_first != 0;
3886 }
3887
3888 CORE_ADDR
3889 gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
3890 {
3891   gdb_assert (gdbarch != NULL);
3892   if (gdbarch->deprecated_init_frame_pc_first == 0)
3893     internal_error (__FILE__, __LINE__,
3894                     "gdbarch: gdbarch_deprecated_init_frame_pc_first invalid");
3895   if (gdbarch_debug >= 2)
3896     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc_first called\n");
3897   return gdbarch->deprecated_init_frame_pc_first (fromleaf, prev);
3898 }
3899
3900 void
3901 set_gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch,
3902                                             gdbarch_deprecated_init_frame_pc_first_ftype deprecated_init_frame_pc_first)
3903 {
3904   gdbarch->deprecated_init_frame_pc_first = deprecated_init_frame_pc_first;
3905 }
3906
3907 int
3908 gdbarch_deprecated_init_frame_pc_p (struct gdbarch *gdbarch)
3909 {
3910   gdb_assert (gdbarch != NULL);
3911   return gdbarch->deprecated_init_frame_pc != 0;
3912 }
3913
3914 CORE_ADDR
3915 gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
3916 {
3917   gdb_assert (gdbarch != NULL);
3918   if (gdbarch->deprecated_init_frame_pc == 0)
3919     internal_error (__FILE__, __LINE__,
3920                     "gdbarch: gdbarch_deprecated_init_frame_pc invalid");
3921   if (gdbarch_debug >= 2)
3922     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc called\n");
3923   return gdbarch->deprecated_init_frame_pc (fromleaf, prev);
3924 }
3925
3926 void
3927 set_gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch,
3928                                       gdbarch_deprecated_init_frame_pc_ftype deprecated_init_frame_pc)
3929 {
3930   gdbarch->deprecated_init_frame_pc = deprecated_init_frame_pc;
3931 }
3932
3933 int
3934 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
3935 {
3936   gdb_assert (gdbarch != NULL);
3937   if (gdbarch_debug >= 2)
3938     fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
3939   return gdbarch->believe_pcc_promotion;
3940 }
3941
3942 void
3943 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
3944                                    int believe_pcc_promotion)
3945 {
3946   gdbarch->believe_pcc_promotion = believe_pcc_promotion;
3947 }
3948
3949 int
3950 gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch)
3951 {
3952   gdb_assert (gdbarch != NULL);
3953   if (gdbarch_debug >= 2)
3954     fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion_type called\n");
3955   return gdbarch->believe_pcc_promotion_type;
3956 }
3957
3958 void
3959 set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch,
3960                                         int believe_pcc_promotion_type)
3961 {
3962   gdbarch->believe_pcc_promotion_type = believe_pcc_promotion_type;
3963 }
3964
3965 int
3966 gdbarch_deprecated_get_saved_register_p (struct gdbarch *gdbarch)
3967 {
3968   gdb_assert (gdbarch != NULL);
3969   return gdbarch->deprecated_get_saved_register != 0;
3970 }
3971
3972 void
3973 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)
3974 {
3975   gdb_assert (gdbarch != NULL);
3976   if (gdbarch->deprecated_get_saved_register == 0)
3977     internal_error (__FILE__, __LINE__,
3978                     "gdbarch: gdbarch_deprecated_get_saved_register invalid");
3979   if (gdbarch_debug >= 2)
3980     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_get_saved_register called\n");
3981   gdbarch->deprecated_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval);
3982 }
3983
3984 void
3985 set_gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch,
3986                                            gdbarch_deprecated_get_saved_register_ftype deprecated_get_saved_register)
3987 {
3988   gdbarch->deprecated_get_saved_register = deprecated_get_saved_register;
3989 }
3990
3991 int
3992 gdbarch_register_convertible (struct gdbarch *gdbarch, int nr)
3993 {
3994   gdb_assert (gdbarch != NULL);
3995   if (gdbarch->register_convertible == 0)
3996     internal_error (__FILE__, __LINE__,
3997                     "gdbarch: gdbarch_register_convertible invalid");
3998   if (gdbarch_debug >= 2)
3999     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convertible called\n");
4000   return gdbarch->register_convertible (nr);
4001 }
4002
4003 void
4004 set_gdbarch_register_convertible (struct gdbarch *gdbarch,
4005                                   gdbarch_register_convertible_ftype register_convertible)
4006 {
4007   gdbarch->register_convertible = register_convertible;
4008 }
4009
4010 void
4011 gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
4012 {
4013   gdb_assert (gdbarch != NULL);
4014   if (gdbarch->register_convert_to_virtual == 0)
4015     internal_error (__FILE__, __LINE__,
4016                     "gdbarch: gdbarch_register_convert_to_virtual invalid");
4017   if (gdbarch_debug >= 2)
4018     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_virtual called\n");
4019   gdbarch->register_convert_to_virtual (regnum, type, from, to);
4020 }
4021
4022 void
4023 set_gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch,
4024                                          gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual)
4025 {
4026   gdbarch->register_convert_to_virtual = register_convert_to_virtual;
4027 }
4028
4029 void
4030 gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to)
4031 {
4032   gdb_assert (gdbarch != NULL);
4033   if (gdbarch->register_convert_to_raw == 0)
4034     internal_error (__FILE__, __LINE__,
4035                     "gdbarch: gdbarch_register_convert_to_raw invalid");
4036   if (gdbarch_debug >= 2)
4037     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_raw called\n");
4038   gdbarch->register_convert_to_raw (type, regnum, from, to);
4039 }
4040
4041 void
4042 set_gdbarch_register_convert_to_raw (struct gdbarch *gdbarch,
4043                                      gdbarch_register_convert_to_raw_ftype register_convert_to_raw)
4044 {
4045   gdbarch->register_convert_to_raw = register_convert_to_raw;
4046 }
4047
4048 int
4049 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum)
4050 {
4051   gdb_assert (gdbarch != NULL);
4052   if (gdbarch->convert_register_p == 0)
4053     internal_error (__FILE__, __LINE__,
4054                     "gdbarch: gdbarch_convert_register_p invalid");
4055   if (gdbarch_debug >= 2)
4056     fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
4057   return gdbarch->convert_register_p (regnum);
4058 }
4059
4060 void
4061 set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
4062                                 gdbarch_convert_register_p_ftype convert_register_p)
4063 {
4064   gdbarch->convert_register_p = convert_register_p;
4065 }
4066
4067 void
4068 gdbarch_register_to_value (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
4069 {
4070   gdb_assert (gdbarch != NULL);
4071   if (gdbarch->register_to_value == 0)
4072     internal_error (__FILE__, __LINE__,
4073                     "gdbarch: gdbarch_register_to_value invalid");
4074   if (gdbarch_debug >= 2)
4075     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
4076   gdbarch->register_to_value (regnum, type, from, to);
4077 }
4078
4079 void
4080 set_gdbarch_register_to_value (struct gdbarch *gdbarch,
4081                                gdbarch_register_to_value_ftype register_to_value)
4082 {
4083   gdbarch->register_to_value = register_to_value;
4084 }
4085
4086 void
4087 gdbarch_value_to_register (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to)
4088 {
4089   gdb_assert (gdbarch != NULL);
4090   if (gdbarch->value_to_register == 0)
4091     internal_error (__FILE__, __LINE__,
4092                     "gdbarch: gdbarch_value_to_register invalid");
4093   if (gdbarch_debug >= 2)
4094     fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
4095   gdbarch->value_to_register (type, regnum, from, to);
4096 }
4097
4098 void
4099 set_gdbarch_value_to_register (struct gdbarch *gdbarch,
4100                                gdbarch_value_to_register_ftype value_to_register)
4101 {
4102   gdbarch->value_to_register = value_to_register;
4103 }
4104
4105 CORE_ADDR
4106 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const void *buf)
4107 {
4108   gdb_assert (gdbarch != NULL);
4109   if (gdbarch->pointer_to_address == 0)
4110     internal_error (__FILE__, __LINE__,
4111                     "gdbarch: gdbarch_pointer_to_address invalid");
4112   if (gdbarch_debug >= 2)
4113     fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
4114   return gdbarch->pointer_to_address (type, buf);
4115 }
4116
4117 void
4118 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
4119                                 gdbarch_pointer_to_address_ftype pointer_to_address)
4120 {
4121   gdbarch->pointer_to_address = pointer_to_address;
4122 }
4123
4124 void
4125 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr)
4126 {
4127   gdb_assert (gdbarch != NULL);
4128   if (gdbarch->address_to_pointer == 0)
4129     internal_error (__FILE__, __LINE__,
4130                     "gdbarch: gdbarch_address_to_pointer invalid");
4131   if (gdbarch_debug >= 2)
4132     fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
4133   gdbarch->address_to_pointer (type, buf, addr);
4134 }
4135
4136 void
4137 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
4138                                 gdbarch_address_to_pointer_ftype address_to_pointer)
4139 {
4140   gdbarch->address_to_pointer = address_to_pointer;
4141 }
4142
4143 int
4144 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
4145 {
4146   gdb_assert (gdbarch != NULL);
4147   return gdbarch->integer_to_address != 0;
4148 }
4149
4150 CORE_ADDR
4151 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
4152 {
4153   gdb_assert (gdbarch != NULL);
4154   if (gdbarch->integer_to_address == 0)
4155     internal_error (__FILE__, __LINE__,
4156                     "gdbarch: gdbarch_integer_to_address invalid");
4157   if (gdbarch_debug >= 2)
4158     fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
4159   return gdbarch->integer_to_address (type, buf);
4160 }
4161
4162 void
4163 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
4164                                 gdbarch_integer_to_address_ftype integer_to_address)
4165 {
4166   gdbarch->integer_to_address = integer_to_address;
4167 }
4168
4169 int
4170 gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type)
4171 {
4172   gdb_assert (gdbarch != NULL);
4173   if (gdbarch->return_value_on_stack == 0)
4174     internal_error (__FILE__, __LINE__,
4175                     "gdbarch: gdbarch_return_value_on_stack invalid");
4176   if (gdbarch_debug >= 2)
4177     fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value_on_stack called\n");
4178   return gdbarch->return_value_on_stack (type);
4179 }
4180
4181 void
4182 set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch,
4183                                    gdbarch_return_value_on_stack_ftype return_value_on_stack)
4184 {
4185   gdbarch->return_value_on_stack = return_value_on_stack;
4186 }
4187
4188 int
4189 gdbarch_deprecated_push_arguments_p (struct gdbarch *gdbarch)
4190 {
4191   gdb_assert (gdbarch != NULL);
4192   return gdbarch->deprecated_push_arguments != 0;
4193 }
4194
4195 CORE_ADDR
4196 gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
4197 {
4198   gdb_assert (gdbarch != NULL);
4199   if (gdbarch->deprecated_push_arguments == 0)
4200     internal_error (__FILE__, __LINE__,
4201                     "gdbarch: gdbarch_deprecated_push_arguments invalid");
4202   if (gdbarch_debug >= 2)
4203     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_arguments called\n");
4204   return gdbarch->deprecated_push_arguments (nargs, args, sp, struct_return, struct_addr);
4205 }
4206
4207 void
4208 set_gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch,
4209                                        gdbarch_deprecated_push_arguments_ftype deprecated_push_arguments)
4210 {
4211   gdbarch->deprecated_push_arguments = deprecated_push_arguments;
4212 }
4213
4214 int
4215 gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
4216 {
4217   gdb_assert (gdbarch != NULL);
4218   return gdbarch->push_dummy_call != 0;
4219 }
4220
4221 CORE_ADDR
4222 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)
4223 {
4224   gdb_assert (gdbarch != NULL);
4225   if (gdbarch->push_dummy_call == 0)
4226     internal_error (__FILE__, __LINE__,
4227                     "gdbarch: gdbarch_push_dummy_call invalid");
4228   if (gdbarch_debug >= 2)
4229     fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
4230   return gdbarch->push_dummy_call (gdbarch, regcache, dummy_addr, nargs, args, sp, struct_return, struct_addr);
4231 }
4232
4233 void
4234 set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
4235                              gdbarch_push_dummy_call_ftype push_dummy_call)
4236 {
4237   gdbarch->push_dummy_call = push_dummy_call;
4238 }
4239
4240 int
4241 gdbarch_deprecated_push_dummy_frame_p (struct gdbarch *gdbarch)
4242 {
4243   gdb_assert (gdbarch != NULL);
4244   return gdbarch->deprecated_push_dummy_frame != 0;
4245 }
4246
4247 void
4248 gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch)
4249 {
4250   gdb_assert (gdbarch != NULL);
4251   if (gdbarch->deprecated_push_dummy_frame == 0)
4252     internal_error (__FILE__, __LINE__,
4253                     "gdbarch: gdbarch_deprecated_push_dummy_frame invalid");
4254   if (gdbarch_debug >= 2)
4255     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_dummy_frame called\n");
4256   gdbarch->deprecated_push_dummy_frame ();
4257 }
4258
4259 void
4260 set_gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch,
4261                                          gdbarch_deprecated_push_dummy_frame_ftype deprecated_push_dummy_frame)
4262 {
4263   gdbarch->deprecated_push_dummy_frame = deprecated_push_dummy_frame;
4264 }
4265
4266 int
4267 gdbarch_deprecated_push_return_address_p (struct gdbarch *gdbarch)
4268 {
4269   gdb_assert (gdbarch != NULL);
4270   return gdbarch->deprecated_push_return_address != 0;
4271 }
4272
4273 CORE_ADDR
4274 gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp)
4275 {
4276   gdb_assert (gdbarch != NULL);
4277   if (gdbarch->deprecated_push_return_address == 0)
4278     internal_error (__FILE__, __LINE__,
4279                     "gdbarch: gdbarch_deprecated_push_return_address invalid");
4280   if (gdbarch_debug >= 2)
4281     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_return_address called\n");
4282   return gdbarch->deprecated_push_return_address (pc, sp);
4283 }
4284
4285 void
4286 set_gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch,
4287                                             gdbarch_deprecated_push_return_address_ftype deprecated_push_return_address)
4288 {
4289   gdbarch->deprecated_push_return_address = deprecated_push_return_address;
4290 }
4291
4292 int
4293 gdbarch_deprecated_pop_frame_p (struct gdbarch *gdbarch)
4294 {
4295   gdb_assert (gdbarch != NULL);
4296   return gdbarch->deprecated_pop_frame != 0;
4297 }
4298
4299 void
4300 gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch)
4301 {
4302   gdb_assert (gdbarch != NULL);
4303   if (gdbarch->deprecated_pop_frame == 0)
4304     internal_error (__FILE__, __LINE__,
4305                     "gdbarch: gdbarch_deprecated_pop_frame invalid");
4306   if (gdbarch_debug >= 2)
4307     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pop_frame called\n");
4308   gdbarch->deprecated_pop_frame ();
4309 }
4310
4311 void
4312 set_gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch,
4313                                   gdbarch_deprecated_pop_frame_ftype deprecated_pop_frame)
4314 {
4315   gdbarch->deprecated_pop_frame = deprecated_pop_frame;
4316 }
4317
4318 int
4319 gdbarch_deprecated_store_struct_return_p (struct gdbarch *gdbarch)
4320 {
4321   gdb_assert (gdbarch != NULL);
4322   return gdbarch->deprecated_store_struct_return != 0;
4323 }
4324
4325 void
4326 gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
4327 {
4328   gdb_assert (gdbarch != NULL);
4329   if (gdbarch->deprecated_store_struct_return == 0)
4330     internal_error (__FILE__, __LINE__,
4331                     "gdbarch: gdbarch_deprecated_store_struct_return invalid");
4332   if (gdbarch_debug >= 2)
4333     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_struct_return called\n");
4334   gdbarch->deprecated_store_struct_return (addr, sp);
4335 }
4336
4337 void
4338 set_gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch,
4339                                             gdbarch_deprecated_store_struct_return_ftype deprecated_store_struct_return)
4340 {
4341   gdbarch->deprecated_store_struct_return = deprecated_store_struct_return;
4342 }
4343
4344 void
4345 gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf)
4346 {
4347   gdb_assert (gdbarch != NULL);
4348   if (gdbarch->extract_return_value == 0)
4349     internal_error (__FILE__, __LINE__,
4350                     "gdbarch: gdbarch_extract_return_value invalid");
4351   if (gdbarch_debug >= 2)
4352     fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
4353   gdbarch->extract_return_value (type, regcache, valbuf);
4354 }
4355
4356 void
4357 set_gdbarch_extract_return_value (struct gdbarch *gdbarch,
4358                                   gdbarch_extract_return_value_ftype extract_return_value)
4359 {
4360   gdbarch->extract_return_value = extract_return_value;
4361 }
4362
4363 void
4364 gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const void *valbuf)
4365 {
4366   gdb_assert (gdbarch != NULL);
4367   if (gdbarch->store_return_value == 0)
4368     internal_error (__FILE__, __LINE__,
4369                     "gdbarch: gdbarch_store_return_value invalid");
4370   if (gdbarch_debug >= 2)
4371     fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
4372   gdbarch->store_return_value (type, regcache, valbuf);
4373 }
4374
4375 void
4376 set_gdbarch_store_return_value (struct gdbarch *gdbarch,
4377                                 gdbarch_store_return_value_ftype store_return_value)
4378 {
4379   gdbarch->store_return_value = store_return_value;
4380 }
4381
4382 void
4383 gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
4384 {
4385   gdb_assert (gdbarch != NULL);
4386   if (gdbarch->deprecated_extract_return_value == 0)
4387     internal_error (__FILE__, __LINE__,
4388                     "gdbarch: gdbarch_deprecated_extract_return_value invalid");
4389   if (gdbarch_debug >= 2)
4390     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_return_value called\n");
4391   gdbarch->deprecated_extract_return_value (type, regbuf, valbuf);
4392 }
4393
4394 void
4395 set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch,
4396                                              gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value)
4397 {
4398   gdbarch->deprecated_extract_return_value = deprecated_extract_return_value;
4399 }
4400
4401 void
4402 gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf)
4403 {
4404   gdb_assert (gdbarch != NULL);
4405   if (gdbarch->deprecated_store_return_value == 0)
4406     internal_error (__FILE__, __LINE__,
4407                     "gdbarch: gdbarch_deprecated_store_return_value invalid");
4408   if (gdbarch_debug >= 2)
4409     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_return_value called\n");
4410   gdbarch->deprecated_store_return_value (type, valbuf);
4411 }
4412
4413 void
4414 set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch,
4415                                            gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value)
4416 {
4417   gdbarch->deprecated_store_return_value = deprecated_store_return_value;
4418 }
4419
4420 int
4421 gdbarch_extract_struct_value_address_p (struct gdbarch *gdbarch)
4422 {
4423   gdb_assert (gdbarch != NULL);
4424   return gdbarch->extract_struct_value_address != 0;
4425 }
4426
4427 CORE_ADDR
4428 gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache)
4429 {
4430   gdb_assert (gdbarch != NULL);
4431   if (gdbarch->extract_struct_value_address == 0)
4432     internal_error (__FILE__, __LINE__,
4433                     "gdbarch: gdbarch_extract_struct_value_address invalid");
4434   if (gdbarch_debug >= 2)
4435     fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_struct_value_address called\n");
4436   return gdbarch->extract_struct_value_address (regcache);
4437 }
4438
4439 void
4440 set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch,
4441                                           gdbarch_extract_struct_value_address_ftype extract_struct_value_address)
4442 {
4443   gdbarch->extract_struct_value_address = extract_struct_value_address;
4444 }
4445
4446 int
4447 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch)
4448 {
4449   gdb_assert (gdbarch != NULL);
4450   return gdbarch->deprecated_extract_struct_value_address != 0;
4451 }
4452
4453 CORE_ADDR
4454 gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf)
4455 {
4456   gdb_assert (gdbarch != NULL);
4457   if (gdbarch->deprecated_extract_struct_value_address == 0)
4458     internal_error (__FILE__, __LINE__,
4459                     "gdbarch: gdbarch_deprecated_extract_struct_value_address invalid");
4460   if (gdbarch_debug >= 2)
4461     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_struct_value_address called\n");
4462   return gdbarch->deprecated_extract_struct_value_address (regbuf);
4463 }
4464
4465 void
4466 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch,
4467                                                      gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address)
4468 {
4469   gdbarch->deprecated_extract_struct_value_address = deprecated_extract_struct_value_address;
4470 }
4471
4472 int
4473 gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
4474 {
4475   gdb_assert (gdbarch != NULL);
4476   if (gdbarch->use_struct_convention == 0)
4477     internal_error (__FILE__, __LINE__,
4478                     "gdbarch: gdbarch_use_struct_convention invalid");
4479   if (gdbarch_debug >= 2)
4480     fprintf_unfiltered (gdb_stdlog, "gdbarch_use_struct_convention called\n");
4481   return gdbarch->use_struct_convention (gcc_p, value_type);
4482 }
4483
4484 void
4485 set_gdbarch_use_struct_convention (struct gdbarch *gdbarch,
4486                                    gdbarch_use_struct_convention_ftype use_struct_convention)
4487 {
4488   gdbarch->use_struct_convention = use_struct_convention;
4489 }
4490
4491 int
4492 gdbarch_deprecated_frame_init_saved_regs_p (struct gdbarch *gdbarch)
4493 {
4494   gdb_assert (gdbarch != NULL);
4495   return gdbarch->deprecated_frame_init_saved_regs != 0;
4496 }
4497
4498 void
4499 gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame)
4500 {
4501   gdb_assert (gdbarch != NULL);
4502   if (gdbarch->deprecated_frame_init_saved_regs == 0)
4503     internal_error (__FILE__, __LINE__,
4504                     "gdbarch: gdbarch_deprecated_frame_init_saved_regs invalid");
4505   if (gdbarch_debug >= 2)
4506     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_init_saved_regs called\n");
4507   gdbarch->deprecated_frame_init_saved_regs (frame);
4508 }
4509
4510 void
4511 set_gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch,
4512                                               gdbarch_deprecated_frame_init_saved_regs_ftype deprecated_frame_init_saved_regs)
4513 {
4514   gdbarch->deprecated_frame_init_saved_regs = deprecated_frame_init_saved_regs;
4515 }
4516
4517 int
4518 gdbarch_deprecated_init_extra_frame_info_p (struct gdbarch *gdbarch)
4519 {
4520   gdb_assert (gdbarch != NULL);
4521   return gdbarch->deprecated_init_extra_frame_info != 0;
4522 }
4523
4524 void
4525 gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame)
4526 {
4527   gdb_assert (gdbarch != NULL);
4528   if (gdbarch->deprecated_init_extra_frame_info == 0)
4529     internal_error (__FILE__, __LINE__,
4530                     "gdbarch: gdbarch_deprecated_init_extra_frame_info invalid");
4531   if (gdbarch_debug >= 2)
4532     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_extra_frame_info called\n");
4533   gdbarch->deprecated_init_extra_frame_info (fromleaf, frame);
4534 }
4535
4536 void
4537 set_gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch,
4538                                               gdbarch_deprecated_init_extra_frame_info_ftype deprecated_init_extra_frame_info)
4539 {
4540   gdbarch->deprecated_init_extra_frame_info = deprecated_init_extra_frame_info;
4541 }
4542
4543 CORE_ADDR
4544 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
4545 {
4546   gdb_assert (gdbarch != NULL);
4547   if (gdbarch->skip_prologue == 0)
4548     internal_error (__FILE__, __LINE__,
4549                     "gdbarch: gdbarch_skip_prologue invalid");
4550   if (gdbarch_debug >= 2)
4551     fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
4552   return gdbarch->skip_prologue (ip);
4553 }
4554
4555 void
4556 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
4557                            gdbarch_skip_prologue_ftype skip_prologue)
4558 {
4559   gdbarch->skip_prologue = skip_prologue;
4560 }
4561
4562 int
4563 gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, CORE_ADDR ip)
4564 {
4565   gdb_assert (gdbarch != NULL);
4566   if (gdbarch->prologue_frameless_p == 0)
4567     internal_error (__FILE__, __LINE__,
4568                     "gdbarch: gdbarch_prologue_frameless_p invalid");
4569   if (gdbarch_debug >= 2)
4570     fprintf_unfiltered (gdb_stdlog, "gdbarch_prologue_frameless_p called\n");
4571   return gdbarch->prologue_frameless_p (ip);
4572 }
4573
4574 void
4575 set_gdbarch_prologue_frameless_p (struct gdbarch *gdbarch,
4576                                   gdbarch_prologue_frameless_p_ftype prologue_frameless_p)
4577 {
4578   gdbarch->prologue_frameless_p = prologue_frameless_p;
4579 }
4580
4581 int
4582 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
4583 {
4584   gdb_assert (gdbarch != NULL);
4585   if (gdbarch->inner_than == 0)
4586     internal_error (__FILE__, __LINE__,
4587                     "gdbarch: gdbarch_inner_than invalid");
4588   if (gdbarch_debug >= 2)
4589     fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
4590   return gdbarch->inner_than (lhs, rhs);
4591 }
4592
4593 void
4594 set_gdbarch_inner_than (struct gdbarch *gdbarch,
4595                         gdbarch_inner_than_ftype inner_than)
4596 {
4597   gdbarch->inner_than = inner_than;
4598 }
4599
4600 const unsigned char *
4601 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
4602 {
4603   gdb_assert (gdbarch != NULL);
4604   if (gdbarch->breakpoint_from_pc == 0)
4605     internal_error (__FILE__, __LINE__,
4606                     "gdbarch: gdbarch_breakpoint_from_pc invalid");
4607   if (gdbarch_debug >= 2)
4608     fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
4609   return gdbarch->breakpoint_from_pc (pcptr, lenptr);
4610 }
4611
4612 void
4613 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
4614                                 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
4615 {
4616   gdbarch->breakpoint_from_pc = breakpoint_from_pc;
4617 }
4618
4619 int
4620 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
4621 {
4622   gdb_assert (gdbarch != NULL);
4623   if (gdbarch->memory_insert_breakpoint == 0)
4624     internal_error (__FILE__, __LINE__,
4625                     "gdbarch: gdbarch_memory_insert_breakpoint invalid");
4626   if (gdbarch_debug >= 2)
4627     fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
4628   return gdbarch->memory_insert_breakpoint (addr, contents_cache);
4629 }
4630
4631 void
4632 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
4633                                       gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
4634 {
4635   gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
4636 }
4637
4638 int
4639 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
4640 {
4641   gdb_assert (gdbarch != NULL);
4642   if (gdbarch->memory_remove_breakpoint == 0)
4643     internal_error (__FILE__, __LINE__,
4644                     "gdbarch: gdbarch_memory_remove_breakpoint invalid");
4645   if (gdbarch_debug >= 2)
4646     fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
4647   return gdbarch->memory_remove_breakpoint (addr, contents_cache);
4648 }
4649
4650 void
4651 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
4652                                       gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
4653 {
4654   gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
4655 }
4656
4657 CORE_ADDR
4658 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
4659 {
4660   gdb_assert (gdbarch != NULL);
4661   if (gdbarch->decr_pc_after_break == -1)
4662     internal_error (__FILE__, __LINE__,
4663                     "gdbarch: gdbarch_decr_pc_after_break invalid");
4664   if (gdbarch_debug >= 2)
4665     fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
4666   return gdbarch->decr_pc_after_break;
4667 }
4668
4669 void
4670 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
4671                                  CORE_ADDR decr_pc_after_break)
4672 {
4673   gdbarch->decr_pc_after_break = decr_pc_after_break;
4674 }
4675
4676 int
4677 gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, int select_it)
4678 {
4679   gdb_assert (gdbarch != NULL);
4680   if (gdbarch->prepare_to_proceed == 0)
4681     internal_error (__FILE__, __LINE__,
4682                     "gdbarch: gdbarch_prepare_to_proceed invalid");
4683   if (gdbarch_debug >= 2)
4684     fprintf_unfiltered (gdb_stdlog, "gdbarch_prepare_to_proceed called\n");
4685   return gdbarch->prepare_to_proceed (select_it);
4686 }
4687
4688 void
4689 set_gdbarch_prepare_to_proceed (struct gdbarch *gdbarch,
4690                                 gdbarch_prepare_to_proceed_ftype prepare_to_proceed)
4691 {
4692   gdbarch->prepare_to_proceed = prepare_to_proceed;
4693 }
4694
4695 CORE_ADDR
4696 gdbarch_function_start_offset (struct gdbarch *gdbarch)
4697 {
4698   gdb_assert (gdbarch != NULL);
4699   if (gdbarch->function_start_offset == -1)
4700     internal_error (__FILE__, __LINE__,
4701                     "gdbarch: gdbarch_function_start_offset invalid");
4702   if (gdbarch_debug >= 2)
4703     fprintf_unfiltered (gdb_stdlog, "gdbarch_function_start_offset called\n");
4704   return gdbarch->function_start_offset;
4705 }
4706
4707 void
4708 set_gdbarch_function_start_offset (struct gdbarch *gdbarch,
4709                                    CORE_ADDR function_start_offset)
4710 {
4711   gdbarch->function_start_offset = function_start_offset;
4712 }
4713
4714 void
4715 gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len)
4716 {
4717   gdb_assert (gdbarch != NULL);
4718   if (gdbarch->remote_translate_xfer_address == 0)
4719     internal_error (__FILE__, __LINE__,
4720                     "gdbarch: gdbarch_remote_translate_xfer_address invalid");
4721   if (gdbarch_debug >= 2)
4722     fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
4723   gdbarch->remote_translate_xfer_address (gdb_addr, gdb_len, rem_addr, rem_len);
4724 }
4725
4726 void
4727 set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch,
4728                                            gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address)
4729 {
4730   gdbarch->remote_translate_xfer_address = remote_translate_xfer_address;
4731 }
4732
4733 CORE_ADDR
4734 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
4735 {
4736   gdb_assert (gdbarch != NULL);
4737   if (gdbarch->frame_args_skip == -1)
4738     internal_error (__FILE__, __LINE__,
4739                     "gdbarch: gdbarch_frame_args_skip invalid");
4740   if (gdbarch_debug >= 2)
4741     fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
4742   return gdbarch->frame_args_skip;
4743 }
4744
4745 void
4746 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
4747                              CORE_ADDR frame_args_skip)
4748 {
4749   gdbarch->frame_args_skip = frame_args_skip;
4750 }
4751
4752 int
4753 gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi)
4754 {
4755   gdb_assert (gdbarch != NULL);
4756   if (gdbarch->frameless_function_invocation == 0)
4757     internal_error (__FILE__, __LINE__,
4758                     "gdbarch: gdbarch_frameless_function_invocation invalid");
4759   if (gdbarch_debug >= 2)
4760     fprintf_unfiltered (gdb_stdlog, "gdbarch_frameless_function_invocation called\n");
4761   return gdbarch->frameless_function_invocation (fi);
4762 }
4763
4764 void
4765 set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch,
4766                                            gdbarch_frameless_function_invocation_ftype frameless_function_invocation)
4767 {
4768   gdbarch->frameless_function_invocation = frameless_function_invocation;
4769 }
4770
4771 int
4772 gdbarch_deprecated_frame_chain_p (struct gdbarch *gdbarch)
4773 {
4774   gdb_assert (gdbarch != NULL);
4775   return gdbarch->deprecated_frame_chain != 0;
4776 }
4777
4778 CORE_ADDR
4779 gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame)
4780 {
4781   gdb_assert (gdbarch != NULL);
4782   if (gdbarch->deprecated_frame_chain == 0)
4783     internal_error (__FILE__, __LINE__,
4784                     "gdbarch: gdbarch_deprecated_frame_chain invalid");
4785   if (gdbarch_debug >= 2)
4786     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain called\n");
4787   return gdbarch->deprecated_frame_chain (frame);
4788 }
4789
4790 void
4791 set_gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch,
4792                                     gdbarch_deprecated_frame_chain_ftype deprecated_frame_chain)
4793 {
4794   gdbarch->deprecated_frame_chain = deprecated_frame_chain;
4795 }
4796
4797 int
4798 gdbarch_deprecated_frame_chain_valid_p (struct gdbarch *gdbarch)
4799 {
4800   gdb_assert (gdbarch != NULL);
4801   return gdbarch->deprecated_frame_chain_valid != 0;
4802 }
4803
4804 int
4805 gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe)
4806 {
4807   gdb_assert (gdbarch != NULL);
4808   if (gdbarch->deprecated_frame_chain_valid == 0)
4809     internal_error (__FILE__, __LINE__,
4810                     "gdbarch: gdbarch_deprecated_frame_chain_valid invalid");
4811   if (gdbarch_debug >= 2)
4812     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain_valid called\n");
4813   return gdbarch->deprecated_frame_chain_valid (chain, thisframe);
4814 }
4815
4816 void
4817 set_gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch,
4818                                           gdbarch_deprecated_frame_chain_valid_ftype deprecated_frame_chain_valid)
4819 {
4820   gdbarch->deprecated_frame_chain_valid = deprecated_frame_chain_valid;
4821 }
4822
4823 int
4824 gdbarch_deprecated_frame_saved_pc_p (struct gdbarch *gdbarch)
4825 {
4826   gdb_assert (gdbarch != NULL);
4827   return gdbarch->deprecated_frame_saved_pc != 0;
4828 }
4829
4830 CORE_ADDR
4831 gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi)
4832 {
4833   gdb_assert (gdbarch != NULL);
4834   if (gdbarch->deprecated_frame_saved_pc == 0)
4835     internal_error (__FILE__, __LINE__,
4836                     "gdbarch: gdbarch_deprecated_frame_saved_pc invalid");
4837   if (gdbarch_debug >= 2)
4838     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_saved_pc called\n");
4839   return gdbarch->deprecated_frame_saved_pc (fi);
4840 }
4841
4842 void
4843 set_gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch,
4844                                        gdbarch_deprecated_frame_saved_pc_ftype deprecated_frame_saved_pc)
4845 {
4846   gdbarch->deprecated_frame_saved_pc = deprecated_frame_saved_pc;
4847 }
4848
4849 int
4850 gdbarch_unwind_pc_p (struct gdbarch *gdbarch)
4851 {
4852   gdb_assert (gdbarch != NULL);
4853   return gdbarch->unwind_pc != 0;
4854 }
4855
4856 CORE_ADDR
4857 gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
4858 {
4859   gdb_assert (gdbarch != NULL);
4860   if (gdbarch->unwind_pc == 0)
4861     internal_error (__FILE__, __LINE__,
4862                     "gdbarch: gdbarch_unwind_pc invalid");
4863   if (gdbarch_debug >= 2)
4864     fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n");
4865   return gdbarch->unwind_pc (gdbarch, next_frame);
4866 }
4867
4868 void
4869 set_gdbarch_unwind_pc (struct gdbarch *gdbarch,
4870                        gdbarch_unwind_pc_ftype unwind_pc)
4871 {
4872   gdbarch->unwind_pc = unwind_pc;
4873 }
4874
4875 CORE_ADDR
4876 gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
4877 {
4878   gdb_assert (gdbarch != NULL);
4879   if (gdbarch->frame_args_address == 0)
4880     internal_error (__FILE__, __LINE__,
4881                     "gdbarch: gdbarch_frame_args_address invalid");
4882   if (gdbarch_debug >= 2)
4883     fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_address called\n");
4884   return gdbarch->frame_args_address (fi);
4885 }
4886
4887 void
4888 set_gdbarch_frame_args_address (struct gdbarch *gdbarch,
4889                                 gdbarch_frame_args_address_ftype frame_args_address)
4890 {
4891   gdbarch->frame_args_address = frame_args_address;
4892 }
4893
4894 CORE_ADDR
4895 gdbarch_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
4896 {
4897   gdb_assert (gdbarch != NULL);
4898   if (gdbarch->frame_locals_address == 0)
4899     internal_error (__FILE__, __LINE__,
4900                     "gdbarch: gdbarch_frame_locals_address invalid");
4901   if (gdbarch_debug >= 2)
4902     fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_locals_address called\n");
4903   return gdbarch->frame_locals_address (fi);
4904 }
4905
4906 void
4907 set_gdbarch_frame_locals_address (struct gdbarch *gdbarch,
4908                                   gdbarch_frame_locals_address_ftype frame_locals_address)
4909 {
4910   gdbarch->frame_locals_address = frame_locals_address;
4911 }
4912
4913 int
4914 gdbarch_deprecated_saved_pc_after_call_p (struct gdbarch *gdbarch)
4915 {
4916   gdb_assert (gdbarch != NULL);
4917   return gdbarch->deprecated_saved_pc_after_call != 0;
4918 }
4919
4920 CORE_ADDR
4921 gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame)
4922 {
4923   gdb_assert (gdbarch != NULL);
4924   if (gdbarch->deprecated_saved_pc_after_call == 0)
4925     internal_error (__FILE__, __LINE__,
4926                     "gdbarch: gdbarch_deprecated_saved_pc_after_call invalid");
4927   if (gdbarch_debug >= 2)
4928     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_saved_pc_after_call called\n");
4929   return gdbarch->deprecated_saved_pc_after_call (frame);
4930 }
4931
4932 void
4933 set_gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch,
4934                                             gdbarch_deprecated_saved_pc_after_call_ftype deprecated_saved_pc_after_call)
4935 {
4936   gdbarch->deprecated_saved_pc_after_call = deprecated_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 (*deprecated_tm_print_insn) (bfd_vma, disassemble_info *);
6208
6209 extern void _initialize_gdbarch (void);
6210
6211 void
6212 _initialize_gdbarch (void)
6213 {
6214   struct cmd_list_element *c;
6215
6216   add_show_from_set (add_set_cmd ("arch",
6217                                   class_maintenance,
6218                                   var_zinteger,
6219                                   (char *)&gdbarch_debug,
6220                                   "Set architecture debugging.\n\
6221 When non-zero, architecture debugging is enabled.", &setdebuglist),
6222                      &showdebuglist);
6223   c = add_set_cmd ("archdebug",
6224                    class_maintenance,
6225                    var_zinteger,
6226                    (char *)&gdbarch_debug,
6227                    "Set architecture debugging.\n\
6228 When non-zero, architecture debugging is enabled.", &setlist);
6229
6230   deprecate_cmd (c, "set debug arch");
6231   deprecate_cmd (add_show_from_set (c, &showlist), "show debug arch");
6232 }