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