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