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