2004-08-05 Andrew Cagney <cagney@gnu.org>
[platform/upstream/binutils.git] / gdb / gdbarch.c
1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
2
3 /* Dynamic architecture support for GDB, the GNU debugger.
4
5    Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free
6    Software Foundation, Inc.
7
8    This file is part of GDB.
9
10    This program is free software; you can redistribute it and/or modify
11    it under the terms of the GNU General Public License as published by
12    the Free Software Foundation; either version 2 of the License, or
13    (at your option) any later version.
14
15    This program is distributed in the hope that it will be useful,
16    but WITHOUT ANY WARRANTY; without even the implied warranty of
17    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18    GNU General Public License for more details.
19
20    You should have received a copy of the GNU General Public License
21    along with this program; if not, write to the Free Software
22    Foundation, Inc., 59 Temple Place - Suite 330,
23    Boston, MA 02111-1307, USA.  */
24
25 /* This file was created with the aid of ``gdbarch.sh''.
26
27    The Bourne shell script ``gdbarch.sh'' creates the files
28    ``new-gdbarch.c'' and ``new-gdbarch.h and then compares them
29    against the existing ``gdbarch.[hc]''.  Any differences found
30    being reported.
31
32    If editing this file, please also run gdbarch.sh and merge any
33    changes into that script. Conversely, when making sweeping changes
34    to this file, modifying gdbarch.sh and using its output may prove
35    easier. */
36
37
38 #include "defs.h"
39 #include "arch-utils.h"
40
41 #include "gdbcmd.h"
42 #include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */
43 #include "symcat.h"
44
45 #include "floatformat.h"
46
47 #include "gdb_assert.h"
48 #include "gdb_string.h"
49 #include "gdb-events.h"
50 #include "reggroups.h"
51 #include "osabi.h"
52 #include "gdb_obstack.h"
53
54 /* Static function declarations */
55
56 static void alloc_gdbarch_data (struct gdbarch *);
57
58 /* Non-zero if we want to trace architecture code.  */
59
60 #ifndef GDBARCH_DEBUG
61 #define GDBARCH_DEBUG 0
62 #endif
63 int gdbarch_debug = GDBARCH_DEBUG;
64
65
66 /* Maintain the struct gdbarch object */
67
68 struct gdbarch
69 {
70   /* Has this architecture been fully initialized?  */
71   int initialized_p;
72
73   /* An obstack bound to the lifetime of the architecture.  */
74   struct obstack *obstack;
75
76   /* basic architectural information */
77   const struct bfd_arch_info * bfd_arch_info;
78   int byte_order;
79   enum gdb_osabi osabi;
80
81   /* target specific vector. */
82   struct gdbarch_tdep *tdep;
83   gdbarch_dump_tdep_ftype *dump_tdep;
84
85   /* per-architecture data-pointers */
86   unsigned nr_data;
87   void **data;
88
89   /* per-architecture swap-regions */
90   struct gdbarch_swap *swap;
91
92   /* Multi-arch values.
93
94      When extending this structure you must:
95
96      Add the field below.
97
98      Declare set/get functions and define the corresponding
99      macro in gdbarch.h.
100
101      gdbarch_alloc(): If zero/NULL is not a suitable default,
102      initialize the new field.
103
104      verify_gdbarch(): Confirm that the target updated the field
105      correctly.
106
107      gdbarch_dump(): Add a fprintf_unfiltered call so that the new
108      field is dumped out
109
110      ``startup_gdbarch()'': Append an initial value to the static
111      variable (base values on the host's c-type system).
112
113      get_gdbarch(): Implement the set/get functions (probably using
114      the macro's as shortcuts).
115
116      */
117
118   int short_bit;
119   int int_bit;
120   int long_bit;
121   int long_long_bit;
122   int float_bit;
123   int double_bit;
124   int long_double_bit;
125   int ptr_bit;
126   int addr_bit;
127   int bfd_vma_bit;
128   int char_signed;
129   gdbarch_read_pc_ftype *read_pc;
130   gdbarch_write_pc_ftype *write_pc;
131   gdbarch_read_sp_ftype *read_sp;
132   gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer;
133   gdbarch_pseudo_register_read_ftype *pseudo_register_read;
134   gdbarch_pseudo_register_write_ftype *pseudo_register_write;
135   int num_regs;
136   int num_pseudo_regs;
137   int sp_regnum;
138   int pc_regnum;
139   int ps_regnum;
140   int fp0_regnum;
141   gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum;
142   gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum;
143   gdbarch_dwarf_reg_to_regnum_ftype *dwarf_reg_to_regnum;
144   gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum;
145   gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum;
146   gdbarch_register_name_ftype *register_name;
147   gdbarch_register_type_ftype *register_type;
148   gdbarch_deprecated_register_byte_ftype *deprecated_register_byte;
149   gdbarch_unwind_dummy_id_ftype *unwind_dummy_id;
150   int deprecated_fp_regnum;
151   gdbarch_push_dummy_call_ftype *push_dummy_call;
152   gdbarch_deprecated_push_arguments_ftype *deprecated_push_arguments;
153   int deprecated_register_size;
154   int call_dummy_location;
155   gdbarch_push_dummy_code_ftype *push_dummy_code;
156   gdbarch_print_registers_info_ftype *print_registers_info;
157   gdbarch_print_float_info_ftype *print_float_info;
158   gdbarch_print_vector_info_ftype *print_vector_info;
159   gdbarch_register_sim_regno_ftype *register_sim_regno;
160   gdbarch_register_bytes_ok_ftype *register_bytes_ok;
161   gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
162   gdbarch_cannot_store_register_ftype *cannot_store_register;
163   gdbarch_get_longjmp_target_ftype *get_longjmp_target;
164   int believe_pcc_promotion;
165   gdbarch_convert_register_p_ftype *convert_register_p;
166   gdbarch_register_to_value_ftype *register_to_value;
167   gdbarch_value_to_register_ftype *value_to_register;
168   gdbarch_pointer_to_address_ftype *pointer_to_address;
169   gdbarch_address_to_pointer_ftype *address_to_pointer;
170   gdbarch_integer_to_address_ftype *integer_to_address;
171   gdbarch_deprecated_store_struct_return_ftype *deprecated_store_struct_return;
172   gdbarch_return_value_ftype *return_value;
173   gdbarch_extract_return_value_ftype *extract_return_value;
174   gdbarch_store_return_value_ftype *store_return_value;
175   gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value;
176   gdbarch_deprecated_store_return_value_ftype *deprecated_store_return_value;
177   gdbarch_deprecated_use_struct_convention_ftype *deprecated_use_struct_convention;
178   gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address;
179   gdbarch_skip_prologue_ftype *skip_prologue;
180   gdbarch_inner_than_ftype *inner_than;
181   gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
182   gdbarch_adjust_breakpoint_address_ftype *adjust_breakpoint_address;
183   gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
184   gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
185   CORE_ADDR decr_pc_after_break;
186   CORE_ADDR deprecated_function_start_offset;
187   gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address;
188   CORE_ADDR frame_args_skip;
189   gdbarch_unwind_pc_ftype *unwind_pc;
190   gdbarch_unwind_sp_ftype *unwind_sp;
191   gdbarch_deprecated_saved_pc_after_call_ftype *deprecated_saved_pc_after_call;
192   gdbarch_frame_num_args_ftype *frame_num_args;
193   gdbarch_deprecated_stack_align_ftype *deprecated_stack_align;
194   gdbarch_frame_align_ftype *frame_align;
195   gdbarch_deprecated_reg_struct_has_addr_ftype *deprecated_reg_struct_has_addr;
196   gdbarch_stabs_argument_has_addr_ftype *stabs_argument_has_addr;
197   int frame_red_zone_size;
198   const struct floatformat * float_format;
199   const struct floatformat * double_format;
200   const struct floatformat * long_double_format;
201   gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
202   gdbarch_addr_bits_remove_ftype *addr_bits_remove;
203   gdbarch_smash_text_address_ftype *smash_text_address;
204   gdbarch_software_single_step_ftype *software_single_step;
205   gdbarch_print_insn_ftype *print_insn;
206   gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
207   gdbarch_skip_solib_resolver_ftype *skip_solib_resolver;
208   gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline;
209   gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
210   gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p;
211   gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments;
212   gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
213   gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
214   const char * name_of_malloc;
215   int cannot_step_breakpoint;
216   int have_nonsteppable_watchpoint;
217   gdbarch_address_class_type_flags_ftype *address_class_type_flags;
218   gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name;
219   gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
220   gdbarch_register_reggroup_p_ftype *register_reggroup_p;
221   gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument;
222   gdbarch_regset_from_core_section_ftype *regset_from_core_section;
223 };
224
225
226 /* The default architecture uses host values (for want of a better
227    choice). */
228
229 extern const struct bfd_arch_info bfd_default_arch_struct;
230
231 struct gdbarch startup_gdbarch =
232 {
233   1, /* Always initialized.  */
234   NULL, /* The obstack.  */
235   /* basic architecture information */
236   &bfd_default_arch_struct,  /* bfd_arch_info */
237   BFD_ENDIAN_BIG,  /* byte_order */
238   GDB_OSABI_UNKNOWN,  /* osabi */
239   /* target specific vector and its dump routine */
240   NULL, NULL,
241   /*per-architecture data-pointers and swap regions */
242   0, NULL, NULL,
243   /* Multi-arch values */
244   8 * sizeof (short),  /* short_bit */
245   8 * sizeof (int),  /* int_bit */
246   8 * sizeof (long),  /* long_bit */
247   8 * sizeof (LONGEST),  /* long_long_bit */
248   8 * sizeof (float),  /* float_bit */
249   8 * sizeof (double),  /* double_bit */
250   8 * sizeof (long double),  /* long_double_bit */
251   8 * sizeof (void*),  /* ptr_bit */
252   8 * sizeof (void*),  /* addr_bit */
253   8 * sizeof (void*),  /* bfd_vma_bit */
254   1,  /* char_signed */
255   0,  /* read_pc */
256   0,  /* write_pc */
257   0,  /* read_sp */
258   0,  /* virtual_frame_pointer */
259   0,  /* pseudo_register_read */
260   0,  /* pseudo_register_write */
261   0,  /* num_regs */
262   0,  /* num_pseudo_regs */
263   -1,  /* sp_regnum */
264   -1,  /* pc_regnum */
265   -1,  /* ps_regnum */
266   0,  /* fp0_regnum */
267   0,  /* stab_reg_to_regnum */
268   0,  /* ecoff_reg_to_regnum */
269   0,  /* dwarf_reg_to_regnum */
270   0,  /* sdb_reg_to_regnum */
271   0,  /* dwarf2_reg_to_regnum */
272   0,  /* register_name */
273   0,  /* register_type */
274   generic_register_byte,  /* deprecated_register_byte */
275   0,  /* unwind_dummy_id */
276   -1,  /* deprecated_fp_regnum */
277   0,  /* push_dummy_call */
278   0,  /* deprecated_push_arguments */
279   0,  /* deprecated_register_size */
280   0,  /* call_dummy_location */
281   0,  /* push_dummy_code */
282   default_print_registers_info,  /* print_registers_info */
283   0,  /* print_float_info */
284   0,  /* print_vector_info */
285   0,  /* register_sim_regno */
286   0,  /* register_bytes_ok */
287   0,  /* cannot_fetch_register */
288   0,  /* cannot_store_register */
289   0,  /* get_longjmp_target */
290   0,  /* believe_pcc_promotion */
291   0,  /* convert_register_p */
292   0,  /* register_to_value */
293   0,  /* value_to_register */
294   0,  /* pointer_to_address */
295   0,  /* address_to_pointer */
296   0,  /* integer_to_address */
297   0,  /* deprecated_store_struct_return */
298   0,  /* return_value */
299   0,  /* extract_return_value */
300   0,  /* store_return_value */
301   0,  /* deprecated_extract_return_value */
302   0,  /* deprecated_store_return_value */
303   0,  /* deprecated_use_struct_convention */
304   0,  /* deprecated_extract_struct_value_address */
305   0,  /* skip_prologue */
306   0,  /* inner_than */
307   0,  /* breakpoint_from_pc */
308   0,  /* adjust_breakpoint_address */
309   0,  /* memory_insert_breakpoint */
310   0,  /* memory_remove_breakpoint */
311   0,  /* decr_pc_after_break */
312   0,  /* deprecated_function_start_offset */
313   generic_remote_translate_xfer_address,  /* remote_translate_xfer_address */
314   0,  /* frame_args_skip */
315   0,  /* unwind_pc */
316   0,  /* unwind_sp */
317   0,  /* deprecated_saved_pc_after_call */
318   0,  /* frame_num_args */
319   0,  /* deprecated_stack_align */
320   0,  /* frame_align */
321   0,  /* deprecated_reg_struct_has_addr */
322   default_stabs_argument_has_addr,  /* stabs_argument_has_addr */
323   0,  /* frame_red_zone_size */
324   0,  /* float_format */
325   0,  /* double_format */
326   0,  /* long_double_format */
327   convert_from_func_ptr_addr_identity,  /* convert_from_func_ptr_addr */
328   0,  /* addr_bits_remove */
329   0,  /* smash_text_address */
330   0,  /* software_single_step */
331   0,  /* print_insn */
332   0,  /* skip_trampoline_code */
333   generic_skip_solib_resolver,  /* skip_solib_resolver */
334   0,  /* in_solib_call_trampoline */
335   0,  /* in_solib_return_trampoline */
336   generic_in_function_epilogue_p,  /* in_function_epilogue_p */
337   construct_inferior_arguments,  /* construct_inferior_arguments */
338   0,  /* elf_make_msymbol_special */
339   0,  /* coff_make_msymbol_special */
340   "malloc",  /* name_of_malloc */
341   0,  /* cannot_step_breakpoint */
342   0,  /* have_nonsteppable_watchpoint */
343   0,  /* address_class_type_flags */
344   0,  /* address_class_type_flags_to_name */
345   0,  /* address_class_name_to_type_flags */
346   default_register_reggroup_p,  /* register_reggroup_p */
347   0,  /* fetch_pointer_argument */
348   0,  /* regset_from_core_section */
349   /* startup_gdbarch() */
350 };
351
352 struct gdbarch *current_gdbarch = &startup_gdbarch;
353
354 /* Create a new ``struct gdbarch'' based on information provided by
355    ``struct gdbarch_info''. */
356
357 struct gdbarch *
358 gdbarch_alloc (const struct gdbarch_info *info,
359                struct gdbarch_tdep *tdep)
360 {
361   /* NOTE: The new architecture variable is named ``current_gdbarch''
362      so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
363      the current local architecture and not the previous global
364      architecture.  This ensures that the new architectures initial
365      values are not influenced by the previous architecture.  Once
366      everything is parameterised with gdbarch, this will go away.  */
367   struct gdbarch *current_gdbarch;
368
369   /* Create an obstack for allocating all the per-architecture memory,
370      then use that to allocate the architecture vector.  */
371   struct obstack *obstack = XMALLOC (struct obstack);
372   obstack_init (obstack);
373   current_gdbarch = obstack_alloc (obstack, sizeof (*current_gdbarch));
374   memset (current_gdbarch, 0, sizeof (*current_gdbarch));
375   current_gdbarch->obstack = obstack;
376
377   alloc_gdbarch_data (current_gdbarch);
378
379   current_gdbarch->tdep = tdep;
380
381   current_gdbarch->bfd_arch_info = info->bfd_arch_info;
382   current_gdbarch->byte_order = info->byte_order;
383   current_gdbarch->osabi = info->osabi;
384
385   /* Force the explicit initialization of these. */
386   current_gdbarch->short_bit = 2*TARGET_CHAR_BIT;
387   current_gdbarch->int_bit = 4*TARGET_CHAR_BIT;
388   current_gdbarch->long_bit = 4*TARGET_CHAR_BIT;
389   current_gdbarch->long_long_bit = 2*TARGET_LONG_BIT;
390   current_gdbarch->float_bit = 4*TARGET_CHAR_BIT;
391   current_gdbarch->double_bit = 8*TARGET_CHAR_BIT;
392   current_gdbarch->long_double_bit = 8*TARGET_CHAR_BIT;
393   current_gdbarch->ptr_bit = TARGET_INT_BIT;
394   current_gdbarch->bfd_vma_bit = TARGET_ARCHITECTURE->bits_per_address;
395   current_gdbarch->char_signed = -1;
396   current_gdbarch->write_pc = generic_target_write_pc;
397   current_gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
398   current_gdbarch->num_regs = -1;
399   current_gdbarch->sp_regnum = -1;
400   current_gdbarch->pc_regnum = -1;
401   current_gdbarch->ps_regnum = -1;
402   current_gdbarch->fp0_regnum = -1;
403   current_gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
404   current_gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
405   current_gdbarch->dwarf_reg_to_regnum = no_op_reg_to_regnum;
406   current_gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
407   current_gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
408   current_gdbarch->deprecated_register_byte = generic_register_byte;
409   current_gdbarch->deprecated_fp_regnum = -1;
410   current_gdbarch->call_dummy_location = AT_ENTRY_POINT;
411   current_gdbarch->print_registers_info = default_print_registers_info;
412   current_gdbarch->register_sim_regno = legacy_register_sim_regno;
413   current_gdbarch->cannot_fetch_register = cannot_register_not;
414   current_gdbarch->cannot_store_register = cannot_register_not;
415   current_gdbarch->convert_register_p = generic_convert_register_p;
416   current_gdbarch->pointer_to_address = unsigned_pointer_to_address;
417   current_gdbarch->address_to_pointer = unsigned_address_to_pointer;
418   current_gdbarch->return_value = legacy_return_value;
419   current_gdbarch->extract_return_value = legacy_extract_return_value;
420   current_gdbarch->store_return_value = legacy_store_return_value;
421   current_gdbarch->deprecated_use_struct_convention = generic_use_struct_convention;
422   current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
423   current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
424   current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
425   current_gdbarch->stabs_argument_has_addr = default_stabs_argument_has_addr;
426   current_gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr_identity;
427   current_gdbarch->addr_bits_remove = core_addr_identity;
428   current_gdbarch->smash_text_address = core_addr_identity;
429   current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
430   current_gdbarch->skip_solib_resolver = generic_skip_solib_resolver;
431   current_gdbarch->in_solib_call_trampoline = generic_in_solib_call_trampoline;
432   current_gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
433   current_gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
434   current_gdbarch->construct_inferior_arguments = construct_inferior_arguments;
435   current_gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
436   current_gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
437   current_gdbarch->name_of_malloc = "malloc";
438   current_gdbarch->register_reggroup_p = default_register_reggroup_p;
439   /* gdbarch_alloc() */
440
441   return current_gdbarch;
442 }
443
444
445 /* Allocate extra space using the per-architecture obstack.  */
446
447 void *
448 gdbarch_obstack_zalloc (struct gdbarch *arch, long size)
449 {
450   void *data = obstack_alloc (arch->obstack, size);
451   memset (data, 0, size);
452   return data;
453 }
454
455
456 /* Free a gdbarch struct.  This should never happen in normal
457    operation --- once you've created a gdbarch, you keep it around.
458    However, if an architecture's init function encounters an error
459    building the structure, it may need to clean up a partially
460    constructed gdbarch.  */
461
462 void
463 gdbarch_free (struct gdbarch *arch)
464 {
465   struct obstack *obstack;
466   gdb_assert (arch != NULL);
467   gdb_assert (!arch->initialized_p);
468   obstack = arch->obstack;
469   obstack_free (obstack, 0); /* Includes the ARCH.  */
470   xfree (obstack);
471 }
472
473
474 /* Ensure that all values in a GDBARCH are reasonable.  */
475
476 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
477    just happens to match the global variable ``current_gdbarch''.  That
478    way macros refering to that variable get the local and not the global
479    version - ulgh.  Once everything is parameterised with gdbarch, this
480    will go away. */
481
482 static void
483 verify_gdbarch (struct gdbarch *current_gdbarch)
484 {
485   struct ui_file *log;
486   struct cleanup *cleanups;
487   long dummy;
488   char *buf;
489   log = mem_fileopen ();
490   cleanups = make_cleanup_ui_file_delete (log);
491   /* fundamental */
492   if (current_gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
493     fprintf_unfiltered (log, "\n\tbyte-order");
494   if (current_gdbarch->bfd_arch_info == NULL)
495     fprintf_unfiltered (log, "\n\tbfd_arch_info");
496   /* Check those that need to be defined for the given multi-arch level. */
497   /* Skip verify of short_bit, invalid_p == 0 */
498   /* Skip verify of int_bit, invalid_p == 0 */
499   /* Skip verify of long_bit, invalid_p == 0 */
500   /* Skip verify of long_long_bit, invalid_p == 0 */
501   /* Skip verify of float_bit, invalid_p == 0 */
502   /* Skip verify of double_bit, invalid_p == 0 */
503   /* Skip verify of long_double_bit, invalid_p == 0 */
504   /* Skip verify of ptr_bit, invalid_p == 0 */
505   if (current_gdbarch->addr_bit == 0)
506     current_gdbarch->addr_bit = TARGET_PTR_BIT;
507   /* Skip verify of bfd_vma_bit, invalid_p == 0 */
508   if (current_gdbarch->char_signed == -1)
509     current_gdbarch->char_signed = 1;
510   /* Skip verify of read_pc, has predicate */
511   /* Skip verify of write_pc, invalid_p == 0 */
512   /* Skip verify of read_sp, has predicate */
513   /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
514   /* Skip verify of pseudo_register_read, has predicate */
515   /* Skip verify of pseudo_register_write, has predicate */
516   if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
517       && (current_gdbarch->num_regs == -1))
518     fprintf_unfiltered (log, "\n\tnum_regs");
519   /* Skip verify of num_pseudo_regs, invalid_p == 0 */
520   /* Skip verify of sp_regnum, invalid_p == 0 */
521   /* Skip verify of pc_regnum, invalid_p == 0 */
522   /* Skip verify of ps_regnum, invalid_p == 0 */
523   /* Skip verify of fp0_regnum, invalid_p == 0 */
524   /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
525   /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
526   /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
527   /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
528   /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
529   /* Skip verify of register_type, has predicate */
530   /* Skip verify of deprecated_register_byte, has predicate */
531   /* Skip verify of unwind_dummy_id, has predicate */
532   /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
533   /* Skip verify of push_dummy_call, has predicate */
534   /* Skip verify of deprecated_push_arguments, has predicate */
535   /* Skip verify of call_dummy_location, invalid_p == 0 */
536   /* Skip verify of push_dummy_code, has predicate */
537   /* Skip verify of print_registers_info, invalid_p == 0 */
538   /* Skip verify of print_float_info, has predicate */
539   /* Skip verify of print_vector_info, has predicate */
540   /* Skip verify of register_sim_regno, invalid_p == 0 */
541   /* Skip verify of register_bytes_ok, has predicate */
542   /* Skip verify of cannot_fetch_register, invalid_p == 0 */
543   /* Skip verify of cannot_store_register, invalid_p == 0 */
544   /* Skip verify of get_longjmp_target, has predicate */
545   /* Skip verify of convert_register_p, invalid_p == 0 */
546   /* Skip verify of pointer_to_address, invalid_p == 0 */
547   /* Skip verify of address_to_pointer, invalid_p == 0 */
548   /* Skip verify of integer_to_address, has predicate */
549   /* Skip verify of deprecated_store_struct_return, has predicate */
550   /* Skip verify of return_value, has predicate */
551   /* Skip verify of extract_return_value, invalid_p == 0 */
552   /* Skip verify of store_return_value, invalid_p == 0 */
553   /* Skip verify of deprecated_use_struct_convention, invalid_p == 0 */
554   /* Skip verify of deprecated_extract_struct_value_address, has predicate */
555   if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
556       && (current_gdbarch->skip_prologue == 0))
557     fprintf_unfiltered (log, "\n\tskip_prologue");
558   if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
559       && (current_gdbarch->inner_than == 0))
560     fprintf_unfiltered (log, "\n\tinner_than");
561   if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
562       && (current_gdbarch->breakpoint_from_pc == 0))
563     fprintf_unfiltered (log, "\n\tbreakpoint_from_pc");
564   /* Skip verify of adjust_breakpoint_address, has predicate */
565   /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
566   /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
567   /* Skip verify of decr_pc_after_break, invalid_p == 0 */
568   /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
569   /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
570   /* Skip verify of frame_args_skip, invalid_p == 0 */
571   /* Skip verify of unwind_pc, has predicate */
572   /* Skip verify of unwind_sp, has predicate */
573   /* Skip verify of deprecated_saved_pc_after_call, has predicate */
574   /* Skip verify of frame_num_args, has predicate */
575   /* Skip verify of deprecated_stack_align, has predicate */
576   /* Skip verify of frame_align, has predicate */
577   /* Skip verify of deprecated_reg_struct_has_addr, has predicate */
578   /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
579   if (current_gdbarch->float_format == 0)
580     current_gdbarch->float_format = default_float_format (current_gdbarch);
581   if (current_gdbarch->double_format == 0)
582     current_gdbarch->double_format = default_double_format (current_gdbarch);
583   if (current_gdbarch->long_double_format == 0)
584     current_gdbarch->long_double_format = default_double_format (current_gdbarch);
585   /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
586   /* Skip verify of addr_bits_remove, invalid_p == 0 */
587   /* Skip verify of smash_text_address, invalid_p == 0 */
588   /* Skip verify of software_single_step, has predicate */
589   if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
590       && (current_gdbarch->print_insn == 0))
591     fprintf_unfiltered (log, "\n\tprint_insn");
592   /* Skip verify of skip_trampoline_code, invalid_p == 0 */
593   /* Skip verify of skip_solib_resolver, invalid_p == 0 */
594   /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
595   /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
596   /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
597   /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
598   /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
599   /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
600   /* Skip verify of name_of_malloc, invalid_p == 0 */
601   /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
602   /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
603   /* Skip verify of address_class_type_flags, has predicate */
604   /* Skip verify of address_class_type_flags_to_name, has predicate */
605   /* Skip verify of address_class_name_to_type_flags, has predicate */
606   /* Skip verify of register_reggroup_p, invalid_p == 0 */
607   /* Skip verify of fetch_pointer_argument, has predicate */
608   /* Skip verify of regset_from_core_section, has predicate */
609   buf = ui_file_xstrdup (log, &dummy);
610   make_cleanup (xfree, buf);
611   if (strlen (buf) > 0)
612     internal_error (__FILE__, __LINE__,
613                     "verify_gdbarch: the following are invalid ...%s",
614                     buf);
615   do_cleanups (cleanups);
616 }
617
618
619 /* Print out the details of the current architecture. */
620
621 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
622    just happens to match the global variable ``current_gdbarch''.  That
623    way macros refering to that variable get the local and not the global
624    version - ulgh.  Once everything is parameterised with gdbarch, this
625    will go away. */
626
627 void
628 gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
629 {
630   fprintf_unfiltered (file,
631                       "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
632                       GDB_MULTI_ARCH);
633 #ifdef TARGET_ADDR_BIT
634   fprintf_unfiltered (file,
635                       "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
636                       XSTRING (TARGET_ADDR_BIT));
637 #endif
638   fprintf_unfiltered (file,
639                       "gdbarch_dump: addr_bit = %s\n",
640                       paddr_d (current_gdbarch->addr_bit));
641 #ifdef ADDR_BITS_REMOVE
642   fprintf_unfiltered (file,
643                       "gdbarch_dump: %s # %s\n",
644                       "ADDR_BITS_REMOVE(addr)",
645                       XSTRING (ADDR_BITS_REMOVE (addr)));
646 #endif
647   fprintf_unfiltered (file,
648                       "gdbarch_dump: addr_bits_remove = <0x%lx>\n",
649                       (long) current_gdbarch->addr_bits_remove);
650   fprintf_unfiltered (file,
651                       "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
652                       gdbarch_address_class_name_to_type_flags_p (current_gdbarch));
653   fprintf_unfiltered (file,
654                       "gdbarch_dump: address_class_name_to_type_flags = <0x%lx>\n",
655                       (long) current_gdbarch->address_class_name_to_type_flags);
656 #ifdef ADDRESS_CLASS_TYPE_FLAGS_P
657   fprintf_unfiltered (file,
658                       "gdbarch_dump: %s # %s\n",
659                       "ADDRESS_CLASS_TYPE_FLAGS_P()",
660                       XSTRING (ADDRESS_CLASS_TYPE_FLAGS_P ()));
661 #endif
662   fprintf_unfiltered (file,
663                       "gdbarch_dump: gdbarch_address_class_type_flags_p() = %d\n",
664                       gdbarch_address_class_type_flags_p (current_gdbarch));
665 #ifdef ADDRESS_CLASS_TYPE_FLAGS
666   fprintf_unfiltered (file,
667                       "gdbarch_dump: %s # %s\n",
668                       "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)",
669                       XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size, dwarf2_addr_class)));
670 #endif
671   fprintf_unfiltered (file,
672                       "gdbarch_dump: address_class_type_flags = <0x%lx>\n",
673                       (long) current_gdbarch->address_class_type_flags);
674   fprintf_unfiltered (file,
675                       "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
676                       gdbarch_address_class_type_flags_to_name_p (current_gdbarch));
677   fprintf_unfiltered (file,
678                       "gdbarch_dump: address_class_type_flags_to_name = <0x%lx>\n",
679                       (long) current_gdbarch->address_class_type_flags_to_name);
680 #ifdef ADDRESS_TO_POINTER
681   fprintf_unfiltered (file,
682                       "gdbarch_dump: %s # %s\n",
683                       "ADDRESS_TO_POINTER(type, buf, addr)",
684                       XSTRING (ADDRESS_TO_POINTER (type, buf, addr)));
685 #endif
686   fprintf_unfiltered (file,
687                       "gdbarch_dump: address_to_pointer = <0x%lx>\n",
688                       (long) current_gdbarch->address_to_pointer);
689   fprintf_unfiltered (file,
690                       "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n",
691                       gdbarch_adjust_breakpoint_address_p (current_gdbarch));
692   fprintf_unfiltered (file,
693                       "gdbarch_dump: adjust_breakpoint_address = <0x%lx>\n",
694                       (long) current_gdbarch->adjust_breakpoint_address);
695 #ifdef BELIEVE_PCC_PROMOTION
696   fprintf_unfiltered (file,
697                       "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
698                       XSTRING (BELIEVE_PCC_PROMOTION));
699 #endif
700   fprintf_unfiltered (file,
701                       "gdbarch_dump: believe_pcc_promotion = %s\n",
702                       paddr_d (current_gdbarch->believe_pcc_promotion));
703 #ifdef TARGET_ARCHITECTURE
704   fprintf_unfiltered (file,
705                       "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
706                       XSTRING (TARGET_ARCHITECTURE));
707 #endif
708   fprintf_unfiltered (file,
709                       "gdbarch_dump: bfd_arch_info = %s\n",
710                       TARGET_ARCHITECTURE->printable_name);
711 #ifdef TARGET_BFD_VMA_BIT
712   fprintf_unfiltered (file,
713                       "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
714                       XSTRING (TARGET_BFD_VMA_BIT));
715 #endif
716   fprintf_unfiltered (file,
717                       "gdbarch_dump: bfd_vma_bit = %s\n",
718                       paddr_d (current_gdbarch->bfd_vma_bit));
719 #ifdef BREAKPOINT_FROM_PC
720   fprintf_unfiltered (file,
721                       "gdbarch_dump: %s # %s\n",
722                       "BREAKPOINT_FROM_PC(pcptr, lenptr)",
723                       XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr)));
724 #endif
725   fprintf_unfiltered (file,
726                       "gdbarch_dump: breakpoint_from_pc = <0x%lx>\n",
727                       (long) current_gdbarch->breakpoint_from_pc);
728 #ifdef TARGET_BYTE_ORDER
729   fprintf_unfiltered (file,
730                       "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
731                       XSTRING (TARGET_BYTE_ORDER));
732 #endif
733   fprintf_unfiltered (file,
734                       "gdbarch_dump: byte_order = %s\n",
735                       paddr_d (current_gdbarch->byte_order));
736 #ifdef CALL_DUMMY_LOCATION
737   fprintf_unfiltered (file,
738                       "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
739                       XSTRING (CALL_DUMMY_LOCATION));
740 #endif
741   fprintf_unfiltered (file,
742                       "gdbarch_dump: call_dummy_location = %s\n",
743                       paddr_d (current_gdbarch->call_dummy_location));
744 #ifdef CANNOT_FETCH_REGISTER
745   fprintf_unfiltered (file,
746                       "gdbarch_dump: %s # %s\n",
747                       "CANNOT_FETCH_REGISTER(regnum)",
748                       XSTRING (CANNOT_FETCH_REGISTER (regnum)));
749 #endif
750   fprintf_unfiltered (file,
751                       "gdbarch_dump: cannot_fetch_register = <0x%lx>\n",
752                       (long) current_gdbarch->cannot_fetch_register);
753 #ifdef CANNOT_STEP_BREAKPOINT
754   fprintf_unfiltered (file,
755                       "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
756                       XSTRING (CANNOT_STEP_BREAKPOINT));
757 #endif
758   fprintf_unfiltered (file,
759                       "gdbarch_dump: cannot_step_breakpoint = %s\n",
760                       paddr_d (current_gdbarch->cannot_step_breakpoint));
761 #ifdef CANNOT_STORE_REGISTER
762   fprintf_unfiltered (file,
763                       "gdbarch_dump: %s # %s\n",
764                       "CANNOT_STORE_REGISTER(regnum)",
765                       XSTRING (CANNOT_STORE_REGISTER (regnum)));
766 #endif
767   fprintf_unfiltered (file,
768                       "gdbarch_dump: cannot_store_register = <0x%lx>\n",
769                       (long) current_gdbarch->cannot_store_register);
770 #ifdef TARGET_CHAR_SIGNED
771   fprintf_unfiltered (file,
772                       "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
773                       XSTRING (TARGET_CHAR_SIGNED));
774 #endif
775   fprintf_unfiltered (file,
776                       "gdbarch_dump: char_signed = %s\n",
777                       paddr_d (current_gdbarch->char_signed));
778 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
779   fprintf_unfiltered (file,
780                       "gdbarch_dump: %s # %s\n",
781                       "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
782                       XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val, msym)));
783 #endif
784   fprintf_unfiltered (file,
785                       "gdbarch_dump: coff_make_msymbol_special = <0x%lx>\n",
786                       (long) current_gdbarch->coff_make_msymbol_special);
787   fprintf_unfiltered (file,
788                       "gdbarch_dump: construct_inferior_arguments = <0x%lx>\n",
789                       (long) current_gdbarch->construct_inferior_arguments);
790   fprintf_unfiltered (file,
791                       "gdbarch_dump: convert_from_func_ptr_addr = <0x%lx>\n",
792                       (long) current_gdbarch->convert_from_func_ptr_addr);
793 #ifdef CONVERT_REGISTER_P
794   fprintf_unfiltered (file,
795                       "gdbarch_dump: %s # %s\n",
796                       "CONVERT_REGISTER_P(regnum, type)",
797                       XSTRING (CONVERT_REGISTER_P (regnum, type)));
798 #endif
799   fprintf_unfiltered (file,
800                       "gdbarch_dump: convert_register_p = <0x%lx>\n",
801                       (long) current_gdbarch->convert_register_p);
802 #ifdef DECR_PC_AFTER_BREAK
803   fprintf_unfiltered (file,
804                       "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
805                       XSTRING (DECR_PC_AFTER_BREAK));
806 #endif
807   fprintf_unfiltered (file,
808                       "gdbarch_dump: decr_pc_after_break = 0x%s\n",
809                       paddr_nz (current_gdbarch->decr_pc_after_break));
810 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
811   fprintf_unfiltered (file,
812                       "gdbarch_dump: %s # %s\n",
813                       "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
814                       XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type, regbuf, valbuf)));
815 #endif
816   fprintf_unfiltered (file,
817                       "gdbarch_dump: deprecated_extract_return_value = <0x%lx>\n",
818                       (long) current_gdbarch->deprecated_extract_return_value);
819 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P
820   fprintf_unfiltered (file,
821                       "gdbarch_dump: %s # %s\n",
822                       "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P()",
823                       XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
824 #endif
825   fprintf_unfiltered (file,
826                       "gdbarch_dump: gdbarch_deprecated_extract_struct_value_address_p() = %d\n",
827                       gdbarch_deprecated_extract_struct_value_address_p (current_gdbarch));
828 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
829   fprintf_unfiltered (file,
830                       "gdbarch_dump: %s # %s\n",
831                       "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
832                       XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regcache)));
833 #endif
834   fprintf_unfiltered (file,
835                       "gdbarch_dump: deprecated_extract_struct_value_address = <0x%lx>\n",
836                       (long) current_gdbarch->deprecated_extract_struct_value_address);
837 #ifdef DEPRECATED_FP_REGNUM
838   fprintf_unfiltered (file,
839                       "gdbarch_dump: DEPRECATED_FP_REGNUM # %s\n",
840                       XSTRING (DEPRECATED_FP_REGNUM));
841 #endif
842   fprintf_unfiltered (file,
843                       "gdbarch_dump: deprecated_fp_regnum = %s\n",
844                       paddr_d (current_gdbarch->deprecated_fp_regnum));
845 #ifdef DEPRECATED_FUNCTION_START_OFFSET
846   fprintf_unfiltered (file,
847                       "gdbarch_dump: DEPRECATED_FUNCTION_START_OFFSET # %s\n",
848                       XSTRING (DEPRECATED_FUNCTION_START_OFFSET));
849 #endif
850   fprintf_unfiltered (file,
851                       "gdbarch_dump: deprecated_function_start_offset = 0x%s\n",
852                       paddr_nz (current_gdbarch->deprecated_function_start_offset));
853 #ifdef DEPRECATED_PUSH_ARGUMENTS_P
854   fprintf_unfiltered (file,
855                       "gdbarch_dump: %s # %s\n",
856                       "DEPRECATED_PUSH_ARGUMENTS_P()",
857                       XSTRING (DEPRECATED_PUSH_ARGUMENTS_P ()));
858 #endif
859   fprintf_unfiltered (file,
860                       "gdbarch_dump: gdbarch_deprecated_push_arguments_p() = %d\n",
861                       gdbarch_deprecated_push_arguments_p (current_gdbarch));
862 #ifdef DEPRECATED_PUSH_ARGUMENTS
863   fprintf_unfiltered (file,
864                       "gdbarch_dump: %s # %s\n",
865                       "DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
866                       XSTRING (DEPRECATED_PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr)));
867 #endif
868   fprintf_unfiltered (file,
869                       "gdbarch_dump: deprecated_push_arguments = <0x%lx>\n",
870                       (long) current_gdbarch->deprecated_push_arguments);
871 #ifdef DEPRECATED_REG_STRUCT_HAS_ADDR_P
872   fprintf_unfiltered (file,
873                       "gdbarch_dump: %s # %s\n",
874                       "DEPRECATED_REG_STRUCT_HAS_ADDR_P()",
875                       XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR_P ()));
876 #endif
877   fprintf_unfiltered (file,
878                       "gdbarch_dump: gdbarch_deprecated_reg_struct_has_addr_p() = %d\n",
879                       gdbarch_deprecated_reg_struct_has_addr_p (current_gdbarch));
880 #ifdef DEPRECATED_REG_STRUCT_HAS_ADDR
881   fprintf_unfiltered (file,
882                       "gdbarch_dump: %s # %s\n",
883                       "DEPRECATED_REG_STRUCT_HAS_ADDR(gcc_p, type)",
884                       XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR (gcc_p, type)));
885 #endif
886   fprintf_unfiltered (file,
887                       "gdbarch_dump: deprecated_reg_struct_has_addr = <0x%lx>\n",
888                       (long) current_gdbarch->deprecated_reg_struct_has_addr);
889 #ifdef DEPRECATED_REGISTER_BYTE_P
890   fprintf_unfiltered (file,
891                       "gdbarch_dump: %s # %s\n",
892                       "DEPRECATED_REGISTER_BYTE_P()",
893                       XSTRING (DEPRECATED_REGISTER_BYTE_P ()));
894 #endif
895   fprintf_unfiltered (file,
896                       "gdbarch_dump: gdbarch_deprecated_register_byte_p() = %d\n",
897                       gdbarch_deprecated_register_byte_p (current_gdbarch));
898 #ifdef DEPRECATED_REGISTER_BYTE
899   fprintf_unfiltered (file,
900                       "gdbarch_dump: %s # %s\n",
901                       "DEPRECATED_REGISTER_BYTE(reg_nr)",
902                       XSTRING (DEPRECATED_REGISTER_BYTE (reg_nr)));
903 #endif
904   fprintf_unfiltered (file,
905                       "gdbarch_dump: deprecated_register_byte = <0x%lx>\n",
906                       (long) current_gdbarch->deprecated_register_byte);
907 #ifdef DEPRECATED_REGISTER_SIZE
908   fprintf_unfiltered (file,
909                       "gdbarch_dump: DEPRECATED_REGISTER_SIZE # %s\n",
910                       XSTRING (DEPRECATED_REGISTER_SIZE));
911 #endif
912   fprintf_unfiltered (file,
913                       "gdbarch_dump: deprecated_register_size = %s\n",
914                       paddr_d (current_gdbarch->deprecated_register_size));
915 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL_P
916   fprintf_unfiltered (file,
917                       "gdbarch_dump: %s # %s\n",
918                       "DEPRECATED_SAVED_PC_AFTER_CALL_P()",
919                       XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL_P ()));
920 #endif
921   fprintf_unfiltered (file,
922                       "gdbarch_dump: gdbarch_deprecated_saved_pc_after_call_p() = %d\n",
923                       gdbarch_deprecated_saved_pc_after_call_p (current_gdbarch));
924 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL
925   fprintf_unfiltered (file,
926                       "gdbarch_dump: %s # %s\n",
927                       "DEPRECATED_SAVED_PC_AFTER_CALL(frame)",
928                       XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL (frame)));
929 #endif
930   fprintf_unfiltered (file,
931                       "gdbarch_dump: deprecated_saved_pc_after_call = <0x%lx>\n",
932                       (long) current_gdbarch->deprecated_saved_pc_after_call);
933 #ifdef DEPRECATED_STACK_ALIGN_P
934   fprintf_unfiltered (file,
935                       "gdbarch_dump: %s # %s\n",
936                       "DEPRECATED_STACK_ALIGN_P()",
937                       XSTRING (DEPRECATED_STACK_ALIGN_P ()));
938 #endif
939   fprintf_unfiltered (file,
940                       "gdbarch_dump: gdbarch_deprecated_stack_align_p() = %d\n",
941                       gdbarch_deprecated_stack_align_p (current_gdbarch));
942 #ifdef DEPRECATED_STACK_ALIGN
943   fprintf_unfiltered (file,
944                       "gdbarch_dump: %s # %s\n",
945                       "DEPRECATED_STACK_ALIGN(sp)",
946                       XSTRING (DEPRECATED_STACK_ALIGN (sp)));
947 #endif
948   fprintf_unfiltered (file,
949                       "gdbarch_dump: deprecated_stack_align = <0x%lx>\n",
950                       (long) current_gdbarch->deprecated_stack_align);
951 #ifdef DEPRECATED_STORE_RETURN_VALUE
952   fprintf_unfiltered (file,
953                       "gdbarch_dump: %s # %s\n",
954                       "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
955                       XSTRING (DEPRECATED_STORE_RETURN_VALUE (type, valbuf)));
956 #endif
957   fprintf_unfiltered (file,
958                       "gdbarch_dump: deprecated_store_return_value = <0x%lx>\n",
959                       (long) current_gdbarch->deprecated_store_return_value);
960 #ifdef DEPRECATED_STORE_STRUCT_RETURN_P
961   fprintf_unfiltered (file,
962                       "gdbarch_dump: %s # %s\n",
963                       "DEPRECATED_STORE_STRUCT_RETURN_P()",
964                       XSTRING (DEPRECATED_STORE_STRUCT_RETURN_P ()));
965 #endif
966   fprintf_unfiltered (file,
967                       "gdbarch_dump: gdbarch_deprecated_store_struct_return_p() = %d\n",
968                       gdbarch_deprecated_store_struct_return_p (current_gdbarch));
969 #ifdef DEPRECATED_STORE_STRUCT_RETURN
970   fprintf_unfiltered (file,
971                       "gdbarch_dump: %s # %s\n",
972                       "DEPRECATED_STORE_STRUCT_RETURN(addr, sp)",
973                       XSTRING (DEPRECATED_STORE_STRUCT_RETURN (addr, sp)));
974 #endif
975   fprintf_unfiltered (file,
976                       "gdbarch_dump: deprecated_store_struct_return = <0x%lx>\n",
977                       (long) current_gdbarch->deprecated_store_struct_return);
978 #ifdef DEPRECATED_USE_STRUCT_CONVENTION
979   fprintf_unfiltered (file,
980                       "gdbarch_dump: %s # %s\n",
981                       "DEPRECATED_USE_STRUCT_CONVENTION(gcc_p, value_type)",
982                       XSTRING (DEPRECATED_USE_STRUCT_CONVENTION (gcc_p, value_type)));
983 #endif
984   fprintf_unfiltered (file,
985                       "gdbarch_dump: deprecated_use_struct_convention = <0x%lx>\n",
986                       (long) current_gdbarch->deprecated_use_struct_convention);
987 #ifdef TARGET_DOUBLE_BIT
988   fprintf_unfiltered (file,
989                       "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
990                       XSTRING (TARGET_DOUBLE_BIT));
991 #endif
992   fprintf_unfiltered (file,
993                       "gdbarch_dump: double_bit = %s\n",
994                       paddr_d (current_gdbarch->double_bit));
995 #ifdef TARGET_DOUBLE_FORMAT
996   fprintf_unfiltered (file,
997                       "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
998                       XSTRING (TARGET_DOUBLE_FORMAT));
999 #endif
1000   fprintf_unfiltered (file,
1001                       "gdbarch_dump: double_format = %s\n",
1002                       (TARGET_DOUBLE_FORMAT)->name);
1003 #ifdef DWARF2_REG_TO_REGNUM
1004   fprintf_unfiltered (file,
1005                       "gdbarch_dump: %s # %s\n",
1006                       "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1007                       XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr)));
1008 #endif
1009   fprintf_unfiltered (file,
1010                       "gdbarch_dump: dwarf2_reg_to_regnum = <0x%lx>\n",
1011                       (long) current_gdbarch->dwarf2_reg_to_regnum);
1012 #ifdef DWARF_REG_TO_REGNUM
1013   fprintf_unfiltered (file,
1014                       "gdbarch_dump: %s # %s\n",
1015                       "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1016                       XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr)));
1017 #endif
1018   fprintf_unfiltered (file,
1019                       "gdbarch_dump: dwarf_reg_to_regnum = <0x%lx>\n",
1020                       (long) current_gdbarch->dwarf_reg_to_regnum);
1021 #ifdef ECOFF_REG_TO_REGNUM
1022   fprintf_unfiltered (file,
1023                       "gdbarch_dump: %s # %s\n",
1024                       "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1025                       XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr)));
1026 #endif
1027   fprintf_unfiltered (file,
1028                       "gdbarch_dump: ecoff_reg_to_regnum = <0x%lx>\n",
1029                       (long) current_gdbarch->ecoff_reg_to_regnum);
1030 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1031   fprintf_unfiltered (file,
1032                       "gdbarch_dump: %s # %s\n",
1033                       "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1034                       XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym, msym)));
1035 #endif
1036   fprintf_unfiltered (file,
1037                       "gdbarch_dump: elf_make_msymbol_special = <0x%lx>\n",
1038                       (long) current_gdbarch->elf_make_msymbol_special);
1039 #ifdef EXTRACT_RETURN_VALUE
1040   fprintf_unfiltered (file,
1041                       "gdbarch_dump: %s # %s\n",
1042                       "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1043                       XSTRING (EXTRACT_RETURN_VALUE (type, regcache, valbuf)));
1044 #endif
1045   fprintf_unfiltered (file,
1046                       "gdbarch_dump: extract_return_value = <0x%lx>\n",
1047                       (long) current_gdbarch->extract_return_value);
1048 #ifdef FETCH_POINTER_ARGUMENT_P
1049   fprintf_unfiltered (file,
1050                       "gdbarch_dump: %s # %s\n",
1051                       "FETCH_POINTER_ARGUMENT_P()",
1052                       XSTRING (FETCH_POINTER_ARGUMENT_P ()));
1053 #endif
1054   fprintf_unfiltered (file,
1055                       "gdbarch_dump: gdbarch_fetch_pointer_argument_p() = %d\n",
1056                       gdbarch_fetch_pointer_argument_p (current_gdbarch));
1057 #ifdef FETCH_POINTER_ARGUMENT
1058   fprintf_unfiltered (file,
1059                       "gdbarch_dump: %s # %s\n",
1060                       "FETCH_POINTER_ARGUMENT(frame, argi, type)",
1061                       XSTRING (FETCH_POINTER_ARGUMENT (frame, argi, type)));
1062 #endif
1063   fprintf_unfiltered (file,
1064                       "gdbarch_dump: fetch_pointer_argument = <0x%lx>\n",
1065                       (long) current_gdbarch->fetch_pointer_argument);
1066 #ifdef TARGET_FLOAT_BIT
1067   fprintf_unfiltered (file,
1068                       "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
1069                       XSTRING (TARGET_FLOAT_BIT));
1070 #endif
1071   fprintf_unfiltered (file,
1072                       "gdbarch_dump: float_bit = %s\n",
1073                       paddr_d (current_gdbarch->float_bit));
1074 #ifdef TARGET_FLOAT_FORMAT
1075   fprintf_unfiltered (file,
1076                       "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1077                       XSTRING (TARGET_FLOAT_FORMAT));
1078 #endif
1079   fprintf_unfiltered (file,
1080                       "gdbarch_dump: float_format = %s\n",
1081                       (TARGET_FLOAT_FORMAT)->name);
1082 #ifdef FP0_REGNUM
1083   fprintf_unfiltered (file,
1084                       "gdbarch_dump: FP0_REGNUM # %s\n",
1085                       XSTRING (FP0_REGNUM));
1086 #endif
1087   fprintf_unfiltered (file,
1088                       "gdbarch_dump: fp0_regnum = %s\n",
1089                       paddr_d (current_gdbarch->fp0_regnum));
1090   fprintf_unfiltered (file,
1091                       "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
1092                       gdbarch_frame_align_p (current_gdbarch));
1093   fprintf_unfiltered (file,
1094                       "gdbarch_dump: frame_align = <0x%lx>\n",
1095                       (long) current_gdbarch->frame_align);
1096 #ifdef FRAME_ARGS_SKIP
1097   fprintf_unfiltered (file,
1098                       "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1099                       XSTRING (FRAME_ARGS_SKIP));
1100 #endif
1101   fprintf_unfiltered (file,
1102                       "gdbarch_dump: frame_args_skip = 0x%s\n",
1103                       paddr_nz (current_gdbarch->frame_args_skip));
1104 #ifdef FRAME_NUM_ARGS_P
1105   fprintf_unfiltered (file,
1106                       "gdbarch_dump: %s # %s\n",
1107                       "FRAME_NUM_ARGS_P()",
1108                       XSTRING (FRAME_NUM_ARGS_P ()));
1109 #endif
1110   fprintf_unfiltered (file,
1111                       "gdbarch_dump: gdbarch_frame_num_args_p() = %d\n",
1112                       gdbarch_frame_num_args_p (current_gdbarch));
1113 #ifdef FRAME_NUM_ARGS
1114   fprintf_unfiltered (file,
1115                       "gdbarch_dump: %s # %s\n",
1116                       "FRAME_NUM_ARGS(frame)",
1117                       XSTRING (FRAME_NUM_ARGS (frame)));
1118 #endif
1119   fprintf_unfiltered (file,
1120                       "gdbarch_dump: frame_num_args = <0x%lx>\n",
1121                       (long) current_gdbarch->frame_num_args);
1122 #ifdef FRAME_RED_ZONE_SIZE
1123   fprintf_unfiltered (file,
1124                       "gdbarch_dump: FRAME_RED_ZONE_SIZE # %s\n",
1125                       XSTRING (FRAME_RED_ZONE_SIZE));
1126 #endif
1127   fprintf_unfiltered (file,
1128                       "gdbarch_dump: frame_red_zone_size = %s\n",
1129                       paddr_d (current_gdbarch->frame_red_zone_size));
1130 #ifdef GET_LONGJMP_TARGET_P
1131   fprintf_unfiltered (file,
1132                       "gdbarch_dump: %s # %s\n",
1133                       "GET_LONGJMP_TARGET_P()",
1134                       XSTRING (GET_LONGJMP_TARGET_P ()));
1135 #endif
1136   fprintf_unfiltered (file,
1137                       "gdbarch_dump: gdbarch_get_longjmp_target_p() = %d\n",
1138                       gdbarch_get_longjmp_target_p (current_gdbarch));
1139 #ifdef GET_LONGJMP_TARGET
1140   fprintf_unfiltered (file,
1141                       "gdbarch_dump: %s # %s\n",
1142                       "GET_LONGJMP_TARGET(pc)",
1143                       XSTRING (GET_LONGJMP_TARGET (pc)));
1144 #endif
1145   fprintf_unfiltered (file,
1146                       "gdbarch_dump: get_longjmp_target = <0x%lx>\n",
1147                       (long) current_gdbarch->get_longjmp_target);
1148 #ifdef HAVE_NONSTEPPABLE_WATCHPOINT
1149   fprintf_unfiltered (file,
1150                       "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
1151                       XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT));
1152 #endif
1153   fprintf_unfiltered (file,
1154                       "gdbarch_dump: have_nonsteppable_watchpoint = %s\n",
1155                       paddr_d (current_gdbarch->have_nonsteppable_watchpoint));
1156   fprintf_unfiltered (file,
1157                       "gdbarch_dump: in_function_epilogue_p = <0x%lx>\n",
1158                       (long) current_gdbarch->in_function_epilogue_p);
1159 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1160   fprintf_unfiltered (file,
1161                       "gdbarch_dump: %s # %s\n",
1162                       "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1163                       XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc, name)));
1164 #endif
1165   fprintf_unfiltered (file,
1166                       "gdbarch_dump: in_solib_call_trampoline = <0x%lx>\n",
1167                       (long) current_gdbarch->in_solib_call_trampoline);
1168 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
1169   fprintf_unfiltered (file,
1170                       "gdbarch_dump: %s # %s\n",
1171                       "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1172                       XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc, name)));
1173 #endif
1174   fprintf_unfiltered (file,
1175                       "gdbarch_dump: in_solib_return_trampoline = <0x%lx>\n",
1176                       (long) current_gdbarch->in_solib_return_trampoline);
1177 #ifdef INNER_THAN
1178   fprintf_unfiltered (file,
1179                       "gdbarch_dump: %s # %s\n",
1180                       "INNER_THAN(lhs, rhs)",
1181                       XSTRING (INNER_THAN (lhs, rhs)));
1182 #endif
1183   fprintf_unfiltered (file,
1184                       "gdbarch_dump: inner_than = <0x%lx>\n",
1185                       (long) current_gdbarch->inner_than);
1186 #ifdef TARGET_INT_BIT
1187   fprintf_unfiltered (file,
1188                       "gdbarch_dump: TARGET_INT_BIT # %s\n",
1189                       XSTRING (TARGET_INT_BIT));
1190 #endif
1191   fprintf_unfiltered (file,
1192                       "gdbarch_dump: int_bit = %s\n",
1193                       paddr_d (current_gdbarch->int_bit));
1194 #ifdef INTEGER_TO_ADDRESS_P
1195   fprintf_unfiltered (file,
1196                       "gdbarch_dump: %s # %s\n",
1197                       "INTEGER_TO_ADDRESS_P()",
1198                       XSTRING (INTEGER_TO_ADDRESS_P ()));
1199 #endif
1200   fprintf_unfiltered (file,
1201                       "gdbarch_dump: gdbarch_integer_to_address_p() = %d\n",
1202                       gdbarch_integer_to_address_p (current_gdbarch));
1203 #ifdef INTEGER_TO_ADDRESS
1204   fprintf_unfiltered (file,
1205                       "gdbarch_dump: %s # %s\n",
1206                       "INTEGER_TO_ADDRESS(type, buf)",
1207                       XSTRING (INTEGER_TO_ADDRESS (type, buf)));
1208 #endif
1209   fprintf_unfiltered (file,
1210                       "gdbarch_dump: integer_to_address = <0x%lx>\n",
1211                       (long) current_gdbarch->integer_to_address);
1212 #ifdef TARGET_LONG_BIT
1213   fprintf_unfiltered (file,
1214                       "gdbarch_dump: TARGET_LONG_BIT # %s\n",
1215                       XSTRING (TARGET_LONG_BIT));
1216 #endif
1217   fprintf_unfiltered (file,
1218                       "gdbarch_dump: long_bit = %s\n",
1219                       paddr_d (current_gdbarch->long_bit));
1220 #ifdef TARGET_LONG_DOUBLE_BIT
1221   fprintf_unfiltered (file,
1222                       "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
1223                       XSTRING (TARGET_LONG_DOUBLE_BIT));
1224 #endif
1225   fprintf_unfiltered (file,
1226                       "gdbarch_dump: long_double_bit = %s\n",
1227                       paddr_d (current_gdbarch->long_double_bit));
1228 #ifdef TARGET_LONG_DOUBLE_FORMAT
1229   fprintf_unfiltered (file,
1230                       "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
1231                       XSTRING (TARGET_LONG_DOUBLE_FORMAT));
1232 #endif
1233   fprintf_unfiltered (file,
1234                       "gdbarch_dump: long_double_format = %s\n",
1235                       (TARGET_LONG_DOUBLE_FORMAT)->name);
1236 #ifdef TARGET_LONG_LONG_BIT
1237   fprintf_unfiltered (file,
1238                       "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
1239                       XSTRING (TARGET_LONG_LONG_BIT));
1240 #endif
1241   fprintf_unfiltered (file,
1242                       "gdbarch_dump: long_long_bit = %s\n",
1243                       paddr_d (current_gdbarch->long_long_bit));
1244 #ifdef MEMORY_INSERT_BREAKPOINT
1245   fprintf_unfiltered (file,
1246                       "gdbarch_dump: %s # %s\n",
1247                       "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1248                       XSTRING (MEMORY_INSERT_BREAKPOINT (addr, contents_cache)));
1249 #endif
1250   fprintf_unfiltered (file,
1251                       "gdbarch_dump: memory_insert_breakpoint = <0x%lx>\n",
1252                       (long) current_gdbarch->memory_insert_breakpoint);
1253 #ifdef MEMORY_REMOVE_BREAKPOINT
1254   fprintf_unfiltered (file,
1255                       "gdbarch_dump: %s # %s\n",
1256                       "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1257                       XSTRING (MEMORY_REMOVE_BREAKPOINT (addr, contents_cache)));
1258 #endif
1259   fprintf_unfiltered (file,
1260                       "gdbarch_dump: memory_remove_breakpoint = <0x%lx>\n",
1261                       (long) current_gdbarch->memory_remove_breakpoint);
1262 #ifdef NAME_OF_MALLOC
1263   fprintf_unfiltered (file,
1264                       "gdbarch_dump: NAME_OF_MALLOC # %s\n",
1265                       XSTRING (NAME_OF_MALLOC));
1266 #endif
1267   fprintf_unfiltered (file,
1268                       "gdbarch_dump: name_of_malloc = %s\n",
1269                       NAME_OF_MALLOC);
1270 #ifdef NUM_PSEUDO_REGS
1271   fprintf_unfiltered (file,
1272                       "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1273                       XSTRING (NUM_PSEUDO_REGS));
1274 #endif
1275   fprintf_unfiltered (file,
1276                       "gdbarch_dump: num_pseudo_regs = %s\n",
1277                       paddr_d (current_gdbarch->num_pseudo_regs));
1278 #ifdef NUM_REGS
1279   fprintf_unfiltered (file,
1280                       "gdbarch_dump: NUM_REGS # %s\n",
1281                       XSTRING (NUM_REGS));
1282 #endif
1283   fprintf_unfiltered (file,
1284                       "gdbarch_dump: num_regs = %s\n",
1285                       paddr_d (current_gdbarch->num_regs));
1286 #ifdef TARGET_OSABI
1287   fprintf_unfiltered (file,
1288                       "gdbarch_dump: TARGET_OSABI # %s\n",
1289                       XSTRING (TARGET_OSABI));
1290 #endif
1291   fprintf_unfiltered (file,
1292                       "gdbarch_dump: osabi = %s\n",
1293                       paddr_d (current_gdbarch->osabi));
1294 #ifdef PC_REGNUM
1295   fprintf_unfiltered (file,
1296                       "gdbarch_dump: PC_REGNUM # %s\n",
1297                       XSTRING (PC_REGNUM));
1298 #endif
1299   fprintf_unfiltered (file,
1300                       "gdbarch_dump: pc_regnum = %s\n",
1301                       paddr_d (current_gdbarch->pc_regnum));
1302 #ifdef POINTER_TO_ADDRESS
1303   fprintf_unfiltered (file,
1304                       "gdbarch_dump: %s # %s\n",
1305                       "POINTER_TO_ADDRESS(type, buf)",
1306                       XSTRING (POINTER_TO_ADDRESS (type, buf)));
1307 #endif
1308   fprintf_unfiltered (file,
1309                       "gdbarch_dump: pointer_to_address = <0x%lx>\n",
1310                       (long) current_gdbarch->pointer_to_address);
1311   fprintf_unfiltered (file,
1312                       "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
1313                       gdbarch_print_float_info_p (current_gdbarch));
1314   fprintf_unfiltered (file,
1315                       "gdbarch_dump: print_float_info = <0x%lx>\n",
1316                       (long) current_gdbarch->print_float_info);
1317 #ifdef TARGET_PRINT_INSN
1318   fprintf_unfiltered (file,
1319                       "gdbarch_dump: %s # %s\n",
1320                       "TARGET_PRINT_INSN(vma, info)",
1321                       XSTRING (TARGET_PRINT_INSN (vma, info)));
1322 #endif
1323   fprintf_unfiltered (file,
1324                       "gdbarch_dump: print_insn = <0x%lx>\n",
1325                       (long) current_gdbarch->print_insn);
1326   fprintf_unfiltered (file,
1327                       "gdbarch_dump: print_registers_info = <0x%lx>\n",
1328                       (long) current_gdbarch->print_registers_info);
1329   fprintf_unfiltered (file,
1330                       "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1331                       gdbarch_print_vector_info_p (current_gdbarch));
1332   fprintf_unfiltered (file,
1333                       "gdbarch_dump: print_vector_info = <0x%lx>\n",
1334                       (long) current_gdbarch->print_vector_info);
1335 #ifdef PS_REGNUM
1336   fprintf_unfiltered (file,
1337                       "gdbarch_dump: PS_REGNUM # %s\n",
1338                       XSTRING (PS_REGNUM));
1339 #endif
1340   fprintf_unfiltered (file,
1341                       "gdbarch_dump: ps_regnum = %s\n",
1342                       paddr_d (current_gdbarch->ps_regnum));
1343   fprintf_unfiltered (file,
1344                       "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
1345                       gdbarch_pseudo_register_read_p (current_gdbarch));
1346   fprintf_unfiltered (file,
1347                       "gdbarch_dump: pseudo_register_read = <0x%lx>\n",
1348                       (long) current_gdbarch->pseudo_register_read);
1349   fprintf_unfiltered (file,
1350                       "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
1351                       gdbarch_pseudo_register_write_p (current_gdbarch));
1352   fprintf_unfiltered (file,
1353                       "gdbarch_dump: pseudo_register_write = <0x%lx>\n",
1354                       (long) current_gdbarch->pseudo_register_write);
1355 #ifdef TARGET_PTR_BIT
1356   fprintf_unfiltered (file,
1357                       "gdbarch_dump: TARGET_PTR_BIT # %s\n",
1358                       XSTRING (TARGET_PTR_BIT));
1359 #endif
1360   fprintf_unfiltered (file,
1361                       "gdbarch_dump: ptr_bit = %s\n",
1362                       paddr_d (current_gdbarch->ptr_bit));
1363   fprintf_unfiltered (file,
1364                       "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
1365                       gdbarch_push_dummy_call_p (current_gdbarch));
1366   fprintf_unfiltered (file,
1367                       "gdbarch_dump: push_dummy_call = <0x%lx>\n",
1368                       (long) current_gdbarch->push_dummy_call);
1369   fprintf_unfiltered (file,
1370                       "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
1371                       gdbarch_push_dummy_code_p (current_gdbarch));
1372   fprintf_unfiltered (file,
1373                       "gdbarch_dump: push_dummy_code = <0x%lx>\n",
1374                       (long) current_gdbarch->push_dummy_code);
1375 #ifdef TARGET_READ_PC_P
1376   fprintf_unfiltered (file,
1377                       "gdbarch_dump: %s # %s\n",
1378                       "TARGET_READ_PC_P()",
1379                       XSTRING (TARGET_READ_PC_P ()));
1380 #endif
1381   fprintf_unfiltered (file,
1382                       "gdbarch_dump: gdbarch_read_pc_p() = %d\n",
1383                       gdbarch_read_pc_p (current_gdbarch));
1384 #ifdef TARGET_READ_PC
1385   fprintf_unfiltered (file,
1386                       "gdbarch_dump: %s # %s\n",
1387                       "TARGET_READ_PC(ptid)",
1388                       XSTRING (TARGET_READ_PC (ptid)));
1389 #endif
1390   fprintf_unfiltered (file,
1391                       "gdbarch_dump: read_pc = <0x%lx>\n",
1392                       (long) current_gdbarch->read_pc);
1393 #ifdef TARGET_READ_SP_P
1394   fprintf_unfiltered (file,
1395                       "gdbarch_dump: %s # %s\n",
1396                       "TARGET_READ_SP_P()",
1397                       XSTRING (TARGET_READ_SP_P ()));
1398 #endif
1399   fprintf_unfiltered (file,
1400                       "gdbarch_dump: gdbarch_read_sp_p() = %d\n",
1401                       gdbarch_read_sp_p (current_gdbarch));
1402 #ifdef TARGET_READ_SP
1403   fprintf_unfiltered (file,
1404                       "gdbarch_dump: %s # %s\n",
1405                       "TARGET_READ_SP()",
1406                       XSTRING (TARGET_READ_SP ()));
1407 #endif
1408   fprintf_unfiltered (file,
1409                       "gdbarch_dump: read_sp = <0x%lx>\n",
1410                       (long) current_gdbarch->read_sp);
1411 #ifdef REGISTER_BYTES_OK_P
1412   fprintf_unfiltered (file,
1413                       "gdbarch_dump: %s # %s\n",
1414                       "REGISTER_BYTES_OK_P()",
1415                       XSTRING (REGISTER_BYTES_OK_P ()));
1416 #endif
1417   fprintf_unfiltered (file,
1418                       "gdbarch_dump: gdbarch_register_bytes_ok_p() = %d\n",
1419                       gdbarch_register_bytes_ok_p (current_gdbarch));
1420 #ifdef REGISTER_BYTES_OK
1421   fprintf_unfiltered (file,
1422                       "gdbarch_dump: %s # %s\n",
1423                       "REGISTER_BYTES_OK(nr_bytes)",
1424                       XSTRING (REGISTER_BYTES_OK (nr_bytes)));
1425 #endif
1426   fprintf_unfiltered (file,
1427                       "gdbarch_dump: register_bytes_ok = <0x%lx>\n",
1428                       (long) current_gdbarch->register_bytes_ok);
1429 #ifdef REGISTER_NAME
1430   fprintf_unfiltered (file,
1431                       "gdbarch_dump: %s # %s\n",
1432                       "REGISTER_NAME(regnr)",
1433                       XSTRING (REGISTER_NAME (regnr)));
1434 #endif
1435   fprintf_unfiltered (file,
1436                       "gdbarch_dump: register_name = <0x%lx>\n",
1437                       (long) current_gdbarch->register_name);
1438   fprintf_unfiltered (file,
1439                       "gdbarch_dump: register_reggroup_p = <0x%lx>\n",
1440                       (long) current_gdbarch->register_reggroup_p);
1441 #ifdef REGISTER_SIM_REGNO
1442   fprintf_unfiltered (file,
1443                       "gdbarch_dump: %s # %s\n",
1444                       "REGISTER_SIM_REGNO(reg_nr)",
1445                       XSTRING (REGISTER_SIM_REGNO (reg_nr)));
1446 #endif
1447   fprintf_unfiltered (file,
1448                       "gdbarch_dump: register_sim_regno = <0x%lx>\n",
1449                       (long) current_gdbarch->register_sim_regno);
1450 #ifdef REGISTER_TO_VALUE
1451   fprintf_unfiltered (file,
1452                       "gdbarch_dump: %s # %s\n",
1453                       "REGISTER_TO_VALUE(frame, regnum, type, buf)",
1454                       XSTRING (REGISTER_TO_VALUE (frame, regnum, type, buf)));
1455 #endif
1456   fprintf_unfiltered (file,
1457                       "gdbarch_dump: register_to_value = <0x%lx>\n",
1458                       (long) current_gdbarch->register_to_value);
1459   fprintf_unfiltered (file,
1460                       "gdbarch_dump: gdbarch_register_type_p() = %d\n",
1461                       gdbarch_register_type_p (current_gdbarch));
1462   fprintf_unfiltered (file,
1463                       "gdbarch_dump: register_type = <0x%lx>\n",
1464                       (long) current_gdbarch->register_type);
1465   fprintf_unfiltered (file,
1466                       "gdbarch_dump: gdbarch_regset_from_core_section_p() = %d\n",
1467                       gdbarch_regset_from_core_section_p (current_gdbarch));
1468   fprintf_unfiltered (file,
1469                       "gdbarch_dump: regset_from_core_section = <0x%lx>\n",
1470                       (long) current_gdbarch->regset_from_core_section);
1471   fprintf_unfiltered (file,
1472                       "gdbarch_dump: remote_translate_xfer_address = <0x%lx>\n",
1473                       (long) current_gdbarch->remote_translate_xfer_address);
1474   fprintf_unfiltered (file,
1475                       "gdbarch_dump: gdbarch_return_value_p() = %d\n",
1476                       gdbarch_return_value_p (current_gdbarch));
1477   fprintf_unfiltered (file,
1478                       "gdbarch_dump: return_value = <0x%lx>\n",
1479                       (long) current_gdbarch->return_value);
1480 #ifdef SDB_REG_TO_REGNUM
1481   fprintf_unfiltered (file,
1482                       "gdbarch_dump: %s # %s\n",
1483                       "SDB_REG_TO_REGNUM(sdb_regnr)",
1484                       XSTRING (SDB_REG_TO_REGNUM (sdb_regnr)));
1485 #endif
1486   fprintf_unfiltered (file,
1487                       "gdbarch_dump: sdb_reg_to_regnum = <0x%lx>\n",
1488                       (long) current_gdbarch->sdb_reg_to_regnum);
1489 #ifdef TARGET_SHORT_BIT
1490   fprintf_unfiltered (file,
1491                       "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
1492                       XSTRING (TARGET_SHORT_BIT));
1493 #endif
1494   fprintf_unfiltered (file,
1495                       "gdbarch_dump: short_bit = %s\n",
1496                       paddr_d (current_gdbarch->short_bit));
1497 #ifdef SKIP_PROLOGUE
1498   fprintf_unfiltered (file,
1499                       "gdbarch_dump: %s # %s\n",
1500                       "SKIP_PROLOGUE(ip)",
1501                       XSTRING (SKIP_PROLOGUE (ip)));
1502 #endif
1503   fprintf_unfiltered (file,
1504                       "gdbarch_dump: skip_prologue = <0x%lx>\n",
1505                       (long) current_gdbarch->skip_prologue);
1506   fprintf_unfiltered (file,
1507                       "gdbarch_dump: skip_solib_resolver = <0x%lx>\n",
1508                       (long) current_gdbarch->skip_solib_resolver);
1509 #ifdef SKIP_TRAMPOLINE_CODE
1510   fprintf_unfiltered (file,
1511                       "gdbarch_dump: %s # %s\n",
1512                       "SKIP_TRAMPOLINE_CODE(pc)",
1513                       XSTRING (SKIP_TRAMPOLINE_CODE (pc)));
1514 #endif
1515   fprintf_unfiltered (file,
1516                       "gdbarch_dump: skip_trampoline_code = <0x%lx>\n",
1517                       (long) current_gdbarch->skip_trampoline_code);
1518 #ifdef SMASH_TEXT_ADDRESS
1519   fprintf_unfiltered (file,
1520                       "gdbarch_dump: %s # %s\n",
1521                       "SMASH_TEXT_ADDRESS(addr)",
1522                       XSTRING (SMASH_TEXT_ADDRESS (addr)));
1523 #endif
1524   fprintf_unfiltered (file,
1525                       "gdbarch_dump: smash_text_address = <0x%lx>\n",
1526                       (long) current_gdbarch->smash_text_address);
1527 #ifdef SOFTWARE_SINGLE_STEP_P
1528   fprintf_unfiltered (file,
1529                       "gdbarch_dump: %s # %s\n",
1530                       "SOFTWARE_SINGLE_STEP_P()",
1531                       XSTRING (SOFTWARE_SINGLE_STEP_P ()));
1532 #endif
1533   fprintf_unfiltered (file,
1534                       "gdbarch_dump: gdbarch_software_single_step_p() = %d\n",
1535                       gdbarch_software_single_step_p (current_gdbarch));
1536 #ifdef SOFTWARE_SINGLE_STEP
1537   fprintf_unfiltered (file,
1538                       "gdbarch_dump: %s # %s\n",
1539                       "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1540                       XSTRING (SOFTWARE_SINGLE_STEP (sig, insert_breakpoints_p)));
1541 #endif
1542   fprintf_unfiltered (file,
1543                       "gdbarch_dump: software_single_step = <0x%lx>\n",
1544                       (long) current_gdbarch->software_single_step);
1545 #ifdef SP_REGNUM
1546   fprintf_unfiltered (file,
1547                       "gdbarch_dump: SP_REGNUM # %s\n",
1548                       XSTRING (SP_REGNUM));
1549 #endif
1550   fprintf_unfiltered (file,
1551                       "gdbarch_dump: sp_regnum = %s\n",
1552                       paddr_d (current_gdbarch->sp_regnum));
1553 #ifdef STAB_REG_TO_REGNUM
1554   fprintf_unfiltered (file,
1555                       "gdbarch_dump: %s # %s\n",
1556                       "STAB_REG_TO_REGNUM(stab_regnr)",
1557                       XSTRING (STAB_REG_TO_REGNUM (stab_regnr)));
1558 #endif
1559   fprintf_unfiltered (file,
1560                       "gdbarch_dump: stab_reg_to_regnum = <0x%lx>\n",
1561                       (long) current_gdbarch->stab_reg_to_regnum);
1562   fprintf_unfiltered (file,
1563                       "gdbarch_dump: stabs_argument_has_addr = <0x%lx>\n",
1564                       (long) current_gdbarch->stabs_argument_has_addr);
1565 #ifdef STORE_RETURN_VALUE
1566   fprintf_unfiltered (file,
1567                       "gdbarch_dump: %s # %s\n",
1568                       "STORE_RETURN_VALUE(type, regcache, valbuf)",
1569                       XSTRING (STORE_RETURN_VALUE (type, regcache, valbuf)));
1570 #endif
1571   fprintf_unfiltered (file,
1572                       "gdbarch_dump: store_return_value = <0x%lx>\n",
1573                       (long) current_gdbarch->store_return_value);
1574   fprintf_unfiltered (file,
1575                       "gdbarch_dump: gdbarch_unwind_dummy_id_p() = %d\n",
1576                       gdbarch_unwind_dummy_id_p (current_gdbarch));
1577   fprintf_unfiltered (file,
1578                       "gdbarch_dump: unwind_dummy_id = <0x%lx>\n",
1579                       (long) current_gdbarch->unwind_dummy_id);
1580   fprintf_unfiltered (file,
1581                       "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
1582                       gdbarch_unwind_pc_p (current_gdbarch));
1583   fprintf_unfiltered (file,
1584                       "gdbarch_dump: unwind_pc = <0x%lx>\n",
1585                       (long) current_gdbarch->unwind_pc);
1586   fprintf_unfiltered (file,
1587                       "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
1588                       gdbarch_unwind_sp_p (current_gdbarch));
1589   fprintf_unfiltered (file,
1590                       "gdbarch_dump: unwind_sp = <0x%lx>\n",
1591                       (long) current_gdbarch->unwind_sp);
1592 #ifdef VALUE_TO_REGISTER
1593   fprintf_unfiltered (file,
1594                       "gdbarch_dump: %s # %s\n",
1595                       "VALUE_TO_REGISTER(frame, regnum, type, buf)",
1596                       XSTRING (VALUE_TO_REGISTER (frame, regnum, type, buf)));
1597 #endif
1598   fprintf_unfiltered (file,
1599                       "gdbarch_dump: value_to_register = <0x%lx>\n",
1600                       (long) current_gdbarch->value_to_register);
1601 #ifdef TARGET_VIRTUAL_FRAME_POINTER
1602   fprintf_unfiltered (file,
1603                       "gdbarch_dump: %s # %s\n",
1604                       "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
1605                       XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc, frame_regnum, frame_offset)));
1606 #endif
1607   fprintf_unfiltered (file,
1608                       "gdbarch_dump: virtual_frame_pointer = <0x%lx>\n",
1609                       (long) current_gdbarch->virtual_frame_pointer);
1610 #ifdef TARGET_WRITE_PC
1611   fprintf_unfiltered (file,
1612                       "gdbarch_dump: %s # %s\n",
1613                       "TARGET_WRITE_PC(val, ptid)",
1614                       XSTRING (TARGET_WRITE_PC (val, ptid)));
1615 #endif
1616   fprintf_unfiltered (file,
1617                       "gdbarch_dump: write_pc = <0x%lx>\n",
1618                       (long) current_gdbarch->write_pc);
1619   if (current_gdbarch->dump_tdep != NULL)
1620     current_gdbarch->dump_tdep (current_gdbarch, file);
1621 }
1622
1623 struct gdbarch_tdep *
1624 gdbarch_tdep (struct gdbarch *gdbarch)
1625 {
1626   if (gdbarch_debug >= 2)
1627     fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
1628   return gdbarch->tdep;
1629 }
1630
1631
1632 const struct bfd_arch_info *
1633 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
1634 {
1635   gdb_assert (gdbarch != NULL);
1636   if (gdbarch_debug >= 2)
1637     fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
1638   return gdbarch->bfd_arch_info;
1639 }
1640
1641 int
1642 gdbarch_byte_order (struct gdbarch *gdbarch)
1643 {
1644   gdb_assert (gdbarch != NULL);
1645   if (gdbarch_debug >= 2)
1646     fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
1647   return gdbarch->byte_order;
1648 }
1649
1650 enum gdb_osabi
1651 gdbarch_osabi (struct gdbarch *gdbarch)
1652 {
1653   gdb_assert (gdbarch != NULL);
1654   if (gdbarch_debug >= 2)
1655     fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n");
1656   return gdbarch->osabi;
1657 }
1658
1659 int
1660 gdbarch_short_bit (struct gdbarch *gdbarch)
1661 {
1662   gdb_assert (gdbarch != NULL);
1663   /* Skip verify of short_bit, invalid_p == 0 */
1664   if (gdbarch_debug >= 2)
1665     fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
1666   return gdbarch->short_bit;
1667 }
1668
1669 void
1670 set_gdbarch_short_bit (struct gdbarch *gdbarch,
1671                        int short_bit)
1672 {
1673   gdbarch->short_bit = short_bit;
1674 }
1675
1676 int
1677 gdbarch_int_bit (struct gdbarch *gdbarch)
1678 {
1679   gdb_assert (gdbarch != NULL);
1680   /* Skip verify of int_bit, invalid_p == 0 */
1681   if (gdbarch_debug >= 2)
1682     fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
1683   return gdbarch->int_bit;
1684 }
1685
1686 void
1687 set_gdbarch_int_bit (struct gdbarch *gdbarch,
1688                      int int_bit)
1689 {
1690   gdbarch->int_bit = int_bit;
1691 }
1692
1693 int
1694 gdbarch_long_bit (struct gdbarch *gdbarch)
1695 {
1696   gdb_assert (gdbarch != NULL);
1697   /* Skip verify of long_bit, invalid_p == 0 */
1698   if (gdbarch_debug >= 2)
1699     fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
1700   return gdbarch->long_bit;
1701 }
1702
1703 void
1704 set_gdbarch_long_bit (struct gdbarch *gdbarch,
1705                       int long_bit)
1706 {
1707   gdbarch->long_bit = long_bit;
1708 }
1709
1710 int
1711 gdbarch_long_long_bit (struct gdbarch *gdbarch)
1712 {
1713   gdb_assert (gdbarch != NULL);
1714   /* Skip verify of long_long_bit, invalid_p == 0 */
1715   if (gdbarch_debug >= 2)
1716     fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
1717   return gdbarch->long_long_bit;
1718 }
1719
1720 void
1721 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
1722                            int long_long_bit)
1723 {
1724   gdbarch->long_long_bit = long_long_bit;
1725 }
1726
1727 int
1728 gdbarch_float_bit (struct gdbarch *gdbarch)
1729 {
1730   gdb_assert (gdbarch != NULL);
1731   /* Skip verify of float_bit, invalid_p == 0 */
1732   if (gdbarch_debug >= 2)
1733     fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
1734   return gdbarch->float_bit;
1735 }
1736
1737 void
1738 set_gdbarch_float_bit (struct gdbarch *gdbarch,
1739                        int float_bit)
1740 {
1741   gdbarch->float_bit = float_bit;
1742 }
1743
1744 int
1745 gdbarch_double_bit (struct gdbarch *gdbarch)
1746 {
1747   gdb_assert (gdbarch != NULL);
1748   /* Skip verify of double_bit, invalid_p == 0 */
1749   if (gdbarch_debug >= 2)
1750     fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
1751   return gdbarch->double_bit;
1752 }
1753
1754 void
1755 set_gdbarch_double_bit (struct gdbarch *gdbarch,
1756                         int double_bit)
1757 {
1758   gdbarch->double_bit = double_bit;
1759 }
1760
1761 int
1762 gdbarch_long_double_bit (struct gdbarch *gdbarch)
1763 {
1764   gdb_assert (gdbarch != NULL);
1765   /* Skip verify of long_double_bit, invalid_p == 0 */
1766   if (gdbarch_debug >= 2)
1767     fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
1768   return gdbarch->long_double_bit;
1769 }
1770
1771 void
1772 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
1773                              int long_double_bit)
1774 {
1775   gdbarch->long_double_bit = long_double_bit;
1776 }
1777
1778 int
1779 gdbarch_ptr_bit (struct gdbarch *gdbarch)
1780 {
1781   gdb_assert (gdbarch != NULL);
1782   /* Skip verify of ptr_bit, invalid_p == 0 */
1783   if (gdbarch_debug >= 2)
1784     fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
1785   return gdbarch->ptr_bit;
1786 }
1787
1788 void
1789 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
1790                      int ptr_bit)
1791 {
1792   gdbarch->ptr_bit = ptr_bit;
1793 }
1794
1795 int
1796 gdbarch_addr_bit (struct gdbarch *gdbarch)
1797 {
1798   gdb_assert (gdbarch != NULL);
1799   /* Check variable changed from pre-default.  */
1800   gdb_assert (gdbarch->addr_bit != 0);
1801   if (gdbarch_debug >= 2)
1802     fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
1803   return gdbarch->addr_bit;
1804 }
1805
1806 void
1807 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
1808                       int addr_bit)
1809 {
1810   gdbarch->addr_bit = addr_bit;
1811 }
1812
1813 int
1814 gdbarch_bfd_vma_bit (struct gdbarch *gdbarch)
1815 {
1816   gdb_assert (gdbarch != NULL);
1817   /* Skip verify of bfd_vma_bit, invalid_p == 0 */
1818   if (gdbarch_debug >= 2)
1819     fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n");
1820   return gdbarch->bfd_vma_bit;
1821 }
1822
1823 void
1824 set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch,
1825                          int bfd_vma_bit)
1826 {
1827   gdbarch->bfd_vma_bit = bfd_vma_bit;
1828 }
1829
1830 int
1831 gdbarch_char_signed (struct gdbarch *gdbarch)
1832 {
1833   gdb_assert (gdbarch != NULL);
1834   /* Check variable changed from pre-default.  */
1835   gdb_assert (gdbarch->char_signed != -1);
1836   if (gdbarch_debug >= 2)
1837     fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
1838   return gdbarch->char_signed;
1839 }
1840
1841 void
1842 set_gdbarch_char_signed (struct gdbarch *gdbarch,
1843                          int char_signed)
1844 {
1845   gdbarch->char_signed = char_signed;
1846 }
1847
1848 int
1849 gdbarch_read_pc_p (struct gdbarch *gdbarch)
1850 {
1851   gdb_assert (gdbarch != NULL);
1852   return gdbarch->read_pc != NULL;
1853 }
1854
1855 CORE_ADDR
1856 gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid)
1857 {
1858   gdb_assert (gdbarch != NULL);
1859   gdb_assert (gdbarch->read_pc != NULL);
1860   if (gdbarch_debug >= 2)
1861     fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
1862   return gdbarch->read_pc (ptid);
1863 }
1864
1865 void
1866 set_gdbarch_read_pc (struct gdbarch *gdbarch,
1867                      gdbarch_read_pc_ftype read_pc)
1868 {
1869   gdbarch->read_pc = read_pc;
1870 }
1871
1872 void
1873 gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid)
1874 {
1875   gdb_assert (gdbarch != NULL);
1876   gdb_assert (gdbarch->write_pc != NULL);
1877   if (gdbarch_debug >= 2)
1878     fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
1879   gdbarch->write_pc (val, ptid);
1880 }
1881
1882 void
1883 set_gdbarch_write_pc (struct gdbarch *gdbarch,
1884                       gdbarch_write_pc_ftype write_pc)
1885 {
1886   gdbarch->write_pc = write_pc;
1887 }
1888
1889 int
1890 gdbarch_read_sp_p (struct gdbarch *gdbarch)
1891 {
1892   gdb_assert (gdbarch != NULL);
1893   return gdbarch->read_sp != NULL;
1894 }
1895
1896 CORE_ADDR
1897 gdbarch_read_sp (struct gdbarch *gdbarch)
1898 {
1899   gdb_assert (gdbarch != NULL);
1900   gdb_assert (gdbarch->read_sp != NULL);
1901   if (gdbarch_debug >= 2)
1902     fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
1903   return gdbarch->read_sp ();
1904 }
1905
1906 void
1907 set_gdbarch_read_sp (struct gdbarch *gdbarch,
1908                      gdbarch_read_sp_ftype read_sp)
1909 {
1910   gdbarch->read_sp = read_sp;
1911 }
1912
1913 void
1914 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
1915 {
1916   gdb_assert (gdbarch != NULL);
1917   gdb_assert (gdbarch->virtual_frame_pointer != NULL);
1918   if (gdbarch_debug >= 2)
1919     fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
1920   gdbarch->virtual_frame_pointer (pc, frame_regnum, frame_offset);
1921 }
1922
1923 void
1924 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
1925                                    gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
1926 {
1927   gdbarch->virtual_frame_pointer = virtual_frame_pointer;
1928 }
1929
1930 int
1931 gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
1932 {
1933   gdb_assert (gdbarch != NULL);
1934   return gdbarch->pseudo_register_read != NULL;
1935 }
1936
1937 void
1938 gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf)
1939 {
1940   gdb_assert (gdbarch != NULL);
1941   gdb_assert (gdbarch->pseudo_register_read != NULL);
1942   if (gdbarch_debug >= 2)
1943     fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
1944   gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
1945 }
1946
1947 void
1948 set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
1949                                   gdbarch_pseudo_register_read_ftype pseudo_register_read)
1950 {
1951   gdbarch->pseudo_register_read = pseudo_register_read;
1952 }
1953
1954 int
1955 gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
1956 {
1957   gdb_assert (gdbarch != NULL);
1958   return gdbarch->pseudo_register_write != NULL;
1959 }
1960
1961 void
1962 gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf)
1963 {
1964   gdb_assert (gdbarch != NULL);
1965   gdb_assert (gdbarch->pseudo_register_write != NULL);
1966   if (gdbarch_debug >= 2)
1967     fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
1968   gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
1969 }
1970
1971 void
1972 set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
1973                                    gdbarch_pseudo_register_write_ftype pseudo_register_write)
1974 {
1975   gdbarch->pseudo_register_write = pseudo_register_write;
1976 }
1977
1978 int
1979 gdbarch_num_regs (struct gdbarch *gdbarch)
1980 {
1981   gdb_assert (gdbarch != NULL);
1982   /* Check variable changed from pre-default.  */
1983   gdb_assert (gdbarch->num_regs != -1);
1984   if (gdbarch_debug >= 2)
1985     fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
1986   return gdbarch->num_regs;
1987 }
1988
1989 void
1990 set_gdbarch_num_regs (struct gdbarch *gdbarch,
1991                       int num_regs)
1992 {
1993   gdbarch->num_regs = num_regs;
1994 }
1995
1996 int
1997 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
1998 {
1999   gdb_assert (gdbarch != NULL);
2000   /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2001   if (gdbarch_debug >= 2)
2002     fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
2003   return gdbarch->num_pseudo_regs;
2004 }
2005
2006 void
2007 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
2008                              int num_pseudo_regs)
2009 {
2010   gdbarch->num_pseudo_regs = num_pseudo_regs;
2011 }
2012
2013 int
2014 gdbarch_sp_regnum (struct gdbarch *gdbarch)
2015 {
2016   gdb_assert (gdbarch != NULL);
2017   /* Skip verify of sp_regnum, invalid_p == 0 */
2018   if (gdbarch_debug >= 2)
2019     fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
2020   return gdbarch->sp_regnum;
2021 }
2022
2023 void
2024 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
2025                        int sp_regnum)
2026 {
2027   gdbarch->sp_regnum = sp_regnum;
2028 }
2029
2030 int
2031 gdbarch_pc_regnum (struct gdbarch *gdbarch)
2032 {
2033   gdb_assert (gdbarch != NULL);
2034   /* Skip verify of pc_regnum, invalid_p == 0 */
2035   if (gdbarch_debug >= 2)
2036     fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
2037   return gdbarch->pc_regnum;
2038 }
2039
2040 void
2041 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
2042                        int pc_regnum)
2043 {
2044   gdbarch->pc_regnum = pc_regnum;
2045 }
2046
2047 int
2048 gdbarch_ps_regnum (struct gdbarch *gdbarch)
2049 {
2050   gdb_assert (gdbarch != NULL);
2051   /* Skip verify of ps_regnum, invalid_p == 0 */
2052   if (gdbarch_debug >= 2)
2053     fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
2054   return gdbarch->ps_regnum;
2055 }
2056
2057 void
2058 set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
2059                        int ps_regnum)
2060 {
2061   gdbarch->ps_regnum = ps_regnum;
2062 }
2063
2064 int
2065 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
2066 {
2067   gdb_assert (gdbarch != NULL);
2068   /* Skip verify of fp0_regnum, invalid_p == 0 */
2069   if (gdbarch_debug >= 2)
2070     fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
2071   return gdbarch->fp0_regnum;
2072 }
2073
2074 void
2075 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
2076                         int fp0_regnum)
2077 {
2078   gdbarch->fp0_regnum = fp0_regnum;
2079 }
2080
2081 int
2082 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
2083 {
2084   gdb_assert (gdbarch != NULL);
2085   gdb_assert (gdbarch->stab_reg_to_regnum != NULL);
2086   if (gdbarch_debug >= 2)
2087     fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
2088   return gdbarch->stab_reg_to_regnum (stab_regnr);
2089 }
2090
2091 void
2092 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
2093                                 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
2094 {
2095   gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
2096 }
2097
2098 int
2099 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
2100 {
2101   gdb_assert (gdbarch != NULL);
2102   gdb_assert (gdbarch->ecoff_reg_to_regnum != NULL);
2103   if (gdbarch_debug >= 2)
2104     fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
2105   return gdbarch->ecoff_reg_to_regnum (ecoff_regnr);
2106 }
2107
2108 void
2109 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
2110                                  gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
2111 {
2112   gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
2113 }
2114
2115 int
2116 gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr)
2117 {
2118   gdb_assert (gdbarch != NULL);
2119   gdb_assert (gdbarch->dwarf_reg_to_regnum != NULL);
2120   if (gdbarch_debug >= 2)
2121     fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf_reg_to_regnum called\n");
2122   return gdbarch->dwarf_reg_to_regnum (dwarf_regnr);
2123 }
2124
2125 void
2126 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch,
2127                                  gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum)
2128 {
2129   gdbarch->dwarf_reg_to_regnum = dwarf_reg_to_regnum;
2130 }
2131
2132 int
2133 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
2134 {
2135   gdb_assert (gdbarch != NULL);
2136   gdb_assert (gdbarch->sdb_reg_to_regnum != NULL);
2137   if (gdbarch_debug >= 2)
2138     fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
2139   return gdbarch->sdb_reg_to_regnum (sdb_regnr);
2140 }
2141
2142 void
2143 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
2144                                gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
2145 {
2146   gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
2147 }
2148
2149 int
2150 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
2151 {
2152   gdb_assert (gdbarch != NULL);
2153   gdb_assert (gdbarch->dwarf2_reg_to_regnum != NULL);
2154   if (gdbarch_debug >= 2)
2155     fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
2156   return gdbarch->dwarf2_reg_to_regnum (dwarf2_regnr);
2157 }
2158
2159 void
2160 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
2161                                   gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
2162 {
2163   gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
2164 }
2165
2166 const char *
2167 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
2168 {
2169   gdb_assert (gdbarch != NULL);
2170   gdb_assert (gdbarch->register_name != NULL);
2171   if (gdbarch_debug >= 2)
2172     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
2173   return gdbarch->register_name (regnr);
2174 }
2175
2176 void
2177 set_gdbarch_register_name (struct gdbarch *gdbarch,
2178                            gdbarch_register_name_ftype register_name)
2179 {
2180   gdbarch->register_name = register_name;
2181 }
2182
2183 int
2184 gdbarch_register_type_p (struct gdbarch *gdbarch)
2185 {
2186   gdb_assert (gdbarch != NULL);
2187   return gdbarch->register_type != NULL;
2188 }
2189
2190 struct type *
2191 gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
2192 {
2193   gdb_assert (gdbarch != NULL);
2194   gdb_assert (gdbarch->register_type != NULL);
2195   if (gdbarch_debug >= 2)
2196     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
2197   return gdbarch->register_type (gdbarch, reg_nr);
2198 }
2199
2200 void
2201 set_gdbarch_register_type (struct gdbarch *gdbarch,
2202                            gdbarch_register_type_ftype register_type)
2203 {
2204   gdbarch->register_type = register_type;
2205 }
2206
2207 int
2208 gdbarch_deprecated_register_byte_p (struct gdbarch *gdbarch)
2209 {
2210   gdb_assert (gdbarch != NULL);
2211   return gdbarch->deprecated_register_byte != generic_register_byte;
2212 }
2213
2214 int
2215 gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, int reg_nr)
2216 {
2217   gdb_assert (gdbarch != NULL);
2218   gdb_assert (gdbarch->deprecated_register_byte != NULL);
2219   /* Do not check predicate: gdbarch->deprecated_register_byte != generic_register_byte, allow call.  */
2220   if (gdbarch_debug >= 2)
2221     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_byte called\n");
2222   return gdbarch->deprecated_register_byte (reg_nr);
2223 }
2224
2225 void
2226 set_gdbarch_deprecated_register_byte (struct gdbarch *gdbarch,
2227                                       gdbarch_deprecated_register_byte_ftype deprecated_register_byte)
2228 {
2229   gdbarch->deprecated_register_byte = deprecated_register_byte;
2230 }
2231
2232 int
2233 gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch)
2234 {
2235   gdb_assert (gdbarch != NULL);
2236   return gdbarch->unwind_dummy_id != NULL;
2237 }
2238
2239 struct frame_id
2240 gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *info)
2241 {
2242   gdb_assert (gdbarch != NULL);
2243   gdb_assert (gdbarch->unwind_dummy_id != NULL);
2244   if (gdbarch_debug >= 2)
2245     fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_dummy_id called\n");
2246   return gdbarch->unwind_dummy_id (gdbarch, info);
2247 }
2248
2249 void
2250 set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch,
2251                              gdbarch_unwind_dummy_id_ftype unwind_dummy_id)
2252 {
2253   gdbarch->unwind_dummy_id = unwind_dummy_id;
2254 }
2255
2256 int
2257 gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch)
2258 {
2259   gdb_assert (gdbarch != NULL);
2260   /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
2261   if (gdbarch_debug >= 2)
2262     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n");
2263   return gdbarch->deprecated_fp_regnum;
2264 }
2265
2266 void
2267 set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch,
2268                                   int deprecated_fp_regnum)
2269 {
2270   gdbarch->deprecated_fp_regnum = deprecated_fp_regnum;
2271 }
2272
2273 int
2274 gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
2275 {
2276   gdb_assert (gdbarch != NULL);
2277   return gdbarch->push_dummy_call != NULL;
2278 }
2279
2280 CORE_ADDR
2281 gdbarch_push_dummy_call (struct gdbarch *gdbarch, struct value *function, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
2282 {
2283   gdb_assert (gdbarch != NULL);
2284   gdb_assert (gdbarch->push_dummy_call != NULL);
2285   if (gdbarch_debug >= 2)
2286     fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
2287   return gdbarch->push_dummy_call (gdbarch, function, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr);
2288 }
2289
2290 void
2291 set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
2292                              gdbarch_push_dummy_call_ftype push_dummy_call)
2293 {
2294   gdbarch->push_dummy_call = push_dummy_call;
2295 }
2296
2297 int
2298 gdbarch_deprecated_push_arguments_p (struct gdbarch *gdbarch)
2299 {
2300   gdb_assert (gdbarch != NULL);
2301   return gdbarch->deprecated_push_arguments != NULL;
2302 }
2303
2304 CORE_ADDR
2305 gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
2306 {
2307   gdb_assert (gdbarch != NULL);
2308   gdb_assert (gdbarch->deprecated_push_arguments != NULL);
2309   if (gdbarch_debug >= 2)
2310     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_arguments called\n");
2311   return gdbarch->deprecated_push_arguments (nargs, args, sp, struct_return, struct_addr);
2312 }
2313
2314 void
2315 set_gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch,
2316                                        gdbarch_deprecated_push_arguments_ftype deprecated_push_arguments)
2317 {
2318   gdbarch->deprecated_push_arguments = deprecated_push_arguments;
2319 }
2320
2321 int
2322 gdbarch_deprecated_register_size (struct gdbarch *gdbarch)
2323 {
2324   gdb_assert (gdbarch != NULL);
2325   if (gdbarch_debug >= 2)
2326     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_size called\n");
2327   return gdbarch->deprecated_register_size;
2328 }
2329
2330 void
2331 set_gdbarch_deprecated_register_size (struct gdbarch *gdbarch,
2332                                       int deprecated_register_size)
2333 {
2334   gdbarch->deprecated_register_size = deprecated_register_size;
2335 }
2336
2337 int
2338 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
2339 {
2340   gdb_assert (gdbarch != NULL);
2341   /* Skip verify of call_dummy_location, invalid_p == 0 */
2342   if (gdbarch_debug >= 2)
2343     fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
2344   return gdbarch->call_dummy_location;
2345 }
2346
2347 void
2348 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
2349                                  int call_dummy_location)
2350 {
2351   gdbarch->call_dummy_location = call_dummy_location;
2352 }
2353
2354 int
2355 gdbarch_push_dummy_code_p (struct gdbarch *gdbarch)
2356 {
2357   gdb_assert (gdbarch != NULL);
2358   return gdbarch->push_dummy_code != NULL;
2359 }
2360
2361 CORE_ADDR
2362 gdbarch_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp, CORE_ADDR funaddr, int using_gcc, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr)
2363 {
2364   gdb_assert (gdbarch != NULL);
2365   gdb_assert (gdbarch->push_dummy_code != NULL);
2366   if (gdbarch_debug >= 2)
2367     fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n");
2368   return gdbarch->push_dummy_code (gdbarch, sp, funaddr, using_gcc, args, nargs, value_type, real_pc, bp_addr);
2369 }
2370
2371 void
2372 set_gdbarch_push_dummy_code (struct gdbarch *gdbarch,
2373                              gdbarch_push_dummy_code_ftype push_dummy_code)
2374 {
2375   gdbarch->push_dummy_code = push_dummy_code;
2376 }
2377
2378 void
2379 gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
2380 {
2381   gdb_assert (gdbarch != NULL);
2382   gdb_assert (gdbarch->print_registers_info != NULL);
2383   if (gdbarch_debug >= 2)
2384     fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
2385   gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
2386 }
2387
2388 void
2389 set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
2390                                   gdbarch_print_registers_info_ftype print_registers_info)
2391 {
2392   gdbarch->print_registers_info = print_registers_info;
2393 }
2394
2395 int
2396 gdbarch_print_float_info_p (struct gdbarch *gdbarch)
2397 {
2398   gdb_assert (gdbarch != NULL);
2399   return gdbarch->print_float_info != NULL;
2400 }
2401
2402 void
2403 gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
2404 {
2405   gdb_assert (gdbarch != NULL);
2406   gdb_assert (gdbarch->print_float_info != NULL);
2407   if (gdbarch_debug >= 2)
2408     fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
2409   gdbarch->print_float_info (gdbarch, file, frame, args);
2410 }
2411
2412 void
2413 set_gdbarch_print_float_info (struct gdbarch *gdbarch,
2414                               gdbarch_print_float_info_ftype print_float_info)
2415 {
2416   gdbarch->print_float_info = print_float_info;
2417 }
2418
2419 int
2420 gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
2421 {
2422   gdb_assert (gdbarch != NULL);
2423   return gdbarch->print_vector_info != NULL;
2424 }
2425
2426 void
2427 gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
2428 {
2429   gdb_assert (gdbarch != NULL);
2430   gdb_assert (gdbarch->print_vector_info != NULL);
2431   if (gdbarch_debug >= 2)
2432     fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
2433   gdbarch->print_vector_info (gdbarch, file, frame, args);
2434 }
2435
2436 void
2437 set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
2438                                gdbarch_print_vector_info_ftype print_vector_info)
2439 {
2440   gdbarch->print_vector_info = print_vector_info;
2441 }
2442
2443 int
2444 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
2445 {
2446   gdb_assert (gdbarch != NULL);
2447   gdb_assert (gdbarch->register_sim_regno != NULL);
2448   if (gdbarch_debug >= 2)
2449     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
2450   return gdbarch->register_sim_regno (reg_nr);
2451 }
2452
2453 void
2454 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
2455                                 gdbarch_register_sim_regno_ftype register_sim_regno)
2456 {
2457   gdbarch->register_sim_regno = register_sim_regno;
2458 }
2459
2460 int
2461 gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch)
2462 {
2463   gdb_assert (gdbarch != NULL);
2464   return gdbarch->register_bytes_ok != NULL;
2465 }
2466
2467 int
2468 gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes)
2469 {
2470   gdb_assert (gdbarch != NULL);
2471   gdb_assert (gdbarch->register_bytes_ok != NULL);
2472   if (gdbarch_debug >= 2)
2473     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n");
2474   return gdbarch->register_bytes_ok (nr_bytes);
2475 }
2476
2477 void
2478 set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch,
2479                                gdbarch_register_bytes_ok_ftype register_bytes_ok)
2480 {
2481   gdbarch->register_bytes_ok = register_bytes_ok;
2482 }
2483
2484 int
2485 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
2486 {
2487   gdb_assert (gdbarch != NULL);
2488   gdb_assert (gdbarch->cannot_fetch_register != NULL);
2489   if (gdbarch_debug >= 2)
2490     fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
2491   return gdbarch->cannot_fetch_register (regnum);
2492 }
2493
2494 void
2495 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
2496                                    gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
2497 {
2498   gdbarch->cannot_fetch_register = cannot_fetch_register;
2499 }
2500
2501 int
2502 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
2503 {
2504   gdb_assert (gdbarch != NULL);
2505   gdb_assert (gdbarch->cannot_store_register != NULL);
2506   if (gdbarch_debug >= 2)
2507     fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
2508   return gdbarch->cannot_store_register (regnum);
2509 }
2510
2511 void
2512 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
2513                                    gdbarch_cannot_store_register_ftype cannot_store_register)
2514 {
2515   gdbarch->cannot_store_register = cannot_store_register;
2516 }
2517
2518 int
2519 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
2520 {
2521   gdb_assert (gdbarch != NULL);
2522   return gdbarch->get_longjmp_target != NULL;
2523 }
2524
2525 int
2526 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc)
2527 {
2528   gdb_assert (gdbarch != NULL);
2529   gdb_assert (gdbarch->get_longjmp_target != NULL);
2530   if (gdbarch_debug >= 2)
2531     fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
2532   return gdbarch->get_longjmp_target (pc);
2533 }
2534
2535 void
2536 set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
2537                                 gdbarch_get_longjmp_target_ftype get_longjmp_target)
2538 {
2539   gdbarch->get_longjmp_target = get_longjmp_target;
2540 }
2541
2542 int
2543 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
2544 {
2545   gdb_assert (gdbarch != NULL);
2546   if (gdbarch_debug >= 2)
2547     fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
2548   return gdbarch->believe_pcc_promotion;
2549 }
2550
2551 void
2552 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
2553                                    int believe_pcc_promotion)
2554 {
2555   gdbarch->believe_pcc_promotion = believe_pcc_promotion;
2556 }
2557
2558 int
2559 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
2560 {
2561   gdb_assert (gdbarch != NULL);
2562   gdb_assert (gdbarch->convert_register_p != NULL);
2563   if (gdbarch_debug >= 2)
2564     fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
2565   return gdbarch->convert_register_p (regnum, type);
2566 }
2567
2568 void
2569 set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
2570                                 gdbarch_convert_register_p_ftype convert_register_p)
2571 {
2572   gdbarch->convert_register_p = convert_register_p;
2573 }
2574
2575 void
2576 gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, void *buf)
2577 {
2578   gdb_assert (gdbarch != NULL);
2579   gdb_assert (gdbarch->register_to_value != NULL);
2580   if (gdbarch_debug >= 2)
2581     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
2582   gdbarch->register_to_value (frame, regnum, type, buf);
2583 }
2584
2585 void
2586 set_gdbarch_register_to_value (struct gdbarch *gdbarch,
2587                                gdbarch_register_to_value_ftype register_to_value)
2588 {
2589   gdbarch->register_to_value = register_to_value;
2590 }
2591
2592 void
2593 gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const void *buf)
2594 {
2595   gdb_assert (gdbarch != NULL);
2596   gdb_assert (gdbarch->value_to_register != NULL);
2597   if (gdbarch_debug >= 2)
2598     fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
2599   gdbarch->value_to_register (frame, regnum, type, buf);
2600 }
2601
2602 void
2603 set_gdbarch_value_to_register (struct gdbarch *gdbarch,
2604                                gdbarch_value_to_register_ftype value_to_register)
2605 {
2606   gdbarch->value_to_register = value_to_register;
2607 }
2608
2609 CORE_ADDR
2610 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const void *buf)
2611 {
2612   gdb_assert (gdbarch != NULL);
2613   gdb_assert (gdbarch->pointer_to_address != NULL);
2614   if (gdbarch_debug >= 2)
2615     fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
2616   return gdbarch->pointer_to_address (type, buf);
2617 }
2618
2619 void
2620 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
2621                                 gdbarch_pointer_to_address_ftype pointer_to_address)
2622 {
2623   gdbarch->pointer_to_address = pointer_to_address;
2624 }
2625
2626 void
2627 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr)
2628 {
2629   gdb_assert (gdbarch != NULL);
2630   gdb_assert (gdbarch->address_to_pointer != NULL);
2631   if (gdbarch_debug >= 2)
2632     fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
2633   gdbarch->address_to_pointer (type, buf, addr);
2634 }
2635
2636 void
2637 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
2638                                 gdbarch_address_to_pointer_ftype address_to_pointer)
2639 {
2640   gdbarch->address_to_pointer = address_to_pointer;
2641 }
2642
2643 int
2644 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
2645 {
2646   gdb_assert (gdbarch != NULL);
2647   return gdbarch->integer_to_address != NULL;
2648 }
2649
2650 CORE_ADDR
2651 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
2652 {
2653   gdb_assert (gdbarch != NULL);
2654   gdb_assert (gdbarch->integer_to_address != NULL);
2655   if (gdbarch_debug >= 2)
2656     fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
2657   return gdbarch->integer_to_address (type, buf);
2658 }
2659
2660 void
2661 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
2662                                 gdbarch_integer_to_address_ftype integer_to_address)
2663 {
2664   gdbarch->integer_to_address = integer_to_address;
2665 }
2666
2667 int
2668 gdbarch_deprecated_store_struct_return_p (struct gdbarch *gdbarch)
2669 {
2670   gdb_assert (gdbarch != NULL);
2671   return gdbarch->deprecated_store_struct_return != NULL;
2672 }
2673
2674 void
2675 gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
2676 {
2677   gdb_assert (gdbarch != NULL);
2678   gdb_assert (gdbarch->deprecated_store_struct_return != NULL);
2679   if (gdbarch_debug >= 2)
2680     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_struct_return called\n");
2681   gdbarch->deprecated_store_struct_return (addr, sp);
2682 }
2683
2684 void
2685 set_gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch,
2686                                             gdbarch_deprecated_store_struct_return_ftype deprecated_store_struct_return)
2687 {
2688   gdbarch->deprecated_store_struct_return = deprecated_store_struct_return;
2689 }
2690
2691 int
2692 gdbarch_return_value_p (struct gdbarch *gdbarch)
2693 {
2694   gdb_assert (gdbarch != NULL);
2695   return gdbarch->return_value != legacy_return_value;
2696 }
2697
2698 enum return_value_convention
2699 gdbarch_return_value (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, void *readbuf, const void *writebuf)
2700 {
2701   gdb_assert (gdbarch != NULL);
2702   gdb_assert (gdbarch->return_value != NULL);
2703   /* Do not check predicate: gdbarch->return_value != legacy_return_value, allow call.  */
2704   if (gdbarch_debug >= 2)
2705     fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value called\n");
2706   return gdbarch->return_value (gdbarch, valtype, regcache, readbuf, writebuf);
2707 }
2708
2709 void
2710 set_gdbarch_return_value (struct gdbarch *gdbarch,
2711                           gdbarch_return_value_ftype return_value)
2712 {
2713   gdbarch->return_value = return_value;
2714 }
2715
2716 void
2717 gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf)
2718 {
2719   gdb_assert (gdbarch != NULL);
2720   gdb_assert (gdbarch->extract_return_value != NULL);
2721   if (gdbarch_debug >= 2)
2722     fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
2723   gdbarch->extract_return_value (type, regcache, valbuf);
2724 }
2725
2726 void
2727 set_gdbarch_extract_return_value (struct gdbarch *gdbarch,
2728                                   gdbarch_extract_return_value_ftype extract_return_value)
2729 {
2730   gdbarch->extract_return_value = extract_return_value;
2731 }
2732
2733 void
2734 gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const void *valbuf)
2735 {
2736   gdb_assert (gdbarch != NULL);
2737   gdb_assert (gdbarch->store_return_value != NULL);
2738   if (gdbarch_debug >= 2)
2739     fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
2740   gdbarch->store_return_value (type, regcache, valbuf);
2741 }
2742
2743 void
2744 set_gdbarch_store_return_value (struct gdbarch *gdbarch,
2745                                 gdbarch_store_return_value_ftype store_return_value)
2746 {
2747   gdbarch->store_return_value = store_return_value;
2748 }
2749
2750 void
2751 gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
2752 {
2753   gdb_assert (gdbarch != NULL);
2754   gdb_assert (gdbarch->deprecated_extract_return_value != NULL);
2755   if (gdbarch_debug >= 2)
2756     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_return_value called\n");
2757   gdbarch->deprecated_extract_return_value (type, regbuf, valbuf);
2758 }
2759
2760 void
2761 set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch,
2762                                              gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value)
2763 {
2764   gdbarch->deprecated_extract_return_value = deprecated_extract_return_value;
2765 }
2766
2767 void
2768 gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf)
2769 {
2770   gdb_assert (gdbarch != NULL);
2771   gdb_assert (gdbarch->deprecated_store_return_value != NULL);
2772   if (gdbarch_debug >= 2)
2773     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_return_value called\n");
2774   gdbarch->deprecated_store_return_value (type, valbuf);
2775 }
2776
2777 void
2778 set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch,
2779                                            gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value)
2780 {
2781   gdbarch->deprecated_store_return_value = deprecated_store_return_value;
2782 }
2783
2784 int
2785 gdbarch_deprecated_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
2786 {
2787   gdb_assert (gdbarch != NULL);
2788   gdb_assert (gdbarch->deprecated_use_struct_convention != NULL);
2789   if (gdbarch_debug >= 2)
2790     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_use_struct_convention called\n");
2791   return gdbarch->deprecated_use_struct_convention (gcc_p, value_type);
2792 }
2793
2794 void
2795 set_gdbarch_deprecated_use_struct_convention (struct gdbarch *gdbarch,
2796                                               gdbarch_deprecated_use_struct_convention_ftype deprecated_use_struct_convention)
2797 {
2798   gdbarch->deprecated_use_struct_convention = deprecated_use_struct_convention;
2799 }
2800
2801 int
2802 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch)
2803 {
2804   gdb_assert (gdbarch != NULL);
2805   return gdbarch->deprecated_extract_struct_value_address != NULL;
2806 }
2807
2808 CORE_ADDR
2809 gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache)
2810 {
2811   gdb_assert (gdbarch != NULL);
2812   gdb_assert (gdbarch->deprecated_extract_struct_value_address != NULL);
2813   if (gdbarch_debug >= 2)
2814     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_struct_value_address called\n");
2815   return gdbarch->deprecated_extract_struct_value_address (regcache);
2816 }
2817
2818 void
2819 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch,
2820                                                      gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address)
2821 {
2822   gdbarch->deprecated_extract_struct_value_address = deprecated_extract_struct_value_address;
2823 }
2824
2825 CORE_ADDR
2826 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
2827 {
2828   gdb_assert (gdbarch != NULL);
2829   gdb_assert (gdbarch->skip_prologue != NULL);
2830   if (gdbarch_debug >= 2)
2831     fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
2832   return gdbarch->skip_prologue (ip);
2833 }
2834
2835 void
2836 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
2837                            gdbarch_skip_prologue_ftype skip_prologue)
2838 {
2839   gdbarch->skip_prologue = skip_prologue;
2840 }
2841
2842 int
2843 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
2844 {
2845   gdb_assert (gdbarch != NULL);
2846   gdb_assert (gdbarch->inner_than != NULL);
2847   if (gdbarch_debug >= 2)
2848     fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
2849   return gdbarch->inner_than (lhs, rhs);
2850 }
2851
2852 void
2853 set_gdbarch_inner_than (struct gdbarch *gdbarch,
2854                         gdbarch_inner_than_ftype inner_than)
2855 {
2856   gdbarch->inner_than = inner_than;
2857 }
2858
2859 const unsigned char *
2860 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
2861 {
2862   gdb_assert (gdbarch != NULL);
2863   gdb_assert (gdbarch->breakpoint_from_pc != NULL);
2864   if (gdbarch_debug >= 2)
2865     fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
2866   return gdbarch->breakpoint_from_pc (pcptr, lenptr);
2867 }
2868
2869 void
2870 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
2871                                 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
2872 {
2873   gdbarch->breakpoint_from_pc = breakpoint_from_pc;
2874 }
2875
2876 int
2877 gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch)
2878 {
2879   gdb_assert (gdbarch != NULL);
2880   return gdbarch->adjust_breakpoint_address != NULL;
2881 }
2882
2883 CORE_ADDR
2884 gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr)
2885 {
2886   gdb_assert (gdbarch != NULL);
2887   gdb_assert (gdbarch->adjust_breakpoint_address != NULL);
2888   if (gdbarch_debug >= 2)
2889     fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_breakpoint_address called\n");
2890   return gdbarch->adjust_breakpoint_address (gdbarch, bpaddr);
2891 }
2892
2893 void
2894 set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch,
2895                                        gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address)
2896 {
2897   gdbarch->adjust_breakpoint_address = adjust_breakpoint_address;
2898 }
2899
2900 int
2901 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
2902 {
2903   gdb_assert (gdbarch != NULL);
2904   gdb_assert (gdbarch->memory_insert_breakpoint != NULL);
2905   if (gdbarch_debug >= 2)
2906     fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
2907   return gdbarch->memory_insert_breakpoint (addr, contents_cache);
2908 }
2909
2910 void
2911 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
2912                                       gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
2913 {
2914   gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
2915 }
2916
2917 int
2918 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
2919 {
2920   gdb_assert (gdbarch != NULL);
2921   gdb_assert (gdbarch->memory_remove_breakpoint != NULL);
2922   if (gdbarch_debug >= 2)
2923     fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
2924   return gdbarch->memory_remove_breakpoint (addr, contents_cache);
2925 }
2926
2927 void
2928 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
2929                                       gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
2930 {
2931   gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
2932 }
2933
2934 CORE_ADDR
2935 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
2936 {
2937   gdb_assert (gdbarch != NULL);
2938   /* Skip verify of decr_pc_after_break, invalid_p == 0 */
2939   if (gdbarch_debug >= 2)
2940     fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
2941   return gdbarch->decr_pc_after_break;
2942 }
2943
2944 void
2945 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
2946                                  CORE_ADDR decr_pc_after_break)
2947 {
2948   gdbarch->decr_pc_after_break = decr_pc_after_break;
2949 }
2950
2951 CORE_ADDR
2952 gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch)
2953 {
2954   gdb_assert (gdbarch != NULL);
2955   /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
2956   if (gdbarch_debug >= 2)
2957     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_function_start_offset called\n");
2958   return gdbarch->deprecated_function_start_offset;
2959 }
2960
2961 void
2962 set_gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch,
2963                                               CORE_ADDR deprecated_function_start_offset)
2964 {
2965   gdbarch->deprecated_function_start_offset = deprecated_function_start_offset;
2966 }
2967
2968 void
2969 gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len)
2970 {
2971   gdb_assert (gdbarch != NULL);
2972   gdb_assert (gdbarch->remote_translate_xfer_address != NULL);
2973   if (gdbarch_debug >= 2)
2974     fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
2975   gdbarch->remote_translate_xfer_address (gdbarch, regcache, gdb_addr, gdb_len, rem_addr, rem_len);
2976 }
2977
2978 void
2979 set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch,
2980                                            gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address)
2981 {
2982   gdbarch->remote_translate_xfer_address = remote_translate_xfer_address;
2983 }
2984
2985 CORE_ADDR
2986 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
2987 {
2988   gdb_assert (gdbarch != NULL);
2989   /* Skip verify of frame_args_skip, invalid_p == 0 */
2990   if (gdbarch_debug >= 2)
2991     fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
2992   return gdbarch->frame_args_skip;
2993 }
2994
2995 void
2996 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
2997                              CORE_ADDR frame_args_skip)
2998 {
2999   gdbarch->frame_args_skip = frame_args_skip;
3000 }
3001
3002 int
3003 gdbarch_unwind_pc_p (struct gdbarch *gdbarch)
3004 {
3005   gdb_assert (gdbarch != NULL);
3006   return gdbarch->unwind_pc != NULL;
3007 }
3008
3009 CORE_ADDR
3010 gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
3011 {
3012   gdb_assert (gdbarch != NULL);
3013   gdb_assert (gdbarch->unwind_pc != NULL);
3014   if (gdbarch_debug >= 2)
3015     fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n");
3016   return gdbarch->unwind_pc (gdbarch, next_frame);
3017 }
3018
3019 void
3020 set_gdbarch_unwind_pc (struct gdbarch *gdbarch,
3021                        gdbarch_unwind_pc_ftype unwind_pc)
3022 {
3023   gdbarch->unwind_pc = unwind_pc;
3024 }
3025
3026 int
3027 gdbarch_unwind_sp_p (struct gdbarch *gdbarch)
3028 {
3029   gdb_assert (gdbarch != NULL);
3030   return gdbarch->unwind_sp != NULL;
3031 }
3032
3033 CORE_ADDR
3034 gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
3035 {
3036   gdb_assert (gdbarch != NULL);
3037   gdb_assert (gdbarch->unwind_sp != NULL);
3038   if (gdbarch_debug >= 2)
3039     fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_sp called\n");
3040   return gdbarch->unwind_sp (gdbarch, next_frame);
3041 }
3042
3043 void
3044 set_gdbarch_unwind_sp (struct gdbarch *gdbarch,
3045                        gdbarch_unwind_sp_ftype unwind_sp)
3046 {
3047   gdbarch->unwind_sp = unwind_sp;
3048 }
3049
3050 int
3051 gdbarch_deprecated_saved_pc_after_call_p (struct gdbarch *gdbarch)
3052 {
3053   gdb_assert (gdbarch != NULL);
3054   return gdbarch->deprecated_saved_pc_after_call != NULL;
3055 }
3056
3057 CORE_ADDR
3058 gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame)
3059 {
3060   gdb_assert (gdbarch != NULL);
3061   gdb_assert (gdbarch->deprecated_saved_pc_after_call != NULL);
3062   if (gdbarch_debug >= 2)
3063     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_saved_pc_after_call called\n");
3064   return gdbarch->deprecated_saved_pc_after_call (frame);
3065 }
3066
3067 void
3068 set_gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch,
3069                                             gdbarch_deprecated_saved_pc_after_call_ftype deprecated_saved_pc_after_call)
3070 {
3071   gdbarch->deprecated_saved_pc_after_call = deprecated_saved_pc_after_call;
3072 }
3073
3074 int
3075 gdbarch_frame_num_args_p (struct gdbarch *gdbarch)
3076 {
3077   gdb_assert (gdbarch != NULL);
3078   return gdbarch->frame_num_args != NULL;
3079 }
3080
3081 int
3082 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
3083 {
3084   gdb_assert (gdbarch != NULL);
3085   gdb_assert (gdbarch->frame_num_args != NULL);
3086   if (gdbarch_debug >= 2)
3087     fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
3088   return gdbarch->frame_num_args (frame);
3089 }
3090
3091 void
3092 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
3093                             gdbarch_frame_num_args_ftype frame_num_args)
3094 {
3095   gdbarch->frame_num_args = frame_num_args;
3096 }
3097
3098 int
3099 gdbarch_deprecated_stack_align_p (struct gdbarch *gdbarch)
3100 {
3101   gdb_assert (gdbarch != NULL);
3102   return gdbarch->deprecated_stack_align != NULL;
3103 }
3104
3105 CORE_ADDR
3106 gdbarch_deprecated_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp)
3107 {
3108   gdb_assert (gdbarch != NULL);
3109   gdb_assert (gdbarch->deprecated_stack_align != NULL);
3110   if (gdbarch_debug >= 2)
3111     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_stack_align called\n");
3112   return gdbarch->deprecated_stack_align (sp);
3113 }
3114
3115 void
3116 set_gdbarch_deprecated_stack_align (struct gdbarch *gdbarch,
3117                                     gdbarch_deprecated_stack_align_ftype deprecated_stack_align)
3118 {
3119   gdbarch->deprecated_stack_align = deprecated_stack_align;
3120 }
3121
3122 int
3123 gdbarch_frame_align_p (struct gdbarch *gdbarch)
3124 {
3125   gdb_assert (gdbarch != NULL);
3126   return gdbarch->frame_align != NULL;
3127 }
3128
3129 CORE_ADDR
3130 gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
3131 {
3132   gdb_assert (gdbarch != NULL);
3133   gdb_assert (gdbarch->frame_align != NULL);
3134   if (gdbarch_debug >= 2)
3135     fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
3136   return gdbarch->frame_align (gdbarch, address);
3137 }
3138
3139 void
3140 set_gdbarch_frame_align (struct gdbarch *gdbarch,
3141                          gdbarch_frame_align_ftype frame_align)
3142 {
3143   gdbarch->frame_align = frame_align;
3144 }
3145
3146 int
3147 gdbarch_deprecated_reg_struct_has_addr_p (struct gdbarch *gdbarch)
3148 {
3149   gdb_assert (gdbarch != NULL);
3150   return gdbarch->deprecated_reg_struct_has_addr != NULL;
3151 }
3152
3153 int
3154 gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type)
3155 {
3156   gdb_assert (gdbarch != NULL);
3157   gdb_assert (gdbarch->deprecated_reg_struct_has_addr != NULL);
3158   if (gdbarch_debug >= 2)
3159     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_reg_struct_has_addr called\n");
3160   return gdbarch->deprecated_reg_struct_has_addr (gcc_p, type);
3161 }
3162
3163 void
3164 set_gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch,
3165                                             gdbarch_deprecated_reg_struct_has_addr_ftype deprecated_reg_struct_has_addr)
3166 {
3167   gdbarch->deprecated_reg_struct_has_addr = deprecated_reg_struct_has_addr;
3168 }
3169
3170 int
3171 gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type)
3172 {
3173   gdb_assert (gdbarch != NULL);
3174   gdb_assert (gdbarch->stabs_argument_has_addr != NULL);
3175   if (gdbarch_debug >= 2)
3176     fprintf_unfiltered (gdb_stdlog, "gdbarch_stabs_argument_has_addr called\n");
3177   return gdbarch->stabs_argument_has_addr (gdbarch, type);
3178 }
3179
3180 void
3181 set_gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch,
3182                                      gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr)
3183 {
3184   gdbarch->stabs_argument_has_addr = stabs_argument_has_addr;
3185 }
3186
3187 int
3188 gdbarch_frame_red_zone_size (struct gdbarch *gdbarch)
3189 {
3190   gdb_assert (gdbarch != NULL);
3191   if (gdbarch_debug >= 2)
3192     fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_red_zone_size called\n");
3193   return gdbarch->frame_red_zone_size;
3194 }
3195
3196 void
3197 set_gdbarch_frame_red_zone_size (struct gdbarch *gdbarch,
3198                                  int frame_red_zone_size)
3199 {
3200   gdbarch->frame_red_zone_size = frame_red_zone_size;
3201 }
3202
3203 const struct floatformat *
3204 gdbarch_float_format (struct gdbarch *gdbarch)
3205 {
3206   gdb_assert (gdbarch != NULL);
3207   if (gdbarch_debug >= 2)
3208     fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
3209   return gdbarch->float_format;
3210 }
3211
3212 void
3213 set_gdbarch_float_format (struct gdbarch *gdbarch,
3214                           const struct floatformat * float_format)
3215 {
3216   gdbarch->float_format = float_format;
3217 }
3218
3219 const struct floatformat *
3220 gdbarch_double_format (struct gdbarch *gdbarch)
3221 {
3222   gdb_assert (gdbarch != NULL);
3223   if (gdbarch_debug >= 2)
3224     fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
3225   return gdbarch->double_format;
3226 }
3227
3228 void
3229 set_gdbarch_double_format (struct gdbarch *gdbarch,
3230                            const struct floatformat * double_format)
3231 {
3232   gdbarch->double_format = double_format;
3233 }
3234
3235 const struct floatformat *
3236 gdbarch_long_double_format (struct gdbarch *gdbarch)
3237 {
3238   gdb_assert (gdbarch != NULL);
3239   if (gdbarch_debug >= 2)
3240     fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
3241   return gdbarch->long_double_format;
3242 }
3243
3244 void
3245 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
3246                                 const struct floatformat * long_double_format)
3247 {
3248   gdbarch->long_double_format = long_double_format;
3249 }
3250
3251 CORE_ADDR
3252 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
3253 {
3254   gdb_assert (gdbarch != NULL);
3255   gdb_assert (gdbarch->convert_from_func_ptr_addr != NULL);
3256   if (gdbarch_debug >= 2)
3257     fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
3258   return gdbarch->convert_from_func_ptr_addr (gdbarch, addr, targ);
3259 }
3260
3261 void
3262 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
3263                                         gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
3264 {
3265   gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
3266 }
3267
3268 CORE_ADDR
3269 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
3270 {
3271   gdb_assert (gdbarch != NULL);
3272   gdb_assert (gdbarch->addr_bits_remove != NULL);
3273   if (gdbarch_debug >= 2)
3274     fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
3275   return gdbarch->addr_bits_remove (addr);
3276 }
3277
3278 void
3279 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
3280                               gdbarch_addr_bits_remove_ftype addr_bits_remove)
3281 {
3282   gdbarch->addr_bits_remove = addr_bits_remove;
3283 }
3284
3285 CORE_ADDR
3286 gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr)
3287 {
3288   gdb_assert (gdbarch != NULL);
3289   gdb_assert (gdbarch->smash_text_address != NULL);
3290   if (gdbarch_debug >= 2)
3291     fprintf_unfiltered (gdb_stdlog, "gdbarch_smash_text_address called\n");
3292   return gdbarch->smash_text_address (addr);
3293 }
3294
3295 void
3296 set_gdbarch_smash_text_address (struct gdbarch *gdbarch,
3297                                 gdbarch_smash_text_address_ftype smash_text_address)
3298 {
3299   gdbarch->smash_text_address = smash_text_address;
3300 }
3301
3302 int
3303 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
3304 {
3305   gdb_assert (gdbarch != NULL);
3306   return gdbarch->software_single_step != NULL;
3307 }
3308
3309 void
3310 gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p)
3311 {
3312   gdb_assert (gdbarch != NULL);
3313   gdb_assert (gdbarch->software_single_step != NULL);
3314   if (gdbarch_debug >= 2)
3315     fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
3316   gdbarch->software_single_step (sig, insert_breakpoints_p);
3317 }
3318
3319 void
3320 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
3321                                   gdbarch_software_single_step_ftype software_single_step)
3322 {
3323   gdbarch->software_single_step = software_single_step;
3324 }
3325
3326 int
3327 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info)
3328 {
3329   gdb_assert (gdbarch != NULL);
3330   gdb_assert (gdbarch->print_insn != NULL);
3331   if (gdbarch_debug >= 2)
3332     fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
3333   return gdbarch->print_insn (vma, info);
3334 }
3335
3336 void
3337 set_gdbarch_print_insn (struct gdbarch *gdbarch,
3338                         gdbarch_print_insn_ftype print_insn)
3339 {
3340   gdbarch->print_insn = print_insn;
3341 }
3342
3343 CORE_ADDR
3344 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc)
3345 {
3346   gdb_assert (gdbarch != NULL);
3347   gdb_assert (gdbarch->skip_trampoline_code != NULL);
3348   if (gdbarch_debug >= 2)
3349     fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
3350   return gdbarch->skip_trampoline_code (pc);
3351 }
3352
3353 void
3354 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
3355                                   gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
3356 {
3357   gdbarch->skip_trampoline_code = skip_trampoline_code;
3358 }
3359
3360 CORE_ADDR
3361 gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
3362 {
3363   gdb_assert (gdbarch != NULL);
3364   gdb_assert (gdbarch->skip_solib_resolver != NULL);
3365   if (gdbarch_debug >= 2)
3366     fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_solib_resolver called\n");
3367   return gdbarch->skip_solib_resolver (gdbarch, pc);
3368 }
3369
3370 void
3371 set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch,
3372                                  gdbarch_skip_solib_resolver_ftype skip_solib_resolver)
3373 {
3374   gdbarch->skip_solib_resolver = skip_solib_resolver;
3375 }
3376
3377 int
3378 gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
3379 {
3380   gdb_assert (gdbarch != NULL);
3381   gdb_assert (gdbarch->in_solib_call_trampoline != NULL);
3382   if (gdbarch_debug >= 2)
3383     fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_call_trampoline called\n");
3384   return gdbarch->in_solib_call_trampoline (pc, name);
3385 }
3386
3387 void
3388 set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch,
3389                                       gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline)
3390 {
3391   gdbarch->in_solib_call_trampoline = in_solib_call_trampoline;
3392 }
3393
3394 int
3395 gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
3396 {
3397   gdb_assert (gdbarch != NULL);
3398   gdb_assert (gdbarch->in_solib_return_trampoline != NULL);
3399   if (gdbarch_debug >= 2)
3400     fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
3401   return gdbarch->in_solib_return_trampoline (pc, name);
3402 }
3403
3404 void
3405 set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
3406                                         gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
3407 {
3408   gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
3409 }
3410
3411 int
3412 gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
3413 {
3414   gdb_assert (gdbarch != NULL);
3415   gdb_assert (gdbarch->in_function_epilogue_p != NULL);
3416   if (gdbarch_debug >= 2)
3417     fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n");
3418   return gdbarch->in_function_epilogue_p (gdbarch, addr);
3419 }
3420
3421 void
3422 set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch,
3423                                     gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p)
3424 {
3425   gdbarch->in_function_epilogue_p = in_function_epilogue_p;
3426 }
3427
3428 char *
3429 gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv)
3430 {
3431   gdb_assert (gdbarch != NULL);
3432   gdb_assert (gdbarch->construct_inferior_arguments != NULL);
3433   if (gdbarch_debug >= 2)
3434     fprintf_unfiltered (gdb_stdlog, "gdbarch_construct_inferior_arguments called\n");
3435   return gdbarch->construct_inferior_arguments (gdbarch, argc, argv);
3436 }
3437
3438 void
3439 set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch,
3440                                           gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments)
3441 {
3442   gdbarch->construct_inferior_arguments = construct_inferior_arguments;
3443 }
3444
3445 void
3446 gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
3447 {
3448   gdb_assert (gdbarch != NULL);
3449   gdb_assert (gdbarch->elf_make_msymbol_special != NULL);
3450   if (gdbarch_debug >= 2)
3451     fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
3452   gdbarch->elf_make_msymbol_special (sym, msym);
3453 }
3454
3455 void
3456 set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
3457                                       gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
3458 {
3459   gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
3460 }
3461
3462 void
3463 gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
3464 {
3465   gdb_assert (gdbarch != NULL);
3466   gdb_assert (gdbarch->coff_make_msymbol_special != NULL);
3467   if (gdbarch_debug >= 2)
3468     fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
3469   gdbarch->coff_make_msymbol_special (val, msym);
3470 }
3471
3472 void
3473 set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
3474                                        gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
3475 {
3476   gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
3477 }
3478
3479 const char *
3480 gdbarch_name_of_malloc (struct gdbarch *gdbarch)
3481 {
3482   gdb_assert (gdbarch != NULL);
3483   /* Skip verify of name_of_malloc, invalid_p == 0 */
3484   if (gdbarch_debug >= 2)
3485     fprintf_unfiltered (gdb_stdlog, "gdbarch_name_of_malloc called\n");
3486   return gdbarch->name_of_malloc;
3487 }
3488
3489 void
3490 set_gdbarch_name_of_malloc (struct gdbarch *gdbarch,
3491                             const char * name_of_malloc)
3492 {
3493   gdbarch->name_of_malloc = name_of_malloc;
3494 }
3495
3496 int
3497 gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
3498 {
3499   gdb_assert (gdbarch != NULL);
3500   /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
3501   if (gdbarch_debug >= 2)
3502     fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
3503   return gdbarch->cannot_step_breakpoint;
3504 }
3505
3506 void
3507 set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
3508                                     int cannot_step_breakpoint)
3509 {
3510   gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
3511 }
3512
3513 int
3514 gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
3515 {
3516   gdb_assert (gdbarch != NULL);
3517   /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
3518   if (gdbarch_debug >= 2)
3519     fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
3520   return gdbarch->have_nonsteppable_watchpoint;
3521 }
3522
3523 void
3524 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
3525                                           int have_nonsteppable_watchpoint)
3526 {
3527   gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
3528 }
3529
3530 int
3531 gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
3532 {
3533   gdb_assert (gdbarch != NULL);
3534   return gdbarch->address_class_type_flags != NULL;
3535 }
3536
3537 int
3538 gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
3539 {
3540   gdb_assert (gdbarch != NULL);
3541   gdb_assert (gdbarch->address_class_type_flags != NULL);
3542   if (gdbarch_debug >= 2)
3543     fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
3544   return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
3545 }
3546
3547 void
3548 set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
3549                                       gdbarch_address_class_type_flags_ftype address_class_type_flags)
3550 {
3551   gdbarch->address_class_type_flags = address_class_type_flags;
3552 }
3553
3554 int
3555 gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
3556 {
3557   gdb_assert (gdbarch != NULL);
3558   return gdbarch->address_class_type_flags_to_name != NULL;
3559 }
3560
3561 const char *
3562 gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
3563 {
3564   gdb_assert (gdbarch != NULL);
3565   gdb_assert (gdbarch->address_class_type_flags_to_name != NULL);
3566   if (gdbarch_debug >= 2)
3567     fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
3568   return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
3569 }
3570
3571 void
3572 set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
3573                                               gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
3574 {
3575   gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
3576 }
3577
3578 int
3579 gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
3580 {
3581   gdb_assert (gdbarch != NULL);
3582   return gdbarch->address_class_name_to_type_flags != NULL;
3583 }
3584
3585 int
3586 gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
3587 {
3588   gdb_assert (gdbarch != NULL);
3589   gdb_assert (gdbarch->address_class_name_to_type_flags != NULL);
3590   if (gdbarch_debug >= 2)
3591     fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
3592   return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
3593 }
3594
3595 void
3596 set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
3597                                               gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
3598 {
3599   gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
3600 }
3601
3602 int
3603 gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
3604 {
3605   gdb_assert (gdbarch != NULL);
3606   gdb_assert (gdbarch->register_reggroup_p != NULL);
3607   if (gdbarch_debug >= 2)
3608     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
3609   return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
3610 }
3611
3612 void
3613 set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
3614                                  gdbarch_register_reggroup_p_ftype register_reggroup_p)
3615 {
3616   gdbarch->register_reggroup_p = register_reggroup_p;
3617 }
3618
3619 int
3620 gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch)
3621 {
3622   gdb_assert (gdbarch != NULL);
3623   return gdbarch->fetch_pointer_argument != NULL;
3624 }
3625
3626 CORE_ADDR
3627 gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type)
3628 {
3629   gdb_assert (gdbarch != NULL);
3630   gdb_assert (gdbarch->fetch_pointer_argument != NULL);
3631   if (gdbarch_debug >= 2)
3632     fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n");
3633   return gdbarch->fetch_pointer_argument (frame, argi, type);
3634 }
3635
3636 void
3637 set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch,
3638                                     gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument)
3639 {
3640   gdbarch->fetch_pointer_argument = fetch_pointer_argument;
3641 }
3642
3643 int
3644 gdbarch_regset_from_core_section_p (struct gdbarch *gdbarch)
3645 {
3646   gdb_assert (gdbarch != NULL);
3647   return gdbarch->regset_from_core_section != NULL;
3648 }
3649
3650 const struct regset *
3651 gdbarch_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size)
3652 {
3653   gdb_assert (gdbarch != NULL);
3654   gdb_assert (gdbarch->regset_from_core_section != NULL);
3655   if (gdbarch_debug >= 2)
3656     fprintf_unfiltered (gdb_stdlog, "gdbarch_regset_from_core_section called\n");
3657   return gdbarch->regset_from_core_section (gdbarch, sect_name, sect_size);
3658 }
3659
3660 void
3661 set_gdbarch_regset_from_core_section (struct gdbarch *gdbarch,
3662                                       gdbarch_regset_from_core_section_ftype regset_from_core_section)
3663 {
3664   gdbarch->regset_from_core_section = regset_from_core_section;
3665 }
3666
3667
3668 /* Keep a registry of per-architecture data-pointers required by GDB
3669    modules. */
3670
3671 struct gdbarch_data
3672 {
3673   unsigned index;
3674   int init_p;
3675   gdbarch_data_pre_init_ftype *pre_init;
3676   gdbarch_data_post_init_ftype *post_init;
3677 };
3678
3679 struct gdbarch_data_registration
3680 {
3681   struct gdbarch_data *data;
3682   struct gdbarch_data_registration *next;
3683 };
3684
3685 struct gdbarch_data_registry
3686 {
3687   unsigned nr;
3688   struct gdbarch_data_registration *registrations;
3689 };
3690
3691 struct gdbarch_data_registry gdbarch_data_registry =
3692 {
3693   0, NULL,
3694 };
3695
3696 static struct gdbarch_data *
3697 gdbarch_data_register (gdbarch_data_pre_init_ftype *pre_init,
3698                        gdbarch_data_post_init_ftype *post_init)
3699 {
3700   struct gdbarch_data_registration **curr;
3701   /* Append the new registraration.  */
3702   for (curr = &gdbarch_data_registry.registrations;
3703        (*curr) != NULL;
3704        curr = &(*curr)->next);
3705   (*curr) = XMALLOC (struct gdbarch_data_registration);
3706   (*curr)->next = NULL;
3707   (*curr)->data = XMALLOC (struct gdbarch_data);
3708   (*curr)->data->index = gdbarch_data_registry.nr++;
3709   (*curr)->data->pre_init = pre_init;
3710   (*curr)->data->post_init = post_init;
3711   (*curr)->data->init_p = 1;
3712   return (*curr)->data;
3713 }
3714
3715 struct gdbarch_data *
3716 gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype *pre_init)
3717 {
3718   return gdbarch_data_register (pre_init, NULL);
3719 }
3720
3721 struct gdbarch_data *
3722 gdbarch_data_register_post_init (gdbarch_data_post_init_ftype *post_init)
3723 {
3724   return gdbarch_data_register (NULL, post_init);
3725 }
3726
3727 /* Create/delete the gdbarch data vector. */
3728
3729 static void
3730 alloc_gdbarch_data (struct gdbarch *gdbarch)
3731 {
3732   gdb_assert (gdbarch->data == NULL);
3733   gdbarch->nr_data = gdbarch_data_registry.nr;
3734   gdbarch->data = GDBARCH_OBSTACK_CALLOC (gdbarch, gdbarch->nr_data, void *);
3735 }
3736
3737 /* Initialize the current value of the specified per-architecture
3738    data-pointer. */
3739
3740 void
3741 deprecated_set_gdbarch_data (struct gdbarch *gdbarch,
3742                              struct gdbarch_data *data,
3743                              void *pointer)
3744 {
3745   gdb_assert (data->index < gdbarch->nr_data);
3746   gdb_assert (gdbarch->data[data->index] == NULL);
3747   gdb_assert (data->pre_init == NULL);
3748   gdbarch->data[data->index] = pointer;
3749 }
3750
3751 /* Return the current value of the specified per-architecture
3752    data-pointer. */
3753
3754 void *
3755 gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
3756 {
3757   gdb_assert (data->index < gdbarch->nr_data);
3758   if (gdbarch->data[data->index] == NULL)
3759     {
3760       /* The data-pointer isn't initialized, call init() to get a
3761          value.  */
3762       if (data->pre_init != NULL)
3763         /* Mid architecture creation: pass just the obstack, and not
3764            the entire architecture, as that way it isn't possible for
3765            pre-init code to refer to undefined architecture
3766            fields.  */
3767         gdbarch->data[data->index] = data->pre_init (gdbarch->obstack);
3768       else if (gdbarch->initialized_p
3769                && data->post_init != NULL)
3770         /* Post architecture creation: pass the entire architecture
3771            (as all fields are valid), but be careful to also detect
3772            recursive references.  */
3773         {
3774           gdb_assert (data->init_p);
3775           data->init_p = 0;
3776           gdbarch->data[data->index] = data->post_init (gdbarch);
3777           data->init_p = 1;
3778         }
3779       else
3780         /* The architecture initialization hasn't completed - punt -
3781          hope that the caller knows what they are doing.  Once
3782          deprecated_set_gdbarch_data has been initialized, this can be
3783          changed to an internal error.  */
3784         return NULL;
3785       gdb_assert (gdbarch->data[data->index] != NULL);
3786     }
3787   return gdbarch->data[data->index];
3788 }
3789
3790
3791
3792 /* Keep a registry of swapped data required by GDB modules. */
3793
3794 struct gdbarch_swap
3795 {
3796   void *swap;
3797   struct gdbarch_swap_registration *source;
3798   struct gdbarch_swap *next;
3799 };
3800
3801 struct gdbarch_swap_registration
3802 {
3803   void *data;
3804   unsigned long sizeof_data;
3805   gdbarch_swap_ftype *init;
3806   struct gdbarch_swap_registration *next;
3807 };
3808
3809 struct gdbarch_swap_registry
3810 {
3811   int nr;
3812   struct gdbarch_swap_registration *registrations;
3813 };
3814
3815 struct gdbarch_swap_registry gdbarch_swap_registry = 
3816 {
3817   0, NULL,
3818 };
3819
3820 void
3821 deprecated_register_gdbarch_swap (void *data,
3822                                   unsigned long sizeof_data,
3823                                   gdbarch_swap_ftype *init)
3824 {
3825   struct gdbarch_swap_registration **rego;
3826   for (rego = &gdbarch_swap_registry.registrations;
3827        (*rego) != NULL;
3828        rego = &(*rego)->next);
3829   (*rego) = XMALLOC (struct gdbarch_swap_registration);
3830   (*rego)->next = NULL;
3831   (*rego)->init = init;
3832   (*rego)->data = data;
3833   (*rego)->sizeof_data = sizeof_data;
3834 }
3835
3836 static void
3837 current_gdbarch_swap_init_hack (void)
3838 {
3839   struct gdbarch_swap_registration *rego;
3840   struct gdbarch_swap **curr = &current_gdbarch->swap;
3841   for (rego = gdbarch_swap_registry.registrations;
3842        rego != NULL;
3843        rego = rego->next)
3844     {
3845       if (rego->data != NULL)
3846         {
3847           (*curr) = GDBARCH_OBSTACK_ZALLOC (current_gdbarch,
3848                                             struct gdbarch_swap);
3849           (*curr)->source = rego;
3850           (*curr)->swap = gdbarch_obstack_zalloc (current_gdbarch,
3851                                                   rego->sizeof_data);
3852           (*curr)->next = NULL;
3853           curr = &(*curr)->next;
3854         }
3855       if (rego->init != NULL)
3856         rego->init ();
3857     }
3858 }
3859
3860 static struct gdbarch *
3861 current_gdbarch_swap_out_hack (void)
3862 {
3863   struct gdbarch *old_gdbarch = current_gdbarch;
3864   struct gdbarch_swap *curr;
3865
3866   gdb_assert (old_gdbarch != NULL);
3867   for (curr = old_gdbarch->swap;
3868        curr != NULL;
3869        curr = curr->next)
3870     {
3871       memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
3872       memset (curr->source->data, 0, curr->source->sizeof_data);
3873     }
3874   current_gdbarch = NULL;
3875   return old_gdbarch;
3876 }
3877
3878 static void
3879 current_gdbarch_swap_in_hack (struct gdbarch *new_gdbarch)
3880 {
3881   struct gdbarch_swap *curr;
3882
3883   gdb_assert (current_gdbarch == NULL);
3884   for (curr = new_gdbarch->swap;
3885        curr != NULL;
3886        curr = curr->next)
3887     memcpy (curr->source->data, curr->swap, curr->source->sizeof_data);
3888   current_gdbarch = new_gdbarch;
3889 }
3890
3891
3892 /* Keep a registry of the architectures known by GDB. */
3893
3894 struct gdbarch_registration
3895 {
3896   enum bfd_architecture bfd_architecture;
3897   gdbarch_init_ftype *init;
3898   gdbarch_dump_tdep_ftype *dump_tdep;
3899   struct gdbarch_list *arches;
3900   struct gdbarch_registration *next;
3901 };
3902
3903 static struct gdbarch_registration *gdbarch_registry = NULL;
3904
3905 static void
3906 append_name (const char ***buf, int *nr, const char *name)
3907 {
3908   *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
3909   (*buf)[*nr] = name;
3910   *nr += 1;
3911 }
3912
3913 const char **
3914 gdbarch_printable_names (void)
3915 {
3916   /* Accumulate a list of names based on the registed list of
3917      architectures. */
3918   enum bfd_architecture a;
3919   int nr_arches = 0;
3920   const char **arches = NULL;
3921   struct gdbarch_registration *rego;
3922   for (rego = gdbarch_registry;
3923        rego != NULL;
3924        rego = rego->next)
3925     {
3926       const struct bfd_arch_info *ap;
3927       ap = bfd_lookup_arch (rego->bfd_architecture, 0);
3928       if (ap == NULL)
3929         internal_error (__FILE__, __LINE__,
3930                         "gdbarch_architecture_names: multi-arch unknown");
3931       do
3932         {
3933           append_name (&arches, &nr_arches, ap->printable_name);
3934           ap = ap->next;
3935         }
3936       while (ap != NULL);
3937     }
3938   append_name (&arches, &nr_arches, NULL);
3939   return arches;
3940 }
3941
3942
3943 void
3944 gdbarch_register (enum bfd_architecture bfd_architecture,
3945                   gdbarch_init_ftype *init,
3946                   gdbarch_dump_tdep_ftype *dump_tdep)
3947 {
3948   struct gdbarch_registration **curr;
3949   const struct bfd_arch_info *bfd_arch_info;
3950   /* Check that BFD recognizes this architecture */
3951   bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
3952   if (bfd_arch_info == NULL)
3953     {
3954       internal_error (__FILE__, __LINE__,
3955                       "gdbarch: Attempt to register unknown architecture (%d)",
3956                       bfd_architecture);
3957     }
3958   /* Check that we haven't seen this architecture before */
3959   for (curr = &gdbarch_registry;
3960        (*curr) != NULL;
3961        curr = &(*curr)->next)
3962     {
3963       if (bfd_architecture == (*curr)->bfd_architecture)
3964         internal_error (__FILE__, __LINE__,
3965                         "gdbarch: Duplicate registraration of architecture (%s)",
3966                         bfd_arch_info->printable_name);
3967     }
3968   /* log it */
3969   if (gdbarch_debug)
3970     fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n",
3971                         bfd_arch_info->printable_name,
3972                         (long) init);
3973   /* Append it */
3974   (*curr) = XMALLOC (struct gdbarch_registration);
3975   (*curr)->bfd_architecture = bfd_architecture;
3976   (*curr)->init = init;
3977   (*curr)->dump_tdep = dump_tdep;
3978   (*curr)->arches = NULL;
3979   (*curr)->next = NULL;
3980 }
3981
3982 void
3983 register_gdbarch_init (enum bfd_architecture bfd_architecture,
3984                        gdbarch_init_ftype *init)
3985 {
3986   gdbarch_register (bfd_architecture, init, NULL);
3987 }
3988
3989
3990 /* Look for an architecture using gdbarch_info.  Base search on only
3991    BFD_ARCH_INFO and BYTE_ORDER. */
3992
3993 struct gdbarch_list *
3994 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
3995                              const struct gdbarch_info *info)
3996 {
3997   for (; arches != NULL; arches = arches->next)
3998     {
3999       if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
4000         continue;
4001       if (info->byte_order != arches->gdbarch->byte_order)
4002         continue;
4003       if (info->osabi != arches->gdbarch->osabi)
4004         continue;
4005       return arches;
4006     }
4007   return NULL;
4008 }
4009
4010
4011 /* Find an architecture that matches the specified INFO.  Create a new
4012    architecture if needed.  Return that new architecture.  Assumes
4013    that there is no current architecture.  */
4014
4015 static struct gdbarch *
4016 find_arch_by_info (struct gdbarch *old_gdbarch, struct gdbarch_info info)
4017 {
4018   struct gdbarch *new_gdbarch;
4019   struct gdbarch_registration *rego;
4020
4021   /* The existing architecture has been swapped out - all this code
4022      works from a clean slate.  */
4023   gdb_assert (current_gdbarch == NULL);
4024
4025   /* Fill in missing parts of the INFO struct using a number of
4026      sources: "set ..."; INFOabfd supplied; and the existing
4027      architecture.  */
4028   gdbarch_info_fill (old_gdbarch, &info);
4029
4030   /* Must have found some sort of architecture. */
4031   gdb_assert (info.bfd_arch_info != NULL);
4032
4033   if (gdbarch_debug)
4034     {
4035       fprintf_unfiltered (gdb_stdlog,
4036                           "find_arch_by_info: info.bfd_arch_info %s\n",
4037                           (info.bfd_arch_info != NULL
4038                            ? info.bfd_arch_info->printable_name
4039                            : "(null)"));
4040       fprintf_unfiltered (gdb_stdlog,
4041                           "find_arch_by_info: info.byte_order %d (%s)\n",
4042                           info.byte_order,
4043                           (info.byte_order == BFD_ENDIAN_BIG ? "big"
4044                            : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
4045                            : "default"));
4046       fprintf_unfiltered (gdb_stdlog,
4047                           "find_arch_by_info: info.osabi %d (%s)\n",
4048                           info.osabi, gdbarch_osabi_name (info.osabi));
4049       fprintf_unfiltered (gdb_stdlog,
4050                           "find_arch_by_info: info.abfd 0x%lx\n",
4051                           (long) info.abfd);
4052       fprintf_unfiltered (gdb_stdlog,
4053                           "find_arch_by_info: info.tdep_info 0x%lx\n",
4054                           (long) info.tdep_info);
4055     }
4056
4057   /* Find the tdep code that knows about this architecture.  */
4058   for (rego = gdbarch_registry;
4059        rego != NULL;
4060        rego = rego->next)
4061     if (rego->bfd_architecture == info.bfd_arch_info->arch)
4062       break;
4063   if (rego == NULL)
4064     {
4065       if (gdbarch_debug)
4066         fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
4067                             "No matching architecture\n");
4068       return 0;
4069     }
4070
4071   /* Ask the tdep code for an architecture that matches "info".  */
4072   new_gdbarch = rego->init (info, rego->arches);
4073
4074   /* Did the tdep code like it?  No.  Reject the change and revert to
4075      the old architecture.  */
4076   if (new_gdbarch == NULL)
4077     {
4078       if (gdbarch_debug)
4079         fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
4080                             "Target rejected architecture\n");
4081       return NULL;
4082     }
4083
4084   /* Is this a pre-existing architecture (as determined by already
4085      being initialized)?  Move it to the front of the architecture
4086      list (keeping the list sorted Most Recently Used).  */
4087   if (new_gdbarch->initialized_p)
4088     {
4089       struct gdbarch_list **list;
4090       struct gdbarch_list *this;
4091       if (gdbarch_debug)
4092         fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
4093                             "Previous architecture 0x%08lx (%s) selected\n",
4094                             (long) new_gdbarch,
4095                             new_gdbarch->bfd_arch_info->printable_name);
4096       /* Find the existing arch in the list.  */
4097       for (list = &rego->arches;
4098            (*list) != NULL && (*list)->gdbarch != new_gdbarch;
4099            list = &(*list)->next);
4100       /* It had better be in the list of architectures.  */
4101       gdb_assert ((*list) != NULL && (*list)->gdbarch == new_gdbarch);
4102       /* Unlink THIS.  */
4103       this = (*list);
4104       (*list) = this->next;
4105       /* Insert THIS at the front.  */
4106       this->next = rego->arches;
4107       rego->arches = this;
4108       /* Return it.  */
4109       return new_gdbarch;
4110     }
4111
4112   /* It's a new architecture.  */
4113   if (gdbarch_debug)
4114     fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
4115                         "New architecture 0x%08lx (%s) selected\n",
4116                         (long) new_gdbarch,
4117                         new_gdbarch->bfd_arch_info->printable_name);
4118   
4119   /* Insert the new architecture into the front of the architecture
4120      list (keep the list sorted Most Recently Used).  */
4121   {
4122     struct gdbarch_list *this = XMALLOC (struct gdbarch_list);
4123     this->next = rego->arches;
4124     this->gdbarch = new_gdbarch;
4125     rego->arches = this;
4126   }    
4127
4128   /* Check that the newly installed architecture is valid.  Plug in
4129      any post init values.  */
4130   new_gdbarch->dump_tdep = rego->dump_tdep;
4131   verify_gdbarch (new_gdbarch);
4132   new_gdbarch->initialized_p = 1;
4133
4134   /* Initialize any per-architecture swap areas.  This phase requires
4135      a valid global CURRENT_GDBARCH.  Set it momentarially, and then
4136      swap the entire architecture out.  */
4137   current_gdbarch = new_gdbarch;
4138   current_gdbarch_swap_init_hack ();
4139   current_gdbarch_swap_out_hack ();
4140
4141   if (gdbarch_debug)
4142     gdbarch_dump (new_gdbarch, gdb_stdlog);
4143
4144   return new_gdbarch;
4145 }
4146
4147 struct gdbarch *
4148 gdbarch_find_by_info (struct gdbarch_info info)
4149 {
4150   /* Save the previously selected architecture, setting the global to
4151      NULL.  This stops things like gdbarch->init() trying to use the
4152      previous architecture's configuration.  The previous architecture
4153      may not even be of the same architecture family.  The most recent
4154      architecture of the same family is found at the head of the
4155      rego->arches list.  */
4156   struct gdbarch *old_gdbarch = current_gdbarch_swap_out_hack ();
4157
4158   /* Find the specified architecture.  */
4159   struct gdbarch *new_gdbarch = find_arch_by_info (old_gdbarch, info);
4160
4161   /* Restore the existing architecture.  */
4162   gdb_assert (current_gdbarch == NULL);
4163   current_gdbarch_swap_in_hack (old_gdbarch);
4164
4165   return new_gdbarch;
4166 }
4167
4168 /* Make the specified architecture current, swapping the existing one
4169    out.  */
4170
4171 void
4172 deprecated_current_gdbarch_select_hack (struct gdbarch *new_gdbarch)
4173 {
4174   gdb_assert (new_gdbarch != NULL);
4175   gdb_assert (current_gdbarch != NULL);
4176   gdb_assert (new_gdbarch->initialized_p);
4177   current_gdbarch_swap_out_hack ();
4178   current_gdbarch_swap_in_hack (new_gdbarch);
4179   architecture_changed_event ();
4180 }
4181
4182 extern void _initialize_gdbarch (void);
4183
4184 void
4185 _initialize_gdbarch (void)
4186 {
4187   struct cmd_list_element *c;
4188
4189   deprecated_add_show_from_set
4190     (add_set_cmd ("arch",
4191                   class_maintenance,
4192                   var_zinteger,
4193                   (char *)&gdbarch_debug,
4194                   "Set architecture debugging.\n\
4195 When non-zero, architecture debugging is enabled.", &setdebuglist),
4196      &showdebuglist);
4197   c = add_set_cmd ("archdebug",
4198                    class_maintenance,
4199                    var_zinteger,
4200                    (char *)&gdbarch_debug,
4201                    "Set architecture debugging.\n\
4202 When non-zero, architecture debugging is enabled.", &setlist);
4203
4204   deprecate_cmd (c, "set debug arch");
4205   deprecate_cmd (deprecated_add_show_from_set (c, &showlist), "show debug arch");
4206 }