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