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