Corrected spelling error in comment: swaped -> swapped.
[external/binutils.git] / gdb / gdbarch.c
1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
2
3 /* Dynamic architecture support for GDB, the GNU debugger.
4    Copyright 1998-1999, 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 #endif
59 #include "symcat.h"
60
61 #include "floatformat.h"
62
63 /* Static function declarations */
64
65 static void verify_gdbarch (struct gdbarch *gdbarch);
66 static void init_gdbarch_data (struct gdbarch *);
67 static void init_gdbarch_swap (struct gdbarch *);
68 static void swapout_gdbarch_swap (struct gdbarch *);
69 static void swapin_gdbarch_swap (struct gdbarch *);
70
71 /* Convenience macro for allocting typesafe memory. */
72
73 #ifndef XMALLOC
74 #define XMALLOC(TYPE) (TYPE*) xmalloc (sizeof (TYPE))
75 #endif
76
77
78 /* Non-zero if we want to trace architecture code.  */
79
80 #ifndef GDBARCH_DEBUG
81 #define GDBARCH_DEBUG 0
82 #endif
83 int gdbarch_debug = GDBARCH_DEBUG;
84
85
86 /* Maintain the struct gdbarch object */
87
88 struct gdbarch
89 {
90   /* basic architectural information */
91   const struct bfd_arch_info * bfd_arch_info;
92   int byte_order;
93
94   /* target specific vector. */
95   struct gdbarch_tdep *tdep;
96   gdbarch_dump_tdep_ftype *dump_tdep;
97
98   /* per-architecture data-pointers */
99   int nr_data;
100   void **data;
101
102   /* per-architecture swap-regions */
103   struct gdbarch_swap *swap;
104
105   /* Multi-arch values.
106
107      When extending this structure you must:
108
109      Add the field below.
110
111      Declare set/get functions and define the corresponding
112      macro in gdbarch.h.
113
114      gdbarch_alloc(): If zero/NULL is not a suitable default,
115      initialize the new field.
116
117      verify_gdbarch(): Confirm that the target updated the field
118      correctly.
119
120      gdbarch_dump(): Add a fprintf_unfiltered call to so that the new
121      field is dumped out
122
123      ``startup_gdbarch()'': Append an initial value to the static
124      variable (base values on the host's c-type system).
125
126      get_gdbarch(): Implement the set/get functions (probably using
127      the macro's as shortcuts).
128
129      */
130
131   int short_bit;
132   int int_bit;
133   int long_bit;
134   int long_long_bit;
135   int float_bit;
136   int double_bit;
137   int long_double_bit;
138   int ptr_bit;
139   int addr_bit;
140   int bfd_vma_bit;
141   int ieee_float;
142   gdbarch_read_pc_ftype *read_pc;
143   gdbarch_write_pc_ftype *write_pc;
144   gdbarch_read_fp_ftype *read_fp;
145   gdbarch_write_fp_ftype *write_fp;
146   gdbarch_read_sp_ftype *read_sp;
147   gdbarch_write_sp_ftype *write_sp;
148   int num_regs;
149   int num_pseudo_regs;
150   int sp_regnum;
151   int fp_regnum;
152   int pc_regnum;
153   int fp0_regnum;
154   int npc_regnum;
155   int nnpc_regnum;
156   gdbarch_register_name_ftype *register_name;
157   int register_size;
158   int register_bytes;
159   gdbarch_register_byte_ftype *register_byte;
160   gdbarch_register_raw_size_ftype *register_raw_size;
161   int max_register_raw_size;
162   gdbarch_register_virtual_size_ftype *register_virtual_size;
163   int max_register_virtual_size;
164   gdbarch_register_virtual_type_ftype *register_virtual_type;
165   gdbarch_do_registers_info_ftype *do_registers_info;
166   gdbarch_register_sim_regno_ftype *register_sim_regno;
167   int use_generic_dummy_frames;
168   int call_dummy_location;
169   gdbarch_call_dummy_address_ftype *call_dummy_address;
170   CORE_ADDR call_dummy_start_offset;
171   CORE_ADDR call_dummy_breakpoint_offset;
172   int call_dummy_breakpoint_offset_p;
173   int call_dummy_length;
174   gdbarch_pc_in_call_dummy_ftype *pc_in_call_dummy;
175   int call_dummy_p;
176   LONGEST * call_dummy_words;
177   int sizeof_call_dummy_words;
178   int call_dummy_stack_adjust_p;
179   int call_dummy_stack_adjust;
180   gdbarch_fix_call_dummy_ftype *fix_call_dummy;
181   int believe_pcc_promotion;
182   int believe_pcc_promotion_type;
183   gdbarch_coerce_float_to_double_ftype *coerce_float_to_double;
184   gdbarch_get_saved_register_ftype *get_saved_register;
185   gdbarch_register_convertible_ftype *register_convertible;
186   gdbarch_register_convert_to_virtual_ftype *register_convert_to_virtual;
187   gdbarch_register_convert_to_raw_ftype *register_convert_to_raw;
188   gdbarch_fetch_pseudo_register_ftype *fetch_pseudo_register;
189   gdbarch_store_pseudo_register_ftype *store_pseudo_register;
190   gdbarch_pointer_to_address_ftype *pointer_to_address;
191   gdbarch_address_to_pointer_ftype *address_to_pointer;
192   gdbarch_return_value_on_stack_ftype *return_value_on_stack;
193   gdbarch_extract_return_value_ftype *extract_return_value;
194   gdbarch_push_arguments_ftype *push_arguments;
195   gdbarch_push_dummy_frame_ftype *push_dummy_frame;
196   gdbarch_push_return_address_ftype *push_return_address;
197   gdbarch_pop_frame_ftype *pop_frame;
198   gdbarch_d10v_make_daddr_ftype *d10v_make_daddr;
199   gdbarch_d10v_make_iaddr_ftype *d10v_make_iaddr;
200   gdbarch_d10v_daddr_p_ftype *d10v_daddr_p;
201   gdbarch_d10v_iaddr_p_ftype *d10v_iaddr_p;
202   gdbarch_d10v_convert_daddr_to_raw_ftype *d10v_convert_daddr_to_raw;
203   gdbarch_d10v_convert_iaddr_to_raw_ftype *d10v_convert_iaddr_to_raw;
204   gdbarch_store_struct_return_ftype *store_struct_return;
205   gdbarch_store_return_value_ftype *store_return_value;
206   gdbarch_extract_struct_value_address_ftype *extract_struct_value_address;
207   gdbarch_use_struct_convention_ftype *use_struct_convention;
208   gdbarch_frame_init_saved_regs_ftype *frame_init_saved_regs;
209   gdbarch_init_extra_frame_info_ftype *init_extra_frame_info;
210   gdbarch_skip_prologue_ftype *skip_prologue;
211   gdbarch_prologue_frameless_p_ftype *prologue_frameless_p;
212   gdbarch_inner_than_ftype *inner_than;
213   gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
214   gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
215   gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
216   CORE_ADDR decr_pc_after_break;
217   CORE_ADDR function_start_offset;
218   gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address;
219   CORE_ADDR frame_args_skip;
220   gdbarch_frameless_function_invocation_ftype *frameless_function_invocation;
221   gdbarch_frame_chain_ftype *frame_chain;
222   gdbarch_frame_chain_valid_ftype *frame_chain_valid;
223   gdbarch_frame_saved_pc_ftype *frame_saved_pc;
224   gdbarch_frame_args_address_ftype *frame_args_address;
225   gdbarch_frame_locals_address_ftype *frame_locals_address;
226   gdbarch_saved_pc_after_call_ftype *saved_pc_after_call;
227   gdbarch_frame_num_args_ftype *frame_num_args;
228   gdbarch_stack_align_ftype *stack_align;
229   int extra_stack_alignment_needed;
230   gdbarch_reg_struct_has_addr_ftype *reg_struct_has_addr;
231   gdbarch_save_dummy_frame_tos_ftype *save_dummy_frame_tos;
232   const struct floatformat * float_format;
233   const struct floatformat * double_format;
234   const struct floatformat * long_double_format;
235 };
236
237
238 /* The default architecture uses host values (for want of a better
239    choice). */
240
241 extern const struct bfd_arch_info bfd_default_arch_struct;
242
243 struct gdbarch startup_gdbarch =
244 {
245   /* basic architecture information */
246   &bfd_default_arch_struct,
247   BIG_ENDIAN,
248   /* target specific vector and its dump routine */
249   NULL, NULL,
250   /*per-architecture data-pointers and swap regions */
251   0, NULL, NULL,
252   /* Multi-arch values */
253   8 * sizeof (short),
254   8 * sizeof (int),
255   8 * sizeof (long),
256   8 * sizeof (LONGEST),
257   8 * sizeof (float),
258   8 * sizeof (double),
259   8 * sizeof (long double),
260   8 * sizeof (void*),
261   8 * sizeof (void*),
262   8 * sizeof (void*),
263   0,
264   0,
265   0,
266   0,
267   0,
268   0,
269   0,
270   0,
271   0,
272   0,
273   0,
274   0,
275   0,
276   0,
277   0,
278   0,
279   0,
280   0,
281   0,
282   0,
283   0,
284   0,
285   0,
286   0,
287   0,
288   0,
289   0,
290   0,
291   0,
292   0,
293   0,
294   0,
295   0,
296   0,
297   0,
298   0,
299   0,
300   0,
301   0,
302   0,
303   0,
304   0,
305   0,
306   generic_get_saved_register,
307   0,
308   0,
309   0,
310   0,
311   0,
312   0,
313   0,
314   0,
315   0,
316   0,
317   0,
318   0,
319   0,
320   0,
321   0,
322   0,
323   0,
324   0,
325   0,
326   0,
327   0,
328   0,
329   0,
330   0,
331   0,
332   0,
333   0,
334   0,
335   0,
336   0,
337   0,
338   0,
339   0,
340   0,
341   0,
342   0,
343   0,
344   0,
345   0,
346   0,
347   0,
348   0,
349   0,
350   0,
351   0,
352   0,
353   0,
354   0,
355   0,
356   0,
357   /* startup_gdbarch() */
358 };
359
360 struct gdbarch *current_gdbarch = &startup_gdbarch;
361
362
363 /* Create a new ``struct gdbarch'' based on information provided by
364    ``struct gdbarch_info''. */
365
366 struct gdbarch *
367 gdbarch_alloc (const struct gdbarch_info *info,
368                struct gdbarch_tdep *tdep)
369 {
370   struct gdbarch *gdbarch = XMALLOC (struct gdbarch);
371   memset (gdbarch, 0, sizeof (*gdbarch));
372
373   gdbarch->tdep = tdep;
374
375   gdbarch->bfd_arch_info = info->bfd_arch_info;
376   gdbarch->byte_order = info->byte_order;
377
378   /* Force the explicit initialization of these. */
379   gdbarch->short_bit = 2*TARGET_CHAR_BIT;
380   gdbarch->int_bit = 4*TARGET_CHAR_BIT;
381   gdbarch->long_bit = 4*TARGET_CHAR_BIT;
382   gdbarch->long_long_bit = 2*TARGET_LONG_BIT;
383   gdbarch->float_bit = 4*TARGET_CHAR_BIT;
384   gdbarch->double_bit = 8*TARGET_CHAR_BIT;
385   gdbarch->long_double_bit = 2*TARGET_DOUBLE_BIT;
386   gdbarch->ptr_bit = TARGET_INT_BIT;
387   gdbarch->bfd_vma_bit = TARGET_ARCHITECTURE->bits_per_address;
388   gdbarch->read_pc = generic_target_read_pc;
389   gdbarch->write_pc = generic_target_write_pc;
390   gdbarch->read_fp = generic_target_read_fp;
391   gdbarch->write_fp = generic_target_write_fp;
392   gdbarch->read_sp = generic_target_read_sp;
393   gdbarch->write_sp = generic_target_write_sp;
394   gdbarch->num_regs = -1;
395   gdbarch->sp_regnum = -1;
396   gdbarch->fp_regnum = -1;
397   gdbarch->pc_regnum = -1;
398   gdbarch->fp0_regnum = -1;
399   gdbarch->npc_regnum = -1;
400   gdbarch->nnpc_regnum = -1;
401   gdbarch->register_name = legacy_register_name;
402   gdbarch->register_size = -1;
403   gdbarch->register_bytes = -1;
404   gdbarch->max_register_raw_size = -1;
405   gdbarch->max_register_virtual_size = -1;
406   gdbarch->do_registers_info = do_registers_info;
407   gdbarch->register_sim_regno = default_register_sim_regno;
408   gdbarch->use_generic_dummy_frames = -1;
409   gdbarch->call_dummy_start_offset = -1;
410   gdbarch->call_dummy_breakpoint_offset = -1;
411   gdbarch->call_dummy_breakpoint_offset_p = -1;
412   gdbarch->call_dummy_length = -1;
413   gdbarch->call_dummy_p = -1;
414   gdbarch->call_dummy_words = legacy_call_dummy_words;
415   gdbarch->sizeof_call_dummy_words = legacy_sizeof_call_dummy_words;
416   gdbarch->call_dummy_stack_adjust_p = -1;
417   gdbarch->coerce_float_to_double = default_coerce_float_to_double;
418   gdbarch->register_convertible = generic_register_convertible_not;
419   gdbarch->pointer_to_address = unsigned_pointer_to_address;
420   gdbarch->address_to_pointer = unsigned_address_to_pointer;
421   gdbarch->return_value_on_stack = generic_return_value_on_stack_not;
422   gdbarch->prologue_frameless_p = generic_prologue_frameless_p;
423   gdbarch->breakpoint_from_pc = legacy_breakpoint_from_pc;
424   gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
425   gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
426   gdbarch->decr_pc_after_break = -1;
427   gdbarch->function_start_offset = -1;
428   gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
429   gdbarch->frame_args_skip = -1;
430   gdbarch->frameless_function_invocation = generic_frameless_function_invocation_not;
431   gdbarch->extra_stack_alignment_needed = 1;
432   /* gdbarch_alloc() */
433
434   return gdbarch;
435 }
436
437
438 /* Free a gdbarch struct.  This should never happen in normal
439    operation --- once you've created a gdbarch, you keep it around.
440    However, if an architecture's init function encounters an error
441    building the structure, it may need to clean up a partially
442    constructed gdbarch.  */
443
444 void
445 gdbarch_free (struct gdbarch *arch)
446 {
447   /* At the moment, this is trivial.  */
448   free (arch);
449 }
450
451
452 /* Ensure that all values in a GDBARCH are reasonable. */
453
454 static void
455 verify_gdbarch (struct gdbarch *gdbarch)
456 {
457   /* Only perform sanity checks on a multi-arch target. */
458   if (!GDB_MULTI_ARCH)
459     return;
460   /* fundamental */
461   if (gdbarch->byte_order == 0)
462     internal_error ("verify_gdbarch: byte-order unset");
463   if (gdbarch->bfd_arch_info == NULL)
464     internal_error ("verify_gdbarch: bfd_arch_info unset");
465   /* Check those that need to be defined for the given multi-arch level. */
466   /* Skip verify of short_bit, invalid_p == 0 */
467   /* Skip verify of int_bit, invalid_p == 0 */
468   /* Skip verify of long_bit, invalid_p == 0 */
469   /* Skip verify of long_long_bit, invalid_p == 0 */
470   /* Skip verify of float_bit, invalid_p == 0 */
471   /* Skip verify of double_bit, invalid_p == 0 */
472   /* Skip verify of long_double_bit, invalid_p == 0 */
473   /* Skip verify of ptr_bit, invalid_p == 0 */
474   if (gdbarch->addr_bit == 0)
475     gdbarch->addr_bit = TARGET_PTR_BIT;
476   /* Skip verify of bfd_vma_bit, invalid_p == 0 */
477   /* Skip verify of ieee_float, invalid_p == 0 */
478   /* Skip verify of read_pc, invalid_p == 0 */
479   /* Skip verify of write_pc, invalid_p == 0 */
480   /* Skip verify of read_fp, invalid_p == 0 */
481   /* Skip verify of write_fp, invalid_p == 0 */
482   /* Skip verify of read_sp, invalid_p == 0 */
483   /* Skip verify of write_sp, invalid_p == 0 */
484   if ((GDB_MULTI_ARCH >= 2)
485       && (gdbarch->num_regs == -1))
486     internal_error ("gdbarch: verify_gdbarch: num_regs invalid");
487   /* Skip verify of num_pseudo_regs, invalid_p == 0 */
488   if ((GDB_MULTI_ARCH >= 2)
489       && (gdbarch->sp_regnum == -1))
490     internal_error ("gdbarch: verify_gdbarch: sp_regnum invalid");
491   if ((GDB_MULTI_ARCH >= 2)
492       && (gdbarch->fp_regnum == -1))
493     internal_error ("gdbarch: verify_gdbarch: fp_regnum invalid");
494   if ((GDB_MULTI_ARCH >= 2)
495       && (gdbarch->pc_regnum == -1))
496     internal_error ("gdbarch: verify_gdbarch: pc_regnum invalid");
497   /* Skip verify of fp0_regnum, invalid_p == 0 */
498   /* Skip verify of npc_regnum, invalid_p == 0 */
499   /* Skip verify of nnpc_regnum, invalid_p == 0 */
500   /* Skip verify of register_name, invalid_p == 0 */
501   if ((GDB_MULTI_ARCH >= 2)
502       && (gdbarch->register_size == -1))
503     internal_error ("gdbarch: verify_gdbarch: register_size invalid");
504   if ((GDB_MULTI_ARCH >= 2)
505       && (gdbarch->register_bytes == -1))
506     internal_error ("gdbarch: verify_gdbarch: register_bytes invalid");
507   if ((GDB_MULTI_ARCH >= 2)
508       && (gdbarch->register_byte == 0))
509     internal_error ("gdbarch: verify_gdbarch: register_byte invalid");
510   if ((GDB_MULTI_ARCH >= 2)
511       && (gdbarch->register_raw_size == 0))
512     internal_error ("gdbarch: verify_gdbarch: register_raw_size invalid");
513   if ((GDB_MULTI_ARCH >= 2)
514       && (gdbarch->max_register_raw_size == -1))
515     internal_error ("gdbarch: verify_gdbarch: max_register_raw_size invalid");
516   if ((GDB_MULTI_ARCH >= 2)
517       && (gdbarch->register_virtual_size == 0))
518     internal_error ("gdbarch: verify_gdbarch: register_virtual_size invalid");
519   if ((GDB_MULTI_ARCH >= 2)
520       && (gdbarch->max_register_virtual_size == -1))
521     internal_error ("gdbarch: verify_gdbarch: max_register_virtual_size invalid");
522   if ((GDB_MULTI_ARCH >= 2)
523       && (gdbarch->register_virtual_type == 0))
524     internal_error ("gdbarch: verify_gdbarch: register_virtual_type invalid");
525   /* Skip verify of do_registers_info, invalid_p == 0 */
526   /* Skip verify of register_sim_regno, invalid_p == 0 */
527   if ((GDB_MULTI_ARCH >= 1)
528       && (gdbarch->use_generic_dummy_frames == -1))
529     internal_error ("gdbarch: verify_gdbarch: use_generic_dummy_frames invalid");
530   if ((GDB_MULTI_ARCH >= 2)
531       && (gdbarch->call_dummy_location == 0))
532     internal_error ("gdbarch: verify_gdbarch: call_dummy_location invalid");
533   if ((GDB_MULTI_ARCH >= 2)
534       && (gdbarch->call_dummy_location == AT_ENTRY_POINT && gdbarch->call_dummy_address == 0))
535     internal_error ("gdbarch: verify_gdbarch: call_dummy_address invalid");
536   if ((GDB_MULTI_ARCH >= 2)
537       && (gdbarch->call_dummy_start_offset == -1))
538     internal_error ("gdbarch: verify_gdbarch: call_dummy_start_offset invalid");
539   if ((GDB_MULTI_ARCH >= 2)
540       && (gdbarch->call_dummy_breakpoint_offset == -1))
541     internal_error ("gdbarch: verify_gdbarch: call_dummy_breakpoint_offset invalid");
542   if ((GDB_MULTI_ARCH >= 1)
543       && (gdbarch->call_dummy_breakpoint_offset_p == -1))
544     internal_error ("gdbarch: verify_gdbarch: call_dummy_breakpoint_offset_p invalid");
545   if ((GDB_MULTI_ARCH >= 2)
546       && (gdbarch->call_dummy_length == -1))
547     internal_error ("gdbarch: verify_gdbarch: call_dummy_length invalid");
548   if ((GDB_MULTI_ARCH >= 2)
549       && (gdbarch->pc_in_call_dummy == 0))
550     internal_error ("gdbarch: verify_gdbarch: pc_in_call_dummy invalid");
551   if ((GDB_MULTI_ARCH >= 1)
552       && (gdbarch->call_dummy_p == -1))
553     internal_error ("gdbarch: verify_gdbarch: call_dummy_p invalid");
554   /* Skip verify of call_dummy_words, invalid_p == 0 */
555   /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
556   if ((GDB_MULTI_ARCH >= 1)
557       && (gdbarch->call_dummy_stack_adjust_p == -1))
558     internal_error ("gdbarch: verify_gdbarch: call_dummy_stack_adjust_p invalid");
559   if ((GDB_MULTI_ARCH >= 2)
560       && (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0))
561     internal_error ("gdbarch: verify_gdbarch: call_dummy_stack_adjust invalid");
562   if ((GDB_MULTI_ARCH >= 2)
563       && (gdbarch->fix_call_dummy == 0))
564     internal_error ("gdbarch: verify_gdbarch: fix_call_dummy invalid");
565   /* Skip verify of coerce_float_to_double, invalid_p == 0 */
566   if ((GDB_MULTI_ARCH >= 1)
567       && (gdbarch->get_saved_register == 0))
568     internal_error ("gdbarch: verify_gdbarch: get_saved_register invalid");
569   /* Skip verify of register_convertible, invalid_p == 0 */
570   /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
571   /* Skip verify of register_convert_to_raw, invalid_p == 0 */
572   /* Skip verify of fetch_pseudo_register, invalid_p == 0 */
573   /* Skip verify of store_pseudo_register, invalid_p == 0 */
574   /* Skip verify of pointer_to_address, invalid_p == 0 */
575   /* Skip verify of address_to_pointer, invalid_p == 0 */
576   /* Skip verify of return_value_on_stack, invalid_p == 0 */
577   if ((GDB_MULTI_ARCH >= 2)
578       && (gdbarch->extract_return_value == 0))
579     internal_error ("gdbarch: verify_gdbarch: extract_return_value invalid");
580   if ((GDB_MULTI_ARCH >= 1)
581       && (gdbarch->push_arguments == 0))
582     internal_error ("gdbarch: verify_gdbarch: push_arguments invalid");
583   if ((GDB_MULTI_ARCH >= 2)
584       && (gdbarch->push_dummy_frame == 0))
585     internal_error ("gdbarch: verify_gdbarch: push_dummy_frame invalid");
586   if ((GDB_MULTI_ARCH >= 1)
587       && (gdbarch->push_return_address == 0))
588     internal_error ("gdbarch: verify_gdbarch: push_return_address invalid");
589   if ((GDB_MULTI_ARCH >= 2)
590       && (gdbarch->pop_frame == 0))
591     internal_error ("gdbarch: verify_gdbarch: pop_frame invalid");
592   /* Skip verify of d10v_make_daddr, invalid_p == 0 */
593   /* Skip verify of d10v_make_iaddr, invalid_p == 0 */
594   /* Skip verify of d10v_daddr_p, invalid_p == 0 */
595   /* Skip verify of d10v_iaddr_p, invalid_p == 0 */
596   /* Skip verify of d10v_convert_daddr_to_raw, invalid_p == 0 */
597   /* Skip verify of d10v_convert_iaddr_to_raw, invalid_p == 0 */
598   if ((GDB_MULTI_ARCH >= 2)
599       && (gdbarch->store_struct_return == 0))
600     internal_error ("gdbarch: verify_gdbarch: store_struct_return invalid");
601   if ((GDB_MULTI_ARCH >= 2)
602       && (gdbarch->store_return_value == 0))
603     internal_error ("gdbarch: verify_gdbarch: store_return_value invalid");
604   if ((GDB_MULTI_ARCH >= 2)
605       && (gdbarch->extract_struct_value_address == 0))
606     internal_error ("gdbarch: verify_gdbarch: extract_struct_value_address invalid");
607   if ((GDB_MULTI_ARCH >= 2)
608       && (gdbarch->use_struct_convention == 0))
609     internal_error ("gdbarch: verify_gdbarch: use_struct_convention invalid");
610   if ((GDB_MULTI_ARCH >= 2)
611       && (gdbarch->frame_init_saved_regs == 0))
612     internal_error ("gdbarch: verify_gdbarch: frame_init_saved_regs invalid");
613   if ((GDB_MULTI_ARCH >= 2)
614       && (gdbarch->init_extra_frame_info == 0))
615     internal_error ("gdbarch: verify_gdbarch: init_extra_frame_info invalid");
616   if ((GDB_MULTI_ARCH >= 2)
617       && (gdbarch->skip_prologue == 0))
618     internal_error ("gdbarch: verify_gdbarch: skip_prologue invalid");
619   /* Skip verify of prologue_frameless_p, invalid_p == 0 */
620   if ((GDB_MULTI_ARCH >= 2)
621       && (gdbarch->inner_than == 0))
622     internal_error ("gdbarch: verify_gdbarch: inner_than invalid");
623   /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
624   /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
625   /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
626   if ((GDB_MULTI_ARCH >= 2)
627       && (gdbarch->decr_pc_after_break == -1))
628     internal_error ("gdbarch: verify_gdbarch: decr_pc_after_break invalid");
629   if ((GDB_MULTI_ARCH >= 2)
630       && (gdbarch->function_start_offset == -1))
631     internal_error ("gdbarch: verify_gdbarch: function_start_offset invalid");
632   /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
633   if ((GDB_MULTI_ARCH >= 2)
634       && (gdbarch->frame_args_skip == -1))
635     internal_error ("gdbarch: verify_gdbarch: frame_args_skip invalid");
636   /* Skip verify of frameless_function_invocation, invalid_p == 0 */
637   if ((GDB_MULTI_ARCH >= 2)
638       && (gdbarch->frame_chain == 0))
639     internal_error ("gdbarch: verify_gdbarch: frame_chain invalid");
640   if ((GDB_MULTI_ARCH >= 1)
641       && (gdbarch->frame_chain_valid == 0))
642     internal_error ("gdbarch: verify_gdbarch: frame_chain_valid invalid");
643   if ((GDB_MULTI_ARCH >= 2)
644       && (gdbarch->frame_saved_pc == 0))
645     internal_error ("gdbarch: verify_gdbarch: frame_saved_pc invalid");
646   if ((GDB_MULTI_ARCH >= 2)
647       && (gdbarch->frame_args_address == 0))
648     internal_error ("gdbarch: verify_gdbarch: frame_args_address invalid");
649   if ((GDB_MULTI_ARCH >= 2)
650       && (gdbarch->frame_locals_address == 0))
651     internal_error ("gdbarch: verify_gdbarch: frame_locals_address invalid");
652   if ((GDB_MULTI_ARCH >= 2)
653       && (gdbarch->saved_pc_after_call == 0))
654     internal_error ("gdbarch: verify_gdbarch: saved_pc_after_call invalid");
655   if ((GDB_MULTI_ARCH >= 2)
656       && (gdbarch->frame_num_args == 0))
657     internal_error ("gdbarch: verify_gdbarch: frame_num_args invalid");
658   /* Skip verify of stack_align, has predicate */
659   /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
660   /* Skip verify of reg_struct_has_addr, has predicate */
661   /* Skip verify of save_dummy_frame_tos, has predicate */
662   if (gdbarch->float_format == 0)
663     gdbarch->float_format = default_float_format (gdbarch);
664   if (gdbarch->double_format == 0)
665     gdbarch->double_format = default_double_format (gdbarch);
666   if (gdbarch->long_double_format == 0)
667     gdbarch->long_double_format = &floatformat_unknown;
668 }
669
670
671 /* Print out the details of the current architecture. */
672
673 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
674    just happens to match the global variable ``current_gdbarch''.  That
675    way macros refering to that variable get the local and not the global
676    version - ulgh.  Once everything is parameterised with gdbarch, this
677    will go away. */
678
679 void
680 gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
681 {
682   fprintf_unfiltered (file,
683                       "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
684                       GDB_MULTI_ARCH);
685 #ifdef TARGET_ARCHITECTURE
686   fprintf_unfiltered (file,
687                       "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
688                       XSTRING (TARGET_ARCHITECTURE));
689 #endif
690 #ifdef TARGET_BYTE_ORDER
691   fprintf_unfiltered (file,
692                       "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
693                       XSTRING (TARGET_BYTE_ORDER));
694 #endif
695 #ifdef TARGET_SHORT_BIT
696   fprintf_unfiltered (file,
697                       "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
698                       XSTRING (TARGET_SHORT_BIT));
699 #endif
700 #ifdef TARGET_INT_BIT
701   fprintf_unfiltered (file,
702                       "gdbarch_dump: TARGET_INT_BIT # %s\n",
703                       XSTRING (TARGET_INT_BIT));
704 #endif
705 #ifdef TARGET_LONG_BIT
706   fprintf_unfiltered (file,
707                       "gdbarch_dump: TARGET_LONG_BIT # %s\n",
708                       XSTRING (TARGET_LONG_BIT));
709 #endif
710 #ifdef TARGET_LONG_LONG_BIT
711   fprintf_unfiltered (file,
712                       "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
713                       XSTRING (TARGET_LONG_LONG_BIT));
714 #endif
715 #ifdef TARGET_FLOAT_BIT
716   fprintf_unfiltered (file,
717                       "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
718                       XSTRING (TARGET_FLOAT_BIT));
719 #endif
720 #ifdef TARGET_DOUBLE_BIT
721   fprintf_unfiltered (file,
722                       "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
723                       XSTRING (TARGET_DOUBLE_BIT));
724 #endif
725 #ifdef TARGET_LONG_DOUBLE_BIT
726   fprintf_unfiltered (file,
727                       "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
728                       XSTRING (TARGET_LONG_DOUBLE_BIT));
729 #endif
730 #ifdef TARGET_PTR_BIT
731   fprintf_unfiltered (file,
732                       "gdbarch_dump: TARGET_PTR_BIT # %s\n",
733                       XSTRING (TARGET_PTR_BIT));
734 #endif
735 #ifdef TARGET_ADDR_BIT
736   fprintf_unfiltered (file,
737                       "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
738                       XSTRING (TARGET_ADDR_BIT));
739 #endif
740 #ifdef TARGET_BFD_VMA_BIT
741   fprintf_unfiltered (file,
742                       "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
743                       XSTRING (TARGET_BFD_VMA_BIT));
744 #endif
745 #ifdef IEEE_FLOAT
746   fprintf_unfiltered (file,
747                       "gdbarch_dump: IEEE_FLOAT # %s\n",
748                       XSTRING (IEEE_FLOAT));
749 #endif
750 #ifdef TARGET_READ_PC
751   fprintf_unfiltered (file,
752                       "gdbarch_dump: %s # %s\n",
753                       "TARGET_READ_PC(pid)",
754                       XSTRING (TARGET_READ_PC (pid)));
755 #endif
756 #if defined (TARGET_WRITE_PC) && GDB_MULTI_ARCH
757   /* Macro might contain `[{}]' when not multi-arch */
758   fprintf_unfiltered (file,
759                       "gdbarch_dump: %s # %s\n",
760                       "TARGET_WRITE_PC(val, pid)",
761                       XSTRING (TARGET_WRITE_PC (val, pid)));
762 #endif
763 #ifdef TARGET_READ_FP
764   fprintf_unfiltered (file,
765                       "gdbarch_dump: %s # %s\n",
766                       "TARGET_READ_FP()",
767                       XSTRING (TARGET_READ_FP ()));
768 #endif
769 #if defined (TARGET_WRITE_FP) && GDB_MULTI_ARCH
770   /* Macro might contain `[{}]' when not multi-arch */
771   fprintf_unfiltered (file,
772                       "gdbarch_dump: %s # %s\n",
773                       "TARGET_WRITE_FP(val)",
774                       XSTRING (TARGET_WRITE_FP (val)));
775 #endif
776 #ifdef TARGET_READ_SP
777   fprintf_unfiltered (file,
778                       "gdbarch_dump: %s # %s\n",
779                       "TARGET_READ_SP()",
780                       XSTRING (TARGET_READ_SP ()));
781 #endif
782 #if defined (TARGET_WRITE_SP) && GDB_MULTI_ARCH
783   /* Macro might contain `[{}]' when not multi-arch */
784   fprintf_unfiltered (file,
785                       "gdbarch_dump: %s # %s\n",
786                       "TARGET_WRITE_SP(val)",
787                       XSTRING (TARGET_WRITE_SP (val)));
788 #endif
789 #ifdef NUM_REGS
790   fprintf_unfiltered (file,
791                       "gdbarch_dump: NUM_REGS # %s\n",
792                       XSTRING (NUM_REGS));
793 #endif
794 #ifdef NUM_PSEUDO_REGS
795   fprintf_unfiltered (file,
796                       "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
797                       XSTRING (NUM_PSEUDO_REGS));
798 #endif
799 #ifdef SP_REGNUM
800   fprintf_unfiltered (file,
801                       "gdbarch_dump: SP_REGNUM # %s\n",
802                       XSTRING (SP_REGNUM));
803 #endif
804 #ifdef FP_REGNUM
805   fprintf_unfiltered (file,
806                       "gdbarch_dump: FP_REGNUM # %s\n",
807                       XSTRING (FP_REGNUM));
808 #endif
809 #ifdef PC_REGNUM
810   fprintf_unfiltered (file,
811                       "gdbarch_dump: PC_REGNUM # %s\n",
812                       XSTRING (PC_REGNUM));
813 #endif
814 #ifdef FP0_REGNUM
815   fprintf_unfiltered (file,
816                       "gdbarch_dump: FP0_REGNUM # %s\n",
817                       XSTRING (FP0_REGNUM));
818 #endif
819 #ifdef NPC_REGNUM
820   fprintf_unfiltered (file,
821                       "gdbarch_dump: NPC_REGNUM # %s\n",
822                       XSTRING (NPC_REGNUM));
823 #endif
824 #ifdef NNPC_REGNUM
825   fprintf_unfiltered (file,
826                       "gdbarch_dump: NNPC_REGNUM # %s\n",
827                       XSTRING (NNPC_REGNUM));
828 #endif
829 #ifdef REGISTER_NAME
830   fprintf_unfiltered (file,
831                       "gdbarch_dump: %s # %s\n",
832                       "REGISTER_NAME(regnr)",
833                       XSTRING (REGISTER_NAME (regnr)));
834 #endif
835 #ifdef REGISTER_SIZE
836   fprintf_unfiltered (file,
837                       "gdbarch_dump: REGISTER_SIZE # %s\n",
838                       XSTRING (REGISTER_SIZE));
839 #endif
840 #ifdef REGISTER_BYTES
841   fprintf_unfiltered (file,
842                       "gdbarch_dump: REGISTER_BYTES # %s\n",
843                       XSTRING (REGISTER_BYTES));
844 #endif
845 #ifdef REGISTER_BYTE
846   fprintf_unfiltered (file,
847                       "gdbarch_dump: %s # %s\n",
848                       "REGISTER_BYTE(reg_nr)",
849                       XSTRING (REGISTER_BYTE (reg_nr)));
850 #endif
851 #ifdef REGISTER_RAW_SIZE
852   fprintf_unfiltered (file,
853                       "gdbarch_dump: %s # %s\n",
854                       "REGISTER_RAW_SIZE(reg_nr)",
855                       XSTRING (REGISTER_RAW_SIZE (reg_nr)));
856 #endif
857 #ifdef MAX_REGISTER_RAW_SIZE
858   fprintf_unfiltered (file,
859                       "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
860                       XSTRING (MAX_REGISTER_RAW_SIZE));
861 #endif
862 #ifdef REGISTER_VIRTUAL_SIZE
863   fprintf_unfiltered (file,
864                       "gdbarch_dump: %s # %s\n",
865                       "REGISTER_VIRTUAL_SIZE(reg_nr)",
866                       XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr)));
867 #endif
868 #ifdef MAX_REGISTER_VIRTUAL_SIZE
869   fprintf_unfiltered (file,
870                       "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
871                       XSTRING (MAX_REGISTER_VIRTUAL_SIZE));
872 #endif
873 #ifdef REGISTER_VIRTUAL_TYPE
874   fprintf_unfiltered (file,
875                       "gdbarch_dump: %s # %s\n",
876                       "REGISTER_VIRTUAL_TYPE(reg_nr)",
877                       XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr)));
878 #endif
879 #if defined (DO_REGISTERS_INFO) && GDB_MULTI_ARCH
880   /* Macro might contain `[{}]' when not multi-arch */
881   fprintf_unfiltered (file,
882                       "gdbarch_dump: %s # %s\n",
883                       "DO_REGISTERS_INFO(reg_nr, fpregs)",
884                       XSTRING (DO_REGISTERS_INFO (reg_nr, fpregs)));
885 #endif
886 #ifdef REGISTER_SIM_REGNO
887   fprintf_unfiltered (file,
888                       "gdbarch_dump: %s # %s\n",
889                       "REGISTER_SIM_REGNO(reg_nr)",
890                       XSTRING (REGISTER_SIM_REGNO (reg_nr)));
891 #endif
892 #ifdef USE_GENERIC_DUMMY_FRAMES
893   fprintf_unfiltered (file,
894                       "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
895                       XSTRING (USE_GENERIC_DUMMY_FRAMES));
896 #endif
897 #ifdef CALL_DUMMY_LOCATION
898   fprintf_unfiltered (file,
899                       "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
900                       XSTRING (CALL_DUMMY_LOCATION));
901 #endif
902 #ifdef CALL_DUMMY_ADDRESS
903   fprintf_unfiltered (file,
904                       "gdbarch_dump: %s # %s\n",
905                       "CALL_DUMMY_ADDRESS()",
906                       XSTRING (CALL_DUMMY_ADDRESS ()));
907 #endif
908 #ifdef CALL_DUMMY_START_OFFSET
909   fprintf_unfiltered (file,
910                       "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
911                       XSTRING (CALL_DUMMY_START_OFFSET));
912 #endif
913 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
914   fprintf_unfiltered (file,
915                       "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
916                       XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET));
917 #endif
918 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
919   fprintf_unfiltered (file,
920                       "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
921                       XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P));
922 #endif
923 #ifdef CALL_DUMMY_LENGTH
924   fprintf_unfiltered (file,
925                       "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
926                       XSTRING (CALL_DUMMY_LENGTH));
927 #endif
928 #ifdef PC_IN_CALL_DUMMY
929   fprintf_unfiltered (file,
930                       "gdbarch_dump: %s # %s\n",
931                       "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
932                       XSTRING (PC_IN_CALL_DUMMY (pc, sp, frame_address)));
933 #endif
934 #ifdef CALL_DUMMY_P
935   fprintf_unfiltered (file,
936                       "gdbarch_dump: CALL_DUMMY_P # %s\n",
937                       XSTRING (CALL_DUMMY_P));
938 #endif
939 #ifdef CALL_DUMMY_WORDS
940   fprintf_unfiltered (file,
941                       "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
942                       XSTRING (CALL_DUMMY_WORDS));
943 #endif
944 #ifdef SIZEOF_CALL_DUMMY_WORDS
945   fprintf_unfiltered (file,
946                       "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
947                       XSTRING (SIZEOF_CALL_DUMMY_WORDS));
948 #endif
949 #ifdef CALL_DUMMY_STACK_ADJUST_P
950   fprintf_unfiltered (file,
951                       "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
952                       XSTRING (CALL_DUMMY_STACK_ADJUST_P));
953 #endif
954 #ifdef CALL_DUMMY_STACK_ADJUST
955   fprintf_unfiltered (file,
956                       "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
957                       XSTRING (CALL_DUMMY_STACK_ADJUST));
958 #endif
959 #if defined (FIX_CALL_DUMMY) && GDB_MULTI_ARCH
960   /* Macro might contain `[{}]' when not multi-arch */
961   fprintf_unfiltered (file,
962                       "gdbarch_dump: %s # %s\n",
963                       "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
964                       XSTRING (FIX_CALL_DUMMY (dummy, pc, fun, nargs, args, type, gcc_p)));
965 #endif
966 #ifdef BELIEVE_PCC_PROMOTION
967   fprintf_unfiltered (file,
968                       "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
969                       XSTRING (BELIEVE_PCC_PROMOTION));
970 #endif
971 #ifdef BELIEVE_PCC_PROMOTION_TYPE
972   fprintf_unfiltered (file,
973                       "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
974                       XSTRING (BELIEVE_PCC_PROMOTION_TYPE));
975 #endif
976 #ifdef COERCE_FLOAT_TO_DOUBLE
977   fprintf_unfiltered (file,
978                       "gdbarch_dump: %s # %s\n",
979                       "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
980                       XSTRING (COERCE_FLOAT_TO_DOUBLE (formal, actual)));
981 #endif
982 #if defined (GET_SAVED_REGISTER) && GDB_MULTI_ARCH
983   /* Macro might contain `[{}]' when not multi-arch */
984   fprintf_unfiltered (file,
985                       "gdbarch_dump: %s # %s\n",
986                       "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
987                       XSTRING (GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval)));
988 #endif
989 #ifdef REGISTER_CONVERTIBLE
990   fprintf_unfiltered (file,
991                       "gdbarch_dump: %s # %s\n",
992                       "REGISTER_CONVERTIBLE(nr)",
993                       XSTRING (REGISTER_CONVERTIBLE (nr)));
994 #endif
995 #if defined (REGISTER_CONVERT_TO_VIRTUAL) && GDB_MULTI_ARCH
996   /* Macro might contain `[{}]' when not multi-arch */
997   fprintf_unfiltered (file,
998                       "gdbarch_dump: %s # %s\n",
999                       "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1000                       XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to)));
1001 #endif
1002 #if defined (REGISTER_CONVERT_TO_RAW) && GDB_MULTI_ARCH
1003   /* Macro might contain `[{}]' when not multi-arch */
1004   fprintf_unfiltered (file,
1005                       "gdbarch_dump: %s # %s\n",
1006                       "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1007                       XSTRING (REGISTER_CONVERT_TO_RAW (type, regnum, from, to)));
1008 #endif
1009 #if defined (FETCH_PSEUDO_REGISTER) && GDB_MULTI_ARCH
1010   /* Macro might contain `[{}]' when not multi-arch */
1011   fprintf_unfiltered (file,
1012                       "gdbarch_dump: %s # %s\n",
1013                       "FETCH_PSEUDO_REGISTER(regnum)",
1014                       XSTRING (FETCH_PSEUDO_REGISTER (regnum)));
1015 #endif
1016 #if defined (STORE_PSEUDO_REGISTER) && GDB_MULTI_ARCH
1017   /* Macro might contain `[{}]' when not multi-arch */
1018   fprintf_unfiltered (file,
1019                       "gdbarch_dump: %s # %s\n",
1020                       "STORE_PSEUDO_REGISTER(regnum)",
1021                       XSTRING (STORE_PSEUDO_REGISTER (regnum)));
1022 #endif
1023 #ifdef POINTER_TO_ADDRESS
1024   fprintf_unfiltered (file,
1025                       "gdbarch_dump: %s # %s\n",
1026                       "POINTER_TO_ADDRESS(type, buf)",
1027                       XSTRING (POINTER_TO_ADDRESS (type, buf)));
1028 #endif
1029 #if defined (ADDRESS_TO_POINTER) && GDB_MULTI_ARCH
1030   /* Macro might contain `[{}]' when not multi-arch */
1031   fprintf_unfiltered (file,
1032                       "gdbarch_dump: %s # %s\n",
1033                       "ADDRESS_TO_POINTER(type, buf, addr)",
1034                       XSTRING (ADDRESS_TO_POINTER (type, buf, addr)));
1035 #endif
1036 #ifdef RETURN_VALUE_ON_STACK
1037   fprintf_unfiltered (file,
1038                       "gdbarch_dump: %s # %s\n",
1039                       "RETURN_VALUE_ON_STACK(type)",
1040                       XSTRING (RETURN_VALUE_ON_STACK (type)));
1041 #endif
1042 #if defined (EXTRACT_RETURN_VALUE) && GDB_MULTI_ARCH
1043   /* Macro might contain `[{}]' when not multi-arch */
1044   fprintf_unfiltered (file,
1045                       "gdbarch_dump: %s # %s\n",
1046                       "EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1047                       XSTRING (EXTRACT_RETURN_VALUE (type, regbuf, valbuf)));
1048 #endif
1049 #ifdef PUSH_ARGUMENTS
1050   fprintf_unfiltered (file,
1051                       "gdbarch_dump: %s # %s\n",
1052                       "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1053                       XSTRING (PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr)));
1054 #endif
1055 #if defined (PUSH_DUMMY_FRAME) && GDB_MULTI_ARCH
1056   /* Macro might contain `[{}]' when not multi-arch */
1057   fprintf_unfiltered (file,
1058                       "gdbarch_dump: %s # %s\n",
1059                       "PUSH_DUMMY_FRAME(-)",
1060                       XSTRING (PUSH_DUMMY_FRAME (-)));
1061 #endif
1062 #ifdef PUSH_RETURN_ADDRESS
1063   fprintf_unfiltered (file,
1064                       "gdbarch_dump: %s # %s\n",
1065                       "PUSH_RETURN_ADDRESS(pc, sp)",
1066                       XSTRING (PUSH_RETURN_ADDRESS (pc, sp)));
1067 #endif
1068 #if defined (POP_FRAME) && GDB_MULTI_ARCH
1069   /* Macro might contain `[{}]' when not multi-arch */
1070   fprintf_unfiltered (file,
1071                       "gdbarch_dump: %s # %s\n",
1072                       "POP_FRAME(-)",
1073                       XSTRING (POP_FRAME (-)));
1074 #endif
1075 #ifdef D10V_MAKE_DADDR
1076   fprintf_unfiltered (file,
1077                       "gdbarch_dump: %s # %s\n",
1078                       "D10V_MAKE_DADDR(x)",
1079                       XSTRING (D10V_MAKE_DADDR (x)));
1080 #endif
1081 #ifdef D10V_MAKE_IADDR
1082   fprintf_unfiltered (file,
1083                       "gdbarch_dump: %s # %s\n",
1084                       "D10V_MAKE_IADDR(x)",
1085                       XSTRING (D10V_MAKE_IADDR (x)));
1086 #endif
1087 #ifdef D10V_DADDR_P
1088   fprintf_unfiltered (file,
1089                       "gdbarch_dump: %s # %s\n",
1090                       "D10V_DADDR_P(x)",
1091                       XSTRING (D10V_DADDR_P (x)));
1092 #endif
1093 #ifdef D10V_IADDR_P
1094   fprintf_unfiltered (file,
1095                       "gdbarch_dump: %s # %s\n",
1096                       "D10V_IADDR_P(x)",
1097                       XSTRING (D10V_IADDR_P (x)));
1098 #endif
1099 #ifdef D10V_CONVERT_DADDR_TO_RAW
1100   fprintf_unfiltered (file,
1101                       "gdbarch_dump: %s # %s\n",
1102                       "D10V_CONVERT_DADDR_TO_RAW(x)",
1103                       XSTRING (D10V_CONVERT_DADDR_TO_RAW (x)));
1104 #endif
1105 #ifdef D10V_CONVERT_IADDR_TO_RAW
1106   fprintf_unfiltered (file,
1107                       "gdbarch_dump: %s # %s\n",
1108                       "D10V_CONVERT_IADDR_TO_RAW(x)",
1109                       XSTRING (D10V_CONVERT_IADDR_TO_RAW (x)));
1110 #endif
1111 #if defined (STORE_STRUCT_RETURN) && GDB_MULTI_ARCH
1112   /* Macro might contain `[{}]' when not multi-arch */
1113   fprintf_unfiltered (file,
1114                       "gdbarch_dump: %s # %s\n",
1115                       "STORE_STRUCT_RETURN(addr, sp)",
1116                       XSTRING (STORE_STRUCT_RETURN (addr, sp)));
1117 #endif
1118 #if defined (STORE_RETURN_VALUE) && GDB_MULTI_ARCH
1119   /* Macro might contain `[{}]' when not multi-arch */
1120   fprintf_unfiltered (file,
1121                       "gdbarch_dump: %s # %s\n",
1122                       "STORE_RETURN_VALUE(type, valbuf)",
1123                       XSTRING (STORE_RETURN_VALUE (type, valbuf)));
1124 #endif
1125 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1126   fprintf_unfiltered (file,
1127                       "gdbarch_dump: %s # %s\n",
1128                       "EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1129                       XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regbuf)));
1130 #endif
1131 #ifdef USE_STRUCT_CONVENTION
1132   fprintf_unfiltered (file,
1133                       "gdbarch_dump: %s # %s\n",
1134                       "USE_STRUCT_CONVENTION(gcc_p, value_type)",
1135                       XSTRING (USE_STRUCT_CONVENTION (gcc_p, value_type)));
1136 #endif
1137 #if defined (FRAME_INIT_SAVED_REGS) && GDB_MULTI_ARCH
1138   /* Macro might contain `[{}]' when not multi-arch */
1139   fprintf_unfiltered (file,
1140                       "gdbarch_dump: %s # %s\n",
1141                       "FRAME_INIT_SAVED_REGS(frame)",
1142                       XSTRING (FRAME_INIT_SAVED_REGS (frame)));
1143 #endif
1144 #if defined (INIT_EXTRA_FRAME_INFO) && GDB_MULTI_ARCH
1145   /* Macro might contain `[{}]' when not multi-arch */
1146   fprintf_unfiltered (file,
1147                       "gdbarch_dump: %s # %s\n",
1148                       "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1149                       XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf, frame)));
1150 #endif
1151 #ifdef SKIP_PROLOGUE
1152   fprintf_unfiltered (file,
1153                       "gdbarch_dump: %s # %s\n",
1154                       "SKIP_PROLOGUE(ip)",
1155                       XSTRING (SKIP_PROLOGUE (ip)));
1156 #endif
1157 #ifdef PROLOGUE_FRAMELESS_P
1158   fprintf_unfiltered (file,
1159                       "gdbarch_dump: %s # %s\n",
1160                       "PROLOGUE_FRAMELESS_P(ip)",
1161                       XSTRING (PROLOGUE_FRAMELESS_P (ip)));
1162 #endif
1163 #ifdef INNER_THAN
1164   fprintf_unfiltered (file,
1165                       "gdbarch_dump: %s # %s\n",
1166                       "INNER_THAN(lhs, rhs)",
1167                       XSTRING (INNER_THAN (lhs, rhs)));
1168 #endif
1169 #ifdef BREAKPOINT_FROM_PC
1170   fprintf_unfiltered (file,
1171                       "gdbarch_dump: %s # %s\n",
1172                       "BREAKPOINT_FROM_PC(pcptr, lenptr)",
1173                       XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr)));
1174 #endif
1175 #ifdef MEMORY_INSERT_BREAKPOINT
1176   fprintf_unfiltered (file,
1177                       "gdbarch_dump: %s # %s\n",
1178                       "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1179                       XSTRING (MEMORY_INSERT_BREAKPOINT (addr, contents_cache)));
1180 #endif
1181 #ifdef MEMORY_REMOVE_BREAKPOINT
1182   fprintf_unfiltered (file,
1183                       "gdbarch_dump: %s # %s\n",
1184                       "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1185                       XSTRING (MEMORY_REMOVE_BREAKPOINT (addr, contents_cache)));
1186 #endif
1187 #ifdef DECR_PC_AFTER_BREAK
1188   fprintf_unfiltered (file,
1189                       "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1190                       XSTRING (DECR_PC_AFTER_BREAK));
1191 #endif
1192 #ifdef FUNCTION_START_OFFSET
1193   fprintf_unfiltered (file,
1194                       "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1195                       XSTRING (FUNCTION_START_OFFSET));
1196 #endif
1197 #if defined (REMOTE_TRANSLATE_XFER_ADDRESS) && GDB_MULTI_ARCH
1198   /* Macro might contain `[{}]' when not multi-arch */
1199   fprintf_unfiltered (file,
1200                       "gdbarch_dump: %s # %s\n",
1201                       "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1202                       XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr, gdb_len, rem_addr, rem_len)));
1203 #endif
1204 #ifdef FRAME_ARGS_SKIP
1205   fprintf_unfiltered (file,
1206                       "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1207                       XSTRING (FRAME_ARGS_SKIP));
1208 #endif
1209 #ifdef FRAMELESS_FUNCTION_INVOCATION
1210   fprintf_unfiltered (file,
1211                       "gdbarch_dump: %s # %s\n",
1212                       "FRAMELESS_FUNCTION_INVOCATION(fi)",
1213                       XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi)));
1214 #endif
1215 #ifdef FRAME_CHAIN
1216   fprintf_unfiltered (file,
1217                       "gdbarch_dump: %s # %s\n",
1218                       "FRAME_CHAIN(frame)",
1219                       XSTRING (FRAME_CHAIN (frame)));
1220 #endif
1221 #ifdef FRAME_CHAIN_VALID
1222   fprintf_unfiltered (file,
1223                       "gdbarch_dump: %s # %s\n",
1224                       "FRAME_CHAIN_VALID(chain, thisframe)",
1225                       XSTRING (FRAME_CHAIN_VALID (chain, thisframe)));
1226 #endif
1227 #ifdef FRAME_SAVED_PC
1228   fprintf_unfiltered (file,
1229                       "gdbarch_dump: %s # %s\n",
1230                       "FRAME_SAVED_PC(fi)",
1231                       XSTRING (FRAME_SAVED_PC (fi)));
1232 #endif
1233 #ifdef FRAME_ARGS_ADDRESS
1234   fprintf_unfiltered (file,
1235                       "gdbarch_dump: %s # %s\n",
1236                       "FRAME_ARGS_ADDRESS(fi)",
1237                       XSTRING (FRAME_ARGS_ADDRESS (fi)));
1238 #endif
1239 #ifdef FRAME_LOCALS_ADDRESS
1240   fprintf_unfiltered (file,
1241                       "gdbarch_dump: %s # %s\n",
1242                       "FRAME_LOCALS_ADDRESS(fi)",
1243                       XSTRING (FRAME_LOCALS_ADDRESS (fi)));
1244 #endif
1245 #ifdef SAVED_PC_AFTER_CALL
1246   fprintf_unfiltered (file,
1247                       "gdbarch_dump: %s # %s\n",
1248                       "SAVED_PC_AFTER_CALL(frame)",
1249                       XSTRING (SAVED_PC_AFTER_CALL (frame)));
1250 #endif
1251 #ifdef FRAME_NUM_ARGS
1252   fprintf_unfiltered (file,
1253                       "gdbarch_dump: %s # %s\n",
1254                       "FRAME_NUM_ARGS(frame)",
1255                       XSTRING (FRAME_NUM_ARGS (frame)));
1256 #endif
1257 #ifdef STACK_ALIGN
1258   fprintf_unfiltered (file,
1259                       "gdbarch_dump: %s # %s\n",
1260                       "STACK_ALIGN(sp)",
1261                       XSTRING (STACK_ALIGN (sp)));
1262 #endif
1263 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1264   fprintf_unfiltered (file,
1265                       "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1266                       XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED));
1267 #endif
1268 #ifdef REG_STRUCT_HAS_ADDR
1269   fprintf_unfiltered (file,
1270                       "gdbarch_dump: %s # %s\n",
1271                       "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1272                       XSTRING (REG_STRUCT_HAS_ADDR (gcc_p, type)));
1273 #endif
1274 #if defined (SAVE_DUMMY_FRAME_TOS) && GDB_MULTI_ARCH
1275   /* Macro might contain `[{}]' when not multi-arch */
1276   fprintf_unfiltered (file,
1277                       "gdbarch_dump: %s # %s\n",
1278                       "SAVE_DUMMY_FRAME_TOS(sp)",
1279                       XSTRING (SAVE_DUMMY_FRAME_TOS (sp)));
1280 #endif
1281 #ifdef TARGET_FLOAT_FORMAT
1282   fprintf_unfiltered (file,
1283                       "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1284                       XSTRING (TARGET_FLOAT_FORMAT));
1285 #endif
1286 #ifdef TARGET_DOUBLE_FORMAT
1287   fprintf_unfiltered (file,
1288                       "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1289                       XSTRING (TARGET_DOUBLE_FORMAT));
1290 #endif
1291 #ifdef TARGET_LONG_DOUBLE_FORMAT
1292   fprintf_unfiltered (file,
1293                       "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
1294                       XSTRING (TARGET_LONG_DOUBLE_FORMAT));
1295 #endif
1296 #ifdef TARGET_ARCHITECTURE
1297   if (TARGET_ARCHITECTURE != NULL)
1298     fprintf_unfiltered (file,
1299                         "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1300                         TARGET_ARCHITECTURE->printable_name);
1301 #endif
1302 #ifdef TARGET_BYTE_ORDER
1303   fprintf_unfiltered (file,
1304                       "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1305                       (long) TARGET_BYTE_ORDER);
1306 #endif
1307 #ifdef TARGET_SHORT_BIT
1308   fprintf_unfiltered (file,
1309                       "gdbarch_dump: TARGET_SHORT_BIT = %ld\n",
1310                       (long) TARGET_SHORT_BIT);
1311 #endif
1312 #ifdef TARGET_INT_BIT
1313   fprintf_unfiltered (file,
1314                       "gdbarch_dump: TARGET_INT_BIT = %ld\n",
1315                       (long) TARGET_INT_BIT);
1316 #endif
1317 #ifdef TARGET_LONG_BIT
1318   fprintf_unfiltered (file,
1319                       "gdbarch_dump: TARGET_LONG_BIT = %ld\n",
1320                       (long) TARGET_LONG_BIT);
1321 #endif
1322 #ifdef TARGET_LONG_LONG_BIT
1323   fprintf_unfiltered (file,
1324                       "gdbarch_dump: TARGET_LONG_LONG_BIT = %ld\n",
1325                       (long) TARGET_LONG_LONG_BIT);
1326 #endif
1327 #ifdef TARGET_FLOAT_BIT
1328   fprintf_unfiltered (file,
1329                       "gdbarch_dump: TARGET_FLOAT_BIT = %ld\n",
1330                       (long) TARGET_FLOAT_BIT);
1331 #endif
1332 #ifdef TARGET_DOUBLE_BIT
1333   fprintf_unfiltered (file,
1334                       "gdbarch_dump: TARGET_DOUBLE_BIT = %ld\n",
1335                       (long) TARGET_DOUBLE_BIT);
1336 #endif
1337 #ifdef TARGET_LONG_DOUBLE_BIT
1338   fprintf_unfiltered (file,
1339                       "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %ld\n",
1340                       (long) TARGET_LONG_DOUBLE_BIT);
1341 #endif
1342 #ifdef TARGET_PTR_BIT
1343   fprintf_unfiltered (file,
1344                       "gdbarch_dump: TARGET_PTR_BIT = %ld\n",
1345                       (long) TARGET_PTR_BIT);
1346 #endif
1347 #ifdef TARGET_ADDR_BIT
1348   fprintf_unfiltered (file,
1349                       "gdbarch_dump: TARGET_ADDR_BIT = %ld\n",
1350                       (long) TARGET_ADDR_BIT);
1351 #endif
1352 #ifdef TARGET_BFD_VMA_BIT
1353   fprintf_unfiltered (file,
1354                       "gdbarch_dump: TARGET_BFD_VMA_BIT = %ld\n",
1355                       (long) TARGET_BFD_VMA_BIT);
1356 #endif
1357 #ifdef IEEE_FLOAT
1358   fprintf_unfiltered (file,
1359                       "gdbarch_dump: IEEE_FLOAT = %ld\n",
1360                       (long) IEEE_FLOAT);
1361 #endif
1362 #ifdef TARGET_READ_PC
1363   if (GDB_MULTI_ARCH)
1364     fprintf_unfiltered (file,
1365                         "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
1366                         (long) current_gdbarch->read_pc
1367                         /*TARGET_READ_PC ()*/);
1368 #endif
1369 #ifdef TARGET_WRITE_PC
1370   if (GDB_MULTI_ARCH)
1371     fprintf_unfiltered (file,
1372                         "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
1373                         (long) current_gdbarch->write_pc
1374                         /*TARGET_WRITE_PC ()*/);
1375 #endif
1376 #ifdef TARGET_READ_FP
1377   if (GDB_MULTI_ARCH)
1378     fprintf_unfiltered (file,
1379                         "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
1380                         (long) current_gdbarch->read_fp
1381                         /*TARGET_READ_FP ()*/);
1382 #endif
1383 #ifdef TARGET_WRITE_FP
1384   if (GDB_MULTI_ARCH)
1385     fprintf_unfiltered (file,
1386                         "gdbarch_dump: TARGET_WRITE_FP = 0x%08lx\n",
1387                         (long) current_gdbarch->write_fp
1388                         /*TARGET_WRITE_FP ()*/);
1389 #endif
1390 #ifdef TARGET_READ_SP
1391   if (GDB_MULTI_ARCH)
1392     fprintf_unfiltered (file,
1393                         "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
1394                         (long) current_gdbarch->read_sp
1395                         /*TARGET_READ_SP ()*/);
1396 #endif
1397 #ifdef TARGET_WRITE_SP
1398   if (GDB_MULTI_ARCH)
1399     fprintf_unfiltered (file,
1400                         "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
1401                         (long) current_gdbarch->write_sp
1402                         /*TARGET_WRITE_SP ()*/);
1403 #endif
1404 #ifdef NUM_REGS
1405   fprintf_unfiltered (file,
1406                       "gdbarch_dump: NUM_REGS = %ld\n",
1407                       (long) NUM_REGS);
1408 #endif
1409 #ifdef NUM_PSEUDO_REGS
1410   fprintf_unfiltered (file,
1411                       "gdbarch_dump: NUM_PSEUDO_REGS = %ld\n",
1412                       (long) NUM_PSEUDO_REGS);
1413 #endif
1414 #ifdef SP_REGNUM
1415   fprintf_unfiltered (file,
1416                       "gdbarch_dump: SP_REGNUM = %ld\n",
1417                       (long) SP_REGNUM);
1418 #endif
1419 #ifdef FP_REGNUM
1420   fprintf_unfiltered (file,
1421                       "gdbarch_dump: FP_REGNUM = %ld\n",
1422                       (long) FP_REGNUM);
1423 #endif
1424 #ifdef PC_REGNUM
1425   fprintf_unfiltered (file,
1426                       "gdbarch_dump: PC_REGNUM = %ld\n",
1427                       (long) PC_REGNUM);
1428 #endif
1429 #ifdef FP0_REGNUM
1430   fprintf_unfiltered (file,
1431                       "gdbarch_dump: FP0_REGNUM = %ld\n",
1432                       (long) FP0_REGNUM);
1433 #endif
1434 #ifdef NPC_REGNUM
1435   fprintf_unfiltered (file,
1436                       "gdbarch_dump: NPC_REGNUM = %ld\n",
1437                       (long) NPC_REGNUM);
1438 #endif
1439 #ifdef NNPC_REGNUM
1440   fprintf_unfiltered (file,
1441                       "gdbarch_dump: NNPC_REGNUM = %ld\n",
1442                       (long) NNPC_REGNUM);
1443 #endif
1444 #ifdef REGISTER_NAME
1445   if (GDB_MULTI_ARCH)
1446     fprintf_unfiltered (file,
1447                         "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1448                         (long) current_gdbarch->register_name
1449                         /*REGISTER_NAME ()*/);
1450 #endif
1451 #ifdef REGISTER_SIZE
1452   fprintf_unfiltered (file,
1453                       "gdbarch_dump: REGISTER_SIZE = %ld\n",
1454                       (long) REGISTER_SIZE);
1455 #endif
1456 #ifdef REGISTER_BYTES
1457   fprintf_unfiltered (file,
1458                       "gdbarch_dump: REGISTER_BYTES = %ld\n",
1459                       (long) REGISTER_BYTES);
1460 #endif
1461 #ifdef REGISTER_BYTE
1462   if (GDB_MULTI_ARCH)
1463     fprintf_unfiltered (file,
1464                         "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1465                         (long) current_gdbarch->register_byte
1466                         /*REGISTER_BYTE ()*/);
1467 #endif
1468 #ifdef REGISTER_RAW_SIZE
1469   if (GDB_MULTI_ARCH)
1470     fprintf_unfiltered (file,
1471                         "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1472                         (long) current_gdbarch->register_raw_size
1473                         /*REGISTER_RAW_SIZE ()*/);
1474 #endif
1475 #ifdef MAX_REGISTER_RAW_SIZE
1476   fprintf_unfiltered (file,
1477                       "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %ld\n",
1478                       (long) MAX_REGISTER_RAW_SIZE);
1479 #endif
1480 #ifdef REGISTER_VIRTUAL_SIZE
1481   if (GDB_MULTI_ARCH)
1482     fprintf_unfiltered (file,
1483                         "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1484                         (long) current_gdbarch->register_virtual_size
1485                         /*REGISTER_VIRTUAL_SIZE ()*/);
1486 #endif
1487 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1488   fprintf_unfiltered (file,
1489                       "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %ld\n",
1490                       (long) MAX_REGISTER_VIRTUAL_SIZE);
1491 #endif
1492 #ifdef REGISTER_VIRTUAL_TYPE
1493   if (GDB_MULTI_ARCH)
1494     fprintf_unfiltered (file,
1495                         "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1496                         (long) current_gdbarch->register_virtual_type
1497                         /*REGISTER_VIRTUAL_TYPE ()*/);
1498 #endif
1499 #ifdef DO_REGISTERS_INFO
1500   if (GDB_MULTI_ARCH)
1501     fprintf_unfiltered (file,
1502                         "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
1503                         (long) current_gdbarch->do_registers_info
1504                         /*DO_REGISTERS_INFO ()*/);
1505 #endif
1506 #ifdef REGISTER_SIM_REGNO
1507   if (GDB_MULTI_ARCH)
1508     fprintf_unfiltered (file,
1509                         "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1510                         (long) current_gdbarch->register_sim_regno
1511                         /*REGISTER_SIM_REGNO ()*/);
1512 #endif
1513 #ifdef USE_GENERIC_DUMMY_FRAMES
1514   fprintf_unfiltered (file,
1515                       "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %ld\n",
1516                       (long) USE_GENERIC_DUMMY_FRAMES);
1517 #endif
1518 #ifdef CALL_DUMMY_LOCATION
1519   fprintf_unfiltered (file,
1520                       "gdbarch_dump: CALL_DUMMY_LOCATION = %ld\n",
1521                       (long) CALL_DUMMY_LOCATION);
1522 #endif
1523 #ifdef CALL_DUMMY_ADDRESS
1524   if (GDB_MULTI_ARCH)
1525     fprintf_unfiltered (file,
1526                         "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
1527                         (long) current_gdbarch->call_dummy_address
1528                         /*CALL_DUMMY_ADDRESS ()*/);
1529 #endif
1530 #ifdef CALL_DUMMY_START_OFFSET
1531   fprintf_unfiltered (file,
1532                       "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
1533                       (long) CALL_DUMMY_START_OFFSET);
1534 #endif
1535 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
1536   if (CALL_DUMMY_BREAKPOINT_OFFSET_P)
1537     fprintf_unfiltered (file,
1538                         "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
1539                         (long) CALL_DUMMY_BREAKPOINT_OFFSET);
1540 #endif
1541 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
1542   fprintf_unfiltered (file,
1543                       "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %ld\n",
1544                       (long) CALL_DUMMY_BREAKPOINT_OFFSET_P);
1545 #endif
1546 #ifdef CALL_DUMMY_LENGTH
1547   if (CALL_DUMMY_LOCATION == BEFORE_TEXT_END || CALL_DUMMY_LOCATION == AFTER_TEXT_END)
1548     fprintf_unfiltered (file,
1549                         "gdbarch_dump: CALL_DUMMY_LENGTH = %ld\n",
1550                         (long) CALL_DUMMY_LENGTH);
1551 #endif
1552 #ifdef PC_IN_CALL_DUMMY
1553   if (GDB_MULTI_ARCH)
1554     fprintf_unfiltered (file,
1555                         "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1556                         (long) current_gdbarch->pc_in_call_dummy
1557                         /*PC_IN_CALL_DUMMY ()*/);
1558 #endif
1559 #ifdef CALL_DUMMY_P
1560   fprintf_unfiltered (file,
1561                       "gdbarch_dump: CALL_DUMMY_P = %ld\n",
1562                       (long) CALL_DUMMY_P);
1563 #endif
1564 #ifdef CALL_DUMMY_WORDS
1565   fprintf_unfiltered (file,
1566                       "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
1567                       (long) CALL_DUMMY_WORDS);
1568 #endif
1569 #ifdef SIZEOF_CALL_DUMMY_WORDS
1570   fprintf_unfiltered (file,
1571                       "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1572                       (long) SIZEOF_CALL_DUMMY_WORDS);
1573 #endif
1574 #ifdef CALL_DUMMY_STACK_ADJUST_P
1575   fprintf_unfiltered (file,
1576                       "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
1577                       (long) CALL_DUMMY_STACK_ADJUST_P);
1578 #endif
1579 #ifdef CALL_DUMMY_STACK_ADJUST
1580   if (CALL_DUMMY_STACK_ADJUST_P)
1581     fprintf_unfiltered (file,
1582                         "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
1583                         (long) CALL_DUMMY_STACK_ADJUST);
1584 #endif
1585 #ifdef FIX_CALL_DUMMY
1586   if (GDB_MULTI_ARCH)
1587     fprintf_unfiltered (file,
1588                         "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1589                         (long) current_gdbarch->fix_call_dummy
1590                         /*FIX_CALL_DUMMY ()*/);
1591 #endif
1592 #ifdef BELIEVE_PCC_PROMOTION
1593   fprintf_unfiltered (file,
1594                       "gdbarch_dump: BELIEVE_PCC_PROMOTION = %ld\n",
1595                       (long) BELIEVE_PCC_PROMOTION);
1596 #endif
1597 #ifdef BELIEVE_PCC_PROMOTION_TYPE
1598   fprintf_unfiltered (file,
1599                       "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %ld\n",
1600                       (long) BELIEVE_PCC_PROMOTION_TYPE);
1601 #endif
1602 #ifdef COERCE_FLOAT_TO_DOUBLE
1603   if (GDB_MULTI_ARCH)
1604     fprintf_unfiltered (file,
1605                         "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
1606                         (long) current_gdbarch->coerce_float_to_double
1607                         /*COERCE_FLOAT_TO_DOUBLE ()*/);
1608 #endif
1609 #ifdef GET_SAVED_REGISTER
1610   if (GDB_MULTI_ARCH)
1611     fprintf_unfiltered (file,
1612                         "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1613                         (long) current_gdbarch->get_saved_register
1614                         /*GET_SAVED_REGISTER ()*/);
1615 #endif
1616 #ifdef REGISTER_CONVERTIBLE
1617   if (GDB_MULTI_ARCH)
1618     fprintf_unfiltered (file,
1619                         "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1620                         (long) current_gdbarch->register_convertible
1621                         /*REGISTER_CONVERTIBLE ()*/);
1622 #endif
1623 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1624   if (GDB_MULTI_ARCH)
1625     fprintf_unfiltered (file,
1626                         "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1627                         (long) current_gdbarch->register_convert_to_virtual
1628                         /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1629 #endif
1630 #ifdef REGISTER_CONVERT_TO_RAW
1631   if (GDB_MULTI_ARCH)
1632     fprintf_unfiltered (file,
1633                         "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1634                         (long) current_gdbarch->register_convert_to_raw
1635                         /*REGISTER_CONVERT_TO_RAW ()*/);
1636 #endif
1637 #ifdef FETCH_PSEUDO_REGISTER
1638   if (GDB_MULTI_ARCH)
1639     fprintf_unfiltered (file,
1640                         "gdbarch_dump: FETCH_PSEUDO_REGISTER = 0x%08lx\n",
1641                         (long) current_gdbarch->fetch_pseudo_register
1642                         /*FETCH_PSEUDO_REGISTER ()*/);
1643 #endif
1644 #ifdef STORE_PSEUDO_REGISTER
1645   if (GDB_MULTI_ARCH)
1646     fprintf_unfiltered (file,
1647                         "gdbarch_dump: STORE_PSEUDO_REGISTER = 0x%08lx\n",
1648                         (long) current_gdbarch->store_pseudo_register
1649                         /*STORE_PSEUDO_REGISTER ()*/);
1650 #endif
1651 #ifdef POINTER_TO_ADDRESS
1652   if (GDB_MULTI_ARCH)
1653     fprintf_unfiltered (file,
1654                         "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1655                         (long) current_gdbarch->pointer_to_address
1656                         /*POINTER_TO_ADDRESS ()*/);
1657 #endif
1658 #ifdef ADDRESS_TO_POINTER
1659   if (GDB_MULTI_ARCH)
1660     fprintf_unfiltered (file,
1661                         "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
1662                         (long) current_gdbarch->address_to_pointer
1663                         /*ADDRESS_TO_POINTER ()*/);
1664 #endif
1665 #ifdef RETURN_VALUE_ON_STACK
1666   if (GDB_MULTI_ARCH)
1667     fprintf_unfiltered (file,
1668                         "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1669                         (long) current_gdbarch->return_value_on_stack
1670                         /*RETURN_VALUE_ON_STACK ()*/);
1671 #endif
1672 #ifdef EXTRACT_RETURN_VALUE
1673   if (GDB_MULTI_ARCH)
1674     fprintf_unfiltered (file,
1675                         "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1676                         (long) current_gdbarch->extract_return_value
1677                         /*EXTRACT_RETURN_VALUE ()*/);
1678 #endif
1679 #ifdef PUSH_ARGUMENTS
1680   if (GDB_MULTI_ARCH)
1681     fprintf_unfiltered (file,
1682                         "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1683                         (long) current_gdbarch->push_arguments
1684                         /*PUSH_ARGUMENTS ()*/);
1685 #endif
1686 #ifdef PUSH_DUMMY_FRAME
1687   if (GDB_MULTI_ARCH)
1688     fprintf_unfiltered (file,
1689                         "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1690                         (long) current_gdbarch->push_dummy_frame
1691                         /*PUSH_DUMMY_FRAME ()*/);
1692 #endif
1693 #ifdef PUSH_RETURN_ADDRESS
1694   if (GDB_MULTI_ARCH)
1695     fprintf_unfiltered (file,
1696                         "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1697                         (long) current_gdbarch->push_return_address
1698                         /*PUSH_RETURN_ADDRESS ()*/);
1699 #endif
1700 #ifdef POP_FRAME
1701   if (GDB_MULTI_ARCH)
1702     fprintf_unfiltered (file,
1703                         "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1704                         (long) current_gdbarch->pop_frame
1705                         /*POP_FRAME ()*/);
1706 #endif
1707 #ifdef D10V_MAKE_DADDR
1708   if (GDB_MULTI_ARCH)
1709     fprintf_unfiltered (file,
1710                         "gdbarch_dump: D10V_MAKE_DADDR = 0x%08lx\n",
1711                         (long) current_gdbarch->d10v_make_daddr
1712                         /*D10V_MAKE_DADDR ()*/);
1713 #endif
1714 #ifdef D10V_MAKE_IADDR
1715   if (GDB_MULTI_ARCH)
1716     fprintf_unfiltered (file,
1717                         "gdbarch_dump: D10V_MAKE_IADDR = 0x%08lx\n",
1718                         (long) current_gdbarch->d10v_make_iaddr
1719                         /*D10V_MAKE_IADDR ()*/);
1720 #endif
1721 #ifdef D10V_DADDR_P
1722   if (GDB_MULTI_ARCH)
1723     fprintf_unfiltered (file,
1724                         "gdbarch_dump: D10V_DADDR_P = 0x%08lx\n",
1725                         (long) current_gdbarch->d10v_daddr_p
1726                         /*D10V_DADDR_P ()*/);
1727 #endif
1728 #ifdef D10V_IADDR_P
1729   if (GDB_MULTI_ARCH)
1730     fprintf_unfiltered (file,
1731                         "gdbarch_dump: D10V_IADDR_P = 0x%08lx\n",
1732                         (long) current_gdbarch->d10v_iaddr_p
1733                         /*D10V_IADDR_P ()*/);
1734 #endif
1735 #ifdef D10V_CONVERT_DADDR_TO_RAW
1736   if (GDB_MULTI_ARCH)
1737     fprintf_unfiltered (file,
1738                         "gdbarch_dump: D10V_CONVERT_DADDR_TO_RAW = 0x%08lx\n",
1739                         (long) current_gdbarch->d10v_convert_daddr_to_raw
1740                         /*D10V_CONVERT_DADDR_TO_RAW ()*/);
1741 #endif
1742 #ifdef D10V_CONVERT_IADDR_TO_RAW
1743   if (GDB_MULTI_ARCH)
1744     fprintf_unfiltered (file,
1745                         "gdbarch_dump: D10V_CONVERT_IADDR_TO_RAW = 0x%08lx\n",
1746                         (long) current_gdbarch->d10v_convert_iaddr_to_raw
1747                         /*D10V_CONVERT_IADDR_TO_RAW ()*/);
1748 #endif
1749 #ifdef STORE_STRUCT_RETURN
1750   if (GDB_MULTI_ARCH)
1751     fprintf_unfiltered (file,
1752                         "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
1753                         (long) current_gdbarch->store_struct_return
1754                         /*STORE_STRUCT_RETURN ()*/);
1755 #endif
1756 #ifdef STORE_RETURN_VALUE
1757   if (GDB_MULTI_ARCH)
1758     fprintf_unfiltered (file,
1759                         "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
1760                         (long) current_gdbarch->store_return_value
1761                         /*STORE_RETURN_VALUE ()*/);
1762 #endif
1763 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1764   if (GDB_MULTI_ARCH)
1765     fprintf_unfiltered (file,
1766                         "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1767                         (long) current_gdbarch->extract_struct_value_address
1768                         /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1769 #endif
1770 #ifdef USE_STRUCT_CONVENTION
1771   if (GDB_MULTI_ARCH)
1772     fprintf_unfiltered (file,
1773                         "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
1774                         (long) current_gdbarch->use_struct_convention
1775                         /*USE_STRUCT_CONVENTION ()*/);
1776 #endif
1777 #ifdef FRAME_INIT_SAVED_REGS
1778   if (GDB_MULTI_ARCH)
1779     fprintf_unfiltered (file,
1780                         "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
1781                         (long) current_gdbarch->frame_init_saved_regs
1782                         /*FRAME_INIT_SAVED_REGS ()*/);
1783 #endif
1784 #ifdef INIT_EXTRA_FRAME_INFO
1785   if (GDB_MULTI_ARCH)
1786     fprintf_unfiltered (file,
1787                         "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
1788                         (long) current_gdbarch->init_extra_frame_info
1789                         /*INIT_EXTRA_FRAME_INFO ()*/);
1790 #endif
1791 #ifdef SKIP_PROLOGUE
1792   if (GDB_MULTI_ARCH)
1793     fprintf_unfiltered (file,
1794                         "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
1795                         (long) current_gdbarch->skip_prologue
1796                         /*SKIP_PROLOGUE ()*/);
1797 #endif
1798 #ifdef PROLOGUE_FRAMELESS_P
1799   if (GDB_MULTI_ARCH)
1800     fprintf_unfiltered (file,
1801                         "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
1802                         (long) current_gdbarch->prologue_frameless_p
1803                         /*PROLOGUE_FRAMELESS_P ()*/);
1804 #endif
1805 #ifdef INNER_THAN
1806   if (GDB_MULTI_ARCH)
1807     fprintf_unfiltered (file,
1808                         "gdbarch_dump: INNER_THAN = 0x%08lx\n",
1809                         (long) current_gdbarch->inner_than
1810                         /*INNER_THAN ()*/);
1811 #endif
1812 #ifdef BREAKPOINT_FROM_PC
1813   if (GDB_MULTI_ARCH)
1814     fprintf_unfiltered (file,
1815                         "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
1816                         (long) current_gdbarch->breakpoint_from_pc
1817                         /*BREAKPOINT_FROM_PC ()*/);
1818 #endif
1819 #ifdef MEMORY_INSERT_BREAKPOINT
1820   if (GDB_MULTI_ARCH)
1821     fprintf_unfiltered (file,
1822                         "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
1823                         (long) current_gdbarch->memory_insert_breakpoint
1824                         /*MEMORY_INSERT_BREAKPOINT ()*/);
1825 #endif
1826 #ifdef MEMORY_REMOVE_BREAKPOINT
1827   if (GDB_MULTI_ARCH)
1828     fprintf_unfiltered (file,
1829                         "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
1830                         (long) current_gdbarch->memory_remove_breakpoint
1831                         /*MEMORY_REMOVE_BREAKPOINT ()*/);
1832 #endif
1833 #ifdef DECR_PC_AFTER_BREAK
1834   fprintf_unfiltered (file,
1835                       "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1836                       (long) DECR_PC_AFTER_BREAK);
1837 #endif
1838 #ifdef FUNCTION_START_OFFSET
1839   fprintf_unfiltered (file,
1840                       "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1841                       (long) FUNCTION_START_OFFSET);
1842 #endif
1843 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
1844   if (GDB_MULTI_ARCH)
1845     fprintf_unfiltered (file,
1846                         "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
1847                         (long) current_gdbarch->remote_translate_xfer_address
1848                         /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
1849 #endif
1850 #ifdef FRAME_ARGS_SKIP
1851   fprintf_unfiltered (file,
1852                       "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1853                       (long) FRAME_ARGS_SKIP);
1854 #endif
1855 #ifdef FRAMELESS_FUNCTION_INVOCATION
1856   if (GDB_MULTI_ARCH)
1857     fprintf_unfiltered (file,
1858                         "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
1859                         (long) current_gdbarch->frameless_function_invocation
1860                         /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1861 #endif
1862 #ifdef FRAME_CHAIN
1863   if (GDB_MULTI_ARCH)
1864     fprintf_unfiltered (file,
1865                         "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
1866                         (long) current_gdbarch->frame_chain
1867                         /*FRAME_CHAIN ()*/);
1868 #endif
1869 #ifdef FRAME_CHAIN_VALID
1870   if (GDB_MULTI_ARCH)
1871     fprintf_unfiltered (file,
1872                         "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
1873                         (long) current_gdbarch->frame_chain_valid
1874                         /*FRAME_CHAIN_VALID ()*/);
1875 #endif
1876 #ifdef FRAME_SAVED_PC
1877   if (GDB_MULTI_ARCH)
1878     fprintf_unfiltered (file,
1879                         "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
1880                         (long) current_gdbarch->frame_saved_pc
1881                         /*FRAME_SAVED_PC ()*/);
1882 #endif
1883 #ifdef FRAME_ARGS_ADDRESS
1884   if (GDB_MULTI_ARCH)
1885     fprintf_unfiltered (file,
1886                         "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
1887                         (long) current_gdbarch->frame_args_address
1888                         /*FRAME_ARGS_ADDRESS ()*/);
1889 #endif
1890 #ifdef FRAME_LOCALS_ADDRESS
1891   if (GDB_MULTI_ARCH)
1892     fprintf_unfiltered (file,
1893                         "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
1894                         (long) current_gdbarch->frame_locals_address
1895                         /*FRAME_LOCALS_ADDRESS ()*/);
1896 #endif
1897 #ifdef SAVED_PC_AFTER_CALL
1898   if (GDB_MULTI_ARCH)
1899     fprintf_unfiltered (file,
1900                         "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
1901                         (long) current_gdbarch->saved_pc_after_call
1902                         /*SAVED_PC_AFTER_CALL ()*/);
1903 #endif
1904 #ifdef FRAME_NUM_ARGS
1905   if (GDB_MULTI_ARCH)
1906     fprintf_unfiltered (file,
1907                         "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
1908                         (long) current_gdbarch->frame_num_args
1909                         /*FRAME_NUM_ARGS ()*/);
1910 #endif
1911 #ifdef STACK_ALIGN
1912   if (GDB_MULTI_ARCH)
1913     fprintf_unfiltered (file,
1914                         "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
1915                         (long) current_gdbarch->stack_align
1916                         /*STACK_ALIGN ()*/);
1917 #endif
1918 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1919   fprintf_unfiltered (file,
1920                       "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %ld\n",
1921                       (long) EXTRA_STACK_ALIGNMENT_NEEDED);
1922 #endif
1923 #ifdef REG_STRUCT_HAS_ADDR
1924   if (GDB_MULTI_ARCH)
1925     fprintf_unfiltered (file,
1926                         "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
1927                         (long) current_gdbarch->reg_struct_has_addr
1928                         /*REG_STRUCT_HAS_ADDR ()*/);
1929 #endif
1930 #ifdef SAVE_DUMMY_FRAME_TOS
1931   if (GDB_MULTI_ARCH)
1932     fprintf_unfiltered (file,
1933                         "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
1934                         (long) current_gdbarch->save_dummy_frame_tos
1935                         /*SAVE_DUMMY_FRAME_TOS ()*/);
1936 #endif
1937 #ifdef TARGET_FLOAT_FORMAT
1938   fprintf_unfiltered (file,
1939                       "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
1940                       (long) TARGET_FLOAT_FORMAT);
1941 #endif
1942 #ifdef TARGET_DOUBLE_FORMAT
1943   fprintf_unfiltered (file,
1944                       "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
1945                       (long) TARGET_DOUBLE_FORMAT);
1946 #endif
1947 #ifdef TARGET_LONG_DOUBLE_FORMAT
1948   fprintf_unfiltered (file,
1949                       "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
1950                       (long) TARGET_LONG_DOUBLE_FORMAT);
1951 #endif
1952   if (current_gdbarch->dump_tdep != NULL)
1953     current_gdbarch->dump_tdep (current_gdbarch, file);
1954 }
1955
1956 struct gdbarch_tdep *
1957 gdbarch_tdep (struct gdbarch *gdbarch)
1958 {
1959   if (gdbarch_debug >= 2)
1960     fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
1961   return gdbarch->tdep;
1962 }
1963
1964
1965 const struct bfd_arch_info *
1966 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
1967 {
1968   if (gdbarch_debug >= 2)
1969     fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
1970   return gdbarch->bfd_arch_info;
1971 }
1972
1973 int
1974 gdbarch_byte_order (struct gdbarch *gdbarch)
1975 {
1976   if (gdbarch_debug >= 2)
1977     fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
1978   return gdbarch->byte_order;
1979 }
1980
1981 int
1982 gdbarch_short_bit (struct gdbarch *gdbarch)
1983 {
1984   /* Skip verify of short_bit, invalid_p == 0 */
1985   if (gdbarch_debug >= 2)
1986     fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
1987   return gdbarch->short_bit;
1988 }
1989
1990 void
1991 set_gdbarch_short_bit (struct gdbarch *gdbarch,
1992                        int short_bit)
1993 {
1994   gdbarch->short_bit = short_bit;
1995 }
1996
1997 int
1998 gdbarch_int_bit (struct gdbarch *gdbarch)
1999 {
2000   /* Skip verify of int_bit, invalid_p == 0 */
2001   if (gdbarch_debug >= 2)
2002     fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
2003   return gdbarch->int_bit;
2004 }
2005
2006 void
2007 set_gdbarch_int_bit (struct gdbarch *gdbarch,
2008                      int int_bit)
2009 {
2010   gdbarch->int_bit = int_bit;
2011 }
2012
2013 int
2014 gdbarch_long_bit (struct gdbarch *gdbarch)
2015 {
2016   /* Skip verify of long_bit, invalid_p == 0 */
2017   if (gdbarch_debug >= 2)
2018     fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
2019   return gdbarch->long_bit;
2020 }
2021
2022 void
2023 set_gdbarch_long_bit (struct gdbarch *gdbarch,
2024                       int long_bit)
2025 {
2026   gdbarch->long_bit = long_bit;
2027 }
2028
2029 int
2030 gdbarch_long_long_bit (struct gdbarch *gdbarch)
2031 {
2032   /* Skip verify of long_long_bit, invalid_p == 0 */
2033   if (gdbarch_debug >= 2)
2034     fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
2035   return gdbarch->long_long_bit;
2036 }
2037
2038 void
2039 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
2040                            int long_long_bit)
2041 {
2042   gdbarch->long_long_bit = long_long_bit;
2043 }
2044
2045 int
2046 gdbarch_float_bit (struct gdbarch *gdbarch)
2047 {
2048   /* Skip verify of float_bit, invalid_p == 0 */
2049   if (gdbarch_debug >= 2)
2050     fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
2051   return gdbarch->float_bit;
2052 }
2053
2054 void
2055 set_gdbarch_float_bit (struct gdbarch *gdbarch,
2056                        int float_bit)
2057 {
2058   gdbarch->float_bit = float_bit;
2059 }
2060
2061 int
2062 gdbarch_double_bit (struct gdbarch *gdbarch)
2063 {
2064   /* Skip verify of double_bit, invalid_p == 0 */
2065   if (gdbarch_debug >= 2)
2066     fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
2067   return gdbarch->double_bit;
2068 }
2069
2070 void
2071 set_gdbarch_double_bit (struct gdbarch *gdbarch,
2072                         int double_bit)
2073 {
2074   gdbarch->double_bit = double_bit;
2075 }
2076
2077 int
2078 gdbarch_long_double_bit (struct gdbarch *gdbarch)
2079 {
2080   /* Skip verify of long_double_bit, invalid_p == 0 */
2081   if (gdbarch_debug >= 2)
2082     fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
2083   return gdbarch->long_double_bit;
2084 }
2085
2086 void
2087 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
2088                              int long_double_bit)
2089 {
2090   gdbarch->long_double_bit = long_double_bit;
2091 }
2092
2093 int
2094 gdbarch_ptr_bit (struct gdbarch *gdbarch)
2095 {
2096   /* Skip verify of ptr_bit, invalid_p == 0 */
2097   if (gdbarch_debug >= 2)
2098     fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
2099   return gdbarch->ptr_bit;
2100 }
2101
2102 void
2103 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
2104                      int ptr_bit)
2105 {
2106   gdbarch->ptr_bit = ptr_bit;
2107 }
2108
2109 int
2110 gdbarch_addr_bit (struct gdbarch *gdbarch)
2111 {
2112   if (gdbarch->addr_bit == 0)
2113     internal_error ("gdbarch: gdbarch_addr_bit invalid");
2114   if (gdbarch_debug >= 2)
2115     fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
2116   return gdbarch->addr_bit;
2117 }
2118
2119 void
2120 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
2121                       int addr_bit)
2122 {
2123   gdbarch->addr_bit = addr_bit;
2124 }
2125
2126 int
2127 gdbarch_bfd_vma_bit (struct gdbarch *gdbarch)
2128 {
2129   /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2130   if (gdbarch_debug >= 2)
2131     fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n");
2132   return gdbarch->bfd_vma_bit;
2133 }
2134
2135 void
2136 set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch,
2137                          int bfd_vma_bit)
2138 {
2139   gdbarch->bfd_vma_bit = bfd_vma_bit;
2140 }
2141
2142 int
2143 gdbarch_ieee_float (struct gdbarch *gdbarch)
2144 {
2145   /* Skip verify of ieee_float, invalid_p == 0 */
2146   if (gdbarch_debug >= 2)
2147     fprintf_unfiltered (gdb_stdlog, "gdbarch_ieee_float called\n");
2148   return gdbarch->ieee_float;
2149 }
2150
2151 void
2152 set_gdbarch_ieee_float (struct gdbarch *gdbarch,
2153                         int ieee_float)
2154 {
2155   gdbarch->ieee_float = ieee_float;
2156 }
2157
2158 CORE_ADDR
2159 gdbarch_read_pc (struct gdbarch *gdbarch, int pid)
2160 {
2161   if (gdbarch->read_pc == 0)
2162     internal_error ("gdbarch: gdbarch_read_pc invalid");
2163   if (gdbarch_debug >= 2)
2164     fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
2165   return gdbarch->read_pc (pid);
2166 }
2167
2168 void
2169 set_gdbarch_read_pc (struct gdbarch *gdbarch,
2170                      gdbarch_read_pc_ftype read_pc)
2171 {
2172   gdbarch->read_pc = read_pc;
2173 }
2174
2175 void
2176 gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, int pid)
2177 {
2178   if (gdbarch->write_pc == 0)
2179     internal_error ("gdbarch: gdbarch_write_pc invalid");
2180   if (gdbarch_debug >= 2)
2181     fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
2182   gdbarch->write_pc (val, pid);
2183 }
2184
2185 void
2186 set_gdbarch_write_pc (struct gdbarch *gdbarch,
2187                       gdbarch_write_pc_ftype write_pc)
2188 {
2189   gdbarch->write_pc = write_pc;
2190 }
2191
2192 CORE_ADDR
2193 gdbarch_read_fp (struct gdbarch *gdbarch)
2194 {
2195   if (gdbarch->read_fp == 0)
2196     internal_error ("gdbarch: gdbarch_read_fp invalid");
2197   if (gdbarch_debug >= 2)
2198     fprintf_unfiltered (gdb_stdlog, "gdbarch_read_fp called\n");
2199   return gdbarch->read_fp ();
2200 }
2201
2202 void
2203 set_gdbarch_read_fp (struct gdbarch *gdbarch,
2204                      gdbarch_read_fp_ftype read_fp)
2205 {
2206   gdbarch->read_fp = read_fp;
2207 }
2208
2209 void
2210 gdbarch_write_fp (struct gdbarch *gdbarch, CORE_ADDR val)
2211 {
2212   if (gdbarch->write_fp == 0)
2213     internal_error ("gdbarch: gdbarch_write_fp invalid");
2214   if (gdbarch_debug >= 2)
2215     fprintf_unfiltered (gdb_stdlog, "gdbarch_write_fp called\n");
2216   gdbarch->write_fp (val);
2217 }
2218
2219 void
2220 set_gdbarch_write_fp (struct gdbarch *gdbarch,
2221                       gdbarch_write_fp_ftype write_fp)
2222 {
2223   gdbarch->write_fp = write_fp;
2224 }
2225
2226 CORE_ADDR
2227 gdbarch_read_sp (struct gdbarch *gdbarch)
2228 {
2229   if (gdbarch->read_sp == 0)
2230     internal_error ("gdbarch: gdbarch_read_sp invalid");
2231   if (gdbarch_debug >= 2)
2232     fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
2233   return gdbarch->read_sp ();
2234 }
2235
2236 void
2237 set_gdbarch_read_sp (struct gdbarch *gdbarch,
2238                      gdbarch_read_sp_ftype read_sp)
2239 {
2240   gdbarch->read_sp = read_sp;
2241 }
2242
2243 void
2244 gdbarch_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
2245 {
2246   if (gdbarch->write_sp == 0)
2247     internal_error ("gdbarch: gdbarch_write_sp invalid");
2248   if (gdbarch_debug >= 2)
2249     fprintf_unfiltered (gdb_stdlog, "gdbarch_write_sp called\n");
2250   gdbarch->write_sp (val);
2251 }
2252
2253 void
2254 set_gdbarch_write_sp (struct gdbarch *gdbarch,
2255                       gdbarch_write_sp_ftype write_sp)
2256 {
2257   gdbarch->write_sp = write_sp;
2258 }
2259
2260 int
2261 gdbarch_num_regs (struct gdbarch *gdbarch)
2262 {
2263   if (gdbarch->num_regs == -1)
2264     internal_error ("gdbarch: gdbarch_num_regs invalid");
2265   if (gdbarch_debug >= 2)
2266     fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
2267   return gdbarch->num_regs;
2268 }
2269
2270 void
2271 set_gdbarch_num_regs (struct gdbarch *gdbarch,
2272                       int num_regs)
2273 {
2274   gdbarch->num_regs = num_regs;
2275 }
2276
2277 int
2278 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
2279 {
2280   /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2281   if (gdbarch_debug >= 2)
2282     fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
2283   return gdbarch->num_pseudo_regs;
2284 }
2285
2286 void
2287 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
2288                              int num_pseudo_regs)
2289 {
2290   gdbarch->num_pseudo_regs = num_pseudo_regs;
2291 }
2292
2293 int
2294 gdbarch_sp_regnum (struct gdbarch *gdbarch)
2295 {
2296   if (gdbarch->sp_regnum == -1)
2297     internal_error ("gdbarch: gdbarch_sp_regnum invalid");
2298   if (gdbarch_debug >= 2)
2299     fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
2300   return gdbarch->sp_regnum;
2301 }
2302
2303 void
2304 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
2305                        int sp_regnum)
2306 {
2307   gdbarch->sp_regnum = sp_regnum;
2308 }
2309
2310 int
2311 gdbarch_fp_regnum (struct gdbarch *gdbarch)
2312 {
2313   if (gdbarch->fp_regnum == -1)
2314     internal_error ("gdbarch: gdbarch_fp_regnum invalid");
2315   if (gdbarch_debug >= 2)
2316     fprintf_unfiltered (gdb_stdlog, "gdbarch_fp_regnum called\n");
2317   return gdbarch->fp_regnum;
2318 }
2319
2320 void
2321 set_gdbarch_fp_regnum (struct gdbarch *gdbarch,
2322                        int fp_regnum)
2323 {
2324   gdbarch->fp_regnum = fp_regnum;
2325 }
2326
2327 int
2328 gdbarch_pc_regnum (struct gdbarch *gdbarch)
2329 {
2330   if (gdbarch->pc_regnum == -1)
2331     internal_error ("gdbarch: gdbarch_pc_regnum invalid");
2332   if (gdbarch_debug >= 2)
2333     fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
2334   return gdbarch->pc_regnum;
2335 }
2336
2337 void
2338 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
2339                        int pc_regnum)
2340 {
2341   gdbarch->pc_regnum = pc_regnum;
2342 }
2343
2344 int
2345 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
2346 {
2347   /* Skip verify of fp0_regnum, invalid_p == 0 */
2348   if (gdbarch_debug >= 2)
2349     fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
2350   return gdbarch->fp0_regnum;
2351 }
2352
2353 void
2354 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
2355                         int fp0_regnum)
2356 {
2357   gdbarch->fp0_regnum = fp0_regnum;
2358 }
2359
2360 int
2361 gdbarch_npc_regnum (struct gdbarch *gdbarch)
2362 {
2363   /* Skip verify of npc_regnum, invalid_p == 0 */
2364   if (gdbarch_debug >= 2)
2365     fprintf_unfiltered (gdb_stdlog, "gdbarch_npc_regnum called\n");
2366   return gdbarch->npc_regnum;
2367 }
2368
2369 void
2370 set_gdbarch_npc_regnum (struct gdbarch *gdbarch,
2371                         int npc_regnum)
2372 {
2373   gdbarch->npc_regnum = npc_regnum;
2374 }
2375
2376 int
2377 gdbarch_nnpc_regnum (struct gdbarch *gdbarch)
2378 {
2379   /* Skip verify of nnpc_regnum, invalid_p == 0 */
2380   if (gdbarch_debug >= 2)
2381     fprintf_unfiltered (gdb_stdlog, "gdbarch_nnpc_regnum called\n");
2382   return gdbarch->nnpc_regnum;
2383 }
2384
2385 void
2386 set_gdbarch_nnpc_regnum (struct gdbarch *gdbarch,
2387                          int nnpc_regnum)
2388 {
2389   gdbarch->nnpc_regnum = nnpc_regnum;
2390 }
2391
2392 char *
2393 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
2394 {
2395   if (gdbarch->register_name == 0)
2396     internal_error ("gdbarch: gdbarch_register_name invalid");
2397   if (gdbarch_debug >= 2)
2398     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
2399   return gdbarch->register_name (regnr);
2400 }
2401
2402 void
2403 set_gdbarch_register_name (struct gdbarch *gdbarch,
2404                            gdbarch_register_name_ftype register_name)
2405 {
2406   gdbarch->register_name = register_name;
2407 }
2408
2409 int
2410 gdbarch_register_size (struct gdbarch *gdbarch)
2411 {
2412   if (gdbarch->register_size == -1)
2413     internal_error ("gdbarch: gdbarch_register_size invalid");
2414   if (gdbarch_debug >= 2)
2415     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_size called\n");
2416   return gdbarch->register_size;
2417 }
2418
2419 void
2420 set_gdbarch_register_size (struct gdbarch *gdbarch,
2421                            int register_size)
2422 {
2423   gdbarch->register_size = register_size;
2424 }
2425
2426 int
2427 gdbarch_register_bytes (struct gdbarch *gdbarch)
2428 {
2429   if (gdbarch->register_bytes == -1)
2430     internal_error ("gdbarch: gdbarch_register_bytes invalid");
2431   if (gdbarch_debug >= 2)
2432     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes called\n");
2433   return gdbarch->register_bytes;
2434 }
2435
2436 void
2437 set_gdbarch_register_bytes (struct gdbarch *gdbarch,
2438                             int register_bytes)
2439 {
2440   gdbarch->register_bytes = register_bytes;
2441 }
2442
2443 int
2444 gdbarch_register_byte (struct gdbarch *gdbarch, int reg_nr)
2445 {
2446   if (gdbarch->register_byte == 0)
2447     internal_error ("gdbarch: gdbarch_register_byte invalid");
2448   if (gdbarch_debug >= 2)
2449     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_byte called\n");
2450   return gdbarch->register_byte (reg_nr);
2451 }
2452
2453 void
2454 set_gdbarch_register_byte (struct gdbarch *gdbarch,
2455                            gdbarch_register_byte_ftype register_byte)
2456 {
2457   gdbarch->register_byte = register_byte;
2458 }
2459
2460 int
2461 gdbarch_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
2462 {
2463   if (gdbarch->register_raw_size == 0)
2464     internal_error ("gdbarch: gdbarch_register_raw_size invalid");
2465   if (gdbarch_debug >= 2)
2466     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_raw_size called\n");
2467   return gdbarch->register_raw_size (reg_nr);
2468 }
2469
2470 void
2471 set_gdbarch_register_raw_size (struct gdbarch *gdbarch,
2472                                gdbarch_register_raw_size_ftype register_raw_size)
2473 {
2474   gdbarch->register_raw_size = register_raw_size;
2475 }
2476
2477 int
2478 gdbarch_max_register_raw_size (struct gdbarch *gdbarch)
2479 {
2480   if (gdbarch->max_register_raw_size == -1)
2481     internal_error ("gdbarch: gdbarch_max_register_raw_size invalid");
2482   if (gdbarch_debug >= 2)
2483     fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_raw_size called\n");
2484   return gdbarch->max_register_raw_size;
2485 }
2486
2487 void
2488 set_gdbarch_max_register_raw_size (struct gdbarch *gdbarch,
2489                                    int max_register_raw_size)
2490 {
2491   gdbarch->max_register_raw_size = max_register_raw_size;
2492 }
2493
2494 int
2495 gdbarch_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
2496 {
2497   if (gdbarch->register_virtual_size == 0)
2498     internal_error ("gdbarch: gdbarch_register_virtual_size invalid");
2499   if (gdbarch_debug >= 2)
2500     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_size called\n");
2501   return gdbarch->register_virtual_size (reg_nr);
2502 }
2503
2504 void
2505 set_gdbarch_register_virtual_size (struct gdbarch *gdbarch,
2506                                    gdbarch_register_virtual_size_ftype register_virtual_size)
2507 {
2508   gdbarch->register_virtual_size = register_virtual_size;
2509 }
2510
2511 int
2512 gdbarch_max_register_virtual_size (struct gdbarch *gdbarch)
2513 {
2514   if (gdbarch->max_register_virtual_size == -1)
2515     internal_error ("gdbarch: gdbarch_max_register_virtual_size invalid");
2516   if (gdbarch_debug >= 2)
2517     fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_virtual_size called\n");
2518   return gdbarch->max_register_virtual_size;
2519 }
2520
2521 void
2522 set_gdbarch_max_register_virtual_size (struct gdbarch *gdbarch,
2523                                        int max_register_virtual_size)
2524 {
2525   gdbarch->max_register_virtual_size = max_register_virtual_size;
2526 }
2527
2528 struct type *
2529 gdbarch_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
2530 {
2531   if (gdbarch->register_virtual_type == 0)
2532     internal_error ("gdbarch: gdbarch_register_virtual_type invalid");
2533   if (gdbarch_debug >= 2)
2534     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_type called\n");
2535   return gdbarch->register_virtual_type (reg_nr);
2536 }
2537
2538 void
2539 set_gdbarch_register_virtual_type (struct gdbarch *gdbarch,
2540                                    gdbarch_register_virtual_type_ftype register_virtual_type)
2541 {
2542   gdbarch->register_virtual_type = register_virtual_type;
2543 }
2544
2545 void
2546 gdbarch_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs)
2547 {
2548   if (gdbarch->do_registers_info == 0)
2549     internal_error ("gdbarch: gdbarch_do_registers_info invalid");
2550   if (gdbarch_debug >= 2)
2551     fprintf_unfiltered (gdb_stdlog, "gdbarch_do_registers_info called\n");
2552   gdbarch->do_registers_info (reg_nr, fpregs);
2553 }
2554
2555 void
2556 set_gdbarch_do_registers_info (struct gdbarch *gdbarch,
2557                                gdbarch_do_registers_info_ftype do_registers_info)
2558 {
2559   gdbarch->do_registers_info = do_registers_info;
2560 }
2561
2562 int
2563 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
2564 {
2565   if (gdbarch->register_sim_regno == 0)
2566     internal_error ("gdbarch: gdbarch_register_sim_regno invalid");
2567   if (gdbarch_debug >= 2)
2568     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
2569   return gdbarch->register_sim_regno (reg_nr);
2570 }
2571
2572 void
2573 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
2574                                 gdbarch_register_sim_regno_ftype register_sim_regno)
2575 {
2576   gdbarch->register_sim_regno = register_sim_regno;
2577 }
2578
2579 int
2580 gdbarch_use_generic_dummy_frames (struct gdbarch *gdbarch)
2581 {
2582   if (gdbarch->use_generic_dummy_frames == -1)
2583     internal_error ("gdbarch: gdbarch_use_generic_dummy_frames invalid");
2584   if (gdbarch_debug >= 2)
2585     fprintf_unfiltered (gdb_stdlog, "gdbarch_use_generic_dummy_frames called\n");
2586   return gdbarch->use_generic_dummy_frames;
2587 }
2588
2589 void
2590 set_gdbarch_use_generic_dummy_frames (struct gdbarch *gdbarch,
2591                                       int use_generic_dummy_frames)
2592 {
2593   gdbarch->use_generic_dummy_frames = use_generic_dummy_frames;
2594 }
2595
2596 int
2597 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
2598 {
2599   if (gdbarch->call_dummy_location == 0)
2600     internal_error ("gdbarch: gdbarch_call_dummy_location invalid");
2601   if (gdbarch_debug >= 2)
2602     fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
2603   return gdbarch->call_dummy_location;
2604 }
2605
2606 void
2607 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
2608                                  int call_dummy_location)
2609 {
2610   gdbarch->call_dummy_location = call_dummy_location;
2611 }
2612
2613 CORE_ADDR
2614 gdbarch_call_dummy_address (struct gdbarch *gdbarch)
2615 {
2616   if (gdbarch->call_dummy_address == 0)
2617     internal_error ("gdbarch: gdbarch_call_dummy_address invalid");
2618   if (gdbarch_debug >= 2)
2619     fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_address called\n");
2620   return gdbarch->call_dummy_address ();
2621 }
2622
2623 void
2624 set_gdbarch_call_dummy_address (struct gdbarch *gdbarch,
2625                                 gdbarch_call_dummy_address_ftype call_dummy_address)
2626 {
2627   gdbarch->call_dummy_address = call_dummy_address;
2628 }
2629
2630 CORE_ADDR
2631 gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch)
2632 {
2633   if (gdbarch->call_dummy_start_offset == -1)
2634     internal_error ("gdbarch: gdbarch_call_dummy_start_offset invalid");
2635   if (gdbarch_debug >= 2)
2636     fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_start_offset called\n");
2637   return gdbarch->call_dummy_start_offset;
2638 }
2639
2640 void
2641 set_gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch,
2642                                      CORE_ADDR call_dummy_start_offset)
2643 {
2644   gdbarch->call_dummy_start_offset = call_dummy_start_offset;
2645 }
2646
2647 CORE_ADDR
2648 gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch)
2649 {
2650   if (gdbarch->call_dummy_breakpoint_offset == -1)
2651     internal_error ("gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
2652   if (gdbarch_debug >= 2)
2653     fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset called\n");
2654   return gdbarch->call_dummy_breakpoint_offset;
2655 }
2656
2657 void
2658 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch,
2659                                           CORE_ADDR call_dummy_breakpoint_offset)
2660 {
2661   gdbarch->call_dummy_breakpoint_offset = call_dummy_breakpoint_offset;
2662 }
2663
2664 int
2665 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch)
2666 {
2667   if (gdbarch->call_dummy_breakpoint_offset_p == -1)
2668     internal_error ("gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
2669   if (gdbarch_debug >= 2)
2670     fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset_p called\n");
2671   return gdbarch->call_dummy_breakpoint_offset_p;
2672 }
2673
2674 void
2675 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch,
2676                                             int call_dummy_breakpoint_offset_p)
2677 {
2678   gdbarch->call_dummy_breakpoint_offset_p = call_dummy_breakpoint_offset_p;
2679 }
2680
2681 int
2682 gdbarch_call_dummy_length (struct gdbarch *gdbarch)
2683 {
2684   if (gdbarch->call_dummy_length == -1)
2685     internal_error ("gdbarch: gdbarch_call_dummy_length invalid");
2686   if (gdbarch_debug >= 2)
2687     fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_length called\n");
2688   return gdbarch->call_dummy_length;
2689 }
2690
2691 void
2692 set_gdbarch_call_dummy_length (struct gdbarch *gdbarch,
2693                                int call_dummy_length)
2694 {
2695   gdbarch->call_dummy_length = call_dummy_length;
2696 }
2697
2698 int
2699 gdbarch_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address)
2700 {
2701   if (gdbarch->pc_in_call_dummy == 0)
2702     internal_error ("gdbarch: gdbarch_pc_in_call_dummy invalid");
2703   if (gdbarch_debug >= 2)
2704     fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_in_call_dummy called\n");
2705   return gdbarch->pc_in_call_dummy (pc, sp, frame_address);
2706 }
2707
2708 void
2709 set_gdbarch_pc_in_call_dummy (struct gdbarch *gdbarch,
2710                               gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy)
2711 {
2712   gdbarch->pc_in_call_dummy = pc_in_call_dummy;
2713 }
2714
2715 int
2716 gdbarch_call_dummy_p (struct gdbarch *gdbarch)
2717 {
2718   if (gdbarch->call_dummy_p == -1)
2719     internal_error ("gdbarch: gdbarch_call_dummy_p invalid");
2720   if (gdbarch_debug >= 2)
2721     fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_p called\n");
2722   return gdbarch->call_dummy_p;
2723 }
2724
2725 void
2726 set_gdbarch_call_dummy_p (struct gdbarch *gdbarch,
2727                           int call_dummy_p)
2728 {
2729   gdbarch->call_dummy_p = call_dummy_p;
2730 }
2731
2732 LONGEST *
2733 gdbarch_call_dummy_words (struct gdbarch *gdbarch)
2734 {
2735   /* Skip verify of call_dummy_words, invalid_p == 0 */
2736   if (gdbarch_debug >= 2)
2737     fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_words called\n");
2738   return gdbarch->call_dummy_words;
2739 }
2740
2741 void
2742 set_gdbarch_call_dummy_words (struct gdbarch *gdbarch,
2743                               LONGEST * call_dummy_words)
2744 {
2745   gdbarch->call_dummy_words = call_dummy_words;
2746 }
2747
2748 int
2749 gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch)
2750 {
2751   /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
2752   if (gdbarch_debug >= 2)
2753     fprintf_unfiltered (gdb_stdlog, "gdbarch_sizeof_call_dummy_words called\n");
2754   return gdbarch->sizeof_call_dummy_words;
2755 }
2756
2757 void
2758 set_gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch,
2759                                      int sizeof_call_dummy_words)
2760 {
2761   gdbarch->sizeof_call_dummy_words = sizeof_call_dummy_words;
2762 }
2763
2764 int
2765 gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch)
2766 {
2767   if (gdbarch->call_dummy_stack_adjust_p == -1)
2768     internal_error ("gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
2769   if (gdbarch_debug >= 2)
2770     fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust_p called\n");
2771   return gdbarch->call_dummy_stack_adjust_p;
2772 }
2773
2774 void
2775 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch,
2776                                        int call_dummy_stack_adjust_p)
2777 {
2778   gdbarch->call_dummy_stack_adjust_p = call_dummy_stack_adjust_p;
2779 }
2780
2781 int
2782 gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch)
2783 {
2784   if (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0)
2785     internal_error ("gdbarch: gdbarch_call_dummy_stack_adjust invalid");
2786   if (gdbarch_debug >= 2)
2787     fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust called\n");
2788   return gdbarch->call_dummy_stack_adjust;
2789 }
2790
2791 void
2792 set_gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch,
2793                                      int call_dummy_stack_adjust)
2794 {
2795   gdbarch->call_dummy_stack_adjust = call_dummy_stack_adjust;
2796 }
2797
2798 void
2799 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)
2800 {
2801   if (gdbarch->fix_call_dummy == 0)
2802     internal_error ("gdbarch: gdbarch_fix_call_dummy invalid");
2803   if (gdbarch_debug >= 2)
2804     fprintf_unfiltered (gdb_stdlog, "gdbarch_fix_call_dummy called\n");
2805   gdbarch->fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p);
2806 }
2807
2808 void
2809 set_gdbarch_fix_call_dummy (struct gdbarch *gdbarch,
2810                             gdbarch_fix_call_dummy_ftype fix_call_dummy)
2811 {
2812   gdbarch->fix_call_dummy = fix_call_dummy;
2813 }
2814
2815 int
2816 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
2817 {
2818   if (gdbarch_debug >= 2)
2819     fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
2820   return gdbarch->believe_pcc_promotion;
2821 }
2822
2823 void
2824 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
2825                                    int believe_pcc_promotion)
2826 {
2827   gdbarch->believe_pcc_promotion = believe_pcc_promotion;
2828 }
2829
2830 int
2831 gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch)
2832 {
2833   if (gdbarch_debug >= 2)
2834     fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion_type called\n");
2835   return gdbarch->believe_pcc_promotion_type;
2836 }
2837
2838 void
2839 set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch,
2840                                         int believe_pcc_promotion_type)
2841 {
2842   gdbarch->believe_pcc_promotion_type = believe_pcc_promotion_type;
2843 }
2844
2845 int
2846 gdbarch_coerce_float_to_double (struct gdbarch *gdbarch, struct type *formal, struct type *actual)
2847 {
2848   if (gdbarch->coerce_float_to_double == 0)
2849     internal_error ("gdbarch: gdbarch_coerce_float_to_double invalid");
2850   if (gdbarch_debug >= 2)
2851     fprintf_unfiltered (gdb_stdlog, "gdbarch_coerce_float_to_double called\n");
2852   return gdbarch->coerce_float_to_double (formal, actual);
2853 }
2854
2855 void
2856 set_gdbarch_coerce_float_to_double (struct gdbarch *gdbarch,
2857                                     gdbarch_coerce_float_to_double_ftype coerce_float_to_double)
2858 {
2859   gdbarch->coerce_float_to_double = coerce_float_to_double;
2860 }
2861
2862 void
2863 gdbarch_get_saved_register (struct gdbarch *gdbarch, char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval)
2864 {
2865   if (gdbarch->get_saved_register == 0)
2866     internal_error ("gdbarch: gdbarch_get_saved_register invalid");
2867   if (gdbarch_debug >= 2)
2868     fprintf_unfiltered (gdb_stdlog, "gdbarch_get_saved_register called\n");
2869   gdbarch->get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval);
2870 }
2871
2872 void
2873 set_gdbarch_get_saved_register (struct gdbarch *gdbarch,
2874                                 gdbarch_get_saved_register_ftype get_saved_register)
2875 {
2876   gdbarch->get_saved_register = get_saved_register;
2877 }
2878
2879 int
2880 gdbarch_register_convertible (struct gdbarch *gdbarch, int nr)
2881 {
2882   if (gdbarch->register_convertible == 0)
2883     internal_error ("gdbarch: gdbarch_register_convertible invalid");
2884   if (gdbarch_debug >= 2)
2885     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convertible called\n");
2886   return gdbarch->register_convertible (nr);
2887 }
2888
2889 void
2890 set_gdbarch_register_convertible (struct gdbarch *gdbarch,
2891                                   gdbarch_register_convertible_ftype register_convertible)
2892 {
2893   gdbarch->register_convertible = register_convertible;
2894 }
2895
2896 void
2897 gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
2898 {
2899   if (gdbarch->register_convert_to_virtual == 0)
2900     internal_error ("gdbarch: gdbarch_register_convert_to_virtual invalid");
2901   if (gdbarch_debug >= 2)
2902     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_virtual called\n");
2903   gdbarch->register_convert_to_virtual (regnum, type, from, to);
2904 }
2905
2906 void
2907 set_gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch,
2908                                          gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual)
2909 {
2910   gdbarch->register_convert_to_virtual = register_convert_to_virtual;
2911 }
2912
2913 void
2914 gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to)
2915 {
2916   if (gdbarch->register_convert_to_raw == 0)
2917     internal_error ("gdbarch: gdbarch_register_convert_to_raw invalid");
2918   if (gdbarch_debug >= 2)
2919     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_raw called\n");
2920   gdbarch->register_convert_to_raw (type, regnum, from, to);
2921 }
2922
2923 void
2924 set_gdbarch_register_convert_to_raw (struct gdbarch *gdbarch,
2925                                      gdbarch_register_convert_to_raw_ftype register_convert_to_raw)
2926 {
2927   gdbarch->register_convert_to_raw = register_convert_to_raw;
2928 }
2929
2930 void
2931 gdbarch_fetch_pseudo_register (struct gdbarch *gdbarch, int regnum)
2932 {
2933   if (gdbarch->fetch_pseudo_register == 0)
2934     internal_error ("gdbarch: gdbarch_fetch_pseudo_register invalid");
2935   if (gdbarch_debug >= 2)
2936     fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pseudo_register called\n");
2937   gdbarch->fetch_pseudo_register (regnum);
2938 }
2939
2940 void
2941 set_gdbarch_fetch_pseudo_register (struct gdbarch *gdbarch,
2942                                    gdbarch_fetch_pseudo_register_ftype fetch_pseudo_register)
2943 {
2944   gdbarch->fetch_pseudo_register = fetch_pseudo_register;
2945 }
2946
2947 void
2948 gdbarch_store_pseudo_register (struct gdbarch *gdbarch, int regnum)
2949 {
2950   if (gdbarch->store_pseudo_register == 0)
2951     internal_error ("gdbarch: gdbarch_store_pseudo_register invalid");
2952   if (gdbarch_debug >= 2)
2953     fprintf_unfiltered (gdb_stdlog, "gdbarch_store_pseudo_register called\n");
2954   gdbarch->store_pseudo_register (regnum);
2955 }
2956
2957 void
2958 set_gdbarch_store_pseudo_register (struct gdbarch *gdbarch,
2959                                    gdbarch_store_pseudo_register_ftype store_pseudo_register)
2960 {
2961   gdbarch->store_pseudo_register = store_pseudo_register;
2962 }
2963
2964 CORE_ADDR
2965 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
2966 {
2967   if (gdbarch->pointer_to_address == 0)
2968     internal_error ("gdbarch: gdbarch_pointer_to_address invalid");
2969   if (gdbarch_debug >= 2)
2970     fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
2971   return gdbarch->pointer_to_address (type, buf);
2972 }
2973
2974 void
2975 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
2976                                 gdbarch_pointer_to_address_ftype pointer_to_address)
2977 {
2978   gdbarch->pointer_to_address = pointer_to_address;
2979 }
2980
2981 void
2982 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr)
2983 {
2984   if (gdbarch->address_to_pointer == 0)
2985     internal_error ("gdbarch: gdbarch_address_to_pointer invalid");
2986   if (gdbarch_debug >= 2)
2987     fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
2988   gdbarch->address_to_pointer (type, buf, addr);
2989 }
2990
2991 void
2992 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
2993                                 gdbarch_address_to_pointer_ftype address_to_pointer)
2994 {
2995   gdbarch->address_to_pointer = address_to_pointer;
2996 }
2997
2998 int
2999 gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type)
3000 {
3001   if (gdbarch->return_value_on_stack == 0)
3002     internal_error ("gdbarch: gdbarch_return_value_on_stack invalid");
3003   if (gdbarch_debug >= 2)
3004     fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value_on_stack called\n");
3005   return gdbarch->return_value_on_stack (type);
3006 }
3007
3008 void
3009 set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch,
3010                                    gdbarch_return_value_on_stack_ftype return_value_on_stack)
3011 {
3012   gdbarch->return_value_on_stack = return_value_on_stack;
3013 }
3014
3015 void
3016 gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
3017 {
3018   if (gdbarch->extract_return_value == 0)
3019     internal_error ("gdbarch: gdbarch_extract_return_value invalid");
3020   if (gdbarch_debug >= 2)
3021     fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
3022   gdbarch->extract_return_value (type, regbuf, valbuf);
3023 }
3024
3025 void
3026 set_gdbarch_extract_return_value (struct gdbarch *gdbarch,
3027                                   gdbarch_extract_return_value_ftype extract_return_value)
3028 {
3029   gdbarch->extract_return_value = extract_return_value;
3030 }
3031
3032 CORE_ADDR
3033 gdbarch_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
3034 {
3035   if (gdbarch->push_arguments == 0)
3036     internal_error ("gdbarch: gdbarch_push_arguments invalid");
3037   if (gdbarch_debug >= 2)
3038     fprintf_unfiltered (gdb_stdlog, "gdbarch_push_arguments called\n");
3039   return gdbarch->push_arguments (nargs, args, sp, struct_return, struct_addr);
3040 }
3041
3042 void
3043 set_gdbarch_push_arguments (struct gdbarch *gdbarch,
3044                             gdbarch_push_arguments_ftype push_arguments)
3045 {
3046   gdbarch->push_arguments = push_arguments;
3047 }
3048
3049 void
3050 gdbarch_push_dummy_frame (struct gdbarch *gdbarch)
3051 {
3052   if (gdbarch->push_dummy_frame == 0)
3053     internal_error ("gdbarch: gdbarch_push_dummy_frame invalid");
3054   if (gdbarch_debug >= 2)
3055     fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_frame called\n");
3056   gdbarch->push_dummy_frame ();
3057 }
3058
3059 void
3060 set_gdbarch_push_dummy_frame (struct gdbarch *gdbarch,
3061                               gdbarch_push_dummy_frame_ftype push_dummy_frame)
3062 {
3063   gdbarch->push_dummy_frame = push_dummy_frame;
3064 }
3065
3066 CORE_ADDR
3067 gdbarch_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp)
3068 {
3069   if (gdbarch->push_return_address == 0)
3070     internal_error ("gdbarch: gdbarch_push_return_address invalid");
3071   if (gdbarch_debug >= 2)
3072     fprintf_unfiltered (gdb_stdlog, "gdbarch_push_return_address called\n");
3073   return gdbarch->push_return_address (pc, sp);
3074 }
3075
3076 void
3077 set_gdbarch_push_return_address (struct gdbarch *gdbarch,
3078                                  gdbarch_push_return_address_ftype push_return_address)
3079 {
3080   gdbarch->push_return_address = push_return_address;
3081 }
3082
3083 void
3084 gdbarch_pop_frame (struct gdbarch *gdbarch)
3085 {
3086   if (gdbarch->pop_frame == 0)
3087     internal_error ("gdbarch: gdbarch_pop_frame invalid");
3088   if (gdbarch_debug >= 2)
3089     fprintf_unfiltered (gdb_stdlog, "gdbarch_pop_frame called\n");
3090   gdbarch->pop_frame ();
3091 }
3092
3093 void
3094 set_gdbarch_pop_frame (struct gdbarch *gdbarch,
3095                        gdbarch_pop_frame_ftype pop_frame)
3096 {
3097   gdbarch->pop_frame = pop_frame;
3098 }
3099
3100 CORE_ADDR
3101 gdbarch_d10v_make_daddr (struct gdbarch *gdbarch, CORE_ADDR x)
3102 {
3103   if (gdbarch->d10v_make_daddr == 0)
3104     internal_error ("gdbarch: gdbarch_d10v_make_daddr invalid");
3105   if (gdbarch_debug >= 2)
3106     fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_make_daddr called\n");
3107   return gdbarch->d10v_make_daddr (x);
3108 }
3109
3110 void
3111 set_gdbarch_d10v_make_daddr (struct gdbarch *gdbarch,
3112                              gdbarch_d10v_make_daddr_ftype d10v_make_daddr)
3113 {
3114   gdbarch->d10v_make_daddr = d10v_make_daddr;
3115 }
3116
3117 CORE_ADDR
3118 gdbarch_d10v_make_iaddr (struct gdbarch *gdbarch, CORE_ADDR x)
3119 {
3120   if (gdbarch->d10v_make_iaddr == 0)
3121     internal_error ("gdbarch: gdbarch_d10v_make_iaddr invalid");
3122   if (gdbarch_debug >= 2)
3123     fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_make_iaddr called\n");
3124   return gdbarch->d10v_make_iaddr (x);
3125 }
3126
3127 void
3128 set_gdbarch_d10v_make_iaddr (struct gdbarch *gdbarch,
3129                              gdbarch_d10v_make_iaddr_ftype d10v_make_iaddr)
3130 {
3131   gdbarch->d10v_make_iaddr = d10v_make_iaddr;
3132 }
3133
3134 int
3135 gdbarch_d10v_daddr_p (struct gdbarch *gdbarch, CORE_ADDR x)
3136 {
3137   if (gdbarch->d10v_daddr_p == 0)
3138     internal_error ("gdbarch: gdbarch_d10v_daddr_p invalid");
3139   if (gdbarch_debug >= 2)
3140     fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_daddr_p called\n");
3141   return gdbarch->d10v_daddr_p (x);
3142 }
3143
3144 void
3145 set_gdbarch_d10v_daddr_p (struct gdbarch *gdbarch,
3146                           gdbarch_d10v_daddr_p_ftype d10v_daddr_p)
3147 {
3148   gdbarch->d10v_daddr_p = d10v_daddr_p;
3149 }
3150
3151 int
3152 gdbarch_d10v_iaddr_p (struct gdbarch *gdbarch, CORE_ADDR x)
3153 {
3154   if (gdbarch->d10v_iaddr_p == 0)
3155     internal_error ("gdbarch: gdbarch_d10v_iaddr_p invalid");
3156   if (gdbarch_debug >= 2)
3157     fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_iaddr_p called\n");
3158   return gdbarch->d10v_iaddr_p (x);
3159 }
3160
3161 void
3162 set_gdbarch_d10v_iaddr_p (struct gdbarch *gdbarch,
3163                           gdbarch_d10v_iaddr_p_ftype d10v_iaddr_p)
3164 {
3165   gdbarch->d10v_iaddr_p = d10v_iaddr_p;
3166 }
3167
3168 CORE_ADDR
3169 gdbarch_d10v_convert_daddr_to_raw (struct gdbarch *gdbarch, CORE_ADDR x)
3170 {
3171   if (gdbarch->d10v_convert_daddr_to_raw == 0)
3172     internal_error ("gdbarch: gdbarch_d10v_convert_daddr_to_raw invalid");
3173   if (gdbarch_debug >= 2)
3174     fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_convert_daddr_to_raw called\n");
3175   return gdbarch->d10v_convert_daddr_to_raw (x);
3176 }
3177
3178 void
3179 set_gdbarch_d10v_convert_daddr_to_raw (struct gdbarch *gdbarch,
3180                                        gdbarch_d10v_convert_daddr_to_raw_ftype d10v_convert_daddr_to_raw)
3181 {
3182   gdbarch->d10v_convert_daddr_to_raw = d10v_convert_daddr_to_raw;
3183 }
3184
3185 CORE_ADDR
3186 gdbarch_d10v_convert_iaddr_to_raw (struct gdbarch *gdbarch, CORE_ADDR x)
3187 {
3188   if (gdbarch->d10v_convert_iaddr_to_raw == 0)
3189     internal_error ("gdbarch: gdbarch_d10v_convert_iaddr_to_raw invalid");
3190   if (gdbarch_debug >= 2)
3191     fprintf_unfiltered (gdb_stdlog, "gdbarch_d10v_convert_iaddr_to_raw called\n");
3192   return gdbarch->d10v_convert_iaddr_to_raw (x);
3193 }
3194
3195 void
3196 set_gdbarch_d10v_convert_iaddr_to_raw (struct gdbarch *gdbarch,
3197                                        gdbarch_d10v_convert_iaddr_to_raw_ftype d10v_convert_iaddr_to_raw)
3198 {
3199   gdbarch->d10v_convert_iaddr_to_raw = d10v_convert_iaddr_to_raw;
3200 }
3201
3202 void
3203 gdbarch_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
3204 {
3205   if (gdbarch->store_struct_return == 0)
3206     internal_error ("gdbarch: gdbarch_store_struct_return invalid");
3207   if (gdbarch_debug >= 2)
3208     fprintf_unfiltered (gdb_stdlog, "gdbarch_store_struct_return called\n");
3209   gdbarch->store_struct_return (addr, sp);
3210 }
3211
3212 void
3213 set_gdbarch_store_struct_return (struct gdbarch *gdbarch,
3214                                  gdbarch_store_struct_return_ftype store_struct_return)
3215 {
3216   gdbarch->store_struct_return = store_struct_return;
3217 }
3218
3219 void
3220 gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf)
3221 {
3222   if (gdbarch->store_return_value == 0)
3223     internal_error ("gdbarch: gdbarch_store_return_value invalid");
3224   if (gdbarch_debug >= 2)
3225     fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
3226   gdbarch->store_return_value (type, valbuf);
3227 }
3228
3229 void
3230 set_gdbarch_store_return_value (struct gdbarch *gdbarch,
3231                                 gdbarch_store_return_value_ftype store_return_value)
3232 {
3233   gdbarch->store_return_value = store_return_value;
3234 }
3235
3236 CORE_ADDR
3237 gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf)
3238 {
3239   if (gdbarch->extract_struct_value_address == 0)
3240     internal_error ("gdbarch: gdbarch_extract_struct_value_address invalid");
3241   if (gdbarch_debug >= 2)
3242     fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_struct_value_address called\n");
3243   return gdbarch->extract_struct_value_address (regbuf);
3244 }
3245
3246 void
3247 set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch,
3248                                           gdbarch_extract_struct_value_address_ftype extract_struct_value_address)
3249 {
3250   gdbarch->extract_struct_value_address = extract_struct_value_address;
3251 }
3252
3253 int
3254 gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
3255 {
3256   if (gdbarch->use_struct_convention == 0)
3257     internal_error ("gdbarch: gdbarch_use_struct_convention invalid");
3258   if (gdbarch_debug >= 2)
3259     fprintf_unfiltered (gdb_stdlog, "gdbarch_use_struct_convention called\n");
3260   return gdbarch->use_struct_convention (gcc_p, value_type);
3261 }
3262
3263 void
3264 set_gdbarch_use_struct_convention (struct gdbarch *gdbarch,
3265                                    gdbarch_use_struct_convention_ftype use_struct_convention)
3266 {
3267   gdbarch->use_struct_convention = use_struct_convention;
3268 }
3269
3270 void
3271 gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame)
3272 {
3273   if (gdbarch->frame_init_saved_regs == 0)
3274     internal_error ("gdbarch: gdbarch_frame_init_saved_regs invalid");
3275   if (gdbarch_debug >= 2)
3276     fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_init_saved_regs called\n");
3277   gdbarch->frame_init_saved_regs (frame);
3278 }
3279
3280 void
3281 set_gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch,
3282                                    gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs)
3283 {
3284   gdbarch->frame_init_saved_regs = frame_init_saved_regs;
3285 }
3286
3287 void
3288 gdbarch_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame)
3289 {
3290   if (gdbarch->init_extra_frame_info == 0)
3291     internal_error ("gdbarch: gdbarch_init_extra_frame_info invalid");
3292   if (gdbarch_debug >= 2)
3293     fprintf_unfiltered (gdb_stdlog, "gdbarch_init_extra_frame_info called\n");
3294   gdbarch->init_extra_frame_info (fromleaf, frame);
3295 }
3296
3297 void
3298 set_gdbarch_init_extra_frame_info (struct gdbarch *gdbarch,
3299                                    gdbarch_init_extra_frame_info_ftype init_extra_frame_info)
3300 {
3301   gdbarch->init_extra_frame_info = init_extra_frame_info;
3302 }
3303
3304 CORE_ADDR
3305 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
3306 {
3307   if (gdbarch->skip_prologue == 0)
3308     internal_error ("gdbarch: gdbarch_skip_prologue invalid");
3309   if (gdbarch_debug >= 2)
3310     fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
3311   return gdbarch->skip_prologue (ip);
3312 }
3313
3314 void
3315 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
3316                            gdbarch_skip_prologue_ftype skip_prologue)
3317 {
3318   gdbarch->skip_prologue = skip_prologue;
3319 }
3320
3321 int
3322 gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, CORE_ADDR ip)
3323 {
3324   if (gdbarch->prologue_frameless_p == 0)
3325     internal_error ("gdbarch: gdbarch_prologue_frameless_p invalid");
3326   if (gdbarch_debug >= 2)
3327     fprintf_unfiltered (gdb_stdlog, "gdbarch_prologue_frameless_p called\n");
3328   return gdbarch->prologue_frameless_p (ip);
3329 }
3330
3331 void
3332 set_gdbarch_prologue_frameless_p (struct gdbarch *gdbarch,
3333                                   gdbarch_prologue_frameless_p_ftype prologue_frameless_p)
3334 {
3335   gdbarch->prologue_frameless_p = prologue_frameless_p;
3336 }
3337
3338 int
3339 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
3340 {
3341   if (gdbarch->inner_than == 0)
3342     internal_error ("gdbarch: gdbarch_inner_than invalid");
3343   if (gdbarch_debug >= 2)
3344     fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
3345   return gdbarch->inner_than (lhs, rhs);
3346 }
3347
3348 void
3349 set_gdbarch_inner_than (struct gdbarch *gdbarch,
3350                         gdbarch_inner_than_ftype inner_than)
3351 {
3352   gdbarch->inner_than = inner_than;
3353 }
3354
3355 unsigned char *
3356 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
3357 {
3358   if (gdbarch->breakpoint_from_pc == 0)
3359     internal_error ("gdbarch: gdbarch_breakpoint_from_pc invalid");
3360   if (gdbarch_debug >= 2)
3361     fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
3362   return gdbarch->breakpoint_from_pc (pcptr, lenptr);
3363 }
3364
3365 void
3366 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
3367                                 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
3368 {
3369   gdbarch->breakpoint_from_pc = breakpoint_from_pc;
3370 }
3371
3372 int
3373 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
3374 {
3375   if (gdbarch->memory_insert_breakpoint == 0)
3376     internal_error ("gdbarch: gdbarch_memory_insert_breakpoint invalid");
3377   if (gdbarch_debug >= 2)
3378     fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
3379   return gdbarch->memory_insert_breakpoint (addr, contents_cache);
3380 }
3381
3382 void
3383 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
3384                                       gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
3385 {
3386   gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
3387 }
3388
3389 int
3390 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
3391 {
3392   if (gdbarch->memory_remove_breakpoint == 0)
3393     internal_error ("gdbarch: gdbarch_memory_remove_breakpoint invalid");
3394   if (gdbarch_debug >= 2)
3395     fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
3396   return gdbarch->memory_remove_breakpoint (addr, contents_cache);
3397 }
3398
3399 void
3400 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
3401                                       gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
3402 {
3403   gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
3404 }
3405
3406 CORE_ADDR
3407 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
3408 {
3409   if (gdbarch->decr_pc_after_break == -1)
3410     internal_error ("gdbarch: gdbarch_decr_pc_after_break invalid");
3411   if (gdbarch_debug >= 2)
3412     fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
3413   return gdbarch->decr_pc_after_break;
3414 }
3415
3416 void
3417 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
3418                                  CORE_ADDR decr_pc_after_break)
3419 {
3420   gdbarch->decr_pc_after_break = decr_pc_after_break;
3421 }
3422
3423 CORE_ADDR
3424 gdbarch_function_start_offset (struct gdbarch *gdbarch)
3425 {
3426   if (gdbarch->function_start_offset == -1)
3427     internal_error ("gdbarch: gdbarch_function_start_offset invalid");
3428   if (gdbarch_debug >= 2)
3429     fprintf_unfiltered (gdb_stdlog, "gdbarch_function_start_offset called\n");
3430   return gdbarch->function_start_offset;
3431 }
3432
3433 void
3434 set_gdbarch_function_start_offset (struct gdbarch *gdbarch,
3435                                    CORE_ADDR function_start_offset)
3436 {
3437   gdbarch->function_start_offset = function_start_offset;
3438 }
3439
3440 void
3441 gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len)
3442 {
3443   if (gdbarch->remote_translate_xfer_address == 0)
3444     internal_error ("gdbarch: gdbarch_remote_translate_xfer_address invalid");
3445   if (gdbarch_debug >= 2)
3446     fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
3447   gdbarch->remote_translate_xfer_address (gdb_addr, gdb_len, rem_addr, rem_len);
3448 }
3449
3450 void
3451 set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch,
3452                                            gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address)
3453 {
3454   gdbarch->remote_translate_xfer_address = remote_translate_xfer_address;
3455 }
3456
3457 CORE_ADDR
3458 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
3459 {
3460   if (gdbarch->frame_args_skip == -1)
3461     internal_error ("gdbarch: gdbarch_frame_args_skip invalid");
3462   if (gdbarch_debug >= 2)
3463     fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
3464   return gdbarch->frame_args_skip;
3465 }
3466
3467 void
3468 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
3469                              CORE_ADDR frame_args_skip)
3470 {
3471   gdbarch->frame_args_skip = frame_args_skip;
3472 }
3473
3474 int
3475 gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi)
3476 {
3477   if (gdbarch->frameless_function_invocation == 0)
3478     internal_error ("gdbarch: gdbarch_frameless_function_invocation invalid");
3479   if (gdbarch_debug >= 2)
3480     fprintf_unfiltered (gdb_stdlog, "gdbarch_frameless_function_invocation called\n");
3481   return gdbarch->frameless_function_invocation (fi);
3482 }
3483
3484 void
3485 set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch,
3486                                            gdbarch_frameless_function_invocation_ftype frameless_function_invocation)
3487 {
3488   gdbarch->frameless_function_invocation = frameless_function_invocation;
3489 }
3490
3491 CORE_ADDR
3492 gdbarch_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame)
3493 {
3494   if (gdbarch->frame_chain == 0)
3495     internal_error ("gdbarch: gdbarch_frame_chain invalid");
3496   if (gdbarch_debug >= 2)
3497     fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain called\n");
3498   return gdbarch->frame_chain (frame);
3499 }
3500
3501 void
3502 set_gdbarch_frame_chain (struct gdbarch *gdbarch,
3503                          gdbarch_frame_chain_ftype frame_chain)
3504 {
3505   gdbarch->frame_chain = frame_chain;
3506 }
3507
3508 int
3509 gdbarch_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe)
3510 {
3511   if (gdbarch->frame_chain_valid == 0)
3512     internal_error ("gdbarch: gdbarch_frame_chain_valid invalid");
3513   if (gdbarch_debug >= 2)
3514     fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain_valid called\n");
3515   return gdbarch->frame_chain_valid (chain, thisframe);
3516 }
3517
3518 void
3519 set_gdbarch_frame_chain_valid (struct gdbarch *gdbarch,
3520                                gdbarch_frame_chain_valid_ftype frame_chain_valid)
3521 {
3522   gdbarch->frame_chain_valid = frame_chain_valid;
3523 }
3524
3525 CORE_ADDR
3526 gdbarch_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi)
3527 {
3528   if (gdbarch->frame_saved_pc == 0)
3529     internal_error ("gdbarch: gdbarch_frame_saved_pc invalid");
3530   if (gdbarch_debug >= 2)
3531     fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_saved_pc called\n");
3532   return gdbarch->frame_saved_pc (fi);
3533 }
3534
3535 void
3536 set_gdbarch_frame_saved_pc (struct gdbarch *gdbarch,
3537                             gdbarch_frame_saved_pc_ftype frame_saved_pc)
3538 {
3539   gdbarch->frame_saved_pc = frame_saved_pc;
3540 }
3541
3542 CORE_ADDR
3543 gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
3544 {
3545   if (gdbarch->frame_args_address == 0)
3546     internal_error ("gdbarch: gdbarch_frame_args_address invalid");
3547   if (gdbarch_debug >= 2)
3548     fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_address called\n");
3549   return gdbarch->frame_args_address (fi);
3550 }
3551
3552 void
3553 set_gdbarch_frame_args_address (struct gdbarch *gdbarch,
3554                                 gdbarch_frame_args_address_ftype frame_args_address)
3555 {
3556   gdbarch->frame_args_address = frame_args_address;
3557 }
3558
3559 CORE_ADDR
3560 gdbarch_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
3561 {
3562   if (gdbarch->frame_locals_address == 0)
3563     internal_error ("gdbarch: gdbarch_frame_locals_address invalid");
3564   if (gdbarch_debug >= 2)
3565     fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_locals_address called\n");
3566   return gdbarch->frame_locals_address (fi);
3567 }
3568
3569 void
3570 set_gdbarch_frame_locals_address (struct gdbarch *gdbarch,
3571                                   gdbarch_frame_locals_address_ftype frame_locals_address)
3572 {
3573   gdbarch->frame_locals_address = frame_locals_address;
3574 }
3575
3576 CORE_ADDR
3577 gdbarch_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame)
3578 {
3579   if (gdbarch->saved_pc_after_call == 0)
3580     internal_error ("gdbarch: gdbarch_saved_pc_after_call invalid");
3581   if (gdbarch_debug >= 2)
3582     fprintf_unfiltered (gdb_stdlog, "gdbarch_saved_pc_after_call called\n");
3583   return gdbarch->saved_pc_after_call (frame);
3584 }
3585
3586 void
3587 set_gdbarch_saved_pc_after_call (struct gdbarch *gdbarch,
3588                                  gdbarch_saved_pc_after_call_ftype saved_pc_after_call)
3589 {
3590   gdbarch->saved_pc_after_call = saved_pc_after_call;
3591 }
3592
3593 int
3594 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
3595 {
3596   if (gdbarch->frame_num_args == 0)
3597     internal_error ("gdbarch: gdbarch_frame_num_args invalid");
3598   if (gdbarch_debug >= 2)
3599     fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
3600   return gdbarch->frame_num_args (frame);
3601 }
3602
3603 void
3604 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
3605                             gdbarch_frame_num_args_ftype frame_num_args)
3606 {
3607   gdbarch->frame_num_args = frame_num_args;
3608 }
3609
3610 int
3611 gdbarch_stack_align_p (struct gdbarch *gdbarch)
3612 {
3613   return gdbarch->stack_align != 0;
3614 }
3615
3616 CORE_ADDR
3617 gdbarch_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp)
3618 {
3619   if (gdbarch->stack_align == 0)
3620     internal_error ("gdbarch: gdbarch_stack_align invalid");
3621   if (gdbarch_debug >= 2)
3622     fprintf_unfiltered (gdb_stdlog, "gdbarch_stack_align called\n");
3623   return gdbarch->stack_align (sp);
3624 }
3625
3626 void
3627 set_gdbarch_stack_align (struct gdbarch *gdbarch,
3628                          gdbarch_stack_align_ftype stack_align)
3629 {
3630   gdbarch->stack_align = stack_align;
3631 }
3632
3633 int
3634 gdbarch_extra_stack_alignment_needed (struct gdbarch *gdbarch)
3635 {
3636   /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
3637   if (gdbarch_debug >= 2)
3638     fprintf_unfiltered (gdb_stdlog, "gdbarch_extra_stack_alignment_needed called\n");
3639   return gdbarch->extra_stack_alignment_needed;
3640 }
3641
3642 void
3643 set_gdbarch_extra_stack_alignment_needed (struct gdbarch *gdbarch,
3644                                           int extra_stack_alignment_needed)
3645 {
3646   gdbarch->extra_stack_alignment_needed = extra_stack_alignment_needed;
3647 }
3648
3649 int
3650 gdbarch_reg_struct_has_addr_p (struct gdbarch *gdbarch)
3651 {
3652   return gdbarch->reg_struct_has_addr != 0;
3653 }
3654
3655 int
3656 gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type)
3657 {
3658   if (gdbarch->reg_struct_has_addr == 0)
3659     internal_error ("gdbarch: gdbarch_reg_struct_has_addr invalid");
3660   if (gdbarch_debug >= 2)
3661     fprintf_unfiltered (gdb_stdlog, "gdbarch_reg_struct_has_addr called\n");
3662   return gdbarch->reg_struct_has_addr (gcc_p, type);
3663 }
3664
3665 void
3666 set_gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch,
3667                                  gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr)
3668 {
3669   gdbarch->reg_struct_has_addr = reg_struct_has_addr;
3670 }
3671
3672 int
3673 gdbarch_save_dummy_frame_tos_p (struct gdbarch *gdbarch)
3674 {
3675   return gdbarch->save_dummy_frame_tos != 0;
3676 }
3677
3678 void
3679 gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp)
3680 {
3681   if (gdbarch->save_dummy_frame_tos == 0)
3682     internal_error ("gdbarch: gdbarch_save_dummy_frame_tos invalid");
3683   if (gdbarch_debug >= 2)
3684     fprintf_unfiltered (gdb_stdlog, "gdbarch_save_dummy_frame_tos called\n");
3685   gdbarch->save_dummy_frame_tos (sp);
3686 }
3687
3688 void
3689 set_gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch,
3690                                   gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos)
3691 {
3692   gdbarch->save_dummy_frame_tos = save_dummy_frame_tos;
3693 }
3694
3695 const struct floatformat *
3696 gdbarch_float_format (struct gdbarch *gdbarch)
3697 {
3698   if (gdbarch_debug >= 2)
3699     fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
3700   return gdbarch->float_format;
3701 }
3702
3703 void
3704 set_gdbarch_float_format (struct gdbarch *gdbarch,
3705                           const struct floatformat * float_format)
3706 {
3707   gdbarch->float_format = float_format;
3708 }
3709
3710 const struct floatformat *
3711 gdbarch_double_format (struct gdbarch *gdbarch)
3712 {
3713   if (gdbarch_debug >= 2)
3714     fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
3715   return gdbarch->double_format;
3716 }
3717
3718 void
3719 set_gdbarch_double_format (struct gdbarch *gdbarch,
3720                            const struct floatformat * double_format)
3721 {
3722   gdbarch->double_format = double_format;
3723 }
3724
3725 const struct floatformat *
3726 gdbarch_long_double_format (struct gdbarch *gdbarch)
3727 {
3728   if (gdbarch_debug >= 2)
3729     fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
3730   return gdbarch->long_double_format;
3731 }
3732
3733 void
3734 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
3735                                 const struct floatformat * long_double_format)
3736 {
3737   gdbarch->long_double_format = long_double_format;
3738 }
3739
3740
3741 /* Keep a registrary of per-architecture data-pointers required by GDB
3742    modules. */
3743
3744 struct gdbarch_data
3745 {
3746   int index;
3747 };
3748
3749 struct gdbarch_data_registration
3750 {
3751   gdbarch_data_ftype *init;
3752   struct gdbarch_data *data;
3753   struct gdbarch_data_registration *next;
3754 };
3755
3756 struct gdbarch_data_registrary
3757 {
3758   int nr;
3759   struct gdbarch_data_registration *registrations;
3760 };
3761
3762 struct gdbarch_data_registrary gdbarch_data_registrary =
3763 {
3764   0, NULL,
3765 };
3766
3767 struct gdbarch_data *
3768 register_gdbarch_data (gdbarch_data_ftype *init)
3769 {
3770   struct gdbarch_data_registration **curr;
3771   for (curr = &gdbarch_data_registrary.registrations;
3772        (*curr) != NULL;
3773        curr = &(*curr)->next);
3774   (*curr) = XMALLOC (struct gdbarch_data_registration);
3775   (*curr)->next = NULL;
3776   (*curr)->init = init;
3777   (*curr)->data = XMALLOC (struct gdbarch_data);
3778   (*curr)->data->index = gdbarch_data_registrary.nr++;
3779   return (*curr)->data;
3780 }
3781
3782
3783 /* Walk through all the registered users initializing each in turn. */
3784
3785 static void
3786 init_gdbarch_data (struct gdbarch *gdbarch)
3787 {
3788   struct gdbarch_data_registration *rego;
3789   gdbarch->nr_data = gdbarch_data_registrary.nr + 1;
3790   gdbarch->data = xmalloc (sizeof (void*) * gdbarch->nr_data);
3791   for (rego = gdbarch_data_registrary.registrations;
3792        rego != NULL;
3793        rego = rego->next)
3794     {
3795       if (rego->data->index < gdbarch->nr_data)
3796         gdbarch->data[rego->data->index] = rego->init ();
3797     }
3798 }
3799
3800
3801 /* Return the current value of the specified per-architecture
3802    data-pointer. */
3803
3804 void *
3805 gdbarch_data (struct gdbarch_data *data)
3806 {
3807   if (data->index >= current_gdbarch->nr_data)
3808     internal_error ("gdbarch_data: request for non-existant data.");
3809   return current_gdbarch->data[data->index];
3810 }
3811
3812
3813
3814 /* Keep a registrary of swapped data required by GDB modules. */
3815
3816 struct gdbarch_swap
3817 {
3818   void *swap;
3819   struct gdbarch_swap_registration *source;
3820   struct gdbarch_swap *next;
3821 };
3822
3823 struct gdbarch_swap_registration
3824 {
3825   void *data;
3826   unsigned long sizeof_data;
3827   gdbarch_swap_ftype *init;
3828   struct gdbarch_swap_registration *next;
3829 };
3830
3831 struct gdbarch_swap_registrary
3832 {
3833   int nr;
3834   struct gdbarch_swap_registration *registrations;
3835 };
3836
3837 struct gdbarch_swap_registrary gdbarch_swap_registrary = 
3838 {
3839   0, NULL,
3840 };
3841
3842 void
3843 register_gdbarch_swap (void *data,
3844                        unsigned long sizeof_data,
3845                        gdbarch_swap_ftype *init)
3846 {
3847   struct gdbarch_swap_registration **rego;
3848   for (rego = &gdbarch_swap_registrary.registrations;
3849        (*rego) != NULL;
3850        rego = &(*rego)->next);
3851   (*rego) = XMALLOC (struct gdbarch_swap_registration);
3852   (*rego)->next = NULL;
3853   (*rego)->init = init;
3854   (*rego)->data = data;
3855   (*rego)->sizeof_data = sizeof_data;
3856 }
3857
3858
3859 static void
3860 init_gdbarch_swap (struct gdbarch *gdbarch)
3861 {
3862   struct gdbarch_swap_registration *rego;
3863   struct gdbarch_swap **curr = &gdbarch->swap;
3864   for (rego = gdbarch_swap_registrary.registrations;
3865        rego != NULL;
3866        rego = rego->next)
3867     {
3868       if (rego->data != NULL)
3869         {
3870           (*curr) = XMALLOC (struct gdbarch_swap);
3871           (*curr)->source = rego;
3872           (*curr)->swap = xmalloc (rego->sizeof_data);
3873           (*curr)->next = NULL;
3874           memset (rego->data, 0, rego->sizeof_data);
3875           curr = &(*curr)->next;
3876         }
3877       if (rego->init != NULL)
3878         rego->init ();
3879     }
3880 }
3881
3882 static void
3883 swapout_gdbarch_swap (struct gdbarch *gdbarch)
3884 {
3885   struct gdbarch_swap *curr;
3886   for (curr = gdbarch->swap;
3887        curr != NULL;
3888        curr = curr->next)
3889     memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
3890 }
3891
3892 static void
3893 swapin_gdbarch_swap (struct gdbarch *gdbarch)
3894 {
3895   struct gdbarch_swap *curr;
3896   for (curr = gdbarch->swap;
3897        curr != NULL;
3898        curr = curr->next)
3899     memcpy (curr->source->data, curr->swap, curr->source->sizeof_data);
3900 }
3901
3902
3903 /* Keep a registrary of the architectures known by GDB. */
3904
3905 struct gdbarch_registration
3906 {
3907   enum bfd_architecture bfd_architecture;
3908   gdbarch_init_ftype *init;
3909   gdbarch_dump_tdep_ftype *dump_tdep;
3910   struct gdbarch_list *arches;
3911   struct gdbarch_registration *next;
3912 };
3913
3914 static struct gdbarch_registration *gdbarch_registrary = NULL;
3915
3916 static void
3917 append_name (const char ***buf, int *nr, const char *name)
3918 {
3919   *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
3920   (*buf)[*nr] = name;
3921   *nr += 1;
3922 }
3923
3924 const char **
3925 gdbarch_printable_names (void)
3926 {
3927   if (GDB_MULTI_ARCH)
3928     {
3929       /* Accumulate a list of names based on the registed list of
3930          architectures. */
3931       enum bfd_architecture a;
3932       int nr_arches = 0;
3933       const char **arches = NULL;
3934       struct gdbarch_registration *rego;
3935       for (rego = gdbarch_registrary;
3936            rego != NULL;
3937            rego = rego->next)
3938         {
3939           const struct bfd_arch_info *ap;
3940           ap = bfd_lookup_arch (rego->bfd_architecture, 0);
3941           if (ap == NULL)
3942             internal_error ("gdbarch_architecture_names: multi-arch unknown");
3943           do
3944             {
3945               append_name (&arches, &nr_arches, ap->printable_name);
3946               ap = ap->next;
3947             }
3948           while (ap != NULL);
3949         }
3950       append_name (&arches, &nr_arches, NULL);
3951       return arches;
3952     }
3953   else
3954     /* Just return all the architectures that BFD knows.  Assume that
3955        the legacy architecture framework supports them. */
3956     return bfd_arch_list ();
3957 }
3958
3959
3960 void
3961 gdbarch_register (enum bfd_architecture bfd_architecture,
3962                   gdbarch_init_ftype *init,
3963                   gdbarch_dump_tdep_ftype *dump_tdep)
3964 {
3965   struct gdbarch_registration **curr;
3966   const struct bfd_arch_info *bfd_arch_info;
3967   /* Check that BFD reconizes this architecture */
3968   bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
3969   if (bfd_arch_info == NULL)
3970     {
3971       internal_error ("gdbarch: Attempt to register unknown architecture (%d)", bfd_architecture);
3972     }
3973   /* Check that we haven't seen this architecture before */
3974   for (curr = &gdbarch_registrary;
3975        (*curr) != NULL;
3976        curr = &(*curr)->next)
3977     {
3978       if (bfd_architecture == (*curr)->bfd_architecture)
3979         internal_error ("gdbarch: Duplicate registraration of architecture (%s)",
3980                bfd_arch_info->printable_name);
3981     }
3982   /* log it */
3983   if (gdbarch_debug)
3984     fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n",
3985                         bfd_arch_info->printable_name,
3986                         (long) init);
3987   /* Append it */
3988   (*curr) = XMALLOC (struct gdbarch_registration);
3989   (*curr)->bfd_architecture = bfd_architecture;
3990   (*curr)->init = init;
3991   (*curr)->dump_tdep = dump_tdep;
3992   (*curr)->arches = NULL;
3993   (*curr)->next = NULL;
3994   /* When non- multi-arch, install what ever target dump routine we've
3995      been provided - hopefully that routine has been writen correct
3996      and works regardless of multi-arch. */
3997   if (!GDB_MULTI_ARCH && dump_tdep != NULL
3998       && startup_gdbarch.dump_tdep == NULL)
3999     startup_gdbarch.dump_tdep = dump_tdep;
4000 }
4001
4002 void
4003 register_gdbarch_init (enum bfd_architecture bfd_architecture,
4004                        gdbarch_init_ftype *init)
4005 {
4006   gdbarch_register (bfd_architecture, init, NULL);
4007 }
4008
4009
4010 /* Look for an architecture using gdbarch_info.  Base search on only
4011    BFD_ARCH_INFO and BYTE_ORDER. */
4012
4013 struct gdbarch_list *
4014 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
4015                              const struct gdbarch_info *info)
4016 {
4017   for (; arches != NULL; arches = arches->next)
4018     {
4019       if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
4020         continue;
4021       if (info->byte_order != arches->gdbarch->byte_order)
4022         continue;
4023       return arches;
4024     }
4025   return NULL;
4026 }
4027
4028
4029 /* Update the current architecture. Return ZERO if the update request
4030    failed. */
4031
4032 int
4033 gdbarch_update_p (struct gdbarch_info info)
4034 {
4035   struct gdbarch *new_gdbarch;
4036   struct gdbarch_list **list;
4037   struct gdbarch_registration *rego;
4038
4039   /* Fill in any missing bits. Most important is the bfd_architecture
4040      which is used to select the target architecture. */
4041   if (info.bfd_architecture == bfd_arch_unknown)
4042     {
4043       if (info.bfd_arch_info != NULL)
4044         info.bfd_architecture = info.bfd_arch_info->arch;
4045       else if (info.abfd != NULL)
4046         info.bfd_architecture = bfd_get_arch (info.abfd);
4047       /* FIXME - should query BFD for its default architecture. */
4048       else
4049         info.bfd_architecture = current_gdbarch->bfd_arch_info->arch;
4050     }
4051   if (info.bfd_arch_info == NULL)
4052     {
4053       if (target_architecture_auto && info.abfd != NULL)
4054         info.bfd_arch_info = bfd_get_arch_info (info.abfd);
4055       else
4056         info.bfd_arch_info = current_gdbarch->bfd_arch_info;
4057     }
4058   if (info.byte_order == 0)
4059     {
4060       if (target_byte_order_auto && info.abfd != NULL)
4061         info.byte_order = (bfd_big_endian (info.abfd) ? BIG_ENDIAN
4062                            : bfd_little_endian (info.abfd) ? LITTLE_ENDIAN
4063                            : 0);
4064       else
4065         info.byte_order = current_gdbarch->byte_order;
4066       /* FIXME - should query BFD for its default byte-order. */
4067     }
4068   /* A default for abfd? */
4069
4070   /* Find the target that knows about this architecture. */
4071   for (rego = gdbarch_registrary;
4072        rego != NULL;
4073        rego = rego->next)
4074     if (rego->bfd_architecture == info.bfd_architecture)
4075       break;
4076   if (rego == NULL)
4077     {
4078       if (gdbarch_debug)
4079         fprintf_unfiltered (gdb_stdlog, "gdbarch_update: No matching architecture\n");
4080       return 0;
4081     }
4082
4083   if (gdbarch_debug)
4084     {
4085       fprintf_unfiltered (gdb_stdlog,
4086                           "gdbarch_update: info.bfd_architecture %d (%s)\n",
4087                           info.bfd_architecture,
4088                           bfd_lookup_arch (info.bfd_architecture, 0)->printable_name);
4089       fprintf_unfiltered (gdb_stdlog,
4090                           "gdbarch_update: info.bfd_arch_info %s\n",
4091                           (info.bfd_arch_info != NULL
4092                            ? info.bfd_arch_info->printable_name
4093                            : "(null)"));
4094       fprintf_unfiltered (gdb_stdlog,
4095                           "gdbarch_update: info.byte_order %d (%s)\n",
4096                           info.byte_order,
4097                           (info.byte_order == BIG_ENDIAN ? "big"
4098                            : info.byte_order == LITTLE_ENDIAN ? "little"
4099                            : "default"));
4100       fprintf_unfiltered (gdb_stdlog,
4101                           "gdbarch_update: info.abfd 0x%lx\n",
4102                           (long) info.abfd);
4103       fprintf_unfiltered (gdb_stdlog,
4104                           "gdbarch_update: info.tdep_info 0x%lx\n",
4105                           (long) info.tdep_info);
4106     }
4107
4108   /* Ask the target for a replacement architecture. */
4109   new_gdbarch = rego->init (info, rego->arches);
4110
4111   /* Did the target like it?  No. Reject the change. */
4112   if (new_gdbarch == NULL)
4113     {
4114       if (gdbarch_debug)
4115         fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Target rejected architecture\n");
4116       return 0;
4117     }
4118
4119   /* Did the architecture change?  No. Do nothing. */
4120   if (current_gdbarch == new_gdbarch)
4121     {
4122       if (gdbarch_debug)
4123         fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
4124                             (long) new_gdbarch,
4125                             new_gdbarch->bfd_arch_info->printable_name);
4126       return 1;
4127     }
4128
4129   /* Swap all data belonging to the old target out */
4130   swapout_gdbarch_swap (current_gdbarch);
4131
4132   /* Is this a pre-existing architecture?  Yes. Swap it in.  */
4133   for (list = &rego->arches;
4134        (*list) != NULL;
4135        list = &(*list)->next)
4136     {
4137       if ((*list)->gdbarch == new_gdbarch)
4138         {
4139           if (gdbarch_debug)
4140             fprintf_unfiltered (gdb_stdlog,
4141                                 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
4142                                 (long) new_gdbarch,
4143                                 new_gdbarch->bfd_arch_info->printable_name);
4144           current_gdbarch = new_gdbarch;
4145           swapin_gdbarch_swap (new_gdbarch);
4146           return 1;
4147         }
4148     }
4149
4150   /* Append this new architecture to this targets list. */
4151   (*list) = XMALLOC (struct gdbarch_list);
4152   (*list)->next = NULL;
4153   (*list)->gdbarch = new_gdbarch;
4154
4155   /* Switch to this new architecture.  Dump it out. */
4156   current_gdbarch = new_gdbarch;
4157   if (gdbarch_debug)
4158     {
4159       fprintf_unfiltered (gdb_stdlog,
4160                           "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
4161                           (long) new_gdbarch,
4162                           new_gdbarch->bfd_arch_info->printable_name);
4163     }
4164   
4165   /* Check that the newly installed architecture is valid.  Plug in
4166      any post init values.  */
4167   new_gdbarch->dump_tdep = rego->dump_tdep;
4168   verify_gdbarch (new_gdbarch);
4169
4170   /* Initialize the per-architecture memory (swap) areas.
4171      CURRENT_GDBARCH must be update before these modules are
4172      called. */
4173   init_gdbarch_swap (new_gdbarch);
4174   
4175   /* Initialize the per-architecture data-pointer of all parties that
4176      registered an interest in this architecture.  CURRENT_GDBARCH
4177      must be updated before these modules are called. */
4178   init_gdbarch_data (new_gdbarch);
4179   
4180   if (gdbarch_debug)
4181     gdbarch_dump (current_gdbarch, gdb_stdlog);
4182
4183   return 1;
4184 }
4185
4186
4187 /* Disassembler */
4188
4189 /* Pointer to the target-dependent disassembly function.  */
4190 int (*tm_print_insn) (bfd_vma, disassemble_info *);
4191 disassemble_info tm_print_insn_info;
4192
4193
4194 extern void _initialize_gdbarch (void);
4195
4196 void
4197 _initialize_gdbarch (void)
4198 {
4199   struct cmd_list_element *c;
4200
4201   INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info, gdb_stdout, (fprintf_ftype)fprintf_filtered);
4202   tm_print_insn_info.flavour = bfd_target_unknown_flavour;
4203   tm_print_insn_info.read_memory_func = dis_asm_read_memory;
4204   tm_print_insn_info.memory_error_func = dis_asm_memory_error;
4205   tm_print_insn_info.print_address_func = dis_asm_print_address;
4206
4207   add_show_from_set (add_set_cmd ("arch",
4208                                   class_maintenance,
4209                                   var_zinteger,
4210                                   (char *)&gdbarch_debug,
4211                                   "Set architecture debugging.\n\
4212 When non-zero, architecture debugging is enabled.", &setdebuglist),
4213                      &showdebuglist);
4214   c = add_set_cmd ("archdebug",
4215                    class_maintenance,
4216                    var_zinteger,
4217                    (char *)&gdbarch_debug,
4218                    "Set architecture debugging.\n\
4219 When non-zero, architecture debugging is enabled.", &setlist);
4220
4221   deprecate_cmd (c, "set debug arch");
4222   deprecate_cmd (add_show_from_set (c, &showlist), "show debug arch");
4223 }