1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED -*- buffer-read-only: t -*- */
4 /* Dynamic architecture support for GDB, the GNU debugger.
6 Copyright (C) 1998-2015 Free Software Foundation, Inc.
8 This file is part of GDB.
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.
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.
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/>. */
23 /* This file was created with the aid of ``gdbarch.sh''.
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
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
37 #include "arch-utils.h"
43 #include "floatformat.h"
44 #include "reggroups.h"
46 #include "gdb_obstack.h"
51 /* Static function declarations */
53 static void alloc_gdbarch_data (struct gdbarch *);
55 /* Non-zero if we want to trace architecture code. */
58 #define GDBARCH_DEBUG 0
60 unsigned int gdbarch_debug = GDBARCH_DEBUG;
62 show_gdbarch_debug (struct ui_file *file, int from_tty,
63 struct cmd_list_element *c, const char *value)
65 fprintf_filtered (file, _("Architecture debugging is %s.\n"), value);
69 pformat (const struct floatformat **format)
74 /* Just print out one of them - this is only for diagnostics. */
75 return format[0]->name;
79 pstring (const char *string)
86 /* Helper function to print a list of strings, represented as "const
87 char *const *". The list is printed comma-separated. */
90 pstring_list (const char *const *list)
100 for (p = list; *p != NULL && offset < sizeof (ret); ++p)
102 size_t s = xsnprintf (ret + offset, sizeof (ret) - offset, "%s, ", *p);
108 gdb_assert (offset - 2 < sizeof (ret));
109 ret[offset - 2] = '\0';
116 /* Maintain the struct gdbarch object. */
120 /* Has this architecture been fully initialized? */
123 /* An obstack bound to the lifetime of the architecture. */
124 struct obstack *obstack;
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;
133 /* target specific vector. */
134 struct gdbarch_tdep *tdep;
135 gdbarch_dump_tdep_ftype *dump_tdep;
137 /* per-architecture data-pointers. */
141 /* Multi-arch values.
143 When extending this structure you must:
147 Declare set/get functions and define the corresponding
150 gdbarch_alloc(): If zero/NULL is not a suitable default,
151 initialize the new field.
153 verify_gdbarch(): Confirm that the target updated the field
156 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
159 get_gdbarch(): Implement the set/get functions (probably using
160 the macro's as shortcuts).
169 int long_long_align_bit;
171 const struct floatformat ** half_format;
173 const struct floatformat ** float_format;
175 const struct floatformat ** double_format;
177 const struct floatformat ** long_double_format;
180 int dwarf2_addr_size;
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;
190 gdbarch_ax_pseudo_register_collect_ftype *ax_pseudo_register_collect;
191 gdbarch_ax_pseudo_register_push_stack_ftype *ax_pseudo_register_push_stack;
196 gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum;
197 gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum;
198 gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum;
199 gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum;
200 gdbarch_register_name_ftype *register_name;
201 gdbarch_register_type_ftype *register_type;
202 gdbarch_dummy_id_ftype *dummy_id;
203 int deprecated_fp_regnum;
204 gdbarch_push_dummy_call_ftype *push_dummy_call;
205 int call_dummy_location;
206 gdbarch_push_dummy_code_ftype *push_dummy_code;
207 gdbarch_print_registers_info_ftype *print_registers_info;
208 gdbarch_print_float_info_ftype *print_float_info;
209 gdbarch_print_vector_info_ftype *print_vector_info;
210 gdbarch_register_sim_regno_ftype *register_sim_regno;
211 gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
212 gdbarch_cannot_store_register_ftype *cannot_store_register;
213 gdbarch_get_longjmp_target_ftype *get_longjmp_target;
214 int believe_pcc_promotion;
215 gdbarch_convert_register_p_ftype *convert_register_p;
216 gdbarch_register_to_value_ftype *register_to_value;
217 gdbarch_value_to_register_ftype *value_to_register;
218 gdbarch_value_from_register_ftype *value_from_register;
219 gdbarch_pointer_to_address_ftype *pointer_to_address;
220 gdbarch_address_to_pointer_ftype *address_to_pointer;
221 gdbarch_integer_to_address_ftype *integer_to_address;
222 gdbarch_return_value_ftype *return_value;
223 gdbarch_return_in_first_hidden_param_p_ftype *return_in_first_hidden_param_p;
224 gdbarch_skip_prologue_ftype *skip_prologue;
225 gdbarch_skip_main_prologue_ftype *skip_main_prologue;
226 gdbarch_skip_entrypoint_ftype *skip_entrypoint;
227 gdbarch_inner_than_ftype *inner_than;
228 gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
229 gdbarch_remote_breakpoint_from_pc_ftype *remote_breakpoint_from_pc;
230 gdbarch_adjust_breakpoint_address_ftype *adjust_breakpoint_address;
231 gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
232 gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
233 CORE_ADDR decr_pc_after_break;
234 CORE_ADDR deprecated_function_start_offset;
235 gdbarch_remote_register_number_ftype *remote_register_number;
236 gdbarch_fetch_tls_load_module_address_ftype *fetch_tls_load_module_address;
237 CORE_ADDR frame_args_skip;
238 gdbarch_unwind_pc_ftype *unwind_pc;
239 gdbarch_unwind_sp_ftype *unwind_sp;
240 gdbarch_frame_num_args_ftype *frame_num_args;
241 gdbarch_frame_align_ftype *frame_align;
242 gdbarch_stabs_argument_has_addr_ftype *stabs_argument_has_addr;
243 int frame_red_zone_size;
244 gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
245 gdbarch_addr_bits_remove_ftype *addr_bits_remove;
246 gdbarch_software_single_step_ftype *software_single_step;
247 gdbarch_single_step_through_delay_ftype *single_step_through_delay;
248 gdbarch_print_insn_ftype *print_insn;
249 gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
250 gdbarch_skip_solib_resolver_ftype *skip_solib_resolver;
251 gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
252 gdbarch_stack_frame_destroyed_p_ftype *stack_frame_destroyed_p;
253 gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
254 gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
255 gdbarch_make_symbol_special_ftype *make_symbol_special;
256 gdbarch_adjust_dwarf2_addr_ftype *adjust_dwarf2_addr;
257 gdbarch_adjust_dwarf2_line_ftype *adjust_dwarf2_line;
258 int cannot_step_breakpoint;
259 int have_nonsteppable_watchpoint;
260 gdbarch_address_class_type_flags_ftype *address_class_type_flags;
261 gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name;
262 gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
263 gdbarch_register_reggroup_p_ftype *register_reggroup_p;
264 gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument;
265 gdbarch_iterate_over_regset_sections_ftype *iterate_over_regset_sections;
266 gdbarch_make_corefile_notes_ftype *make_corefile_notes;
267 gdbarch_elfcore_write_linux_prpsinfo_ftype *elfcore_write_linux_prpsinfo;
268 gdbarch_find_memory_regions_ftype *find_memory_regions;
269 gdbarch_core_xfer_shared_libraries_ftype *core_xfer_shared_libraries;
270 gdbarch_core_xfer_shared_libraries_aix_ftype *core_xfer_shared_libraries_aix;
271 gdbarch_core_pid_to_str_ftype *core_pid_to_str;
272 const char * gcore_bfd_target;
273 int vtable_function_descriptors;
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 gdbarch_dtrace_parse_probe_argument_ftype *dtrace_parse_probe_argument;
307 gdbarch_dtrace_probe_is_enabled_ftype *dtrace_probe_is_enabled;
308 gdbarch_dtrace_enable_probe_ftype *dtrace_enable_probe;
309 gdbarch_dtrace_disable_probe_ftype *dtrace_disable_probe;
310 int has_global_solist;
311 int has_global_breakpoints;
312 gdbarch_has_shared_address_space_ftype *has_shared_address_space;
313 gdbarch_fast_tracepoint_valid_at_ftype *fast_tracepoint_valid_at;
314 gdbarch_auto_charset_ftype *auto_charset;
315 gdbarch_auto_wide_charset_ftype *auto_wide_charset;
316 const char * solib_symbols_extension;
317 int has_dos_based_file_system;
318 gdbarch_gen_return_address_ftype *gen_return_address;
319 gdbarch_info_proc_ftype *info_proc;
320 gdbarch_core_info_proc_ftype *core_info_proc;
321 gdbarch_iterate_over_objfiles_in_search_order_ftype *iterate_over_objfiles_in_search_order;
322 struct ravenscar_arch_ops * ravenscar_ops;
323 gdbarch_insn_is_call_ftype *insn_is_call;
324 gdbarch_insn_is_ret_ftype *insn_is_ret;
325 gdbarch_insn_is_jump_ftype *insn_is_jump;
326 gdbarch_auxv_parse_ftype *auxv_parse;
327 gdbarch_vsyscall_range_ftype *vsyscall_range;
328 gdbarch_infcall_mmap_ftype *infcall_mmap;
329 gdbarch_infcall_munmap_ftype *infcall_munmap;
330 gdbarch_gcc_target_options_ftype *gcc_target_options;
331 gdbarch_gnu_triplet_regexp_ftype *gnu_triplet_regexp;
332 gdbarch_addressable_memory_unit_size_ftype *addressable_memory_unit_size;
335 /* Create a new ``struct gdbarch'' based on information provided by
336 ``struct gdbarch_info''. */
339 gdbarch_alloc (const struct gdbarch_info *info,
340 struct gdbarch_tdep *tdep)
342 struct gdbarch *gdbarch;
344 /* Create an obstack for allocating all the per-architecture memory,
345 then use that to allocate the architecture vector. */
346 struct obstack *obstack = XNEW (struct obstack);
347 obstack_init (obstack);
348 gdbarch = XOBNEW (obstack, struct gdbarch);
349 memset (gdbarch, 0, sizeof (*gdbarch));
350 gdbarch->obstack = obstack;
352 alloc_gdbarch_data (gdbarch);
354 gdbarch->tdep = tdep;
356 gdbarch->bfd_arch_info = info->bfd_arch_info;
357 gdbarch->byte_order = info->byte_order;
358 gdbarch->byte_order_for_code = info->byte_order_for_code;
359 gdbarch->osabi = info->osabi;
360 gdbarch->target_desc = info->target_desc;
362 /* Force the explicit initialization of these. */
363 gdbarch->bits_big_endian = (gdbarch->byte_order == BFD_ENDIAN_BIG);
364 gdbarch->short_bit = 2*TARGET_CHAR_BIT;
365 gdbarch->int_bit = 4*TARGET_CHAR_BIT;
366 gdbarch->long_bit = 4*TARGET_CHAR_BIT;
367 gdbarch->long_long_bit = 2*gdbarch->long_bit;
368 gdbarch->long_long_align_bit = 2*gdbarch->long_bit;
369 gdbarch->half_bit = 2*TARGET_CHAR_BIT;
370 gdbarch->float_bit = 4*TARGET_CHAR_BIT;
371 gdbarch->double_bit = 8*TARGET_CHAR_BIT;
372 gdbarch->long_double_bit = 8*TARGET_CHAR_BIT;
373 gdbarch->ptr_bit = gdbarch->int_bit;
374 gdbarch->char_signed = -1;
375 gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
376 gdbarch->num_regs = -1;
377 gdbarch->sp_regnum = -1;
378 gdbarch->pc_regnum = -1;
379 gdbarch->ps_regnum = -1;
380 gdbarch->fp0_regnum = -1;
381 gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
382 gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
383 gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
384 gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
385 gdbarch->deprecated_fp_regnum = -1;
386 gdbarch->call_dummy_location = AT_ENTRY_POINT;
387 gdbarch->print_registers_info = default_print_registers_info;
388 gdbarch->print_float_info = default_print_float_info;
389 gdbarch->register_sim_regno = legacy_register_sim_regno;
390 gdbarch->cannot_fetch_register = cannot_register_not;
391 gdbarch->cannot_store_register = cannot_register_not;
392 gdbarch->convert_register_p = generic_convert_register_p;
393 gdbarch->value_from_register = default_value_from_register;
394 gdbarch->pointer_to_address = unsigned_pointer_to_address;
395 gdbarch->address_to_pointer = unsigned_address_to_pointer;
396 gdbarch->return_in_first_hidden_param_p = default_return_in_first_hidden_param_p;
397 gdbarch->remote_breakpoint_from_pc = default_remote_breakpoint_from_pc;
398 gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
399 gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
400 gdbarch->remote_register_number = default_remote_register_number;
401 gdbarch->stabs_argument_has_addr = default_stabs_argument_has_addr;
402 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr_identity;
403 gdbarch->addr_bits_remove = core_addr_identity;
404 gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
405 gdbarch->skip_solib_resolver = generic_skip_solib_resolver;
406 gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
407 gdbarch->stack_frame_destroyed_p = generic_stack_frame_destroyed_p;
408 gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
409 gdbarch->make_symbol_special = default_make_symbol_special;
410 gdbarch->adjust_dwarf2_addr = default_adjust_dwarf2_addr;
411 gdbarch->adjust_dwarf2_line = default_adjust_dwarf2_line;
412 gdbarch->register_reggroup_p = default_register_reggroup_p;
413 gdbarch->skip_permanent_breakpoint = default_skip_permanent_breakpoint;
414 gdbarch->displaced_step_hw_singlestep = default_displaced_step_hw_singlestep;
415 gdbarch->displaced_step_fixup = NULL;
416 gdbarch->displaced_step_free_closure = NULL;
417 gdbarch->displaced_step_location = NULL;
418 gdbarch->relocate_instruction = NULL;
419 gdbarch->has_shared_address_space = default_has_shared_address_space;
420 gdbarch->fast_tracepoint_valid_at = default_fast_tracepoint_valid_at;
421 gdbarch->auto_charset = default_auto_charset;
422 gdbarch->auto_wide_charset = default_auto_wide_charset;
423 gdbarch->gen_return_address = default_gen_return_address;
424 gdbarch->iterate_over_objfiles_in_search_order = default_iterate_over_objfiles_in_search_order;
425 gdbarch->ravenscar_ops = NULL;
426 gdbarch->insn_is_call = default_insn_is_call;
427 gdbarch->insn_is_ret = default_insn_is_ret;
428 gdbarch->insn_is_jump = default_insn_is_jump;
429 gdbarch->vsyscall_range = default_vsyscall_range;
430 gdbarch->infcall_mmap = default_infcall_mmap;
431 gdbarch->infcall_munmap = default_infcall_munmap;
432 gdbarch->gcc_target_options = default_gcc_target_options;
433 gdbarch->gnu_triplet_regexp = default_gnu_triplet_regexp;
434 gdbarch->addressable_memory_unit_size = default_addressable_memory_unit_size;
435 /* gdbarch_alloc() */
441 /* Allocate extra space using the per-architecture obstack. */
444 gdbarch_obstack_zalloc (struct gdbarch *arch, long size)
446 void *data = obstack_alloc (arch->obstack, size);
448 memset (data, 0, size);
453 /* Free a gdbarch struct. This should never happen in normal
454 operation --- once you've created a gdbarch, you keep it around.
455 However, if an architecture's init function encounters an error
456 building the structure, it may need to clean up a partially
457 constructed gdbarch. */
460 gdbarch_free (struct gdbarch *arch)
462 struct obstack *obstack;
464 gdb_assert (arch != NULL);
465 gdb_assert (!arch->initialized_p);
466 obstack = arch->obstack;
467 obstack_free (obstack, 0); /* Includes the ARCH. */
472 /* Ensure that all values in a GDBARCH are reasonable. */
475 verify_gdbarch (struct gdbarch *gdbarch)
478 struct cleanup *cleanups;
482 log = mem_fileopen ();
483 cleanups = make_cleanup_ui_file_delete (log);
485 if (gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
486 fprintf_unfiltered (log, "\n\tbyte-order");
487 if (gdbarch->bfd_arch_info == NULL)
488 fprintf_unfiltered (log, "\n\tbfd_arch_info");
489 /* Check those that need to be defined for the given multi-arch level. */
490 /* Skip verify of bits_big_endian, invalid_p == 0 */
491 /* Skip verify of short_bit, invalid_p == 0 */
492 /* Skip verify of int_bit, invalid_p == 0 */
493 /* Skip verify of long_bit, invalid_p == 0 */
494 /* Skip verify of long_long_bit, invalid_p == 0 */
495 /* Skip verify of long_long_align_bit, invalid_p == 0 */
496 /* Skip verify of half_bit, invalid_p == 0 */
497 if (gdbarch->half_format == 0)
498 gdbarch->half_format = floatformats_ieee_half;
499 /* Skip verify of float_bit, invalid_p == 0 */
500 if (gdbarch->float_format == 0)
501 gdbarch->float_format = floatformats_ieee_single;
502 /* Skip verify of double_bit, invalid_p == 0 */
503 if (gdbarch->double_format == 0)
504 gdbarch->double_format = floatformats_ieee_double;
505 /* Skip verify of long_double_bit, invalid_p == 0 */
506 if (gdbarch->long_double_format == 0)
507 gdbarch->long_double_format = floatformats_ieee_double;
508 /* Skip verify of ptr_bit, invalid_p == 0 */
509 if (gdbarch->addr_bit == 0)
510 gdbarch->addr_bit = gdbarch_ptr_bit (gdbarch);
511 if (gdbarch->dwarf2_addr_size == 0)
512 gdbarch->dwarf2_addr_size = gdbarch_ptr_bit (gdbarch) / TARGET_CHAR_BIT;
513 if (gdbarch->char_signed == -1)
514 gdbarch->char_signed = 1;
515 /* Skip verify of read_pc, has predicate. */
516 /* Skip verify of write_pc, has predicate. */
517 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
518 /* Skip verify of pseudo_register_read, has predicate. */
519 /* Skip verify of pseudo_register_read_value, has predicate. */
520 /* Skip verify of pseudo_register_write, has predicate. */
521 if (gdbarch->num_regs == -1)
522 fprintf_unfiltered (log, "\n\tnum_regs");
523 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
524 /* Skip verify of ax_pseudo_register_collect, has predicate. */
525 /* Skip verify of ax_pseudo_register_push_stack, has predicate. */
526 /* Skip verify of sp_regnum, invalid_p == 0 */
527 /* Skip verify of pc_regnum, invalid_p == 0 */
528 /* Skip verify of ps_regnum, invalid_p == 0 */
529 /* Skip verify of fp0_regnum, invalid_p == 0 */
530 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
531 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
532 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
533 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
534 if (gdbarch->register_name == 0)
535 fprintf_unfiltered (log, "\n\tregister_name");
536 /* Skip verify of register_type, has predicate. */
537 /* Skip verify of dummy_id, has predicate. */
538 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
539 /* Skip verify of push_dummy_call, has predicate. */
540 /* Skip verify of call_dummy_location, invalid_p == 0 */
541 /* Skip verify of push_dummy_code, has predicate. */
542 /* Skip verify of print_registers_info, invalid_p == 0 */
543 /* Skip verify of print_float_info, invalid_p == 0 */
544 /* Skip verify of print_vector_info, has predicate. */
545 /* Skip verify of register_sim_regno, invalid_p == 0 */
546 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
547 /* Skip verify of cannot_store_register, invalid_p == 0 */
548 /* Skip verify of get_longjmp_target, has predicate. */
549 /* Skip verify of convert_register_p, invalid_p == 0 */
550 /* Skip verify of value_from_register, invalid_p == 0 */
551 /* Skip verify of pointer_to_address, invalid_p == 0 */
552 /* Skip verify of address_to_pointer, invalid_p == 0 */
553 /* Skip verify of integer_to_address, has predicate. */
554 /* Skip verify of return_value, has predicate. */
555 /* Skip verify of return_in_first_hidden_param_p, invalid_p == 0 */
556 if (gdbarch->skip_prologue == 0)
557 fprintf_unfiltered (log, "\n\tskip_prologue");
558 /* Skip verify of skip_main_prologue, has predicate. */
559 /* Skip verify of skip_entrypoint, has predicate. */
560 if (gdbarch->inner_than == 0)
561 fprintf_unfiltered (log, "\n\tinner_than");
562 if (gdbarch->breakpoint_from_pc == 0)
563 fprintf_unfiltered (log, "\n\tbreakpoint_from_pc");
564 /* Skip verify of remote_breakpoint_from_pc, invalid_p == 0 */
565 /* Skip verify of adjust_breakpoint_address, has predicate. */
566 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
567 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
568 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
569 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
570 /* Skip verify of remote_register_number, invalid_p == 0 */
571 /* Skip verify of fetch_tls_load_module_address, has predicate. */
572 /* Skip verify of frame_args_skip, invalid_p == 0 */
573 /* Skip verify of unwind_pc, has predicate. */
574 /* Skip verify of unwind_sp, has predicate. */
575 /* Skip verify of frame_num_args, has predicate. */
576 /* Skip verify of frame_align, has predicate. */
577 /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
578 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
579 /* Skip verify of addr_bits_remove, invalid_p == 0 */
580 /* Skip verify of software_single_step, has predicate. */
581 /* Skip verify of single_step_through_delay, has predicate. */
582 if (gdbarch->print_insn == 0)
583 fprintf_unfiltered (log, "\n\tprint_insn");
584 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
585 /* Skip verify of skip_solib_resolver, invalid_p == 0 */
586 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
587 /* Skip verify of stack_frame_destroyed_p, invalid_p == 0 */
588 /* Skip verify of elf_make_msymbol_special, has predicate. */
589 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
590 /* Skip verify of make_symbol_special, invalid_p == 0 */
591 /* Skip verify of adjust_dwarf2_addr, invalid_p == 0 */
592 /* Skip verify of adjust_dwarf2_line, invalid_p == 0 */
593 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
594 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
595 /* Skip verify of address_class_type_flags, has predicate. */
596 /* Skip verify of address_class_type_flags_to_name, has predicate. */
597 /* Skip verify of address_class_name_to_type_flags, has predicate. */
598 /* Skip verify of register_reggroup_p, invalid_p == 0 */
599 /* Skip verify of fetch_pointer_argument, has predicate. */
600 /* Skip verify of iterate_over_regset_sections, has predicate. */
601 /* Skip verify of make_corefile_notes, has predicate. */
602 /* Skip verify of elfcore_write_linux_prpsinfo, has predicate. */
603 /* Skip verify of find_memory_regions, has predicate. */
604 /* Skip verify of core_xfer_shared_libraries, has predicate. */
605 /* Skip verify of core_xfer_shared_libraries_aix, has predicate. */
606 /* Skip verify of core_pid_to_str, has predicate. */
607 /* Skip verify of gcore_bfd_target, has predicate. */
608 /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
609 /* Skip verify of vbit_in_delta, invalid_p == 0 */
610 /* Skip verify of skip_permanent_breakpoint, invalid_p == 0 */
611 /* Skip verify of max_insn_length, has predicate. */
612 /* Skip verify of displaced_step_copy_insn, has predicate. */
613 /* Skip verify of displaced_step_hw_singlestep, invalid_p == 0 */
614 /* Skip verify of displaced_step_fixup, has predicate. */
615 if ((! gdbarch->displaced_step_free_closure) != (! gdbarch->displaced_step_copy_insn))
616 fprintf_unfiltered (log, "\n\tdisplaced_step_free_closure");
617 if ((! gdbarch->displaced_step_location) != (! gdbarch->displaced_step_copy_insn))
618 fprintf_unfiltered (log, "\n\tdisplaced_step_location");
619 /* Skip verify of relocate_instruction, has predicate. */
620 /* Skip verify of overlay_update, has predicate. */
621 /* Skip verify of core_read_description, has predicate. */
622 /* Skip verify of static_transform_name, has predicate. */
623 /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
624 /* Skip verify of process_record, has predicate. */
625 /* Skip verify of process_record_signal, has predicate. */
626 /* Skip verify of gdb_signal_from_target, has predicate. */
627 /* Skip verify of gdb_signal_to_target, has predicate. */
628 /* Skip verify of get_siginfo_type, has predicate. */
629 /* Skip verify of record_special_symbol, has predicate. */
630 /* Skip verify of get_syscall_number, has predicate. */
631 /* Skip verify of xml_syscall_file, invalid_p == 0 */
632 /* Skip verify of syscalls_info, invalid_p == 0 */
633 /* Skip verify of stap_integer_prefixes, invalid_p == 0 */
634 /* Skip verify of stap_integer_suffixes, invalid_p == 0 */
635 /* Skip verify of stap_register_prefixes, invalid_p == 0 */
636 /* Skip verify of stap_register_suffixes, invalid_p == 0 */
637 /* Skip verify of stap_register_indirection_prefixes, invalid_p == 0 */
638 /* Skip verify of stap_register_indirection_suffixes, invalid_p == 0 */
639 /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */
640 /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */
641 /* Skip verify of stap_is_single_operand, has predicate. */
642 /* Skip verify of stap_parse_special_token, has predicate. */
643 /* Skip verify of dtrace_parse_probe_argument, has predicate. */
644 /* Skip verify of dtrace_probe_is_enabled, has predicate. */
645 /* Skip verify of dtrace_enable_probe, has predicate. */
646 /* Skip verify of dtrace_disable_probe, has predicate. */
647 /* Skip verify of has_global_solist, invalid_p == 0 */
648 /* Skip verify of has_global_breakpoints, invalid_p == 0 */
649 /* Skip verify of has_shared_address_space, invalid_p == 0 */
650 /* Skip verify of fast_tracepoint_valid_at, invalid_p == 0 */
651 /* Skip verify of auto_charset, invalid_p == 0 */
652 /* Skip verify of auto_wide_charset, invalid_p == 0 */
653 /* Skip verify of has_dos_based_file_system, invalid_p == 0 */
654 /* Skip verify of gen_return_address, invalid_p == 0 */
655 /* Skip verify of info_proc, has predicate. */
656 /* Skip verify of core_info_proc, has predicate. */
657 /* Skip verify of iterate_over_objfiles_in_search_order, invalid_p == 0 */
658 /* Skip verify of ravenscar_ops, invalid_p == 0 */
659 /* Skip verify of insn_is_call, invalid_p == 0 */
660 /* Skip verify of insn_is_ret, invalid_p == 0 */
661 /* Skip verify of insn_is_jump, invalid_p == 0 */
662 /* Skip verify of auxv_parse, has predicate. */
663 /* Skip verify of vsyscall_range, invalid_p == 0 */
664 /* Skip verify of infcall_mmap, invalid_p == 0 */
665 /* Skip verify of infcall_munmap, invalid_p == 0 */
666 /* Skip verify of gcc_target_options, invalid_p == 0 */
667 /* Skip verify of gnu_triplet_regexp, invalid_p == 0 */
668 /* Skip verify of addressable_memory_unit_size, invalid_p == 0 */
669 buf = ui_file_xstrdup (log, &length);
670 make_cleanup (xfree, buf);
672 internal_error (__FILE__, __LINE__,
673 _("verify_gdbarch: the following are invalid ...%s"),
675 do_cleanups (cleanups);
679 /* Print out the details of the current architecture. */
682 gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
684 const char *gdb_nm_file = "<not-defined>";
686 #if defined (GDB_NM_FILE)
687 gdb_nm_file = GDB_NM_FILE;
689 fprintf_unfiltered (file,
690 "gdbarch_dump: GDB_NM_FILE = %s\n",
692 fprintf_unfiltered (file,
693 "gdbarch_dump: addr_bit = %s\n",
694 plongest (gdbarch->addr_bit));
695 fprintf_unfiltered (file,
696 "gdbarch_dump: addr_bits_remove = <%s>\n",
697 host_address_to_string (gdbarch->addr_bits_remove));
698 fprintf_unfiltered (file,
699 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
700 gdbarch_address_class_name_to_type_flags_p (gdbarch));
701 fprintf_unfiltered (file,
702 "gdbarch_dump: address_class_name_to_type_flags = <%s>\n",
703 host_address_to_string (gdbarch->address_class_name_to_type_flags));
704 fprintf_unfiltered (file,
705 "gdbarch_dump: gdbarch_address_class_type_flags_p() = %d\n",
706 gdbarch_address_class_type_flags_p (gdbarch));
707 fprintf_unfiltered (file,
708 "gdbarch_dump: address_class_type_flags = <%s>\n",
709 host_address_to_string (gdbarch->address_class_type_flags));
710 fprintf_unfiltered (file,
711 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
712 gdbarch_address_class_type_flags_to_name_p (gdbarch));
713 fprintf_unfiltered (file,
714 "gdbarch_dump: address_class_type_flags_to_name = <%s>\n",
715 host_address_to_string (gdbarch->address_class_type_flags_to_name));
716 fprintf_unfiltered (file,
717 "gdbarch_dump: address_to_pointer = <%s>\n",
718 host_address_to_string (gdbarch->address_to_pointer));
719 fprintf_unfiltered (file,
720 "gdbarch_dump: addressable_memory_unit_size = <%s>\n",
721 host_address_to_string (gdbarch->addressable_memory_unit_size));
722 fprintf_unfiltered (file,
723 "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n",
724 gdbarch_adjust_breakpoint_address_p (gdbarch));
725 fprintf_unfiltered (file,
726 "gdbarch_dump: adjust_breakpoint_address = <%s>\n",
727 host_address_to_string (gdbarch->adjust_breakpoint_address));
728 fprintf_unfiltered (file,
729 "gdbarch_dump: adjust_dwarf2_addr = <%s>\n",
730 host_address_to_string (gdbarch->adjust_dwarf2_addr));
731 fprintf_unfiltered (file,
732 "gdbarch_dump: adjust_dwarf2_line = <%s>\n",
733 host_address_to_string (gdbarch->adjust_dwarf2_line));
734 fprintf_unfiltered (file,
735 "gdbarch_dump: auto_charset = <%s>\n",
736 host_address_to_string (gdbarch->auto_charset));
737 fprintf_unfiltered (file,
738 "gdbarch_dump: auto_wide_charset = <%s>\n",
739 host_address_to_string (gdbarch->auto_wide_charset));
740 fprintf_unfiltered (file,
741 "gdbarch_dump: gdbarch_auxv_parse_p() = %d\n",
742 gdbarch_auxv_parse_p (gdbarch));
743 fprintf_unfiltered (file,
744 "gdbarch_dump: auxv_parse = <%s>\n",
745 host_address_to_string (gdbarch->auxv_parse));
746 fprintf_unfiltered (file,
747 "gdbarch_dump: gdbarch_ax_pseudo_register_collect_p() = %d\n",
748 gdbarch_ax_pseudo_register_collect_p (gdbarch));
749 fprintf_unfiltered (file,
750 "gdbarch_dump: ax_pseudo_register_collect = <%s>\n",
751 host_address_to_string (gdbarch->ax_pseudo_register_collect));
752 fprintf_unfiltered (file,
753 "gdbarch_dump: gdbarch_ax_pseudo_register_push_stack_p() = %d\n",
754 gdbarch_ax_pseudo_register_push_stack_p (gdbarch));
755 fprintf_unfiltered (file,
756 "gdbarch_dump: ax_pseudo_register_push_stack = <%s>\n",
757 host_address_to_string (gdbarch->ax_pseudo_register_push_stack));
758 fprintf_unfiltered (file,
759 "gdbarch_dump: believe_pcc_promotion = %s\n",
760 plongest (gdbarch->believe_pcc_promotion));
761 fprintf_unfiltered (file,
762 "gdbarch_dump: bfd_arch_info = %s\n",
763 gdbarch_bfd_arch_info (gdbarch)->printable_name);
764 fprintf_unfiltered (file,
765 "gdbarch_dump: bits_big_endian = %s\n",
766 plongest (gdbarch->bits_big_endian));
767 fprintf_unfiltered (file,
768 "gdbarch_dump: breakpoint_from_pc = <%s>\n",
769 host_address_to_string (gdbarch->breakpoint_from_pc));
770 fprintf_unfiltered (file,
771 "gdbarch_dump: byte_order = %s\n",
772 plongest (gdbarch->byte_order));
773 fprintf_unfiltered (file,
774 "gdbarch_dump: byte_order_for_code = %s\n",
775 plongest (gdbarch->byte_order_for_code));
776 fprintf_unfiltered (file,
777 "gdbarch_dump: call_dummy_location = %s\n",
778 plongest (gdbarch->call_dummy_location));
779 fprintf_unfiltered (file,
780 "gdbarch_dump: cannot_fetch_register = <%s>\n",
781 host_address_to_string (gdbarch->cannot_fetch_register));
782 fprintf_unfiltered (file,
783 "gdbarch_dump: cannot_step_breakpoint = %s\n",
784 plongest (gdbarch->cannot_step_breakpoint));
785 fprintf_unfiltered (file,
786 "gdbarch_dump: cannot_store_register = <%s>\n",
787 host_address_to_string (gdbarch->cannot_store_register));
788 fprintf_unfiltered (file,
789 "gdbarch_dump: char_signed = %s\n",
790 plongest (gdbarch->char_signed));
791 fprintf_unfiltered (file,
792 "gdbarch_dump: coff_make_msymbol_special = <%s>\n",
793 host_address_to_string (gdbarch->coff_make_msymbol_special));
794 fprintf_unfiltered (file,
795 "gdbarch_dump: convert_from_func_ptr_addr = <%s>\n",
796 host_address_to_string (gdbarch->convert_from_func_ptr_addr));
797 fprintf_unfiltered (file,
798 "gdbarch_dump: convert_register_p = <%s>\n",
799 host_address_to_string (gdbarch->convert_register_p));
800 fprintf_unfiltered (file,
801 "gdbarch_dump: gdbarch_core_info_proc_p() = %d\n",
802 gdbarch_core_info_proc_p (gdbarch));
803 fprintf_unfiltered (file,
804 "gdbarch_dump: core_info_proc = <%s>\n",
805 host_address_to_string (gdbarch->core_info_proc));
806 fprintf_unfiltered (file,
807 "gdbarch_dump: gdbarch_core_pid_to_str_p() = %d\n",
808 gdbarch_core_pid_to_str_p (gdbarch));
809 fprintf_unfiltered (file,
810 "gdbarch_dump: core_pid_to_str = <%s>\n",
811 host_address_to_string (gdbarch->core_pid_to_str));
812 fprintf_unfiltered (file,
813 "gdbarch_dump: gdbarch_core_read_description_p() = %d\n",
814 gdbarch_core_read_description_p (gdbarch));
815 fprintf_unfiltered (file,
816 "gdbarch_dump: core_read_description = <%s>\n",
817 host_address_to_string (gdbarch->core_read_description));
818 fprintf_unfiltered (file,
819 "gdbarch_dump: gdbarch_core_xfer_shared_libraries_p() = %d\n",
820 gdbarch_core_xfer_shared_libraries_p (gdbarch));
821 fprintf_unfiltered (file,
822 "gdbarch_dump: core_xfer_shared_libraries = <%s>\n",
823 host_address_to_string (gdbarch->core_xfer_shared_libraries));
824 fprintf_unfiltered (file,
825 "gdbarch_dump: gdbarch_core_xfer_shared_libraries_aix_p() = %d\n",
826 gdbarch_core_xfer_shared_libraries_aix_p (gdbarch));
827 fprintf_unfiltered (file,
828 "gdbarch_dump: core_xfer_shared_libraries_aix = <%s>\n",
829 host_address_to_string (gdbarch->core_xfer_shared_libraries_aix));
830 fprintf_unfiltered (file,
831 "gdbarch_dump: decr_pc_after_break = %s\n",
832 core_addr_to_string_nz (gdbarch->decr_pc_after_break));
833 fprintf_unfiltered (file,
834 "gdbarch_dump: deprecated_fp_regnum = %s\n",
835 plongest (gdbarch->deprecated_fp_regnum));
836 fprintf_unfiltered (file,
837 "gdbarch_dump: deprecated_function_start_offset = %s\n",
838 core_addr_to_string_nz (gdbarch->deprecated_function_start_offset));
839 fprintf_unfiltered (file,
840 "gdbarch_dump: gdbarch_displaced_step_copy_insn_p() = %d\n",
841 gdbarch_displaced_step_copy_insn_p (gdbarch));
842 fprintf_unfiltered (file,
843 "gdbarch_dump: displaced_step_copy_insn = <%s>\n",
844 host_address_to_string (gdbarch->displaced_step_copy_insn));
845 fprintf_unfiltered (file,
846 "gdbarch_dump: gdbarch_displaced_step_fixup_p() = %d\n",
847 gdbarch_displaced_step_fixup_p (gdbarch));
848 fprintf_unfiltered (file,
849 "gdbarch_dump: displaced_step_fixup = <%s>\n",
850 host_address_to_string (gdbarch->displaced_step_fixup));
851 fprintf_unfiltered (file,
852 "gdbarch_dump: displaced_step_free_closure = <%s>\n",
853 host_address_to_string (gdbarch->displaced_step_free_closure));
854 fprintf_unfiltered (file,
855 "gdbarch_dump: displaced_step_hw_singlestep = <%s>\n",
856 host_address_to_string (gdbarch->displaced_step_hw_singlestep));
857 fprintf_unfiltered (file,
858 "gdbarch_dump: displaced_step_location = <%s>\n",
859 host_address_to_string (gdbarch->displaced_step_location));
860 fprintf_unfiltered (file,
861 "gdbarch_dump: double_bit = %s\n",
862 plongest (gdbarch->double_bit));
863 fprintf_unfiltered (file,
864 "gdbarch_dump: double_format = %s\n",
865 pformat (gdbarch->double_format));
866 fprintf_unfiltered (file,
867 "gdbarch_dump: gdbarch_dtrace_disable_probe_p() = %d\n",
868 gdbarch_dtrace_disable_probe_p (gdbarch));
869 fprintf_unfiltered (file,
870 "gdbarch_dump: dtrace_disable_probe = <%s>\n",
871 host_address_to_string (gdbarch->dtrace_disable_probe));
872 fprintf_unfiltered (file,
873 "gdbarch_dump: gdbarch_dtrace_enable_probe_p() = %d\n",
874 gdbarch_dtrace_enable_probe_p (gdbarch));
875 fprintf_unfiltered (file,
876 "gdbarch_dump: dtrace_enable_probe = <%s>\n",
877 host_address_to_string (gdbarch->dtrace_enable_probe));
878 fprintf_unfiltered (file,
879 "gdbarch_dump: gdbarch_dtrace_parse_probe_argument_p() = %d\n",
880 gdbarch_dtrace_parse_probe_argument_p (gdbarch));
881 fprintf_unfiltered (file,
882 "gdbarch_dump: dtrace_parse_probe_argument = <%s>\n",
883 host_address_to_string (gdbarch->dtrace_parse_probe_argument));
884 fprintf_unfiltered (file,
885 "gdbarch_dump: gdbarch_dtrace_probe_is_enabled_p() = %d\n",
886 gdbarch_dtrace_probe_is_enabled_p (gdbarch));
887 fprintf_unfiltered (file,
888 "gdbarch_dump: dtrace_probe_is_enabled = <%s>\n",
889 host_address_to_string (gdbarch->dtrace_probe_is_enabled));
890 fprintf_unfiltered (file,
891 "gdbarch_dump: gdbarch_dummy_id_p() = %d\n",
892 gdbarch_dummy_id_p (gdbarch));
893 fprintf_unfiltered (file,
894 "gdbarch_dump: dummy_id = <%s>\n",
895 host_address_to_string (gdbarch->dummy_id));
896 fprintf_unfiltered (file,
897 "gdbarch_dump: dwarf2_addr_size = %s\n",
898 plongest (gdbarch->dwarf2_addr_size));
899 fprintf_unfiltered (file,
900 "gdbarch_dump: dwarf2_reg_to_regnum = <%s>\n",
901 host_address_to_string (gdbarch->dwarf2_reg_to_regnum));
902 fprintf_unfiltered (file,
903 "gdbarch_dump: ecoff_reg_to_regnum = <%s>\n",
904 host_address_to_string (gdbarch->ecoff_reg_to_regnum));
905 fprintf_unfiltered (file,
906 "gdbarch_dump: gdbarch_elf_make_msymbol_special_p() = %d\n",
907 gdbarch_elf_make_msymbol_special_p (gdbarch));
908 fprintf_unfiltered (file,
909 "gdbarch_dump: elf_make_msymbol_special = <%s>\n",
910 host_address_to_string (gdbarch->elf_make_msymbol_special));
911 fprintf_unfiltered (file,
912 "gdbarch_dump: gdbarch_elfcore_write_linux_prpsinfo_p() = %d\n",
913 gdbarch_elfcore_write_linux_prpsinfo_p (gdbarch));
914 fprintf_unfiltered (file,
915 "gdbarch_dump: elfcore_write_linux_prpsinfo = <%s>\n",
916 host_address_to_string (gdbarch->elfcore_write_linux_prpsinfo));
917 fprintf_unfiltered (file,
918 "gdbarch_dump: fast_tracepoint_valid_at = <%s>\n",
919 host_address_to_string (gdbarch->fast_tracepoint_valid_at));
920 fprintf_unfiltered (file,
921 "gdbarch_dump: gdbarch_fetch_pointer_argument_p() = %d\n",
922 gdbarch_fetch_pointer_argument_p (gdbarch));
923 fprintf_unfiltered (file,
924 "gdbarch_dump: fetch_pointer_argument = <%s>\n",
925 host_address_to_string (gdbarch->fetch_pointer_argument));
926 fprintf_unfiltered (file,
927 "gdbarch_dump: gdbarch_fetch_tls_load_module_address_p() = %d\n",
928 gdbarch_fetch_tls_load_module_address_p (gdbarch));
929 fprintf_unfiltered (file,
930 "gdbarch_dump: fetch_tls_load_module_address = <%s>\n",
931 host_address_to_string (gdbarch->fetch_tls_load_module_address));
932 fprintf_unfiltered (file,
933 "gdbarch_dump: gdbarch_find_memory_regions_p() = %d\n",
934 gdbarch_find_memory_regions_p (gdbarch));
935 fprintf_unfiltered (file,
936 "gdbarch_dump: find_memory_regions = <%s>\n",
937 host_address_to_string (gdbarch->find_memory_regions));
938 fprintf_unfiltered (file,
939 "gdbarch_dump: float_bit = %s\n",
940 plongest (gdbarch->float_bit));
941 fprintf_unfiltered (file,
942 "gdbarch_dump: float_format = %s\n",
943 pformat (gdbarch->float_format));
944 fprintf_unfiltered (file,
945 "gdbarch_dump: fp0_regnum = %s\n",
946 plongest (gdbarch->fp0_regnum));
947 fprintf_unfiltered (file,
948 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
949 gdbarch_frame_align_p (gdbarch));
950 fprintf_unfiltered (file,
951 "gdbarch_dump: frame_align = <%s>\n",
952 host_address_to_string (gdbarch->frame_align));
953 fprintf_unfiltered (file,
954 "gdbarch_dump: frame_args_skip = %s\n",
955 core_addr_to_string_nz (gdbarch->frame_args_skip));
956 fprintf_unfiltered (file,
957 "gdbarch_dump: gdbarch_frame_num_args_p() = %d\n",
958 gdbarch_frame_num_args_p (gdbarch));
959 fprintf_unfiltered (file,
960 "gdbarch_dump: frame_num_args = <%s>\n",
961 host_address_to_string (gdbarch->frame_num_args));
962 fprintf_unfiltered (file,
963 "gdbarch_dump: frame_red_zone_size = %s\n",
964 plongest (gdbarch->frame_red_zone_size));
965 fprintf_unfiltered (file,
966 "gdbarch_dump: gcc_target_options = <%s>\n",
967 host_address_to_string (gdbarch->gcc_target_options));
968 fprintf_unfiltered (file,
969 "gdbarch_dump: gdbarch_gcore_bfd_target_p() = %d\n",
970 gdbarch_gcore_bfd_target_p (gdbarch));
971 fprintf_unfiltered (file,
972 "gdbarch_dump: gcore_bfd_target = %s\n",
973 pstring (gdbarch->gcore_bfd_target));
974 fprintf_unfiltered (file,
975 "gdbarch_dump: gdbarch_gdb_signal_from_target_p() = %d\n",
976 gdbarch_gdb_signal_from_target_p (gdbarch));
977 fprintf_unfiltered (file,
978 "gdbarch_dump: gdb_signal_from_target = <%s>\n",
979 host_address_to_string (gdbarch->gdb_signal_from_target));
980 fprintf_unfiltered (file,
981 "gdbarch_dump: gdbarch_gdb_signal_to_target_p() = %d\n",
982 gdbarch_gdb_signal_to_target_p (gdbarch));
983 fprintf_unfiltered (file,
984 "gdbarch_dump: gdb_signal_to_target = <%s>\n",
985 host_address_to_string (gdbarch->gdb_signal_to_target));
986 fprintf_unfiltered (file,
987 "gdbarch_dump: gen_return_address = <%s>\n",
988 host_address_to_string (gdbarch->gen_return_address));
989 fprintf_unfiltered (file,
990 "gdbarch_dump: gdbarch_get_longjmp_target_p() = %d\n",
991 gdbarch_get_longjmp_target_p (gdbarch));
992 fprintf_unfiltered (file,
993 "gdbarch_dump: get_longjmp_target = <%s>\n",
994 host_address_to_string (gdbarch->get_longjmp_target));
995 fprintf_unfiltered (file,
996 "gdbarch_dump: gdbarch_get_siginfo_type_p() = %d\n",
997 gdbarch_get_siginfo_type_p (gdbarch));
998 fprintf_unfiltered (file,
999 "gdbarch_dump: get_siginfo_type = <%s>\n",
1000 host_address_to_string (gdbarch->get_siginfo_type));
1001 fprintf_unfiltered (file,
1002 "gdbarch_dump: gdbarch_get_syscall_number_p() = %d\n",
1003 gdbarch_get_syscall_number_p (gdbarch));
1004 fprintf_unfiltered (file,
1005 "gdbarch_dump: get_syscall_number = <%s>\n",
1006 host_address_to_string (gdbarch->get_syscall_number));
1007 fprintf_unfiltered (file,
1008 "gdbarch_dump: gnu_triplet_regexp = <%s>\n",
1009 host_address_to_string (gdbarch->gnu_triplet_regexp));
1010 fprintf_unfiltered (file,
1011 "gdbarch_dump: half_bit = %s\n",
1012 plongest (gdbarch->half_bit));
1013 fprintf_unfiltered (file,
1014 "gdbarch_dump: half_format = %s\n",
1015 pformat (gdbarch->half_format));
1016 fprintf_unfiltered (file,
1017 "gdbarch_dump: has_dos_based_file_system = %s\n",
1018 plongest (gdbarch->has_dos_based_file_system));
1019 fprintf_unfiltered (file,
1020 "gdbarch_dump: has_global_breakpoints = %s\n",
1021 plongest (gdbarch->has_global_breakpoints));
1022 fprintf_unfiltered (file,
1023 "gdbarch_dump: has_global_solist = %s\n",
1024 plongest (gdbarch->has_global_solist));
1025 fprintf_unfiltered (file,
1026 "gdbarch_dump: has_shared_address_space = <%s>\n",
1027 host_address_to_string (gdbarch->has_shared_address_space));
1028 fprintf_unfiltered (file,
1029 "gdbarch_dump: have_nonsteppable_watchpoint = %s\n",
1030 plongest (gdbarch->have_nonsteppable_watchpoint));
1031 fprintf_unfiltered (file,
1032 "gdbarch_dump: in_solib_return_trampoline = <%s>\n",
1033 host_address_to_string (gdbarch->in_solib_return_trampoline));
1034 fprintf_unfiltered (file,
1035 "gdbarch_dump: infcall_mmap = <%s>\n",
1036 host_address_to_string (gdbarch->infcall_mmap));
1037 fprintf_unfiltered (file,
1038 "gdbarch_dump: infcall_munmap = <%s>\n",
1039 host_address_to_string (gdbarch->infcall_munmap));
1040 fprintf_unfiltered (file,
1041 "gdbarch_dump: gdbarch_info_proc_p() = %d\n",
1042 gdbarch_info_proc_p (gdbarch));
1043 fprintf_unfiltered (file,
1044 "gdbarch_dump: info_proc = <%s>\n",
1045 host_address_to_string (gdbarch->info_proc));
1046 fprintf_unfiltered (file,
1047 "gdbarch_dump: inner_than = <%s>\n",
1048 host_address_to_string (gdbarch->inner_than));
1049 fprintf_unfiltered (file,
1050 "gdbarch_dump: insn_is_call = <%s>\n",
1051 host_address_to_string (gdbarch->insn_is_call));
1052 fprintf_unfiltered (file,
1053 "gdbarch_dump: insn_is_jump = <%s>\n",
1054 host_address_to_string (gdbarch->insn_is_jump));
1055 fprintf_unfiltered (file,
1056 "gdbarch_dump: insn_is_ret = <%s>\n",
1057 host_address_to_string (gdbarch->insn_is_ret));
1058 fprintf_unfiltered (file,
1059 "gdbarch_dump: int_bit = %s\n",
1060 plongest (gdbarch->int_bit));
1061 fprintf_unfiltered (file,
1062 "gdbarch_dump: gdbarch_integer_to_address_p() = %d\n",
1063 gdbarch_integer_to_address_p (gdbarch));
1064 fprintf_unfiltered (file,
1065 "gdbarch_dump: integer_to_address = <%s>\n",
1066 host_address_to_string (gdbarch->integer_to_address));
1067 fprintf_unfiltered (file,
1068 "gdbarch_dump: iterate_over_objfiles_in_search_order = <%s>\n",
1069 host_address_to_string (gdbarch->iterate_over_objfiles_in_search_order));
1070 fprintf_unfiltered (file,
1071 "gdbarch_dump: gdbarch_iterate_over_regset_sections_p() = %d\n",
1072 gdbarch_iterate_over_regset_sections_p (gdbarch));
1073 fprintf_unfiltered (file,
1074 "gdbarch_dump: iterate_over_regset_sections = <%s>\n",
1075 host_address_to_string (gdbarch->iterate_over_regset_sections));
1076 fprintf_unfiltered (file,
1077 "gdbarch_dump: long_bit = %s\n",
1078 plongest (gdbarch->long_bit));
1079 fprintf_unfiltered (file,
1080 "gdbarch_dump: long_double_bit = %s\n",
1081 plongest (gdbarch->long_double_bit));
1082 fprintf_unfiltered (file,
1083 "gdbarch_dump: long_double_format = %s\n",
1084 pformat (gdbarch->long_double_format));
1085 fprintf_unfiltered (file,
1086 "gdbarch_dump: long_long_align_bit = %s\n",
1087 plongest (gdbarch->long_long_align_bit));
1088 fprintf_unfiltered (file,
1089 "gdbarch_dump: long_long_bit = %s\n",
1090 plongest (gdbarch->long_long_bit));
1091 fprintf_unfiltered (file,
1092 "gdbarch_dump: gdbarch_make_corefile_notes_p() = %d\n",
1093 gdbarch_make_corefile_notes_p (gdbarch));
1094 fprintf_unfiltered (file,
1095 "gdbarch_dump: make_corefile_notes = <%s>\n",
1096 host_address_to_string (gdbarch->make_corefile_notes));
1097 fprintf_unfiltered (file,
1098 "gdbarch_dump: make_symbol_special = <%s>\n",
1099 host_address_to_string (gdbarch->make_symbol_special));
1100 fprintf_unfiltered (file,
1101 "gdbarch_dump: gdbarch_max_insn_length_p() = %d\n",
1102 gdbarch_max_insn_length_p (gdbarch));
1103 fprintf_unfiltered (file,
1104 "gdbarch_dump: max_insn_length = %s\n",
1105 plongest (gdbarch->max_insn_length));
1106 fprintf_unfiltered (file,
1107 "gdbarch_dump: memory_insert_breakpoint = <%s>\n",
1108 host_address_to_string (gdbarch->memory_insert_breakpoint));
1109 fprintf_unfiltered (file,
1110 "gdbarch_dump: memory_remove_breakpoint = <%s>\n",
1111 host_address_to_string (gdbarch->memory_remove_breakpoint));
1112 fprintf_unfiltered (file,
1113 "gdbarch_dump: num_pseudo_regs = %s\n",
1114 plongest (gdbarch->num_pseudo_regs));
1115 fprintf_unfiltered (file,
1116 "gdbarch_dump: num_regs = %s\n",
1117 plongest (gdbarch->num_regs));
1118 fprintf_unfiltered (file,
1119 "gdbarch_dump: osabi = %s\n",
1120 plongest (gdbarch->osabi));
1121 fprintf_unfiltered (file,
1122 "gdbarch_dump: gdbarch_overlay_update_p() = %d\n",
1123 gdbarch_overlay_update_p (gdbarch));
1124 fprintf_unfiltered (file,
1125 "gdbarch_dump: overlay_update = <%s>\n",
1126 host_address_to_string (gdbarch->overlay_update));
1127 fprintf_unfiltered (file,
1128 "gdbarch_dump: pc_regnum = %s\n",
1129 plongest (gdbarch->pc_regnum));
1130 fprintf_unfiltered (file,
1131 "gdbarch_dump: pointer_to_address = <%s>\n",
1132 host_address_to_string (gdbarch->pointer_to_address));
1133 fprintf_unfiltered (file,
1134 "gdbarch_dump: print_float_info = <%s>\n",
1135 host_address_to_string (gdbarch->print_float_info));
1136 fprintf_unfiltered (file,
1137 "gdbarch_dump: print_insn = <%s>\n",
1138 host_address_to_string (gdbarch->print_insn));
1139 fprintf_unfiltered (file,
1140 "gdbarch_dump: print_registers_info = <%s>\n",
1141 host_address_to_string (gdbarch->print_registers_info));
1142 fprintf_unfiltered (file,
1143 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1144 gdbarch_print_vector_info_p (gdbarch));
1145 fprintf_unfiltered (file,
1146 "gdbarch_dump: print_vector_info = <%s>\n",
1147 host_address_to_string (gdbarch->print_vector_info));
1148 fprintf_unfiltered (file,
1149 "gdbarch_dump: gdbarch_process_record_p() = %d\n",
1150 gdbarch_process_record_p (gdbarch));
1151 fprintf_unfiltered (file,
1152 "gdbarch_dump: process_record = <%s>\n",
1153 host_address_to_string (gdbarch->process_record));
1154 fprintf_unfiltered (file,
1155 "gdbarch_dump: gdbarch_process_record_signal_p() = %d\n",
1156 gdbarch_process_record_signal_p (gdbarch));
1157 fprintf_unfiltered (file,
1158 "gdbarch_dump: process_record_signal = <%s>\n",
1159 host_address_to_string (gdbarch->process_record_signal));
1160 fprintf_unfiltered (file,
1161 "gdbarch_dump: ps_regnum = %s\n",
1162 plongest (gdbarch->ps_regnum));
1163 fprintf_unfiltered (file,
1164 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
1165 gdbarch_pseudo_register_read_p (gdbarch));
1166 fprintf_unfiltered (file,
1167 "gdbarch_dump: pseudo_register_read = <%s>\n",
1168 host_address_to_string (gdbarch->pseudo_register_read));
1169 fprintf_unfiltered (file,
1170 "gdbarch_dump: gdbarch_pseudo_register_read_value_p() = %d\n",
1171 gdbarch_pseudo_register_read_value_p (gdbarch));
1172 fprintf_unfiltered (file,
1173 "gdbarch_dump: pseudo_register_read_value = <%s>\n",
1174 host_address_to_string (gdbarch->pseudo_register_read_value));
1175 fprintf_unfiltered (file,
1176 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
1177 gdbarch_pseudo_register_write_p (gdbarch));
1178 fprintf_unfiltered (file,
1179 "gdbarch_dump: pseudo_register_write = <%s>\n",
1180 host_address_to_string (gdbarch->pseudo_register_write));
1181 fprintf_unfiltered (file,
1182 "gdbarch_dump: ptr_bit = %s\n",
1183 plongest (gdbarch->ptr_bit));
1184 fprintf_unfiltered (file,
1185 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
1186 gdbarch_push_dummy_call_p (gdbarch));
1187 fprintf_unfiltered (file,
1188 "gdbarch_dump: push_dummy_call = <%s>\n",
1189 host_address_to_string (gdbarch->push_dummy_call));
1190 fprintf_unfiltered (file,
1191 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
1192 gdbarch_push_dummy_code_p (gdbarch));
1193 fprintf_unfiltered (file,
1194 "gdbarch_dump: push_dummy_code = <%s>\n",
1195 host_address_to_string (gdbarch->push_dummy_code));
1196 fprintf_unfiltered (file,
1197 "gdbarch_dump: ravenscar_ops = %s\n",
1198 host_address_to_string (gdbarch->ravenscar_ops));
1199 fprintf_unfiltered (file,
1200 "gdbarch_dump: gdbarch_read_pc_p() = %d\n",
1201 gdbarch_read_pc_p (gdbarch));
1202 fprintf_unfiltered (file,
1203 "gdbarch_dump: read_pc = <%s>\n",
1204 host_address_to_string (gdbarch->read_pc));
1205 fprintf_unfiltered (file,
1206 "gdbarch_dump: gdbarch_record_special_symbol_p() = %d\n",
1207 gdbarch_record_special_symbol_p (gdbarch));
1208 fprintf_unfiltered (file,
1209 "gdbarch_dump: record_special_symbol = <%s>\n",
1210 host_address_to_string (gdbarch->record_special_symbol));
1211 fprintf_unfiltered (file,
1212 "gdbarch_dump: register_name = <%s>\n",
1213 host_address_to_string (gdbarch->register_name));
1214 fprintf_unfiltered (file,
1215 "gdbarch_dump: register_reggroup_p = <%s>\n",
1216 host_address_to_string (gdbarch->register_reggroup_p));
1217 fprintf_unfiltered (file,
1218 "gdbarch_dump: register_sim_regno = <%s>\n",
1219 host_address_to_string (gdbarch->register_sim_regno));
1220 fprintf_unfiltered (file,
1221 "gdbarch_dump: register_to_value = <%s>\n",
1222 host_address_to_string (gdbarch->register_to_value));
1223 fprintf_unfiltered (file,
1224 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
1225 gdbarch_register_type_p (gdbarch));
1226 fprintf_unfiltered (file,
1227 "gdbarch_dump: register_type = <%s>\n",
1228 host_address_to_string (gdbarch->register_type));
1229 fprintf_unfiltered (file,
1230 "gdbarch_dump: gdbarch_relocate_instruction_p() = %d\n",
1231 gdbarch_relocate_instruction_p (gdbarch));
1232 fprintf_unfiltered (file,
1233 "gdbarch_dump: relocate_instruction = <%s>\n",
1234 host_address_to_string (gdbarch->relocate_instruction));
1235 fprintf_unfiltered (file,
1236 "gdbarch_dump: remote_breakpoint_from_pc = <%s>\n",
1237 host_address_to_string (gdbarch->remote_breakpoint_from_pc));
1238 fprintf_unfiltered (file,
1239 "gdbarch_dump: remote_register_number = <%s>\n",
1240 host_address_to_string (gdbarch->remote_register_number));
1241 fprintf_unfiltered (file,
1242 "gdbarch_dump: return_in_first_hidden_param_p = <%s>\n",
1243 host_address_to_string (gdbarch->return_in_first_hidden_param_p));
1244 fprintf_unfiltered (file,
1245 "gdbarch_dump: gdbarch_return_value_p() = %d\n",
1246 gdbarch_return_value_p (gdbarch));
1247 fprintf_unfiltered (file,
1248 "gdbarch_dump: return_value = <%s>\n",
1249 host_address_to_string (gdbarch->return_value));
1250 fprintf_unfiltered (file,
1251 "gdbarch_dump: sdb_reg_to_regnum = <%s>\n",
1252 host_address_to_string (gdbarch->sdb_reg_to_regnum));
1253 fprintf_unfiltered (file,
1254 "gdbarch_dump: short_bit = %s\n",
1255 plongest (gdbarch->short_bit));
1256 fprintf_unfiltered (file,
1257 "gdbarch_dump: gdbarch_single_step_through_delay_p() = %d\n",
1258 gdbarch_single_step_through_delay_p (gdbarch));
1259 fprintf_unfiltered (file,
1260 "gdbarch_dump: single_step_through_delay = <%s>\n",
1261 host_address_to_string (gdbarch->single_step_through_delay));
1262 fprintf_unfiltered (file,
1263 "gdbarch_dump: gdbarch_skip_entrypoint_p() = %d\n",
1264 gdbarch_skip_entrypoint_p (gdbarch));
1265 fprintf_unfiltered (file,
1266 "gdbarch_dump: skip_entrypoint = <%s>\n",
1267 host_address_to_string (gdbarch->skip_entrypoint));
1268 fprintf_unfiltered (file,
1269 "gdbarch_dump: gdbarch_skip_main_prologue_p() = %d\n",
1270 gdbarch_skip_main_prologue_p (gdbarch));
1271 fprintf_unfiltered (file,
1272 "gdbarch_dump: skip_main_prologue = <%s>\n",
1273 host_address_to_string (gdbarch->skip_main_prologue));
1274 fprintf_unfiltered (file,
1275 "gdbarch_dump: skip_permanent_breakpoint = <%s>\n",
1276 host_address_to_string (gdbarch->skip_permanent_breakpoint));
1277 fprintf_unfiltered (file,
1278 "gdbarch_dump: skip_prologue = <%s>\n",
1279 host_address_to_string (gdbarch->skip_prologue));
1280 fprintf_unfiltered (file,
1281 "gdbarch_dump: skip_solib_resolver = <%s>\n",
1282 host_address_to_string (gdbarch->skip_solib_resolver));
1283 fprintf_unfiltered (file,
1284 "gdbarch_dump: skip_trampoline_code = <%s>\n",
1285 host_address_to_string (gdbarch->skip_trampoline_code));
1286 fprintf_unfiltered (file,
1287 "gdbarch_dump: gdbarch_software_single_step_p() = %d\n",
1288 gdbarch_software_single_step_p (gdbarch));
1289 fprintf_unfiltered (file,
1290 "gdbarch_dump: software_single_step = <%s>\n",
1291 host_address_to_string (gdbarch->software_single_step));
1292 fprintf_unfiltered (file,
1293 "gdbarch_dump: sofun_address_maybe_missing = %s\n",
1294 plongest (gdbarch->sofun_address_maybe_missing));
1295 fprintf_unfiltered (file,
1296 "gdbarch_dump: solib_symbols_extension = %s\n",
1297 pstring (gdbarch->solib_symbols_extension));
1298 fprintf_unfiltered (file,
1299 "gdbarch_dump: sp_regnum = %s\n",
1300 plongest (gdbarch->sp_regnum));
1301 fprintf_unfiltered (file,
1302 "gdbarch_dump: stab_reg_to_regnum = <%s>\n",
1303 host_address_to_string (gdbarch->stab_reg_to_regnum));
1304 fprintf_unfiltered (file,
1305 "gdbarch_dump: stabs_argument_has_addr = <%s>\n",
1306 host_address_to_string (gdbarch->stabs_argument_has_addr));
1307 fprintf_unfiltered (file,
1308 "gdbarch_dump: stack_frame_destroyed_p = <%s>\n",
1309 host_address_to_string (gdbarch->stack_frame_destroyed_p));
1310 fprintf_unfiltered (file,
1311 "gdbarch_dump: stap_gdb_register_prefix = %s\n",
1312 pstring (gdbarch->stap_gdb_register_prefix));
1313 fprintf_unfiltered (file,
1314 "gdbarch_dump: stap_gdb_register_suffix = %s\n",
1315 pstring (gdbarch->stap_gdb_register_suffix));
1316 fprintf_unfiltered (file,
1317 "gdbarch_dump: stap_integer_prefixes = %s\n",
1318 pstring_list (gdbarch->stap_integer_prefixes));
1319 fprintf_unfiltered (file,
1320 "gdbarch_dump: stap_integer_suffixes = %s\n",
1321 pstring_list (gdbarch->stap_integer_suffixes));
1322 fprintf_unfiltered (file,
1323 "gdbarch_dump: gdbarch_stap_is_single_operand_p() = %d\n",
1324 gdbarch_stap_is_single_operand_p (gdbarch));
1325 fprintf_unfiltered (file,
1326 "gdbarch_dump: stap_is_single_operand = <%s>\n",
1327 host_address_to_string (gdbarch->stap_is_single_operand));
1328 fprintf_unfiltered (file,
1329 "gdbarch_dump: gdbarch_stap_parse_special_token_p() = %d\n",
1330 gdbarch_stap_parse_special_token_p (gdbarch));
1331 fprintf_unfiltered (file,
1332 "gdbarch_dump: stap_parse_special_token = <%s>\n",
1333 host_address_to_string (gdbarch->stap_parse_special_token));
1334 fprintf_unfiltered (file,
1335 "gdbarch_dump: stap_register_indirection_prefixes = %s\n",
1336 pstring_list (gdbarch->stap_register_indirection_prefixes));
1337 fprintf_unfiltered (file,
1338 "gdbarch_dump: stap_register_indirection_suffixes = %s\n",
1339 pstring_list (gdbarch->stap_register_indirection_suffixes));
1340 fprintf_unfiltered (file,
1341 "gdbarch_dump: stap_register_prefixes = %s\n",
1342 pstring_list (gdbarch->stap_register_prefixes));
1343 fprintf_unfiltered (file,
1344 "gdbarch_dump: stap_register_suffixes = %s\n",
1345 pstring_list (gdbarch->stap_register_suffixes));
1346 fprintf_unfiltered (file,
1347 "gdbarch_dump: gdbarch_static_transform_name_p() = %d\n",
1348 gdbarch_static_transform_name_p (gdbarch));
1349 fprintf_unfiltered (file,
1350 "gdbarch_dump: static_transform_name = <%s>\n",
1351 host_address_to_string (gdbarch->static_transform_name));
1352 fprintf_unfiltered (file,
1353 "gdbarch_dump: syscalls_info = %s\n",
1354 host_address_to_string (gdbarch->syscalls_info));
1355 fprintf_unfiltered (file,
1356 "gdbarch_dump: target_desc = %s\n",
1357 host_address_to_string (gdbarch->target_desc));
1358 fprintf_unfiltered (file,
1359 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
1360 gdbarch_unwind_pc_p (gdbarch));
1361 fprintf_unfiltered (file,
1362 "gdbarch_dump: unwind_pc = <%s>\n",
1363 host_address_to_string (gdbarch->unwind_pc));
1364 fprintf_unfiltered (file,
1365 "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
1366 gdbarch_unwind_sp_p (gdbarch));
1367 fprintf_unfiltered (file,
1368 "gdbarch_dump: unwind_sp = <%s>\n",
1369 host_address_to_string (gdbarch->unwind_sp));
1370 fprintf_unfiltered (file,
1371 "gdbarch_dump: value_from_register = <%s>\n",
1372 host_address_to_string (gdbarch->value_from_register));
1373 fprintf_unfiltered (file,
1374 "gdbarch_dump: value_to_register = <%s>\n",
1375 host_address_to_string (gdbarch->value_to_register));
1376 fprintf_unfiltered (file,
1377 "gdbarch_dump: vbit_in_delta = %s\n",
1378 plongest (gdbarch->vbit_in_delta));
1379 fprintf_unfiltered (file,
1380 "gdbarch_dump: virtual_frame_pointer = <%s>\n",
1381 host_address_to_string (gdbarch->virtual_frame_pointer));
1382 fprintf_unfiltered (file,
1383 "gdbarch_dump: vsyscall_range = <%s>\n",
1384 host_address_to_string (gdbarch->vsyscall_range));
1385 fprintf_unfiltered (file,
1386 "gdbarch_dump: vtable_function_descriptors = %s\n",
1387 plongest (gdbarch->vtable_function_descriptors));
1388 fprintf_unfiltered (file,
1389 "gdbarch_dump: gdbarch_write_pc_p() = %d\n",
1390 gdbarch_write_pc_p (gdbarch));
1391 fprintf_unfiltered (file,
1392 "gdbarch_dump: write_pc = <%s>\n",
1393 host_address_to_string (gdbarch->write_pc));
1394 fprintf_unfiltered (file,
1395 "gdbarch_dump: xml_syscall_file = %s\n",
1396 pstring (gdbarch->xml_syscall_file));
1397 if (gdbarch->dump_tdep != NULL)
1398 gdbarch->dump_tdep (gdbarch, file);
1401 struct gdbarch_tdep *
1402 gdbarch_tdep (struct gdbarch *gdbarch)
1404 if (gdbarch_debug >= 2)
1405 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
1406 return gdbarch->tdep;
1410 const struct bfd_arch_info *
1411 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
1413 gdb_assert (gdbarch != NULL);
1414 if (gdbarch_debug >= 2)
1415 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
1416 return gdbarch->bfd_arch_info;
1420 gdbarch_byte_order (struct gdbarch *gdbarch)
1422 gdb_assert (gdbarch != NULL);
1423 if (gdbarch_debug >= 2)
1424 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
1425 return gdbarch->byte_order;
1429 gdbarch_byte_order_for_code (struct gdbarch *gdbarch)
1431 gdb_assert (gdbarch != NULL);
1432 if (gdbarch_debug >= 2)
1433 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order_for_code called\n");
1434 return gdbarch->byte_order_for_code;
1438 gdbarch_osabi (struct gdbarch *gdbarch)
1440 gdb_assert (gdbarch != NULL);
1441 if (gdbarch_debug >= 2)
1442 fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n");
1443 return gdbarch->osabi;
1446 const struct target_desc *
1447 gdbarch_target_desc (struct gdbarch *gdbarch)
1449 gdb_assert (gdbarch != NULL);
1450 if (gdbarch_debug >= 2)
1451 fprintf_unfiltered (gdb_stdlog, "gdbarch_target_desc called\n");
1452 return gdbarch->target_desc;
1456 gdbarch_bits_big_endian (struct gdbarch *gdbarch)
1458 gdb_assert (gdbarch != NULL);
1459 /* Skip verify of bits_big_endian, invalid_p == 0 */
1460 if (gdbarch_debug >= 2)
1461 fprintf_unfiltered (gdb_stdlog, "gdbarch_bits_big_endian called\n");
1462 return gdbarch->bits_big_endian;
1466 set_gdbarch_bits_big_endian (struct gdbarch *gdbarch,
1467 int bits_big_endian)
1469 gdbarch->bits_big_endian = bits_big_endian;
1473 gdbarch_short_bit (struct gdbarch *gdbarch)
1475 gdb_assert (gdbarch != NULL);
1476 /* Skip verify of short_bit, invalid_p == 0 */
1477 if (gdbarch_debug >= 2)
1478 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
1479 return gdbarch->short_bit;
1483 set_gdbarch_short_bit (struct gdbarch *gdbarch,
1486 gdbarch->short_bit = short_bit;
1490 gdbarch_int_bit (struct gdbarch *gdbarch)
1492 gdb_assert (gdbarch != NULL);
1493 /* Skip verify of int_bit, invalid_p == 0 */
1494 if (gdbarch_debug >= 2)
1495 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
1496 return gdbarch->int_bit;
1500 set_gdbarch_int_bit (struct gdbarch *gdbarch,
1503 gdbarch->int_bit = int_bit;
1507 gdbarch_long_bit (struct gdbarch *gdbarch)
1509 gdb_assert (gdbarch != NULL);
1510 /* Skip verify of long_bit, invalid_p == 0 */
1511 if (gdbarch_debug >= 2)
1512 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
1513 return gdbarch->long_bit;
1517 set_gdbarch_long_bit (struct gdbarch *gdbarch,
1520 gdbarch->long_bit = long_bit;
1524 gdbarch_long_long_bit (struct gdbarch *gdbarch)
1526 gdb_assert (gdbarch != NULL);
1527 /* Skip verify of long_long_bit, invalid_p == 0 */
1528 if (gdbarch_debug >= 2)
1529 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
1530 return gdbarch->long_long_bit;
1534 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
1537 gdbarch->long_long_bit = long_long_bit;
1541 gdbarch_long_long_align_bit (struct gdbarch *gdbarch)
1543 gdb_assert (gdbarch != NULL);
1544 /* Skip verify of long_long_align_bit, invalid_p == 0 */
1545 if (gdbarch_debug >= 2)
1546 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_align_bit called\n");
1547 return gdbarch->long_long_align_bit;
1551 set_gdbarch_long_long_align_bit (struct gdbarch *gdbarch,
1552 int long_long_align_bit)
1554 gdbarch->long_long_align_bit = long_long_align_bit;
1558 gdbarch_half_bit (struct gdbarch *gdbarch)
1560 gdb_assert (gdbarch != NULL);
1561 /* Skip verify of half_bit, invalid_p == 0 */
1562 if (gdbarch_debug >= 2)
1563 fprintf_unfiltered (gdb_stdlog, "gdbarch_half_bit called\n");
1564 return gdbarch->half_bit;
1568 set_gdbarch_half_bit (struct gdbarch *gdbarch,
1571 gdbarch->half_bit = half_bit;
1574 const struct floatformat **
1575 gdbarch_half_format (struct gdbarch *gdbarch)
1577 gdb_assert (gdbarch != NULL);
1578 if (gdbarch_debug >= 2)
1579 fprintf_unfiltered (gdb_stdlog, "gdbarch_half_format called\n");
1580 return gdbarch->half_format;
1584 set_gdbarch_half_format (struct gdbarch *gdbarch,
1585 const struct floatformat ** half_format)
1587 gdbarch->half_format = half_format;
1591 gdbarch_float_bit (struct gdbarch *gdbarch)
1593 gdb_assert (gdbarch != NULL);
1594 /* Skip verify of float_bit, invalid_p == 0 */
1595 if (gdbarch_debug >= 2)
1596 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
1597 return gdbarch->float_bit;
1601 set_gdbarch_float_bit (struct gdbarch *gdbarch,
1604 gdbarch->float_bit = float_bit;
1607 const struct floatformat **
1608 gdbarch_float_format (struct gdbarch *gdbarch)
1610 gdb_assert (gdbarch != NULL);
1611 if (gdbarch_debug >= 2)
1612 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
1613 return gdbarch->float_format;
1617 set_gdbarch_float_format (struct gdbarch *gdbarch,
1618 const struct floatformat ** float_format)
1620 gdbarch->float_format = float_format;
1624 gdbarch_double_bit (struct gdbarch *gdbarch)
1626 gdb_assert (gdbarch != NULL);
1627 /* Skip verify of double_bit, invalid_p == 0 */
1628 if (gdbarch_debug >= 2)
1629 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
1630 return gdbarch->double_bit;
1634 set_gdbarch_double_bit (struct gdbarch *gdbarch,
1637 gdbarch->double_bit = double_bit;
1640 const struct floatformat **
1641 gdbarch_double_format (struct gdbarch *gdbarch)
1643 gdb_assert (gdbarch != NULL);
1644 if (gdbarch_debug >= 2)
1645 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
1646 return gdbarch->double_format;
1650 set_gdbarch_double_format (struct gdbarch *gdbarch,
1651 const struct floatformat ** double_format)
1653 gdbarch->double_format = double_format;
1657 gdbarch_long_double_bit (struct gdbarch *gdbarch)
1659 gdb_assert (gdbarch != NULL);
1660 /* Skip verify of long_double_bit, invalid_p == 0 */
1661 if (gdbarch_debug >= 2)
1662 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
1663 return gdbarch->long_double_bit;
1667 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
1668 int long_double_bit)
1670 gdbarch->long_double_bit = long_double_bit;
1673 const struct floatformat **
1674 gdbarch_long_double_format (struct gdbarch *gdbarch)
1676 gdb_assert (gdbarch != NULL);
1677 if (gdbarch_debug >= 2)
1678 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
1679 return gdbarch->long_double_format;
1683 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
1684 const struct floatformat ** long_double_format)
1686 gdbarch->long_double_format = long_double_format;
1690 gdbarch_ptr_bit (struct gdbarch *gdbarch)
1692 gdb_assert (gdbarch != NULL);
1693 /* Skip verify of ptr_bit, invalid_p == 0 */
1694 if (gdbarch_debug >= 2)
1695 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
1696 return gdbarch->ptr_bit;
1700 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
1703 gdbarch->ptr_bit = ptr_bit;
1707 gdbarch_addr_bit (struct gdbarch *gdbarch)
1709 gdb_assert (gdbarch != NULL);
1710 /* Check variable changed from pre-default. */
1711 gdb_assert (gdbarch->addr_bit != 0);
1712 if (gdbarch_debug >= 2)
1713 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
1714 return gdbarch->addr_bit;
1718 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
1721 gdbarch->addr_bit = addr_bit;
1725 gdbarch_dwarf2_addr_size (struct gdbarch *gdbarch)
1727 gdb_assert (gdbarch != NULL);
1728 /* Check variable changed from pre-default. */
1729 gdb_assert (gdbarch->dwarf2_addr_size != 0);
1730 if (gdbarch_debug >= 2)
1731 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_addr_size called\n");
1732 return gdbarch->dwarf2_addr_size;
1736 set_gdbarch_dwarf2_addr_size (struct gdbarch *gdbarch,
1737 int dwarf2_addr_size)
1739 gdbarch->dwarf2_addr_size = dwarf2_addr_size;
1743 gdbarch_char_signed (struct gdbarch *gdbarch)
1745 gdb_assert (gdbarch != NULL);
1746 /* Check variable changed from pre-default. */
1747 gdb_assert (gdbarch->char_signed != -1);
1748 if (gdbarch_debug >= 2)
1749 fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
1750 return gdbarch->char_signed;
1754 set_gdbarch_char_signed (struct gdbarch *gdbarch,
1757 gdbarch->char_signed = char_signed;
1761 gdbarch_read_pc_p (struct gdbarch *gdbarch)
1763 gdb_assert (gdbarch != NULL);
1764 return gdbarch->read_pc != NULL;
1768 gdbarch_read_pc (struct gdbarch *gdbarch, struct regcache *regcache)
1770 gdb_assert (gdbarch != NULL);
1771 gdb_assert (gdbarch->read_pc != NULL);
1772 if (gdbarch_debug >= 2)
1773 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
1774 return gdbarch->read_pc (regcache);
1778 set_gdbarch_read_pc (struct gdbarch *gdbarch,
1779 gdbarch_read_pc_ftype read_pc)
1781 gdbarch->read_pc = read_pc;
1785 gdbarch_write_pc_p (struct gdbarch *gdbarch)
1787 gdb_assert (gdbarch != NULL);
1788 return gdbarch->write_pc != NULL;
1792 gdbarch_write_pc (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR val)
1794 gdb_assert (gdbarch != NULL);
1795 gdb_assert (gdbarch->write_pc != NULL);
1796 if (gdbarch_debug >= 2)
1797 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
1798 gdbarch->write_pc (regcache, val);
1802 set_gdbarch_write_pc (struct gdbarch *gdbarch,
1803 gdbarch_write_pc_ftype write_pc)
1805 gdbarch->write_pc = write_pc;
1809 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
1811 gdb_assert (gdbarch != NULL);
1812 gdb_assert (gdbarch->virtual_frame_pointer != NULL);
1813 if (gdbarch_debug >= 2)
1814 fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
1815 gdbarch->virtual_frame_pointer (gdbarch, pc, frame_regnum, frame_offset);
1819 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
1820 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
1822 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
1826 gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
1828 gdb_assert (gdbarch != NULL);
1829 return gdbarch->pseudo_register_read != NULL;
1832 enum register_status
1833 gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, gdb_byte *buf)
1835 gdb_assert (gdbarch != NULL);
1836 gdb_assert (gdbarch->pseudo_register_read != NULL);
1837 if (gdbarch_debug >= 2)
1838 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
1839 return gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
1843 set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
1844 gdbarch_pseudo_register_read_ftype pseudo_register_read)
1846 gdbarch->pseudo_register_read = pseudo_register_read;
1850 gdbarch_pseudo_register_read_value_p (struct gdbarch *gdbarch)
1852 gdb_assert (gdbarch != NULL);
1853 return gdbarch->pseudo_register_read_value != NULL;
1857 gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum)
1859 gdb_assert (gdbarch != NULL);
1860 gdb_assert (gdbarch->pseudo_register_read_value != NULL);
1861 if (gdbarch_debug >= 2)
1862 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read_value called\n");
1863 return gdbarch->pseudo_register_read_value (gdbarch, regcache, cookednum);
1867 set_gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch,
1868 gdbarch_pseudo_register_read_value_ftype pseudo_register_read_value)
1870 gdbarch->pseudo_register_read_value = pseudo_register_read_value;
1874 gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
1876 gdb_assert (gdbarch != NULL);
1877 return gdbarch->pseudo_register_write != NULL;
1881 gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const gdb_byte *buf)
1883 gdb_assert (gdbarch != NULL);
1884 gdb_assert (gdbarch->pseudo_register_write != NULL);
1885 if (gdbarch_debug >= 2)
1886 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
1887 gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
1891 set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
1892 gdbarch_pseudo_register_write_ftype pseudo_register_write)
1894 gdbarch->pseudo_register_write = pseudo_register_write;
1898 gdbarch_num_regs (struct gdbarch *gdbarch)
1900 gdb_assert (gdbarch != NULL);
1901 /* Check variable changed from pre-default. */
1902 gdb_assert (gdbarch->num_regs != -1);
1903 if (gdbarch_debug >= 2)
1904 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
1905 return gdbarch->num_regs;
1909 set_gdbarch_num_regs (struct gdbarch *gdbarch,
1912 gdbarch->num_regs = num_regs;
1916 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
1918 gdb_assert (gdbarch != NULL);
1919 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
1920 if (gdbarch_debug >= 2)
1921 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
1922 return gdbarch->num_pseudo_regs;
1926 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
1927 int num_pseudo_regs)
1929 gdbarch->num_pseudo_regs = num_pseudo_regs;
1933 gdbarch_ax_pseudo_register_collect_p (struct gdbarch *gdbarch)
1935 gdb_assert (gdbarch != NULL);
1936 return gdbarch->ax_pseudo_register_collect != NULL;
1940 gdbarch_ax_pseudo_register_collect (struct gdbarch *gdbarch, struct agent_expr *ax, int reg)
1942 gdb_assert (gdbarch != NULL);
1943 gdb_assert (gdbarch->ax_pseudo_register_collect != NULL);
1944 if (gdbarch_debug >= 2)
1945 fprintf_unfiltered (gdb_stdlog, "gdbarch_ax_pseudo_register_collect called\n");
1946 return gdbarch->ax_pseudo_register_collect (gdbarch, ax, reg);
1950 set_gdbarch_ax_pseudo_register_collect (struct gdbarch *gdbarch,
1951 gdbarch_ax_pseudo_register_collect_ftype ax_pseudo_register_collect)
1953 gdbarch->ax_pseudo_register_collect = ax_pseudo_register_collect;
1957 gdbarch_ax_pseudo_register_push_stack_p (struct gdbarch *gdbarch)
1959 gdb_assert (gdbarch != NULL);
1960 return gdbarch->ax_pseudo_register_push_stack != NULL;
1964 gdbarch_ax_pseudo_register_push_stack (struct gdbarch *gdbarch, struct agent_expr *ax, int reg)
1966 gdb_assert (gdbarch != NULL);
1967 gdb_assert (gdbarch->ax_pseudo_register_push_stack != NULL);
1968 if (gdbarch_debug >= 2)
1969 fprintf_unfiltered (gdb_stdlog, "gdbarch_ax_pseudo_register_push_stack called\n");
1970 return gdbarch->ax_pseudo_register_push_stack (gdbarch, ax, reg);
1974 set_gdbarch_ax_pseudo_register_push_stack (struct gdbarch *gdbarch,
1975 gdbarch_ax_pseudo_register_push_stack_ftype ax_pseudo_register_push_stack)
1977 gdbarch->ax_pseudo_register_push_stack = ax_pseudo_register_push_stack;
1981 gdbarch_sp_regnum (struct gdbarch *gdbarch)
1983 gdb_assert (gdbarch != NULL);
1984 /* Skip verify of sp_regnum, invalid_p == 0 */
1985 if (gdbarch_debug >= 2)
1986 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
1987 return gdbarch->sp_regnum;
1991 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
1994 gdbarch->sp_regnum = sp_regnum;
1998 gdbarch_pc_regnum (struct gdbarch *gdbarch)
2000 gdb_assert (gdbarch != NULL);
2001 /* Skip verify of pc_regnum, invalid_p == 0 */
2002 if (gdbarch_debug >= 2)
2003 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
2004 return gdbarch->pc_regnum;
2008 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
2011 gdbarch->pc_regnum = pc_regnum;
2015 gdbarch_ps_regnum (struct gdbarch *gdbarch)
2017 gdb_assert (gdbarch != NULL);
2018 /* Skip verify of ps_regnum, invalid_p == 0 */
2019 if (gdbarch_debug >= 2)
2020 fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
2021 return gdbarch->ps_regnum;
2025 set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
2028 gdbarch->ps_regnum = ps_regnum;
2032 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
2034 gdb_assert (gdbarch != NULL);
2035 /* Skip verify of fp0_regnum, invalid_p == 0 */
2036 if (gdbarch_debug >= 2)
2037 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
2038 return gdbarch->fp0_regnum;
2042 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
2045 gdbarch->fp0_regnum = fp0_regnum;
2049 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
2051 gdb_assert (gdbarch != NULL);
2052 gdb_assert (gdbarch->stab_reg_to_regnum != NULL);
2053 if (gdbarch_debug >= 2)
2054 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
2055 return gdbarch->stab_reg_to_regnum (gdbarch, stab_regnr);
2059 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
2060 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
2062 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
2066 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
2068 gdb_assert (gdbarch != NULL);
2069 gdb_assert (gdbarch->ecoff_reg_to_regnum != NULL);
2070 if (gdbarch_debug >= 2)
2071 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
2072 return gdbarch->ecoff_reg_to_regnum (gdbarch, ecoff_regnr);
2076 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
2077 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
2079 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
2083 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
2085 gdb_assert (gdbarch != NULL);
2086 gdb_assert (gdbarch->sdb_reg_to_regnum != NULL);
2087 if (gdbarch_debug >= 2)
2088 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
2089 return gdbarch->sdb_reg_to_regnum (gdbarch, sdb_regnr);
2093 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
2094 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
2096 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
2100 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
2102 gdb_assert (gdbarch != NULL);
2103 gdb_assert (gdbarch->dwarf2_reg_to_regnum != NULL);
2104 if (gdbarch_debug >= 2)
2105 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
2106 return gdbarch->dwarf2_reg_to_regnum (gdbarch, dwarf2_regnr);
2110 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
2111 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
2113 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
2117 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
2119 gdb_assert (gdbarch != NULL);
2120 gdb_assert (gdbarch->register_name != NULL);
2121 if (gdbarch_debug >= 2)
2122 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
2123 return gdbarch->register_name (gdbarch, regnr);
2127 set_gdbarch_register_name (struct gdbarch *gdbarch,
2128 gdbarch_register_name_ftype register_name)
2130 gdbarch->register_name = register_name;
2134 gdbarch_register_type_p (struct gdbarch *gdbarch)
2136 gdb_assert (gdbarch != NULL);
2137 return gdbarch->register_type != NULL;
2141 gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
2143 gdb_assert (gdbarch != NULL);
2144 gdb_assert (gdbarch->register_type != NULL);
2145 if (gdbarch_debug >= 2)
2146 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
2147 return gdbarch->register_type (gdbarch, reg_nr);
2151 set_gdbarch_register_type (struct gdbarch *gdbarch,
2152 gdbarch_register_type_ftype register_type)
2154 gdbarch->register_type = register_type;
2158 gdbarch_dummy_id_p (struct gdbarch *gdbarch)
2160 gdb_assert (gdbarch != NULL);
2161 return gdbarch->dummy_id != NULL;
2165 gdbarch_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
2167 gdb_assert (gdbarch != NULL);
2168 gdb_assert (gdbarch->dummy_id != NULL);
2169 if (gdbarch_debug >= 2)
2170 fprintf_unfiltered (gdb_stdlog, "gdbarch_dummy_id called\n");
2171 return gdbarch->dummy_id (gdbarch, this_frame);
2175 set_gdbarch_dummy_id (struct gdbarch *gdbarch,
2176 gdbarch_dummy_id_ftype dummy_id)
2178 gdbarch->dummy_id = dummy_id;
2182 gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch)
2184 gdb_assert (gdbarch != NULL);
2185 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
2186 if (gdbarch_debug >= 2)
2187 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n");
2188 return gdbarch->deprecated_fp_regnum;
2192 set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch,
2193 int deprecated_fp_regnum)
2195 gdbarch->deprecated_fp_regnum = deprecated_fp_regnum;
2199 gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
2201 gdb_assert (gdbarch != NULL);
2202 return gdbarch->push_dummy_call != NULL;
2206 gdbarch_push_dummy_call (struct gdbarch *gdbarch, struct value *function, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
2208 gdb_assert (gdbarch != NULL);
2209 gdb_assert (gdbarch->push_dummy_call != NULL);
2210 if (gdbarch_debug >= 2)
2211 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
2212 return gdbarch->push_dummy_call (gdbarch, function, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr);
2216 set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
2217 gdbarch_push_dummy_call_ftype push_dummy_call)
2219 gdbarch->push_dummy_call = push_dummy_call;
2223 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
2225 gdb_assert (gdbarch != NULL);
2226 /* Skip verify of call_dummy_location, invalid_p == 0 */
2227 if (gdbarch_debug >= 2)
2228 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
2229 return gdbarch->call_dummy_location;
2233 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
2234 int call_dummy_location)
2236 gdbarch->call_dummy_location = call_dummy_location;
2240 gdbarch_push_dummy_code_p (struct gdbarch *gdbarch)
2242 gdb_assert (gdbarch != NULL);
2243 return gdbarch->push_dummy_code != NULL;
2247 gdbarch_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp, CORE_ADDR funaddr, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr, struct regcache *regcache)
2249 gdb_assert (gdbarch != NULL);
2250 gdb_assert (gdbarch->push_dummy_code != NULL);
2251 if (gdbarch_debug >= 2)
2252 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n");
2253 return gdbarch->push_dummy_code (gdbarch, sp, funaddr, args, nargs, value_type, real_pc, bp_addr, regcache);
2257 set_gdbarch_push_dummy_code (struct gdbarch *gdbarch,
2258 gdbarch_push_dummy_code_ftype push_dummy_code)
2260 gdbarch->push_dummy_code = push_dummy_code;
2264 gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
2266 gdb_assert (gdbarch != NULL);
2267 gdb_assert (gdbarch->print_registers_info != NULL);
2268 if (gdbarch_debug >= 2)
2269 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
2270 gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
2274 set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
2275 gdbarch_print_registers_info_ftype print_registers_info)
2277 gdbarch->print_registers_info = print_registers_info;
2281 gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
2283 gdb_assert (gdbarch != NULL);
2284 gdb_assert (gdbarch->print_float_info != NULL);
2285 if (gdbarch_debug >= 2)
2286 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
2287 gdbarch->print_float_info (gdbarch, file, frame, args);
2291 set_gdbarch_print_float_info (struct gdbarch *gdbarch,
2292 gdbarch_print_float_info_ftype print_float_info)
2294 gdbarch->print_float_info = print_float_info;
2298 gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
2300 gdb_assert (gdbarch != NULL);
2301 return gdbarch->print_vector_info != NULL;
2305 gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
2307 gdb_assert (gdbarch != NULL);
2308 gdb_assert (gdbarch->print_vector_info != NULL);
2309 if (gdbarch_debug >= 2)
2310 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
2311 gdbarch->print_vector_info (gdbarch, file, frame, args);
2315 set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
2316 gdbarch_print_vector_info_ftype print_vector_info)
2318 gdbarch->print_vector_info = print_vector_info;
2322 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
2324 gdb_assert (gdbarch != NULL);
2325 gdb_assert (gdbarch->register_sim_regno != NULL);
2326 if (gdbarch_debug >= 2)
2327 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
2328 return gdbarch->register_sim_regno (gdbarch, reg_nr);
2332 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
2333 gdbarch_register_sim_regno_ftype register_sim_regno)
2335 gdbarch->register_sim_regno = register_sim_regno;
2339 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
2341 gdb_assert (gdbarch != NULL);
2342 gdb_assert (gdbarch->cannot_fetch_register != NULL);
2343 if (gdbarch_debug >= 2)
2344 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
2345 return gdbarch->cannot_fetch_register (gdbarch, regnum);
2349 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
2350 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
2352 gdbarch->cannot_fetch_register = cannot_fetch_register;
2356 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
2358 gdb_assert (gdbarch != NULL);
2359 gdb_assert (gdbarch->cannot_store_register != NULL);
2360 if (gdbarch_debug >= 2)
2361 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
2362 return gdbarch->cannot_store_register (gdbarch, regnum);
2366 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
2367 gdbarch_cannot_store_register_ftype cannot_store_register)
2369 gdbarch->cannot_store_register = cannot_store_register;
2373 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
2375 gdb_assert (gdbarch != NULL);
2376 return gdbarch->get_longjmp_target != NULL;
2380 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR *pc)
2382 gdb_assert (gdbarch != NULL);
2383 gdb_assert (gdbarch->get_longjmp_target != NULL);
2384 if (gdbarch_debug >= 2)
2385 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
2386 return gdbarch->get_longjmp_target (frame, pc);
2390 set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
2391 gdbarch_get_longjmp_target_ftype get_longjmp_target)
2393 gdbarch->get_longjmp_target = get_longjmp_target;
2397 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
2399 gdb_assert (gdbarch != NULL);
2400 if (gdbarch_debug >= 2)
2401 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
2402 return gdbarch->believe_pcc_promotion;
2406 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
2407 int believe_pcc_promotion)
2409 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
2413 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
2415 gdb_assert (gdbarch != NULL);
2416 gdb_assert (gdbarch->convert_register_p != NULL);
2417 if (gdbarch_debug >= 2)
2418 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
2419 return gdbarch->convert_register_p (gdbarch, regnum, type);
2423 set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
2424 gdbarch_convert_register_p_ftype convert_register_p)
2426 gdbarch->convert_register_p = convert_register_p;
2430 gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, gdb_byte *buf, int *optimizedp, int *unavailablep)
2432 gdb_assert (gdbarch != NULL);
2433 gdb_assert (gdbarch->register_to_value != NULL);
2434 if (gdbarch_debug >= 2)
2435 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
2436 return gdbarch->register_to_value (frame, regnum, type, buf, optimizedp, unavailablep);
2440 set_gdbarch_register_to_value (struct gdbarch *gdbarch,
2441 gdbarch_register_to_value_ftype register_to_value)
2443 gdbarch->register_to_value = register_to_value;
2447 gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const gdb_byte *buf)
2449 gdb_assert (gdbarch != NULL);
2450 gdb_assert (gdbarch->value_to_register != NULL);
2451 if (gdbarch_debug >= 2)
2452 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
2453 gdbarch->value_to_register (frame, regnum, type, buf);
2457 set_gdbarch_value_to_register (struct gdbarch *gdbarch,
2458 gdbarch_value_to_register_ftype value_to_register)
2460 gdbarch->value_to_register = value_to_register;
2464 gdbarch_value_from_register (struct gdbarch *gdbarch, struct type *type, int regnum, struct frame_id frame_id)
2466 gdb_assert (gdbarch != NULL);
2467 gdb_assert (gdbarch->value_from_register != NULL);
2468 if (gdbarch_debug >= 2)
2469 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_from_register called\n");
2470 return gdbarch->value_from_register (gdbarch, type, regnum, frame_id);
2474 set_gdbarch_value_from_register (struct gdbarch *gdbarch,
2475 gdbarch_value_from_register_ftype value_from_register)
2477 gdbarch->value_from_register = value_from_register;
2481 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
2483 gdb_assert (gdbarch != NULL);
2484 gdb_assert (gdbarch->pointer_to_address != NULL);
2485 if (gdbarch_debug >= 2)
2486 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
2487 return gdbarch->pointer_to_address (gdbarch, type, buf);
2491 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
2492 gdbarch_pointer_to_address_ftype pointer_to_address)
2494 gdbarch->pointer_to_address = pointer_to_address;
2498 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, gdb_byte *buf, CORE_ADDR addr)
2500 gdb_assert (gdbarch != NULL);
2501 gdb_assert (gdbarch->address_to_pointer != NULL);
2502 if (gdbarch_debug >= 2)
2503 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
2504 gdbarch->address_to_pointer (gdbarch, type, buf, addr);
2508 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
2509 gdbarch_address_to_pointer_ftype address_to_pointer)
2511 gdbarch->address_to_pointer = address_to_pointer;
2515 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
2517 gdb_assert (gdbarch != NULL);
2518 return gdbarch->integer_to_address != NULL;
2522 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
2524 gdb_assert (gdbarch != NULL);
2525 gdb_assert (gdbarch->integer_to_address != NULL);
2526 if (gdbarch_debug >= 2)
2527 fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
2528 return gdbarch->integer_to_address (gdbarch, type, buf);
2532 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
2533 gdbarch_integer_to_address_ftype integer_to_address)
2535 gdbarch->integer_to_address = integer_to_address;
2539 gdbarch_return_value_p (struct gdbarch *gdbarch)
2541 gdb_assert (gdbarch != NULL);
2542 return gdbarch->return_value != NULL;
2545 enum return_value_convention
2546 gdbarch_return_value (struct gdbarch *gdbarch, struct value *function, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
2548 gdb_assert (gdbarch != NULL);
2549 gdb_assert (gdbarch->return_value != NULL);
2550 if (gdbarch_debug >= 2)
2551 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value called\n");
2552 return gdbarch->return_value (gdbarch, function, valtype, regcache, readbuf, writebuf);
2556 set_gdbarch_return_value (struct gdbarch *gdbarch,
2557 gdbarch_return_value_ftype return_value)
2559 gdbarch->return_value = return_value;
2563 gdbarch_return_in_first_hidden_param_p (struct gdbarch *gdbarch, struct type *type)
2565 gdb_assert (gdbarch != NULL);
2566 gdb_assert (gdbarch->return_in_first_hidden_param_p != NULL);
2567 if (gdbarch_debug >= 2)
2568 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_in_first_hidden_param_p called\n");
2569 return gdbarch->return_in_first_hidden_param_p (gdbarch, type);
2573 set_gdbarch_return_in_first_hidden_param_p (struct gdbarch *gdbarch,
2574 gdbarch_return_in_first_hidden_param_p_ftype return_in_first_hidden_param_p)
2576 gdbarch->return_in_first_hidden_param_p = return_in_first_hidden_param_p;
2580 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
2582 gdb_assert (gdbarch != NULL);
2583 gdb_assert (gdbarch->skip_prologue != NULL);
2584 if (gdbarch_debug >= 2)
2585 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
2586 return gdbarch->skip_prologue (gdbarch, ip);
2590 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
2591 gdbarch_skip_prologue_ftype skip_prologue)
2593 gdbarch->skip_prologue = skip_prologue;
2597 gdbarch_skip_main_prologue_p (struct gdbarch *gdbarch)
2599 gdb_assert (gdbarch != NULL);
2600 return gdbarch->skip_main_prologue != NULL;
2604 gdbarch_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
2606 gdb_assert (gdbarch != NULL);
2607 gdb_assert (gdbarch->skip_main_prologue != NULL);
2608 if (gdbarch_debug >= 2)
2609 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_main_prologue called\n");
2610 return gdbarch->skip_main_prologue (gdbarch, ip);
2614 set_gdbarch_skip_main_prologue (struct gdbarch *gdbarch,
2615 gdbarch_skip_main_prologue_ftype skip_main_prologue)
2617 gdbarch->skip_main_prologue = skip_main_prologue;
2621 gdbarch_skip_entrypoint_p (struct gdbarch *gdbarch)
2623 gdb_assert (gdbarch != NULL);
2624 return gdbarch->skip_entrypoint != NULL;
2628 gdbarch_skip_entrypoint (struct gdbarch *gdbarch, CORE_ADDR ip)
2630 gdb_assert (gdbarch != NULL);
2631 gdb_assert (gdbarch->skip_entrypoint != NULL);
2632 if (gdbarch_debug >= 2)
2633 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_entrypoint called\n");
2634 return gdbarch->skip_entrypoint (gdbarch, ip);
2638 set_gdbarch_skip_entrypoint (struct gdbarch *gdbarch,
2639 gdbarch_skip_entrypoint_ftype skip_entrypoint)
2641 gdbarch->skip_entrypoint = skip_entrypoint;
2645 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
2647 gdb_assert (gdbarch != NULL);
2648 gdb_assert (gdbarch->inner_than != NULL);
2649 if (gdbarch_debug >= 2)
2650 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
2651 return gdbarch->inner_than (lhs, rhs);
2655 set_gdbarch_inner_than (struct gdbarch *gdbarch,
2656 gdbarch_inner_than_ftype inner_than)
2658 gdbarch->inner_than = inner_than;
2662 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
2664 gdb_assert (gdbarch != NULL);
2665 gdb_assert (gdbarch->breakpoint_from_pc != NULL);
2666 if (gdbarch_debug >= 2)
2667 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
2668 return gdbarch->breakpoint_from_pc (gdbarch, pcptr, lenptr);
2672 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
2673 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
2675 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
2679 gdbarch_remote_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *kindptr)
2681 gdb_assert (gdbarch != NULL);
2682 gdb_assert (gdbarch->remote_breakpoint_from_pc != NULL);
2683 if (gdbarch_debug >= 2)
2684 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_breakpoint_from_pc called\n");
2685 gdbarch->remote_breakpoint_from_pc (gdbarch, pcptr, kindptr);
2689 set_gdbarch_remote_breakpoint_from_pc (struct gdbarch *gdbarch,
2690 gdbarch_remote_breakpoint_from_pc_ftype remote_breakpoint_from_pc)
2692 gdbarch->remote_breakpoint_from_pc = remote_breakpoint_from_pc;
2696 gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch)
2698 gdb_assert (gdbarch != NULL);
2699 return gdbarch->adjust_breakpoint_address != NULL;
2703 gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr)
2705 gdb_assert (gdbarch != NULL);
2706 gdb_assert (gdbarch->adjust_breakpoint_address != NULL);
2707 if (gdbarch_debug >= 2)
2708 fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_breakpoint_address called\n");
2709 return gdbarch->adjust_breakpoint_address (gdbarch, bpaddr);
2713 set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch,
2714 gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address)
2716 gdbarch->adjust_breakpoint_address = adjust_breakpoint_address;
2720 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
2722 gdb_assert (gdbarch != NULL);
2723 gdb_assert (gdbarch->memory_insert_breakpoint != NULL);
2724 if (gdbarch_debug >= 2)
2725 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
2726 return gdbarch->memory_insert_breakpoint (gdbarch, bp_tgt);
2730 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
2731 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
2733 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
2737 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
2739 gdb_assert (gdbarch != NULL);
2740 gdb_assert (gdbarch->memory_remove_breakpoint != NULL);
2741 if (gdbarch_debug >= 2)
2742 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
2743 return gdbarch->memory_remove_breakpoint (gdbarch, bp_tgt);
2747 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
2748 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
2750 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
2754 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
2756 gdb_assert (gdbarch != NULL);
2757 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
2758 if (gdbarch_debug >= 2)
2759 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
2760 return gdbarch->decr_pc_after_break;
2764 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
2765 CORE_ADDR decr_pc_after_break)
2767 gdbarch->decr_pc_after_break = decr_pc_after_break;
2771 gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch)
2773 gdb_assert (gdbarch != NULL);
2774 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
2775 if (gdbarch_debug >= 2)
2776 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_function_start_offset called\n");
2777 return gdbarch->deprecated_function_start_offset;
2781 set_gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch,
2782 CORE_ADDR deprecated_function_start_offset)
2784 gdbarch->deprecated_function_start_offset = deprecated_function_start_offset;
2788 gdbarch_remote_register_number (struct gdbarch *gdbarch, int regno)
2790 gdb_assert (gdbarch != NULL);
2791 gdb_assert (gdbarch->remote_register_number != NULL);
2792 if (gdbarch_debug >= 2)
2793 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_register_number called\n");
2794 return gdbarch->remote_register_number (gdbarch, regno);
2798 set_gdbarch_remote_register_number (struct gdbarch *gdbarch,
2799 gdbarch_remote_register_number_ftype remote_register_number)
2801 gdbarch->remote_register_number = remote_register_number;
2805 gdbarch_fetch_tls_load_module_address_p (struct gdbarch *gdbarch)
2807 gdb_assert (gdbarch != NULL);
2808 return gdbarch->fetch_tls_load_module_address != NULL;
2812 gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch, struct objfile *objfile)
2814 gdb_assert (gdbarch != NULL);
2815 gdb_assert (gdbarch->fetch_tls_load_module_address != NULL);
2816 if (gdbarch_debug >= 2)
2817 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_tls_load_module_address called\n");
2818 return gdbarch->fetch_tls_load_module_address (objfile);
2822 set_gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch,
2823 gdbarch_fetch_tls_load_module_address_ftype fetch_tls_load_module_address)
2825 gdbarch->fetch_tls_load_module_address = fetch_tls_load_module_address;
2829 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
2831 gdb_assert (gdbarch != NULL);
2832 /* Skip verify of frame_args_skip, invalid_p == 0 */
2833 if (gdbarch_debug >= 2)
2834 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
2835 return gdbarch->frame_args_skip;
2839 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
2840 CORE_ADDR frame_args_skip)
2842 gdbarch->frame_args_skip = frame_args_skip;
2846 gdbarch_unwind_pc_p (struct gdbarch *gdbarch)
2848 gdb_assert (gdbarch != NULL);
2849 return gdbarch->unwind_pc != NULL;
2853 gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
2855 gdb_assert (gdbarch != NULL);
2856 gdb_assert (gdbarch->unwind_pc != NULL);
2857 if (gdbarch_debug >= 2)
2858 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n");
2859 return gdbarch->unwind_pc (gdbarch, next_frame);
2863 set_gdbarch_unwind_pc (struct gdbarch *gdbarch,
2864 gdbarch_unwind_pc_ftype unwind_pc)
2866 gdbarch->unwind_pc = unwind_pc;
2870 gdbarch_unwind_sp_p (struct gdbarch *gdbarch)
2872 gdb_assert (gdbarch != NULL);
2873 return gdbarch->unwind_sp != NULL;
2877 gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
2879 gdb_assert (gdbarch != NULL);
2880 gdb_assert (gdbarch->unwind_sp != NULL);
2881 if (gdbarch_debug >= 2)
2882 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_sp called\n");
2883 return gdbarch->unwind_sp (gdbarch, next_frame);
2887 set_gdbarch_unwind_sp (struct gdbarch *gdbarch,
2888 gdbarch_unwind_sp_ftype unwind_sp)
2890 gdbarch->unwind_sp = unwind_sp;
2894 gdbarch_frame_num_args_p (struct gdbarch *gdbarch)
2896 gdb_assert (gdbarch != NULL);
2897 return gdbarch->frame_num_args != NULL;
2901 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
2903 gdb_assert (gdbarch != NULL);
2904 gdb_assert (gdbarch->frame_num_args != NULL);
2905 if (gdbarch_debug >= 2)
2906 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
2907 return gdbarch->frame_num_args (frame);
2911 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
2912 gdbarch_frame_num_args_ftype frame_num_args)
2914 gdbarch->frame_num_args = frame_num_args;
2918 gdbarch_frame_align_p (struct gdbarch *gdbarch)
2920 gdb_assert (gdbarch != NULL);
2921 return gdbarch->frame_align != NULL;
2925 gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
2927 gdb_assert (gdbarch != NULL);
2928 gdb_assert (gdbarch->frame_align != NULL);
2929 if (gdbarch_debug >= 2)
2930 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
2931 return gdbarch->frame_align (gdbarch, address);
2935 set_gdbarch_frame_align (struct gdbarch *gdbarch,
2936 gdbarch_frame_align_ftype frame_align)
2938 gdbarch->frame_align = frame_align;
2942 gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type)
2944 gdb_assert (gdbarch != NULL);
2945 gdb_assert (gdbarch->stabs_argument_has_addr != NULL);
2946 if (gdbarch_debug >= 2)
2947 fprintf_unfiltered (gdb_stdlog, "gdbarch_stabs_argument_has_addr called\n");
2948 return gdbarch->stabs_argument_has_addr (gdbarch, type);
2952 set_gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch,
2953 gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr)
2955 gdbarch->stabs_argument_has_addr = stabs_argument_has_addr;
2959 gdbarch_frame_red_zone_size (struct gdbarch *gdbarch)
2961 gdb_assert (gdbarch != NULL);
2962 if (gdbarch_debug >= 2)
2963 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_red_zone_size called\n");
2964 return gdbarch->frame_red_zone_size;
2968 set_gdbarch_frame_red_zone_size (struct gdbarch *gdbarch,
2969 int frame_red_zone_size)
2971 gdbarch->frame_red_zone_size = frame_red_zone_size;
2975 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
2977 gdb_assert (gdbarch != NULL);
2978 gdb_assert (gdbarch->convert_from_func_ptr_addr != NULL);
2979 if (gdbarch_debug >= 2)
2980 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
2981 return gdbarch->convert_from_func_ptr_addr (gdbarch, addr, targ);
2985 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
2986 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
2988 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
2992 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
2994 gdb_assert (gdbarch != NULL);
2995 gdb_assert (gdbarch->addr_bits_remove != NULL);
2996 if (gdbarch_debug >= 2)
2997 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
2998 return gdbarch->addr_bits_remove (gdbarch, addr);
3002 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
3003 gdbarch_addr_bits_remove_ftype addr_bits_remove)
3005 gdbarch->addr_bits_remove = addr_bits_remove;
3009 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
3011 gdb_assert (gdbarch != NULL);
3012 return gdbarch->software_single_step != NULL;
3016 gdbarch_software_single_step (struct gdbarch *gdbarch, struct frame_info *frame)
3018 gdb_assert (gdbarch != NULL);
3019 gdb_assert (gdbarch->software_single_step != NULL);
3020 if (gdbarch_debug >= 2)
3021 fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
3022 return gdbarch->software_single_step (frame);
3026 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
3027 gdbarch_software_single_step_ftype software_single_step)
3029 gdbarch->software_single_step = software_single_step;
3033 gdbarch_single_step_through_delay_p (struct gdbarch *gdbarch)
3035 gdb_assert (gdbarch != NULL);
3036 return gdbarch->single_step_through_delay != NULL;
3040 gdbarch_single_step_through_delay (struct gdbarch *gdbarch, struct frame_info *frame)
3042 gdb_assert (gdbarch != NULL);
3043 gdb_assert (gdbarch->single_step_through_delay != NULL);
3044 if (gdbarch_debug >= 2)
3045 fprintf_unfiltered (gdb_stdlog, "gdbarch_single_step_through_delay called\n");
3046 return gdbarch->single_step_through_delay (gdbarch, frame);
3050 set_gdbarch_single_step_through_delay (struct gdbarch *gdbarch,
3051 gdbarch_single_step_through_delay_ftype single_step_through_delay)
3053 gdbarch->single_step_through_delay = single_step_through_delay;
3057 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info)
3059 gdb_assert (gdbarch != NULL);
3060 gdb_assert (gdbarch->print_insn != NULL);
3061 if (gdbarch_debug >= 2)
3062 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
3063 return gdbarch->print_insn (vma, info);
3067 set_gdbarch_print_insn (struct gdbarch *gdbarch,
3068 gdbarch_print_insn_ftype print_insn)
3070 gdbarch->print_insn = print_insn;
3074 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR pc)
3076 gdb_assert (gdbarch != NULL);
3077 gdb_assert (gdbarch->skip_trampoline_code != NULL);
3078 if (gdbarch_debug >= 2)
3079 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
3080 return gdbarch->skip_trampoline_code (frame, pc);
3084 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
3085 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
3087 gdbarch->skip_trampoline_code = skip_trampoline_code;
3091 gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
3093 gdb_assert (gdbarch != NULL);
3094 gdb_assert (gdbarch->skip_solib_resolver != NULL);
3095 if (gdbarch_debug >= 2)
3096 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_solib_resolver called\n");
3097 return gdbarch->skip_solib_resolver (gdbarch, pc);
3101 set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch,
3102 gdbarch_skip_solib_resolver_ftype skip_solib_resolver)
3104 gdbarch->skip_solib_resolver = skip_solib_resolver;
3108 gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, const char *name)
3110 gdb_assert (gdbarch != NULL);
3111 gdb_assert (gdbarch->in_solib_return_trampoline != NULL);
3112 if (gdbarch_debug >= 2)
3113 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
3114 return gdbarch->in_solib_return_trampoline (gdbarch, pc, name);
3118 set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
3119 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
3121 gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
3125 gdbarch_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR addr)
3127 gdb_assert (gdbarch != NULL);
3128 gdb_assert (gdbarch->stack_frame_destroyed_p != NULL);
3129 if (gdbarch_debug >= 2)
3130 fprintf_unfiltered (gdb_stdlog, "gdbarch_stack_frame_destroyed_p called\n");
3131 return gdbarch->stack_frame_destroyed_p (gdbarch, addr);
3135 set_gdbarch_stack_frame_destroyed_p (struct gdbarch *gdbarch,
3136 gdbarch_stack_frame_destroyed_p_ftype stack_frame_destroyed_p)
3138 gdbarch->stack_frame_destroyed_p = stack_frame_destroyed_p;
3142 gdbarch_elf_make_msymbol_special_p (struct gdbarch *gdbarch)
3144 gdb_assert (gdbarch != NULL);
3145 return gdbarch->elf_make_msymbol_special != NULL;
3149 gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
3151 gdb_assert (gdbarch != NULL);
3152 gdb_assert (gdbarch->elf_make_msymbol_special != NULL);
3153 if (gdbarch_debug >= 2)
3154 fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
3155 gdbarch->elf_make_msymbol_special (sym, msym);
3159 set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
3160 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
3162 gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
3166 gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
3168 gdb_assert (gdbarch != NULL);
3169 gdb_assert (gdbarch->coff_make_msymbol_special != NULL);
3170 if (gdbarch_debug >= 2)
3171 fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
3172 gdbarch->coff_make_msymbol_special (val, msym);
3176 set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
3177 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
3179 gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
3183 gdbarch_make_symbol_special (struct gdbarch *gdbarch, struct symbol *sym, struct objfile *objfile)
3185 gdb_assert (gdbarch != NULL);
3186 gdb_assert (gdbarch->make_symbol_special != NULL);
3187 if (gdbarch_debug >= 2)
3188 fprintf_unfiltered (gdb_stdlog, "gdbarch_make_symbol_special called\n");
3189 gdbarch->make_symbol_special (sym, objfile);
3193 set_gdbarch_make_symbol_special (struct gdbarch *gdbarch,
3194 gdbarch_make_symbol_special_ftype make_symbol_special)
3196 gdbarch->make_symbol_special = make_symbol_special;
3200 gdbarch_adjust_dwarf2_addr (struct gdbarch *gdbarch, CORE_ADDR pc)
3202 gdb_assert (gdbarch != NULL);
3203 gdb_assert (gdbarch->adjust_dwarf2_addr != NULL);
3204 if (gdbarch_debug >= 2)
3205 fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_dwarf2_addr called\n");
3206 return gdbarch->adjust_dwarf2_addr (pc);
3210 set_gdbarch_adjust_dwarf2_addr (struct gdbarch *gdbarch,
3211 gdbarch_adjust_dwarf2_addr_ftype adjust_dwarf2_addr)
3213 gdbarch->adjust_dwarf2_addr = adjust_dwarf2_addr;
3217 gdbarch_adjust_dwarf2_line (struct gdbarch *gdbarch, CORE_ADDR addr, int rel)
3219 gdb_assert (gdbarch != NULL);
3220 gdb_assert (gdbarch->adjust_dwarf2_line != NULL);
3221 if (gdbarch_debug >= 2)
3222 fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_dwarf2_line called\n");
3223 return gdbarch->adjust_dwarf2_line (addr, rel);
3227 set_gdbarch_adjust_dwarf2_line (struct gdbarch *gdbarch,
3228 gdbarch_adjust_dwarf2_line_ftype adjust_dwarf2_line)
3230 gdbarch->adjust_dwarf2_line = adjust_dwarf2_line;
3234 gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
3236 gdb_assert (gdbarch != NULL);
3237 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
3238 if (gdbarch_debug >= 2)
3239 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
3240 return gdbarch->cannot_step_breakpoint;
3244 set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
3245 int cannot_step_breakpoint)
3247 gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
3251 gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
3253 gdb_assert (gdbarch != NULL);
3254 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
3255 if (gdbarch_debug >= 2)
3256 fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
3257 return gdbarch->have_nonsteppable_watchpoint;
3261 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
3262 int have_nonsteppable_watchpoint)
3264 gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
3268 gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
3270 gdb_assert (gdbarch != NULL);
3271 return gdbarch->address_class_type_flags != NULL;
3275 gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
3277 gdb_assert (gdbarch != NULL);
3278 gdb_assert (gdbarch->address_class_type_flags != NULL);
3279 if (gdbarch_debug >= 2)
3280 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
3281 return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
3285 set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
3286 gdbarch_address_class_type_flags_ftype address_class_type_flags)
3288 gdbarch->address_class_type_flags = address_class_type_flags;
3292 gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
3294 gdb_assert (gdbarch != NULL);
3295 return gdbarch->address_class_type_flags_to_name != NULL;
3299 gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
3301 gdb_assert (gdbarch != NULL);
3302 gdb_assert (gdbarch->address_class_type_flags_to_name != NULL);
3303 if (gdbarch_debug >= 2)
3304 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
3305 return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
3309 set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
3310 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
3312 gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
3316 gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
3318 gdb_assert (gdbarch != NULL);
3319 return gdbarch->address_class_name_to_type_flags != NULL;
3323 gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
3325 gdb_assert (gdbarch != NULL);
3326 gdb_assert (gdbarch->address_class_name_to_type_flags != NULL);
3327 if (gdbarch_debug >= 2)
3328 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
3329 return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
3333 set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
3334 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
3336 gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
3340 gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
3342 gdb_assert (gdbarch != NULL);
3343 gdb_assert (gdbarch->register_reggroup_p != NULL);
3344 if (gdbarch_debug >= 2)
3345 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
3346 return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
3350 set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
3351 gdbarch_register_reggroup_p_ftype register_reggroup_p)
3353 gdbarch->register_reggroup_p = register_reggroup_p;
3357 gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch)
3359 gdb_assert (gdbarch != NULL);
3360 return gdbarch->fetch_pointer_argument != NULL;
3364 gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type)
3366 gdb_assert (gdbarch != NULL);
3367 gdb_assert (gdbarch->fetch_pointer_argument != NULL);
3368 if (gdbarch_debug >= 2)
3369 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n");
3370 return gdbarch->fetch_pointer_argument (frame, argi, type);
3374 set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch,
3375 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument)
3377 gdbarch->fetch_pointer_argument = fetch_pointer_argument;
3381 gdbarch_iterate_over_regset_sections_p (struct gdbarch *gdbarch)
3383 gdb_assert (gdbarch != NULL);
3384 return gdbarch->iterate_over_regset_sections != NULL;
3388 gdbarch_iterate_over_regset_sections (struct gdbarch *gdbarch, iterate_over_regset_sections_cb *cb, void *cb_data, const struct regcache *regcache)
3390 gdb_assert (gdbarch != NULL);
3391 gdb_assert (gdbarch->iterate_over_regset_sections != NULL);
3392 if (gdbarch_debug >= 2)
3393 fprintf_unfiltered (gdb_stdlog, "gdbarch_iterate_over_regset_sections called\n");
3394 gdbarch->iterate_over_regset_sections (gdbarch, cb, cb_data, regcache);
3398 set_gdbarch_iterate_over_regset_sections (struct gdbarch *gdbarch,
3399 gdbarch_iterate_over_regset_sections_ftype iterate_over_regset_sections)
3401 gdbarch->iterate_over_regset_sections = iterate_over_regset_sections;
3405 gdbarch_make_corefile_notes_p (struct gdbarch *gdbarch)
3407 gdb_assert (gdbarch != NULL);
3408 return gdbarch->make_corefile_notes != NULL;
3412 gdbarch_make_corefile_notes (struct gdbarch *gdbarch, bfd *obfd, int *note_size)
3414 gdb_assert (gdbarch != NULL);
3415 gdb_assert (gdbarch->make_corefile_notes != NULL);
3416 if (gdbarch_debug >= 2)
3417 fprintf_unfiltered (gdb_stdlog, "gdbarch_make_corefile_notes called\n");
3418 return gdbarch->make_corefile_notes (gdbarch, obfd, note_size);
3422 set_gdbarch_make_corefile_notes (struct gdbarch *gdbarch,
3423 gdbarch_make_corefile_notes_ftype make_corefile_notes)
3425 gdbarch->make_corefile_notes = make_corefile_notes;
3429 gdbarch_elfcore_write_linux_prpsinfo_p (struct gdbarch *gdbarch)
3431 gdb_assert (gdbarch != NULL);
3432 return gdbarch->elfcore_write_linux_prpsinfo != NULL;
3436 gdbarch_elfcore_write_linux_prpsinfo (struct gdbarch *gdbarch, bfd *obfd, char *note_data, int *note_size, const struct elf_internal_linux_prpsinfo *info)
3438 gdb_assert (gdbarch != NULL);
3439 gdb_assert (gdbarch->elfcore_write_linux_prpsinfo != NULL);
3440 if (gdbarch_debug >= 2)
3441 fprintf_unfiltered (gdb_stdlog, "gdbarch_elfcore_write_linux_prpsinfo called\n");
3442 return gdbarch->elfcore_write_linux_prpsinfo (obfd, note_data, note_size, info);
3446 set_gdbarch_elfcore_write_linux_prpsinfo (struct gdbarch *gdbarch,
3447 gdbarch_elfcore_write_linux_prpsinfo_ftype elfcore_write_linux_prpsinfo)
3449 gdbarch->elfcore_write_linux_prpsinfo = elfcore_write_linux_prpsinfo;
3453 gdbarch_find_memory_regions_p (struct gdbarch *gdbarch)
3455 gdb_assert (gdbarch != NULL);
3456 return gdbarch->find_memory_regions != NULL;
3460 gdbarch_find_memory_regions (struct gdbarch *gdbarch, find_memory_region_ftype func, void *data)
3462 gdb_assert (gdbarch != NULL);
3463 gdb_assert (gdbarch->find_memory_regions != NULL);
3464 if (gdbarch_debug >= 2)
3465 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_memory_regions called\n");
3466 return gdbarch->find_memory_regions (gdbarch, func, data);
3470 set_gdbarch_find_memory_regions (struct gdbarch *gdbarch,
3471 gdbarch_find_memory_regions_ftype find_memory_regions)
3473 gdbarch->find_memory_regions = find_memory_regions;
3477 gdbarch_core_xfer_shared_libraries_p (struct gdbarch *gdbarch)
3479 gdb_assert (gdbarch != NULL);
3480 return gdbarch->core_xfer_shared_libraries != NULL;
3484 gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len)
3486 gdb_assert (gdbarch != NULL);
3487 gdb_assert (gdbarch->core_xfer_shared_libraries != NULL);
3488 if (gdbarch_debug >= 2)
3489 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_xfer_shared_libraries called\n");
3490 return gdbarch->core_xfer_shared_libraries (gdbarch, readbuf, offset, len);
3494 set_gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch,
3495 gdbarch_core_xfer_shared_libraries_ftype core_xfer_shared_libraries)
3497 gdbarch->core_xfer_shared_libraries = core_xfer_shared_libraries;
3501 gdbarch_core_xfer_shared_libraries_aix_p (struct gdbarch *gdbarch)
3503 gdb_assert (gdbarch != NULL);
3504 return gdbarch->core_xfer_shared_libraries_aix != NULL;
3508 gdbarch_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len)
3510 gdb_assert (gdbarch != NULL);
3511 gdb_assert (gdbarch->core_xfer_shared_libraries_aix != NULL);
3512 if (gdbarch_debug >= 2)
3513 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_xfer_shared_libraries_aix called\n");
3514 return gdbarch->core_xfer_shared_libraries_aix (gdbarch, readbuf, offset, len);
3518 set_gdbarch_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch,
3519 gdbarch_core_xfer_shared_libraries_aix_ftype core_xfer_shared_libraries_aix)
3521 gdbarch->core_xfer_shared_libraries_aix = core_xfer_shared_libraries_aix;
3525 gdbarch_core_pid_to_str_p (struct gdbarch *gdbarch)
3527 gdb_assert (gdbarch != NULL);
3528 return gdbarch->core_pid_to_str != NULL;
3532 gdbarch_core_pid_to_str (struct gdbarch *gdbarch, ptid_t ptid)
3534 gdb_assert (gdbarch != NULL);
3535 gdb_assert (gdbarch->core_pid_to_str != NULL);
3536 if (gdbarch_debug >= 2)
3537 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_pid_to_str called\n");
3538 return gdbarch->core_pid_to_str (gdbarch, ptid);
3542 set_gdbarch_core_pid_to_str (struct gdbarch *gdbarch,
3543 gdbarch_core_pid_to_str_ftype core_pid_to_str)
3545 gdbarch->core_pid_to_str = core_pid_to_str;
3549 gdbarch_gcore_bfd_target_p (struct gdbarch *gdbarch)
3551 gdb_assert (gdbarch != NULL);
3552 return gdbarch->gcore_bfd_target != 0;
3556 gdbarch_gcore_bfd_target (struct gdbarch *gdbarch)
3558 gdb_assert (gdbarch != NULL);
3559 /* Check variable changed from pre-default. */
3560 gdb_assert (gdbarch->gcore_bfd_target != 0);
3561 if (gdbarch_debug >= 2)
3562 fprintf_unfiltered (gdb_stdlog, "gdbarch_gcore_bfd_target called\n");
3563 return gdbarch->gcore_bfd_target;
3567 set_gdbarch_gcore_bfd_target (struct gdbarch *gdbarch,
3568 const char * gcore_bfd_target)
3570 gdbarch->gcore_bfd_target = gcore_bfd_target;
3574 gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch)
3576 gdb_assert (gdbarch != NULL);
3577 /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
3578 if (gdbarch_debug >= 2)
3579 fprintf_unfiltered (gdb_stdlog, "gdbarch_vtable_function_descriptors called\n");
3580 return gdbarch->vtable_function_descriptors;
3584 set_gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch,
3585 int vtable_function_descriptors)
3587 gdbarch->vtable_function_descriptors = vtable_function_descriptors;
3591 gdbarch_vbit_in_delta (struct gdbarch *gdbarch)
3593 gdb_assert (gdbarch != NULL);
3594 /* Skip verify of vbit_in_delta, invalid_p == 0 */
3595 if (gdbarch_debug >= 2)
3596 fprintf_unfiltered (gdb_stdlog, "gdbarch_vbit_in_delta called\n");
3597 return gdbarch->vbit_in_delta;
3601 set_gdbarch_vbit_in_delta (struct gdbarch *gdbarch,
3604 gdbarch->vbit_in_delta = vbit_in_delta;
3608 gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch, struct regcache *regcache)
3610 gdb_assert (gdbarch != NULL);
3611 gdb_assert (gdbarch->skip_permanent_breakpoint != NULL);
3612 if (gdbarch_debug >= 2)
3613 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_permanent_breakpoint called\n");
3614 gdbarch->skip_permanent_breakpoint (regcache);
3618 set_gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch,
3619 gdbarch_skip_permanent_breakpoint_ftype skip_permanent_breakpoint)
3621 gdbarch->skip_permanent_breakpoint = skip_permanent_breakpoint;
3625 gdbarch_max_insn_length_p (struct gdbarch *gdbarch)
3627 gdb_assert (gdbarch != NULL);
3628 return gdbarch->max_insn_length != 0;
3632 gdbarch_max_insn_length (struct gdbarch *gdbarch)
3634 gdb_assert (gdbarch != NULL);
3635 /* Check variable changed from pre-default. */
3636 gdb_assert (gdbarch->max_insn_length != 0);
3637 if (gdbarch_debug >= 2)
3638 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_insn_length called\n");
3639 return gdbarch->max_insn_length;
3643 set_gdbarch_max_insn_length (struct gdbarch *gdbarch,
3644 ULONGEST max_insn_length)
3646 gdbarch->max_insn_length = max_insn_length;
3650 gdbarch_displaced_step_copy_insn_p (struct gdbarch *gdbarch)
3652 gdb_assert (gdbarch != NULL);
3653 return gdbarch->displaced_step_copy_insn != NULL;
3656 struct displaced_step_closure *
3657 gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch, CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
3659 gdb_assert (gdbarch != NULL);
3660 gdb_assert (gdbarch->displaced_step_copy_insn != NULL);
3661 if (gdbarch_debug >= 2)
3662 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_copy_insn called\n");
3663 return gdbarch->displaced_step_copy_insn (gdbarch, from, to, regs);
3667 set_gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch,
3668 gdbarch_displaced_step_copy_insn_ftype displaced_step_copy_insn)
3670 gdbarch->displaced_step_copy_insn = displaced_step_copy_insn;
3674 gdbarch_displaced_step_hw_singlestep (struct gdbarch *gdbarch, struct displaced_step_closure *closure)
3676 gdb_assert (gdbarch != NULL);
3677 gdb_assert (gdbarch->displaced_step_hw_singlestep != NULL);
3678 if (gdbarch_debug >= 2)
3679 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_hw_singlestep called\n");
3680 return gdbarch->displaced_step_hw_singlestep (gdbarch, closure);
3684 set_gdbarch_displaced_step_hw_singlestep (struct gdbarch *gdbarch,
3685 gdbarch_displaced_step_hw_singlestep_ftype displaced_step_hw_singlestep)
3687 gdbarch->displaced_step_hw_singlestep = displaced_step_hw_singlestep;
3691 gdbarch_displaced_step_fixup_p (struct gdbarch *gdbarch)
3693 gdb_assert (gdbarch != NULL);
3694 return gdbarch->displaced_step_fixup != NULL;
3698 gdbarch_displaced_step_fixup (struct gdbarch *gdbarch, struct displaced_step_closure *closure, CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
3700 gdb_assert (gdbarch != NULL);
3701 gdb_assert (gdbarch->displaced_step_fixup != NULL);
3702 /* Do not check predicate: gdbarch->displaced_step_fixup != NULL, allow call. */
3703 if (gdbarch_debug >= 2)
3704 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_fixup called\n");
3705 gdbarch->displaced_step_fixup (gdbarch, closure, from, to, regs);
3709 set_gdbarch_displaced_step_fixup (struct gdbarch *gdbarch,
3710 gdbarch_displaced_step_fixup_ftype displaced_step_fixup)
3712 gdbarch->displaced_step_fixup = displaced_step_fixup;
3716 gdbarch_displaced_step_free_closure (struct gdbarch *gdbarch, struct displaced_step_closure *closure)
3718 gdb_assert (gdbarch != NULL);
3719 gdb_assert (gdbarch->displaced_step_free_closure != NULL);
3720 if (gdbarch_debug >= 2)
3721 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_free_closure called\n");
3722 gdbarch->displaced_step_free_closure (gdbarch, closure);
3726 set_gdbarch_displaced_step_free_closure (struct gdbarch *gdbarch,
3727 gdbarch_displaced_step_free_closure_ftype displaced_step_free_closure)
3729 gdbarch->displaced_step_free_closure = displaced_step_free_closure;
3733 gdbarch_displaced_step_location (struct gdbarch *gdbarch)
3735 gdb_assert (gdbarch != NULL);
3736 gdb_assert (gdbarch->displaced_step_location != NULL);
3737 if (gdbarch_debug >= 2)
3738 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_location called\n");
3739 return gdbarch->displaced_step_location (gdbarch);
3743 set_gdbarch_displaced_step_location (struct gdbarch *gdbarch,
3744 gdbarch_displaced_step_location_ftype displaced_step_location)
3746 gdbarch->displaced_step_location = displaced_step_location;
3750 gdbarch_relocate_instruction_p (struct gdbarch *gdbarch)
3752 gdb_assert (gdbarch != NULL);
3753 return gdbarch->relocate_instruction != NULL;
3757 gdbarch_relocate_instruction (struct gdbarch *gdbarch, CORE_ADDR *to, CORE_ADDR from)
3759 gdb_assert (gdbarch != NULL);
3760 gdb_assert (gdbarch->relocate_instruction != NULL);
3761 /* Do not check predicate: gdbarch->relocate_instruction != NULL, allow call. */
3762 if (gdbarch_debug >= 2)
3763 fprintf_unfiltered (gdb_stdlog, "gdbarch_relocate_instruction called\n");
3764 gdbarch->relocate_instruction (gdbarch, to, from);
3768 set_gdbarch_relocate_instruction (struct gdbarch *gdbarch,
3769 gdbarch_relocate_instruction_ftype relocate_instruction)
3771 gdbarch->relocate_instruction = relocate_instruction;
3775 gdbarch_overlay_update_p (struct gdbarch *gdbarch)
3777 gdb_assert (gdbarch != NULL);
3778 return gdbarch->overlay_update != NULL;
3782 gdbarch_overlay_update (struct gdbarch *gdbarch, struct obj_section *osect)
3784 gdb_assert (gdbarch != NULL);
3785 gdb_assert (gdbarch->overlay_update != NULL);
3786 if (gdbarch_debug >= 2)
3787 fprintf_unfiltered (gdb_stdlog, "gdbarch_overlay_update called\n");
3788 gdbarch->overlay_update (osect);
3792 set_gdbarch_overlay_update (struct gdbarch *gdbarch,
3793 gdbarch_overlay_update_ftype overlay_update)
3795 gdbarch->overlay_update = overlay_update;
3799 gdbarch_core_read_description_p (struct gdbarch *gdbarch)
3801 gdb_assert (gdbarch != NULL);
3802 return gdbarch->core_read_description != NULL;
3805 const struct target_desc *
3806 gdbarch_core_read_description (struct gdbarch *gdbarch, struct target_ops *target, bfd *abfd)
3808 gdb_assert (gdbarch != NULL);
3809 gdb_assert (gdbarch->core_read_description != NULL);
3810 if (gdbarch_debug >= 2)
3811 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_read_description called\n");
3812 return gdbarch->core_read_description (gdbarch, target, abfd);
3816 set_gdbarch_core_read_description (struct gdbarch *gdbarch,
3817 gdbarch_core_read_description_ftype core_read_description)
3819 gdbarch->core_read_description = core_read_description;
3823 gdbarch_static_transform_name_p (struct gdbarch *gdbarch)
3825 gdb_assert (gdbarch != NULL);
3826 return gdbarch->static_transform_name != NULL;
3830 gdbarch_static_transform_name (struct gdbarch *gdbarch, const char *name)
3832 gdb_assert (gdbarch != NULL);
3833 gdb_assert (gdbarch->static_transform_name != NULL);
3834 if (gdbarch_debug >= 2)
3835 fprintf_unfiltered (gdb_stdlog, "gdbarch_static_transform_name called\n");
3836 return gdbarch->static_transform_name (name);
3840 set_gdbarch_static_transform_name (struct gdbarch *gdbarch,
3841 gdbarch_static_transform_name_ftype static_transform_name)
3843 gdbarch->static_transform_name = static_transform_name;
3847 gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch)
3849 gdb_assert (gdbarch != NULL);
3850 /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
3851 if (gdbarch_debug >= 2)
3852 fprintf_unfiltered (gdb_stdlog, "gdbarch_sofun_address_maybe_missing called\n");
3853 return gdbarch->sofun_address_maybe_missing;
3857 set_gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch,
3858 int sofun_address_maybe_missing)
3860 gdbarch->sofun_address_maybe_missing = sofun_address_maybe_missing;
3864 gdbarch_process_record_p (struct gdbarch *gdbarch)
3866 gdb_assert (gdbarch != NULL);
3867 return gdbarch->process_record != NULL;
3871 gdbarch_process_record (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR addr)
3873 gdb_assert (gdbarch != NULL);
3874 gdb_assert (gdbarch->process_record != NULL);
3875 if (gdbarch_debug >= 2)
3876 fprintf_unfiltered (gdb_stdlog, "gdbarch_process_record called\n");
3877 return gdbarch->process_record (gdbarch, regcache, addr);
3881 set_gdbarch_process_record (struct gdbarch *gdbarch,
3882 gdbarch_process_record_ftype process_record)
3884 gdbarch->process_record = process_record;
3888 gdbarch_process_record_signal_p (struct gdbarch *gdbarch)
3890 gdb_assert (gdbarch != NULL);
3891 return gdbarch->process_record_signal != NULL;
3895 gdbarch_process_record_signal (struct gdbarch *gdbarch, struct regcache *regcache, enum gdb_signal signal)
3897 gdb_assert (gdbarch != NULL);
3898 gdb_assert (gdbarch->process_record_signal != NULL);
3899 if (gdbarch_debug >= 2)
3900 fprintf_unfiltered (gdb_stdlog, "gdbarch_process_record_signal called\n");
3901 return gdbarch->process_record_signal (gdbarch, regcache, signal);
3905 set_gdbarch_process_record_signal (struct gdbarch *gdbarch,
3906 gdbarch_process_record_signal_ftype process_record_signal)
3908 gdbarch->process_record_signal = process_record_signal;
3912 gdbarch_gdb_signal_from_target_p (struct gdbarch *gdbarch)
3914 gdb_assert (gdbarch != NULL);
3915 return gdbarch->gdb_signal_from_target != NULL;
3919 gdbarch_gdb_signal_from_target (struct gdbarch *gdbarch, int signo)
3921 gdb_assert (gdbarch != NULL);
3922 gdb_assert (gdbarch->gdb_signal_from_target != NULL);
3923 if (gdbarch_debug >= 2)
3924 fprintf_unfiltered (gdb_stdlog, "gdbarch_gdb_signal_from_target called\n");
3925 return gdbarch->gdb_signal_from_target (gdbarch, signo);
3929 set_gdbarch_gdb_signal_from_target (struct gdbarch *gdbarch,
3930 gdbarch_gdb_signal_from_target_ftype gdb_signal_from_target)
3932 gdbarch->gdb_signal_from_target = gdb_signal_from_target;
3936 gdbarch_gdb_signal_to_target_p (struct gdbarch *gdbarch)
3938 gdb_assert (gdbarch != NULL);
3939 return gdbarch->gdb_signal_to_target != NULL;
3943 gdbarch_gdb_signal_to_target (struct gdbarch *gdbarch, enum gdb_signal signal)
3945 gdb_assert (gdbarch != NULL);
3946 gdb_assert (gdbarch->gdb_signal_to_target != NULL);
3947 if (gdbarch_debug >= 2)
3948 fprintf_unfiltered (gdb_stdlog, "gdbarch_gdb_signal_to_target called\n");
3949 return gdbarch->gdb_signal_to_target (gdbarch, signal);
3953 set_gdbarch_gdb_signal_to_target (struct gdbarch *gdbarch,
3954 gdbarch_gdb_signal_to_target_ftype gdb_signal_to_target)
3956 gdbarch->gdb_signal_to_target = gdb_signal_to_target;
3960 gdbarch_get_siginfo_type_p (struct gdbarch *gdbarch)
3962 gdb_assert (gdbarch != NULL);
3963 return gdbarch->get_siginfo_type != NULL;
3967 gdbarch_get_siginfo_type (struct gdbarch *gdbarch)
3969 gdb_assert (gdbarch != NULL);
3970 gdb_assert (gdbarch->get_siginfo_type != NULL);
3971 if (gdbarch_debug >= 2)
3972 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_siginfo_type called\n");
3973 return gdbarch->get_siginfo_type (gdbarch);
3977 set_gdbarch_get_siginfo_type (struct gdbarch *gdbarch,
3978 gdbarch_get_siginfo_type_ftype get_siginfo_type)
3980 gdbarch->get_siginfo_type = get_siginfo_type;
3984 gdbarch_record_special_symbol_p (struct gdbarch *gdbarch)
3986 gdb_assert (gdbarch != NULL);
3987 return gdbarch->record_special_symbol != NULL;
3991 gdbarch_record_special_symbol (struct gdbarch *gdbarch, struct objfile *objfile, asymbol *sym)
3993 gdb_assert (gdbarch != NULL);
3994 gdb_assert (gdbarch->record_special_symbol != NULL);
3995 if (gdbarch_debug >= 2)
3996 fprintf_unfiltered (gdb_stdlog, "gdbarch_record_special_symbol called\n");
3997 gdbarch->record_special_symbol (gdbarch, objfile, sym);
4001 set_gdbarch_record_special_symbol (struct gdbarch *gdbarch,
4002 gdbarch_record_special_symbol_ftype record_special_symbol)
4004 gdbarch->record_special_symbol = record_special_symbol;
4008 gdbarch_get_syscall_number_p (struct gdbarch *gdbarch)
4010 gdb_assert (gdbarch != NULL);
4011 return gdbarch->get_syscall_number != NULL;
4015 gdbarch_get_syscall_number (struct gdbarch *gdbarch, ptid_t ptid)
4017 gdb_assert (gdbarch != NULL);
4018 gdb_assert (gdbarch->get_syscall_number != NULL);
4019 if (gdbarch_debug >= 2)
4020 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_syscall_number called\n");
4021 return gdbarch->get_syscall_number (gdbarch, ptid);
4025 set_gdbarch_get_syscall_number (struct gdbarch *gdbarch,
4026 gdbarch_get_syscall_number_ftype get_syscall_number)
4028 gdbarch->get_syscall_number = get_syscall_number;
4032 gdbarch_xml_syscall_file (struct gdbarch *gdbarch)
4034 gdb_assert (gdbarch != NULL);
4035 /* Skip verify of xml_syscall_file, invalid_p == 0 */
4036 if (gdbarch_debug >= 2)
4037 fprintf_unfiltered (gdb_stdlog, "gdbarch_xml_syscall_file called\n");
4038 return gdbarch->xml_syscall_file;
4042 set_gdbarch_xml_syscall_file (struct gdbarch *gdbarch,
4043 const char * xml_syscall_file)
4045 gdbarch->xml_syscall_file = xml_syscall_file;
4048 struct syscalls_info *
4049 gdbarch_syscalls_info (struct gdbarch *gdbarch)
4051 gdb_assert (gdbarch != NULL);
4052 /* Skip verify of syscalls_info, invalid_p == 0 */
4053 if (gdbarch_debug >= 2)
4054 fprintf_unfiltered (gdb_stdlog, "gdbarch_syscalls_info called\n");
4055 return gdbarch->syscalls_info;
4059 set_gdbarch_syscalls_info (struct gdbarch *gdbarch,
4060 struct syscalls_info * syscalls_info)
4062 gdbarch->syscalls_info = syscalls_info;
4066 gdbarch_stap_integer_prefixes (struct gdbarch *gdbarch)
4068 gdb_assert (gdbarch != NULL);
4069 /* Skip verify of stap_integer_prefixes, invalid_p == 0 */
4070 if (gdbarch_debug >= 2)
4071 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_integer_prefixes called\n");
4072 return gdbarch->stap_integer_prefixes;
4076 set_gdbarch_stap_integer_prefixes (struct gdbarch *gdbarch,
4077 const char *const * stap_integer_prefixes)
4079 gdbarch->stap_integer_prefixes = stap_integer_prefixes;
4083 gdbarch_stap_integer_suffixes (struct gdbarch *gdbarch)
4085 gdb_assert (gdbarch != NULL);
4086 /* Skip verify of stap_integer_suffixes, invalid_p == 0 */
4087 if (gdbarch_debug >= 2)
4088 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_integer_suffixes called\n");
4089 return gdbarch->stap_integer_suffixes;
4093 set_gdbarch_stap_integer_suffixes (struct gdbarch *gdbarch,
4094 const char *const * stap_integer_suffixes)
4096 gdbarch->stap_integer_suffixes = stap_integer_suffixes;
4100 gdbarch_stap_register_prefixes (struct gdbarch *gdbarch)
4102 gdb_assert (gdbarch != NULL);
4103 /* Skip verify of stap_register_prefixes, invalid_p == 0 */
4104 if (gdbarch_debug >= 2)
4105 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_prefixes called\n");
4106 return gdbarch->stap_register_prefixes;
4110 set_gdbarch_stap_register_prefixes (struct gdbarch *gdbarch,
4111 const char *const * stap_register_prefixes)
4113 gdbarch->stap_register_prefixes = stap_register_prefixes;
4117 gdbarch_stap_register_suffixes (struct gdbarch *gdbarch)
4119 gdb_assert (gdbarch != NULL);
4120 /* Skip verify of stap_register_suffixes, invalid_p == 0 */
4121 if (gdbarch_debug >= 2)
4122 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_suffixes called\n");
4123 return gdbarch->stap_register_suffixes;
4127 set_gdbarch_stap_register_suffixes (struct gdbarch *gdbarch,
4128 const char *const * stap_register_suffixes)
4130 gdbarch->stap_register_suffixes = stap_register_suffixes;
4134 gdbarch_stap_register_indirection_prefixes (struct gdbarch *gdbarch)
4136 gdb_assert (gdbarch != NULL);
4137 /* Skip verify of stap_register_indirection_prefixes, invalid_p == 0 */
4138 if (gdbarch_debug >= 2)
4139 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_indirection_prefixes called\n");
4140 return gdbarch->stap_register_indirection_prefixes;
4144 set_gdbarch_stap_register_indirection_prefixes (struct gdbarch *gdbarch,
4145 const char *const * stap_register_indirection_prefixes)
4147 gdbarch->stap_register_indirection_prefixes = stap_register_indirection_prefixes;
4151 gdbarch_stap_register_indirection_suffixes (struct gdbarch *gdbarch)
4153 gdb_assert (gdbarch != NULL);
4154 /* Skip verify of stap_register_indirection_suffixes, invalid_p == 0 */
4155 if (gdbarch_debug >= 2)
4156 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_indirection_suffixes called\n");
4157 return gdbarch->stap_register_indirection_suffixes;
4161 set_gdbarch_stap_register_indirection_suffixes (struct gdbarch *gdbarch,
4162 const char *const * stap_register_indirection_suffixes)
4164 gdbarch->stap_register_indirection_suffixes = stap_register_indirection_suffixes;
4168 gdbarch_stap_gdb_register_prefix (struct gdbarch *gdbarch)
4170 gdb_assert (gdbarch != NULL);
4171 /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */
4172 if (gdbarch_debug >= 2)
4173 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_gdb_register_prefix called\n");
4174 return gdbarch->stap_gdb_register_prefix;
4178 set_gdbarch_stap_gdb_register_prefix (struct gdbarch *gdbarch,
4179 const char * stap_gdb_register_prefix)
4181 gdbarch->stap_gdb_register_prefix = stap_gdb_register_prefix;
4185 gdbarch_stap_gdb_register_suffix (struct gdbarch *gdbarch)
4187 gdb_assert (gdbarch != NULL);
4188 /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */
4189 if (gdbarch_debug >= 2)
4190 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_gdb_register_suffix called\n");
4191 return gdbarch->stap_gdb_register_suffix;
4195 set_gdbarch_stap_gdb_register_suffix (struct gdbarch *gdbarch,
4196 const char * stap_gdb_register_suffix)
4198 gdbarch->stap_gdb_register_suffix = stap_gdb_register_suffix;
4202 gdbarch_stap_is_single_operand_p (struct gdbarch *gdbarch)
4204 gdb_assert (gdbarch != NULL);
4205 return gdbarch->stap_is_single_operand != NULL;
4209 gdbarch_stap_is_single_operand (struct gdbarch *gdbarch, const char *s)
4211 gdb_assert (gdbarch != NULL);
4212 gdb_assert (gdbarch->stap_is_single_operand != NULL);
4213 if (gdbarch_debug >= 2)
4214 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_is_single_operand called\n");
4215 return gdbarch->stap_is_single_operand (gdbarch, s);
4219 set_gdbarch_stap_is_single_operand (struct gdbarch *gdbarch,
4220 gdbarch_stap_is_single_operand_ftype stap_is_single_operand)
4222 gdbarch->stap_is_single_operand = stap_is_single_operand;
4226 gdbarch_stap_parse_special_token_p (struct gdbarch *gdbarch)
4228 gdb_assert (gdbarch != NULL);
4229 return gdbarch->stap_parse_special_token != NULL;
4233 gdbarch_stap_parse_special_token (struct gdbarch *gdbarch, struct stap_parse_info *p)
4235 gdb_assert (gdbarch != NULL);
4236 gdb_assert (gdbarch->stap_parse_special_token != NULL);
4237 if (gdbarch_debug >= 2)
4238 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_parse_special_token called\n");
4239 return gdbarch->stap_parse_special_token (gdbarch, p);
4243 set_gdbarch_stap_parse_special_token (struct gdbarch *gdbarch,
4244 gdbarch_stap_parse_special_token_ftype stap_parse_special_token)
4246 gdbarch->stap_parse_special_token = stap_parse_special_token;
4250 gdbarch_dtrace_parse_probe_argument_p (struct gdbarch *gdbarch)
4252 gdb_assert (gdbarch != NULL);
4253 return gdbarch->dtrace_parse_probe_argument != NULL;
4257 gdbarch_dtrace_parse_probe_argument (struct gdbarch *gdbarch, struct parser_state *pstate, int narg)
4259 gdb_assert (gdbarch != NULL);
4260 gdb_assert (gdbarch->dtrace_parse_probe_argument != NULL);
4261 if (gdbarch_debug >= 2)
4262 fprintf_unfiltered (gdb_stdlog, "gdbarch_dtrace_parse_probe_argument called\n");
4263 gdbarch->dtrace_parse_probe_argument (gdbarch, pstate, narg);
4267 set_gdbarch_dtrace_parse_probe_argument (struct gdbarch *gdbarch,
4268 gdbarch_dtrace_parse_probe_argument_ftype dtrace_parse_probe_argument)
4270 gdbarch->dtrace_parse_probe_argument = dtrace_parse_probe_argument;
4274 gdbarch_dtrace_probe_is_enabled_p (struct gdbarch *gdbarch)
4276 gdb_assert (gdbarch != NULL);
4277 return gdbarch->dtrace_probe_is_enabled != NULL;
4281 gdbarch_dtrace_probe_is_enabled (struct gdbarch *gdbarch, CORE_ADDR addr)
4283 gdb_assert (gdbarch != NULL);
4284 gdb_assert (gdbarch->dtrace_probe_is_enabled != NULL);
4285 if (gdbarch_debug >= 2)
4286 fprintf_unfiltered (gdb_stdlog, "gdbarch_dtrace_probe_is_enabled called\n");
4287 return gdbarch->dtrace_probe_is_enabled (gdbarch, addr);
4291 set_gdbarch_dtrace_probe_is_enabled (struct gdbarch *gdbarch,
4292 gdbarch_dtrace_probe_is_enabled_ftype dtrace_probe_is_enabled)
4294 gdbarch->dtrace_probe_is_enabled = dtrace_probe_is_enabled;
4298 gdbarch_dtrace_enable_probe_p (struct gdbarch *gdbarch)
4300 gdb_assert (gdbarch != NULL);
4301 return gdbarch->dtrace_enable_probe != NULL;
4305 gdbarch_dtrace_enable_probe (struct gdbarch *gdbarch, CORE_ADDR addr)
4307 gdb_assert (gdbarch != NULL);
4308 gdb_assert (gdbarch->dtrace_enable_probe != NULL);
4309 if (gdbarch_debug >= 2)
4310 fprintf_unfiltered (gdb_stdlog, "gdbarch_dtrace_enable_probe called\n");
4311 gdbarch->dtrace_enable_probe (gdbarch, addr);
4315 set_gdbarch_dtrace_enable_probe (struct gdbarch *gdbarch,
4316 gdbarch_dtrace_enable_probe_ftype dtrace_enable_probe)
4318 gdbarch->dtrace_enable_probe = dtrace_enable_probe;
4322 gdbarch_dtrace_disable_probe_p (struct gdbarch *gdbarch)
4324 gdb_assert (gdbarch != NULL);
4325 return gdbarch->dtrace_disable_probe != NULL;
4329 gdbarch_dtrace_disable_probe (struct gdbarch *gdbarch, CORE_ADDR addr)
4331 gdb_assert (gdbarch != NULL);
4332 gdb_assert (gdbarch->dtrace_disable_probe != NULL);
4333 if (gdbarch_debug >= 2)
4334 fprintf_unfiltered (gdb_stdlog, "gdbarch_dtrace_disable_probe called\n");
4335 gdbarch->dtrace_disable_probe (gdbarch, addr);
4339 set_gdbarch_dtrace_disable_probe (struct gdbarch *gdbarch,
4340 gdbarch_dtrace_disable_probe_ftype dtrace_disable_probe)
4342 gdbarch->dtrace_disable_probe = dtrace_disable_probe;
4346 gdbarch_has_global_solist (struct gdbarch *gdbarch)
4348 gdb_assert (gdbarch != NULL);
4349 /* Skip verify of has_global_solist, invalid_p == 0 */
4350 if (gdbarch_debug >= 2)
4351 fprintf_unfiltered (gdb_stdlog, "gdbarch_has_global_solist called\n");
4352 return gdbarch->has_global_solist;
4356 set_gdbarch_has_global_solist (struct gdbarch *gdbarch,
4357 int has_global_solist)
4359 gdbarch->has_global_solist = has_global_solist;
4363 gdbarch_has_global_breakpoints (struct gdbarch *gdbarch)
4365 gdb_assert (gdbarch != NULL);
4366 /* Skip verify of has_global_breakpoints, invalid_p == 0 */
4367 if (gdbarch_debug >= 2)
4368 fprintf_unfiltered (gdb_stdlog, "gdbarch_has_global_breakpoints called\n");
4369 return gdbarch->has_global_breakpoints;
4373 set_gdbarch_has_global_breakpoints (struct gdbarch *gdbarch,
4374 int has_global_breakpoints)
4376 gdbarch->has_global_breakpoints = has_global_breakpoints;
4380 gdbarch_has_shared_address_space (struct gdbarch *gdbarch)
4382 gdb_assert (gdbarch != NULL);
4383 gdb_assert (gdbarch->has_shared_address_space != NULL);
4384 if (gdbarch_debug >= 2)
4385 fprintf_unfiltered (gdb_stdlog, "gdbarch_has_shared_address_space called\n");
4386 return gdbarch->has_shared_address_space (gdbarch);
4390 set_gdbarch_has_shared_address_space (struct gdbarch *gdbarch,
4391 gdbarch_has_shared_address_space_ftype has_shared_address_space)
4393 gdbarch->has_shared_address_space = has_shared_address_space;
4397 gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch, CORE_ADDR addr, char **msg)
4399 gdb_assert (gdbarch != NULL);
4400 gdb_assert (gdbarch->fast_tracepoint_valid_at != NULL);
4401 if (gdbarch_debug >= 2)
4402 fprintf_unfiltered (gdb_stdlog, "gdbarch_fast_tracepoint_valid_at called\n");
4403 return gdbarch->fast_tracepoint_valid_at (gdbarch, addr, msg);
4407 set_gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch,
4408 gdbarch_fast_tracepoint_valid_at_ftype fast_tracepoint_valid_at)
4410 gdbarch->fast_tracepoint_valid_at = fast_tracepoint_valid_at;
4414 gdbarch_auto_charset (struct gdbarch *gdbarch)
4416 gdb_assert (gdbarch != NULL);
4417 gdb_assert (gdbarch->auto_charset != NULL);
4418 if (gdbarch_debug >= 2)
4419 fprintf_unfiltered (gdb_stdlog, "gdbarch_auto_charset called\n");
4420 return gdbarch->auto_charset ();
4424 set_gdbarch_auto_charset (struct gdbarch *gdbarch,
4425 gdbarch_auto_charset_ftype auto_charset)
4427 gdbarch->auto_charset = auto_charset;
4431 gdbarch_auto_wide_charset (struct gdbarch *gdbarch)
4433 gdb_assert (gdbarch != NULL);
4434 gdb_assert (gdbarch->auto_wide_charset != NULL);
4435 if (gdbarch_debug >= 2)
4436 fprintf_unfiltered (gdb_stdlog, "gdbarch_auto_wide_charset called\n");
4437 return gdbarch->auto_wide_charset ();
4441 set_gdbarch_auto_wide_charset (struct gdbarch *gdbarch,
4442 gdbarch_auto_wide_charset_ftype auto_wide_charset)
4444 gdbarch->auto_wide_charset = auto_wide_charset;
4448 gdbarch_solib_symbols_extension (struct gdbarch *gdbarch)
4450 gdb_assert (gdbarch != NULL);
4451 if (gdbarch_debug >= 2)
4452 fprintf_unfiltered (gdb_stdlog, "gdbarch_solib_symbols_extension called\n");
4453 return gdbarch->solib_symbols_extension;
4457 set_gdbarch_solib_symbols_extension (struct gdbarch *gdbarch,
4458 const char * solib_symbols_extension)
4460 gdbarch->solib_symbols_extension = solib_symbols_extension;
4464 gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch)
4466 gdb_assert (gdbarch != NULL);
4467 /* Skip verify of has_dos_based_file_system, invalid_p == 0 */
4468 if (gdbarch_debug >= 2)
4469 fprintf_unfiltered (gdb_stdlog, "gdbarch_has_dos_based_file_system called\n");
4470 return gdbarch->has_dos_based_file_system;
4474 set_gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch,
4475 int has_dos_based_file_system)
4477 gdbarch->has_dos_based_file_system = has_dos_based_file_system;
4481 gdbarch_gen_return_address (struct gdbarch *gdbarch, struct agent_expr *ax, struct axs_value *value, CORE_ADDR scope)
4483 gdb_assert (gdbarch != NULL);
4484 gdb_assert (gdbarch->gen_return_address != NULL);
4485 if (gdbarch_debug >= 2)
4486 fprintf_unfiltered (gdb_stdlog, "gdbarch_gen_return_address called\n");
4487 gdbarch->gen_return_address (gdbarch, ax, value, scope);
4491 set_gdbarch_gen_return_address (struct gdbarch *gdbarch,
4492 gdbarch_gen_return_address_ftype gen_return_address)
4494 gdbarch->gen_return_address = gen_return_address;
4498 gdbarch_info_proc_p (struct gdbarch *gdbarch)
4500 gdb_assert (gdbarch != NULL);
4501 return gdbarch->info_proc != NULL;
4505 gdbarch_info_proc (struct gdbarch *gdbarch, const char *args, enum info_proc_what what)
4507 gdb_assert (gdbarch != NULL);
4508 gdb_assert (gdbarch->info_proc != NULL);
4509 if (gdbarch_debug >= 2)
4510 fprintf_unfiltered (gdb_stdlog, "gdbarch_info_proc called\n");
4511 gdbarch->info_proc (gdbarch, args, what);
4515 set_gdbarch_info_proc (struct gdbarch *gdbarch,
4516 gdbarch_info_proc_ftype info_proc)
4518 gdbarch->info_proc = info_proc;
4522 gdbarch_core_info_proc_p (struct gdbarch *gdbarch)
4524 gdb_assert (gdbarch != NULL);
4525 return gdbarch->core_info_proc != NULL;
4529 gdbarch_core_info_proc (struct gdbarch *gdbarch, const char *args, enum info_proc_what what)
4531 gdb_assert (gdbarch != NULL);
4532 gdb_assert (gdbarch->core_info_proc != NULL);
4533 if (gdbarch_debug >= 2)
4534 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_info_proc called\n");
4535 gdbarch->core_info_proc (gdbarch, args, what);
4539 set_gdbarch_core_info_proc (struct gdbarch *gdbarch,
4540 gdbarch_core_info_proc_ftype core_info_proc)
4542 gdbarch->core_info_proc = core_info_proc;
4546 gdbarch_iterate_over_objfiles_in_search_order (struct gdbarch *gdbarch, iterate_over_objfiles_in_search_order_cb_ftype *cb, void *cb_data, struct objfile *current_objfile)
4548 gdb_assert (gdbarch != NULL);
4549 gdb_assert (gdbarch->iterate_over_objfiles_in_search_order != NULL);
4550 if (gdbarch_debug >= 2)
4551 fprintf_unfiltered (gdb_stdlog, "gdbarch_iterate_over_objfiles_in_search_order called\n");
4552 gdbarch->iterate_over_objfiles_in_search_order (gdbarch, cb, cb_data, current_objfile);
4556 set_gdbarch_iterate_over_objfiles_in_search_order (struct gdbarch *gdbarch,
4557 gdbarch_iterate_over_objfiles_in_search_order_ftype iterate_over_objfiles_in_search_order)
4559 gdbarch->iterate_over_objfiles_in_search_order = iterate_over_objfiles_in_search_order;
4562 struct ravenscar_arch_ops *
4563 gdbarch_ravenscar_ops (struct gdbarch *gdbarch)
4565 gdb_assert (gdbarch != NULL);
4566 /* Skip verify of ravenscar_ops, invalid_p == 0 */
4567 if (gdbarch_debug >= 2)
4568 fprintf_unfiltered (gdb_stdlog, "gdbarch_ravenscar_ops called\n");
4569 return gdbarch->ravenscar_ops;
4573 set_gdbarch_ravenscar_ops (struct gdbarch *gdbarch,
4574 struct ravenscar_arch_ops * ravenscar_ops)
4576 gdbarch->ravenscar_ops = ravenscar_ops;
4580 gdbarch_insn_is_call (struct gdbarch *gdbarch, CORE_ADDR addr)
4582 gdb_assert (gdbarch != NULL);
4583 gdb_assert (gdbarch->insn_is_call != NULL);
4584 if (gdbarch_debug >= 2)
4585 fprintf_unfiltered (gdb_stdlog, "gdbarch_insn_is_call called\n");
4586 return gdbarch->insn_is_call (gdbarch, addr);
4590 set_gdbarch_insn_is_call (struct gdbarch *gdbarch,
4591 gdbarch_insn_is_call_ftype insn_is_call)
4593 gdbarch->insn_is_call = insn_is_call;
4597 gdbarch_insn_is_ret (struct gdbarch *gdbarch, CORE_ADDR addr)
4599 gdb_assert (gdbarch != NULL);
4600 gdb_assert (gdbarch->insn_is_ret != NULL);
4601 if (gdbarch_debug >= 2)
4602 fprintf_unfiltered (gdb_stdlog, "gdbarch_insn_is_ret called\n");
4603 return gdbarch->insn_is_ret (gdbarch, addr);
4607 set_gdbarch_insn_is_ret (struct gdbarch *gdbarch,
4608 gdbarch_insn_is_ret_ftype insn_is_ret)
4610 gdbarch->insn_is_ret = insn_is_ret;
4614 gdbarch_insn_is_jump (struct gdbarch *gdbarch, CORE_ADDR addr)
4616 gdb_assert (gdbarch != NULL);
4617 gdb_assert (gdbarch->insn_is_jump != NULL);
4618 if (gdbarch_debug >= 2)
4619 fprintf_unfiltered (gdb_stdlog, "gdbarch_insn_is_jump called\n");
4620 return gdbarch->insn_is_jump (gdbarch, addr);
4624 set_gdbarch_insn_is_jump (struct gdbarch *gdbarch,
4625 gdbarch_insn_is_jump_ftype insn_is_jump)
4627 gdbarch->insn_is_jump = insn_is_jump;
4631 gdbarch_auxv_parse_p (struct gdbarch *gdbarch)
4633 gdb_assert (gdbarch != NULL);
4634 return gdbarch->auxv_parse != NULL;
4638 gdbarch_auxv_parse (struct gdbarch *gdbarch, gdb_byte **readptr, gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp)
4640 gdb_assert (gdbarch != NULL);
4641 gdb_assert (gdbarch->auxv_parse != NULL);
4642 if (gdbarch_debug >= 2)
4643 fprintf_unfiltered (gdb_stdlog, "gdbarch_auxv_parse called\n");
4644 return gdbarch->auxv_parse (gdbarch, readptr, endptr, typep, valp);
4648 set_gdbarch_auxv_parse (struct gdbarch *gdbarch,
4649 gdbarch_auxv_parse_ftype auxv_parse)
4651 gdbarch->auxv_parse = auxv_parse;
4655 gdbarch_vsyscall_range (struct gdbarch *gdbarch, struct mem_range *range)
4657 gdb_assert (gdbarch != NULL);
4658 gdb_assert (gdbarch->vsyscall_range != NULL);
4659 if (gdbarch_debug >= 2)
4660 fprintf_unfiltered (gdb_stdlog, "gdbarch_vsyscall_range called\n");
4661 return gdbarch->vsyscall_range (gdbarch, range);
4665 set_gdbarch_vsyscall_range (struct gdbarch *gdbarch,
4666 gdbarch_vsyscall_range_ftype vsyscall_range)
4668 gdbarch->vsyscall_range = vsyscall_range;
4672 gdbarch_infcall_mmap (struct gdbarch *gdbarch, CORE_ADDR size, unsigned prot)
4674 gdb_assert (gdbarch != NULL);
4675 gdb_assert (gdbarch->infcall_mmap != NULL);
4676 if (gdbarch_debug >= 2)
4677 fprintf_unfiltered (gdb_stdlog, "gdbarch_infcall_mmap called\n");
4678 return gdbarch->infcall_mmap (size, prot);
4682 set_gdbarch_infcall_mmap (struct gdbarch *gdbarch,
4683 gdbarch_infcall_mmap_ftype infcall_mmap)
4685 gdbarch->infcall_mmap = infcall_mmap;
4689 gdbarch_infcall_munmap (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR size)
4691 gdb_assert (gdbarch != NULL);
4692 gdb_assert (gdbarch->infcall_munmap != NULL);
4693 if (gdbarch_debug >= 2)
4694 fprintf_unfiltered (gdb_stdlog, "gdbarch_infcall_munmap called\n");
4695 gdbarch->infcall_munmap (addr, size);
4699 set_gdbarch_infcall_munmap (struct gdbarch *gdbarch,
4700 gdbarch_infcall_munmap_ftype infcall_munmap)
4702 gdbarch->infcall_munmap = infcall_munmap;
4706 gdbarch_gcc_target_options (struct gdbarch *gdbarch)
4708 gdb_assert (gdbarch != NULL);
4709 gdb_assert (gdbarch->gcc_target_options != NULL);
4710 if (gdbarch_debug >= 2)
4711 fprintf_unfiltered (gdb_stdlog, "gdbarch_gcc_target_options called\n");
4712 return gdbarch->gcc_target_options (gdbarch);
4716 set_gdbarch_gcc_target_options (struct gdbarch *gdbarch,
4717 gdbarch_gcc_target_options_ftype gcc_target_options)
4719 gdbarch->gcc_target_options = gcc_target_options;
4723 gdbarch_gnu_triplet_regexp (struct gdbarch *gdbarch)
4725 gdb_assert (gdbarch != NULL);
4726 gdb_assert (gdbarch->gnu_triplet_regexp != NULL);
4727 if (gdbarch_debug >= 2)
4728 fprintf_unfiltered (gdb_stdlog, "gdbarch_gnu_triplet_regexp called\n");
4729 return gdbarch->gnu_triplet_regexp (gdbarch);
4733 set_gdbarch_gnu_triplet_regexp (struct gdbarch *gdbarch,
4734 gdbarch_gnu_triplet_regexp_ftype gnu_triplet_regexp)
4736 gdbarch->gnu_triplet_regexp = gnu_triplet_regexp;
4740 gdbarch_addressable_memory_unit_size (struct gdbarch *gdbarch)
4742 gdb_assert (gdbarch != NULL);
4743 gdb_assert (gdbarch->addressable_memory_unit_size != NULL);
4744 if (gdbarch_debug >= 2)
4745 fprintf_unfiltered (gdb_stdlog, "gdbarch_addressable_memory_unit_size called\n");
4746 return gdbarch->addressable_memory_unit_size (gdbarch);
4750 set_gdbarch_addressable_memory_unit_size (struct gdbarch *gdbarch,
4751 gdbarch_addressable_memory_unit_size_ftype addressable_memory_unit_size)
4753 gdbarch->addressable_memory_unit_size = addressable_memory_unit_size;
4757 /* Keep a registry of per-architecture data-pointers required by GDB
4764 gdbarch_data_pre_init_ftype *pre_init;
4765 gdbarch_data_post_init_ftype *post_init;
4768 struct gdbarch_data_registration
4770 struct gdbarch_data *data;
4771 struct gdbarch_data_registration *next;
4774 struct gdbarch_data_registry
4777 struct gdbarch_data_registration *registrations;
4780 struct gdbarch_data_registry gdbarch_data_registry =
4785 static struct gdbarch_data *
4786 gdbarch_data_register (gdbarch_data_pre_init_ftype *pre_init,
4787 gdbarch_data_post_init_ftype *post_init)
4789 struct gdbarch_data_registration **curr;
4791 /* Append the new registration. */
4792 for (curr = &gdbarch_data_registry.registrations;
4794 curr = &(*curr)->next);
4795 (*curr) = XNEW (struct gdbarch_data_registration);
4796 (*curr)->next = NULL;
4797 (*curr)->data = XNEW (struct gdbarch_data);
4798 (*curr)->data->index = gdbarch_data_registry.nr++;
4799 (*curr)->data->pre_init = pre_init;
4800 (*curr)->data->post_init = post_init;
4801 (*curr)->data->init_p = 1;
4802 return (*curr)->data;
4805 struct gdbarch_data *
4806 gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype *pre_init)
4808 return gdbarch_data_register (pre_init, NULL);
4811 struct gdbarch_data *
4812 gdbarch_data_register_post_init (gdbarch_data_post_init_ftype *post_init)
4814 return gdbarch_data_register (NULL, post_init);
4817 /* Create/delete the gdbarch data vector. */
4820 alloc_gdbarch_data (struct gdbarch *gdbarch)
4822 gdb_assert (gdbarch->data == NULL);
4823 gdbarch->nr_data = gdbarch_data_registry.nr;
4824 gdbarch->data = GDBARCH_OBSTACK_CALLOC (gdbarch, gdbarch->nr_data, void *);
4827 /* Initialize the current value of the specified per-architecture
4831 deprecated_set_gdbarch_data (struct gdbarch *gdbarch,
4832 struct gdbarch_data *data,
4835 gdb_assert (data->index < gdbarch->nr_data);
4836 gdb_assert (gdbarch->data[data->index] == NULL);
4837 gdb_assert (data->pre_init == NULL);
4838 gdbarch->data[data->index] = pointer;
4841 /* Return the current value of the specified per-architecture
4845 gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
4847 gdb_assert (data->index < gdbarch->nr_data);
4848 if (gdbarch->data[data->index] == NULL)
4850 /* The data-pointer isn't initialized, call init() to get a
4852 if (data->pre_init != NULL)
4853 /* Mid architecture creation: pass just the obstack, and not
4854 the entire architecture, as that way it isn't possible for
4855 pre-init code to refer to undefined architecture
4857 gdbarch->data[data->index] = data->pre_init (gdbarch->obstack);
4858 else if (gdbarch->initialized_p
4859 && data->post_init != NULL)
4860 /* Post architecture creation: pass the entire architecture
4861 (as all fields are valid), but be careful to also detect
4862 recursive references. */
4864 gdb_assert (data->init_p);
4866 gdbarch->data[data->index] = data->post_init (gdbarch);
4870 /* The architecture initialization hasn't completed - punt -
4871 hope that the caller knows what they are doing. Once
4872 deprecated_set_gdbarch_data has been initialized, this can be
4873 changed to an internal error. */
4875 gdb_assert (gdbarch->data[data->index] != NULL);
4877 return gdbarch->data[data->index];
4881 /* Keep a registry of the architectures known by GDB. */
4883 struct gdbarch_registration
4885 enum bfd_architecture bfd_architecture;
4886 gdbarch_init_ftype *init;
4887 gdbarch_dump_tdep_ftype *dump_tdep;
4888 struct gdbarch_list *arches;
4889 struct gdbarch_registration *next;
4892 static struct gdbarch_registration *gdbarch_registry = NULL;
4895 append_name (const char ***buf, int *nr, const char *name)
4897 *buf = XRESIZEVEC (const char *, *buf, *nr + 1);
4903 gdbarch_printable_names (void)
4905 /* Accumulate a list of names based on the registed list of
4908 const char **arches = NULL;
4909 struct gdbarch_registration *rego;
4911 for (rego = gdbarch_registry;
4915 const struct bfd_arch_info *ap;
4916 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
4918 internal_error (__FILE__, __LINE__,
4919 _("gdbarch_architecture_names: multi-arch unknown"));
4922 append_name (&arches, &nr_arches, ap->printable_name);
4927 append_name (&arches, &nr_arches, NULL);
4933 gdbarch_register (enum bfd_architecture bfd_architecture,
4934 gdbarch_init_ftype *init,
4935 gdbarch_dump_tdep_ftype *dump_tdep)
4937 struct gdbarch_registration **curr;
4938 const struct bfd_arch_info *bfd_arch_info;
4940 /* Check that BFD recognizes this architecture */
4941 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
4942 if (bfd_arch_info == NULL)
4944 internal_error (__FILE__, __LINE__,
4945 _("gdbarch: Attempt to register "
4946 "unknown architecture (%d)"),
4949 /* Check that we haven't seen this architecture before. */
4950 for (curr = &gdbarch_registry;
4952 curr = &(*curr)->next)
4954 if (bfd_architecture == (*curr)->bfd_architecture)
4955 internal_error (__FILE__, __LINE__,
4956 _("gdbarch: Duplicate registration "
4957 "of architecture (%s)"),
4958 bfd_arch_info->printable_name);
4962 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, %s)\n",
4963 bfd_arch_info->printable_name,
4964 host_address_to_string (init));
4966 (*curr) = XNEW (struct gdbarch_registration);
4967 (*curr)->bfd_architecture = bfd_architecture;
4968 (*curr)->init = init;
4969 (*curr)->dump_tdep = dump_tdep;
4970 (*curr)->arches = NULL;
4971 (*curr)->next = NULL;
4975 register_gdbarch_init (enum bfd_architecture bfd_architecture,
4976 gdbarch_init_ftype *init)
4978 gdbarch_register (bfd_architecture, init, NULL);
4982 /* Look for an architecture using gdbarch_info. */
4984 struct gdbarch_list *
4985 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
4986 const struct gdbarch_info *info)
4988 for (; arches != NULL; arches = arches->next)
4990 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
4992 if (info->byte_order != arches->gdbarch->byte_order)
4994 if (info->osabi != arches->gdbarch->osabi)
4996 if (info->target_desc != arches->gdbarch->target_desc)
5004 /* Find an architecture that matches the specified INFO. Create a new
5005 architecture if needed. Return that new architecture. */
5008 gdbarch_find_by_info (struct gdbarch_info info)
5010 struct gdbarch *new_gdbarch;
5011 struct gdbarch_registration *rego;
5013 /* Fill in missing parts of the INFO struct using a number of
5014 sources: "set ..."; INFOabfd supplied; and the global
5016 gdbarch_info_fill (&info);
5018 /* Must have found some sort of architecture. */
5019 gdb_assert (info.bfd_arch_info != NULL);
5023 fprintf_unfiltered (gdb_stdlog,
5024 "gdbarch_find_by_info: info.bfd_arch_info %s\n",
5025 (info.bfd_arch_info != NULL
5026 ? info.bfd_arch_info->printable_name
5028 fprintf_unfiltered (gdb_stdlog,
5029 "gdbarch_find_by_info: info.byte_order %d (%s)\n",
5031 (info.byte_order == BFD_ENDIAN_BIG ? "big"
5032 : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
5034 fprintf_unfiltered (gdb_stdlog,
5035 "gdbarch_find_by_info: info.osabi %d (%s)\n",
5036 info.osabi, gdbarch_osabi_name (info.osabi));
5037 fprintf_unfiltered (gdb_stdlog,
5038 "gdbarch_find_by_info: info.abfd %s\n",
5039 host_address_to_string (info.abfd));
5040 fprintf_unfiltered (gdb_stdlog,
5041 "gdbarch_find_by_info: info.tdep_info %s\n",
5042 host_address_to_string (info.tdep_info));
5045 /* Find the tdep code that knows about this architecture. */
5046 for (rego = gdbarch_registry;
5049 if (rego->bfd_architecture == info.bfd_arch_info->arch)
5054 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
5055 "No matching architecture\n");
5059 /* Ask the tdep code for an architecture that matches "info". */
5060 new_gdbarch = rego->init (info, rego->arches);
5062 /* Did the tdep code like it? No. Reject the change and revert to
5063 the old architecture. */
5064 if (new_gdbarch == NULL)
5067 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
5068 "Target rejected architecture\n");
5072 /* Is this a pre-existing architecture (as determined by already
5073 being initialized)? Move it to the front of the architecture
5074 list (keeping the list sorted Most Recently Used). */
5075 if (new_gdbarch->initialized_p)
5077 struct gdbarch_list **list;
5078 struct gdbarch_list *self;
5080 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
5081 "Previous architecture %s (%s) selected\n",
5082 host_address_to_string (new_gdbarch),
5083 new_gdbarch->bfd_arch_info->printable_name);
5084 /* Find the existing arch in the list. */
5085 for (list = ®o->arches;
5086 (*list) != NULL && (*list)->gdbarch != new_gdbarch;
5087 list = &(*list)->next);
5088 /* It had better be in the list of architectures. */
5089 gdb_assert ((*list) != NULL && (*list)->gdbarch == new_gdbarch);
5092 (*list) = self->next;
5093 /* Insert SELF at the front. */
5094 self->next = rego->arches;
5095 rego->arches = self;
5100 /* It's a new architecture. */
5102 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
5103 "New architecture %s (%s) selected\n",
5104 host_address_to_string (new_gdbarch),
5105 new_gdbarch->bfd_arch_info->printable_name);
5107 /* Insert the new architecture into the front of the architecture
5108 list (keep the list sorted Most Recently Used). */
5110 struct gdbarch_list *self = XNEW (struct gdbarch_list);
5111 self->next = rego->arches;
5112 self->gdbarch = new_gdbarch;
5113 rego->arches = self;
5116 /* Check that the newly installed architecture is valid. Plug in
5117 any post init values. */
5118 new_gdbarch->dump_tdep = rego->dump_tdep;
5119 verify_gdbarch (new_gdbarch);
5120 new_gdbarch->initialized_p = 1;
5123 gdbarch_dump (new_gdbarch, gdb_stdlog);
5128 /* Make the specified architecture current. */
5131 set_target_gdbarch (struct gdbarch *new_gdbarch)
5133 gdb_assert (new_gdbarch != NULL);
5134 gdb_assert (new_gdbarch->initialized_p);
5135 current_inferior ()->gdbarch = new_gdbarch;
5136 observer_notify_architecture_changed (new_gdbarch);
5137 registers_changed ();
5140 /* Return the current inferior's arch. */
5143 target_gdbarch (void)
5145 return current_inferior ()->gdbarch;
5148 extern void _initialize_gdbarch (void);
5151 _initialize_gdbarch (void)
5153 add_setshow_zuinteger_cmd ("arch", class_maintenance, &gdbarch_debug, _("\
5154 Set architecture debugging."), _("\
5155 Show architecture debugging."), _("\
5156 When non-zero, architecture debugging is enabled."),
5159 &setdebuglist, &showdebuglist);