Add a new gdbarch method to print a single AUXV entry.
[external/binutils.git] / gdb / gdbarch.c
1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED -*- buffer-read-only: t -*- */
2 /* vi:set ro: */
3
4 /* Dynamic architecture support for GDB, the GNU debugger.
5
6    Copyright (C) 1998-2016 Free Software Foundation, Inc.
7
8    This file is part of GDB.
9
10    This program is free software; you can redistribute it and/or modify
11    it under the terms of the GNU General Public License as published by
12    the Free Software Foundation; either version 3 of the License, or
13    (at your option) any later version.
14
15    This program is distributed in the hope that it will be useful,
16    but WITHOUT ANY WARRANTY; without even the implied warranty of
17    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18    GNU General Public License for more details.
19
20    You should have received a copy of the GNU General Public License
21    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
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 #include "gdbcmd.h"
40 #include "inferior.h" 
41 #include "symcat.h"
42
43 #include "floatformat.h"
44 #include "reggroups.h"
45 #include "osabi.h"
46 #include "gdb_obstack.h"
47 #include "observer.h"
48 #include "regcache.h"
49 #include "objfiles.h"
50 #include "auxv.h"
51
52 /* Static function declarations */
53
54 static void alloc_gdbarch_data (struct gdbarch *);
55
56 /* Non-zero if we want to trace architecture code.  */
57
58 #ifndef GDBARCH_DEBUG
59 #define GDBARCH_DEBUG 0
60 #endif
61 unsigned int gdbarch_debug = GDBARCH_DEBUG;
62 static void
63 show_gdbarch_debug (struct ui_file *file, int from_tty,
64                     struct cmd_list_element *c, const char *value)
65 {
66   fprintf_filtered (file, _("Architecture debugging is %s.\n"), value);
67 }
68
69 static const char *
70 pformat (const struct floatformat **format)
71 {
72   if (format == NULL)
73     return "(null)";
74   else
75     /* Just print out one of them - this is only for diagnostics.  */
76     return format[0]->name;
77 }
78
79 static const char *
80 pstring (const char *string)
81 {
82   if (string == NULL)
83     return "(null)";
84   return string;
85 }
86
87 /* Helper function to print a list of strings, represented as "const
88    char *const *".  The list is printed comma-separated.  */
89
90 static char *
91 pstring_list (const char *const *list)
92 {
93   static char ret[100];
94   const char *const *p;
95   size_t offset = 0;
96
97   if (list == NULL)
98     return "(null)";
99
100   ret[0] = '\0';
101   for (p = list; *p != NULL && offset < sizeof (ret); ++p)
102     {
103       size_t s = xsnprintf (ret + offset, sizeof (ret) - offset, "%s, ", *p);
104       offset += 2 + s;
105     }
106
107   if (offset > 0)
108     {
109       gdb_assert (offset - 2 < sizeof (ret));
110       ret[offset - 2] = '\0';
111     }
112
113   return ret;
114 }
115
116
117 /* Maintain the struct gdbarch object.  */
118
119 struct gdbarch
120 {
121   /* Has this architecture been fully initialized?  */
122   int initialized_p;
123
124   /* An obstack bound to the lifetime of the architecture.  */
125   struct obstack *obstack;
126
127   /* basic architectural information.  */
128   const struct bfd_arch_info * bfd_arch_info;
129   enum bfd_endian byte_order;
130   enum bfd_endian byte_order_for_code;
131   enum gdb_osabi osabi;
132   const struct target_desc * target_desc;
133
134   /* target specific vector.  */
135   struct gdbarch_tdep *tdep;
136   gdbarch_dump_tdep_ftype *dump_tdep;
137
138   /* per-architecture data-pointers.  */
139   unsigned nr_data;
140   void **data;
141
142   /* Multi-arch values.
143
144      When extending this structure you must:
145
146      Add the field below.
147
148      Declare set/get functions and define the corresponding
149      macro in gdbarch.h.
150
151      gdbarch_alloc(): If zero/NULL is not a suitable default,
152      initialize the new field.
153
154      verify_gdbarch(): Confirm that the target updated the field
155      correctly.
156
157      gdbarch_dump(): Add a fprintf_unfiltered call so that the new
158      field is dumped out
159
160      get_gdbarch(): Implement the set/get functions (probably using
161      the macro's as shortcuts).
162
163      */
164
165   int bits_big_endian;
166   int short_bit;
167   int int_bit;
168   int long_bit;
169   int long_long_bit;
170   int long_long_align_bit;
171   int half_bit;
172   const struct floatformat ** half_format;
173   int float_bit;
174   const struct floatformat ** float_format;
175   int double_bit;
176   const struct floatformat ** double_format;
177   int long_double_bit;
178   const struct floatformat ** long_double_format;
179   int ptr_bit;
180   int addr_bit;
181   int dwarf2_addr_size;
182   int char_signed;
183   gdbarch_read_pc_ftype *read_pc;
184   gdbarch_write_pc_ftype *write_pc;
185   gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer;
186   gdbarch_pseudo_register_read_ftype *pseudo_register_read;
187   gdbarch_pseudo_register_read_value_ftype *pseudo_register_read_value;
188   gdbarch_pseudo_register_write_ftype *pseudo_register_write;
189   int num_regs;
190   int num_pseudo_regs;
191   gdbarch_ax_pseudo_register_collect_ftype *ax_pseudo_register_collect;
192   gdbarch_ax_pseudo_register_push_stack_ftype *ax_pseudo_register_push_stack;
193   gdbarch_handle_segmentation_fault_ftype *handle_segmentation_fault;
194   int sp_regnum;
195   int pc_regnum;
196   int ps_regnum;
197   int fp0_regnum;
198   gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum;
199   gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum;
200   gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum;
201   gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum;
202   gdbarch_register_name_ftype *register_name;
203   gdbarch_register_type_ftype *register_type;
204   gdbarch_dummy_id_ftype *dummy_id;
205   int deprecated_fp_regnum;
206   gdbarch_push_dummy_call_ftype *push_dummy_call;
207   int call_dummy_location;
208   gdbarch_push_dummy_code_ftype *push_dummy_code;
209   gdbarch_code_of_frame_writable_ftype *code_of_frame_writable;
210   gdbarch_print_registers_info_ftype *print_registers_info;
211   gdbarch_print_float_info_ftype *print_float_info;
212   gdbarch_print_vector_info_ftype *print_vector_info;
213   gdbarch_register_sim_regno_ftype *register_sim_regno;
214   gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
215   gdbarch_cannot_store_register_ftype *cannot_store_register;
216   gdbarch_get_longjmp_target_ftype *get_longjmp_target;
217   int believe_pcc_promotion;
218   gdbarch_convert_register_p_ftype *convert_register_p;
219   gdbarch_register_to_value_ftype *register_to_value;
220   gdbarch_value_to_register_ftype *value_to_register;
221   gdbarch_value_from_register_ftype *value_from_register;
222   gdbarch_pointer_to_address_ftype *pointer_to_address;
223   gdbarch_address_to_pointer_ftype *address_to_pointer;
224   gdbarch_integer_to_address_ftype *integer_to_address;
225   gdbarch_return_value_ftype *return_value;
226   gdbarch_return_in_first_hidden_param_p_ftype *return_in_first_hidden_param_p;
227   gdbarch_skip_prologue_ftype *skip_prologue;
228   gdbarch_skip_main_prologue_ftype *skip_main_prologue;
229   gdbarch_skip_entrypoint_ftype *skip_entrypoint;
230   gdbarch_inner_than_ftype *inner_than;
231   gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
232   gdbarch_remote_breakpoint_from_pc_ftype *remote_breakpoint_from_pc;
233   gdbarch_adjust_breakpoint_address_ftype *adjust_breakpoint_address;
234   gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
235   gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
236   CORE_ADDR decr_pc_after_break;
237   CORE_ADDR deprecated_function_start_offset;
238   gdbarch_remote_register_number_ftype *remote_register_number;
239   gdbarch_fetch_tls_load_module_address_ftype *fetch_tls_load_module_address;
240   CORE_ADDR frame_args_skip;
241   gdbarch_unwind_pc_ftype *unwind_pc;
242   gdbarch_unwind_sp_ftype *unwind_sp;
243   gdbarch_frame_num_args_ftype *frame_num_args;
244   gdbarch_frame_align_ftype *frame_align;
245   gdbarch_stabs_argument_has_addr_ftype *stabs_argument_has_addr;
246   int frame_red_zone_size;
247   gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
248   gdbarch_addr_bits_remove_ftype *addr_bits_remove;
249   gdbarch_software_single_step_ftype *software_single_step;
250   gdbarch_single_step_through_delay_ftype *single_step_through_delay;
251   gdbarch_print_insn_ftype *print_insn;
252   gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
253   gdbarch_skip_solib_resolver_ftype *skip_solib_resolver;
254   gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
255   gdbarch_stack_frame_destroyed_p_ftype *stack_frame_destroyed_p;
256   gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
257   gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
258   gdbarch_make_symbol_special_ftype *make_symbol_special;
259   gdbarch_adjust_dwarf2_addr_ftype *adjust_dwarf2_addr;
260   gdbarch_adjust_dwarf2_line_ftype *adjust_dwarf2_line;
261   int cannot_step_breakpoint;
262   int have_nonsteppable_watchpoint;
263   gdbarch_address_class_type_flags_ftype *address_class_type_flags;
264   gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name;
265   gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
266   gdbarch_register_reggroup_p_ftype *register_reggroup_p;
267   gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument;
268   gdbarch_iterate_over_regset_sections_ftype *iterate_over_regset_sections;
269   gdbarch_make_corefile_notes_ftype *make_corefile_notes;
270   gdbarch_elfcore_write_linux_prpsinfo_ftype *elfcore_write_linux_prpsinfo;
271   gdbarch_find_memory_regions_ftype *find_memory_regions;
272   gdbarch_core_xfer_shared_libraries_ftype *core_xfer_shared_libraries;
273   gdbarch_core_xfer_shared_libraries_aix_ftype *core_xfer_shared_libraries_aix;
274   gdbarch_core_pid_to_str_ftype *core_pid_to_str;
275   gdbarch_core_thread_name_ftype *core_thread_name;
276   const char * gcore_bfd_target;
277   int vtable_function_descriptors;
278   int vbit_in_delta;
279   gdbarch_skip_permanent_breakpoint_ftype *skip_permanent_breakpoint;
280   ULONGEST max_insn_length;
281   gdbarch_displaced_step_copy_insn_ftype *displaced_step_copy_insn;
282   gdbarch_displaced_step_hw_singlestep_ftype *displaced_step_hw_singlestep;
283   gdbarch_displaced_step_fixup_ftype *displaced_step_fixup;
284   gdbarch_displaced_step_free_closure_ftype *displaced_step_free_closure;
285   gdbarch_displaced_step_location_ftype *displaced_step_location;
286   gdbarch_relocate_instruction_ftype *relocate_instruction;
287   gdbarch_overlay_update_ftype *overlay_update;
288   gdbarch_core_read_description_ftype *core_read_description;
289   gdbarch_static_transform_name_ftype *static_transform_name;
290   int sofun_address_maybe_missing;
291   gdbarch_process_record_ftype *process_record;
292   gdbarch_process_record_signal_ftype *process_record_signal;
293   gdbarch_gdb_signal_from_target_ftype *gdb_signal_from_target;
294   gdbarch_gdb_signal_to_target_ftype *gdb_signal_to_target;
295   gdbarch_get_siginfo_type_ftype *get_siginfo_type;
296   gdbarch_record_special_symbol_ftype *record_special_symbol;
297   gdbarch_get_syscall_number_ftype *get_syscall_number;
298   const char * xml_syscall_file;
299   struct syscalls_info * syscalls_info;
300   const char *const * stap_integer_prefixes;
301   const char *const * stap_integer_suffixes;
302   const char *const * stap_register_prefixes;
303   const char *const * stap_register_suffixes;
304   const char *const * stap_register_indirection_prefixes;
305   const char *const * stap_register_indirection_suffixes;
306   const char * stap_gdb_register_prefix;
307   const char * stap_gdb_register_suffix;
308   gdbarch_stap_is_single_operand_ftype *stap_is_single_operand;
309   gdbarch_stap_parse_special_token_ftype *stap_parse_special_token;
310   gdbarch_dtrace_parse_probe_argument_ftype *dtrace_parse_probe_argument;
311   gdbarch_dtrace_probe_is_enabled_ftype *dtrace_probe_is_enabled;
312   gdbarch_dtrace_enable_probe_ftype *dtrace_enable_probe;
313   gdbarch_dtrace_disable_probe_ftype *dtrace_disable_probe;
314   int has_global_solist;
315   int has_global_breakpoints;
316   gdbarch_has_shared_address_space_ftype *has_shared_address_space;
317   gdbarch_fast_tracepoint_valid_at_ftype *fast_tracepoint_valid_at;
318   gdbarch_guess_tracepoint_registers_ftype *guess_tracepoint_registers;
319   gdbarch_auto_charset_ftype *auto_charset;
320   gdbarch_auto_wide_charset_ftype *auto_wide_charset;
321   const char * solib_symbols_extension;
322   int has_dos_based_file_system;
323   gdbarch_gen_return_address_ftype *gen_return_address;
324   gdbarch_info_proc_ftype *info_proc;
325   gdbarch_core_info_proc_ftype *core_info_proc;
326   gdbarch_iterate_over_objfiles_in_search_order_ftype *iterate_over_objfiles_in_search_order;
327   struct ravenscar_arch_ops * ravenscar_ops;
328   gdbarch_insn_is_call_ftype *insn_is_call;
329   gdbarch_insn_is_ret_ftype *insn_is_ret;
330   gdbarch_insn_is_jump_ftype *insn_is_jump;
331   gdbarch_auxv_parse_ftype *auxv_parse;
332   gdbarch_print_auxv_entry_ftype *print_auxv_entry;
333   gdbarch_vsyscall_range_ftype *vsyscall_range;
334   gdbarch_infcall_mmap_ftype *infcall_mmap;
335   gdbarch_infcall_munmap_ftype *infcall_munmap;
336   gdbarch_gcc_target_options_ftype *gcc_target_options;
337   gdbarch_gnu_triplet_regexp_ftype *gnu_triplet_regexp;
338   gdbarch_addressable_memory_unit_size_ftype *addressable_memory_unit_size;
339 };
340
341 /* Create a new ``struct gdbarch'' based on information provided by
342    ``struct gdbarch_info''.  */
343
344 struct gdbarch *
345 gdbarch_alloc (const struct gdbarch_info *info,
346                struct gdbarch_tdep *tdep)
347 {
348   struct gdbarch *gdbarch;
349
350   /* Create an obstack for allocating all the per-architecture memory,
351      then use that to allocate the architecture vector.  */
352   struct obstack *obstack = XNEW (struct obstack);
353   obstack_init (obstack);
354   gdbarch = XOBNEW (obstack, struct gdbarch);
355   memset (gdbarch, 0, sizeof (*gdbarch));
356   gdbarch->obstack = obstack;
357
358   alloc_gdbarch_data (gdbarch);
359
360   gdbarch->tdep = tdep;
361
362   gdbarch->bfd_arch_info = info->bfd_arch_info;
363   gdbarch->byte_order = info->byte_order;
364   gdbarch->byte_order_for_code = info->byte_order_for_code;
365   gdbarch->osabi = info->osabi;
366   gdbarch->target_desc = info->target_desc;
367
368   /* Force the explicit initialization of these.  */
369   gdbarch->bits_big_endian = (gdbarch->byte_order == BFD_ENDIAN_BIG);
370   gdbarch->short_bit = 2*TARGET_CHAR_BIT;
371   gdbarch->int_bit = 4*TARGET_CHAR_BIT;
372   gdbarch->long_bit = 4*TARGET_CHAR_BIT;
373   gdbarch->long_long_bit = 2*gdbarch->long_bit;
374   gdbarch->long_long_align_bit = 2*gdbarch->long_bit;
375   gdbarch->half_bit = 2*TARGET_CHAR_BIT;
376   gdbarch->float_bit = 4*TARGET_CHAR_BIT;
377   gdbarch->double_bit = 8*TARGET_CHAR_BIT;
378   gdbarch->long_double_bit = 8*TARGET_CHAR_BIT;
379   gdbarch->ptr_bit = gdbarch->int_bit;
380   gdbarch->char_signed = -1;
381   gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
382   gdbarch->num_regs = -1;
383   gdbarch->sp_regnum = -1;
384   gdbarch->pc_regnum = -1;
385   gdbarch->ps_regnum = -1;
386   gdbarch->fp0_regnum = -1;
387   gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
388   gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
389   gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
390   gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
391   gdbarch->deprecated_fp_regnum = -1;
392   gdbarch->call_dummy_location = AT_ENTRY_POINT;
393   gdbarch->code_of_frame_writable = default_code_of_frame_writable;
394   gdbarch->print_registers_info = default_print_registers_info;
395   gdbarch->print_float_info = default_print_float_info;
396   gdbarch->register_sim_regno = legacy_register_sim_regno;
397   gdbarch->cannot_fetch_register = cannot_register_not;
398   gdbarch->cannot_store_register = cannot_register_not;
399   gdbarch->convert_register_p = generic_convert_register_p;
400   gdbarch->value_from_register = default_value_from_register;
401   gdbarch->pointer_to_address = unsigned_pointer_to_address;
402   gdbarch->address_to_pointer = unsigned_address_to_pointer;
403   gdbarch->return_in_first_hidden_param_p = default_return_in_first_hidden_param_p;
404   gdbarch->remote_breakpoint_from_pc = default_remote_breakpoint_from_pc;
405   gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
406   gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
407   gdbarch->remote_register_number = default_remote_register_number;
408   gdbarch->stabs_argument_has_addr = default_stabs_argument_has_addr;
409   gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr_identity;
410   gdbarch->addr_bits_remove = core_addr_identity;
411   gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
412   gdbarch->skip_solib_resolver = generic_skip_solib_resolver;
413   gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
414   gdbarch->stack_frame_destroyed_p = generic_stack_frame_destroyed_p;
415   gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
416   gdbarch->make_symbol_special = default_make_symbol_special;
417   gdbarch->adjust_dwarf2_addr = default_adjust_dwarf2_addr;
418   gdbarch->adjust_dwarf2_line = default_adjust_dwarf2_line;
419   gdbarch->register_reggroup_p = default_register_reggroup_p;
420   gdbarch->skip_permanent_breakpoint = default_skip_permanent_breakpoint;
421   gdbarch->displaced_step_hw_singlestep = default_displaced_step_hw_singlestep;
422   gdbarch->displaced_step_fixup = NULL;
423   gdbarch->displaced_step_free_closure = NULL;
424   gdbarch->displaced_step_location = NULL;
425   gdbarch->relocate_instruction = NULL;
426   gdbarch->has_shared_address_space = default_has_shared_address_space;
427   gdbarch->fast_tracepoint_valid_at = default_fast_tracepoint_valid_at;
428   gdbarch->guess_tracepoint_registers = default_guess_tracepoint_registers;
429   gdbarch->auto_charset = default_auto_charset;
430   gdbarch->auto_wide_charset = default_auto_wide_charset;
431   gdbarch->gen_return_address = default_gen_return_address;
432   gdbarch->iterate_over_objfiles_in_search_order = default_iterate_over_objfiles_in_search_order;
433   gdbarch->ravenscar_ops = NULL;
434   gdbarch->insn_is_call = default_insn_is_call;
435   gdbarch->insn_is_ret = default_insn_is_ret;
436   gdbarch->insn_is_jump = default_insn_is_jump;
437   gdbarch->print_auxv_entry = default_print_auxv_entry;
438   gdbarch->vsyscall_range = default_vsyscall_range;
439   gdbarch->infcall_mmap = default_infcall_mmap;
440   gdbarch->infcall_munmap = default_infcall_munmap;
441   gdbarch->gcc_target_options = default_gcc_target_options;
442   gdbarch->gnu_triplet_regexp = default_gnu_triplet_regexp;
443   gdbarch->addressable_memory_unit_size = default_addressable_memory_unit_size;
444   /* gdbarch_alloc() */
445
446   return gdbarch;
447 }
448
449
450 /* Allocate extra space using the per-architecture obstack.  */
451
452 void *
453 gdbarch_obstack_zalloc (struct gdbarch *arch, long size)
454 {
455   void *data = obstack_alloc (arch->obstack, size);
456
457   memset (data, 0, size);
458   return data;
459 }
460
461 /* See gdbarch.h.  */
462
463 char *
464 gdbarch_obstack_strdup (struct gdbarch *arch, const char *string)
465 {
466   return obstack_strdup (arch->obstack, string);
467 }
468
469
470 /* Free a gdbarch struct.  This should never happen in normal
471    operation --- once you've created a gdbarch, you keep it around.
472    However, if an architecture's init function encounters an error
473    building the structure, it may need to clean up a partially
474    constructed gdbarch.  */
475
476 void
477 gdbarch_free (struct gdbarch *arch)
478 {
479   struct obstack *obstack;
480
481   gdb_assert (arch != NULL);
482   gdb_assert (!arch->initialized_p);
483   obstack = arch->obstack;
484   obstack_free (obstack, 0); /* Includes the ARCH.  */
485   xfree (obstack);
486 }
487
488
489 /* Ensure that all values in a GDBARCH are reasonable.  */
490
491 static void
492 verify_gdbarch (struct gdbarch *gdbarch)
493 {
494   struct ui_file *log;
495   struct cleanup *cleanups;
496   long length;
497   char *buf;
498
499   log = mem_fileopen ();
500   cleanups = make_cleanup_ui_file_delete (log);
501   /* fundamental */
502   if (gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
503     fprintf_unfiltered (log, "\n\tbyte-order");
504   if (gdbarch->bfd_arch_info == NULL)
505     fprintf_unfiltered (log, "\n\tbfd_arch_info");
506   /* Check those that need to be defined for the given multi-arch level.  */
507   /* Skip verify of bits_big_endian, invalid_p == 0 */
508   /* Skip verify of short_bit, invalid_p == 0 */
509   /* Skip verify of int_bit, invalid_p == 0 */
510   /* Skip verify of long_bit, invalid_p == 0 */
511   /* Skip verify of long_long_bit, invalid_p == 0 */
512   /* Skip verify of long_long_align_bit, invalid_p == 0 */
513   /* Skip verify of half_bit, invalid_p == 0 */
514   if (gdbarch->half_format == 0)
515     gdbarch->half_format = floatformats_ieee_half;
516   /* Skip verify of float_bit, invalid_p == 0 */
517   if (gdbarch->float_format == 0)
518     gdbarch->float_format = floatformats_ieee_single;
519   /* Skip verify of double_bit, invalid_p == 0 */
520   if (gdbarch->double_format == 0)
521     gdbarch->double_format = floatformats_ieee_double;
522   /* Skip verify of long_double_bit, invalid_p == 0 */
523   if (gdbarch->long_double_format == 0)
524     gdbarch->long_double_format = floatformats_ieee_double;
525   /* Skip verify of ptr_bit, invalid_p == 0 */
526   if (gdbarch->addr_bit == 0)
527     gdbarch->addr_bit = gdbarch_ptr_bit (gdbarch);
528   if (gdbarch->dwarf2_addr_size == 0)
529     gdbarch->dwarf2_addr_size = gdbarch_ptr_bit (gdbarch) / TARGET_CHAR_BIT;
530   if (gdbarch->char_signed == -1)
531     gdbarch->char_signed = 1;
532   /* Skip verify of read_pc, has predicate.  */
533   /* Skip verify of write_pc, has predicate.  */
534   /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
535   /* Skip verify of pseudo_register_read, has predicate.  */
536   /* Skip verify of pseudo_register_read_value, has predicate.  */
537   /* Skip verify of pseudo_register_write, has predicate.  */
538   if (gdbarch->num_regs == -1)
539     fprintf_unfiltered (log, "\n\tnum_regs");
540   /* Skip verify of num_pseudo_regs, invalid_p == 0 */
541   /* Skip verify of ax_pseudo_register_collect, has predicate.  */
542   /* Skip verify of ax_pseudo_register_push_stack, has predicate.  */
543   /* Skip verify of handle_segmentation_fault, has predicate.  */
544   /* Skip verify of sp_regnum, invalid_p == 0 */
545   /* Skip verify of pc_regnum, invalid_p == 0 */
546   /* Skip verify of ps_regnum, invalid_p == 0 */
547   /* Skip verify of fp0_regnum, invalid_p == 0 */
548   /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
549   /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
550   /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
551   /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
552   if (gdbarch->register_name == 0)
553     fprintf_unfiltered (log, "\n\tregister_name");
554   /* Skip verify of register_type, has predicate.  */
555   /* Skip verify of dummy_id, has predicate.  */
556   /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
557   /* Skip verify of push_dummy_call, has predicate.  */
558   /* Skip verify of call_dummy_location, invalid_p == 0 */
559   /* Skip verify of push_dummy_code, has predicate.  */
560   /* Skip verify of code_of_frame_writable, invalid_p == 0 */
561   /* Skip verify of print_registers_info, invalid_p == 0 */
562   /* Skip verify of print_float_info, invalid_p == 0 */
563   /* Skip verify of print_vector_info, has predicate.  */
564   /* Skip verify of register_sim_regno, invalid_p == 0 */
565   /* Skip verify of cannot_fetch_register, invalid_p == 0 */
566   /* Skip verify of cannot_store_register, invalid_p == 0 */
567   /* Skip verify of get_longjmp_target, has predicate.  */
568   /* Skip verify of convert_register_p, invalid_p == 0 */
569   /* Skip verify of value_from_register, invalid_p == 0 */
570   /* Skip verify of pointer_to_address, invalid_p == 0 */
571   /* Skip verify of address_to_pointer, invalid_p == 0 */
572   /* Skip verify of integer_to_address, has predicate.  */
573   /* Skip verify of return_value, has predicate.  */
574   /* Skip verify of return_in_first_hidden_param_p, invalid_p == 0 */
575   if (gdbarch->skip_prologue == 0)
576     fprintf_unfiltered (log, "\n\tskip_prologue");
577   /* Skip verify of skip_main_prologue, has predicate.  */
578   /* Skip verify of skip_entrypoint, has predicate.  */
579   if (gdbarch->inner_than == 0)
580     fprintf_unfiltered (log, "\n\tinner_than");
581   if (gdbarch->breakpoint_from_pc == 0)
582     fprintf_unfiltered (log, "\n\tbreakpoint_from_pc");
583   /* Skip verify of remote_breakpoint_from_pc, invalid_p == 0 */
584   /* Skip verify of adjust_breakpoint_address, has predicate.  */
585   /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
586   /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
587   /* Skip verify of decr_pc_after_break, invalid_p == 0 */
588   /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
589   /* Skip verify of remote_register_number, invalid_p == 0 */
590   /* Skip verify of fetch_tls_load_module_address, has predicate.  */
591   /* Skip verify of frame_args_skip, invalid_p == 0 */
592   /* Skip verify of unwind_pc, has predicate.  */
593   /* Skip verify of unwind_sp, has predicate.  */
594   /* Skip verify of frame_num_args, has predicate.  */
595   /* Skip verify of frame_align, has predicate.  */
596   /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
597   /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
598   /* Skip verify of addr_bits_remove, invalid_p == 0 */
599   /* Skip verify of software_single_step, has predicate.  */
600   /* Skip verify of single_step_through_delay, has predicate.  */
601   if (gdbarch->print_insn == 0)
602     fprintf_unfiltered (log, "\n\tprint_insn");
603   /* Skip verify of skip_trampoline_code, invalid_p == 0 */
604   /* Skip verify of skip_solib_resolver, invalid_p == 0 */
605   /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
606   /* Skip verify of stack_frame_destroyed_p, invalid_p == 0 */
607   /* Skip verify of elf_make_msymbol_special, has predicate.  */
608   /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
609   /* Skip verify of make_symbol_special, invalid_p == 0 */
610   /* Skip verify of adjust_dwarf2_addr, invalid_p == 0 */
611   /* Skip verify of adjust_dwarf2_line, invalid_p == 0 */
612   /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
613   /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
614   /* Skip verify of address_class_type_flags, has predicate.  */
615   /* Skip verify of address_class_type_flags_to_name, has predicate.  */
616   /* Skip verify of address_class_name_to_type_flags, has predicate.  */
617   /* Skip verify of register_reggroup_p, invalid_p == 0 */
618   /* Skip verify of fetch_pointer_argument, has predicate.  */
619   /* Skip verify of iterate_over_regset_sections, has predicate.  */
620   /* Skip verify of make_corefile_notes, has predicate.  */
621   /* Skip verify of elfcore_write_linux_prpsinfo, has predicate.  */
622   /* Skip verify of find_memory_regions, has predicate.  */
623   /* Skip verify of core_xfer_shared_libraries, has predicate.  */
624   /* Skip verify of core_xfer_shared_libraries_aix, has predicate.  */
625   /* Skip verify of core_pid_to_str, has predicate.  */
626   /* Skip verify of core_thread_name, has predicate.  */
627   /* Skip verify of gcore_bfd_target, has predicate.  */
628   /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
629   /* Skip verify of vbit_in_delta, invalid_p == 0 */
630   /* Skip verify of skip_permanent_breakpoint, invalid_p == 0 */
631   /* Skip verify of max_insn_length, has predicate.  */
632   /* Skip verify of displaced_step_copy_insn, has predicate.  */
633   /* Skip verify of displaced_step_hw_singlestep, invalid_p == 0 */
634   /* Skip verify of displaced_step_fixup, has predicate.  */
635   if ((! gdbarch->displaced_step_free_closure) != (! gdbarch->displaced_step_copy_insn))
636     fprintf_unfiltered (log, "\n\tdisplaced_step_free_closure");
637   if ((! gdbarch->displaced_step_location) != (! gdbarch->displaced_step_copy_insn))
638     fprintf_unfiltered (log, "\n\tdisplaced_step_location");
639   /* Skip verify of relocate_instruction, has predicate.  */
640   /* Skip verify of overlay_update, has predicate.  */
641   /* Skip verify of core_read_description, has predicate.  */
642   /* Skip verify of static_transform_name, has predicate.  */
643   /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
644   /* Skip verify of process_record, has predicate.  */
645   /* Skip verify of process_record_signal, has predicate.  */
646   /* Skip verify of gdb_signal_from_target, has predicate.  */
647   /* Skip verify of gdb_signal_to_target, has predicate.  */
648   /* Skip verify of get_siginfo_type, has predicate.  */
649   /* Skip verify of record_special_symbol, has predicate.  */
650   /* Skip verify of get_syscall_number, has predicate.  */
651   /* Skip verify of xml_syscall_file, invalid_p == 0 */
652   /* Skip verify of syscalls_info, invalid_p == 0 */
653   /* Skip verify of stap_integer_prefixes, invalid_p == 0 */
654   /* Skip verify of stap_integer_suffixes, invalid_p == 0 */
655   /* Skip verify of stap_register_prefixes, invalid_p == 0 */
656   /* Skip verify of stap_register_suffixes, invalid_p == 0 */
657   /* Skip verify of stap_register_indirection_prefixes, invalid_p == 0 */
658   /* Skip verify of stap_register_indirection_suffixes, invalid_p == 0 */
659   /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */
660   /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */
661   /* Skip verify of stap_is_single_operand, has predicate.  */
662   /* Skip verify of stap_parse_special_token, has predicate.  */
663   /* Skip verify of dtrace_parse_probe_argument, has predicate.  */
664   /* Skip verify of dtrace_probe_is_enabled, has predicate.  */
665   /* Skip verify of dtrace_enable_probe, has predicate.  */
666   /* Skip verify of dtrace_disable_probe, has predicate.  */
667   /* Skip verify of has_global_solist, invalid_p == 0 */
668   /* Skip verify of has_global_breakpoints, invalid_p == 0 */
669   /* Skip verify of has_shared_address_space, invalid_p == 0 */
670   /* Skip verify of fast_tracepoint_valid_at, invalid_p == 0 */
671   /* Skip verify of guess_tracepoint_registers, invalid_p == 0 */
672   /* Skip verify of auto_charset, invalid_p == 0 */
673   /* Skip verify of auto_wide_charset, invalid_p == 0 */
674   /* Skip verify of has_dos_based_file_system, invalid_p == 0 */
675   /* Skip verify of gen_return_address, invalid_p == 0 */
676   /* Skip verify of info_proc, has predicate.  */
677   /* Skip verify of core_info_proc, has predicate.  */
678   /* Skip verify of iterate_over_objfiles_in_search_order, invalid_p == 0 */
679   /* Skip verify of ravenscar_ops, invalid_p == 0 */
680   /* Skip verify of insn_is_call, invalid_p == 0 */
681   /* Skip verify of insn_is_ret, invalid_p == 0 */
682   /* Skip verify of insn_is_jump, invalid_p == 0 */
683   /* Skip verify of auxv_parse, has predicate.  */
684   /* Skip verify of print_auxv_entry, invalid_p == 0 */
685   /* Skip verify of vsyscall_range, invalid_p == 0 */
686   /* Skip verify of infcall_mmap, invalid_p == 0 */
687   /* Skip verify of infcall_munmap, invalid_p == 0 */
688   /* Skip verify of gcc_target_options, invalid_p == 0 */
689   /* Skip verify of gnu_triplet_regexp, invalid_p == 0 */
690   /* Skip verify of addressable_memory_unit_size, invalid_p == 0 */
691   buf = ui_file_xstrdup (log, &length);
692   make_cleanup (xfree, buf);
693   if (length > 0)
694     internal_error (__FILE__, __LINE__,
695                     _("verify_gdbarch: the following are invalid ...%s"),
696                     buf);
697   do_cleanups (cleanups);
698 }
699
700
701 /* Print out the details of the current architecture.  */
702
703 void
704 gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
705 {
706   const char *gdb_nm_file = "<not-defined>";
707
708 #if defined (GDB_NM_FILE)
709   gdb_nm_file = GDB_NM_FILE;
710 #endif
711   fprintf_unfiltered (file,
712                       "gdbarch_dump: GDB_NM_FILE = %s\n",
713                       gdb_nm_file);
714   fprintf_unfiltered (file,
715                       "gdbarch_dump: addr_bit = %s\n",
716                       plongest (gdbarch->addr_bit));
717   fprintf_unfiltered (file,
718                       "gdbarch_dump: addr_bits_remove = <%s>\n",
719                       host_address_to_string (gdbarch->addr_bits_remove));
720   fprintf_unfiltered (file,
721                       "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
722                       gdbarch_address_class_name_to_type_flags_p (gdbarch));
723   fprintf_unfiltered (file,
724                       "gdbarch_dump: address_class_name_to_type_flags = <%s>\n",
725                       host_address_to_string (gdbarch->address_class_name_to_type_flags));
726   fprintf_unfiltered (file,
727                       "gdbarch_dump: gdbarch_address_class_type_flags_p() = %d\n",
728                       gdbarch_address_class_type_flags_p (gdbarch));
729   fprintf_unfiltered (file,
730                       "gdbarch_dump: address_class_type_flags = <%s>\n",
731                       host_address_to_string (gdbarch->address_class_type_flags));
732   fprintf_unfiltered (file,
733                       "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
734                       gdbarch_address_class_type_flags_to_name_p (gdbarch));
735   fprintf_unfiltered (file,
736                       "gdbarch_dump: address_class_type_flags_to_name = <%s>\n",
737                       host_address_to_string (gdbarch->address_class_type_flags_to_name));
738   fprintf_unfiltered (file,
739                       "gdbarch_dump: address_to_pointer = <%s>\n",
740                       host_address_to_string (gdbarch->address_to_pointer));
741   fprintf_unfiltered (file,
742                       "gdbarch_dump: addressable_memory_unit_size = <%s>\n",
743                       host_address_to_string (gdbarch->addressable_memory_unit_size));
744   fprintf_unfiltered (file,
745                       "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n",
746                       gdbarch_adjust_breakpoint_address_p (gdbarch));
747   fprintf_unfiltered (file,
748                       "gdbarch_dump: adjust_breakpoint_address = <%s>\n",
749                       host_address_to_string (gdbarch->adjust_breakpoint_address));
750   fprintf_unfiltered (file,
751                       "gdbarch_dump: adjust_dwarf2_addr = <%s>\n",
752                       host_address_to_string (gdbarch->adjust_dwarf2_addr));
753   fprintf_unfiltered (file,
754                       "gdbarch_dump: adjust_dwarf2_line = <%s>\n",
755                       host_address_to_string (gdbarch->adjust_dwarf2_line));
756   fprintf_unfiltered (file,
757                       "gdbarch_dump: auto_charset = <%s>\n",
758                       host_address_to_string (gdbarch->auto_charset));
759   fprintf_unfiltered (file,
760                       "gdbarch_dump: auto_wide_charset = <%s>\n",
761                       host_address_to_string (gdbarch->auto_wide_charset));
762   fprintf_unfiltered (file,
763                       "gdbarch_dump: gdbarch_auxv_parse_p() = %d\n",
764                       gdbarch_auxv_parse_p (gdbarch));
765   fprintf_unfiltered (file,
766                       "gdbarch_dump: auxv_parse = <%s>\n",
767                       host_address_to_string (gdbarch->auxv_parse));
768   fprintf_unfiltered (file,
769                       "gdbarch_dump: gdbarch_ax_pseudo_register_collect_p() = %d\n",
770                       gdbarch_ax_pseudo_register_collect_p (gdbarch));
771   fprintf_unfiltered (file,
772                       "gdbarch_dump: ax_pseudo_register_collect = <%s>\n",
773                       host_address_to_string (gdbarch->ax_pseudo_register_collect));
774   fprintf_unfiltered (file,
775                       "gdbarch_dump: gdbarch_ax_pseudo_register_push_stack_p() = %d\n",
776                       gdbarch_ax_pseudo_register_push_stack_p (gdbarch));
777   fprintf_unfiltered (file,
778                       "gdbarch_dump: ax_pseudo_register_push_stack = <%s>\n",
779                       host_address_to_string (gdbarch->ax_pseudo_register_push_stack));
780   fprintf_unfiltered (file,
781                       "gdbarch_dump: believe_pcc_promotion = %s\n",
782                       plongest (gdbarch->believe_pcc_promotion));
783   fprintf_unfiltered (file,
784                       "gdbarch_dump: bfd_arch_info = %s\n",
785                       gdbarch_bfd_arch_info (gdbarch)->printable_name);
786   fprintf_unfiltered (file,
787                       "gdbarch_dump: bits_big_endian = %s\n",
788                       plongest (gdbarch->bits_big_endian));
789   fprintf_unfiltered (file,
790                       "gdbarch_dump: breakpoint_from_pc = <%s>\n",
791                       host_address_to_string (gdbarch->breakpoint_from_pc));
792   fprintf_unfiltered (file,
793                       "gdbarch_dump: byte_order = %s\n",
794                       plongest (gdbarch->byte_order));
795   fprintf_unfiltered (file,
796                       "gdbarch_dump: byte_order_for_code = %s\n",
797                       plongest (gdbarch->byte_order_for_code));
798   fprintf_unfiltered (file,
799                       "gdbarch_dump: call_dummy_location = %s\n",
800                       plongest (gdbarch->call_dummy_location));
801   fprintf_unfiltered (file,
802                       "gdbarch_dump: cannot_fetch_register = <%s>\n",
803                       host_address_to_string (gdbarch->cannot_fetch_register));
804   fprintf_unfiltered (file,
805                       "gdbarch_dump: cannot_step_breakpoint = %s\n",
806                       plongest (gdbarch->cannot_step_breakpoint));
807   fprintf_unfiltered (file,
808                       "gdbarch_dump: cannot_store_register = <%s>\n",
809                       host_address_to_string (gdbarch->cannot_store_register));
810   fprintf_unfiltered (file,
811                       "gdbarch_dump: char_signed = %s\n",
812                       plongest (gdbarch->char_signed));
813   fprintf_unfiltered (file,
814                       "gdbarch_dump: code_of_frame_writable = <%s>\n",
815                       host_address_to_string (gdbarch->code_of_frame_writable));
816   fprintf_unfiltered (file,
817                       "gdbarch_dump: coff_make_msymbol_special = <%s>\n",
818                       host_address_to_string (gdbarch->coff_make_msymbol_special));
819   fprintf_unfiltered (file,
820                       "gdbarch_dump: convert_from_func_ptr_addr = <%s>\n",
821                       host_address_to_string (gdbarch->convert_from_func_ptr_addr));
822   fprintf_unfiltered (file,
823                       "gdbarch_dump: convert_register_p = <%s>\n",
824                       host_address_to_string (gdbarch->convert_register_p));
825   fprintf_unfiltered (file,
826                       "gdbarch_dump: gdbarch_core_info_proc_p() = %d\n",
827                       gdbarch_core_info_proc_p (gdbarch));
828   fprintf_unfiltered (file,
829                       "gdbarch_dump: core_info_proc = <%s>\n",
830                       host_address_to_string (gdbarch->core_info_proc));
831   fprintf_unfiltered (file,
832                       "gdbarch_dump: gdbarch_core_pid_to_str_p() = %d\n",
833                       gdbarch_core_pid_to_str_p (gdbarch));
834   fprintf_unfiltered (file,
835                       "gdbarch_dump: core_pid_to_str = <%s>\n",
836                       host_address_to_string (gdbarch->core_pid_to_str));
837   fprintf_unfiltered (file,
838                       "gdbarch_dump: gdbarch_core_read_description_p() = %d\n",
839                       gdbarch_core_read_description_p (gdbarch));
840   fprintf_unfiltered (file,
841                       "gdbarch_dump: core_read_description = <%s>\n",
842                       host_address_to_string (gdbarch->core_read_description));
843   fprintf_unfiltered (file,
844                       "gdbarch_dump: gdbarch_core_thread_name_p() = %d\n",
845                       gdbarch_core_thread_name_p (gdbarch));
846   fprintf_unfiltered (file,
847                       "gdbarch_dump: core_thread_name = <%s>\n",
848                       host_address_to_string (gdbarch->core_thread_name));
849   fprintf_unfiltered (file,
850                       "gdbarch_dump: gdbarch_core_xfer_shared_libraries_p() = %d\n",
851                       gdbarch_core_xfer_shared_libraries_p (gdbarch));
852   fprintf_unfiltered (file,
853                       "gdbarch_dump: core_xfer_shared_libraries = <%s>\n",
854                       host_address_to_string (gdbarch->core_xfer_shared_libraries));
855   fprintf_unfiltered (file,
856                       "gdbarch_dump: gdbarch_core_xfer_shared_libraries_aix_p() = %d\n",
857                       gdbarch_core_xfer_shared_libraries_aix_p (gdbarch));
858   fprintf_unfiltered (file,
859                       "gdbarch_dump: core_xfer_shared_libraries_aix = <%s>\n",
860                       host_address_to_string (gdbarch->core_xfer_shared_libraries_aix));
861   fprintf_unfiltered (file,
862                       "gdbarch_dump: decr_pc_after_break = %s\n",
863                       core_addr_to_string_nz (gdbarch->decr_pc_after_break));
864   fprintf_unfiltered (file,
865                       "gdbarch_dump: deprecated_fp_regnum = %s\n",
866                       plongest (gdbarch->deprecated_fp_regnum));
867   fprintf_unfiltered (file,
868                       "gdbarch_dump: deprecated_function_start_offset = %s\n",
869                       core_addr_to_string_nz (gdbarch->deprecated_function_start_offset));
870   fprintf_unfiltered (file,
871                       "gdbarch_dump: gdbarch_displaced_step_copy_insn_p() = %d\n",
872                       gdbarch_displaced_step_copy_insn_p (gdbarch));
873   fprintf_unfiltered (file,
874                       "gdbarch_dump: displaced_step_copy_insn = <%s>\n",
875                       host_address_to_string (gdbarch->displaced_step_copy_insn));
876   fprintf_unfiltered (file,
877                       "gdbarch_dump: gdbarch_displaced_step_fixup_p() = %d\n",
878                       gdbarch_displaced_step_fixup_p (gdbarch));
879   fprintf_unfiltered (file,
880                       "gdbarch_dump: displaced_step_fixup = <%s>\n",
881                       host_address_to_string (gdbarch->displaced_step_fixup));
882   fprintf_unfiltered (file,
883                       "gdbarch_dump: displaced_step_free_closure = <%s>\n",
884                       host_address_to_string (gdbarch->displaced_step_free_closure));
885   fprintf_unfiltered (file,
886                       "gdbarch_dump: displaced_step_hw_singlestep = <%s>\n",
887                       host_address_to_string (gdbarch->displaced_step_hw_singlestep));
888   fprintf_unfiltered (file,
889                       "gdbarch_dump: displaced_step_location = <%s>\n",
890                       host_address_to_string (gdbarch->displaced_step_location));
891   fprintf_unfiltered (file,
892                       "gdbarch_dump: double_bit = %s\n",
893                       plongest (gdbarch->double_bit));
894   fprintf_unfiltered (file,
895                       "gdbarch_dump: double_format = %s\n",
896                       pformat (gdbarch->double_format));
897   fprintf_unfiltered (file,
898                       "gdbarch_dump: gdbarch_dtrace_disable_probe_p() = %d\n",
899                       gdbarch_dtrace_disable_probe_p (gdbarch));
900   fprintf_unfiltered (file,
901                       "gdbarch_dump: dtrace_disable_probe = <%s>\n",
902                       host_address_to_string (gdbarch->dtrace_disable_probe));
903   fprintf_unfiltered (file,
904                       "gdbarch_dump: gdbarch_dtrace_enable_probe_p() = %d\n",
905                       gdbarch_dtrace_enable_probe_p (gdbarch));
906   fprintf_unfiltered (file,
907                       "gdbarch_dump: dtrace_enable_probe = <%s>\n",
908                       host_address_to_string (gdbarch->dtrace_enable_probe));
909   fprintf_unfiltered (file,
910                       "gdbarch_dump: gdbarch_dtrace_parse_probe_argument_p() = %d\n",
911                       gdbarch_dtrace_parse_probe_argument_p (gdbarch));
912   fprintf_unfiltered (file,
913                       "gdbarch_dump: dtrace_parse_probe_argument = <%s>\n",
914                       host_address_to_string (gdbarch->dtrace_parse_probe_argument));
915   fprintf_unfiltered (file,
916                       "gdbarch_dump: gdbarch_dtrace_probe_is_enabled_p() = %d\n",
917                       gdbarch_dtrace_probe_is_enabled_p (gdbarch));
918   fprintf_unfiltered (file,
919                       "gdbarch_dump: dtrace_probe_is_enabled = <%s>\n",
920                       host_address_to_string (gdbarch->dtrace_probe_is_enabled));
921   fprintf_unfiltered (file,
922                       "gdbarch_dump: gdbarch_dummy_id_p() = %d\n",
923                       gdbarch_dummy_id_p (gdbarch));
924   fprintf_unfiltered (file,
925                       "gdbarch_dump: dummy_id = <%s>\n",
926                       host_address_to_string (gdbarch->dummy_id));
927   fprintf_unfiltered (file,
928                       "gdbarch_dump: dwarf2_addr_size = %s\n",
929                       plongest (gdbarch->dwarf2_addr_size));
930   fprintf_unfiltered (file,
931                       "gdbarch_dump: dwarf2_reg_to_regnum = <%s>\n",
932                       host_address_to_string (gdbarch->dwarf2_reg_to_regnum));
933   fprintf_unfiltered (file,
934                       "gdbarch_dump: ecoff_reg_to_regnum = <%s>\n",
935                       host_address_to_string (gdbarch->ecoff_reg_to_regnum));
936   fprintf_unfiltered (file,
937                       "gdbarch_dump: gdbarch_elf_make_msymbol_special_p() = %d\n",
938                       gdbarch_elf_make_msymbol_special_p (gdbarch));
939   fprintf_unfiltered (file,
940                       "gdbarch_dump: elf_make_msymbol_special = <%s>\n",
941                       host_address_to_string (gdbarch->elf_make_msymbol_special));
942   fprintf_unfiltered (file,
943                       "gdbarch_dump: gdbarch_elfcore_write_linux_prpsinfo_p() = %d\n",
944                       gdbarch_elfcore_write_linux_prpsinfo_p (gdbarch));
945   fprintf_unfiltered (file,
946                       "gdbarch_dump: elfcore_write_linux_prpsinfo = <%s>\n",
947                       host_address_to_string (gdbarch->elfcore_write_linux_prpsinfo));
948   fprintf_unfiltered (file,
949                       "gdbarch_dump: fast_tracepoint_valid_at = <%s>\n",
950                       host_address_to_string (gdbarch->fast_tracepoint_valid_at));
951   fprintf_unfiltered (file,
952                       "gdbarch_dump: gdbarch_fetch_pointer_argument_p() = %d\n",
953                       gdbarch_fetch_pointer_argument_p (gdbarch));
954   fprintf_unfiltered (file,
955                       "gdbarch_dump: fetch_pointer_argument = <%s>\n",
956                       host_address_to_string (gdbarch->fetch_pointer_argument));
957   fprintf_unfiltered (file,
958                       "gdbarch_dump: gdbarch_fetch_tls_load_module_address_p() = %d\n",
959                       gdbarch_fetch_tls_load_module_address_p (gdbarch));
960   fprintf_unfiltered (file,
961                       "gdbarch_dump: fetch_tls_load_module_address = <%s>\n",
962                       host_address_to_string (gdbarch->fetch_tls_load_module_address));
963   fprintf_unfiltered (file,
964                       "gdbarch_dump: gdbarch_find_memory_regions_p() = %d\n",
965                       gdbarch_find_memory_regions_p (gdbarch));
966   fprintf_unfiltered (file,
967                       "gdbarch_dump: find_memory_regions = <%s>\n",
968                       host_address_to_string (gdbarch->find_memory_regions));
969   fprintf_unfiltered (file,
970                       "gdbarch_dump: float_bit = %s\n",
971                       plongest (gdbarch->float_bit));
972   fprintf_unfiltered (file,
973                       "gdbarch_dump: float_format = %s\n",
974                       pformat (gdbarch->float_format));
975   fprintf_unfiltered (file,
976                       "gdbarch_dump: fp0_regnum = %s\n",
977                       plongest (gdbarch->fp0_regnum));
978   fprintf_unfiltered (file,
979                       "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
980                       gdbarch_frame_align_p (gdbarch));
981   fprintf_unfiltered (file,
982                       "gdbarch_dump: frame_align = <%s>\n",
983                       host_address_to_string (gdbarch->frame_align));
984   fprintf_unfiltered (file,
985                       "gdbarch_dump: frame_args_skip = %s\n",
986                       core_addr_to_string_nz (gdbarch->frame_args_skip));
987   fprintf_unfiltered (file,
988                       "gdbarch_dump: gdbarch_frame_num_args_p() = %d\n",
989                       gdbarch_frame_num_args_p (gdbarch));
990   fprintf_unfiltered (file,
991                       "gdbarch_dump: frame_num_args = <%s>\n",
992                       host_address_to_string (gdbarch->frame_num_args));
993   fprintf_unfiltered (file,
994                       "gdbarch_dump: frame_red_zone_size = %s\n",
995                       plongest (gdbarch->frame_red_zone_size));
996   fprintf_unfiltered (file,
997                       "gdbarch_dump: gcc_target_options = <%s>\n",
998                       host_address_to_string (gdbarch->gcc_target_options));
999   fprintf_unfiltered (file,
1000                       "gdbarch_dump: gdbarch_gcore_bfd_target_p() = %d\n",
1001                       gdbarch_gcore_bfd_target_p (gdbarch));
1002   fprintf_unfiltered (file,
1003                       "gdbarch_dump: gcore_bfd_target = %s\n",
1004                       pstring (gdbarch->gcore_bfd_target));
1005   fprintf_unfiltered (file,
1006                       "gdbarch_dump: gdbarch_gdb_signal_from_target_p() = %d\n",
1007                       gdbarch_gdb_signal_from_target_p (gdbarch));
1008   fprintf_unfiltered (file,
1009                       "gdbarch_dump: gdb_signal_from_target = <%s>\n",
1010                       host_address_to_string (gdbarch->gdb_signal_from_target));
1011   fprintf_unfiltered (file,
1012                       "gdbarch_dump: gdbarch_gdb_signal_to_target_p() = %d\n",
1013                       gdbarch_gdb_signal_to_target_p (gdbarch));
1014   fprintf_unfiltered (file,
1015                       "gdbarch_dump: gdb_signal_to_target = <%s>\n",
1016                       host_address_to_string (gdbarch->gdb_signal_to_target));
1017   fprintf_unfiltered (file,
1018                       "gdbarch_dump: gen_return_address = <%s>\n",
1019                       host_address_to_string (gdbarch->gen_return_address));
1020   fprintf_unfiltered (file,
1021                       "gdbarch_dump: gdbarch_get_longjmp_target_p() = %d\n",
1022                       gdbarch_get_longjmp_target_p (gdbarch));
1023   fprintf_unfiltered (file,
1024                       "gdbarch_dump: get_longjmp_target = <%s>\n",
1025                       host_address_to_string (gdbarch->get_longjmp_target));
1026   fprintf_unfiltered (file,
1027                       "gdbarch_dump: gdbarch_get_siginfo_type_p() = %d\n",
1028                       gdbarch_get_siginfo_type_p (gdbarch));
1029   fprintf_unfiltered (file,
1030                       "gdbarch_dump: get_siginfo_type = <%s>\n",
1031                       host_address_to_string (gdbarch->get_siginfo_type));
1032   fprintf_unfiltered (file,
1033                       "gdbarch_dump: gdbarch_get_syscall_number_p() = %d\n",
1034                       gdbarch_get_syscall_number_p (gdbarch));
1035   fprintf_unfiltered (file,
1036                       "gdbarch_dump: get_syscall_number = <%s>\n",
1037                       host_address_to_string (gdbarch->get_syscall_number));
1038   fprintf_unfiltered (file,
1039                       "gdbarch_dump: gnu_triplet_regexp = <%s>\n",
1040                       host_address_to_string (gdbarch->gnu_triplet_regexp));
1041   fprintf_unfiltered (file,
1042                       "gdbarch_dump: guess_tracepoint_registers = <%s>\n",
1043                       host_address_to_string (gdbarch->guess_tracepoint_registers));
1044   fprintf_unfiltered (file,
1045                       "gdbarch_dump: half_bit = %s\n",
1046                       plongest (gdbarch->half_bit));
1047   fprintf_unfiltered (file,
1048                       "gdbarch_dump: half_format = %s\n",
1049                       pformat (gdbarch->half_format));
1050   fprintf_unfiltered (file,
1051                       "gdbarch_dump: gdbarch_handle_segmentation_fault_p() = %d\n",
1052                       gdbarch_handle_segmentation_fault_p (gdbarch));
1053   fprintf_unfiltered (file,
1054                       "gdbarch_dump: handle_segmentation_fault = <%s>\n",
1055                       host_address_to_string (gdbarch->handle_segmentation_fault));
1056   fprintf_unfiltered (file,
1057                       "gdbarch_dump: has_dos_based_file_system = %s\n",
1058                       plongest (gdbarch->has_dos_based_file_system));
1059   fprintf_unfiltered (file,
1060                       "gdbarch_dump: has_global_breakpoints = %s\n",
1061                       plongest (gdbarch->has_global_breakpoints));
1062   fprintf_unfiltered (file,
1063                       "gdbarch_dump: has_global_solist = %s\n",
1064                       plongest (gdbarch->has_global_solist));
1065   fprintf_unfiltered (file,
1066                       "gdbarch_dump: has_shared_address_space = <%s>\n",
1067                       host_address_to_string (gdbarch->has_shared_address_space));
1068   fprintf_unfiltered (file,
1069                       "gdbarch_dump: have_nonsteppable_watchpoint = %s\n",
1070                       plongest (gdbarch->have_nonsteppable_watchpoint));
1071   fprintf_unfiltered (file,
1072                       "gdbarch_dump: in_solib_return_trampoline = <%s>\n",
1073                       host_address_to_string (gdbarch->in_solib_return_trampoline));
1074   fprintf_unfiltered (file,
1075                       "gdbarch_dump: infcall_mmap = <%s>\n",
1076                       host_address_to_string (gdbarch->infcall_mmap));
1077   fprintf_unfiltered (file,
1078                       "gdbarch_dump: infcall_munmap = <%s>\n",
1079                       host_address_to_string (gdbarch->infcall_munmap));
1080   fprintf_unfiltered (file,
1081                       "gdbarch_dump: gdbarch_info_proc_p() = %d\n",
1082                       gdbarch_info_proc_p (gdbarch));
1083   fprintf_unfiltered (file,
1084                       "gdbarch_dump: info_proc = <%s>\n",
1085                       host_address_to_string (gdbarch->info_proc));
1086   fprintf_unfiltered (file,
1087                       "gdbarch_dump: inner_than = <%s>\n",
1088                       host_address_to_string (gdbarch->inner_than));
1089   fprintf_unfiltered (file,
1090                       "gdbarch_dump: insn_is_call = <%s>\n",
1091                       host_address_to_string (gdbarch->insn_is_call));
1092   fprintf_unfiltered (file,
1093                       "gdbarch_dump: insn_is_jump = <%s>\n",
1094                       host_address_to_string (gdbarch->insn_is_jump));
1095   fprintf_unfiltered (file,
1096                       "gdbarch_dump: insn_is_ret = <%s>\n",
1097                       host_address_to_string (gdbarch->insn_is_ret));
1098   fprintf_unfiltered (file,
1099                       "gdbarch_dump: int_bit = %s\n",
1100                       plongest (gdbarch->int_bit));
1101   fprintf_unfiltered (file,
1102                       "gdbarch_dump: gdbarch_integer_to_address_p() = %d\n",
1103                       gdbarch_integer_to_address_p (gdbarch));
1104   fprintf_unfiltered (file,
1105                       "gdbarch_dump: integer_to_address = <%s>\n",
1106                       host_address_to_string (gdbarch->integer_to_address));
1107   fprintf_unfiltered (file,
1108                       "gdbarch_dump: iterate_over_objfiles_in_search_order = <%s>\n",
1109                       host_address_to_string (gdbarch->iterate_over_objfiles_in_search_order));
1110   fprintf_unfiltered (file,
1111                       "gdbarch_dump: gdbarch_iterate_over_regset_sections_p() = %d\n",
1112                       gdbarch_iterate_over_regset_sections_p (gdbarch));
1113   fprintf_unfiltered (file,
1114                       "gdbarch_dump: iterate_over_regset_sections = <%s>\n",
1115                       host_address_to_string (gdbarch->iterate_over_regset_sections));
1116   fprintf_unfiltered (file,
1117                       "gdbarch_dump: long_bit = %s\n",
1118                       plongest (gdbarch->long_bit));
1119   fprintf_unfiltered (file,
1120                       "gdbarch_dump: long_double_bit = %s\n",
1121                       plongest (gdbarch->long_double_bit));
1122   fprintf_unfiltered (file,
1123                       "gdbarch_dump: long_double_format = %s\n",
1124                       pformat (gdbarch->long_double_format));
1125   fprintf_unfiltered (file,
1126                       "gdbarch_dump: long_long_align_bit = %s\n",
1127                       plongest (gdbarch->long_long_align_bit));
1128   fprintf_unfiltered (file,
1129                       "gdbarch_dump: long_long_bit = %s\n",
1130                       plongest (gdbarch->long_long_bit));
1131   fprintf_unfiltered (file,
1132                       "gdbarch_dump: gdbarch_make_corefile_notes_p() = %d\n",
1133                       gdbarch_make_corefile_notes_p (gdbarch));
1134   fprintf_unfiltered (file,
1135                       "gdbarch_dump: make_corefile_notes = <%s>\n",
1136                       host_address_to_string (gdbarch->make_corefile_notes));
1137   fprintf_unfiltered (file,
1138                       "gdbarch_dump: make_symbol_special = <%s>\n",
1139                       host_address_to_string (gdbarch->make_symbol_special));
1140   fprintf_unfiltered (file,
1141                       "gdbarch_dump: gdbarch_max_insn_length_p() = %d\n",
1142                       gdbarch_max_insn_length_p (gdbarch));
1143   fprintf_unfiltered (file,
1144                       "gdbarch_dump: max_insn_length = %s\n",
1145                       plongest (gdbarch->max_insn_length));
1146   fprintf_unfiltered (file,
1147                       "gdbarch_dump: memory_insert_breakpoint = <%s>\n",
1148                       host_address_to_string (gdbarch->memory_insert_breakpoint));
1149   fprintf_unfiltered (file,
1150                       "gdbarch_dump: memory_remove_breakpoint = <%s>\n",
1151                       host_address_to_string (gdbarch->memory_remove_breakpoint));
1152   fprintf_unfiltered (file,
1153                       "gdbarch_dump: num_pseudo_regs = %s\n",
1154                       plongest (gdbarch->num_pseudo_regs));
1155   fprintf_unfiltered (file,
1156                       "gdbarch_dump: num_regs = %s\n",
1157                       plongest (gdbarch->num_regs));
1158   fprintf_unfiltered (file,
1159                       "gdbarch_dump: osabi = %s\n",
1160                       plongest (gdbarch->osabi));
1161   fprintf_unfiltered (file,
1162                       "gdbarch_dump: gdbarch_overlay_update_p() = %d\n",
1163                       gdbarch_overlay_update_p (gdbarch));
1164   fprintf_unfiltered (file,
1165                       "gdbarch_dump: overlay_update = <%s>\n",
1166                       host_address_to_string (gdbarch->overlay_update));
1167   fprintf_unfiltered (file,
1168                       "gdbarch_dump: pc_regnum = %s\n",
1169                       plongest (gdbarch->pc_regnum));
1170   fprintf_unfiltered (file,
1171                       "gdbarch_dump: pointer_to_address = <%s>\n",
1172                       host_address_to_string (gdbarch->pointer_to_address));
1173   fprintf_unfiltered (file,
1174                       "gdbarch_dump: print_auxv_entry = <%s>\n",
1175                       host_address_to_string (gdbarch->print_auxv_entry));
1176   fprintf_unfiltered (file,
1177                       "gdbarch_dump: print_float_info = <%s>\n",
1178                       host_address_to_string (gdbarch->print_float_info));
1179   fprintf_unfiltered (file,
1180                       "gdbarch_dump: print_insn = <%s>\n",
1181                       host_address_to_string (gdbarch->print_insn));
1182   fprintf_unfiltered (file,
1183                       "gdbarch_dump: print_registers_info = <%s>\n",
1184                       host_address_to_string (gdbarch->print_registers_info));
1185   fprintf_unfiltered (file,
1186                       "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1187                       gdbarch_print_vector_info_p (gdbarch));
1188   fprintf_unfiltered (file,
1189                       "gdbarch_dump: print_vector_info = <%s>\n",
1190                       host_address_to_string (gdbarch->print_vector_info));
1191   fprintf_unfiltered (file,
1192                       "gdbarch_dump: gdbarch_process_record_p() = %d\n",
1193                       gdbarch_process_record_p (gdbarch));
1194   fprintf_unfiltered (file,
1195                       "gdbarch_dump: process_record = <%s>\n",
1196                       host_address_to_string (gdbarch->process_record));
1197   fprintf_unfiltered (file,
1198                       "gdbarch_dump: gdbarch_process_record_signal_p() = %d\n",
1199                       gdbarch_process_record_signal_p (gdbarch));
1200   fprintf_unfiltered (file,
1201                       "gdbarch_dump: process_record_signal = <%s>\n",
1202                       host_address_to_string (gdbarch->process_record_signal));
1203   fprintf_unfiltered (file,
1204                       "gdbarch_dump: ps_regnum = %s\n",
1205                       plongest (gdbarch->ps_regnum));
1206   fprintf_unfiltered (file,
1207                       "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
1208                       gdbarch_pseudo_register_read_p (gdbarch));
1209   fprintf_unfiltered (file,
1210                       "gdbarch_dump: pseudo_register_read = <%s>\n",
1211                       host_address_to_string (gdbarch->pseudo_register_read));
1212   fprintf_unfiltered (file,
1213                       "gdbarch_dump: gdbarch_pseudo_register_read_value_p() = %d\n",
1214                       gdbarch_pseudo_register_read_value_p (gdbarch));
1215   fprintf_unfiltered (file,
1216                       "gdbarch_dump: pseudo_register_read_value = <%s>\n",
1217                       host_address_to_string (gdbarch->pseudo_register_read_value));
1218   fprintf_unfiltered (file,
1219                       "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
1220                       gdbarch_pseudo_register_write_p (gdbarch));
1221   fprintf_unfiltered (file,
1222                       "gdbarch_dump: pseudo_register_write = <%s>\n",
1223                       host_address_to_string (gdbarch->pseudo_register_write));
1224   fprintf_unfiltered (file,
1225                       "gdbarch_dump: ptr_bit = %s\n",
1226                       plongest (gdbarch->ptr_bit));
1227   fprintf_unfiltered (file,
1228                       "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
1229                       gdbarch_push_dummy_call_p (gdbarch));
1230   fprintf_unfiltered (file,
1231                       "gdbarch_dump: push_dummy_call = <%s>\n",
1232                       host_address_to_string (gdbarch->push_dummy_call));
1233   fprintf_unfiltered (file,
1234                       "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
1235                       gdbarch_push_dummy_code_p (gdbarch));
1236   fprintf_unfiltered (file,
1237                       "gdbarch_dump: push_dummy_code = <%s>\n",
1238                       host_address_to_string (gdbarch->push_dummy_code));
1239   fprintf_unfiltered (file,
1240                       "gdbarch_dump: ravenscar_ops = %s\n",
1241                       host_address_to_string (gdbarch->ravenscar_ops));
1242   fprintf_unfiltered (file,
1243                       "gdbarch_dump: gdbarch_read_pc_p() = %d\n",
1244                       gdbarch_read_pc_p (gdbarch));
1245   fprintf_unfiltered (file,
1246                       "gdbarch_dump: read_pc = <%s>\n",
1247                       host_address_to_string (gdbarch->read_pc));
1248   fprintf_unfiltered (file,
1249                       "gdbarch_dump: gdbarch_record_special_symbol_p() = %d\n",
1250                       gdbarch_record_special_symbol_p (gdbarch));
1251   fprintf_unfiltered (file,
1252                       "gdbarch_dump: record_special_symbol = <%s>\n",
1253                       host_address_to_string (gdbarch->record_special_symbol));
1254   fprintf_unfiltered (file,
1255                       "gdbarch_dump: register_name = <%s>\n",
1256                       host_address_to_string (gdbarch->register_name));
1257   fprintf_unfiltered (file,
1258                       "gdbarch_dump: register_reggroup_p = <%s>\n",
1259                       host_address_to_string (gdbarch->register_reggroup_p));
1260   fprintf_unfiltered (file,
1261                       "gdbarch_dump: register_sim_regno = <%s>\n",
1262                       host_address_to_string (gdbarch->register_sim_regno));
1263   fprintf_unfiltered (file,
1264                       "gdbarch_dump: register_to_value = <%s>\n",
1265                       host_address_to_string (gdbarch->register_to_value));
1266   fprintf_unfiltered (file,
1267                       "gdbarch_dump: gdbarch_register_type_p() = %d\n",
1268                       gdbarch_register_type_p (gdbarch));
1269   fprintf_unfiltered (file,
1270                       "gdbarch_dump: register_type = <%s>\n",
1271                       host_address_to_string (gdbarch->register_type));
1272   fprintf_unfiltered (file,
1273                       "gdbarch_dump: gdbarch_relocate_instruction_p() = %d\n",
1274                       gdbarch_relocate_instruction_p (gdbarch));
1275   fprintf_unfiltered (file,
1276                       "gdbarch_dump: relocate_instruction = <%s>\n",
1277                       host_address_to_string (gdbarch->relocate_instruction));
1278   fprintf_unfiltered (file,
1279                       "gdbarch_dump: remote_breakpoint_from_pc = <%s>\n",
1280                       host_address_to_string (gdbarch->remote_breakpoint_from_pc));
1281   fprintf_unfiltered (file,
1282                       "gdbarch_dump: remote_register_number = <%s>\n",
1283                       host_address_to_string (gdbarch->remote_register_number));
1284   fprintf_unfiltered (file,
1285                       "gdbarch_dump: return_in_first_hidden_param_p = <%s>\n",
1286                       host_address_to_string (gdbarch->return_in_first_hidden_param_p));
1287   fprintf_unfiltered (file,
1288                       "gdbarch_dump: gdbarch_return_value_p() = %d\n",
1289                       gdbarch_return_value_p (gdbarch));
1290   fprintf_unfiltered (file,
1291                       "gdbarch_dump: return_value = <%s>\n",
1292                       host_address_to_string (gdbarch->return_value));
1293   fprintf_unfiltered (file,
1294                       "gdbarch_dump: sdb_reg_to_regnum = <%s>\n",
1295                       host_address_to_string (gdbarch->sdb_reg_to_regnum));
1296   fprintf_unfiltered (file,
1297                       "gdbarch_dump: short_bit = %s\n",
1298                       plongest (gdbarch->short_bit));
1299   fprintf_unfiltered (file,
1300                       "gdbarch_dump: gdbarch_single_step_through_delay_p() = %d\n",
1301                       gdbarch_single_step_through_delay_p (gdbarch));
1302   fprintf_unfiltered (file,
1303                       "gdbarch_dump: single_step_through_delay = <%s>\n",
1304                       host_address_to_string (gdbarch->single_step_through_delay));
1305   fprintf_unfiltered (file,
1306                       "gdbarch_dump: gdbarch_skip_entrypoint_p() = %d\n",
1307                       gdbarch_skip_entrypoint_p (gdbarch));
1308   fprintf_unfiltered (file,
1309                       "gdbarch_dump: skip_entrypoint = <%s>\n",
1310                       host_address_to_string (gdbarch->skip_entrypoint));
1311   fprintf_unfiltered (file,
1312                       "gdbarch_dump: gdbarch_skip_main_prologue_p() = %d\n",
1313                       gdbarch_skip_main_prologue_p (gdbarch));
1314   fprintf_unfiltered (file,
1315                       "gdbarch_dump: skip_main_prologue = <%s>\n",
1316                       host_address_to_string (gdbarch->skip_main_prologue));
1317   fprintf_unfiltered (file,
1318                       "gdbarch_dump: skip_permanent_breakpoint = <%s>\n",
1319                       host_address_to_string (gdbarch->skip_permanent_breakpoint));
1320   fprintf_unfiltered (file,
1321                       "gdbarch_dump: skip_prologue = <%s>\n",
1322                       host_address_to_string (gdbarch->skip_prologue));
1323   fprintf_unfiltered (file,
1324                       "gdbarch_dump: skip_solib_resolver = <%s>\n",
1325                       host_address_to_string (gdbarch->skip_solib_resolver));
1326   fprintf_unfiltered (file,
1327                       "gdbarch_dump: skip_trampoline_code = <%s>\n",
1328                       host_address_to_string (gdbarch->skip_trampoline_code));
1329   fprintf_unfiltered (file,
1330                       "gdbarch_dump: gdbarch_software_single_step_p() = %d\n",
1331                       gdbarch_software_single_step_p (gdbarch));
1332   fprintf_unfiltered (file,
1333                       "gdbarch_dump: software_single_step = <%s>\n",
1334                       host_address_to_string (gdbarch->software_single_step));
1335   fprintf_unfiltered (file,
1336                       "gdbarch_dump: sofun_address_maybe_missing = %s\n",
1337                       plongest (gdbarch->sofun_address_maybe_missing));
1338   fprintf_unfiltered (file,
1339                       "gdbarch_dump: solib_symbols_extension = %s\n",
1340                       pstring (gdbarch->solib_symbols_extension));
1341   fprintf_unfiltered (file,
1342                       "gdbarch_dump: sp_regnum = %s\n",
1343                       plongest (gdbarch->sp_regnum));
1344   fprintf_unfiltered (file,
1345                       "gdbarch_dump: stab_reg_to_regnum = <%s>\n",
1346                       host_address_to_string (gdbarch->stab_reg_to_regnum));
1347   fprintf_unfiltered (file,
1348                       "gdbarch_dump: stabs_argument_has_addr = <%s>\n",
1349                       host_address_to_string (gdbarch->stabs_argument_has_addr));
1350   fprintf_unfiltered (file,
1351                       "gdbarch_dump: stack_frame_destroyed_p = <%s>\n",
1352                       host_address_to_string (gdbarch->stack_frame_destroyed_p));
1353   fprintf_unfiltered (file,
1354                       "gdbarch_dump: stap_gdb_register_prefix = %s\n",
1355                       pstring (gdbarch->stap_gdb_register_prefix));
1356   fprintf_unfiltered (file,
1357                       "gdbarch_dump: stap_gdb_register_suffix = %s\n",
1358                       pstring (gdbarch->stap_gdb_register_suffix));
1359   fprintf_unfiltered (file,
1360                       "gdbarch_dump: stap_integer_prefixes = %s\n",
1361                       pstring_list (gdbarch->stap_integer_prefixes));
1362   fprintf_unfiltered (file,
1363                       "gdbarch_dump: stap_integer_suffixes = %s\n",
1364                       pstring_list (gdbarch->stap_integer_suffixes));
1365   fprintf_unfiltered (file,
1366                       "gdbarch_dump: gdbarch_stap_is_single_operand_p() = %d\n",
1367                       gdbarch_stap_is_single_operand_p (gdbarch));
1368   fprintf_unfiltered (file,
1369                       "gdbarch_dump: stap_is_single_operand = <%s>\n",
1370                       host_address_to_string (gdbarch->stap_is_single_operand));
1371   fprintf_unfiltered (file,
1372                       "gdbarch_dump: gdbarch_stap_parse_special_token_p() = %d\n",
1373                       gdbarch_stap_parse_special_token_p (gdbarch));
1374   fprintf_unfiltered (file,
1375                       "gdbarch_dump: stap_parse_special_token = <%s>\n",
1376                       host_address_to_string (gdbarch->stap_parse_special_token));
1377   fprintf_unfiltered (file,
1378                       "gdbarch_dump: stap_register_indirection_prefixes = %s\n",
1379                       pstring_list (gdbarch->stap_register_indirection_prefixes));
1380   fprintf_unfiltered (file,
1381                       "gdbarch_dump: stap_register_indirection_suffixes = %s\n",
1382                       pstring_list (gdbarch->stap_register_indirection_suffixes));
1383   fprintf_unfiltered (file,
1384                       "gdbarch_dump: stap_register_prefixes = %s\n",
1385                       pstring_list (gdbarch->stap_register_prefixes));
1386   fprintf_unfiltered (file,
1387                       "gdbarch_dump: stap_register_suffixes = %s\n",
1388                       pstring_list (gdbarch->stap_register_suffixes));
1389   fprintf_unfiltered (file,
1390                       "gdbarch_dump: gdbarch_static_transform_name_p() = %d\n",
1391                       gdbarch_static_transform_name_p (gdbarch));
1392   fprintf_unfiltered (file,
1393                       "gdbarch_dump: static_transform_name = <%s>\n",
1394                       host_address_to_string (gdbarch->static_transform_name));
1395   fprintf_unfiltered (file,
1396                       "gdbarch_dump: syscalls_info = %s\n",
1397                       host_address_to_string (gdbarch->syscalls_info));
1398   fprintf_unfiltered (file,
1399                       "gdbarch_dump: target_desc = %s\n",
1400                       host_address_to_string (gdbarch->target_desc));
1401   fprintf_unfiltered (file,
1402                       "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
1403                       gdbarch_unwind_pc_p (gdbarch));
1404   fprintf_unfiltered (file,
1405                       "gdbarch_dump: unwind_pc = <%s>\n",
1406                       host_address_to_string (gdbarch->unwind_pc));
1407   fprintf_unfiltered (file,
1408                       "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
1409                       gdbarch_unwind_sp_p (gdbarch));
1410   fprintf_unfiltered (file,
1411                       "gdbarch_dump: unwind_sp = <%s>\n",
1412                       host_address_to_string (gdbarch->unwind_sp));
1413   fprintf_unfiltered (file,
1414                       "gdbarch_dump: value_from_register = <%s>\n",
1415                       host_address_to_string (gdbarch->value_from_register));
1416   fprintf_unfiltered (file,
1417                       "gdbarch_dump: value_to_register = <%s>\n",
1418                       host_address_to_string (gdbarch->value_to_register));
1419   fprintf_unfiltered (file,
1420                       "gdbarch_dump: vbit_in_delta = %s\n",
1421                       plongest (gdbarch->vbit_in_delta));
1422   fprintf_unfiltered (file,
1423                       "gdbarch_dump: virtual_frame_pointer = <%s>\n",
1424                       host_address_to_string (gdbarch->virtual_frame_pointer));
1425   fprintf_unfiltered (file,
1426                       "gdbarch_dump: vsyscall_range = <%s>\n",
1427                       host_address_to_string (gdbarch->vsyscall_range));
1428   fprintf_unfiltered (file,
1429                       "gdbarch_dump: vtable_function_descriptors = %s\n",
1430                       plongest (gdbarch->vtable_function_descriptors));
1431   fprintf_unfiltered (file,
1432                       "gdbarch_dump: gdbarch_write_pc_p() = %d\n",
1433                       gdbarch_write_pc_p (gdbarch));
1434   fprintf_unfiltered (file,
1435                       "gdbarch_dump: write_pc = <%s>\n",
1436                       host_address_to_string (gdbarch->write_pc));
1437   fprintf_unfiltered (file,
1438                       "gdbarch_dump: xml_syscall_file = %s\n",
1439                       pstring (gdbarch->xml_syscall_file));
1440   if (gdbarch->dump_tdep != NULL)
1441     gdbarch->dump_tdep (gdbarch, file);
1442 }
1443
1444 struct gdbarch_tdep *
1445 gdbarch_tdep (struct gdbarch *gdbarch)
1446 {
1447   if (gdbarch_debug >= 2)
1448     fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
1449   return gdbarch->tdep;
1450 }
1451
1452
1453 const struct bfd_arch_info *
1454 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
1455 {
1456   gdb_assert (gdbarch != NULL);
1457   if (gdbarch_debug >= 2)
1458     fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
1459   return gdbarch->bfd_arch_info;
1460 }
1461
1462 enum bfd_endian
1463 gdbarch_byte_order (struct gdbarch *gdbarch)
1464 {
1465   gdb_assert (gdbarch != NULL);
1466   if (gdbarch_debug >= 2)
1467     fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
1468   return gdbarch->byte_order;
1469 }
1470
1471 enum bfd_endian
1472 gdbarch_byte_order_for_code (struct gdbarch *gdbarch)
1473 {
1474   gdb_assert (gdbarch != NULL);
1475   if (gdbarch_debug >= 2)
1476     fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order_for_code called\n");
1477   return gdbarch->byte_order_for_code;
1478 }
1479
1480 enum gdb_osabi
1481 gdbarch_osabi (struct gdbarch *gdbarch)
1482 {
1483   gdb_assert (gdbarch != NULL);
1484   if (gdbarch_debug >= 2)
1485     fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n");
1486   return gdbarch->osabi;
1487 }
1488
1489 const struct target_desc *
1490 gdbarch_target_desc (struct gdbarch *gdbarch)
1491 {
1492   gdb_assert (gdbarch != NULL);
1493   if (gdbarch_debug >= 2)
1494     fprintf_unfiltered (gdb_stdlog, "gdbarch_target_desc called\n");
1495   return gdbarch->target_desc;
1496 }
1497
1498 int
1499 gdbarch_bits_big_endian (struct gdbarch *gdbarch)
1500 {
1501   gdb_assert (gdbarch != NULL);
1502   /* Skip verify of bits_big_endian, invalid_p == 0 */
1503   if (gdbarch_debug >= 2)
1504     fprintf_unfiltered (gdb_stdlog, "gdbarch_bits_big_endian called\n");
1505   return gdbarch->bits_big_endian;
1506 }
1507
1508 void
1509 set_gdbarch_bits_big_endian (struct gdbarch *gdbarch,
1510                              int bits_big_endian)
1511 {
1512   gdbarch->bits_big_endian = bits_big_endian;
1513 }
1514
1515 int
1516 gdbarch_short_bit (struct gdbarch *gdbarch)
1517 {
1518   gdb_assert (gdbarch != NULL);
1519   /* Skip verify of short_bit, invalid_p == 0 */
1520   if (gdbarch_debug >= 2)
1521     fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
1522   return gdbarch->short_bit;
1523 }
1524
1525 void
1526 set_gdbarch_short_bit (struct gdbarch *gdbarch,
1527                        int short_bit)
1528 {
1529   gdbarch->short_bit = short_bit;
1530 }
1531
1532 int
1533 gdbarch_int_bit (struct gdbarch *gdbarch)
1534 {
1535   gdb_assert (gdbarch != NULL);
1536   /* Skip verify of int_bit, invalid_p == 0 */
1537   if (gdbarch_debug >= 2)
1538     fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
1539   return gdbarch->int_bit;
1540 }
1541
1542 void
1543 set_gdbarch_int_bit (struct gdbarch *gdbarch,
1544                      int int_bit)
1545 {
1546   gdbarch->int_bit = int_bit;
1547 }
1548
1549 int
1550 gdbarch_long_bit (struct gdbarch *gdbarch)
1551 {
1552   gdb_assert (gdbarch != NULL);
1553   /* Skip verify of long_bit, invalid_p == 0 */
1554   if (gdbarch_debug >= 2)
1555     fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
1556   return gdbarch->long_bit;
1557 }
1558
1559 void
1560 set_gdbarch_long_bit (struct gdbarch *gdbarch,
1561                       int long_bit)
1562 {
1563   gdbarch->long_bit = long_bit;
1564 }
1565
1566 int
1567 gdbarch_long_long_bit (struct gdbarch *gdbarch)
1568 {
1569   gdb_assert (gdbarch != NULL);
1570   /* Skip verify of long_long_bit, invalid_p == 0 */
1571   if (gdbarch_debug >= 2)
1572     fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
1573   return gdbarch->long_long_bit;
1574 }
1575
1576 void
1577 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
1578                            int long_long_bit)
1579 {
1580   gdbarch->long_long_bit = long_long_bit;
1581 }
1582
1583 int
1584 gdbarch_long_long_align_bit (struct gdbarch *gdbarch)
1585 {
1586   gdb_assert (gdbarch != NULL);
1587   /* Skip verify of long_long_align_bit, invalid_p == 0 */
1588   if (gdbarch_debug >= 2)
1589     fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_align_bit called\n");
1590   return gdbarch->long_long_align_bit;
1591 }
1592
1593 void
1594 set_gdbarch_long_long_align_bit (struct gdbarch *gdbarch,
1595                                  int long_long_align_bit)
1596 {
1597   gdbarch->long_long_align_bit = long_long_align_bit;
1598 }
1599
1600 int
1601 gdbarch_half_bit (struct gdbarch *gdbarch)
1602 {
1603   gdb_assert (gdbarch != NULL);
1604   /* Skip verify of half_bit, invalid_p == 0 */
1605   if (gdbarch_debug >= 2)
1606     fprintf_unfiltered (gdb_stdlog, "gdbarch_half_bit called\n");
1607   return gdbarch->half_bit;
1608 }
1609
1610 void
1611 set_gdbarch_half_bit (struct gdbarch *gdbarch,
1612                       int half_bit)
1613 {
1614   gdbarch->half_bit = half_bit;
1615 }
1616
1617 const struct floatformat **
1618 gdbarch_half_format (struct gdbarch *gdbarch)
1619 {
1620   gdb_assert (gdbarch != NULL);
1621   if (gdbarch_debug >= 2)
1622     fprintf_unfiltered (gdb_stdlog, "gdbarch_half_format called\n");
1623   return gdbarch->half_format;
1624 }
1625
1626 void
1627 set_gdbarch_half_format (struct gdbarch *gdbarch,
1628                          const struct floatformat ** half_format)
1629 {
1630   gdbarch->half_format = half_format;
1631 }
1632
1633 int
1634 gdbarch_float_bit (struct gdbarch *gdbarch)
1635 {
1636   gdb_assert (gdbarch != NULL);
1637   /* Skip verify of float_bit, invalid_p == 0 */
1638   if (gdbarch_debug >= 2)
1639     fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
1640   return gdbarch->float_bit;
1641 }
1642
1643 void
1644 set_gdbarch_float_bit (struct gdbarch *gdbarch,
1645                        int float_bit)
1646 {
1647   gdbarch->float_bit = float_bit;
1648 }
1649
1650 const struct floatformat **
1651 gdbarch_float_format (struct gdbarch *gdbarch)
1652 {
1653   gdb_assert (gdbarch != NULL);
1654   if (gdbarch_debug >= 2)
1655     fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
1656   return gdbarch->float_format;
1657 }
1658
1659 void
1660 set_gdbarch_float_format (struct gdbarch *gdbarch,
1661                           const struct floatformat ** float_format)
1662 {
1663   gdbarch->float_format = float_format;
1664 }
1665
1666 int
1667 gdbarch_double_bit (struct gdbarch *gdbarch)
1668 {
1669   gdb_assert (gdbarch != NULL);
1670   /* Skip verify of double_bit, invalid_p == 0 */
1671   if (gdbarch_debug >= 2)
1672     fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
1673   return gdbarch->double_bit;
1674 }
1675
1676 void
1677 set_gdbarch_double_bit (struct gdbarch *gdbarch,
1678                         int double_bit)
1679 {
1680   gdbarch->double_bit = double_bit;
1681 }
1682
1683 const struct floatformat **
1684 gdbarch_double_format (struct gdbarch *gdbarch)
1685 {
1686   gdb_assert (gdbarch != NULL);
1687   if (gdbarch_debug >= 2)
1688     fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
1689   return gdbarch->double_format;
1690 }
1691
1692 void
1693 set_gdbarch_double_format (struct gdbarch *gdbarch,
1694                            const struct floatformat ** double_format)
1695 {
1696   gdbarch->double_format = double_format;
1697 }
1698
1699 int
1700 gdbarch_long_double_bit (struct gdbarch *gdbarch)
1701 {
1702   gdb_assert (gdbarch != NULL);
1703   /* Skip verify of long_double_bit, invalid_p == 0 */
1704   if (gdbarch_debug >= 2)
1705     fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
1706   return gdbarch->long_double_bit;
1707 }
1708
1709 void
1710 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
1711                              int long_double_bit)
1712 {
1713   gdbarch->long_double_bit = long_double_bit;
1714 }
1715
1716 const struct floatformat **
1717 gdbarch_long_double_format (struct gdbarch *gdbarch)
1718 {
1719   gdb_assert (gdbarch != NULL);
1720   if (gdbarch_debug >= 2)
1721     fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
1722   return gdbarch->long_double_format;
1723 }
1724
1725 void
1726 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
1727                                 const struct floatformat ** long_double_format)
1728 {
1729   gdbarch->long_double_format = long_double_format;
1730 }
1731
1732 int
1733 gdbarch_ptr_bit (struct gdbarch *gdbarch)
1734 {
1735   gdb_assert (gdbarch != NULL);
1736   /* Skip verify of ptr_bit, invalid_p == 0 */
1737   if (gdbarch_debug >= 2)
1738     fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
1739   return gdbarch->ptr_bit;
1740 }
1741
1742 void
1743 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
1744                      int ptr_bit)
1745 {
1746   gdbarch->ptr_bit = ptr_bit;
1747 }
1748
1749 int
1750 gdbarch_addr_bit (struct gdbarch *gdbarch)
1751 {
1752   gdb_assert (gdbarch != NULL);
1753   /* Check variable changed from pre-default.  */
1754   gdb_assert (gdbarch->addr_bit != 0);
1755   if (gdbarch_debug >= 2)
1756     fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
1757   return gdbarch->addr_bit;
1758 }
1759
1760 void
1761 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
1762                       int addr_bit)
1763 {
1764   gdbarch->addr_bit = addr_bit;
1765 }
1766
1767 int
1768 gdbarch_dwarf2_addr_size (struct gdbarch *gdbarch)
1769 {
1770   gdb_assert (gdbarch != NULL);
1771   /* Check variable changed from pre-default.  */
1772   gdb_assert (gdbarch->dwarf2_addr_size != 0);
1773   if (gdbarch_debug >= 2)
1774     fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_addr_size called\n");
1775   return gdbarch->dwarf2_addr_size;
1776 }
1777
1778 void
1779 set_gdbarch_dwarf2_addr_size (struct gdbarch *gdbarch,
1780                               int dwarf2_addr_size)
1781 {
1782   gdbarch->dwarf2_addr_size = dwarf2_addr_size;
1783 }
1784
1785 int
1786 gdbarch_char_signed (struct gdbarch *gdbarch)
1787 {
1788   gdb_assert (gdbarch != NULL);
1789   /* Check variable changed from pre-default.  */
1790   gdb_assert (gdbarch->char_signed != -1);
1791   if (gdbarch_debug >= 2)
1792     fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
1793   return gdbarch->char_signed;
1794 }
1795
1796 void
1797 set_gdbarch_char_signed (struct gdbarch *gdbarch,
1798                          int char_signed)
1799 {
1800   gdbarch->char_signed = char_signed;
1801 }
1802
1803 int
1804 gdbarch_read_pc_p (struct gdbarch *gdbarch)
1805 {
1806   gdb_assert (gdbarch != NULL);
1807   return gdbarch->read_pc != NULL;
1808 }
1809
1810 CORE_ADDR
1811 gdbarch_read_pc (struct gdbarch *gdbarch, struct regcache *regcache)
1812 {
1813   gdb_assert (gdbarch != NULL);
1814   gdb_assert (gdbarch->read_pc != NULL);
1815   if (gdbarch_debug >= 2)
1816     fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
1817   return gdbarch->read_pc (regcache);
1818 }
1819
1820 void
1821 set_gdbarch_read_pc (struct gdbarch *gdbarch,
1822                      gdbarch_read_pc_ftype read_pc)
1823 {
1824   gdbarch->read_pc = read_pc;
1825 }
1826
1827 int
1828 gdbarch_write_pc_p (struct gdbarch *gdbarch)
1829 {
1830   gdb_assert (gdbarch != NULL);
1831   return gdbarch->write_pc != NULL;
1832 }
1833
1834 void
1835 gdbarch_write_pc (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR val)
1836 {
1837   gdb_assert (gdbarch != NULL);
1838   gdb_assert (gdbarch->write_pc != NULL);
1839   if (gdbarch_debug >= 2)
1840     fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
1841   gdbarch->write_pc (regcache, val);
1842 }
1843
1844 void
1845 set_gdbarch_write_pc (struct gdbarch *gdbarch,
1846                       gdbarch_write_pc_ftype write_pc)
1847 {
1848   gdbarch->write_pc = write_pc;
1849 }
1850
1851 void
1852 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
1853 {
1854   gdb_assert (gdbarch != NULL);
1855   gdb_assert (gdbarch->virtual_frame_pointer != NULL);
1856   if (gdbarch_debug >= 2)
1857     fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
1858   gdbarch->virtual_frame_pointer (gdbarch, pc, frame_regnum, frame_offset);
1859 }
1860
1861 void
1862 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
1863                                    gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
1864 {
1865   gdbarch->virtual_frame_pointer = virtual_frame_pointer;
1866 }
1867
1868 int
1869 gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
1870 {
1871   gdb_assert (gdbarch != NULL);
1872   return gdbarch->pseudo_register_read != NULL;
1873 }
1874
1875 enum register_status
1876 gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, gdb_byte *buf)
1877 {
1878   gdb_assert (gdbarch != NULL);
1879   gdb_assert (gdbarch->pseudo_register_read != NULL);
1880   if (gdbarch_debug >= 2)
1881     fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
1882   return gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
1883 }
1884
1885 void
1886 set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
1887                                   gdbarch_pseudo_register_read_ftype pseudo_register_read)
1888 {
1889   gdbarch->pseudo_register_read = pseudo_register_read;
1890 }
1891
1892 int
1893 gdbarch_pseudo_register_read_value_p (struct gdbarch *gdbarch)
1894 {
1895   gdb_assert (gdbarch != NULL);
1896   return gdbarch->pseudo_register_read_value != NULL;
1897 }
1898
1899 struct value *
1900 gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum)
1901 {
1902   gdb_assert (gdbarch != NULL);
1903   gdb_assert (gdbarch->pseudo_register_read_value != NULL);
1904   if (gdbarch_debug >= 2)
1905     fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read_value called\n");
1906   return gdbarch->pseudo_register_read_value (gdbarch, regcache, cookednum);
1907 }
1908
1909 void
1910 set_gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch,
1911                                         gdbarch_pseudo_register_read_value_ftype pseudo_register_read_value)
1912 {
1913   gdbarch->pseudo_register_read_value = pseudo_register_read_value;
1914 }
1915
1916 int
1917 gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
1918 {
1919   gdb_assert (gdbarch != NULL);
1920   return gdbarch->pseudo_register_write != NULL;
1921 }
1922
1923 void
1924 gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const gdb_byte *buf)
1925 {
1926   gdb_assert (gdbarch != NULL);
1927   gdb_assert (gdbarch->pseudo_register_write != NULL);
1928   if (gdbarch_debug >= 2)
1929     fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
1930   gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
1931 }
1932
1933 void
1934 set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
1935                                    gdbarch_pseudo_register_write_ftype pseudo_register_write)
1936 {
1937   gdbarch->pseudo_register_write = pseudo_register_write;
1938 }
1939
1940 int
1941 gdbarch_num_regs (struct gdbarch *gdbarch)
1942 {
1943   gdb_assert (gdbarch != NULL);
1944   /* Check variable changed from pre-default.  */
1945   gdb_assert (gdbarch->num_regs != -1);
1946   if (gdbarch_debug >= 2)
1947     fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
1948   return gdbarch->num_regs;
1949 }
1950
1951 void
1952 set_gdbarch_num_regs (struct gdbarch *gdbarch,
1953                       int num_regs)
1954 {
1955   gdbarch->num_regs = num_regs;
1956 }
1957
1958 int
1959 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
1960 {
1961   gdb_assert (gdbarch != NULL);
1962   /* Skip verify of num_pseudo_regs, invalid_p == 0 */
1963   if (gdbarch_debug >= 2)
1964     fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
1965   return gdbarch->num_pseudo_regs;
1966 }
1967
1968 void
1969 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
1970                              int num_pseudo_regs)
1971 {
1972   gdbarch->num_pseudo_regs = num_pseudo_regs;
1973 }
1974
1975 int
1976 gdbarch_ax_pseudo_register_collect_p (struct gdbarch *gdbarch)
1977 {
1978   gdb_assert (gdbarch != NULL);
1979   return gdbarch->ax_pseudo_register_collect != NULL;
1980 }
1981
1982 int
1983 gdbarch_ax_pseudo_register_collect (struct gdbarch *gdbarch, struct agent_expr *ax, int reg)
1984 {
1985   gdb_assert (gdbarch != NULL);
1986   gdb_assert (gdbarch->ax_pseudo_register_collect != NULL);
1987   if (gdbarch_debug >= 2)
1988     fprintf_unfiltered (gdb_stdlog, "gdbarch_ax_pseudo_register_collect called\n");
1989   return gdbarch->ax_pseudo_register_collect (gdbarch, ax, reg);
1990 }
1991
1992 void
1993 set_gdbarch_ax_pseudo_register_collect (struct gdbarch *gdbarch,
1994                                         gdbarch_ax_pseudo_register_collect_ftype ax_pseudo_register_collect)
1995 {
1996   gdbarch->ax_pseudo_register_collect = ax_pseudo_register_collect;
1997 }
1998
1999 int
2000 gdbarch_ax_pseudo_register_push_stack_p (struct gdbarch *gdbarch)
2001 {
2002   gdb_assert (gdbarch != NULL);
2003   return gdbarch->ax_pseudo_register_push_stack != NULL;
2004 }
2005
2006 int
2007 gdbarch_ax_pseudo_register_push_stack (struct gdbarch *gdbarch, struct agent_expr *ax, int reg)
2008 {
2009   gdb_assert (gdbarch != NULL);
2010   gdb_assert (gdbarch->ax_pseudo_register_push_stack != NULL);
2011   if (gdbarch_debug >= 2)
2012     fprintf_unfiltered (gdb_stdlog, "gdbarch_ax_pseudo_register_push_stack called\n");
2013   return gdbarch->ax_pseudo_register_push_stack (gdbarch, ax, reg);
2014 }
2015
2016 void
2017 set_gdbarch_ax_pseudo_register_push_stack (struct gdbarch *gdbarch,
2018                                            gdbarch_ax_pseudo_register_push_stack_ftype ax_pseudo_register_push_stack)
2019 {
2020   gdbarch->ax_pseudo_register_push_stack = ax_pseudo_register_push_stack;
2021 }
2022
2023 int
2024 gdbarch_handle_segmentation_fault_p (struct gdbarch *gdbarch)
2025 {
2026   gdb_assert (gdbarch != NULL);
2027   return gdbarch->handle_segmentation_fault != NULL;
2028 }
2029
2030 void
2031 gdbarch_handle_segmentation_fault (struct gdbarch *gdbarch, struct ui_out *uiout)
2032 {
2033   gdb_assert (gdbarch != NULL);
2034   gdb_assert (gdbarch->handle_segmentation_fault != NULL);
2035   if (gdbarch_debug >= 2)
2036     fprintf_unfiltered (gdb_stdlog, "gdbarch_handle_segmentation_fault called\n");
2037   gdbarch->handle_segmentation_fault (gdbarch, uiout);
2038 }
2039
2040 void
2041 set_gdbarch_handle_segmentation_fault (struct gdbarch *gdbarch,
2042                                        gdbarch_handle_segmentation_fault_ftype handle_segmentation_fault)
2043 {
2044   gdbarch->handle_segmentation_fault = handle_segmentation_fault;
2045 }
2046
2047 int
2048 gdbarch_sp_regnum (struct gdbarch *gdbarch)
2049 {
2050   gdb_assert (gdbarch != NULL);
2051   /* Skip verify of sp_regnum, invalid_p == 0 */
2052   if (gdbarch_debug >= 2)
2053     fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
2054   return gdbarch->sp_regnum;
2055 }
2056
2057 void
2058 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
2059                        int sp_regnum)
2060 {
2061   gdbarch->sp_regnum = sp_regnum;
2062 }
2063
2064 int
2065 gdbarch_pc_regnum (struct gdbarch *gdbarch)
2066 {
2067   gdb_assert (gdbarch != NULL);
2068   /* Skip verify of pc_regnum, invalid_p == 0 */
2069   if (gdbarch_debug >= 2)
2070     fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
2071   return gdbarch->pc_regnum;
2072 }
2073
2074 void
2075 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
2076                        int pc_regnum)
2077 {
2078   gdbarch->pc_regnum = pc_regnum;
2079 }
2080
2081 int
2082 gdbarch_ps_regnum (struct gdbarch *gdbarch)
2083 {
2084   gdb_assert (gdbarch != NULL);
2085   /* Skip verify of ps_regnum, invalid_p == 0 */
2086   if (gdbarch_debug >= 2)
2087     fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
2088   return gdbarch->ps_regnum;
2089 }
2090
2091 void
2092 set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
2093                        int ps_regnum)
2094 {
2095   gdbarch->ps_regnum = ps_regnum;
2096 }
2097
2098 int
2099 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
2100 {
2101   gdb_assert (gdbarch != NULL);
2102   /* Skip verify of fp0_regnum, invalid_p == 0 */
2103   if (gdbarch_debug >= 2)
2104     fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
2105   return gdbarch->fp0_regnum;
2106 }
2107
2108 void
2109 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
2110                         int fp0_regnum)
2111 {
2112   gdbarch->fp0_regnum = fp0_regnum;
2113 }
2114
2115 int
2116 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
2117 {
2118   gdb_assert (gdbarch != NULL);
2119   gdb_assert (gdbarch->stab_reg_to_regnum != NULL);
2120   if (gdbarch_debug >= 2)
2121     fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
2122   return gdbarch->stab_reg_to_regnum (gdbarch, stab_regnr);
2123 }
2124
2125 void
2126 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
2127                                 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
2128 {
2129   gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
2130 }
2131
2132 int
2133 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
2134 {
2135   gdb_assert (gdbarch != NULL);
2136   gdb_assert (gdbarch->ecoff_reg_to_regnum != NULL);
2137   if (gdbarch_debug >= 2)
2138     fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
2139   return gdbarch->ecoff_reg_to_regnum (gdbarch, ecoff_regnr);
2140 }
2141
2142 void
2143 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
2144                                  gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
2145 {
2146   gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
2147 }
2148
2149 int
2150 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
2151 {
2152   gdb_assert (gdbarch != NULL);
2153   gdb_assert (gdbarch->sdb_reg_to_regnum != NULL);
2154   if (gdbarch_debug >= 2)
2155     fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
2156   return gdbarch->sdb_reg_to_regnum (gdbarch, sdb_regnr);
2157 }
2158
2159 void
2160 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
2161                                gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
2162 {
2163   gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
2164 }
2165
2166 int
2167 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
2168 {
2169   gdb_assert (gdbarch != NULL);
2170   gdb_assert (gdbarch->dwarf2_reg_to_regnum != NULL);
2171   if (gdbarch_debug >= 2)
2172     fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
2173   return gdbarch->dwarf2_reg_to_regnum (gdbarch, dwarf2_regnr);
2174 }
2175
2176 void
2177 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
2178                                   gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
2179 {
2180   gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
2181 }
2182
2183 const char *
2184 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
2185 {
2186   gdb_assert (gdbarch != NULL);
2187   gdb_assert (gdbarch->register_name != NULL);
2188   if (gdbarch_debug >= 2)
2189     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
2190   return gdbarch->register_name (gdbarch, regnr);
2191 }
2192
2193 void
2194 set_gdbarch_register_name (struct gdbarch *gdbarch,
2195                            gdbarch_register_name_ftype register_name)
2196 {
2197   gdbarch->register_name = register_name;
2198 }
2199
2200 int
2201 gdbarch_register_type_p (struct gdbarch *gdbarch)
2202 {
2203   gdb_assert (gdbarch != NULL);
2204   return gdbarch->register_type != NULL;
2205 }
2206
2207 struct type *
2208 gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
2209 {
2210   gdb_assert (gdbarch != NULL);
2211   gdb_assert (gdbarch->register_type != NULL);
2212   if (gdbarch_debug >= 2)
2213     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
2214   return gdbarch->register_type (gdbarch, reg_nr);
2215 }
2216
2217 void
2218 set_gdbarch_register_type (struct gdbarch *gdbarch,
2219                            gdbarch_register_type_ftype register_type)
2220 {
2221   gdbarch->register_type = register_type;
2222 }
2223
2224 int
2225 gdbarch_dummy_id_p (struct gdbarch *gdbarch)
2226 {
2227   gdb_assert (gdbarch != NULL);
2228   return gdbarch->dummy_id != NULL;
2229 }
2230
2231 struct frame_id
2232 gdbarch_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
2233 {
2234   gdb_assert (gdbarch != NULL);
2235   gdb_assert (gdbarch->dummy_id != NULL);
2236   if (gdbarch_debug >= 2)
2237     fprintf_unfiltered (gdb_stdlog, "gdbarch_dummy_id called\n");
2238   return gdbarch->dummy_id (gdbarch, this_frame);
2239 }
2240
2241 void
2242 set_gdbarch_dummy_id (struct gdbarch *gdbarch,
2243                       gdbarch_dummy_id_ftype dummy_id)
2244 {
2245   gdbarch->dummy_id = dummy_id;
2246 }
2247
2248 int
2249 gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch)
2250 {
2251   gdb_assert (gdbarch != NULL);
2252   /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
2253   if (gdbarch_debug >= 2)
2254     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n");
2255   return gdbarch->deprecated_fp_regnum;
2256 }
2257
2258 void
2259 set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch,
2260                                   int deprecated_fp_regnum)
2261 {
2262   gdbarch->deprecated_fp_regnum = deprecated_fp_regnum;
2263 }
2264
2265 int
2266 gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
2267 {
2268   gdb_assert (gdbarch != NULL);
2269   return gdbarch->push_dummy_call != NULL;
2270 }
2271
2272 CORE_ADDR
2273 gdbarch_push_dummy_call (struct gdbarch *gdbarch, struct value *function, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
2274 {
2275   gdb_assert (gdbarch != NULL);
2276   gdb_assert (gdbarch->push_dummy_call != NULL);
2277   if (gdbarch_debug >= 2)
2278     fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
2279   return gdbarch->push_dummy_call (gdbarch, function, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr);
2280 }
2281
2282 void
2283 set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
2284                              gdbarch_push_dummy_call_ftype push_dummy_call)
2285 {
2286   gdbarch->push_dummy_call = push_dummy_call;
2287 }
2288
2289 int
2290 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
2291 {
2292   gdb_assert (gdbarch != NULL);
2293   /* Skip verify of call_dummy_location, invalid_p == 0 */
2294   if (gdbarch_debug >= 2)
2295     fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
2296   return gdbarch->call_dummy_location;
2297 }
2298
2299 void
2300 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
2301                                  int call_dummy_location)
2302 {
2303   gdbarch->call_dummy_location = call_dummy_location;
2304 }
2305
2306 int
2307 gdbarch_push_dummy_code_p (struct gdbarch *gdbarch)
2308 {
2309   gdb_assert (gdbarch != NULL);
2310   return gdbarch->push_dummy_code != NULL;
2311 }
2312
2313 CORE_ADDR
2314 gdbarch_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp, CORE_ADDR funaddr, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr, struct regcache *regcache)
2315 {
2316   gdb_assert (gdbarch != NULL);
2317   gdb_assert (gdbarch->push_dummy_code != NULL);
2318   if (gdbarch_debug >= 2)
2319     fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n");
2320   return gdbarch->push_dummy_code (gdbarch, sp, funaddr, args, nargs, value_type, real_pc, bp_addr, regcache);
2321 }
2322
2323 void
2324 set_gdbarch_push_dummy_code (struct gdbarch *gdbarch,
2325                              gdbarch_push_dummy_code_ftype push_dummy_code)
2326 {
2327   gdbarch->push_dummy_code = push_dummy_code;
2328 }
2329
2330 int
2331 gdbarch_code_of_frame_writable (struct gdbarch *gdbarch, struct frame_info *frame)
2332 {
2333   gdb_assert (gdbarch != NULL);
2334   gdb_assert (gdbarch->code_of_frame_writable != NULL);
2335   if (gdbarch_debug >= 2)
2336     fprintf_unfiltered (gdb_stdlog, "gdbarch_code_of_frame_writable called\n");
2337   return gdbarch->code_of_frame_writable (gdbarch, frame);
2338 }
2339
2340 void
2341 set_gdbarch_code_of_frame_writable (struct gdbarch *gdbarch,
2342                                     gdbarch_code_of_frame_writable_ftype code_of_frame_writable)
2343 {
2344   gdbarch->code_of_frame_writable = code_of_frame_writable;
2345 }
2346
2347 void
2348 gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
2349 {
2350   gdb_assert (gdbarch != NULL);
2351   gdb_assert (gdbarch->print_registers_info != NULL);
2352   if (gdbarch_debug >= 2)
2353     fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
2354   gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
2355 }
2356
2357 void
2358 set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
2359                                   gdbarch_print_registers_info_ftype print_registers_info)
2360 {
2361   gdbarch->print_registers_info = print_registers_info;
2362 }
2363
2364 void
2365 gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
2366 {
2367   gdb_assert (gdbarch != NULL);
2368   gdb_assert (gdbarch->print_float_info != NULL);
2369   if (gdbarch_debug >= 2)
2370     fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
2371   gdbarch->print_float_info (gdbarch, file, frame, args);
2372 }
2373
2374 void
2375 set_gdbarch_print_float_info (struct gdbarch *gdbarch,
2376                               gdbarch_print_float_info_ftype print_float_info)
2377 {
2378   gdbarch->print_float_info = print_float_info;
2379 }
2380
2381 int
2382 gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
2383 {
2384   gdb_assert (gdbarch != NULL);
2385   return gdbarch->print_vector_info != NULL;
2386 }
2387
2388 void
2389 gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
2390 {
2391   gdb_assert (gdbarch != NULL);
2392   gdb_assert (gdbarch->print_vector_info != NULL);
2393   if (gdbarch_debug >= 2)
2394     fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
2395   gdbarch->print_vector_info (gdbarch, file, frame, args);
2396 }
2397
2398 void
2399 set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
2400                                gdbarch_print_vector_info_ftype print_vector_info)
2401 {
2402   gdbarch->print_vector_info = print_vector_info;
2403 }
2404
2405 int
2406 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
2407 {
2408   gdb_assert (gdbarch != NULL);
2409   gdb_assert (gdbarch->register_sim_regno != NULL);
2410   if (gdbarch_debug >= 2)
2411     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
2412   return gdbarch->register_sim_regno (gdbarch, reg_nr);
2413 }
2414
2415 void
2416 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
2417                                 gdbarch_register_sim_regno_ftype register_sim_regno)
2418 {
2419   gdbarch->register_sim_regno = register_sim_regno;
2420 }
2421
2422 int
2423 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
2424 {
2425   gdb_assert (gdbarch != NULL);
2426   gdb_assert (gdbarch->cannot_fetch_register != NULL);
2427   if (gdbarch_debug >= 2)
2428     fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
2429   return gdbarch->cannot_fetch_register (gdbarch, regnum);
2430 }
2431
2432 void
2433 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
2434                                    gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
2435 {
2436   gdbarch->cannot_fetch_register = cannot_fetch_register;
2437 }
2438
2439 int
2440 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
2441 {
2442   gdb_assert (gdbarch != NULL);
2443   gdb_assert (gdbarch->cannot_store_register != NULL);
2444   if (gdbarch_debug >= 2)
2445     fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
2446   return gdbarch->cannot_store_register (gdbarch, regnum);
2447 }
2448
2449 void
2450 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
2451                                    gdbarch_cannot_store_register_ftype cannot_store_register)
2452 {
2453   gdbarch->cannot_store_register = cannot_store_register;
2454 }
2455
2456 int
2457 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
2458 {
2459   gdb_assert (gdbarch != NULL);
2460   return gdbarch->get_longjmp_target != NULL;
2461 }
2462
2463 int
2464 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR *pc)
2465 {
2466   gdb_assert (gdbarch != NULL);
2467   gdb_assert (gdbarch->get_longjmp_target != NULL);
2468   if (gdbarch_debug >= 2)
2469     fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
2470   return gdbarch->get_longjmp_target (frame, pc);
2471 }
2472
2473 void
2474 set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
2475                                 gdbarch_get_longjmp_target_ftype get_longjmp_target)
2476 {
2477   gdbarch->get_longjmp_target = get_longjmp_target;
2478 }
2479
2480 int
2481 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
2482 {
2483   gdb_assert (gdbarch != NULL);
2484   if (gdbarch_debug >= 2)
2485     fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
2486   return gdbarch->believe_pcc_promotion;
2487 }
2488
2489 void
2490 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
2491                                    int believe_pcc_promotion)
2492 {
2493   gdbarch->believe_pcc_promotion = believe_pcc_promotion;
2494 }
2495
2496 int
2497 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
2498 {
2499   gdb_assert (gdbarch != NULL);
2500   gdb_assert (gdbarch->convert_register_p != NULL);
2501   if (gdbarch_debug >= 2)
2502     fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
2503   return gdbarch->convert_register_p (gdbarch, regnum, type);
2504 }
2505
2506 void
2507 set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
2508                                 gdbarch_convert_register_p_ftype convert_register_p)
2509 {
2510   gdbarch->convert_register_p = convert_register_p;
2511 }
2512
2513 int
2514 gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, gdb_byte *buf, int *optimizedp, int *unavailablep)
2515 {
2516   gdb_assert (gdbarch != NULL);
2517   gdb_assert (gdbarch->register_to_value != NULL);
2518   if (gdbarch_debug >= 2)
2519     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
2520   return gdbarch->register_to_value (frame, regnum, type, buf, optimizedp, unavailablep);
2521 }
2522
2523 void
2524 set_gdbarch_register_to_value (struct gdbarch *gdbarch,
2525                                gdbarch_register_to_value_ftype register_to_value)
2526 {
2527   gdbarch->register_to_value = register_to_value;
2528 }
2529
2530 void
2531 gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const gdb_byte *buf)
2532 {
2533   gdb_assert (gdbarch != NULL);
2534   gdb_assert (gdbarch->value_to_register != NULL);
2535   if (gdbarch_debug >= 2)
2536     fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
2537   gdbarch->value_to_register (frame, regnum, type, buf);
2538 }
2539
2540 void
2541 set_gdbarch_value_to_register (struct gdbarch *gdbarch,
2542                                gdbarch_value_to_register_ftype value_to_register)
2543 {
2544   gdbarch->value_to_register = value_to_register;
2545 }
2546
2547 struct value *
2548 gdbarch_value_from_register (struct gdbarch *gdbarch, struct type *type, int regnum, struct frame_id frame_id)
2549 {
2550   gdb_assert (gdbarch != NULL);
2551   gdb_assert (gdbarch->value_from_register != NULL);
2552   if (gdbarch_debug >= 2)
2553     fprintf_unfiltered (gdb_stdlog, "gdbarch_value_from_register called\n");
2554   return gdbarch->value_from_register (gdbarch, type, regnum, frame_id);
2555 }
2556
2557 void
2558 set_gdbarch_value_from_register (struct gdbarch *gdbarch,
2559                                  gdbarch_value_from_register_ftype value_from_register)
2560 {
2561   gdbarch->value_from_register = value_from_register;
2562 }
2563
2564 CORE_ADDR
2565 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
2566 {
2567   gdb_assert (gdbarch != NULL);
2568   gdb_assert (gdbarch->pointer_to_address != NULL);
2569   if (gdbarch_debug >= 2)
2570     fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
2571   return gdbarch->pointer_to_address (gdbarch, type, buf);
2572 }
2573
2574 void
2575 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
2576                                 gdbarch_pointer_to_address_ftype pointer_to_address)
2577 {
2578   gdbarch->pointer_to_address = pointer_to_address;
2579 }
2580
2581 void
2582 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, gdb_byte *buf, CORE_ADDR addr)
2583 {
2584   gdb_assert (gdbarch != NULL);
2585   gdb_assert (gdbarch->address_to_pointer != NULL);
2586   if (gdbarch_debug >= 2)
2587     fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
2588   gdbarch->address_to_pointer (gdbarch, type, buf, addr);
2589 }
2590
2591 void
2592 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
2593                                 gdbarch_address_to_pointer_ftype address_to_pointer)
2594 {
2595   gdbarch->address_to_pointer = address_to_pointer;
2596 }
2597
2598 int
2599 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
2600 {
2601   gdb_assert (gdbarch != NULL);
2602   return gdbarch->integer_to_address != NULL;
2603 }
2604
2605 CORE_ADDR
2606 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
2607 {
2608   gdb_assert (gdbarch != NULL);
2609   gdb_assert (gdbarch->integer_to_address != NULL);
2610   if (gdbarch_debug >= 2)
2611     fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
2612   return gdbarch->integer_to_address (gdbarch, type, buf);
2613 }
2614
2615 void
2616 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
2617                                 gdbarch_integer_to_address_ftype integer_to_address)
2618 {
2619   gdbarch->integer_to_address = integer_to_address;
2620 }
2621
2622 int
2623 gdbarch_return_value_p (struct gdbarch *gdbarch)
2624 {
2625   gdb_assert (gdbarch != NULL);
2626   return gdbarch->return_value != NULL;
2627 }
2628
2629 enum return_value_convention
2630 gdbarch_return_value (struct gdbarch *gdbarch, struct value *function, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
2631 {
2632   gdb_assert (gdbarch != NULL);
2633   gdb_assert (gdbarch->return_value != NULL);
2634   if (gdbarch_debug >= 2)
2635     fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value called\n");
2636   return gdbarch->return_value (gdbarch, function, valtype, regcache, readbuf, writebuf);
2637 }
2638
2639 void
2640 set_gdbarch_return_value (struct gdbarch *gdbarch,
2641                           gdbarch_return_value_ftype return_value)
2642 {
2643   gdbarch->return_value = return_value;
2644 }
2645
2646 int
2647 gdbarch_return_in_first_hidden_param_p (struct gdbarch *gdbarch, struct type *type)
2648 {
2649   gdb_assert (gdbarch != NULL);
2650   gdb_assert (gdbarch->return_in_first_hidden_param_p != NULL);
2651   if (gdbarch_debug >= 2)
2652     fprintf_unfiltered (gdb_stdlog, "gdbarch_return_in_first_hidden_param_p called\n");
2653   return gdbarch->return_in_first_hidden_param_p (gdbarch, type);
2654 }
2655
2656 void
2657 set_gdbarch_return_in_first_hidden_param_p (struct gdbarch *gdbarch,
2658                                             gdbarch_return_in_first_hidden_param_p_ftype return_in_first_hidden_param_p)
2659 {
2660   gdbarch->return_in_first_hidden_param_p = return_in_first_hidden_param_p;
2661 }
2662
2663 CORE_ADDR
2664 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
2665 {
2666   gdb_assert (gdbarch != NULL);
2667   gdb_assert (gdbarch->skip_prologue != NULL);
2668   if (gdbarch_debug >= 2)
2669     fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
2670   return gdbarch->skip_prologue (gdbarch, ip);
2671 }
2672
2673 void
2674 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
2675                            gdbarch_skip_prologue_ftype skip_prologue)
2676 {
2677   gdbarch->skip_prologue = skip_prologue;
2678 }
2679
2680 int
2681 gdbarch_skip_main_prologue_p (struct gdbarch *gdbarch)
2682 {
2683   gdb_assert (gdbarch != NULL);
2684   return gdbarch->skip_main_prologue != NULL;
2685 }
2686
2687 CORE_ADDR
2688 gdbarch_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
2689 {
2690   gdb_assert (gdbarch != NULL);
2691   gdb_assert (gdbarch->skip_main_prologue != NULL);
2692   if (gdbarch_debug >= 2)
2693     fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_main_prologue called\n");
2694   return gdbarch->skip_main_prologue (gdbarch, ip);
2695 }
2696
2697 void
2698 set_gdbarch_skip_main_prologue (struct gdbarch *gdbarch,
2699                                 gdbarch_skip_main_prologue_ftype skip_main_prologue)
2700 {
2701   gdbarch->skip_main_prologue = skip_main_prologue;
2702 }
2703
2704 int
2705 gdbarch_skip_entrypoint_p (struct gdbarch *gdbarch)
2706 {
2707   gdb_assert (gdbarch != NULL);
2708   return gdbarch->skip_entrypoint != NULL;
2709 }
2710
2711 CORE_ADDR
2712 gdbarch_skip_entrypoint (struct gdbarch *gdbarch, CORE_ADDR ip)
2713 {
2714   gdb_assert (gdbarch != NULL);
2715   gdb_assert (gdbarch->skip_entrypoint != NULL);
2716   if (gdbarch_debug >= 2)
2717     fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_entrypoint called\n");
2718   return gdbarch->skip_entrypoint (gdbarch, ip);
2719 }
2720
2721 void
2722 set_gdbarch_skip_entrypoint (struct gdbarch *gdbarch,
2723                              gdbarch_skip_entrypoint_ftype skip_entrypoint)
2724 {
2725   gdbarch->skip_entrypoint = skip_entrypoint;
2726 }
2727
2728 int
2729 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
2730 {
2731   gdb_assert (gdbarch != NULL);
2732   gdb_assert (gdbarch->inner_than != NULL);
2733   if (gdbarch_debug >= 2)
2734     fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
2735   return gdbarch->inner_than (lhs, rhs);
2736 }
2737
2738 void
2739 set_gdbarch_inner_than (struct gdbarch *gdbarch,
2740                         gdbarch_inner_than_ftype inner_than)
2741 {
2742   gdbarch->inner_than = inner_than;
2743 }
2744
2745 const gdb_byte *
2746 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
2747 {
2748   gdb_assert (gdbarch != NULL);
2749   gdb_assert (gdbarch->breakpoint_from_pc != NULL);
2750   if (gdbarch_debug >= 2)
2751     fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
2752   return gdbarch->breakpoint_from_pc (gdbarch, pcptr, lenptr);
2753 }
2754
2755 void
2756 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
2757                                 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
2758 {
2759   gdbarch->breakpoint_from_pc = breakpoint_from_pc;
2760 }
2761
2762 void
2763 gdbarch_remote_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *kindptr)
2764 {
2765   gdb_assert (gdbarch != NULL);
2766   gdb_assert (gdbarch->remote_breakpoint_from_pc != NULL);
2767   if (gdbarch_debug >= 2)
2768     fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_breakpoint_from_pc called\n");
2769   gdbarch->remote_breakpoint_from_pc (gdbarch, pcptr, kindptr);
2770 }
2771
2772 void
2773 set_gdbarch_remote_breakpoint_from_pc (struct gdbarch *gdbarch,
2774                                        gdbarch_remote_breakpoint_from_pc_ftype remote_breakpoint_from_pc)
2775 {
2776   gdbarch->remote_breakpoint_from_pc = remote_breakpoint_from_pc;
2777 }
2778
2779 int
2780 gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch)
2781 {
2782   gdb_assert (gdbarch != NULL);
2783   return gdbarch->adjust_breakpoint_address != NULL;
2784 }
2785
2786 CORE_ADDR
2787 gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr)
2788 {
2789   gdb_assert (gdbarch != NULL);
2790   gdb_assert (gdbarch->adjust_breakpoint_address != NULL);
2791   if (gdbarch_debug >= 2)
2792     fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_breakpoint_address called\n");
2793   return gdbarch->adjust_breakpoint_address (gdbarch, bpaddr);
2794 }
2795
2796 void
2797 set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch,
2798                                        gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address)
2799 {
2800   gdbarch->adjust_breakpoint_address = adjust_breakpoint_address;
2801 }
2802
2803 int
2804 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
2805 {
2806   gdb_assert (gdbarch != NULL);
2807   gdb_assert (gdbarch->memory_insert_breakpoint != NULL);
2808   if (gdbarch_debug >= 2)
2809     fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
2810   return gdbarch->memory_insert_breakpoint (gdbarch, bp_tgt);
2811 }
2812
2813 void
2814 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
2815                                       gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
2816 {
2817   gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
2818 }
2819
2820 int
2821 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
2822 {
2823   gdb_assert (gdbarch != NULL);
2824   gdb_assert (gdbarch->memory_remove_breakpoint != NULL);
2825   if (gdbarch_debug >= 2)
2826     fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
2827   return gdbarch->memory_remove_breakpoint (gdbarch, bp_tgt);
2828 }
2829
2830 void
2831 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
2832                                       gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
2833 {
2834   gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
2835 }
2836
2837 CORE_ADDR
2838 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
2839 {
2840   gdb_assert (gdbarch != NULL);
2841   /* Skip verify of decr_pc_after_break, invalid_p == 0 */
2842   if (gdbarch_debug >= 2)
2843     fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
2844   return gdbarch->decr_pc_after_break;
2845 }
2846
2847 void
2848 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
2849                                  CORE_ADDR decr_pc_after_break)
2850 {
2851   gdbarch->decr_pc_after_break = decr_pc_after_break;
2852 }
2853
2854 CORE_ADDR
2855 gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch)
2856 {
2857   gdb_assert (gdbarch != NULL);
2858   /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
2859   if (gdbarch_debug >= 2)
2860     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_function_start_offset called\n");
2861   return gdbarch->deprecated_function_start_offset;
2862 }
2863
2864 void
2865 set_gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch,
2866                                               CORE_ADDR deprecated_function_start_offset)
2867 {
2868   gdbarch->deprecated_function_start_offset = deprecated_function_start_offset;
2869 }
2870
2871 int
2872 gdbarch_remote_register_number (struct gdbarch *gdbarch, int regno)
2873 {
2874   gdb_assert (gdbarch != NULL);
2875   gdb_assert (gdbarch->remote_register_number != NULL);
2876   if (gdbarch_debug >= 2)
2877     fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_register_number called\n");
2878   return gdbarch->remote_register_number (gdbarch, regno);
2879 }
2880
2881 void
2882 set_gdbarch_remote_register_number (struct gdbarch *gdbarch,
2883                                     gdbarch_remote_register_number_ftype remote_register_number)
2884 {
2885   gdbarch->remote_register_number = remote_register_number;
2886 }
2887
2888 int
2889 gdbarch_fetch_tls_load_module_address_p (struct gdbarch *gdbarch)
2890 {
2891   gdb_assert (gdbarch != NULL);
2892   return gdbarch->fetch_tls_load_module_address != NULL;
2893 }
2894
2895 CORE_ADDR
2896 gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch, struct objfile *objfile)
2897 {
2898   gdb_assert (gdbarch != NULL);
2899   gdb_assert (gdbarch->fetch_tls_load_module_address != NULL);
2900   if (gdbarch_debug >= 2)
2901     fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_tls_load_module_address called\n");
2902   return gdbarch->fetch_tls_load_module_address (objfile);
2903 }
2904
2905 void
2906 set_gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch,
2907                                            gdbarch_fetch_tls_load_module_address_ftype fetch_tls_load_module_address)
2908 {
2909   gdbarch->fetch_tls_load_module_address = fetch_tls_load_module_address;
2910 }
2911
2912 CORE_ADDR
2913 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
2914 {
2915   gdb_assert (gdbarch != NULL);
2916   /* Skip verify of frame_args_skip, invalid_p == 0 */
2917   if (gdbarch_debug >= 2)
2918     fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
2919   return gdbarch->frame_args_skip;
2920 }
2921
2922 void
2923 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
2924                              CORE_ADDR frame_args_skip)
2925 {
2926   gdbarch->frame_args_skip = frame_args_skip;
2927 }
2928
2929 int
2930 gdbarch_unwind_pc_p (struct gdbarch *gdbarch)
2931 {
2932   gdb_assert (gdbarch != NULL);
2933   return gdbarch->unwind_pc != NULL;
2934 }
2935
2936 CORE_ADDR
2937 gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
2938 {
2939   gdb_assert (gdbarch != NULL);
2940   gdb_assert (gdbarch->unwind_pc != NULL);
2941   if (gdbarch_debug >= 2)
2942     fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n");
2943   return gdbarch->unwind_pc (gdbarch, next_frame);
2944 }
2945
2946 void
2947 set_gdbarch_unwind_pc (struct gdbarch *gdbarch,
2948                        gdbarch_unwind_pc_ftype unwind_pc)
2949 {
2950   gdbarch->unwind_pc = unwind_pc;
2951 }
2952
2953 int
2954 gdbarch_unwind_sp_p (struct gdbarch *gdbarch)
2955 {
2956   gdb_assert (gdbarch != NULL);
2957   return gdbarch->unwind_sp != NULL;
2958 }
2959
2960 CORE_ADDR
2961 gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
2962 {
2963   gdb_assert (gdbarch != NULL);
2964   gdb_assert (gdbarch->unwind_sp != NULL);
2965   if (gdbarch_debug >= 2)
2966     fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_sp called\n");
2967   return gdbarch->unwind_sp (gdbarch, next_frame);
2968 }
2969
2970 void
2971 set_gdbarch_unwind_sp (struct gdbarch *gdbarch,
2972                        gdbarch_unwind_sp_ftype unwind_sp)
2973 {
2974   gdbarch->unwind_sp = unwind_sp;
2975 }
2976
2977 int
2978 gdbarch_frame_num_args_p (struct gdbarch *gdbarch)
2979 {
2980   gdb_assert (gdbarch != NULL);
2981   return gdbarch->frame_num_args != NULL;
2982 }
2983
2984 int
2985 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
2986 {
2987   gdb_assert (gdbarch != NULL);
2988   gdb_assert (gdbarch->frame_num_args != NULL);
2989   if (gdbarch_debug >= 2)
2990     fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
2991   return gdbarch->frame_num_args (frame);
2992 }
2993
2994 void
2995 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
2996                             gdbarch_frame_num_args_ftype frame_num_args)
2997 {
2998   gdbarch->frame_num_args = frame_num_args;
2999 }
3000
3001 int
3002 gdbarch_frame_align_p (struct gdbarch *gdbarch)
3003 {
3004   gdb_assert (gdbarch != NULL);
3005   return gdbarch->frame_align != NULL;
3006 }
3007
3008 CORE_ADDR
3009 gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
3010 {
3011   gdb_assert (gdbarch != NULL);
3012   gdb_assert (gdbarch->frame_align != NULL);
3013   if (gdbarch_debug >= 2)
3014     fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
3015   return gdbarch->frame_align (gdbarch, address);
3016 }
3017
3018 void
3019 set_gdbarch_frame_align (struct gdbarch *gdbarch,
3020                          gdbarch_frame_align_ftype frame_align)
3021 {
3022   gdbarch->frame_align = frame_align;
3023 }
3024
3025 int
3026 gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type)
3027 {
3028   gdb_assert (gdbarch != NULL);
3029   gdb_assert (gdbarch->stabs_argument_has_addr != NULL);
3030   if (gdbarch_debug >= 2)
3031     fprintf_unfiltered (gdb_stdlog, "gdbarch_stabs_argument_has_addr called\n");
3032   return gdbarch->stabs_argument_has_addr (gdbarch, type);
3033 }
3034
3035 void
3036 set_gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch,
3037                                      gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr)
3038 {
3039   gdbarch->stabs_argument_has_addr = stabs_argument_has_addr;
3040 }
3041
3042 int
3043 gdbarch_frame_red_zone_size (struct gdbarch *gdbarch)
3044 {
3045   gdb_assert (gdbarch != NULL);
3046   if (gdbarch_debug >= 2)
3047     fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_red_zone_size called\n");
3048   return gdbarch->frame_red_zone_size;
3049 }
3050
3051 void
3052 set_gdbarch_frame_red_zone_size (struct gdbarch *gdbarch,
3053                                  int frame_red_zone_size)
3054 {
3055   gdbarch->frame_red_zone_size = frame_red_zone_size;
3056 }
3057
3058 CORE_ADDR
3059 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
3060 {
3061   gdb_assert (gdbarch != NULL);
3062   gdb_assert (gdbarch->convert_from_func_ptr_addr != NULL);
3063   if (gdbarch_debug >= 2)
3064     fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
3065   return gdbarch->convert_from_func_ptr_addr (gdbarch, addr, targ);
3066 }
3067
3068 void
3069 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
3070                                         gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
3071 {
3072   gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
3073 }
3074
3075 CORE_ADDR
3076 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
3077 {
3078   gdb_assert (gdbarch != NULL);
3079   gdb_assert (gdbarch->addr_bits_remove != NULL);
3080   if (gdbarch_debug >= 2)
3081     fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
3082   return gdbarch->addr_bits_remove (gdbarch, addr);
3083 }
3084
3085 void
3086 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
3087                               gdbarch_addr_bits_remove_ftype addr_bits_remove)
3088 {
3089   gdbarch->addr_bits_remove = addr_bits_remove;
3090 }
3091
3092 int
3093 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
3094 {
3095   gdb_assert (gdbarch != NULL);
3096   return gdbarch->software_single_step != NULL;
3097 }
3098
3099 int
3100 gdbarch_software_single_step (struct gdbarch *gdbarch, struct frame_info *frame)
3101 {
3102   gdb_assert (gdbarch != NULL);
3103   gdb_assert (gdbarch->software_single_step != NULL);
3104   if (gdbarch_debug >= 2)
3105     fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
3106   return gdbarch->software_single_step (frame);
3107 }
3108
3109 void
3110 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
3111                                   gdbarch_software_single_step_ftype software_single_step)
3112 {
3113   gdbarch->software_single_step = software_single_step;
3114 }
3115
3116 int
3117 gdbarch_single_step_through_delay_p (struct gdbarch *gdbarch)
3118 {
3119   gdb_assert (gdbarch != NULL);
3120   return gdbarch->single_step_through_delay != NULL;
3121 }
3122
3123 int
3124 gdbarch_single_step_through_delay (struct gdbarch *gdbarch, struct frame_info *frame)
3125 {
3126   gdb_assert (gdbarch != NULL);
3127   gdb_assert (gdbarch->single_step_through_delay != NULL);
3128   if (gdbarch_debug >= 2)
3129     fprintf_unfiltered (gdb_stdlog, "gdbarch_single_step_through_delay called\n");
3130   return gdbarch->single_step_through_delay (gdbarch, frame);
3131 }
3132
3133 void
3134 set_gdbarch_single_step_through_delay (struct gdbarch *gdbarch,
3135                                        gdbarch_single_step_through_delay_ftype single_step_through_delay)
3136 {
3137   gdbarch->single_step_through_delay = single_step_through_delay;
3138 }
3139
3140 int
3141 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info)
3142 {
3143   gdb_assert (gdbarch != NULL);
3144   gdb_assert (gdbarch->print_insn != NULL);
3145   if (gdbarch_debug >= 2)
3146     fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
3147   return gdbarch->print_insn (vma, info);
3148 }
3149
3150 void
3151 set_gdbarch_print_insn (struct gdbarch *gdbarch,
3152                         gdbarch_print_insn_ftype print_insn)
3153 {
3154   gdbarch->print_insn = print_insn;
3155 }
3156
3157 CORE_ADDR
3158 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR pc)
3159 {
3160   gdb_assert (gdbarch != NULL);
3161   gdb_assert (gdbarch->skip_trampoline_code != NULL);
3162   if (gdbarch_debug >= 2)
3163     fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
3164   return gdbarch->skip_trampoline_code (frame, pc);
3165 }
3166
3167 void
3168 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
3169                                   gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
3170 {
3171   gdbarch->skip_trampoline_code = skip_trampoline_code;
3172 }
3173
3174 CORE_ADDR
3175 gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
3176 {
3177   gdb_assert (gdbarch != NULL);
3178   gdb_assert (gdbarch->skip_solib_resolver != NULL);
3179   if (gdbarch_debug >= 2)
3180     fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_solib_resolver called\n");
3181   return gdbarch->skip_solib_resolver (gdbarch, pc);
3182 }
3183
3184 void
3185 set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch,
3186                                  gdbarch_skip_solib_resolver_ftype skip_solib_resolver)
3187 {
3188   gdbarch->skip_solib_resolver = skip_solib_resolver;
3189 }
3190
3191 int
3192 gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, const char *name)
3193 {
3194   gdb_assert (gdbarch != NULL);
3195   gdb_assert (gdbarch->in_solib_return_trampoline != NULL);
3196   if (gdbarch_debug >= 2)
3197     fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
3198   return gdbarch->in_solib_return_trampoline (gdbarch, pc, name);
3199 }
3200
3201 void
3202 set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
3203                                         gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
3204 {
3205   gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
3206 }
3207
3208 int
3209 gdbarch_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR addr)
3210 {
3211   gdb_assert (gdbarch != NULL);
3212   gdb_assert (gdbarch->stack_frame_destroyed_p != NULL);
3213   if (gdbarch_debug >= 2)
3214     fprintf_unfiltered (gdb_stdlog, "gdbarch_stack_frame_destroyed_p called\n");
3215   return gdbarch->stack_frame_destroyed_p (gdbarch, addr);
3216 }
3217
3218 void
3219 set_gdbarch_stack_frame_destroyed_p (struct gdbarch *gdbarch,
3220                                      gdbarch_stack_frame_destroyed_p_ftype stack_frame_destroyed_p)
3221 {
3222   gdbarch->stack_frame_destroyed_p = stack_frame_destroyed_p;
3223 }
3224
3225 int
3226 gdbarch_elf_make_msymbol_special_p (struct gdbarch *gdbarch)
3227 {
3228   gdb_assert (gdbarch != NULL);
3229   return gdbarch->elf_make_msymbol_special != NULL;
3230 }
3231
3232 void
3233 gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
3234 {
3235   gdb_assert (gdbarch != NULL);
3236   gdb_assert (gdbarch->elf_make_msymbol_special != NULL);
3237   if (gdbarch_debug >= 2)
3238     fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
3239   gdbarch->elf_make_msymbol_special (sym, msym);
3240 }
3241
3242 void
3243 set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
3244                                       gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
3245 {
3246   gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
3247 }
3248
3249 void
3250 gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
3251 {
3252   gdb_assert (gdbarch != NULL);
3253   gdb_assert (gdbarch->coff_make_msymbol_special != NULL);
3254   if (gdbarch_debug >= 2)
3255     fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
3256   gdbarch->coff_make_msymbol_special (val, msym);
3257 }
3258
3259 void
3260 set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
3261                                        gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
3262 {
3263   gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
3264 }
3265
3266 void
3267 gdbarch_make_symbol_special (struct gdbarch *gdbarch, struct symbol *sym, struct objfile *objfile)
3268 {
3269   gdb_assert (gdbarch != NULL);
3270   gdb_assert (gdbarch->make_symbol_special != NULL);
3271   if (gdbarch_debug >= 2)
3272     fprintf_unfiltered (gdb_stdlog, "gdbarch_make_symbol_special called\n");
3273   gdbarch->make_symbol_special (sym, objfile);
3274 }
3275
3276 void
3277 set_gdbarch_make_symbol_special (struct gdbarch *gdbarch,
3278                                  gdbarch_make_symbol_special_ftype make_symbol_special)
3279 {
3280   gdbarch->make_symbol_special = make_symbol_special;
3281 }
3282
3283 CORE_ADDR
3284 gdbarch_adjust_dwarf2_addr (struct gdbarch *gdbarch, CORE_ADDR pc)
3285 {
3286   gdb_assert (gdbarch != NULL);
3287   gdb_assert (gdbarch->adjust_dwarf2_addr != NULL);
3288   if (gdbarch_debug >= 2)
3289     fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_dwarf2_addr called\n");
3290   return gdbarch->adjust_dwarf2_addr (pc);
3291 }
3292
3293 void
3294 set_gdbarch_adjust_dwarf2_addr (struct gdbarch *gdbarch,
3295                                 gdbarch_adjust_dwarf2_addr_ftype adjust_dwarf2_addr)
3296 {
3297   gdbarch->adjust_dwarf2_addr = adjust_dwarf2_addr;
3298 }
3299
3300 CORE_ADDR
3301 gdbarch_adjust_dwarf2_line (struct gdbarch *gdbarch, CORE_ADDR addr, int rel)
3302 {
3303   gdb_assert (gdbarch != NULL);
3304   gdb_assert (gdbarch->adjust_dwarf2_line != NULL);
3305   if (gdbarch_debug >= 2)
3306     fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_dwarf2_line called\n");
3307   return gdbarch->adjust_dwarf2_line (addr, rel);
3308 }
3309
3310 void
3311 set_gdbarch_adjust_dwarf2_line (struct gdbarch *gdbarch,
3312                                 gdbarch_adjust_dwarf2_line_ftype adjust_dwarf2_line)
3313 {
3314   gdbarch->adjust_dwarf2_line = adjust_dwarf2_line;
3315 }
3316
3317 int
3318 gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
3319 {
3320   gdb_assert (gdbarch != NULL);
3321   /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
3322   if (gdbarch_debug >= 2)
3323     fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
3324   return gdbarch->cannot_step_breakpoint;
3325 }
3326
3327 void
3328 set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
3329                                     int cannot_step_breakpoint)
3330 {
3331   gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
3332 }
3333
3334 int
3335 gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
3336 {
3337   gdb_assert (gdbarch != NULL);
3338   /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
3339   if (gdbarch_debug >= 2)
3340     fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
3341   return gdbarch->have_nonsteppable_watchpoint;
3342 }
3343
3344 void
3345 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
3346                                           int have_nonsteppable_watchpoint)
3347 {
3348   gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
3349 }
3350
3351 int
3352 gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
3353 {
3354   gdb_assert (gdbarch != NULL);
3355   return gdbarch->address_class_type_flags != NULL;
3356 }
3357
3358 int
3359 gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
3360 {
3361   gdb_assert (gdbarch != NULL);
3362   gdb_assert (gdbarch->address_class_type_flags != NULL);
3363   if (gdbarch_debug >= 2)
3364     fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
3365   return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
3366 }
3367
3368 void
3369 set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
3370                                       gdbarch_address_class_type_flags_ftype address_class_type_flags)
3371 {
3372   gdbarch->address_class_type_flags = address_class_type_flags;
3373 }
3374
3375 int
3376 gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
3377 {
3378   gdb_assert (gdbarch != NULL);
3379   return gdbarch->address_class_type_flags_to_name != NULL;
3380 }
3381
3382 const char *
3383 gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
3384 {
3385   gdb_assert (gdbarch != NULL);
3386   gdb_assert (gdbarch->address_class_type_flags_to_name != NULL);
3387   if (gdbarch_debug >= 2)
3388     fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
3389   return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
3390 }
3391
3392 void
3393 set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
3394                                               gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
3395 {
3396   gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
3397 }
3398
3399 int
3400 gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
3401 {
3402   gdb_assert (gdbarch != NULL);
3403   return gdbarch->address_class_name_to_type_flags != NULL;
3404 }
3405
3406 int
3407 gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
3408 {
3409   gdb_assert (gdbarch != NULL);
3410   gdb_assert (gdbarch->address_class_name_to_type_flags != NULL);
3411   if (gdbarch_debug >= 2)
3412     fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
3413   return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
3414 }
3415
3416 void
3417 set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
3418                                               gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
3419 {
3420   gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
3421 }
3422
3423 int
3424 gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
3425 {
3426   gdb_assert (gdbarch != NULL);
3427   gdb_assert (gdbarch->register_reggroup_p != NULL);
3428   if (gdbarch_debug >= 2)
3429     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
3430   return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
3431 }
3432
3433 void
3434 set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
3435                                  gdbarch_register_reggroup_p_ftype register_reggroup_p)
3436 {
3437   gdbarch->register_reggroup_p = register_reggroup_p;
3438 }
3439
3440 int
3441 gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch)
3442 {
3443   gdb_assert (gdbarch != NULL);
3444   return gdbarch->fetch_pointer_argument != NULL;
3445 }
3446
3447 CORE_ADDR
3448 gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type)
3449 {
3450   gdb_assert (gdbarch != NULL);
3451   gdb_assert (gdbarch->fetch_pointer_argument != NULL);
3452   if (gdbarch_debug >= 2)
3453     fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n");
3454   return gdbarch->fetch_pointer_argument (frame, argi, type);
3455 }
3456
3457 void
3458 set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch,
3459                                     gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument)
3460 {
3461   gdbarch->fetch_pointer_argument = fetch_pointer_argument;
3462 }
3463
3464 int
3465 gdbarch_iterate_over_regset_sections_p (struct gdbarch *gdbarch)
3466 {
3467   gdb_assert (gdbarch != NULL);
3468   return gdbarch->iterate_over_regset_sections != NULL;
3469 }
3470
3471 void
3472 gdbarch_iterate_over_regset_sections (struct gdbarch *gdbarch, iterate_over_regset_sections_cb *cb, void *cb_data, const struct regcache *regcache)
3473 {
3474   gdb_assert (gdbarch != NULL);
3475   gdb_assert (gdbarch->iterate_over_regset_sections != NULL);
3476   if (gdbarch_debug >= 2)
3477     fprintf_unfiltered (gdb_stdlog, "gdbarch_iterate_over_regset_sections called\n");
3478   gdbarch->iterate_over_regset_sections (gdbarch, cb, cb_data, regcache);
3479 }
3480
3481 void
3482 set_gdbarch_iterate_over_regset_sections (struct gdbarch *gdbarch,
3483                                           gdbarch_iterate_over_regset_sections_ftype iterate_over_regset_sections)
3484 {
3485   gdbarch->iterate_over_regset_sections = iterate_over_regset_sections;
3486 }
3487
3488 int
3489 gdbarch_make_corefile_notes_p (struct gdbarch *gdbarch)
3490 {
3491   gdb_assert (gdbarch != NULL);
3492   return gdbarch->make_corefile_notes != NULL;
3493 }
3494
3495 char *
3496 gdbarch_make_corefile_notes (struct gdbarch *gdbarch, bfd *obfd, int *note_size)
3497 {
3498   gdb_assert (gdbarch != NULL);
3499   gdb_assert (gdbarch->make_corefile_notes != NULL);
3500   if (gdbarch_debug >= 2)
3501     fprintf_unfiltered (gdb_stdlog, "gdbarch_make_corefile_notes called\n");
3502   return gdbarch->make_corefile_notes (gdbarch, obfd, note_size);
3503 }
3504
3505 void
3506 set_gdbarch_make_corefile_notes (struct gdbarch *gdbarch,
3507                                  gdbarch_make_corefile_notes_ftype make_corefile_notes)
3508 {
3509   gdbarch->make_corefile_notes = make_corefile_notes;
3510 }
3511
3512 int
3513 gdbarch_elfcore_write_linux_prpsinfo_p (struct gdbarch *gdbarch)
3514 {
3515   gdb_assert (gdbarch != NULL);
3516   return gdbarch->elfcore_write_linux_prpsinfo != NULL;
3517 }
3518
3519 char *
3520 gdbarch_elfcore_write_linux_prpsinfo (struct gdbarch *gdbarch, bfd *obfd, char *note_data, int *note_size, const struct elf_internal_linux_prpsinfo *info)
3521 {
3522   gdb_assert (gdbarch != NULL);
3523   gdb_assert (gdbarch->elfcore_write_linux_prpsinfo != NULL);
3524   if (gdbarch_debug >= 2)
3525     fprintf_unfiltered (gdb_stdlog, "gdbarch_elfcore_write_linux_prpsinfo called\n");
3526   return gdbarch->elfcore_write_linux_prpsinfo (obfd, note_data, note_size, info);
3527 }
3528
3529 void
3530 set_gdbarch_elfcore_write_linux_prpsinfo (struct gdbarch *gdbarch,
3531                                           gdbarch_elfcore_write_linux_prpsinfo_ftype elfcore_write_linux_prpsinfo)
3532 {
3533   gdbarch->elfcore_write_linux_prpsinfo = elfcore_write_linux_prpsinfo;
3534 }
3535
3536 int
3537 gdbarch_find_memory_regions_p (struct gdbarch *gdbarch)
3538 {
3539   gdb_assert (gdbarch != NULL);
3540   return gdbarch->find_memory_regions != NULL;
3541 }
3542
3543 int
3544 gdbarch_find_memory_regions (struct gdbarch *gdbarch, find_memory_region_ftype func, void *data)
3545 {
3546   gdb_assert (gdbarch != NULL);
3547   gdb_assert (gdbarch->find_memory_regions != NULL);
3548   if (gdbarch_debug >= 2)
3549     fprintf_unfiltered (gdb_stdlog, "gdbarch_find_memory_regions called\n");
3550   return gdbarch->find_memory_regions (gdbarch, func, data);
3551 }
3552
3553 void
3554 set_gdbarch_find_memory_regions (struct gdbarch *gdbarch,
3555                                  gdbarch_find_memory_regions_ftype find_memory_regions)
3556 {
3557   gdbarch->find_memory_regions = find_memory_regions;
3558 }
3559
3560 int
3561 gdbarch_core_xfer_shared_libraries_p (struct gdbarch *gdbarch)
3562 {
3563   gdb_assert (gdbarch != NULL);
3564   return gdbarch->core_xfer_shared_libraries != NULL;
3565 }
3566
3567 ULONGEST
3568 gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len)
3569 {
3570   gdb_assert (gdbarch != NULL);
3571   gdb_assert (gdbarch->core_xfer_shared_libraries != NULL);
3572   if (gdbarch_debug >= 2)
3573     fprintf_unfiltered (gdb_stdlog, "gdbarch_core_xfer_shared_libraries called\n");
3574   return gdbarch->core_xfer_shared_libraries (gdbarch, readbuf, offset, len);
3575 }
3576
3577 void
3578 set_gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch,
3579                                         gdbarch_core_xfer_shared_libraries_ftype core_xfer_shared_libraries)
3580 {
3581   gdbarch->core_xfer_shared_libraries = core_xfer_shared_libraries;
3582 }
3583
3584 int
3585 gdbarch_core_xfer_shared_libraries_aix_p (struct gdbarch *gdbarch)
3586 {
3587   gdb_assert (gdbarch != NULL);
3588   return gdbarch->core_xfer_shared_libraries_aix != NULL;
3589 }
3590
3591 ULONGEST
3592 gdbarch_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len)
3593 {
3594   gdb_assert (gdbarch != NULL);
3595   gdb_assert (gdbarch->core_xfer_shared_libraries_aix != NULL);
3596   if (gdbarch_debug >= 2)
3597     fprintf_unfiltered (gdb_stdlog, "gdbarch_core_xfer_shared_libraries_aix called\n");
3598   return gdbarch->core_xfer_shared_libraries_aix (gdbarch, readbuf, offset, len);
3599 }
3600
3601 void
3602 set_gdbarch_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch,
3603                                             gdbarch_core_xfer_shared_libraries_aix_ftype core_xfer_shared_libraries_aix)
3604 {
3605   gdbarch->core_xfer_shared_libraries_aix = core_xfer_shared_libraries_aix;
3606 }
3607
3608 int
3609 gdbarch_core_pid_to_str_p (struct gdbarch *gdbarch)
3610 {
3611   gdb_assert (gdbarch != NULL);
3612   return gdbarch->core_pid_to_str != NULL;
3613 }
3614
3615 char *
3616 gdbarch_core_pid_to_str (struct gdbarch *gdbarch, ptid_t ptid)
3617 {
3618   gdb_assert (gdbarch != NULL);
3619   gdb_assert (gdbarch->core_pid_to_str != NULL);
3620   if (gdbarch_debug >= 2)
3621     fprintf_unfiltered (gdb_stdlog, "gdbarch_core_pid_to_str called\n");
3622   return gdbarch->core_pid_to_str (gdbarch, ptid);
3623 }
3624
3625 void
3626 set_gdbarch_core_pid_to_str (struct gdbarch *gdbarch,
3627                              gdbarch_core_pid_to_str_ftype core_pid_to_str)
3628 {
3629   gdbarch->core_pid_to_str = core_pid_to_str;
3630 }
3631
3632 int
3633 gdbarch_core_thread_name_p (struct gdbarch *gdbarch)
3634 {
3635   gdb_assert (gdbarch != NULL);
3636   return gdbarch->core_thread_name != NULL;
3637 }
3638
3639 const char *
3640 gdbarch_core_thread_name (struct gdbarch *gdbarch, struct thread_info *thr)
3641 {
3642   gdb_assert (gdbarch != NULL);
3643   gdb_assert (gdbarch->core_thread_name != NULL);
3644   if (gdbarch_debug >= 2)
3645     fprintf_unfiltered (gdb_stdlog, "gdbarch_core_thread_name called\n");
3646   return gdbarch->core_thread_name (gdbarch, thr);
3647 }
3648
3649 void
3650 set_gdbarch_core_thread_name (struct gdbarch *gdbarch,
3651                               gdbarch_core_thread_name_ftype core_thread_name)
3652 {
3653   gdbarch->core_thread_name = core_thread_name;
3654 }
3655
3656 int
3657 gdbarch_gcore_bfd_target_p (struct gdbarch *gdbarch)
3658 {
3659   gdb_assert (gdbarch != NULL);
3660   return gdbarch->gcore_bfd_target != 0;
3661 }
3662
3663 const char *
3664 gdbarch_gcore_bfd_target (struct gdbarch *gdbarch)
3665 {
3666   gdb_assert (gdbarch != NULL);
3667   /* Check variable changed from pre-default.  */
3668   gdb_assert (gdbarch->gcore_bfd_target != 0);
3669   if (gdbarch_debug >= 2)
3670     fprintf_unfiltered (gdb_stdlog, "gdbarch_gcore_bfd_target called\n");
3671   return gdbarch->gcore_bfd_target;
3672 }
3673
3674 void
3675 set_gdbarch_gcore_bfd_target (struct gdbarch *gdbarch,
3676                               const char * gcore_bfd_target)
3677 {
3678   gdbarch->gcore_bfd_target = gcore_bfd_target;
3679 }
3680
3681 int
3682 gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch)
3683 {
3684   gdb_assert (gdbarch != NULL);
3685   /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
3686   if (gdbarch_debug >= 2)
3687     fprintf_unfiltered (gdb_stdlog, "gdbarch_vtable_function_descriptors called\n");
3688   return gdbarch->vtable_function_descriptors;
3689 }
3690
3691 void
3692 set_gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch,
3693                                          int vtable_function_descriptors)
3694 {
3695   gdbarch->vtable_function_descriptors = vtable_function_descriptors;
3696 }
3697
3698 int
3699 gdbarch_vbit_in_delta (struct gdbarch *gdbarch)
3700 {
3701   gdb_assert (gdbarch != NULL);
3702   /* Skip verify of vbit_in_delta, invalid_p == 0 */
3703   if (gdbarch_debug >= 2)
3704     fprintf_unfiltered (gdb_stdlog, "gdbarch_vbit_in_delta called\n");
3705   return gdbarch->vbit_in_delta;
3706 }
3707
3708 void
3709 set_gdbarch_vbit_in_delta (struct gdbarch *gdbarch,
3710                            int vbit_in_delta)
3711 {
3712   gdbarch->vbit_in_delta = vbit_in_delta;
3713 }
3714
3715 void
3716 gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch, struct regcache *regcache)
3717 {
3718   gdb_assert (gdbarch != NULL);
3719   gdb_assert (gdbarch->skip_permanent_breakpoint != NULL);
3720   if (gdbarch_debug >= 2)
3721     fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_permanent_breakpoint called\n");
3722   gdbarch->skip_permanent_breakpoint (regcache);
3723 }
3724
3725 void
3726 set_gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch,
3727                                        gdbarch_skip_permanent_breakpoint_ftype skip_permanent_breakpoint)
3728 {
3729   gdbarch->skip_permanent_breakpoint = skip_permanent_breakpoint;
3730 }
3731
3732 int
3733 gdbarch_max_insn_length_p (struct gdbarch *gdbarch)
3734 {
3735   gdb_assert (gdbarch != NULL);
3736   return gdbarch->max_insn_length != 0;
3737 }
3738
3739 ULONGEST
3740 gdbarch_max_insn_length (struct gdbarch *gdbarch)
3741 {
3742   gdb_assert (gdbarch != NULL);
3743   /* Check variable changed from pre-default.  */
3744   gdb_assert (gdbarch->max_insn_length != 0);
3745   if (gdbarch_debug >= 2)
3746     fprintf_unfiltered (gdb_stdlog, "gdbarch_max_insn_length called\n");
3747   return gdbarch->max_insn_length;
3748 }
3749
3750 void
3751 set_gdbarch_max_insn_length (struct gdbarch *gdbarch,
3752                              ULONGEST max_insn_length)
3753 {
3754   gdbarch->max_insn_length = max_insn_length;
3755 }
3756
3757 int
3758 gdbarch_displaced_step_copy_insn_p (struct gdbarch *gdbarch)
3759 {
3760   gdb_assert (gdbarch != NULL);
3761   return gdbarch->displaced_step_copy_insn != NULL;
3762 }
3763
3764 struct displaced_step_closure *
3765 gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch, CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
3766 {
3767   gdb_assert (gdbarch != NULL);
3768   gdb_assert (gdbarch->displaced_step_copy_insn != NULL);
3769   if (gdbarch_debug >= 2)
3770     fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_copy_insn called\n");
3771   return gdbarch->displaced_step_copy_insn (gdbarch, from, to, regs);
3772 }
3773
3774 void
3775 set_gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch,
3776                                       gdbarch_displaced_step_copy_insn_ftype displaced_step_copy_insn)
3777 {
3778   gdbarch->displaced_step_copy_insn = displaced_step_copy_insn;
3779 }
3780
3781 int
3782 gdbarch_displaced_step_hw_singlestep (struct gdbarch *gdbarch, struct displaced_step_closure *closure)
3783 {
3784   gdb_assert (gdbarch != NULL);
3785   gdb_assert (gdbarch->displaced_step_hw_singlestep != NULL);
3786   if (gdbarch_debug >= 2)
3787     fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_hw_singlestep called\n");
3788   return gdbarch->displaced_step_hw_singlestep (gdbarch, closure);
3789 }
3790
3791 void
3792 set_gdbarch_displaced_step_hw_singlestep (struct gdbarch *gdbarch,
3793                                           gdbarch_displaced_step_hw_singlestep_ftype displaced_step_hw_singlestep)
3794 {
3795   gdbarch->displaced_step_hw_singlestep = displaced_step_hw_singlestep;
3796 }
3797
3798 int
3799 gdbarch_displaced_step_fixup_p (struct gdbarch *gdbarch)
3800 {
3801   gdb_assert (gdbarch != NULL);
3802   return gdbarch->displaced_step_fixup != NULL;
3803 }
3804
3805 void
3806 gdbarch_displaced_step_fixup (struct gdbarch *gdbarch, struct displaced_step_closure *closure, CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
3807 {
3808   gdb_assert (gdbarch != NULL);
3809   gdb_assert (gdbarch->displaced_step_fixup != NULL);
3810   /* Do not check predicate: gdbarch->displaced_step_fixup != NULL, allow call.  */
3811   if (gdbarch_debug >= 2)
3812     fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_fixup called\n");
3813   gdbarch->displaced_step_fixup (gdbarch, closure, from, to, regs);
3814 }
3815
3816 void
3817 set_gdbarch_displaced_step_fixup (struct gdbarch *gdbarch,
3818                                   gdbarch_displaced_step_fixup_ftype displaced_step_fixup)
3819 {
3820   gdbarch->displaced_step_fixup = displaced_step_fixup;
3821 }
3822
3823 void
3824 gdbarch_displaced_step_free_closure (struct gdbarch *gdbarch, struct displaced_step_closure *closure)
3825 {
3826   gdb_assert (gdbarch != NULL);
3827   gdb_assert (gdbarch->displaced_step_free_closure != NULL);
3828   if (gdbarch_debug >= 2)
3829     fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_free_closure called\n");
3830   gdbarch->displaced_step_free_closure (gdbarch, closure);
3831 }
3832
3833 void
3834 set_gdbarch_displaced_step_free_closure (struct gdbarch *gdbarch,
3835                                          gdbarch_displaced_step_free_closure_ftype displaced_step_free_closure)
3836 {
3837   gdbarch->displaced_step_free_closure = displaced_step_free_closure;
3838 }
3839
3840 CORE_ADDR
3841 gdbarch_displaced_step_location (struct gdbarch *gdbarch)
3842 {
3843   gdb_assert (gdbarch != NULL);
3844   gdb_assert (gdbarch->displaced_step_location != NULL);
3845   if (gdbarch_debug >= 2)
3846     fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_location called\n");
3847   return gdbarch->displaced_step_location (gdbarch);
3848 }
3849
3850 void
3851 set_gdbarch_displaced_step_location (struct gdbarch *gdbarch,
3852                                      gdbarch_displaced_step_location_ftype displaced_step_location)
3853 {
3854   gdbarch->displaced_step_location = displaced_step_location;
3855 }
3856
3857 int
3858 gdbarch_relocate_instruction_p (struct gdbarch *gdbarch)
3859 {
3860   gdb_assert (gdbarch != NULL);
3861   return gdbarch->relocate_instruction != NULL;
3862 }
3863
3864 void
3865 gdbarch_relocate_instruction (struct gdbarch *gdbarch, CORE_ADDR *to, CORE_ADDR from)
3866 {
3867   gdb_assert (gdbarch != NULL);
3868   gdb_assert (gdbarch->relocate_instruction != NULL);
3869   /* Do not check predicate: gdbarch->relocate_instruction != NULL, allow call.  */
3870   if (gdbarch_debug >= 2)
3871     fprintf_unfiltered (gdb_stdlog, "gdbarch_relocate_instruction called\n");
3872   gdbarch->relocate_instruction (gdbarch, to, from);
3873 }
3874
3875 void
3876 set_gdbarch_relocate_instruction (struct gdbarch *gdbarch,
3877                                   gdbarch_relocate_instruction_ftype relocate_instruction)
3878 {
3879   gdbarch->relocate_instruction = relocate_instruction;
3880 }
3881
3882 int
3883 gdbarch_overlay_update_p (struct gdbarch *gdbarch)
3884 {
3885   gdb_assert (gdbarch != NULL);
3886   return gdbarch->overlay_update != NULL;
3887 }
3888
3889 void
3890 gdbarch_overlay_update (struct gdbarch *gdbarch, struct obj_section *osect)
3891 {
3892   gdb_assert (gdbarch != NULL);
3893   gdb_assert (gdbarch->overlay_update != NULL);
3894   if (gdbarch_debug >= 2)
3895     fprintf_unfiltered (gdb_stdlog, "gdbarch_overlay_update called\n");
3896   gdbarch->overlay_update (osect);
3897 }
3898
3899 void
3900 set_gdbarch_overlay_update (struct gdbarch *gdbarch,
3901                             gdbarch_overlay_update_ftype overlay_update)
3902 {
3903   gdbarch->overlay_update = overlay_update;
3904 }
3905
3906 int
3907 gdbarch_core_read_description_p (struct gdbarch *gdbarch)
3908 {
3909   gdb_assert (gdbarch != NULL);
3910   return gdbarch->core_read_description != NULL;
3911 }
3912
3913 const struct target_desc *
3914 gdbarch_core_read_description (struct gdbarch *gdbarch, struct target_ops *target, bfd *abfd)
3915 {
3916   gdb_assert (gdbarch != NULL);
3917   gdb_assert (gdbarch->core_read_description != NULL);
3918   if (gdbarch_debug >= 2)
3919     fprintf_unfiltered (gdb_stdlog, "gdbarch_core_read_description called\n");
3920   return gdbarch->core_read_description (gdbarch, target, abfd);
3921 }
3922
3923 void
3924 set_gdbarch_core_read_description (struct gdbarch *gdbarch,
3925                                    gdbarch_core_read_description_ftype core_read_description)
3926 {
3927   gdbarch->core_read_description = core_read_description;
3928 }
3929
3930 int
3931 gdbarch_static_transform_name_p (struct gdbarch *gdbarch)
3932 {
3933   gdb_assert (gdbarch != NULL);
3934   return gdbarch->static_transform_name != NULL;
3935 }
3936
3937 const char *
3938 gdbarch_static_transform_name (struct gdbarch *gdbarch, const char *name)
3939 {
3940   gdb_assert (gdbarch != NULL);
3941   gdb_assert (gdbarch->static_transform_name != NULL);
3942   if (gdbarch_debug >= 2)
3943     fprintf_unfiltered (gdb_stdlog, "gdbarch_static_transform_name called\n");
3944   return gdbarch->static_transform_name (name);
3945 }
3946
3947 void
3948 set_gdbarch_static_transform_name (struct gdbarch *gdbarch,
3949                                    gdbarch_static_transform_name_ftype static_transform_name)
3950 {
3951   gdbarch->static_transform_name = static_transform_name;
3952 }
3953
3954 int
3955 gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch)
3956 {
3957   gdb_assert (gdbarch != NULL);
3958   /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
3959   if (gdbarch_debug >= 2)
3960     fprintf_unfiltered (gdb_stdlog, "gdbarch_sofun_address_maybe_missing called\n");
3961   return gdbarch->sofun_address_maybe_missing;
3962 }
3963
3964 void
3965 set_gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch,
3966                                          int sofun_address_maybe_missing)
3967 {
3968   gdbarch->sofun_address_maybe_missing = sofun_address_maybe_missing;
3969 }
3970
3971 int
3972 gdbarch_process_record_p (struct gdbarch *gdbarch)
3973 {
3974   gdb_assert (gdbarch != NULL);
3975   return gdbarch->process_record != NULL;
3976 }
3977
3978 int
3979 gdbarch_process_record (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR addr)
3980 {
3981   gdb_assert (gdbarch != NULL);
3982   gdb_assert (gdbarch->process_record != NULL);
3983   if (gdbarch_debug >= 2)
3984     fprintf_unfiltered (gdb_stdlog, "gdbarch_process_record called\n");
3985   return gdbarch->process_record (gdbarch, regcache, addr);
3986 }
3987
3988 void
3989 set_gdbarch_process_record (struct gdbarch *gdbarch,
3990                             gdbarch_process_record_ftype process_record)
3991 {
3992   gdbarch->process_record = process_record;
3993 }
3994
3995 int
3996 gdbarch_process_record_signal_p (struct gdbarch *gdbarch)
3997 {
3998   gdb_assert (gdbarch != NULL);
3999   return gdbarch->process_record_signal != NULL;
4000 }
4001
4002 int
4003 gdbarch_process_record_signal (struct gdbarch *gdbarch, struct regcache *regcache, enum gdb_signal signal)
4004 {
4005   gdb_assert (gdbarch != NULL);
4006   gdb_assert (gdbarch->process_record_signal != NULL);
4007   if (gdbarch_debug >= 2)
4008     fprintf_unfiltered (gdb_stdlog, "gdbarch_process_record_signal called\n");
4009   return gdbarch->process_record_signal (gdbarch, regcache, signal);
4010 }
4011
4012 void
4013 set_gdbarch_process_record_signal (struct gdbarch *gdbarch,
4014                                    gdbarch_process_record_signal_ftype process_record_signal)
4015 {
4016   gdbarch->process_record_signal = process_record_signal;
4017 }
4018
4019 int
4020 gdbarch_gdb_signal_from_target_p (struct gdbarch *gdbarch)
4021 {
4022   gdb_assert (gdbarch != NULL);
4023   return gdbarch->gdb_signal_from_target != NULL;
4024 }
4025
4026 enum gdb_signal
4027 gdbarch_gdb_signal_from_target (struct gdbarch *gdbarch, int signo)
4028 {
4029   gdb_assert (gdbarch != NULL);
4030   gdb_assert (gdbarch->gdb_signal_from_target != NULL);
4031   if (gdbarch_debug >= 2)
4032     fprintf_unfiltered (gdb_stdlog, "gdbarch_gdb_signal_from_target called\n");
4033   return gdbarch->gdb_signal_from_target (gdbarch, signo);
4034 }
4035
4036 void
4037 set_gdbarch_gdb_signal_from_target (struct gdbarch *gdbarch,
4038                                     gdbarch_gdb_signal_from_target_ftype gdb_signal_from_target)
4039 {
4040   gdbarch->gdb_signal_from_target = gdb_signal_from_target;
4041 }
4042
4043 int
4044 gdbarch_gdb_signal_to_target_p (struct gdbarch *gdbarch)
4045 {
4046   gdb_assert (gdbarch != NULL);
4047   return gdbarch->gdb_signal_to_target != NULL;
4048 }
4049
4050 int
4051 gdbarch_gdb_signal_to_target (struct gdbarch *gdbarch, enum gdb_signal signal)
4052 {
4053   gdb_assert (gdbarch != NULL);
4054   gdb_assert (gdbarch->gdb_signal_to_target != NULL);
4055   if (gdbarch_debug >= 2)
4056     fprintf_unfiltered (gdb_stdlog, "gdbarch_gdb_signal_to_target called\n");
4057   return gdbarch->gdb_signal_to_target (gdbarch, signal);
4058 }
4059
4060 void
4061 set_gdbarch_gdb_signal_to_target (struct gdbarch *gdbarch,
4062                                   gdbarch_gdb_signal_to_target_ftype gdb_signal_to_target)
4063 {
4064   gdbarch->gdb_signal_to_target = gdb_signal_to_target;
4065 }
4066
4067 int
4068 gdbarch_get_siginfo_type_p (struct gdbarch *gdbarch)
4069 {
4070   gdb_assert (gdbarch != NULL);
4071   return gdbarch->get_siginfo_type != NULL;
4072 }
4073
4074 struct type *
4075 gdbarch_get_siginfo_type (struct gdbarch *gdbarch)
4076 {
4077   gdb_assert (gdbarch != NULL);
4078   gdb_assert (gdbarch->get_siginfo_type != NULL);
4079   if (gdbarch_debug >= 2)
4080     fprintf_unfiltered (gdb_stdlog, "gdbarch_get_siginfo_type called\n");
4081   return gdbarch->get_siginfo_type (gdbarch);
4082 }
4083
4084 void
4085 set_gdbarch_get_siginfo_type (struct gdbarch *gdbarch,
4086                               gdbarch_get_siginfo_type_ftype get_siginfo_type)
4087 {
4088   gdbarch->get_siginfo_type = get_siginfo_type;
4089 }
4090
4091 int
4092 gdbarch_record_special_symbol_p (struct gdbarch *gdbarch)
4093 {
4094   gdb_assert (gdbarch != NULL);
4095   return gdbarch->record_special_symbol != NULL;
4096 }
4097
4098 void
4099 gdbarch_record_special_symbol (struct gdbarch *gdbarch, struct objfile *objfile, asymbol *sym)
4100 {
4101   gdb_assert (gdbarch != NULL);
4102   gdb_assert (gdbarch->record_special_symbol != NULL);
4103   if (gdbarch_debug >= 2)
4104     fprintf_unfiltered (gdb_stdlog, "gdbarch_record_special_symbol called\n");
4105   gdbarch->record_special_symbol (gdbarch, objfile, sym);
4106 }
4107
4108 void
4109 set_gdbarch_record_special_symbol (struct gdbarch *gdbarch,
4110                                    gdbarch_record_special_symbol_ftype record_special_symbol)
4111 {
4112   gdbarch->record_special_symbol = record_special_symbol;
4113 }
4114
4115 int
4116 gdbarch_get_syscall_number_p (struct gdbarch *gdbarch)
4117 {
4118   gdb_assert (gdbarch != NULL);
4119   return gdbarch->get_syscall_number != NULL;
4120 }
4121
4122 LONGEST
4123 gdbarch_get_syscall_number (struct gdbarch *gdbarch, ptid_t ptid)
4124 {
4125   gdb_assert (gdbarch != NULL);
4126   gdb_assert (gdbarch->get_syscall_number != NULL);
4127   if (gdbarch_debug >= 2)
4128     fprintf_unfiltered (gdb_stdlog, "gdbarch_get_syscall_number called\n");
4129   return gdbarch->get_syscall_number (gdbarch, ptid);
4130 }
4131
4132 void
4133 set_gdbarch_get_syscall_number (struct gdbarch *gdbarch,
4134                                 gdbarch_get_syscall_number_ftype get_syscall_number)
4135 {
4136   gdbarch->get_syscall_number = get_syscall_number;
4137 }
4138
4139 const char *
4140 gdbarch_xml_syscall_file (struct gdbarch *gdbarch)
4141 {
4142   gdb_assert (gdbarch != NULL);
4143   /* Skip verify of xml_syscall_file, invalid_p == 0 */
4144   if (gdbarch_debug >= 2)
4145     fprintf_unfiltered (gdb_stdlog, "gdbarch_xml_syscall_file called\n");
4146   return gdbarch->xml_syscall_file;
4147 }
4148
4149 void
4150 set_gdbarch_xml_syscall_file (struct gdbarch *gdbarch,
4151                               const char * xml_syscall_file)
4152 {
4153   gdbarch->xml_syscall_file = xml_syscall_file;
4154 }
4155
4156 struct syscalls_info *
4157 gdbarch_syscalls_info (struct gdbarch *gdbarch)
4158 {
4159   gdb_assert (gdbarch != NULL);
4160   /* Skip verify of syscalls_info, invalid_p == 0 */
4161   if (gdbarch_debug >= 2)
4162     fprintf_unfiltered (gdb_stdlog, "gdbarch_syscalls_info called\n");
4163   return gdbarch->syscalls_info;
4164 }
4165
4166 void
4167 set_gdbarch_syscalls_info (struct gdbarch *gdbarch,
4168                            struct syscalls_info * syscalls_info)
4169 {
4170   gdbarch->syscalls_info = syscalls_info;
4171 }
4172
4173 const char *const *
4174 gdbarch_stap_integer_prefixes (struct gdbarch *gdbarch)
4175 {
4176   gdb_assert (gdbarch != NULL);
4177   /* Skip verify of stap_integer_prefixes, invalid_p == 0 */
4178   if (gdbarch_debug >= 2)
4179     fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_integer_prefixes called\n");
4180   return gdbarch->stap_integer_prefixes;
4181 }
4182
4183 void
4184 set_gdbarch_stap_integer_prefixes (struct gdbarch *gdbarch,
4185                                    const char *const * stap_integer_prefixes)
4186 {
4187   gdbarch->stap_integer_prefixes = stap_integer_prefixes;
4188 }
4189
4190 const char *const *
4191 gdbarch_stap_integer_suffixes (struct gdbarch *gdbarch)
4192 {
4193   gdb_assert (gdbarch != NULL);
4194   /* Skip verify of stap_integer_suffixes, invalid_p == 0 */
4195   if (gdbarch_debug >= 2)
4196     fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_integer_suffixes called\n");
4197   return gdbarch->stap_integer_suffixes;
4198 }
4199
4200 void
4201 set_gdbarch_stap_integer_suffixes (struct gdbarch *gdbarch,
4202                                    const char *const * stap_integer_suffixes)
4203 {
4204   gdbarch->stap_integer_suffixes = stap_integer_suffixes;
4205 }
4206
4207 const char *const *
4208 gdbarch_stap_register_prefixes (struct gdbarch *gdbarch)
4209 {
4210   gdb_assert (gdbarch != NULL);
4211   /* Skip verify of stap_register_prefixes, invalid_p == 0 */
4212   if (gdbarch_debug >= 2)
4213     fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_prefixes called\n");
4214   return gdbarch->stap_register_prefixes;
4215 }
4216
4217 void
4218 set_gdbarch_stap_register_prefixes (struct gdbarch *gdbarch,
4219                                     const char *const * stap_register_prefixes)
4220 {
4221   gdbarch->stap_register_prefixes = stap_register_prefixes;
4222 }
4223
4224 const char *const *
4225 gdbarch_stap_register_suffixes (struct gdbarch *gdbarch)
4226 {
4227   gdb_assert (gdbarch != NULL);
4228   /* Skip verify of stap_register_suffixes, invalid_p == 0 */
4229   if (gdbarch_debug >= 2)
4230     fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_suffixes called\n");
4231   return gdbarch->stap_register_suffixes;
4232 }
4233
4234 void
4235 set_gdbarch_stap_register_suffixes (struct gdbarch *gdbarch,
4236                                     const char *const * stap_register_suffixes)
4237 {
4238   gdbarch->stap_register_suffixes = stap_register_suffixes;
4239 }
4240
4241 const char *const *
4242 gdbarch_stap_register_indirection_prefixes (struct gdbarch *gdbarch)
4243 {
4244   gdb_assert (gdbarch != NULL);
4245   /* Skip verify of stap_register_indirection_prefixes, invalid_p == 0 */
4246   if (gdbarch_debug >= 2)
4247     fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_indirection_prefixes called\n");
4248   return gdbarch->stap_register_indirection_prefixes;
4249 }
4250
4251 void
4252 set_gdbarch_stap_register_indirection_prefixes (struct gdbarch *gdbarch,
4253                                                 const char *const * stap_register_indirection_prefixes)
4254 {
4255   gdbarch->stap_register_indirection_prefixes = stap_register_indirection_prefixes;
4256 }
4257
4258 const char *const *
4259 gdbarch_stap_register_indirection_suffixes (struct gdbarch *gdbarch)
4260 {
4261   gdb_assert (gdbarch != NULL);
4262   /* Skip verify of stap_register_indirection_suffixes, invalid_p == 0 */
4263   if (gdbarch_debug >= 2)
4264     fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_indirection_suffixes called\n");
4265   return gdbarch->stap_register_indirection_suffixes;
4266 }
4267
4268 void
4269 set_gdbarch_stap_register_indirection_suffixes (struct gdbarch *gdbarch,
4270                                                 const char *const * stap_register_indirection_suffixes)
4271 {
4272   gdbarch->stap_register_indirection_suffixes = stap_register_indirection_suffixes;
4273 }
4274
4275 const char *
4276 gdbarch_stap_gdb_register_prefix (struct gdbarch *gdbarch)
4277 {
4278   gdb_assert (gdbarch != NULL);
4279   /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */
4280   if (gdbarch_debug >= 2)
4281     fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_gdb_register_prefix called\n");
4282   return gdbarch->stap_gdb_register_prefix;
4283 }
4284
4285 void
4286 set_gdbarch_stap_gdb_register_prefix (struct gdbarch *gdbarch,
4287                                       const char * stap_gdb_register_prefix)
4288 {
4289   gdbarch->stap_gdb_register_prefix = stap_gdb_register_prefix;
4290 }
4291
4292 const char *
4293 gdbarch_stap_gdb_register_suffix (struct gdbarch *gdbarch)
4294 {
4295   gdb_assert (gdbarch != NULL);
4296   /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */
4297   if (gdbarch_debug >= 2)
4298     fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_gdb_register_suffix called\n");
4299   return gdbarch->stap_gdb_register_suffix;
4300 }
4301
4302 void
4303 set_gdbarch_stap_gdb_register_suffix (struct gdbarch *gdbarch,
4304                                       const char * stap_gdb_register_suffix)
4305 {
4306   gdbarch->stap_gdb_register_suffix = stap_gdb_register_suffix;
4307 }
4308
4309 int
4310 gdbarch_stap_is_single_operand_p (struct gdbarch *gdbarch)
4311 {
4312   gdb_assert (gdbarch != NULL);
4313   return gdbarch->stap_is_single_operand != NULL;
4314 }
4315
4316 int
4317 gdbarch_stap_is_single_operand (struct gdbarch *gdbarch, const char *s)
4318 {
4319   gdb_assert (gdbarch != NULL);
4320   gdb_assert (gdbarch->stap_is_single_operand != NULL);
4321   if (gdbarch_debug >= 2)
4322     fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_is_single_operand called\n");
4323   return gdbarch->stap_is_single_operand (gdbarch, s);
4324 }
4325
4326 void
4327 set_gdbarch_stap_is_single_operand (struct gdbarch *gdbarch,
4328                                     gdbarch_stap_is_single_operand_ftype stap_is_single_operand)
4329 {
4330   gdbarch->stap_is_single_operand = stap_is_single_operand;
4331 }
4332
4333 int
4334 gdbarch_stap_parse_special_token_p (struct gdbarch *gdbarch)
4335 {
4336   gdb_assert (gdbarch != NULL);
4337   return gdbarch->stap_parse_special_token != NULL;
4338 }
4339
4340 int
4341 gdbarch_stap_parse_special_token (struct gdbarch *gdbarch, struct stap_parse_info *p)
4342 {
4343   gdb_assert (gdbarch != NULL);
4344   gdb_assert (gdbarch->stap_parse_special_token != NULL);
4345   if (gdbarch_debug >= 2)
4346     fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_parse_special_token called\n");
4347   return gdbarch->stap_parse_special_token (gdbarch, p);
4348 }
4349
4350 void
4351 set_gdbarch_stap_parse_special_token (struct gdbarch *gdbarch,
4352                                       gdbarch_stap_parse_special_token_ftype stap_parse_special_token)
4353 {
4354   gdbarch->stap_parse_special_token = stap_parse_special_token;
4355 }
4356
4357 int
4358 gdbarch_dtrace_parse_probe_argument_p (struct gdbarch *gdbarch)
4359 {
4360   gdb_assert (gdbarch != NULL);
4361   return gdbarch->dtrace_parse_probe_argument != NULL;
4362 }
4363
4364 void
4365 gdbarch_dtrace_parse_probe_argument (struct gdbarch *gdbarch, struct parser_state *pstate, int narg)
4366 {
4367   gdb_assert (gdbarch != NULL);
4368   gdb_assert (gdbarch->dtrace_parse_probe_argument != NULL);
4369   if (gdbarch_debug >= 2)
4370     fprintf_unfiltered (gdb_stdlog, "gdbarch_dtrace_parse_probe_argument called\n");
4371   gdbarch->dtrace_parse_probe_argument (gdbarch, pstate, narg);
4372 }
4373
4374 void
4375 set_gdbarch_dtrace_parse_probe_argument (struct gdbarch *gdbarch,
4376                                          gdbarch_dtrace_parse_probe_argument_ftype dtrace_parse_probe_argument)
4377 {
4378   gdbarch->dtrace_parse_probe_argument = dtrace_parse_probe_argument;
4379 }
4380
4381 int
4382 gdbarch_dtrace_probe_is_enabled_p (struct gdbarch *gdbarch)
4383 {
4384   gdb_assert (gdbarch != NULL);
4385   return gdbarch->dtrace_probe_is_enabled != NULL;
4386 }
4387
4388 int
4389 gdbarch_dtrace_probe_is_enabled (struct gdbarch *gdbarch, CORE_ADDR addr)
4390 {
4391   gdb_assert (gdbarch != NULL);
4392   gdb_assert (gdbarch->dtrace_probe_is_enabled != NULL);
4393   if (gdbarch_debug >= 2)
4394     fprintf_unfiltered (gdb_stdlog, "gdbarch_dtrace_probe_is_enabled called\n");
4395   return gdbarch->dtrace_probe_is_enabled (gdbarch, addr);
4396 }
4397
4398 void
4399 set_gdbarch_dtrace_probe_is_enabled (struct gdbarch *gdbarch,
4400                                      gdbarch_dtrace_probe_is_enabled_ftype dtrace_probe_is_enabled)
4401 {
4402   gdbarch->dtrace_probe_is_enabled = dtrace_probe_is_enabled;
4403 }
4404
4405 int
4406 gdbarch_dtrace_enable_probe_p (struct gdbarch *gdbarch)
4407 {
4408   gdb_assert (gdbarch != NULL);
4409   return gdbarch->dtrace_enable_probe != NULL;
4410 }
4411
4412 void
4413 gdbarch_dtrace_enable_probe (struct gdbarch *gdbarch, CORE_ADDR addr)
4414 {
4415   gdb_assert (gdbarch != NULL);
4416   gdb_assert (gdbarch->dtrace_enable_probe != NULL);
4417   if (gdbarch_debug >= 2)
4418     fprintf_unfiltered (gdb_stdlog, "gdbarch_dtrace_enable_probe called\n");
4419   gdbarch->dtrace_enable_probe (gdbarch, addr);
4420 }
4421
4422 void
4423 set_gdbarch_dtrace_enable_probe (struct gdbarch *gdbarch,
4424                                  gdbarch_dtrace_enable_probe_ftype dtrace_enable_probe)
4425 {
4426   gdbarch->dtrace_enable_probe = dtrace_enable_probe;
4427 }
4428
4429 int
4430 gdbarch_dtrace_disable_probe_p (struct gdbarch *gdbarch)
4431 {
4432   gdb_assert (gdbarch != NULL);
4433   return gdbarch->dtrace_disable_probe != NULL;
4434 }
4435
4436 void
4437 gdbarch_dtrace_disable_probe (struct gdbarch *gdbarch, CORE_ADDR addr)
4438 {
4439   gdb_assert (gdbarch != NULL);
4440   gdb_assert (gdbarch->dtrace_disable_probe != NULL);
4441   if (gdbarch_debug >= 2)
4442     fprintf_unfiltered (gdb_stdlog, "gdbarch_dtrace_disable_probe called\n");
4443   gdbarch->dtrace_disable_probe (gdbarch, addr);
4444 }
4445
4446 void
4447 set_gdbarch_dtrace_disable_probe (struct gdbarch *gdbarch,
4448                                   gdbarch_dtrace_disable_probe_ftype dtrace_disable_probe)
4449 {
4450   gdbarch->dtrace_disable_probe = dtrace_disable_probe;
4451 }
4452
4453 int
4454 gdbarch_has_global_solist (struct gdbarch *gdbarch)
4455 {
4456   gdb_assert (gdbarch != NULL);
4457   /* Skip verify of has_global_solist, invalid_p == 0 */
4458   if (gdbarch_debug >= 2)
4459     fprintf_unfiltered (gdb_stdlog, "gdbarch_has_global_solist called\n");
4460   return gdbarch->has_global_solist;
4461 }
4462
4463 void
4464 set_gdbarch_has_global_solist (struct gdbarch *gdbarch,
4465                                int has_global_solist)
4466 {
4467   gdbarch->has_global_solist = has_global_solist;
4468 }
4469
4470 int
4471 gdbarch_has_global_breakpoints (struct gdbarch *gdbarch)
4472 {
4473   gdb_assert (gdbarch != NULL);
4474   /* Skip verify of has_global_breakpoints, invalid_p == 0 */
4475   if (gdbarch_debug >= 2)
4476     fprintf_unfiltered (gdb_stdlog, "gdbarch_has_global_breakpoints called\n");
4477   return gdbarch->has_global_breakpoints;
4478 }
4479
4480 void
4481 set_gdbarch_has_global_breakpoints (struct gdbarch *gdbarch,
4482                                     int has_global_breakpoints)
4483 {
4484   gdbarch->has_global_breakpoints = has_global_breakpoints;
4485 }
4486
4487 int
4488 gdbarch_has_shared_address_space (struct gdbarch *gdbarch)
4489 {
4490   gdb_assert (gdbarch != NULL);
4491   gdb_assert (gdbarch->has_shared_address_space != NULL);
4492   if (gdbarch_debug >= 2)
4493     fprintf_unfiltered (gdb_stdlog, "gdbarch_has_shared_address_space called\n");
4494   return gdbarch->has_shared_address_space (gdbarch);
4495 }
4496
4497 void
4498 set_gdbarch_has_shared_address_space (struct gdbarch *gdbarch,
4499                                       gdbarch_has_shared_address_space_ftype has_shared_address_space)
4500 {
4501   gdbarch->has_shared_address_space = has_shared_address_space;
4502 }
4503
4504 int
4505 gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch, CORE_ADDR addr, char **msg)
4506 {
4507   gdb_assert (gdbarch != NULL);
4508   gdb_assert (gdbarch->fast_tracepoint_valid_at != NULL);
4509   if (gdbarch_debug >= 2)
4510     fprintf_unfiltered (gdb_stdlog, "gdbarch_fast_tracepoint_valid_at called\n");
4511   return gdbarch->fast_tracepoint_valid_at (gdbarch, addr, msg);
4512 }
4513
4514 void
4515 set_gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch,
4516                                       gdbarch_fast_tracepoint_valid_at_ftype fast_tracepoint_valid_at)
4517 {
4518   gdbarch->fast_tracepoint_valid_at = fast_tracepoint_valid_at;
4519 }
4520
4521 void
4522 gdbarch_guess_tracepoint_registers (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR addr)
4523 {
4524   gdb_assert (gdbarch != NULL);
4525   gdb_assert (gdbarch->guess_tracepoint_registers != NULL);
4526   if (gdbarch_debug >= 2)
4527     fprintf_unfiltered (gdb_stdlog, "gdbarch_guess_tracepoint_registers called\n");
4528   gdbarch->guess_tracepoint_registers (gdbarch, regcache, addr);
4529 }
4530
4531 void
4532 set_gdbarch_guess_tracepoint_registers (struct gdbarch *gdbarch,
4533                                         gdbarch_guess_tracepoint_registers_ftype guess_tracepoint_registers)
4534 {
4535   gdbarch->guess_tracepoint_registers = guess_tracepoint_registers;
4536 }
4537
4538 const char *
4539 gdbarch_auto_charset (struct gdbarch *gdbarch)
4540 {
4541   gdb_assert (gdbarch != NULL);
4542   gdb_assert (gdbarch->auto_charset != NULL);
4543   if (gdbarch_debug >= 2)
4544     fprintf_unfiltered (gdb_stdlog, "gdbarch_auto_charset called\n");
4545   return gdbarch->auto_charset ();
4546 }
4547
4548 void
4549 set_gdbarch_auto_charset (struct gdbarch *gdbarch,
4550                           gdbarch_auto_charset_ftype auto_charset)
4551 {
4552   gdbarch->auto_charset = auto_charset;
4553 }
4554
4555 const char *
4556 gdbarch_auto_wide_charset (struct gdbarch *gdbarch)
4557 {
4558   gdb_assert (gdbarch != NULL);
4559   gdb_assert (gdbarch->auto_wide_charset != NULL);
4560   if (gdbarch_debug >= 2)
4561     fprintf_unfiltered (gdb_stdlog, "gdbarch_auto_wide_charset called\n");
4562   return gdbarch->auto_wide_charset ();
4563 }
4564
4565 void
4566 set_gdbarch_auto_wide_charset (struct gdbarch *gdbarch,
4567                                gdbarch_auto_wide_charset_ftype auto_wide_charset)
4568 {
4569   gdbarch->auto_wide_charset = auto_wide_charset;
4570 }
4571
4572 const char *
4573 gdbarch_solib_symbols_extension (struct gdbarch *gdbarch)
4574 {
4575   gdb_assert (gdbarch != NULL);
4576   if (gdbarch_debug >= 2)
4577     fprintf_unfiltered (gdb_stdlog, "gdbarch_solib_symbols_extension called\n");
4578   return gdbarch->solib_symbols_extension;
4579 }
4580
4581 void
4582 set_gdbarch_solib_symbols_extension (struct gdbarch *gdbarch,
4583                                      const char * solib_symbols_extension)
4584 {
4585   gdbarch->solib_symbols_extension = solib_symbols_extension;
4586 }
4587
4588 int
4589 gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch)
4590 {
4591   gdb_assert (gdbarch != NULL);
4592   /* Skip verify of has_dos_based_file_system, invalid_p == 0 */
4593   if (gdbarch_debug >= 2)
4594     fprintf_unfiltered (gdb_stdlog, "gdbarch_has_dos_based_file_system called\n");
4595   return gdbarch->has_dos_based_file_system;
4596 }
4597
4598 void
4599 set_gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch,
4600                                        int has_dos_based_file_system)
4601 {
4602   gdbarch->has_dos_based_file_system = has_dos_based_file_system;
4603 }
4604
4605 void
4606 gdbarch_gen_return_address (struct gdbarch *gdbarch, struct agent_expr *ax, struct axs_value *value, CORE_ADDR scope)
4607 {
4608   gdb_assert (gdbarch != NULL);
4609   gdb_assert (gdbarch->gen_return_address != NULL);
4610   if (gdbarch_debug >= 2)
4611     fprintf_unfiltered (gdb_stdlog, "gdbarch_gen_return_address called\n");
4612   gdbarch->gen_return_address (gdbarch, ax, value, scope);
4613 }
4614
4615 void
4616 set_gdbarch_gen_return_address (struct gdbarch *gdbarch,
4617                                 gdbarch_gen_return_address_ftype gen_return_address)
4618 {
4619   gdbarch->gen_return_address = gen_return_address;
4620 }
4621
4622 int
4623 gdbarch_info_proc_p (struct gdbarch *gdbarch)
4624 {
4625   gdb_assert (gdbarch != NULL);
4626   return gdbarch->info_proc != NULL;
4627 }
4628
4629 void
4630 gdbarch_info_proc (struct gdbarch *gdbarch, const char *args, enum info_proc_what what)
4631 {
4632   gdb_assert (gdbarch != NULL);
4633   gdb_assert (gdbarch->info_proc != NULL);
4634   if (gdbarch_debug >= 2)
4635     fprintf_unfiltered (gdb_stdlog, "gdbarch_info_proc called\n");
4636   gdbarch->info_proc (gdbarch, args, what);
4637 }
4638
4639 void
4640 set_gdbarch_info_proc (struct gdbarch *gdbarch,
4641                        gdbarch_info_proc_ftype info_proc)
4642 {
4643   gdbarch->info_proc = info_proc;
4644 }
4645
4646 int
4647 gdbarch_core_info_proc_p (struct gdbarch *gdbarch)
4648 {
4649   gdb_assert (gdbarch != NULL);
4650   return gdbarch->core_info_proc != NULL;
4651 }
4652
4653 void
4654 gdbarch_core_info_proc (struct gdbarch *gdbarch, const char *args, enum info_proc_what what)
4655 {
4656   gdb_assert (gdbarch != NULL);
4657   gdb_assert (gdbarch->core_info_proc != NULL);
4658   if (gdbarch_debug >= 2)
4659     fprintf_unfiltered (gdb_stdlog, "gdbarch_core_info_proc called\n");
4660   gdbarch->core_info_proc (gdbarch, args, what);
4661 }
4662
4663 void
4664 set_gdbarch_core_info_proc (struct gdbarch *gdbarch,
4665                             gdbarch_core_info_proc_ftype core_info_proc)
4666 {
4667   gdbarch->core_info_proc = core_info_proc;
4668 }
4669
4670 void
4671 gdbarch_iterate_over_objfiles_in_search_order (struct gdbarch *gdbarch, iterate_over_objfiles_in_search_order_cb_ftype *cb, void *cb_data, struct objfile *current_objfile)
4672 {
4673   gdb_assert (gdbarch != NULL);
4674   gdb_assert (gdbarch->iterate_over_objfiles_in_search_order != NULL);
4675   if (gdbarch_debug >= 2)
4676     fprintf_unfiltered (gdb_stdlog, "gdbarch_iterate_over_objfiles_in_search_order called\n");
4677   gdbarch->iterate_over_objfiles_in_search_order (gdbarch, cb, cb_data, current_objfile);
4678 }
4679
4680 void
4681 set_gdbarch_iterate_over_objfiles_in_search_order (struct gdbarch *gdbarch,
4682                                                    gdbarch_iterate_over_objfiles_in_search_order_ftype iterate_over_objfiles_in_search_order)
4683 {
4684   gdbarch->iterate_over_objfiles_in_search_order = iterate_over_objfiles_in_search_order;
4685 }
4686
4687 struct ravenscar_arch_ops *
4688 gdbarch_ravenscar_ops (struct gdbarch *gdbarch)
4689 {
4690   gdb_assert (gdbarch != NULL);
4691   /* Skip verify of ravenscar_ops, invalid_p == 0 */
4692   if (gdbarch_debug >= 2)
4693     fprintf_unfiltered (gdb_stdlog, "gdbarch_ravenscar_ops called\n");
4694   return gdbarch->ravenscar_ops;
4695 }
4696
4697 void
4698 set_gdbarch_ravenscar_ops (struct gdbarch *gdbarch,
4699                            struct ravenscar_arch_ops * ravenscar_ops)
4700 {
4701   gdbarch->ravenscar_ops = ravenscar_ops;
4702 }
4703
4704 int
4705 gdbarch_insn_is_call (struct gdbarch *gdbarch, CORE_ADDR addr)
4706 {
4707   gdb_assert (gdbarch != NULL);
4708   gdb_assert (gdbarch->insn_is_call != NULL);
4709   if (gdbarch_debug >= 2)
4710     fprintf_unfiltered (gdb_stdlog, "gdbarch_insn_is_call called\n");
4711   return gdbarch->insn_is_call (gdbarch, addr);
4712 }
4713
4714 void
4715 set_gdbarch_insn_is_call (struct gdbarch *gdbarch,
4716                           gdbarch_insn_is_call_ftype insn_is_call)
4717 {
4718   gdbarch->insn_is_call = insn_is_call;
4719 }
4720
4721 int
4722 gdbarch_insn_is_ret (struct gdbarch *gdbarch, CORE_ADDR addr)
4723 {
4724   gdb_assert (gdbarch != NULL);
4725   gdb_assert (gdbarch->insn_is_ret != NULL);
4726   if (gdbarch_debug >= 2)
4727     fprintf_unfiltered (gdb_stdlog, "gdbarch_insn_is_ret called\n");
4728   return gdbarch->insn_is_ret (gdbarch, addr);
4729 }
4730
4731 void
4732 set_gdbarch_insn_is_ret (struct gdbarch *gdbarch,
4733                          gdbarch_insn_is_ret_ftype insn_is_ret)
4734 {
4735   gdbarch->insn_is_ret = insn_is_ret;
4736 }
4737
4738 int
4739 gdbarch_insn_is_jump (struct gdbarch *gdbarch, CORE_ADDR addr)
4740 {
4741   gdb_assert (gdbarch != NULL);
4742   gdb_assert (gdbarch->insn_is_jump != NULL);
4743   if (gdbarch_debug >= 2)
4744     fprintf_unfiltered (gdb_stdlog, "gdbarch_insn_is_jump called\n");
4745   return gdbarch->insn_is_jump (gdbarch, addr);
4746 }
4747
4748 void
4749 set_gdbarch_insn_is_jump (struct gdbarch *gdbarch,
4750                           gdbarch_insn_is_jump_ftype insn_is_jump)
4751 {
4752   gdbarch->insn_is_jump = insn_is_jump;
4753 }
4754
4755 int
4756 gdbarch_auxv_parse_p (struct gdbarch *gdbarch)
4757 {
4758   gdb_assert (gdbarch != NULL);
4759   return gdbarch->auxv_parse != NULL;
4760 }
4761
4762 int
4763 gdbarch_auxv_parse (struct gdbarch *gdbarch, gdb_byte **readptr, gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp)
4764 {
4765   gdb_assert (gdbarch != NULL);
4766   gdb_assert (gdbarch->auxv_parse != NULL);
4767   if (gdbarch_debug >= 2)
4768     fprintf_unfiltered (gdb_stdlog, "gdbarch_auxv_parse called\n");
4769   return gdbarch->auxv_parse (gdbarch, readptr, endptr, typep, valp);
4770 }
4771
4772 void
4773 set_gdbarch_auxv_parse (struct gdbarch *gdbarch,
4774                         gdbarch_auxv_parse_ftype auxv_parse)
4775 {
4776   gdbarch->auxv_parse = auxv_parse;
4777 }
4778
4779 void
4780 gdbarch_print_auxv_entry (struct gdbarch *gdbarch, struct ui_file *file, CORE_ADDR type, CORE_ADDR val)
4781 {
4782   gdb_assert (gdbarch != NULL);
4783   gdb_assert (gdbarch->print_auxv_entry != NULL);
4784   if (gdbarch_debug >= 2)
4785     fprintf_unfiltered (gdb_stdlog, "gdbarch_print_auxv_entry called\n");
4786   gdbarch->print_auxv_entry (gdbarch, file, type, val);
4787 }
4788
4789 void
4790 set_gdbarch_print_auxv_entry (struct gdbarch *gdbarch,
4791                               gdbarch_print_auxv_entry_ftype print_auxv_entry)
4792 {
4793   gdbarch->print_auxv_entry = print_auxv_entry;
4794 }
4795
4796 int
4797 gdbarch_vsyscall_range (struct gdbarch *gdbarch, struct mem_range *range)
4798 {
4799   gdb_assert (gdbarch != NULL);
4800   gdb_assert (gdbarch->vsyscall_range != NULL);
4801   if (gdbarch_debug >= 2)
4802     fprintf_unfiltered (gdb_stdlog, "gdbarch_vsyscall_range called\n");
4803   return gdbarch->vsyscall_range (gdbarch, range);
4804 }
4805
4806 void
4807 set_gdbarch_vsyscall_range (struct gdbarch *gdbarch,
4808                             gdbarch_vsyscall_range_ftype vsyscall_range)
4809 {
4810   gdbarch->vsyscall_range = vsyscall_range;
4811 }
4812
4813 CORE_ADDR
4814 gdbarch_infcall_mmap (struct gdbarch *gdbarch, CORE_ADDR size, unsigned prot)
4815 {
4816   gdb_assert (gdbarch != NULL);
4817   gdb_assert (gdbarch->infcall_mmap != NULL);
4818   if (gdbarch_debug >= 2)
4819     fprintf_unfiltered (gdb_stdlog, "gdbarch_infcall_mmap called\n");
4820   return gdbarch->infcall_mmap (size, prot);
4821 }
4822
4823 void
4824 set_gdbarch_infcall_mmap (struct gdbarch *gdbarch,
4825                           gdbarch_infcall_mmap_ftype infcall_mmap)
4826 {
4827   gdbarch->infcall_mmap = infcall_mmap;
4828 }
4829
4830 void
4831 gdbarch_infcall_munmap (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR size)
4832 {
4833   gdb_assert (gdbarch != NULL);
4834   gdb_assert (gdbarch->infcall_munmap != NULL);
4835   if (gdbarch_debug >= 2)
4836     fprintf_unfiltered (gdb_stdlog, "gdbarch_infcall_munmap called\n");
4837   gdbarch->infcall_munmap (addr, size);
4838 }
4839
4840 void
4841 set_gdbarch_infcall_munmap (struct gdbarch *gdbarch,
4842                             gdbarch_infcall_munmap_ftype infcall_munmap)
4843 {
4844   gdbarch->infcall_munmap = infcall_munmap;
4845 }
4846
4847 char *
4848 gdbarch_gcc_target_options (struct gdbarch *gdbarch)
4849 {
4850   gdb_assert (gdbarch != NULL);
4851   gdb_assert (gdbarch->gcc_target_options != NULL);
4852   if (gdbarch_debug >= 2)
4853     fprintf_unfiltered (gdb_stdlog, "gdbarch_gcc_target_options called\n");
4854   return gdbarch->gcc_target_options (gdbarch);
4855 }
4856
4857 void
4858 set_gdbarch_gcc_target_options (struct gdbarch *gdbarch,
4859                                 gdbarch_gcc_target_options_ftype gcc_target_options)
4860 {
4861   gdbarch->gcc_target_options = gcc_target_options;
4862 }
4863
4864 const char *
4865 gdbarch_gnu_triplet_regexp (struct gdbarch *gdbarch)
4866 {
4867   gdb_assert (gdbarch != NULL);
4868   gdb_assert (gdbarch->gnu_triplet_regexp != NULL);
4869   if (gdbarch_debug >= 2)
4870     fprintf_unfiltered (gdb_stdlog, "gdbarch_gnu_triplet_regexp called\n");
4871   return gdbarch->gnu_triplet_regexp (gdbarch);
4872 }
4873
4874 void
4875 set_gdbarch_gnu_triplet_regexp (struct gdbarch *gdbarch,
4876                                 gdbarch_gnu_triplet_regexp_ftype gnu_triplet_regexp)
4877 {
4878   gdbarch->gnu_triplet_regexp = gnu_triplet_regexp;
4879 }
4880
4881 int
4882 gdbarch_addressable_memory_unit_size (struct gdbarch *gdbarch)
4883 {
4884   gdb_assert (gdbarch != NULL);
4885   gdb_assert (gdbarch->addressable_memory_unit_size != NULL);
4886   if (gdbarch_debug >= 2)
4887     fprintf_unfiltered (gdb_stdlog, "gdbarch_addressable_memory_unit_size called\n");
4888   return gdbarch->addressable_memory_unit_size (gdbarch);
4889 }
4890
4891 void
4892 set_gdbarch_addressable_memory_unit_size (struct gdbarch *gdbarch,
4893                                           gdbarch_addressable_memory_unit_size_ftype addressable_memory_unit_size)
4894 {
4895   gdbarch->addressable_memory_unit_size = addressable_memory_unit_size;
4896 }
4897
4898
4899 /* Keep a registry of per-architecture data-pointers required by GDB
4900    modules.  */
4901
4902 struct gdbarch_data
4903 {
4904   unsigned index;
4905   int init_p;
4906   gdbarch_data_pre_init_ftype *pre_init;
4907   gdbarch_data_post_init_ftype *post_init;
4908 };
4909
4910 struct gdbarch_data_registration
4911 {
4912   struct gdbarch_data *data;
4913   struct gdbarch_data_registration *next;
4914 };
4915
4916 struct gdbarch_data_registry
4917 {
4918   unsigned nr;
4919   struct gdbarch_data_registration *registrations;
4920 };
4921
4922 struct gdbarch_data_registry gdbarch_data_registry =
4923 {
4924   0, NULL,
4925 };
4926
4927 static struct gdbarch_data *
4928 gdbarch_data_register (gdbarch_data_pre_init_ftype *pre_init,
4929                        gdbarch_data_post_init_ftype *post_init)
4930 {
4931   struct gdbarch_data_registration **curr;
4932
4933   /* Append the new registration.  */
4934   for (curr = &gdbarch_data_registry.registrations;
4935        (*curr) != NULL;
4936        curr = &(*curr)->next);
4937   (*curr) = XNEW (struct gdbarch_data_registration);
4938   (*curr)->next = NULL;
4939   (*curr)->data = XNEW (struct gdbarch_data);
4940   (*curr)->data->index = gdbarch_data_registry.nr++;
4941   (*curr)->data->pre_init = pre_init;
4942   (*curr)->data->post_init = post_init;
4943   (*curr)->data->init_p = 1;
4944   return (*curr)->data;
4945 }
4946
4947 struct gdbarch_data *
4948 gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype *pre_init)
4949 {
4950   return gdbarch_data_register (pre_init, NULL);
4951 }
4952
4953 struct gdbarch_data *
4954 gdbarch_data_register_post_init (gdbarch_data_post_init_ftype *post_init)
4955 {
4956   return gdbarch_data_register (NULL, post_init);
4957 }
4958
4959 /* Create/delete the gdbarch data vector.  */
4960
4961 static void
4962 alloc_gdbarch_data (struct gdbarch *gdbarch)
4963 {
4964   gdb_assert (gdbarch->data == NULL);
4965   gdbarch->nr_data = gdbarch_data_registry.nr;
4966   gdbarch->data = GDBARCH_OBSTACK_CALLOC (gdbarch, gdbarch->nr_data, void *);
4967 }
4968
4969 /* Initialize the current value of the specified per-architecture
4970    data-pointer.  */
4971
4972 void
4973 deprecated_set_gdbarch_data (struct gdbarch *gdbarch,
4974                              struct gdbarch_data *data,
4975                              void *pointer)
4976 {
4977   gdb_assert (data->index < gdbarch->nr_data);
4978   gdb_assert (gdbarch->data[data->index] == NULL);
4979   gdb_assert (data->pre_init == NULL);
4980   gdbarch->data[data->index] = pointer;
4981 }
4982
4983 /* Return the current value of the specified per-architecture
4984    data-pointer.  */
4985
4986 void *
4987 gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
4988 {
4989   gdb_assert (data->index < gdbarch->nr_data);
4990   if (gdbarch->data[data->index] == NULL)
4991     {
4992       /* The data-pointer isn't initialized, call init() to get a
4993          value.  */
4994       if (data->pre_init != NULL)
4995         /* Mid architecture creation: pass just the obstack, and not
4996            the entire architecture, as that way it isn't possible for
4997            pre-init code to refer to undefined architecture
4998            fields.  */
4999         gdbarch->data[data->index] = data->pre_init (gdbarch->obstack);
5000       else if (gdbarch->initialized_p
5001                && data->post_init != NULL)
5002         /* Post architecture creation: pass the entire architecture
5003            (as all fields are valid), but be careful to also detect
5004            recursive references.  */
5005         {
5006           gdb_assert (data->init_p);
5007           data->init_p = 0;
5008           gdbarch->data[data->index] = data->post_init (gdbarch);
5009           data->init_p = 1;
5010         }
5011       else
5012         /* The architecture initialization hasn't completed - punt -
5013          hope that the caller knows what they are doing.  Once
5014          deprecated_set_gdbarch_data has been initialized, this can be
5015          changed to an internal error.  */
5016         return NULL;
5017       gdb_assert (gdbarch->data[data->index] != NULL);
5018     }
5019   return gdbarch->data[data->index];
5020 }
5021
5022
5023 /* Keep a registry of the architectures known by GDB.  */
5024
5025 struct gdbarch_registration
5026 {
5027   enum bfd_architecture bfd_architecture;
5028   gdbarch_init_ftype *init;
5029   gdbarch_dump_tdep_ftype *dump_tdep;
5030   struct gdbarch_list *arches;
5031   struct gdbarch_registration *next;
5032 };
5033
5034 static struct gdbarch_registration *gdbarch_registry = NULL;
5035
5036 static void
5037 append_name (const char ***buf, int *nr, const char *name)
5038 {
5039   *buf = XRESIZEVEC (const char *, *buf, *nr + 1);
5040   (*buf)[*nr] = name;
5041   *nr += 1;
5042 }
5043
5044 const char **
5045 gdbarch_printable_names (void)
5046 {
5047   /* Accumulate a list of names based on the registed list of
5048      architectures.  */
5049   int nr_arches = 0;
5050   const char **arches = NULL;
5051   struct gdbarch_registration *rego;
5052
5053   for (rego = gdbarch_registry;
5054        rego != NULL;
5055        rego = rego->next)
5056     {
5057       const struct bfd_arch_info *ap;
5058       ap = bfd_lookup_arch (rego->bfd_architecture, 0);
5059       if (ap == NULL)
5060         internal_error (__FILE__, __LINE__,
5061                         _("gdbarch_architecture_names: multi-arch unknown"));
5062       do
5063         {
5064           append_name (&arches, &nr_arches, ap->printable_name);
5065           ap = ap->next;
5066         }
5067       while (ap != NULL);
5068     }
5069   append_name (&arches, &nr_arches, NULL);
5070   return arches;
5071 }
5072
5073
5074 void
5075 gdbarch_register (enum bfd_architecture bfd_architecture,
5076                   gdbarch_init_ftype *init,
5077                   gdbarch_dump_tdep_ftype *dump_tdep)
5078 {
5079   struct gdbarch_registration **curr;
5080   const struct bfd_arch_info *bfd_arch_info;
5081
5082   /* Check that BFD recognizes this architecture */
5083   bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
5084   if (bfd_arch_info == NULL)
5085     {
5086       internal_error (__FILE__, __LINE__,
5087                       _("gdbarch: Attempt to register "
5088                         "unknown architecture (%d)"),
5089                       bfd_architecture);
5090     }
5091   /* Check that we haven't seen this architecture before.  */
5092   for (curr = &gdbarch_registry;
5093        (*curr) != NULL;
5094        curr = &(*curr)->next)
5095     {
5096       if (bfd_architecture == (*curr)->bfd_architecture)
5097         internal_error (__FILE__, __LINE__,
5098                         _("gdbarch: Duplicate registration "
5099                           "of architecture (%s)"),
5100                         bfd_arch_info->printable_name);
5101     }
5102   /* log it */
5103   if (gdbarch_debug)
5104     fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, %s)\n",
5105                         bfd_arch_info->printable_name,
5106                         host_address_to_string (init));
5107   /* Append it */
5108   (*curr) = XNEW (struct gdbarch_registration);
5109   (*curr)->bfd_architecture = bfd_architecture;
5110   (*curr)->init = init;
5111   (*curr)->dump_tdep = dump_tdep;
5112   (*curr)->arches = NULL;
5113   (*curr)->next = NULL;
5114 }
5115
5116 void
5117 register_gdbarch_init (enum bfd_architecture bfd_architecture,
5118                        gdbarch_init_ftype *init)
5119 {
5120   gdbarch_register (bfd_architecture, init, NULL);
5121 }
5122
5123
5124 /* Look for an architecture using gdbarch_info.  */
5125
5126 struct gdbarch_list *
5127 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
5128                              const struct gdbarch_info *info)
5129 {
5130   for (; arches != NULL; arches = arches->next)
5131     {
5132       if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
5133         continue;
5134       if (info->byte_order != arches->gdbarch->byte_order)
5135         continue;
5136       if (info->osabi != arches->gdbarch->osabi)
5137         continue;
5138       if (info->target_desc != arches->gdbarch->target_desc)
5139         continue;
5140       return arches;
5141     }
5142   return NULL;
5143 }
5144
5145
5146 /* Find an architecture that matches the specified INFO.  Create a new
5147    architecture if needed.  Return that new architecture.  */
5148
5149 struct gdbarch *
5150 gdbarch_find_by_info (struct gdbarch_info info)
5151 {
5152   struct gdbarch *new_gdbarch;
5153   struct gdbarch_registration *rego;
5154
5155   /* Fill in missing parts of the INFO struct using a number of
5156      sources: "set ..."; INFOabfd supplied; and the global
5157      defaults.  */
5158   gdbarch_info_fill (&info);
5159
5160   /* Must have found some sort of architecture.  */
5161   gdb_assert (info.bfd_arch_info != NULL);
5162
5163   if (gdbarch_debug)
5164     {
5165       fprintf_unfiltered (gdb_stdlog,
5166                           "gdbarch_find_by_info: info.bfd_arch_info %s\n",
5167                           (info.bfd_arch_info != NULL
5168                            ? info.bfd_arch_info->printable_name
5169                            : "(null)"));
5170       fprintf_unfiltered (gdb_stdlog,
5171                           "gdbarch_find_by_info: info.byte_order %d (%s)\n",
5172                           info.byte_order,
5173                           (info.byte_order == BFD_ENDIAN_BIG ? "big"
5174                            : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
5175                            : "default"));
5176       fprintf_unfiltered (gdb_stdlog,
5177                           "gdbarch_find_by_info: info.osabi %d (%s)\n",
5178                           info.osabi, gdbarch_osabi_name (info.osabi));
5179       fprintf_unfiltered (gdb_stdlog,
5180                           "gdbarch_find_by_info: info.abfd %s\n",
5181                           host_address_to_string (info.abfd));
5182       fprintf_unfiltered (gdb_stdlog,
5183                           "gdbarch_find_by_info: info.tdep_info %s\n",
5184                           host_address_to_string (info.tdep_info));
5185     }
5186
5187   /* Find the tdep code that knows about this architecture.  */
5188   for (rego = gdbarch_registry;
5189        rego != NULL;
5190        rego = rego->next)
5191     if (rego->bfd_architecture == info.bfd_arch_info->arch)
5192       break;
5193   if (rego == NULL)
5194     {
5195       if (gdbarch_debug)
5196         fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
5197                             "No matching architecture\n");
5198       return 0;
5199     }
5200
5201   /* Ask the tdep code for an architecture that matches "info".  */
5202   new_gdbarch = rego->init (info, rego->arches);
5203
5204   /* Did the tdep code like it?  No.  Reject the change and revert to
5205      the old architecture.  */
5206   if (new_gdbarch == NULL)
5207     {
5208       if (gdbarch_debug)
5209         fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
5210                             "Target rejected architecture\n");
5211       return NULL;
5212     }
5213
5214   /* Is this a pre-existing architecture (as determined by already
5215      being initialized)?  Move it to the front of the architecture
5216      list (keeping the list sorted Most Recently Used).  */
5217   if (new_gdbarch->initialized_p)
5218     {
5219       struct gdbarch_list **list;
5220       struct gdbarch_list *self;
5221       if (gdbarch_debug)
5222         fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
5223                             "Previous architecture %s (%s) selected\n",
5224                             host_address_to_string (new_gdbarch),
5225                             new_gdbarch->bfd_arch_info->printable_name);
5226       /* Find the existing arch in the list.  */
5227       for (list = &rego->arches;
5228            (*list) != NULL && (*list)->gdbarch != new_gdbarch;
5229            list = &(*list)->next);
5230       /* It had better be in the list of architectures.  */
5231       gdb_assert ((*list) != NULL && (*list)->gdbarch == new_gdbarch);
5232       /* Unlink SELF.  */
5233       self = (*list);
5234       (*list) = self->next;
5235       /* Insert SELF at the front.  */
5236       self->next = rego->arches;
5237       rego->arches = self;
5238       /* Return it.  */
5239       return new_gdbarch;
5240     }
5241
5242   /* It's a new architecture.  */
5243   if (gdbarch_debug)
5244     fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
5245                         "New architecture %s (%s) selected\n",
5246                         host_address_to_string (new_gdbarch),
5247                         new_gdbarch->bfd_arch_info->printable_name);
5248   
5249   /* Insert the new architecture into the front of the architecture
5250      list (keep the list sorted Most Recently Used).  */
5251   {
5252     struct gdbarch_list *self = XNEW (struct gdbarch_list);
5253     self->next = rego->arches;
5254     self->gdbarch = new_gdbarch;
5255     rego->arches = self;
5256   }    
5257
5258   /* Check that the newly installed architecture is valid.  Plug in
5259      any post init values.  */
5260   new_gdbarch->dump_tdep = rego->dump_tdep;
5261   verify_gdbarch (new_gdbarch);
5262   new_gdbarch->initialized_p = 1;
5263
5264   if (gdbarch_debug)
5265     gdbarch_dump (new_gdbarch, gdb_stdlog);
5266
5267   return new_gdbarch;
5268 }
5269
5270 /* Make the specified architecture current.  */
5271
5272 void
5273 set_target_gdbarch (struct gdbarch *new_gdbarch)
5274 {
5275   gdb_assert (new_gdbarch != NULL);
5276   gdb_assert (new_gdbarch->initialized_p);
5277   current_inferior ()->gdbarch = new_gdbarch;
5278   observer_notify_architecture_changed (new_gdbarch);
5279   registers_changed ();
5280 }
5281
5282 /* Return the current inferior's arch.  */
5283
5284 struct gdbarch *
5285 target_gdbarch (void)
5286 {
5287   return current_inferior ()->gdbarch;
5288 }
5289
5290 extern void _initialize_gdbarch (void);
5291
5292 void
5293 _initialize_gdbarch (void)
5294 {
5295   add_setshow_zuinteger_cmd ("arch", class_maintenance, &gdbarch_debug, _("\
5296 Set architecture debugging."), _("\
5297 Show architecture debugging."), _("\
5298 When non-zero, architecture debugging is enabled."),
5299                             NULL,
5300                             show_gdbarch_debug,
5301                             &setdebuglist, &showdebuglist);
5302 }