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