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