OSDN Git Service

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