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