1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED -*- buffer-read-only: t -*- */
4 /* Dynamic architecture support for GDB, the GNU debugger.
6 Copyright (C) 1998-2017 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"
52 /* Static function declarations */
54 static void alloc_gdbarch_data (struct gdbarch *);
56 /* Non-zero if we want to trace architecture code. */
59 #define GDBARCH_DEBUG 0
61 unsigned int gdbarch_debug = GDBARCH_DEBUG;
63 show_gdbarch_debug (struct ui_file *file, int from_tty,
64 struct cmd_list_element *c, const char *value)
66 fprintf_filtered (file, _("Architecture debugging is %s.\n"), value);
70 pformat (const struct floatformat **format)
75 /* Just print out one of them - this is only for diagnostics. */
76 return format[0]->name;
80 pstring (const char *string)
87 /* Helper function to print a list of strings, represented as "const
88 char *const *". The list is printed comma-separated. */
91 pstring_list (const char *const *list)
101 for (p = list; *p != NULL && offset < sizeof (ret); ++p)
103 size_t s = xsnprintf (ret + offset, sizeof (ret) - offset, "%s, ", *p);
109 gdb_assert (offset - 2 < sizeof (ret));
110 ret[offset - 2] = '\0';
117 /* Maintain the struct gdbarch object. */
121 /* Has this architecture been fully initialized? */
124 /* An obstack bound to the lifetime of the architecture. */
125 struct obstack *obstack;
127 /* basic architectural information. */
128 const struct bfd_arch_info * bfd_arch_info;
129 enum bfd_endian byte_order;
130 enum bfd_endian byte_order_for_code;
131 enum gdb_osabi osabi;
132 const struct target_desc * target_desc;
134 /* target specific vector. */
135 struct gdbarch_tdep *tdep;
136 gdbarch_dump_tdep_ftype *dump_tdep;
138 /* per-architecture data-pointers. */
142 /* Multi-arch values.
144 When extending this structure you must:
148 Declare set/get functions and define the corresponding
151 gdbarch_alloc(): If zero/NULL is not a suitable default,
152 initialize the new field.
154 verify_gdbarch(): Confirm that the target updated the field
157 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
160 get_gdbarch(): Implement the set/get functions (probably using
161 the macro's as shortcuts).
170 int long_long_align_bit;
172 const struct floatformat ** half_format;
174 const struct floatformat ** float_format;
176 const struct floatformat ** double_format;
178 const struct floatformat ** long_double_format;
179 gdbarch_floatformat_for_type_ftype *floatformat_for_type;
182 int dwarf2_addr_size;
184 gdbarch_read_pc_ftype *read_pc;
185 gdbarch_write_pc_ftype *write_pc;
186 gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer;
187 gdbarch_pseudo_register_read_ftype *pseudo_register_read;
188 gdbarch_pseudo_register_read_value_ftype *pseudo_register_read_value;
189 gdbarch_pseudo_register_write_ftype *pseudo_register_write;
192 gdbarch_ax_pseudo_register_collect_ftype *ax_pseudo_register_collect;
193 gdbarch_ax_pseudo_register_push_stack_ftype *ax_pseudo_register_push_stack;
194 gdbarch_handle_segmentation_fault_ftype *handle_segmentation_fault;
199 gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum;
200 gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum;
201 gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum;
202 gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum;
203 gdbarch_register_name_ftype *register_name;
204 gdbarch_register_type_ftype *register_type;
205 gdbarch_dummy_id_ftype *dummy_id;
206 int deprecated_fp_regnum;
207 gdbarch_push_dummy_call_ftype *push_dummy_call;
208 int call_dummy_location;
209 gdbarch_push_dummy_code_ftype *push_dummy_code;
210 gdbarch_code_of_frame_writable_ftype *code_of_frame_writable;
211 gdbarch_print_registers_info_ftype *print_registers_info;
212 gdbarch_print_float_info_ftype *print_float_info;
213 gdbarch_print_vector_info_ftype *print_vector_info;
214 gdbarch_register_sim_regno_ftype *register_sim_regno;
215 gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
216 gdbarch_cannot_store_register_ftype *cannot_store_register;
217 gdbarch_get_longjmp_target_ftype *get_longjmp_target;
218 int believe_pcc_promotion;
219 gdbarch_convert_register_p_ftype *convert_register_p;
220 gdbarch_register_to_value_ftype *register_to_value;
221 gdbarch_value_to_register_ftype *value_to_register;
222 gdbarch_value_from_register_ftype *value_from_register;
223 gdbarch_pointer_to_address_ftype *pointer_to_address;
224 gdbarch_address_to_pointer_ftype *address_to_pointer;
225 gdbarch_integer_to_address_ftype *integer_to_address;
226 gdbarch_return_value_ftype *return_value;
227 gdbarch_return_in_first_hidden_param_p_ftype *return_in_first_hidden_param_p;
228 gdbarch_skip_prologue_ftype *skip_prologue;
229 gdbarch_skip_main_prologue_ftype *skip_main_prologue;
230 gdbarch_skip_entrypoint_ftype *skip_entrypoint;
231 gdbarch_inner_than_ftype *inner_than;
232 gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
233 gdbarch_breakpoint_kind_from_pc_ftype *breakpoint_kind_from_pc;
234 gdbarch_sw_breakpoint_from_kind_ftype *sw_breakpoint_from_kind;
235 gdbarch_breakpoint_kind_from_current_state_ftype *breakpoint_kind_from_current_state;
236 gdbarch_adjust_breakpoint_address_ftype *adjust_breakpoint_address;
237 gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
238 gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
239 CORE_ADDR decr_pc_after_break;
240 CORE_ADDR deprecated_function_start_offset;
241 gdbarch_remote_register_number_ftype *remote_register_number;
242 gdbarch_fetch_tls_load_module_address_ftype *fetch_tls_load_module_address;
243 CORE_ADDR frame_args_skip;
244 gdbarch_unwind_pc_ftype *unwind_pc;
245 gdbarch_unwind_sp_ftype *unwind_sp;
246 gdbarch_frame_num_args_ftype *frame_num_args;
247 gdbarch_frame_align_ftype *frame_align;
248 gdbarch_stabs_argument_has_addr_ftype *stabs_argument_has_addr;
249 int frame_red_zone_size;
250 gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
251 gdbarch_addr_bits_remove_ftype *addr_bits_remove;
252 gdbarch_software_single_step_ftype *software_single_step;
253 gdbarch_single_step_through_delay_ftype *single_step_through_delay;
254 gdbarch_print_insn_ftype *print_insn;
255 gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
256 gdbarch_skip_solib_resolver_ftype *skip_solib_resolver;
257 gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
258 gdbarch_stack_frame_destroyed_p_ftype *stack_frame_destroyed_p;
259 gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
260 gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
261 gdbarch_make_symbol_special_ftype *make_symbol_special;
262 gdbarch_adjust_dwarf2_addr_ftype *adjust_dwarf2_addr;
263 gdbarch_adjust_dwarf2_line_ftype *adjust_dwarf2_line;
264 int cannot_step_breakpoint;
265 int have_nonsteppable_watchpoint;
266 gdbarch_address_class_type_flags_ftype *address_class_type_flags;
267 gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name;
268 gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
269 gdbarch_register_reggroup_p_ftype *register_reggroup_p;
270 gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument;
271 gdbarch_iterate_over_regset_sections_ftype *iterate_over_regset_sections;
272 gdbarch_make_corefile_notes_ftype *make_corefile_notes;
273 gdbarch_elfcore_write_linux_prpsinfo_ftype *elfcore_write_linux_prpsinfo;
274 gdbarch_find_memory_regions_ftype *find_memory_regions;
275 gdbarch_core_xfer_shared_libraries_ftype *core_xfer_shared_libraries;
276 gdbarch_core_xfer_shared_libraries_aix_ftype *core_xfer_shared_libraries_aix;
277 gdbarch_core_pid_to_str_ftype *core_pid_to_str;
278 gdbarch_core_thread_name_ftype *core_thread_name;
279 const char * gcore_bfd_target;
280 int vtable_function_descriptors;
282 gdbarch_skip_permanent_breakpoint_ftype *skip_permanent_breakpoint;
283 ULONGEST max_insn_length;
284 gdbarch_displaced_step_copy_insn_ftype *displaced_step_copy_insn;
285 gdbarch_displaced_step_hw_singlestep_ftype *displaced_step_hw_singlestep;
286 gdbarch_displaced_step_fixup_ftype *displaced_step_fixup;
287 gdbarch_displaced_step_free_closure_ftype *displaced_step_free_closure;
288 gdbarch_displaced_step_location_ftype *displaced_step_location;
289 gdbarch_relocate_instruction_ftype *relocate_instruction;
290 gdbarch_overlay_update_ftype *overlay_update;
291 gdbarch_core_read_description_ftype *core_read_description;
292 gdbarch_static_transform_name_ftype *static_transform_name;
293 int sofun_address_maybe_missing;
294 gdbarch_process_record_ftype *process_record;
295 gdbarch_process_record_signal_ftype *process_record_signal;
296 gdbarch_gdb_signal_from_target_ftype *gdb_signal_from_target;
297 gdbarch_gdb_signal_to_target_ftype *gdb_signal_to_target;
298 gdbarch_get_siginfo_type_ftype *get_siginfo_type;
299 gdbarch_record_special_symbol_ftype *record_special_symbol;
300 gdbarch_get_syscall_number_ftype *get_syscall_number;
301 const char * xml_syscall_file;
302 struct syscalls_info * syscalls_info;
303 const char *const * stap_integer_prefixes;
304 const char *const * stap_integer_suffixes;
305 const char *const * stap_register_prefixes;
306 const char *const * stap_register_suffixes;
307 const char *const * stap_register_indirection_prefixes;
308 const char *const * stap_register_indirection_suffixes;
309 const char * stap_gdb_register_prefix;
310 const char * stap_gdb_register_suffix;
311 gdbarch_stap_is_single_operand_ftype *stap_is_single_operand;
312 gdbarch_stap_parse_special_token_ftype *stap_parse_special_token;
313 gdbarch_dtrace_parse_probe_argument_ftype *dtrace_parse_probe_argument;
314 gdbarch_dtrace_probe_is_enabled_ftype *dtrace_probe_is_enabled;
315 gdbarch_dtrace_enable_probe_ftype *dtrace_enable_probe;
316 gdbarch_dtrace_disable_probe_ftype *dtrace_disable_probe;
317 int has_global_solist;
318 int has_global_breakpoints;
319 gdbarch_has_shared_address_space_ftype *has_shared_address_space;
320 gdbarch_fast_tracepoint_valid_at_ftype *fast_tracepoint_valid_at;
321 gdbarch_guess_tracepoint_registers_ftype *guess_tracepoint_registers;
322 gdbarch_auto_charset_ftype *auto_charset;
323 gdbarch_auto_wide_charset_ftype *auto_wide_charset;
324 const char * solib_symbols_extension;
325 int has_dos_based_file_system;
326 gdbarch_gen_return_address_ftype *gen_return_address;
327 gdbarch_info_proc_ftype *info_proc;
328 gdbarch_core_info_proc_ftype *core_info_proc;
329 gdbarch_iterate_over_objfiles_in_search_order_ftype *iterate_over_objfiles_in_search_order;
330 struct ravenscar_arch_ops * ravenscar_ops;
331 gdbarch_insn_is_call_ftype *insn_is_call;
332 gdbarch_insn_is_ret_ftype *insn_is_ret;
333 gdbarch_insn_is_jump_ftype *insn_is_jump;
334 gdbarch_auxv_parse_ftype *auxv_parse;
335 gdbarch_print_auxv_entry_ftype *print_auxv_entry;
336 gdbarch_vsyscall_range_ftype *vsyscall_range;
337 gdbarch_infcall_mmap_ftype *infcall_mmap;
338 gdbarch_infcall_munmap_ftype *infcall_munmap;
339 gdbarch_gcc_target_options_ftype *gcc_target_options;
340 gdbarch_gnu_triplet_regexp_ftype *gnu_triplet_regexp;
341 gdbarch_addressable_memory_unit_size_ftype *addressable_memory_unit_size;
344 /* Create a new ``struct gdbarch'' based on information provided by
345 ``struct gdbarch_info''. */
348 gdbarch_alloc (const struct gdbarch_info *info,
349 struct gdbarch_tdep *tdep)
351 struct gdbarch *gdbarch;
353 /* Create an obstack for allocating all the per-architecture memory,
354 then use that to allocate the architecture vector. */
355 struct obstack *obstack = XNEW (struct obstack);
356 obstack_init (obstack);
357 gdbarch = XOBNEW (obstack, struct gdbarch);
358 memset (gdbarch, 0, sizeof (*gdbarch));
359 gdbarch->obstack = obstack;
361 alloc_gdbarch_data (gdbarch);
363 gdbarch->tdep = tdep;
365 gdbarch->bfd_arch_info = info->bfd_arch_info;
366 gdbarch->byte_order = info->byte_order;
367 gdbarch->byte_order_for_code = info->byte_order_for_code;
368 gdbarch->osabi = info->osabi;
369 gdbarch->target_desc = info->target_desc;
371 /* Force the explicit initialization of these. */
372 gdbarch->bits_big_endian = (gdbarch->byte_order == BFD_ENDIAN_BIG);
373 gdbarch->short_bit = 2*TARGET_CHAR_BIT;
374 gdbarch->int_bit = 4*TARGET_CHAR_BIT;
375 gdbarch->long_bit = 4*TARGET_CHAR_BIT;
376 gdbarch->long_long_bit = 2*gdbarch->long_bit;
377 gdbarch->long_long_align_bit = 2*gdbarch->long_bit;
378 gdbarch->half_bit = 2*TARGET_CHAR_BIT;
379 gdbarch->float_bit = 4*TARGET_CHAR_BIT;
380 gdbarch->double_bit = 8*TARGET_CHAR_BIT;
381 gdbarch->long_double_bit = 8*TARGET_CHAR_BIT;
382 gdbarch->floatformat_for_type = default_floatformat_for_type;
383 gdbarch->ptr_bit = gdbarch->int_bit;
384 gdbarch->char_signed = -1;
385 gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
386 gdbarch->num_regs = -1;
387 gdbarch->sp_regnum = -1;
388 gdbarch->pc_regnum = -1;
389 gdbarch->ps_regnum = -1;
390 gdbarch->fp0_regnum = -1;
391 gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
392 gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
393 gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
394 gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
395 gdbarch->deprecated_fp_regnum = -1;
396 gdbarch->call_dummy_location = AT_ENTRY_POINT;
397 gdbarch->code_of_frame_writable = default_code_of_frame_writable;
398 gdbarch->print_registers_info = default_print_registers_info;
399 gdbarch->print_float_info = default_print_float_info;
400 gdbarch->register_sim_regno = legacy_register_sim_regno;
401 gdbarch->cannot_fetch_register = cannot_register_not;
402 gdbarch->cannot_store_register = cannot_register_not;
403 gdbarch->convert_register_p = generic_convert_register_p;
404 gdbarch->value_from_register = default_value_from_register;
405 gdbarch->pointer_to_address = unsigned_pointer_to_address;
406 gdbarch->address_to_pointer = unsigned_address_to_pointer;
407 gdbarch->return_in_first_hidden_param_p = default_return_in_first_hidden_param_p;
408 gdbarch->breakpoint_from_pc = default_breakpoint_from_pc;
409 gdbarch->sw_breakpoint_from_kind = NULL;
410 gdbarch->breakpoint_kind_from_current_state = default_breakpoint_kind_from_current_state;
411 gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
412 gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
413 gdbarch->remote_register_number = default_remote_register_number;
414 gdbarch->stabs_argument_has_addr = default_stabs_argument_has_addr;
415 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr_identity;
416 gdbarch->addr_bits_remove = core_addr_identity;
417 gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
418 gdbarch->skip_solib_resolver = generic_skip_solib_resolver;
419 gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
420 gdbarch->stack_frame_destroyed_p = generic_stack_frame_destroyed_p;
421 gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
422 gdbarch->make_symbol_special = default_make_symbol_special;
423 gdbarch->adjust_dwarf2_addr = default_adjust_dwarf2_addr;
424 gdbarch->adjust_dwarf2_line = default_adjust_dwarf2_line;
425 gdbarch->register_reggroup_p = default_register_reggroup_p;
426 gdbarch->skip_permanent_breakpoint = default_skip_permanent_breakpoint;
427 gdbarch->displaced_step_hw_singlestep = default_displaced_step_hw_singlestep;
428 gdbarch->displaced_step_fixup = NULL;
429 gdbarch->displaced_step_free_closure = NULL;
430 gdbarch->displaced_step_location = NULL;
431 gdbarch->relocate_instruction = NULL;
432 gdbarch->has_shared_address_space = default_has_shared_address_space;
433 gdbarch->fast_tracepoint_valid_at = default_fast_tracepoint_valid_at;
434 gdbarch->guess_tracepoint_registers = default_guess_tracepoint_registers;
435 gdbarch->auto_charset = default_auto_charset;
436 gdbarch->auto_wide_charset = default_auto_wide_charset;
437 gdbarch->gen_return_address = default_gen_return_address;
438 gdbarch->iterate_over_objfiles_in_search_order = default_iterate_over_objfiles_in_search_order;
439 gdbarch->ravenscar_ops = NULL;
440 gdbarch->insn_is_call = default_insn_is_call;
441 gdbarch->insn_is_ret = default_insn_is_ret;
442 gdbarch->insn_is_jump = default_insn_is_jump;
443 gdbarch->print_auxv_entry = default_print_auxv_entry;
444 gdbarch->vsyscall_range = default_vsyscall_range;
445 gdbarch->infcall_mmap = default_infcall_mmap;
446 gdbarch->infcall_munmap = default_infcall_munmap;
447 gdbarch->gcc_target_options = default_gcc_target_options;
448 gdbarch->gnu_triplet_regexp = default_gnu_triplet_regexp;
449 gdbarch->addressable_memory_unit_size = default_addressable_memory_unit_size;
450 /* gdbarch_alloc() */
456 /* Allocate extra space using the per-architecture obstack. */
459 gdbarch_obstack_zalloc (struct gdbarch *arch, long size)
461 void *data = obstack_alloc (arch->obstack, size);
463 memset (data, 0, size);
470 gdbarch_obstack_strdup (struct gdbarch *arch, const char *string)
472 return obstack_strdup (arch->obstack, string);
476 /* Free a gdbarch struct. This should never happen in normal
477 operation --- once you've created a gdbarch, you keep it around.
478 However, if an architecture's init function encounters an error
479 building the structure, it may need to clean up a partially
480 constructed gdbarch. */
483 gdbarch_free (struct gdbarch *arch)
485 struct obstack *obstack;
487 gdb_assert (arch != NULL);
488 gdb_assert (!arch->initialized_p);
489 obstack = arch->obstack;
490 obstack_free (obstack, 0); /* Includes the ARCH. */
495 /* Ensure that all values in a GDBARCH are reasonable. */
498 verify_gdbarch (struct gdbarch *gdbarch)
501 struct cleanup *cleanups;
504 log = mem_fileopen ();
505 cleanups = make_cleanup_ui_file_delete (log);
507 if (gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
508 fprintf_unfiltered (log, "\n\tbyte-order");
509 if (gdbarch->bfd_arch_info == NULL)
510 fprintf_unfiltered (log, "\n\tbfd_arch_info");
511 /* Check those that need to be defined for the given multi-arch level. */
512 /* Skip verify of bits_big_endian, invalid_p == 0 */
513 /* Skip verify of short_bit, invalid_p == 0 */
514 /* Skip verify of int_bit, invalid_p == 0 */
515 /* Skip verify of long_bit, invalid_p == 0 */
516 /* Skip verify of long_long_bit, invalid_p == 0 */
517 /* Skip verify of long_long_align_bit, invalid_p == 0 */
518 /* Skip verify of half_bit, invalid_p == 0 */
519 if (gdbarch->half_format == 0)
520 gdbarch->half_format = floatformats_ieee_half;
521 /* Skip verify of float_bit, invalid_p == 0 */
522 if (gdbarch->float_format == 0)
523 gdbarch->float_format = floatformats_ieee_single;
524 /* Skip verify of double_bit, invalid_p == 0 */
525 if (gdbarch->double_format == 0)
526 gdbarch->double_format = floatformats_ieee_double;
527 /* Skip verify of long_double_bit, invalid_p == 0 */
528 if (gdbarch->long_double_format == 0)
529 gdbarch->long_double_format = floatformats_ieee_double;
530 /* Skip verify of floatformat_for_type, invalid_p == 0 */
531 /* Skip verify of ptr_bit, invalid_p == 0 */
532 if (gdbarch->addr_bit == 0)
533 gdbarch->addr_bit = gdbarch_ptr_bit (gdbarch);
534 if (gdbarch->dwarf2_addr_size == 0)
535 gdbarch->dwarf2_addr_size = gdbarch_ptr_bit (gdbarch) / TARGET_CHAR_BIT;
536 if (gdbarch->char_signed == -1)
537 gdbarch->char_signed = 1;
538 /* Skip verify of read_pc, has predicate. */
539 /* Skip verify of write_pc, has predicate. */
540 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
541 /* Skip verify of pseudo_register_read, has predicate. */
542 /* Skip verify of pseudo_register_read_value, has predicate. */
543 /* Skip verify of pseudo_register_write, has predicate. */
544 if (gdbarch->num_regs == -1)
545 fprintf_unfiltered (log, "\n\tnum_regs");
546 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
547 /* Skip verify of ax_pseudo_register_collect, has predicate. */
548 /* Skip verify of ax_pseudo_register_push_stack, has predicate. */
549 /* Skip verify of handle_segmentation_fault, has predicate. */
550 /* Skip verify of sp_regnum, invalid_p == 0 */
551 /* Skip verify of pc_regnum, invalid_p == 0 */
552 /* Skip verify of ps_regnum, invalid_p == 0 */
553 /* Skip verify of fp0_regnum, invalid_p == 0 */
554 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
555 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
556 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
557 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
558 if (gdbarch->register_name == 0)
559 fprintf_unfiltered (log, "\n\tregister_name");
560 /* Skip verify of register_type, has predicate. */
561 /* Skip verify of dummy_id, has predicate. */
562 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
563 /* Skip verify of push_dummy_call, has predicate. */
564 /* Skip verify of call_dummy_location, invalid_p == 0 */
565 /* Skip verify of push_dummy_code, has predicate. */
566 /* Skip verify of code_of_frame_writable, invalid_p == 0 */
567 /* Skip verify of print_registers_info, invalid_p == 0 */
568 /* Skip verify of print_float_info, invalid_p == 0 */
569 /* Skip verify of print_vector_info, has predicate. */
570 /* Skip verify of register_sim_regno, invalid_p == 0 */
571 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
572 /* Skip verify of cannot_store_register, invalid_p == 0 */
573 /* Skip verify of get_longjmp_target, has predicate. */
574 /* Skip verify of convert_register_p, invalid_p == 0 */
575 /* Skip verify of value_from_register, invalid_p == 0 */
576 /* Skip verify of pointer_to_address, invalid_p == 0 */
577 /* Skip verify of address_to_pointer, invalid_p == 0 */
578 /* Skip verify of integer_to_address, has predicate. */
579 /* Skip verify of return_value, has predicate. */
580 /* Skip verify of return_in_first_hidden_param_p, invalid_p == 0 */
581 if (gdbarch->skip_prologue == 0)
582 fprintf_unfiltered (log, "\n\tskip_prologue");
583 /* Skip verify of skip_main_prologue, has predicate. */
584 /* Skip verify of skip_entrypoint, has predicate. */
585 if (gdbarch->inner_than == 0)
586 fprintf_unfiltered (log, "\n\tinner_than");
587 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
588 if (gdbarch->breakpoint_kind_from_pc == 0)
589 fprintf_unfiltered (log, "\n\tbreakpoint_kind_from_pc");
590 /* Skip verify of sw_breakpoint_from_kind, invalid_p == 0 */
591 /* Skip verify of breakpoint_kind_from_current_state, invalid_p == 0 */
592 /* Skip verify of adjust_breakpoint_address, has predicate. */
593 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
594 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
595 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
596 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
597 /* Skip verify of remote_register_number, invalid_p == 0 */
598 /* Skip verify of fetch_tls_load_module_address, has predicate. */
599 /* Skip verify of frame_args_skip, invalid_p == 0 */
600 /* Skip verify of unwind_pc, has predicate. */
601 /* Skip verify of unwind_sp, has predicate. */
602 /* Skip verify of frame_num_args, has predicate. */
603 /* Skip verify of frame_align, has predicate. */
604 /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
605 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
606 /* Skip verify of addr_bits_remove, invalid_p == 0 */
607 /* Skip verify of software_single_step, has predicate. */
608 /* Skip verify of single_step_through_delay, has predicate. */
609 if (gdbarch->print_insn == 0)
610 fprintf_unfiltered (log, "\n\tprint_insn");
611 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
612 /* Skip verify of skip_solib_resolver, invalid_p == 0 */
613 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
614 /* Skip verify of stack_frame_destroyed_p, invalid_p == 0 */
615 /* Skip verify of elf_make_msymbol_special, has predicate. */
616 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
617 /* Skip verify of make_symbol_special, invalid_p == 0 */
618 /* Skip verify of adjust_dwarf2_addr, invalid_p == 0 */
619 /* Skip verify of adjust_dwarf2_line, invalid_p == 0 */
620 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
621 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
622 /* Skip verify of address_class_type_flags, has predicate. */
623 /* Skip verify of address_class_type_flags_to_name, has predicate. */
624 /* Skip verify of address_class_name_to_type_flags, has predicate. */
625 /* Skip verify of register_reggroup_p, invalid_p == 0 */
626 /* Skip verify of fetch_pointer_argument, has predicate. */
627 /* Skip verify of iterate_over_regset_sections, has predicate. */
628 /* Skip verify of make_corefile_notes, has predicate. */
629 /* Skip verify of elfcore_write_linux_prpsinfo, has predicate. */
630 /* Skip verify of find_memory_regions, has predicate. */
631 /* Skip verify of core_xfer_shared_libraries, has predicate. */
632 /* Skip verify of core_xfer_shared_libraries_aix, has predicate. */
633 /* Skip verify of core_pid_to_str, has predicate. */
634 /* Skip verify of core_thread_name, has predicate. */
635 /* Skip verify of gcore_bfd_target, has predicate. */
636 /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
637 /* Skip verify of vbit_in_delta, invalid_p == 0 */
638 /* Skip verify of skip_permanent_breakpoint, invalid_p == 0 */
639 /* Skip verify of max_insn_length, has predicate. */
640 /* Skip verify of displaced_step_copy_insn, has predicate. */
641 /* Skip verify of displaced_step_hw_singlestep, invalid_p == 0 */
642 /* Skip verify of displaced_step_fixup, has predicate. */
643 if ((! gdbarch->displaced_step_free_closure) != (! gdbarch->displaced_step_copy_insn))
644 fprintf_unfiltered (log, "\n\tdisplaced_step_free_closure");
645 if ((! gdbarch->displaced_step_location) != (! gdbarch->displaced_step_copy_insn))
646 fprintf_unfiltered (log, "\n\tdisplaced_step_location");
647 /* Skip verify of relocate_instruction, has predicate. */
648 /* Skip verify of overlay_update, has predicate. */
649 /* Skip verify of core_read_description, has predicate. */
650 /* Skip verify of static_transform_name, has predicate. */
651 /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
652 /* Skip verify of process_record, has predicate. */
653 /* Skip verify of process_record_signal, has predicate. */
654 /* Skip verify of gdb_signal_from_target, has predicate. */
655 /* Skip verify of gdb_signal_to_target, has predicate. */
656 /* Skip verify of get_siginfo_type, has predicate. */
657 /* Skip verify of record_special_symbol, has predicate. */
658 /* Skip verify of get_syscall_number, has predicate. */
659 /* Skip verify of xml_syscall_file, invalid_p == 0 */
660 /* Skip verify of syscalls_info, invalid_p == 0 */
661 /* Skip verify of stap_integer_prefixes, invalid_p == 0 */
662 /* Skip verify of stap_integer_suffixes, invalid_p == 0 */
663 /* Skip verify of stap_register_prefixes, invalid_p == 0 */
664 /* Skip verify of stap_register_suffixes, invalid_p == 0 */
665 /* Skip verify of stap_register_indirection_prefixes, invalid_p == 0 */
666 /* Skip verify of stap_register_indirection_suffixes, invalid_p == 0 */
667 /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */
668 /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */
669 /* Skip verify of stap_is_single_operand, has predicate. */
670 /* Skip verify of stap_parse_special_token, has predicate. */
671 /* Skip verify of dtrace_parse_probe_argument, has predicate. */
672 /* Skip verify of dtrace_probe_is_enabled, has predicate. */
673 /* Skip verify of dtrace_enable_probe, has predicate. */
674 /* Skip verify of dtrace_disable_probe, has predicate. */
675 /* Skip verify of has_global_solist, invalid_p == 0 */
676 /* Skip verify of has_global_breakpoints, invalid_p == 0 */
677 /* Skip verify of has_shared_address_space, invalid_p == 0 */
678 /* Skip verify of fast_tracepoint_valid_at, invalid_p == 0 */
679 /* Skip verify of guess_tracepoint_registers, invalid_p == 0 */
680 /* Skip verify of auto_charset, invalid_p == 0 */
681 /* Skip verify of auto_wide_charset, invalid_p == 0 */
682 /* Skip verify of has_dos_based_file_system, invalid_p == 0 */
683 /* Skip verify of gen_return_address, invalid_p == 0 */
684 /* Skip verify of info_proc, has predicate. */
685 /* Skip verify of core_info_proc, has predicate. */
686 /* Skip verify of iterate_over_objfiles_in_search_order, invalid_p == 0 */
687 /* Skip verify of ravenscar_ops, invalid_p == 0 */
688 /* Skip verify of insn_is_call, invalid_p == 0 */
689 /* Skip verify of insn_is_ret, invalid_p == 0 */
690 /* Skip verify of insn_is_jump, invalid_p == 0 */
691 /* Skip verify of auxv_parse, has predicate. */
692 /* Skip verify of print_auxv_entry, invalid_p == 0 */
693 /* Skip verify of vsyscall_range, invalid_p == 0 */
694 /* Skip verify of infcall_mmap, invalid_p == 0 */
695 /* Skip verify of infcall_munmap, invalid_p == 0 */
696 /* Skip verify of gcc_target_options, invalid_p == 0 */
697 /* Skip verify of gnu_triplet_regexp, invalid_p == 0 */
698 /* Skip verify of addressable_memory_unit_size, invalid_p == 0 */
699 std::string buf = ui_file_as_string (log);
701 internal_error (__FILE__, __LINE__,
702 _("verify_gdbarch: the following are invalid ...%s"),
704 do_cleanups (cleanups);
708 /* Print out the details of the current architecture. */
711 gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
713 const char *gdb_nm_file = "<not-defined>";
715 #if defined (GDB_NM_FILE)
716 gdb_nm_file = GDB_NM_FILE;
718 fprintf_unfiltered (file,
719 "gdbarch_dump: GDB_NM_FILE = %s\n",
721 fprintf_unfiltered (file,
722 "gdbarch_dump: addr_bit = %s\n",
723 plongest (gdbarch->addr_bit));
724 fprintf_unfiltered (file,
725 "gdbarch_dump: addr_bits_remove = <%s>\n",
726 host_address_to_string (gdbarch->addr_bits_remove));
727 fprintf_unfiltered (file,
728 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
729 gdbarch_address_class_name_to_type_flags_p (gdbarch));
730 fprintf_unfiltered (file,
731 "gdbarch_dump: address_class_name_to_type_flags = <%s>\n",
732 host_address_to_string (gdbarch->address_class_name_to_type_flags));
733 fprintf_unfiltered (file,
734 "gdbarch_dump: gdbarch_address_class_type_flags_p() = %d\n",
735 gdbarch_address_class_type_flags_p (gdbarch));
736 fprintf_unfiltered (file,
737 "gdbarch_dump: address_class_type_flags = <%s>\n",
738 host_address_to_string (gdbarch->address_class_type_flags));
739 fprintf_unfiltered (file,
740 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
741 gdbarch_address_class_type_flags_to_name_p (gdbarch));
742 fprintf_unfiltered (file,
743 "gdbarch_dump: address_class_type_flags_to_name = <%s>\n",
744 host_address_to_string (gdbarch->address_class_type_flags_to_name));
745 fprintf_unfiltered (file,
746 "gdbarch_dump: address_to_pointer = <%s>\n",
747 host_address_to_string (gdbarch->address_to_pointer));
748 fprintf_unfiltered (file,
749 "gdbarch_dump: addressable_memory_unit_size = <%s>\n",
750 host_address_to_string (gdbarch->addressable_memory_unit_size));
751 fprintf_unfiltered (file,
752 "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n",
753 gdbarch_adjust_breakpoint_address_p (gdbarch));
754 fprintf_unfiltered (file,
755 "gdbarch_dump: adjust_breakpoint_address = <%s>\n",
756 host_address_to_string (gdbarch->adjust_breakpoint_address));
757 fprintf_unfiltered (file,
758 "gdbarch_dump: adjust_dwarf2_addr = <%s>\n",
759 host_address_to_string (gdbarch->adjust_dwarf2_addr));
760 fprintf_unfiltered (file,
761 "gdbarch_dump: adjust_dwarf2_line = <%s>\n",
762 host_address_to_string (gdbarch->adjust_dwarf2_line));
763 fprintf_unfiltered (file,
764 "gdbarch_dump: auto_charset = <%s>\n",
765 host_address_to_string (gdbarch->auto_charset));
766 fprintf_unfiltered (file,
767 "gdbarch_dump: auto_wide_charset = <%s>\n",
768 host_address_to_string (gdbarch->auto_wide_charset));
769 fprintf_unfiltered (file,
770 "gdbarch_dump: gdbarch_auxv_parse_p() = %d\n",
771 gdbarch_auxv_parse_p (gdbarch));
772 fprintf_unfiltered (file,
773 "gdbarch_dump: auxv_parse = <%s>\n",
774 host_address_to_string (gdbarch->auxv_parse));
775 fprintf_unfiltered (file,
776 "gdbarch_dump: gdbarch_ax_pseudo_register_collect_p() = %d\n",
777 gdbarch_ax_pseudo_register_collect_p (gdbarch));
778 fprintf_unfiltered (file,
779 "gdbarch_dump: ax_pseudo_register_collect = <%s>\n",
780 host_address_to_string (gdbarch->ax_pseudo_register_collect));
781 fprintf_unfiltered (file,
782 "gdbarch_dump: gdbarch_ax_pseudo_register_push_stack_p() = %d\n",
783 gdbarch_ax_pseudo_register_push_stack_p (gdbarch));
784 fprintf_unfiltered (file,
785 "gdbarch_dump: ax_pseudo_register_push_stack = <%s>\n",
786 host_address_to_string (gdbarch->ax_pseudo_register_push_stack));
787 fprintf_unfiltered (file,
788 "gdbarch_dump: believe_pcc_promotion = %s\n",
789 plongest (gdbarch->believe_pcc_promotion));
790 fprintf_unfiltered (file,
791 "gdbarch_dump: bfd_arch_info = %s\n",
792 gdbarch_bfd_arch_info (gdbarch)->printable_name);
793 fprintf_unfiltered (file,
794 "gdbarch_dump: bits_big_endian = %s\n",
795 plongest (gdbarch->bits_big_endian));
796 fprintf_unfiltered (file,
797 "gdbarch_dump: breakpoint_from_pc = <%s>\n",
798 host_address_to_string (gdbarch->breakpoint_from_pc));
799 fprintf_unfiltered (file,
800 "gdbarch_dump: breakpoint_kind_from_current_state = <%s>\n",
801 host_address_to_string (gdbarch->breakpoint_kind_from_current_state));
802 fprintf_unfiltered (file,
803 "gdbarch_dump: breakpoint_kind_from_pc = <%s>\n",
804 host_address_to_string (gdbarch->breakpoint_kind_from_pc));
805 fprintf_unfiltered (file,
806 "gdbarch_dump: byte_order = %s\n",
807 plongest (gdbarch->byte_order));
808 fprintf_unfiltered (file,
809 "gdbarch_dump: byte_order_for_code = %s\n",
810 plongest (gdbarch->byte_order_for_code));
811 fprintf_unfiltered (file,
812 "gdbarch_dump: call_dummy_location = %s\n",
813 plongest (gdbarch->call_dummy_location));
814 fprintf_unfiltered (file,
815 "gdbarch_dump: cannot_fetch_register = <%s>\n",
816 host_address_to_string (gdbarch->cannot_fetch_register));
817 fprintf_unfiltered (file,
818 "gdbarch_dump: cannot_step_breakpoint = %s\n",
819 plongest (gdbarch->cannot_step_breakpoint));
820 fprintf_unfiltered (file,
821 "gdbarch_dump: cannot_store_register = <%s>\n",
822 host_address_to_string (gdbarch->cannot_store_register));
823 fprintf_unfiltered (file,
824 "gdbarch_dump: char_signed = %s\n",
825 plongest (gdbarch->char_signed));
826 fprintf_unfiltered (file,
827 "gdbarch_dump: code_of_frame_writable = <%s>\n",
828 host_address_to_string (gdbarch->code_of_frame_writable));
829 fprintf_unfiltered (file,
830 "gdbarch_dump: coff_make_msymbol_special = <%s>\n",
831 host_address_to_string (gdbarch->coff_make_msymbol_special));
832 fprintf_unfiltered (file,
833 "gdbarch_dump: convert_from_func_ptr_addr = <%s>\n",
834 host_address_to_string (gdbarch->convert_from_func_ptr_addr));
835 fprintf_unfiltered (file,
836 "gdbarch_dump: convert_register_p = <%s>\n",
837 host_address_to_string (gdbarch->convert_register_p));
838 fprintf_unfiltered (file,
839 "gdbarch_dump: gdbarch_core_info_proc_p() = %d\n",
840 gdbarch_core_info_proc_p (gdbarch));
841 fprintf_unfiltered (file,
842 "gdbarch_dump: core_info_proc = <%s>\n",
843 host_address_to_string (gdbarch->core_info_proc));
844 fprintf_unfiltered (file,
845 "gdbarch_dump: gdbarch_core_pid_to_str_p() = %d\n",
846 gdbarch_core_pid_to_str_p (gdbarch));
847 fprintf_unfiltered (file,
848 "gdbarch_dump: core_pid_to_str = <%s>\n",
849 host_address_to_string (gdbarch->core_pid_to_str));
850 fprintf_unfiltered (file,
851 "gdbarch_dump: gdbarch_core_read_description_p() = %d\n",
852 gdbarch_core_read_description_p (gdbarch));
853 fprintf_unfiltered (file,
854 "gdbarch_dump: core_read_description = <%s>\n",
855 host_address_to_string (gdbarch->core_read_description));
856 fprintf_unfiltered (file,
857 "gdbarch_dump: gdbarch_core_thread_name_p() = %d\n",
858 gdbarch_core_thread_name_p (gdbarch));
859 fprintf_unfiltered (file,
860 "gdbarch_dump: core_thread_name = <%s>\n",
861 host_address_to_string (gdbarch->core_thread_name));
862 fprintf_unfiltered (file,
863 "gdbarch_dump: gdbarch_core_xfer_shared_libraries_p() = %d\n",
864 gdbarch_core_xfer_shared_libraries_p (gdbarch));
865 fprintf_unfiltered (file,
866 "gdbarch_dump: core_xfer_shared_libraries = <%s>\n",
867 host_address_to_string (gdbarch->core_xfer_shared_libraries));
868 fprintf_unfiltered (file,
869 "gdbarch_dump: gdbarch_core_xfer_shared_libraries_aix_p() = %d\n",
870 gdbarch_core_xfer_shared_libraries_aix_p (gdbarch));
871 fprintf_unfiltered (file,
872 "gdbarch_dump: core_xfer_shared_libraries_aix = <%s>\n",
873 host_address_to_string (gdbarch->core_xfer_shared_libraries_aix));
874 fprintf_unfiltered (file,
875 "gdbarch_dump: decr_pc_after_break = %s\n",
876 core_addr_to_string_nz (gdbarch->decr_pc_after_break));
877 fprintf_unfiltered (file,
878 "gdbarch_dump: deprecated_fp_regnum = %s\n",
879 plongest (gdbarch->deprecated_fp_regnum));
880 fprintf_unfiltered (file,
881 "gdbarch_dump: deprecated_function_start_offset = %s\n",
882 core_addr_to_string_nz (gdbarch->deprecated_function_start_offset));
883 fprintf_unfiltered (file,
884 "gdbarch_dump: gdbarch_displaced_step_copy_insn_p() = %d\n",
885 gdbarch_displaced_step_copy_insn_p (gdbarch));
886 fprintf_unfiltered (file,
887 "gdbarch_dump: displaced_step_copy_insn = <%s>\n",
888 host_address_to_string (gdbarch->displaced_step_copy_insn));
889 fprintf_unfiltered (file,
890 "gdbarch_dump: gdbarch_displaced_step_fixup_p() = %d\n",
891 gdbarch_displaced_step_fixup_p (gdbarch));
892 fprintf_unfiltered (file,
893 "gdbarch_dump: displaced_step_fixup = <%s>\n",
894 host_address_to_string (gdbarch->displaced_step_fixup));
895 fprintf_unfiltered (file,
896 "gdbarch_dump: displaced_step_free_closure = <%s>\n",
897 host_address_to_string (gdbarch->displaced_step_free_closure));
898 fprintf_unfiltered (file,
899 "gdbarch_dump: displaced_step_hw_singlestep = <%s>\n",
900 host_address_to_string (gdbarch->displaced_step_hw_singlestep));
901 fprintf_unfiltered (file,
902 "gdbarch_dump: displaced_step_location = <%s>\n",
903 host_address_to_string (gdbarch->displaced_step_location));
904 fprintf_unfiltered (file,
905 "gdbarch_dump: double_bit = %s\n",
906 plongest (gdbarch->double_bit));
907 fprintf_unfiltered (file,
908 "gdbarch_dump: double_format = %s\n",
909 pformat (gdbarch->double_format));
910 fprintf_unfiltered (file,
911 "gdbarch_dump: gdbarch_dtrace_disable_probe_p() = %d\n",
912 gdbarch_dtrace_disable_probe_p (gdbarch));
913 fprintf_unfiltered (file,
914 "gdbarch_dump: dtrace_disable_probe = <%s>\n",
915 host_address_to_string (gdbarch->dtrace_disable_probe));
916 fprintf_unfiltered (file,
917 "gdbarch_dump: gdbarch_dtrace_enable_probe_p() = %d\n",
918 gdbarch_dtrace_enable_probe_p (gdbarch));
919 fprintf_unfiltered (file,
920 "gdbarch_dump: dtrace_enable_probe = <%s>\n",
921 host_address_to_string (gdbarch->dtrace_enable_probe));
922 fprintf_unfiltered (file,
923 "gdbarch_dump: gdbarch_dtrace_parse_probe_argument_p() = %d\n",
924 gdbarch_dtrace_parse_probe_argument_p (gdbarch));
925 fprintf_unfiltered (file,
926 "gdbarch_dump: dtrace_parse_probe_argument = <%s>\n",
927 host_address_to_string (gdbarch->dtrace_parse_probe_argument));
928 fprintf_unfiltered (file,
929 "gdbarch_dump: gdbarch_dtrace_probe_is_enabled_p() = %d\n",
930 gdbarch_dtrace_probe_is_enabled_p (gdbarch));
931 fprintf_unfiltered (file,
932 "gdbarch_dump: dtrace_probe_is_enabled = <%s>\n",
933 host_address_to_string (gdbarch->dtrace_probe_is_enabled));
934 fprintf_unfiltered (file,
935 "gdbarch_dump: gdbarch_dummy_id_p() = %d\n",
936 gdbarch_dummy_id_p (gdbarch));
937 fprintf_unfiltered (file,
938 "gdbarch_dump: dummy_id = <%s>\n",
939 host_address_to_string (gdbarch->dummy_id));
940 fprintf_unfiltered (file,
941 "gdbarch_dump: dwarf2_addr_size = %s\n",
942 plongest (gdbarch->dwarf2_addr_size));
943 fprintf_unfiltered (file,
944 "gdbarch_dump: dwarf2_reg_to_regnum = <%s>\n",
945 host_address_to_string (gdbarch->dwarf2_reg_to_regnum));
946 fprintf_unfiltered (file,
947 "gdbarch_dump: ecoff_reg_to_regnum = <%s>\n",
948 host_address_to_string (gdbarch->ecoff_reg_to_regnum));
949 fprintf_unfiltered (file,
950 "gdbarch_dump: gdbarch_elf_make_msymbol_special_p() = %d\n",
951 gdbarch_elf_make_msymbol_special_p (gdbarch));
952 fprintf_unfiltered (file,
953 "gdbarch_dump: elf_make_msymbol_special = <%s>\n",
954 host_address_to_string (gdbarch->elf_make_msymbol_special));
955 fprintf_unfiltered (file,
956 "gdbarch_dump: gdbarch_elfcore_write_linux_prpsinfo_p() = %d\n",
957 gdbarch_elfcore_write_linux_prpsinfo_p (gdbarch));
958 fprintf_unfiltered (file,
959 "gdbarch_dump: elfcore_write_linux_prpsinfo = <%s>\n",
960 host_address_to_string (gdbarch->elfcore_write_linux_prpsinfo));
961 fprintf_unfiltered (file,
962 "gdbarch_dump: fast_tracepoint_valid_at = <%s>\n",
963 host_address_to_string (gdbarch->fast_tracepoint_valid_at));
964 fprintf_unfiltered (file,
965 "gdbarch_dump: gdbarch_fetch_pointer_argument_p() = %d\n",
966 gdbarch_fetch_pointer_argument_p (gdbarch));
967 fprintf_unfiltered (file,
968 "gdbarch_dump: fetch_pointer_argument = <%s>\n",
969 host_address_to_string (gdbarch->fetch_pointer_argument));
970 fprintf_unfiltered (file,
971 "gdbarch_dump: gdbarch_fetch_tls_load_module_address_p() = %d\n",
972 gdbarch_fetch_tls_load_module_address_p (gdbarch));
973 fprintf_unfiltered (file,
974 "gdbarch_dump: fetch_tls_load_module_address = <%s>\n",
975 host_address_to_string (gdbarch->fetch_tls_load_module_address));
976 fprintf_unfiltered (file,
977 "gdbarch_dump: gdbarch_find_memory_regions_p() = %d\n",
978 gdbarch_find_memory_regions_p (gdbarch));
979 fprintf_unfiltered (file,
980 "gdbarch_dump: find_memory_regions = <%s>\n",
981 host_address_to_string (gdbarch->find_memory_regions));
982 fprintf_unfiltered (file,
983 "gdbarch_dump: float_bit = %s\n",
984 plongest (gdbarch->float_bit));
985 fprintf_unfiltered (file,
986 "gdbarch_dump: float_format = %s\n",
987 pformat (gdbarch->float_format));
988 fprintf_unfiltered (file,
989 "gdbarch_dump: floatformat_for_type = <%s>\n",
990 host_address_to_string (gdbarch->floatformat_for_type));
991 fprintf_unfiltered (file,
992 "gdbarch_dump: fp0_regnum = %s\n",
993 plongest (gdbarch->fp0_regnum));
994 fprintf_unfiltered (file,
995 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
996 gdbarch_frame_align_p (gdbarch));
997 fprintf_unfiltered (file,
998 "gdbarch_dump: frame_align = <%s>\n",
999 host_address_to_string (gdbarch->frame_align));
1000 fprintf_unfiltered (file,
1001 "gdbarch_dump: frame_args_skip = %s\n",
1002 core_addr_to_string_nz (gdbarch->frame_args_skip));
1003 fprintf_unfiltered (file,
1004 "gdbarch_dump: gdbarch_frame_num_args_p() = %d\n",
1005 gdbarch_frame_num_args_p (gdbarch));
1006 fprintf_unfiltered (file,
1007 "gdbarch_dump: frame_num_args = <%s>\n",
1008 host_address_to_string (gdbarch->frame_num_args));
1009 fprintf_unfiltered (file,
1010 "gdbarch_dump: frame_red_zone_size = %s\n",
1011 plongest (gdbarch->frame_red_zone_size));
1012 fprintf_unfiltered (file,
1013 "gdbarch_dump: gcc_target_options = <%s>\n",
1014 host_address_to_string (gdbarch->gcc_target_options));
1015 fprintf_unfiltered (file,
1016 "gdbarch_dump: gdbarch_gcore_bfd_target_p() = %d\n",
1017 gdbarch_gcore_bfd_target_p (gdbarch));
1018 fprintf_unfiltered (file,
1019 "gdbarch_dump: gcore_bfd_target = %s\n",
1020 pstring (gdbarch->gcore_bfd_target));
1021 fprintf_unfiltered (file,
1022 "gdbarch_dump: gdbarch_gdb_signal_from_target_p() = %d\n",
1023 gdbarch_gdb_signal_from_target_p (gdbarch));
1024 fprintf_unfiltered (file,
1025 "gdbarch_dump: gdb_signal_from_target = <%s>\n",
1026 host_address_to_string (gdbarch->gdb_signal_from_target));
1027 fprintf_unfiltered (file,
1028 "gdbarch_dump: gdbarch_gdb_signal_to_target_p() = %d\n",
1029 gdbarch_gdb_signal_to_target_p (gdbarch));
1030 fprintf_unfiltered (file,
1031 "gdbarch_dump: gdb_signal_to_target = <%s>\n",
1032 host_address_to_string (gdbarch->gdb_signal_to_target));
1033 fprintf_unfiltered (file,
1034 "gdbarch_dump: gen_return_address = <%s>\n",
1035 host_address_to_string (gdbarch->gen_return_address));
1036 fprintf_unfiltered (file,
1037 "gdbarch_dump: gdbarch_get_longjmp_target_p() = %d\n",
1038 gdbarch_get_longjmp_target_p (gdbarch));
1039 fprintf_unfiltered (file,
1040 "gdbarch_dump: get_longjmp_target = <%s>\n",
1041 host_address_to_string (gdbarch->get_longjmp_target));
1042 fprintf_unfiltered (file,
1043 "gdbarch_dump: gdbarch_get_siginfo_type_p() = %d\n",
1044 gdbarch_get_siginfo_type_p (gdbarch));
1045 fprintf_unfiltered (file,
1046 "gdbarch_dump: get_siginfo_type = <%s>\n",
1047 host_address_to_string (gdbarch->get_siginfo_type));
1048 fprintf_unfiltered (file,
1049 "gdbarch_dump: gdbarch_get_syscall_number_p() = %d\n",
1050 gdbarch_get_syscall_number_p (gdbarch));
1051 fprintf_unfiltered (file,
1052 "gdbarch_dump: get_syscall_number = <%s>\n",
1053 host_address_to_string (gdbarch->get_syscall_number));
1054 fprintf_unfiltered (file,
1055 "gdbarch_dump: gnu_triplet_regexp = <%s>\n",
1056 host_address_to_string (gdbarch->gnu_triplet_regexp));
1057 fprintf_unfiltered (file,
1058 "gdbarch_dump: guess_tracepoint_registers = <%s>\n",
1059 host_address_to_string (gdbarch->guess_tracepoint_registers));
1060 fprintf_unfiltered (file,
1061 "gdbarch_dump: half_bit = %s\n",
1062 plongest (gdbarch->half_bit));
1063 fprintf_unfiltered (file,
1064 "gdbarch_dump: half_format = %s\n",
1065 pformat (gdbarch->half_format));
1066 fprintf_unfiltered (file,
1067 "gdbarch_dump: gdbarch_handle_segmentation_fault_p() = %d\n",
1068 gdbarch_handle_segmentation_fault_p (gdbarch));
1069 fprintf_unfiltered (file,
1070 "gdbarch_dump: handle_segmentation_fault = <%s>\n",
1071 host_address_to_string (gdbarch->handle_segmentation_fault));
1072 fprintf_unfiltered (file,
1073 "gdbarch_dump: has_dos_based_file_system = %s\n",
1074 plongest (gdbarch->has_dos_based_file_system));
1075 fprintf_unfiltered (file,
1076 "gdbarch_dump: has_global_breakpoints = %s\n",
1077 plongest (gdbarch->has_global_breakpoints));
1078 fprintf_unfiltered (file,
1079 "gdbarch_dump: has_global_solist = %s\n",
1080 plongest (gdbarch->has_global_solist));
1081 fprintf_unfiltered (file,
1082 "gdbarch_dump: has_shared_address_space = <%s>\n",
1083 host_address_to_string (gdbarch->has_shared_address_space));
1084 fprintf_unfiltered (file,
1085 "gdbarch_dump: have_nonsteppable_watchpoint = %s\n",
1086 plongest (gdbarch->have_nonsteppable_watchpoint));
1087 fprintf_unfiltered (file,
1088 "gdbarch_dump: in_solib_return_trampoline = <%s>\n",
1089 host_address_to_string (gdbarch->in_solib_return_trampoline));
1090 fprintf_unfiltered (file,
1091 "gdbarch_dump: infcall_mmap = <%s>\n",
1092 host_address_to_string (gdbarch->infcall_mmap));
1093 fprintf_unfiltered (file,
1094 "gdbarch_dump: infcall_munmap = <%s>\n",
1095 host_address_to_string (gdbarch->infcall_munmap));
1096 fprintf_unfiltered (file,
1097 "gdbarch_dump: gdbarch_info_proc_p() = %d\n",
1098 gdbarch_info_proc_p (gdbarch));
1099 fprintf_unfiltered (file,
1100 "gdbarch_dump: info_proc = <%s>\n",
1101 host_address_to_string (gdbarch->info_proc));
1102 fprintf_unfiltered (file,
1103 "gdbarch_dump: inner_than = <%s>\n",
1104 host_address_to_string (gdbarch->inner_than));
1105 fprintf_unfiltered (file,
1106 "gdbarch_dump: insn_is_call = <%s>\n",
1107 host_address_to_string (gdbarch->insn_is_call));
1108 fprintf_unfiltered (file,
1109 "gdbarch_dump: insn_is_jump = <%s>\n",
1110 host_address_to_string (gdbarch->insn_is_jump));
1111 fprintf_unfiltered (file,
1112 "gdbarch_dump: insn_is_ret = <%s>\n",
1113 host_address_to_string (gdbarch->insn_is_ret));
1114 fprintf_unfiltered (file,
1115 "gdbarch_dump: int_bit = %s\n",
1116 plongest (gdbarch->int_bit));
1117 fprintf_unfiltered (file,
1118 "gdbarch_dump: gdbarch_integer_to_address_p() = %d\n",
1119 gdbarch_integer_to_address_p (gdbarch));
1120 fprintf_unfiltered (file,
1121 "gdbarch_dump: integer_to_address = <%s>\n",
1122 host_address_to_string (gdbarch->integer_to_address));
1123 fprintf_unfiltered (file,
1124 "gdbarch_dump: iterate_over_objfiles_in_search_order = <%s>\n",
1125 host_address_to_string (gdbarch->iterate_over_objfiles_in_search_order));
1126 fprintf_unfiltered (file,
1127 "gdbarch_dump: gdbarch_iterate_over_regset_sections_p() = %d\n",
1128 gdbarch_iterate_over_regset_sections_p (gdbarch));
1129 fprintf_unfiltered (file,
1130 "gdbarch_dump: iterate_over_regset_sections = <%s>\n",
1131 host_address_to_string (gdbarch->iterate_over_regset_sections));
1132 fprintf_unfiltered (file,
1133 "gdbarch_dump: long_bit = %s\n",
1134 plongest (gdbarch->long_bit));
1135 fprintf_unfiltered (file,
1136 "gdbarch_dump: long_double_bit = %s\n",
1137 plongest (gdbarch->long_double_bit));
1138 fprintf_unfiltered (file,
1139 "gdbarch_dump: long_double_format = %s\n",
1140 pformat (gdbarch->long_double_format));
1141 fprintf_unfiltered (file,
1142 "gdbarch_dump: long_long_align_bit = %s\n",
1143 plongest (gdbarch->long_long_align_bit));
1144 fprintf_unfiltered (file,
1145 "gdbarch_dump: long_long_bit = %s\n",
1146 plongest (gdbarch->long_long_bit));
1147 fprintf_unfiltered (file,
1148 "gdbarch_dump: gdbarch_make_corefile_notes_p() = %d\n",
1149 gdbarch_make_corefile_notes_p (gdbarch));
1150 fprintf_unfiltered (file,
1151 "gdbarch_dump: make_corefile_notes = <%s>\n",
1152 host_address_to_string (gdbarch->make_corefile_notes));
1153 fprintf_unfiltered (file,
1154 "gdbarch_dump: make_symbol_special = <%s>\n",
1155 host_address_to_string (gdbarch->make_symbol_special));
1156 fprintf_unfiltered (file,
1157 "gdbarch_dump: gdbarch_max_insn_length_p() = %d\n",
1158 gdbarch_max_insn_length_p (gdbarch));
1159 fprintf_unfiltered (file,
1160 "gdbarch_dump: max_insn_length = %s\n",
1161 plongest (gdbarch->max_insn_length));
1162 fprintf_unfiltered (file,
1163 "gdbarch_dump: memory_insert_breakpoint = <%s>\n",
1164 host_address_to_string (gdbarch->memory_insert_breakpoint));
1165 fprintf_unfiltered (file,
1166 "gdbarch_dump: memory_remove_breakpoint = <%s>\n",
1167 host_address_to_string (gdbarch->memory_remove_breakpoint));
1168 fprintf_unfiltered (file,
1169 "gdbarch_dump: num_pseudo_regs = %s\n",
1170 plongest (gdbarch->num_pseudo_regs));
1171 fprintf_unfiltered (file,
1172 "gdbarch_dump: num_regs = %s\n",
1173 plongest (gdbarch->num_regs));
1174 fprintf_unfiltered (file,
1175 "gdbarch_dump: osabi = %s\n",
1176 plongest (gdbarch->osabi));
1177 fprintf_unfiltered (file,
1178 "gdbarch_dump: gdbarch_overlay_update_p() = %d\n",
1179 gdbarch_overlay_update_p (gdbarch));
1180 fprintf_unfiltered (file,
1181 "gdbarch_dump: overlay_update = <%s>\n",
1182 host_address_to_string (gdbarch->overlay_update));
1183 fprintf_unfiltered (file,
1184 "gdbarch_dump: pc_regnum = %s\n",
1185 plongest (gdbarch->pc_regnum));
1186 fprintf_unfiltered (file,
1187 "gdbarch_dump: pointer_to_address = <%s>\n",
1188 host_address_to_string (gdbarch->pointer_to_address));
1189 fprintf_unfiltered (file,
1190 "gdbarch_dump: print_auxv_entry = <%s>\n",
1191 host_address_to_string (gdbarch->print_auxv_entry));
1192 fprintf_unfiltered (file,
1193 "gdbarch_dump: print_float_info = <%s>\n",
1194 host_address_to_string (gdbarch->print_float_info));
1195 fprintf_unfiltered (file,
1196 "gdbarch_dump: print_insn = <%s>\n",
1197 host_address_to_string (gdbarch->print_insn));
1198 fprintf_unfiltered (file,
1199 "gdbarch_dump: print_registers_info = <%s>\n",
1200 host_address_to_string (gdbarch->print_registers_info));
1201 fprintf_unfiltered (file,
1202 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1203 gdbarch_print_vector_info_p (gdbarch));
1204 fprintf_unfiltered (file,
1205 "gdbarch_dump: print_vector_info = <%s>\n",
1206 host_address_to_string (gdbarch->print_vector_info));
1207 fprintf_unfiltered (file,
1208 "gdbarch_dump: gdbarch_process_record_p() = %d\n",
1209 gdbarch_process_record_p (gdbarch));
1210 fprintf_unfiltered (file,
1211 "gdbarch_dump: process_record = <%s>\n",
1212 host_address_to_string (gdbarch->process_record));
1213 fprintf_unfiltered (file,
1214 "gdbarch_dump: gdbarch_process_record_signal_p() = %d\n",
1215 gdbarch_process_record_signal_p (gdbarch));
1216 fprintf_unfiltered (file,
1217 "gdbarch_dump: process_record_signal = <%s>\n",
1218 host_address_to_string (gdbarch->process_record_signal));
1219 fprintf_unfiltered (file,
1220 "gdbarch_dump: ps_regnum = %s\n",
1221 plongest (gdbarch->ps_regnum));
1222 fprintf_unfiltered (file,
1223 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
1224 gdbarch_pseudo_register_read_p (gdbarch));
1225 fprintf_unfiltered (file,
1226 "gdbarch_dump: pseudo_register_read = <%s>\n",
1227 host_address_to_string (gdbarch->pseudo_register_read));
1228 fprintf_unfiltered (file,
1229 "gdbarch_dump: gdbarch_pseudo_register_read_value_p() = %d\n",
1230 gdbarch_pseudo_register_read_value_p (gdbarch));
1231 fprintf_unfiltered (file,
1232 "gdbarch_dump: pseudo_register_read_value = <%s>\n",
1233 host_address_to_string (gdbarch->pseudo_register_read_value));
1234 fprintf_unfiltered (file,
1235 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
1236 gdbarch_pseudo_register_write_p (gdbarch));
1237 fprintf_unfiltered (file,
1238 "gdbarch_dump: pseudo_register_write = <%s>\n",
1239 host_address_to_string (gdbarch->pseudo_register_write));
1240 fprintf_unfiltered (file,
1241 "gdbarch_dump: ptr_bit = %s\n",
1242 plongest (gdbarch->ptr_bit));
1243 fprintf_unfiltered (file,
1244 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
1245 gdbarch_push_dummy_call_p (gdbarch));
1246 fprintf_unfiltered (file,
1247 "gdbarch_dump: push_dummy_call = <%s>\n",
1248 host_address_to_string (gdbarch->push_dummy_call));
1249 fprintf_unfiltered (file,
1250 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
1251 gdbarch_push_dummy_code_p (gdbarch));
1252 fprintf_unfiltered (file,
1253 "gdbarch_dump: push_dummy_code = <%s>\n",
1254 host_address_to_string (gdbarch->push_dummy_code));
1255 fprintf_unfiltered (file,
1256 "gdbarch_dump: ravenscar_ops = %s\n",
1257 host_address_to_string (gdbarch->ravenscar_ops));
1258 fprintf_unfiltered (file,
1259 "gdbarch_dump: gdbarch_read_pc_p() = %d\n",
1260 gdbarch_read_pc_p (gdbarch));
1261 fprintf_unfiltered (file,
1262 "gdbarch_dump: read_pc = <%s>\n",
1263 host_address_to_string (gdbarch->read_pc));
1264 fprintf_unfiltered (file,
1265 "gdbarch_dump: gdbarch_record_special_symbol_p() = %d\n",
1266 gdbarch_record_special_symbol_p (gdbarch));
1267 fprintf_unfiltered (file,
1268 "gdbarch_dump: record_special_symbol = <%s>\n",
1269 host_address_to_string (gdbarch->record_special_symbol));
1270 fprintf_unfiltered (file,
1271 "gdbarch_dump: register_name = <%s>\n",
1272 host_address_to_string (gdbarch->register_name));
1273 fprintf_unfiltered (file,
1274 "gdbarch_dump: register_reggroup_p = <%s>\n",
1275 host_address_to_string (gdbarch->register_reggroup_p));
1276 fprintf_unfiltered (file,
1277 "gdbarch_dump: register_sim_regno = <%s>\n",
1278 host_address_to_string (gdbarch->register_sim_regno));
1279 fprintf_unfiltered (file,
1280 "gdbarch_dump: register_to_value = <%s>\n",
1281 host_address_to_string (gdbarch->register_to_value));
1282 fprintf_unfiltered (file,
1283 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
1284 gdbarch_register_type_p (gdbarch));
1285 fprintf_unfiltered (file,
1286 "gdbarch_dump: register_type = <%s>\n",
1287 host_address_to_string (gdbarch->register_type));
1288 fprintf_unfiltered (file,
1289 "gdbarch_dump: gdbarch_relocate_instruction_p() = %d\n",
1290 gdbarch_relocate_instruction_p (gdbarch));
1291 fprintf_unfiltered (file,
1292 "gdbarch_dump: relocate_instruction = <%s>\n",
1293 host_address_to_string (gdbarch->relocate_instruction));
1294 fprintf_unfiltered (file,
1295 "gdbarch_dump: remote_register_number = <%s>\n",
1296 host_address_to_string (gdbarch->remote_register_number));
1297 fprintf_unfiltered (file,
1298 "gdbarch_dump: return_in_first_hidden_param_p = <%s>\n",
1299 host_address_to_string (gdbarch->return_in_first_hidden_param_p));
1300 fprintf_unfiltered (file,
1301 "gdbarch_dump: gdbarch_return_value_p() = %d\n",
1302 gdbarch_return_value_p (gdbarch));
1303 fprintf_unfiltered (file,
1304 "gdbarch_dump: return_value = <%s>\n",
1305 host_address_to_string (gdbarch->return_value));
1306 fprintf_unfiltered (file,
1307 "gdbarch_dump: sdb_reg_to_regnum = <%s>\n",
1308 host_address_to_string (gdbarch->sdb_reg_to_regnum));
1309 fprintf_unfiltered (file,
1310 "gdbarch_dump: short_bit = %s\n",
1311 plongest (gdbarch->short_bit));
1312 fprintf_unfiltered (file,
1313 "gdbarch_dump: gdbarch_single_step_through_delay_p() = %d\n",
1314 gdbarch_single_step_through_delay_p (gdbarch));
1315 fprintf_unfiltered (file,
1316 "gdbarch_dump: single_step_through_delay = <%s>\n",
1317 host_address_to_string (gdbarch->single_step_through_delay));
1318 fprintf_unfiltered (file,
1319 "gdbarch_dump: gdbarch_skip_entrypoint_p() = %d\n",
1320 gdbarch_skip_entrypoint_p (gdbarch));
1321 fprintf_unfiltered (file,
1322 "gdbarch_dump: skip_entrypoint = <%s>\n",
1323 host_address_to_string (gdbarch->skip_entrypoint));
1324 fprintf_unfiltered (file,
1325 "gdbarch_dump: gdbarch_skip_main_prologue_p() = %d\n",
1326 gdbarch_skip_main_prologue_p (gdbarch));
1327 fprintf_unfiltered (file,
1328 "gdbarch_dump: skip_main_prologue = <%s>\n",
1329 host_address_to_string (gdbarch->skip_main_prologue));
1330 fprintf_unfiltered (file,
1331 "gdbarch_dump: skip_permanent_breakpoint = <%s>\n",
1332 host_address_to_string (gdbarch->skip_permanent_breakpoint));
1333 fprintf_unfiltered (file,
1334 "gdbarch_dump: skip_prologue = <%s>\n",
1335 host_address_to_string (gdbarch->skip_prologue));
1336 fprintf_unfiltered (file,
1337 "gdbarch_dump: skip_solib_resolver = <%s>\n",
1338 host_address_to_string (gdbarch->skip_solib_resolver));
1339 fprintf_unfiltered (file,
1340 "gdbarch_dump: skip_trampoline_code = <%s>\n",
1341 host_address_to_string (gdbarch->skip_trampoline_code));
1342 fprintf_unfiltered (file,
1343 "gdbarch_dump: gdbarch_software_single_step_p() = %d\n",
1344 gdbarch_software_single_step_p (gdbarch));
1345 fprintf_unfiltered (file,
1346 "gdbarch_dump: software_single_step = <%s>\n",
1347 host_address_to_string (gdbarch->software_single_step));
1348 fprintf_unfiltered (file,
1349 "gdbarch_dump: sofun_address_maybe_missing = %s\n",
1350 plongest (gdbarch->sofun_address_maybe_missing));
1351 fprintf_unfiltered (file,
1352 "gdbarch_dump: solib_symbols_extension = %s\n",
1353 pstring (gdbarch->solib_symbols_extension));
1354 fprintf_unfiltered (file,
1355 "gdbarch_dump: sp_regnum = %s\n",
1356 plongest (gdbarch->sp_regnum));
1357 fprintf_unfiltered (file,
1358 "gdbarch_dump: stab_reg_to_regnum = <%s>\n",
1359 host_address_to_string (gdbarch->stab_reg_to_regnum));
1360 fprintf_unfiltered (file,
1361 "gdbarch_dump: stabs_argument_has_addr = <%s>\n",
1362 host_address_to_string (gdbarch->stabs_argument_has_addr));
1363 fprintf_unfiltered (file,
1364 "gdbarch_dump: stack_frame_destroyed_p = <%s>\n",
1365 host_address_to_string (gdbarch->stack_frame_destroyed_p));
1366 fprintf_unfiltered (file,
1367 "gdbarch_dump: stap_gdb_register_prefix = %s\n",
1368 pstring (gdbarch->stap_gdb_register_prefix));
1369 fprintf_unfiltered (file,
1370 "gdbarch_dump: stap_gdb_register_suffix = %s\n",
1371 pstring (gdbarch->stap_gdb_register_suffix));
1372 fprintf_unfiltered (file,
1373 "gdbarch_dump: stap_integer_prefixes = %s\n",
1374 pstring_list (gdbarch->stap_integer_prefixes));
1375 fprintf_unfiltered (file,
1376 "gdbarch_dump: stap_integer_suffixes = %s\n",
1377 pstring_list (gdbarch->stap_integer_suffixes));
1378 fprintf_unfiltered (file,
1379 "gdbarch_dump: gdbarch_stap_is_single_operand_p() = %d\n",
1380 gdbarch_stap_is_single_operand_p (gdbarch));
1381 fprintf_unfiltered (file,
1382 "gdbarch_dump: stap_is_single_operand = <%s>\n",
1383 host_address_to_string (gdbarch->stap_is_single_operand));
1384 fprintf_unfiltered (file,
1385 "gdbarch_dump: gdbarch_stap_parse_special_token_p() = %d\n",
1386 gdbarch_stap_parse_special_token_p (gdbarch));
1387 fprintf_unfiltered (file,
1388 "gdbarch_dump: stap_parse_special_token = <%s>\n",
1389 host_address_to_string (gdbarch->stap_parse_special_token));
1390 fprintf_unfiltered (file,
1391 "gdbarch_dump: stap_register_indirection_prefixes = %s\n",
1392 pstring_list (gdbarch->stap_register_indirection_prefixes));
1393 fprintf_unfiltered (file,
1394 "gdbarch_dump: stap_register_indirection_suffixes = %s\n",
1395 pstring_list (gdbarch->stap_register_indirection_suffixes));
1396 fprintf_unfiltered (file,
1397 "gdbarch_dump: stap_register_prefixes = %s\n",
1398 pstring_list (gdbarch->stap_register_prefixes));
1399 fprintf_unfiltered (file,
1400 "gdbarch_dump: stap_register_suffixes = %s\n",
1401 pstring_list (gdbarch->stap_register_suffixes));
1402 fprintf_unfiltered (file,
1403 "gdbarch_dump: gdbarch_static_transform_name_p() = %d\n",
1404 gdbarch_static_transform_name_p (gdbarch));
1405 fprintf_unfiltered (file,
1406 "gdbarch_dump: static_transform_name = <%s>\n",
1407 host_address_to_string (gdbarch->static_transform_name));
1408 fprintf_unfiltered (file,
1409 "gdbarch_dump: sw_breakpoint_from_kind = <%s>\n",
1410 host_address_to_string (gdbarch->sw_breakpoint_from_kind));
1411 fprintf_unfiltered (file,
1412 "gdbarch_dump: syscalls_info = %s\n",
1413 host_address_to_string (gdbarch->syscalls_info));
1414 fprintf_unfiltered (file,
1415 "gdbarch_dump: target_desc = %s\n",
1416 host_address_to_string (gdbarch->target_desc));
1417 fprintf_unfiltered (file,
1418 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
1419 gdbarch_unwind_pc_p (gdbarch));
1420 fprintf_unfiltered (file,
1421 "gdbarch_dump: unwind_pc = <%s>\n",
1422 host_address_to_string (gdbarch->unwind_pc));
1423 fprintf_unfiltered (file,
1424 "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
1425 gdbarch_unwind_sp_p (gdbarch));
1426 fprintf_unfiltered (file,
1427 "gdbarch_dump: unwind_sp = <%s>\n",
1428 host_address_to_string (gdbarch->unwind_sp));
1429 fprintf_unfiltered (file,
1430 "gdbarch_dump: value_from_register = <%s>\n",
1431 host_address_to_string (gdbarch->value_from_register));
1432 fprintf_unfiltered (file,
1433 "gdbarch_dump: value_to_register = <%s>\n",
1434 host_address_to_string (gdbarch->value_to_register));
1435 fprintf_unfiltered (file,
1436 "gdbarch_dump: vbit_in_delta = %s\n",
1437 plongest (gdbarch->vbit_in_delta));
1438 fprintf_unfiltered (file,
1439 "gdbarch_dump: virtual_frame_pointer = <%s>\n",
1440 host_address_to_string (gdbarch->virtual_frame_pointer));
1441 fprintf_unfiltered (file,
1442 "gdbarch_dump: vsyscall_range = <%s>\n",
1443 host_address_to_string (gdbarch->vsyscall_range));
1444 fprintf_unfiltered (file,
1445 "gdbarch_dump: vtable_function_descriptors = %s\n",
1446 plongest (gdbarch->vtable_function_descriptors));
1447 fprintf_unfiltered (file,
1448 "gdbarch_dump: gdbarch_write_pc_p() = %d\n",
1449 gdbarch_write_pc_p (gdbarch));
1450 fprintf_unfiltered (file,
1451 "gdbarch_dump: write_pc = <%s>\n",
1452 host_address_to_string (gdbarch->write_pc));
1453 fprintf_unfiltered (file,
1454 "gdbarch_dump: xml_syscall_file = %s\n",
1455 pstring (gdbarch->xml_syscall_file));
1456 if (gdbarch->dump_tdep != NULL)
1457 gdbarch->dump_tdep (gdbarch, file);
1460 struct gdbarch_tdep *
1461 gdbarch_tdep (struct gdbarch *gdbarch)
1463 if (gdbarch_debug >= 2)
1464 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
1465 return gdbarch->tdep;
1469 const struct bfd_arch_info *
1470 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
1472 gdb_assert (gdbarch != NULL);
1473 if (gdbarch_debug >= 2)
1474 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
1475 return gdbarch->bfd_arch_info;
1479 gdbarch_byte_order (struct gdbarch *gdbarch)
1481 gdb_assert (gdbarch != NULL);
1482 if (gdbarch_debug >= 2)
1483 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
1484 return gdbarch->byte_order;
1488 gdbarch_byte_order_for_code (struct gdbarch *gdbarch)
1490 gdb_assert (gdbarch != NULL);
1491 if (gdbarch_debug >= 2)
1492 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order_for_code called\n");
1493 return gdbarch->byte_order_for_code;
1497 gdbarch_osabi (struct gdbarch *gdbarch)
1499 gdb_assert (gdbarch != NULL);
1500 if (gdbarch_debug >= 2)
1501 fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n");
1502 return gdbarch->osabi;
1505 const struct target_desc *
1506 gdbarch_target_desc (struct gdbarch *gdbarch)
1508 gdb_assert (gdbarch != NULL);
1509 if (gdbarch_debug >= 2)
1510 fprintf_unfiltered (gdb_stdlog, "gdbarch_target_desc called\n");
1511 return gdbarch->target_desc;
1515 gdbarch_bits_big_endian (struct gdbarch *gdbarch)
1517 gdb_assert (gdbarch != NULL);
1518 /* Skip verify of bits_big_endian, invalid_p == 0 */
1519 if (gdbarch_debug >= 2)
1520 fprintf_unfiltered (gdb_stdlog, "gdbarch_bits_big_endian called\n");
1521 return gdbarch->bits_big_endian;
1525 set_gdbarch_bits_big_endian (struct gdbarch *gdbarch,
1526 int bits_big_endian)
1528 gdbarch->bits_big_endian = bits_big_endian;
1532 gdbarch_short_bit (struct gdbarch *gdbarch)
1534 gdb_assert (gdbarch != NULL);
1535 /* Skip verify of short_bit, invalid_p == 0 */
1536 if (gdbarch_debug >= 2)
1537 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
1538 return gdbarch->short_bit;
1542 set_gdbarch_short_bit (struct gdbarch *gdbarch,
1545 gdbarch->short_bit = short_bit;
1549 gdbarch_int_bit (struct gdbarch *gdbarch)
1551 gdb_assert (gdbarch != NULL);
1552 /* Skip verify of int_bit, invalid_p == 0 */
1553 if (gdbarch_debug >= 2)
1554 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
1555 return gdbarch->int_bit;
1559 set_gdbarch_int_bit (struct gdbarch *gdbarch,
1562 gdbarch->int_bit = int_bit;
1566 gdbarch_long_bit (struct gdbarch *gdbarch)
1568 gdb_assert (gdbarch != NULL);
1569 /* Skip verify of long_bit, invalid_p == 0 */
1570 if (gdbarch_debug >= 2)
1571 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
1572 return gdbarch->long_bit;
1576 set_gdbarch_long_bit (struct gdbarch *gdbarch,
1579 gdbarch->long_bit = long_bit;
1583 gdbarch_long_long_bit (struct gdbarch *gdbarch)
1585 gdb_assert (gdbarch != NULL);
1586 /* Skip verify of long_long_bit, invalid_p == 0 */
1587 if (gdbarch_debug >= 2)
1588 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
1589 return gdbarch->long_long_bit;
1593 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
1596 gdbarch->long_long_bit = long_long_bit;
1600 gdbarch_long_long_align_bit (struct gdbarch *gdbarch)
1602 gdb_assert (gdbarch != NULL);
1603 /* Skip verify of long_long_align_bit, invalid_p == 0 */
1604 if (gdbarch_debug >= 2)
1605 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_align_bit called\n");
1606 return gdbarch->long_long_align_bit;
1610 set_gdbarch_long_long_align_bit (struct gdbarch *gdbarch,
1611 int long_long_align_bit)
1613 gdbarch->long_long_align_bit = long_long_align_bit;
1617 gdbarch_half_bit (struct gdbarch *gdbarch)
1619 gdb_assert (gdbarch != NULL);
1620 /* Skip verify of half_bit, invalid_p == 0 */
1621 if (gdbarch_debug >= 2)
1622 fprintf_unfiltered (gdb_stdlog, "gdbarch_half_bit called\n");
1623 return gdbarch->half_bit;
1627 set_gdbarch_half_bit (struct gdbarch *gdbarch,
1630 gdbarch->half_bit = half_bit;
1633 const struct floatformat **
1634 gdbarch_half_format (struct gdbarch *gdbarch)
1636 gdb_assert (gdbarch != NULL);
1637 if (gdbarch_debug >= 2)
1638 fprintf_unfiltered (gdb_stdlog, "gdbarch_half_format called\n");
1639 return gdbarch->half_format;
1643 set_gdbarch_half_format (struct gdbarch *gdbarch,
1644 const struct floatformat ** half_format)
1646 gdbarch->half_format = half_format;
1650 gdbarch_float_bit (struct gdbarch *gdbarch)
1652 gdb_assert (gdbarch != NULL);
1653 /* Skip verify of float_bit, invalid_p == 0 */
1654 if (gdbarch_debug >= 2)
1655 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
1656 return gdbarch->float_bit;
1660 set_gdbarch_float_bit (struct gdbarch *gdbarch,
1663 gdbarch->float_bit = float_bit;
1666 const struct floatformat **
1667 gdbarch_float_format (struct gdbarch *gdbarch)
1669 gdb_assert (gdbarch != NULL);
1670 if (gdbarch_debug >= 2)
1671 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
1672 return gdbarch->float_format;
1676 set_gdbarch_float_format (struct gdbarch *gdbarch,
1677 const struct floatformat ** float_format)
1679 gdbarch->float_format = float_format;
1683 gdbarch_double_bit (struct gdbarch *gdbarch)
1685 gdb_assert (gdbarch != NULL);
1686 /* Skip verify of double_bit, invalid_p == 0 */
1687 if (gdbarch_debug >= 2)
1688 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
1689 return gdbarch->double_bit;
1693 set_gdbarch_double_bit (struct gdbarch *gdbarch,
1696 gdbarch->double_bit = double_bit;
1699 const struct floatformat **
1700 gdbarch_double_format (struct gdbarch *gdbarch)
1702 gdb_assert (gdbarch != NULL);
1703 if (gdbarch_debug >= 2)
1704 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
1705 return gdbarch->double_format;
1709 set_gdbarch_double_format (struct gdbarch *gdbarch,
1710 const struct floatformat ** double_format)
1712 gdbarch->double_format = double_format;
1716 gdbarch_long_double_bit (struct gdbarch *gdbarch)
1718 gdb_assert (gdbarch != NULL);
1719 /* Skip verify of long_double_bit, invalid_p == 0 */
1720 if (gdbarch_debug >= 2)
1721 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
1722 return gdbarch->long_double_bit;
1726 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
1727 int long_double_bit)
1729 gdbarch->long_double_bit = long_double_bit;
1732 const struct floatformat **
1733 gdbarch_long_double_format (struct gdbarch *gdbarch)
1735 gdb_assert (gdbarch != NULL);
1736 if (gdbarch_debug >= 2)
1737 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
1738 return gdbarch->long_double_format;
1742 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
1743 const struct floatformat ** long_double_format)
1745 gdbarch->long_double_format = long_double_format;
1748 const struct floatformat **
1749 gdbarch_floatformat_for_type (struct gdbarch *gdbarch, const char *name, int length)
1751 gdb_assert (gdbarch != NULL);
1752 gdb_assert (gdbarch->floatformat_for_type != NULL);
1753 if (gdbarch_debug >= 2)
1754 fprintf_unfiltered (gdb_stdlog, "gdbarch_floatformat_for_type called\n");
1755 return gdbarch->floatformat_for_type (gdbarch, name, length);
1759 set_gdbarch_floatformat_for_type (struct gdbarch *gdbarch,
1760 gdbarch_floatformat_for_type_ftype floatformat_for_type)
1762 gdbarch->floatformat_for_type = floatformat_for_type;
1766 gdbarch_ptr_bit (struct gdbarch *gdbarch)
1768 gdb_assert (gdbarch != NULL);
1769 /* Skip verify of ptr_bit, invalid_p == 0 */
1770 if (gdbarch_debug >= 2)
1771 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
1772 return gdbarch->ptr_bit;
1776 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
1779 gdbarch->ptr_bit = ptr_bit;
1783 gdbarch_addr_bit (struct gdbarch *gdbarch)
1785 gdb_assert (gdbarch != NULL);
1786 /* Check variable changed from pre-default. */
1787 gdb_assert (gdbarch->addr_bit != 0);
1788 if (gdbarch_debug >= 2)
1789 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
1790 return gdbarch->addr_bit;
1794 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
1797 gdbarch->addr_bit = addr_bit;
1801 gdbarch_dwarf2_addr_size (struct gdbarch *gdbarch)
1803 gdb_assert (gdbarch != NULL);
1804 /* Check variable changed from pre-default. */
1805 gdb_assert (gdbarch->dwarf2_addr_size != 0);
1806 if (gdbarch_debug >= 2)
1807 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_addr_size called\n");
1808 return gdbarch->dwarf2_addr_size;
1812 set_gdbarch_dwarf2_addr_size (struct gdbarch *gdbarch,
1813 int dwarf2_addr_size)
1815 gdbarch->dwarf2_addr_size = dwarf2_addr_size;
1819 gdbarch_char_signed (struct gdbarch *gdbarch)
1821 gdb_assert (gdbarch != NULL);
1822 /* Check variable changed from pre-default. */
1823 gdb_assert (gdbarch->char_signed != -1);
1824 if (gdbarch_debug >= 2)
1825 fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
1826 return gdbarch->char_signed;
1830 set_gdbarch_char_signed (struct gdbarch *gdbarch,
1833 gdbarch->char_signed = char_signed;
1837 gdbarch_read_pc_p (struct gdbarch *gdbarch)
1839 gdb_assert (gdbarch != NULL);
1840 return gdbarch->read_pc != NULL;
1844 gdbarch_read_pc (struct gdbarch *gdbarch, struct regcache *regcache)
1846 gdb_assert (gdbarch != NULL);
1847 gdb_assert (gdbarch->read_pc != NULL);
1848 if (gdbarch_debug >= 2)
1849 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
1850 return gdbarch->read_pc (regcache);
1854 set_gdbarch_read_pc (struct gdbarch *gdbarch,
1855 gdbarch_read_pc_ftype read_pc)
1857 gdbarch->read_pc = read_pc;
1861 gdbarch_write_pc_p (struct gdbarch *gdbarch)
1863 gdb_assert (gdbarch != NULL);
1864 return gdbarch->write_pc != NULL;
1868 gdbarch_write_pc (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR val)
1870 gdb_assert (gdbarch != NULL);
1871 gdb_assert (gdbarch->write_pc != NULL);
1872 if (gdbarch_debug >= 2)
1873 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
1874 gdbarch->write_pc (regcache, val);
1878 set_gdbarch_write_pc (struct gdbarch *gdbarch,
1879 gdbarch_write_pc_ftype write_pc)
1881 gdbarch->write_pc = write_pc;
1885 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
1887 gdb_assert (gdbarch != NULL);
1888 gdb_assert (gdbarch->virtual_frame_pointer != NULL);
1889 if (gdbarch_debug >= 2)
1890 fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
1891 gdbarch->virtual_frame_pointer (gdbarch, pc, frame_regnum, frame_offset);
1895 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
1896 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
1898 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
1902 gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
1904 gdb_assert (gdbarch != NULL);
1905 return gdbarch->pseudo_register_read != NULL;
1908 enum register_status
1909 gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, gdb_byte *buf)
1911 gdb_assert (gdbarch != NULL);
1912 gdb_assert (gdbarch->pseudo_register_read != NULL);
1913 if (gdbarch_debug >= 2)
1914 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
1915 return gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
1919 set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
1920 gdbarch_pseudo_register_read_ftype pseudo_register_read)
1922 gdbarch->pseudo_register_read = pseudo_register_read;
1926 gdbarch_pseudo_register_read_value_p (struct gdbarch *gdbarch)
1928 gdb_assert (gdbarch != NULL);
1929 return gdbarch->pseudo_register_read_value != NULL;
1933 gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum)
1935 gdb_assert (gdbarch != NULL);
1936 gdb_assert (gdbarch->pseudo_register_read_value != NULL);
1937 if (gdbarch_debug >= 2)
1938 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read_value called\n");
1939 return gdbarch->pseudo_register_read_value (gdbarch, regcache, cookednum);
1943 set_gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch,
1944 gdbarch_pseudo_register_read_value_ftype pseudo_register_read_value)
1946 gdbarch->pseudo_register_read_value = pseudo_register_read_value;
1950 gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
1952 gdb_assert (gdbarch != NULL);
1953 return gdbarch->pseudo_register_write != NULL;
1957 gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const gdb_byte *buf)
1959 gdb_assert (gdbarch != NULL);
1960 gdb_assert (gdbarch->pseudo_register_write != NULL);
1961 if (gdbarch_debug >= 2)
1962 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
1963 gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
1967 set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
1968 gdbarch_pseudo_register_write_ftype pseudo_register_write)
1970 gdbarch->pseudo_register_write = pseudo_register_write;
1974 gdbarch_num_regs (struct gdbarch *gdbarch)
1976 gdb_assert (gdbarch != NULL);
1977 /* Check variable changed from pre-default. */
1978 gdb_assert (gdbarch->num_regs != -1);
1979 if (gdbarch_debug >= 2)
1980 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
1981 return gdbarch->num_regs;
1985 set_gdbarch_num_regs (struct gdbarch *gdbarch,
1988 gdbarch->num_regs = num_regs;
1992 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
1994 gdb_assert (gdbarch != NULL);
1995 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
1996 if (gdbarch_debug >= 2)
1997 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
1998 return gdbarch->num_pseudo_regs;
2002 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
2003 int num_pseudo_regs)
2005 gdbarch->num_pseudo_regs = num_pseudo_regs;
2009 gdbarch_ax_pseudo_register_collect_p (struct gdbarch *gdbarch)
2011 gdb_assert (gdbarch != NULL);
2012 return gdbarch->ax_pseudo_register_collect != NULL;
2016 gdbarch_ax_pseudo_register_collect (struct gdbarch *gdbarch, struct agent_expr *ax, int reg)
2018 gdb_assert (gdbarch != NULL);
2019 gdb_assert (gdbarch->ax_pseudo_register_collect != NULL);
2020 if (gdbarch_debug >= 2)
2021 fprintf_unfiltered (gdb_stdlog, "gdbarch_ax_pseudo_register_collect called\n");
2022 return gdbarch->ax_pseudo_register_collect (gdbarch, ax, reg);
2026 set_gdbarch_ax_pseudo_register_collect (struct gdbarch *gdbarch,
2027 gdbarch_ax_pseudo_register_collect_ftype ax_pseudo_register_collect)
2029 gdbarch->ax_pseudo_register_collect = ax_pseudo_register_collect;
2033 gdbarch_ax_pseudo_register_push_stack_p (struct gdbarch *gdbarch)
2035 gdb_assert (gdbarch != NULL);
2036 return gdbarch->ax_pseudo_register_push_stack != NULL;
2040 gdbarch_ax_pseudo_register_push_stack (struct gdbarch *gdbarch, struct agent_expr *ax, int reg)
2042 gdb_assert (gdbarch != NULL);
2043 gdb_assert (gdbarch->ax_pseudo_register_push_stack != NULL);
2044 if (gdbarch_debug >= 2)
2045 fprintf_unfiltered (gdb_stdlog, "gdbarch_ax_pseudo_register_push_stack called\n");
2046 return gdbarch->ax_pseudo_register_push_stack (gdbarch, ax, reg);
2050 set_gdbarch_ax_pseudo_register_push_stack (struct gdbarch *gdbarch,
2051 gdbarch_ax_pseudo_register_push_stack_ftype ax_pseudo_register_push_stack)
2053 gdbarch->ax_pseudo_register_push_stack = ax_pseudo_register_push_stack;
2057 gdbarch_handle_segmentation_fault_p (struct gdbarch *gdbarch)
2059 gdb_assert (gdbarch != NULL);
2060 return gdbarch->handle_segmentation_fault != NULL;
2064 gdbarch_handle_segmentation_fault (struct gdbarch *gdbarch, struct ui_out *uiout)
2066 gdb_assert (gdbarch != NULL);
2067 gdb_assert (gdbarch->handle_segmentation_fault != NULL);
2068 if (gdbarch_debug >= 2)
2069 fprintf_unfiltered (gdb_stdlog, "gdbarch_handle_segmentation_fault called\n");
2070 gdbarch->handle_segmentation_fault (gdbarch, uiout);
2074 set_gdbarch_handle_segmentation_fault (struct gdbarch *gdbarch,
2075 gdbarch_handle_segmentation_fault_ftype handle_segmentation_fault)
2077 gdbarch->handle_segmentation_fault = handle_segmentation_fault;
2081 gdbarch_sp_regnum (struct gdbarch *gdbarch)
2083 gdb_assert (gdbarch != NULL);
2084 /* Skip verify of sp_regnum, invalid_p == 0 */
2085 if (gdbarch_debug >= 2)
2086 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
2087 return gdbarch->sp_regnum;
2091 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
2094 gdbarch->sp_regnum = sp_regnum;
2098 gdbarch_pc_regnum (struct gdbarch *gdbarch)
2100 gdb_assert (gdbarch != NULL);
2101 /* Skip verify of pc_regnum, invalid_p == 0 */
2102 if (gdbarch_debug >= 2)
2103 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
2104 return gdbarch->pc_regnum;
2108 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
2111 gdbarch->pc_regnum = pc_regnum;
2115 gdbarch_ps_regnum (struct gdbarch *gdbarch)
2117 gdb_assert (gdbarch != NULL);
2118 /* Skip verify of ps_regnum, invalid_p == 0 */
2119 if (gdbarch_debug >= 2)
2120 fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
2121 return gdbarch->ps_regnum;
2125 set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
2128 gdbarch->ps_regnum = ps_regnum;
2132 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
2134 gdb_assert (gdbarch != NULL);
2135 /* Skip verify of fp0_regnum, invalid_p == 0 */
2136 if (gdbarch_debug >= 2)
2137 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
2138 return gdbarch->fp0_regnum;
2142 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
2145 gdbarch->fp0_regnum = fp0_regnum;
2149 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
2151 gdb_assert (gdbarch != NULL);
2152 gdb_assert (gdbarch->stab_reg_to_regnum != NULL);
2153 if (gdbarch_debug >= 2)
2154 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
2155 return gdbarch->stab_reg_to_regnum (gdbarch, stab_regnr);
2159 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
2160 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
2162 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
2166 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
2168 gdb_assert (gdbarch != NULL);
2169 gdb_assert (gdbarch->ecoff_reg_to_regnum != NULL);
2170 if (gdbarch_debug >= 2)
2171 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
2172 return gdbarch->ecoff_reg_to_regnum (gdbarch, ecoff_regnr);
2176 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
2177 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
2179 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
2183 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
2185 gdb_assert (gdbarch != NULL);
2186 gdb_assert (gdbarch->sdb_reg_to_regnum != NULL);
2187 if (gdbarch_debug >= 2)
2188 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
2189 return gdbarch->sdb_reg_to_regnum (gdbarch, sdb_regnr);
2193 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
2194 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
2196 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
2200 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
2202 gdb_assert (gdbarch != NULL);
2203 gdb_assert (gdbarch->dwarf2_reg_to_regnum != NULL);
2204 if (gdbarch_debug >= 2)
2205 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
2206 return gdbarch->dwarf2_reg_to_regnum (gdbarch, dwarf2_regnr);
2210 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
2211 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
2213 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
2217 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
2219 gdb_assert (gdbarch != NULL);
2220 gdb_assert (gdbarch->register_name != NULL);
2221 if (gdbarch_debug >= 2)
2222 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
2223 return gdbarch->register_name (gdbarch, regnr);
2227 set_gdbarch_register_name (struct gdbarch *gdbarch,
2228 gdbarch_register_name_ftype register_name)
2230 gdbarch->register_name = register_name;
2234 gdbarch_register_type_p (struct gdbarch *gdbarch)
2236 gdb_assert (gdbarch != NULL);
2237 return gdbarch->register_type != NULL;
2241 gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
2243 gdb_assert (gdbarch != NULL);
2244 gdb_assert (gdbarch->register_type != NULL);
2245 if (gdbarch_debug >= 2)
2246 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
2247 return gdbarch->register_type (gdbarch, reg_nr);
2251 set_gdbarch_register_type (struct gdbarch *gdbarch,
2252 gdbarch_register_type_ftype register_type)
2254 gdbarch->register_type = register_type;
2258 gdbarch_dummy_id_p (struct gdbarch *gdbarch)
2260 gdb_assert (gdbarch != NULL);
2261 return gdbarch->dummy_id != NULL;
2265 gdbarch_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
2267 gdb_assert (gdbarch != NULL);
2268 gdb_assert (gdbarch->dummy_id != NULL);
2269 if (gdbarch_debug >= 2)
2270 fprintf_unfiltered (gdb_stdlog, "gdbarch_dummy_id called\n");
2271 return gdbarch->dummy_id (gdbarch, this_frame);
2275 set_gdbarch_dummy_id (struct gdbarch *gdbarch,
2276 gdbarch_dummy_id_ftype dummy_id)
2278 gdbarch->dummy_id = dummy_id;
2282 gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch)
2284 gdb_assert (gdbarch != NULL);
2285 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
2286 if (gdbarch_debug >= 2)
2287 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n");
2288 return gdbarch->deprecated_fp_regnum;
2292 set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch,
2293 int deprecated_fp_regnum)
2295 gdbarch->deprecated_fp_regnum = deprecated_fp_regnum;
2299 gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
2301 gdb_assert (gdbarch != NULL);
2302 return gdbarch->push_dummy_call != NULL;
2306 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)
2308 gdb_assert (gdbarch != NULL);
2309 gdb_assert (gdbarch->push_dummy_call != NULL);
2310 if (gdbarch_debug >= 2)
2311 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
2312 return gdbarch->push_dummy_call (gdbarch, function, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr);
2316 set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
2317 gdbarch_push_dummy_call_ftype push_dummy_call)
2319 gdbarch->push_dummy_call = push_dummy_call;
2323 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
2325 gdb_assert (gdbarch != NULL);
2326 /* Skip verify of call_dummy_location, invalid_p == 0 */
2327 if (gdbarch_debug >= 2)
2328 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
2329 return gdbarch->call_dummy_location;
2333 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
2334 int call_dummy_location)
2336 gdbarch->call_dummy_location = call_dummy_location;
2340 gdbarch_push_dummy_code_p (struct gdbarch *gdbarch)
2342 gdb_assert (gdbarch != NULL);
2343 return gdbarch->push_dummy_code != NULL;
2347 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)
2349 gdb_assert (gdbarch != NULL);
2350 gdb_assert (gdbarch->push_dummy_code != NULL);
2351 if (gdbarch_debug >= 2)
2352 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n");
2353 return gdbarch->push_dummy_code (gdbarch, sp, funaddr, args, nargs, value_type, real_pc, bp_addr, regcache);
2357 set_gdbarch_push_dummy_code (struct gdbarch *gdbarch,
2358 gdbarch_push_dummy_code_ftype push_dummy_code)
2360 gdbarch->push_dummy_code = push_dummy_code;
2364 gdbarch_code_of_frame_writable (struct gdbarch *gdbarch, struct frame_info *frame)
2366 gdb_assert (gdbarch != NULL);
2367 gdb_assert (gdbarch->code_of_frame_writable != NULL);
2368 if (gdbarch_debug >= 2)
2369 fprintf_unfiltered (gdb_stdlog, "gdbarch_code_of_frame_writable called\n");
2370 return gdbarch->code_of_frame_writable (gdbarch, frame);
2374 set_gdbarch_code_of_frame_writable (struct gdbarch *gdbarch,
2375 gdbarch_code_of_frame_writable_ftype code_of_frame_writable)
2377 gdbarch->code_of_frame_writable = code_of_frame_writable;
2381 gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
2383 gdb_assert (gdbarch != NULL);
2384 gdb_assert (gdbarch->print_registers_info != NULL);
2385 if (gdbarch_debug >= 2)
2386 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
2387 gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
2391 set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
2392 gdbarch_print_registers_info_ftype print_registers_info)
2394 gdbarch->print_registers_info = print_registers_info;
2398 gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
2400 gdb_assert (gdbarch != NULL);
2401 gdb_assert (gdbarch->print_float_info != NULL);
2402 if (gdbarch_debug >= 2)
2403 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
2404 gdbarch->print_float_info (gdbarch, file, frame, args);
2408 set_gdbarch_print_float_info (struct gdbarch *gdbarch,
2409 gdbarch_print_float_info_ftype print_float_info)
2411 gdbarch->print_float_info = print_float_info;
2415 gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
2417 gdb_assert (gdbarch != NULL);
2418 return gdbarch->print_vector_info != NULL;
2422 gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
2424 gdb_assert (gdbarch != NULL);
2425 gdb_assert (gdbarch->print_vector_info != NULL);
2426 if (gdbarch_debug >= 2)
2427 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
2428 gdbarch->print_vector_info (gdbarch, file, frame, args);
2432 set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
2433 gdbarch_print_vector_info_ftype print_vector_info)
2435 gdbarch->print_vector_info = print_vector_info;
2439 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
2441 gdb_assert (gdbarch != NULL);
2442 gdb_assert (gdbarch->register_sim_regno != NULL);
2443 if (gdbarch_debug >= 2)
2444 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
2445 return gdbarch->register_sim_regno (gdbarch, reg_nr);
2449 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
2450 gdbarch_register_sim_regno_ftype register_sim_regno)
2452 gdbarch->register_sim_regno = register_sim_regno;
2456 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
2458 gdb_assert (gdbarch != NULL);
2459 gdb_assert (gdbarch->cannot_fetch_register != NULL);
2460 if (gdbarch_debug >= 2)
2461 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
2462 return gdbarch->cannot_fetch_register (gdbarch, regnum);
2466 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
2467 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
2469 gdbarch->cannot_fetch_register = cannot_fetch_register;
2473 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
2475 gdb_assert (gdbarch != NULL);
2476 gdb_assert (gdbarch->cannot_store_register != NULL);
2477 if (gdbarch_debug >= 2)
2478 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
2479 return gdbarch->cannot_store_register (gdbarch, regnum);
2483 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
2484 gdbarch_cannot_store_register_ftype cannot_store_register)
2486 gdbarch->cannot_store_register = cannot_store_register;
2490 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
2492 gdb_assert (gdbarch != NULL);
2493 return gdbarch->get_longjmp_target != NULL;
2497 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR *pc)
2499 gdb_assert (gdbarch != NULL);
2500 gdb_assert (gdbarch->get_longjmp_target != NULL);
2501 if (gdbarch_debug >= 2)
2502 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
2503 return gdbarch->get_longjmp_target (frame, pc);
2507 set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
2508 gdbarch_get_longjmp_target_ftype get_longjmp_target)
2510 gdbarch->get_longjmp_target = get_longjmp_target;
2514 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
2516 gdb_assert (gdbarch != NULL);
2517 if (gdbarch_debug >= 2)
2518 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
2519 return gdbarch->believe_pcc_promotion;
2523 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
2524 int believe_pcc_promotion)
2526 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
2530 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
2532 gdb_assert (gdbarch != NULL);
2533 gdb_assert (gdbarch->convert_register_p != NULL);
2534 if (gdbarch_debug >= 2)
2535 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
2536 return gdbarch->convert_register_p (gdbarch, regnum, type);
2540 set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
2541 gdbarch_convert_register_p_ftype convert_register_p)
2543 gdbarch->convert_register_p = convert_register_p;
2547 gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, gdb_byte *buf, int *optimizedp, int *unavailablep)
2549 gdb_assert (gdbarch != NULL);
2550 gdb_assert (gdbarch->register_to_value != NULL);
2551 if (gdbarch_debug >= 2)
2552 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
2553 return gdbarch->register_to_value (frame, regnum, type, buf, optimizedp, unavailablep);
2557 set_gdbarch_register_to_value (struct gdbarch *gdbarch,
2558 gdbarch_register_to_value_ftype register_to_value)
2560 gdbarch->register_to_value = register_to_value;
2564 gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const gdb_byte *buf)
2566 gdb_assert (gdbarch != NULL);
2567 gdb_assert (gdbarch->value_to_register != NULL);
2568 if (gdbarch_debug >= 2)
2569 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
2570 gdbarch->value_to_register (frame, regnum, type, buf);
2574 set_gdbarch_value_to_register (struct gdbarch *gdbarch,
2575 gdbarch_value_to_register_ftype value_to_register)
2577 gdbarch->value_to_register = value_to_register;
2581 gdbarch_value_from_register (struct gdbarch *gdbarch, struct type *type, int regnum, struct frame_id frame_id)
2583 gdb_assert (gdbarch != NULL);
2584 gdb_assert (gdbarch->value_from_register != NULL);
2585 if (gdbarch_debug >= 2)
2586 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_from_register called\n");
2587 return gdbarch->value_from_register (gdbarch, type, regnum, frame_id);
2591 set_gdbarch_value_from_register (struct gdbarch *gdbarch,
2592 gdbarch_value_from_register_ftype value_from_register)
2594 gdbarch->value_from_register = value_from_register;
2598 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
2600 gdb_assert (gdbarch != NULL);
2601 gdb_assert (gdbarch->pointer_to_address != NULL);
2602 if (gdbarch_debug >= 2)
2603 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
2604 return gdbarch->pointer_to_address (gdbarch, type, buf);
2608 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
2609 gdbarch_pointer_to_address_ftype pointer_to_address)
2611 gdbarch->pointer_to_address = pointer_to_address;
2615 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, gdb_byte *buf, CORE_ADDR addr)
2617 gdb_assert (gdbarch != NULL);
2618 gdb_assert (gdbarch->address_to_pointer != NULL);
2619 if (gdbarch_debug >= 2)
2620 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
2621 gdbarch->address_to_pointer (gdbarch, type, buf, addr);
2625 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
2626 gdbarch_address_to_pointer_ftype address_to_pointer)
2628 gdbarch->address_to_pointer = address_to_pointer;
2632 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
2634 gdb_assert (gdbarch != NULL);
2635 return gdbarch->integer_to_address != NULL;
2639 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
2641 gdb_assert (gdbarch != NULL);
2642 gdb_assert (gdbarch->integer_to_address != NULL);
2643 if (gdbarch_debug >= 2)
2644 fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
2645 return gdbarch->integer_to_address (gdbarch, type, buf);
2649 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
2650 gdbarch_integer_to_address_ftype integer_to_address)
2652 gdbarch->integer_to_address = integer_to_address;
2656 gdbarch_return_value_p (struct gdbarch *gdbarch)
2658 gdb_assert (gdbarch != NULL);
2659 return gdbarch->return_value != NULL;
2662 enum return_value_convention
2663 gdbarch_return_value (struct gdbarch *gdbarch, struct value *function, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
2665 gdb_assert (gdbarch != NULL);
2666 gdb_assert (gdbarch->return_value != NULL);
2667 if (gdbarch_debug >= 2)
2668 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value called\n");
2669 return gdbarch->return_value (gdbarch, function, valtype, regcache, readbuf, writebuf);
2673 set_gdbarch_return_value (struct gdbarch *gdbarch,
2674 gdbarch_return_value_ftype return_value)
2676 gdbarch->return_value = return_value;
2680 gdbarch_return_in_first_hidden_param_p (struct gdbarch *gdbarch, struct type *type)
2682 gdb_assert (gdbarch != NULL);
2683 gdb_assert (gdbarch->return_in_first_hidden_param_p != NULL);
2684 if (gdbarch_debug >= 2)
2685 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_in_first_hidden_param_p called\n");
2686 return gdbarch->return_in_first_hidden_param_p (gdbarch, type);
2690 set_gdbarch_return_in_first_hidden_param_p (struct gdbarch *gdbarch,
2691 gdbarch_return_in_first_hidden_param_p_ftype return_in_first_hidden_param_p)
2693 gdbarch->return_in_first_hidden_param_p = return_in_first_hidden_param_p;
2697 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
2699 gdb_assert (gdbarch != NULL);
2700 gdb_assert (gdbarch->skip_prologue != NULL);
2701 if (gdbarch_debug >= 2)
2702 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
2703 return gdbarch->skip_prologue (gdbarch, ip);
2707 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
2708 gdbarch_skip_prologue_ftype skip_prologue)
2710 gdbarch->skip_prologue = skip_prologue;
2714 gdbarch_skip_main_prologue_p (struct gdbarch *gdbarch)
2716 gdb_assert (gdbarch != NULL);
2717 return gdbarch->skip_main_prologue != NULL;
2721 gdbarch_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
2723 gdb_assert (gdbarch != NULL);
2724 gdb_assert (gdbarch->skip_main_prologue != NULL);
2725 if (gdbarch_debug >= 2)
2726 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_main_prologue called\n");
2727 return gdbarch->skip_main_prologue (gdbarch, ip);
2731 set_gdbarch_skip_main_prologue (struct gdbarch *gdbarch,
2732 gdbarch_skip_main_prologue_ftype skip_main_prologue)
2734 gdbarch->skip_main_prologue = skip_main_prologue;
2738 gdbarch_skip_entrypoint_p (struct gdbarch *gdbarch)
2740 gdb_assert (gdbarch != NULL);
2741 return gdbarch->skip_entrypoint != NULL;
2745 gdbarch_skip_entrypoint (struct gdbarch *gdbarch, CORE_ADDR ip)
2747 gdb_assert (gdbarch != NULL);
2748 gdb_assert (gdbarch->skip_entrypoint != NULL);
2749 if (gdbarch_debug >= 2)
2750 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_entrypoint called\n");
2751 return gdbarch->skip_entrypoint (gdbarch, ip);
2755 set_gdbarch_skip_entrypoint (struct gdbarch *gdbarch,
2756 gdbarch_skip_entrypoint_ftype skip_entrypoint)
2758 gdbarch->skip_entrypoint = skip_entrypoint;
2762 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
2764 gdb_assert (gdbarch != NULL);
2765 gdb_assert (gdbarch->inner_than != NULL);
2766 if (gdbarch_debug >= 2)
2767 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
2768 return gdbarch->inner_than (lhs, rhs);
2772 set_gdbarch_inner_than (struct gdbarch *gdbarch,
2773 gdbarch_inner_than_ftype inner_than)
2775 gdbarch->inner_than = inner_than;
2779 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
2781 gdb_assert (gdbarch != NULL);
2782 gdb_assert (gdbarch->breakpoint_from_pc != NULL);
2783 if (gdbarch_debug >= 2)
2784 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
2785 return gdbarch->breakpoint_from_pc (gdbarch, pcptr, lenptr);
2789 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
2790 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
2792 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
2796 gdbarch_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
2798 gdb_assert (gdbarch != NULL);
2799 gdb_assert (gdbarch->breakpoint_kind_from_pc != NULL);
2800 if (gdbarch_debug >= 2)
2801 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_kind_from_pc called\n");
2802 return gdbarch->breakpoint_kind_from_pc (gdbarch, pcptr);
2806 set_gdbarch_breakpoint_kind_from_pc (struct gdbarch *gdbarch,
2807 gdbarch_breakpoint_kind_from_pc_ftype breakpoint_kind_from_pc)
2809 gdbarch->breakpoint_kind_from_pc = breakpoint_kind_from_pc;
2813 gdbarch_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
2815 gdb_assert (gdbarch != NULL);
2816 gdb_assert (gdbarch->sw_breakpoint_from_kind != NULL);
2817 if (gdbarch_debug >= 2)
2818 fprintf_unfiltered (gdb_stdlog, "gdbarch_sw_breakpoint_from_kind called\n");
2819 return gdbarch->sw_breakpoint_from_kind (gdbarch, kind, size);
2823 set_gdbarch_sw_breakpoint_from_kind (struct gdbarch *gdbarch,
2824 gdbarch_sw_breakpoint_from_kind_ftype sw_breakpoint_from_kind)
2826 gdbarch->sw_breakpoint_from_kind = sw_breakpoint_from_kind;
2830 gdbarch_breakpoint_kind_from_current_state (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR *pcptr)
2832 gdb_assert (gdbarch != NULL);
2833 gdb_assert (gdbarch->breakpoint_kind_from_current_state != NULL);
2834 if (gdbarch_debug >= 2)
2835 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_kind_from_current_state called\n");
2836 return gdbarch->breakpoint_kind_from_current_state (gdbarch, regcache, pcptr);
2840 set_gdbarch_breakpoint_kind_from_current_state (struct gdbarch *gdbarch,
2841 gdbarch_breakpoint_kind_from_current_state_ftype breakpoint_kind_from_current_state)
2843 gdbarch->breakpoint_kind_from_current_state = breakpoint_kind_from_current_state;
2847 gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch)
2849 gdb_assert (gdbarch != NULL);
2850 return gdbarch->adjust_breakpoint_address != NULL;
2854 gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr)
2856 gdb_assert (gdbarch != NULL);
2857 gdb_assert (gdbarch->adjust_breakpoint_address != NULL);
2858 if (gdbarch_debug >= 2)
2859 fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_breakpoint_address called\n");
2860 return gdbarch->adjust_breakpoint_address (gdbarch, bpaddr);
2864 set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch,
2865 gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address)
2867 gdbarch->adjust_breakpoint_address = adjust_breakpoint_address;
2871 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
2873 gdb_assert (gdbarch != NULL);
2874 gdb_assert (gdbarch->memory_insert_breakpoint != NULL);
2875 if (gdbarch_debug >= 2)
2876 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
2877 return gdbarch->memory_insert_breakpoint (gdbarch, bp_tgt);
2881 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
2882 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
2884 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
2888 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
2890 gdb_assert (gdbarch != NULL);
2891 gdb_assert (gdbarch->memory_remove_breakpoint != NULL);
2892 if (gdbarch_debug >= 2)
2893 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
2894 return gdbarch->memory_remove_breakpoint (gdbarch, bp_tgt);
2898 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
2899 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
2901 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
2905 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
2907 gdb_assert (gdbarch != NULL);
2908 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
2909 if (gdbarch_debug >= 2)
2910 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
2911 return gdbarch->decr_pc_after_break;
2915 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
2916 CORE_ADDR decr_pc_after_break)
2918 gdbarch->decr_pc_after_break = decr_pc_after_break;
2922 gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch)
2924 gdb_assert (gdbarch != NULL);
2925 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
2926 if (gdbarch_debug >= 2)
2927 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_function_start_offset called\n");
2928 return gdbarch->deprecated_function_start_offset;
2932 set_gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch,
2933 CORE_ADDR deprecated_function_start_offset)
2935 gdbarch->deprecated_function_start_offset = deprecated_function_start_offset;
2939 gdbarch_remote_register_number (struct gdbarch *gdbarch, int regno)
2941 gdb_assert (gdbarch != NULL);
2942 gdb_assert (gdbarch->remote_register_number != NULL);
2943 if (gdbarch_debug >= 2)
2944 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_register_number called\n");
2945 return gdbarch->remote_register_number (gdbarch, regno);
2949 set_gdbarch_remote_register_number (struct gdbarch *gdbarch,
2950 gdbarch_remote_register_number_ftype remote_register_number)
2952 gdbarch->remote_register_number = remote_register_number;
2956 gdbarch_fetch_tls_load_module_address_p (struct gdbarch *gdbarch)
2958 gdb_assert (gdbarch != NULL);
2959 return gdbarch->fetch_tls_load_module_address != NULL;
2963 gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch, struct objfile *objfile)
2965 gdb_assert (gdbarch != NULL);
2966 gdb_assert (gdbarch->fetch_tls_load_module_address != NULL);
2967 if (gdbarch_debug >= 2)
2968 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_tls_load_module_address called\n");
2969 return gdbarch->fetch_tls_load_module_address (objfile);
2973 set_gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch,
2974 gdbarch_fetch_tls_load_module_address_ftype fetch_tls_load_module_address)
2976 gdbarch->fetch_tls_load_module_address = fetch_tls_load_module_address;
2980 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
2982 gdb_assert (gdbarch != NULL);
2983 /* Skip verify of frame_args_skip, invalid_p == 0 */
2984 if (gdbarch_debug >= 2)
2985 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
2986 return gdbarch->frame_args_skip;
2990 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
2991 CORE_ADDR frame_args_skip)
2993 gdbarch->frame_args_skip = frame_args_skip;
2997 gdbarch_unwind_pc_p (struct gdbarch *gdbarch)
2999 gdb_assert (gdbarch != NULL);
3000 return gdbarch->unwind_pc != NULL;
3004 gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
3006 gdb_assert (gdbarch != NULL);
3007 gdb_assert (gdbarch->unwind_pc != NULL);
3008 if (gdbarch_debug >= 2)
3009 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n");
3010 return gdbarch->unwind_pc (gdbarch, next_frame);
3014 set_gdbarch_unwind_pc (struct gdbarch *gdbarch,
3015 gdbarch_unwind_pc_ftype unwind_pc)
3017 gdbarch->unwind_pc = unwind_pc;
3021 gdbarch_unwind_sp_p (struct gdbarch *gdbarch)
3023 gdb_assert (gdbarch != NULL);
3024 return gdbarch->unwind_sp != NULL;
3028 gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
3030 gdb_assert (gdbarch != NULL);
3031 gdb_assert (gdbarch->unwind_sp != NULL);
3032 if (gdbarch_debug >= 2)
3033 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_sp called\n");
3034 return gdbarch->unwind_sp (gdbarch, next_frame);
3038 set_gdbarch_unwind_sp (struct gdbarch *gdbarch,
3039 gdbarch_unwind_sp_ftype unwind_sp)
3041 gdbarch->unwind_sp = unwind_sp;
3045 gdbarch_frame_num_args_p (struct gdbarch *gdbarch)
3047 gdb_assert (gdbarch != NULL);
3048 return gdbarch->frame_num_args != NULL;
3052 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
3054 gdb_assert (gdbarch != NULL);
3055 gdb_assert (gdbarch->frame_num_args != NULL);
3056 if (gdbarch_debug >= 2)
3057 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
3058 return gdbarch->frame_num_args (frame);
3062 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
3063 gdbarch_frame_num_args_ftype frame_num_args)
3065 gdbarch->frame_num_args = frame_num_args;
3069 gdbarch_frame_align_p (struct gdbarch *gdbarch)
3071 gdb_assert (gdbarch != NULL);
3072 return gdbarch->frame_align != NULL;
3076 gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
3078 gdb_assert (gdbarch != NULL);
3079 gdb_assert (gdbarch->frame_align != NULL);
3080 if (gdbarch_debug >= 2)
3081 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
3082 return gdbarch->frame_align (gdbarch, address);
3086 set_gdbarch_frame_align (struct gdbarch *gdbarch,
3087 gdbarch_frame_align_ftype frame_align)
3089 gdbarch->frame_align = frame_align;
3093 gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type)
3095 gdb_assert (gdbarch != NULL);
3096 gdb_assert (gdbarch->stabs_argument_has_addr != NULL);
3097 if (gdbarch_debug >= 2)
3098 fprintf_unfiltered (gdb_stdlog, "gdbarch_stabs_argument_has_addr called\n");
3099 return gdbarch->stabs_argument_has_addr (gdbarch, type);
3103 set_gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch,
3104 gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr)
3106 gdbarch->stabs_argument_has_addr = stabs_argument_has_addr;
3110 gdbarch_frame_red_zone_size (struct gdbarch *gdbarch)
3112 gdb_assert (gdbarch != NULL);
3113 if (gdbarch_debug >= 2)
3114 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_red_zone_size called\n");
3115 return gdbarch->frame_red_zone_size;
3119 set_gdbarch_frame_red_zone_size (struct gdbarch *gdbarch,
3120 int frame_red_zone_size)
3122 gdbarch->frame_red_zone_size = frame_red_zone_size;
3126 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
3128 gdb_assert (gdbarch != NULL);
3129 gdb_assert (gdbarch->convert_from_func_ptr_addr != NULL);
3130 if (gdbarch_debug >= 2)
3131 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
3132 return gdbarch->convert_from_func_ptr_addr (gdbarch, addr, targ);
3136 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
3137 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
3139 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
3143 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
3145 gdb_assert (gdbarch != NULL);
3146 gdb_assert (gdbarch->addr_bits_remove != NULL);
3147 if (gdbarch_debug >= 2)
3148 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
3149 return gdbarch->addr_bits_remove (gdbarch, addr);
3153 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
3154 gdbarch_addr_bits_remove_ftype addr_bits_remove)
3156 gdbarch->addr_bits_remove = addr_bits_remove;
3160 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
3162 gdb_assert (gdbarch != NULL);
3163 return gdbarch->software_single_step != NULL;
3167 gdbarch_software_single_step (struct gdbarch *gdbarch, struct regcache *regcache)
3169 gdb_assert (gdbarch != NULL);
3170 gdb_assert (gdbarch->software_single_step != NULL);
3171 if (gdbarch_debug >= 2)
3172 fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
3173 return gdbarch->software_single_step (regcache);
3177 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
3178 gdbarch_software_single_step_ftype software_single_step)
3180 gdbarch->software_single_step = software_single_step;
3184 gdbarch_single_step_through_delay_p (struct gdbarch *gdbarch)
3186 gdb_assert (gdbarch != NULL);
3187 return gdbarch->single_step_through_delay != NULL;
3191 gdbarch_single_step_through_delay (struct gdbarch *gdbarch, struct frame_info *frame)
3193 gdb_assert (gdbarch != NULL);
3194 gdb_assert (gdbarch->single_step_through_delay != NULL);
3195 if (gdbarch_debug >= 2)
3196 fprintf_unfiltered (gdb_stdlog, "gdbarch_single_step_through_delay called\n");
3197 return gdbarch->single_step_through_delay (gdbarch, frame);
3201 set_gdbarch_single_step_through_delay (struct gdbarch *gdbarch,
3202 gdbarch_single_step_through_delay_ftype single_step_through_delay)
3204 gdbarch->single_step_through_delay = single_step_through_delay;
3208 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info)
3210 gdb_assert (gdbarch != NULL);
3211 gdb_assert (gdbarch->print_insn != NULL);
3212 if (gdbarch_debug >= 2)
3213 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
3214 return gdbarch->print_insn (vma, info);
3218 set_gdbarch_print_insn (struct gdbarch *gdbarch,
3219 gdbarch_print_insn_ftype print_insn)
3221 gdbarch->print_insn = print_insn;
3225 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR pc)
3227 gdb_assert (gdbarch != NULL);
3228 gdb_assert (gdbarch->skip_trampoline_code != NULL);
3229 if (gdbarch_debug >= 2)
3230 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
3231 return gdbarch->skip_trampoline_code (frame, pc);
3235 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
3236 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
3238 gdbarch->skip_trampoline_code = skip_trampoline_code;
3242 gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
3244 gdb_assert (gdbarch != NULL);
3245 gdb_assert (gdbarch->skip_solib_resolver != NULL);
3246 if (gdbarch_debug >= 2)
3247 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_solib_resolver called\n");
3248 return gdbarch->skip_solib_resolver (gdbarch, pc);
3252 set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch,
3253 gdbarch_skip_solib_resolver_ftype skip_solib_resolver)
3255 gdbarch->skip_solib_resolver = skip_solib_resolver;
3259 gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, const char *name)
3261 gdb_assert (gdbarch != NULL);
3262 gdb_assert (gdbarch->in_solib_return_trampoline != NULL);
3263 if (gdbarch_debug >= 2)
3264 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
3265 return gdbarch->in_solib_return_trampoline (gdbarch, pc, name);
3269 set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
3270 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
3272 gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
3276 gdbarch_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR addr)
3278 gdb_assert (gdbarch != NULL);
3279 gdb_assert (gdbarch->stack_frame_destroyed_p != NULL);
3280 if (gdbarch_debug >= 2)
3281 fprintf_unfiltered (gdb_stdlog, "gdbarch_stack_frame_destroyed_p called\n");
3282 return gdbarch->stack_frame_destroyed_p (gdbarch, addr);
3286 set_gdbarch_stack_frame_destroyed_p (struct gdbarch *gdbarch,
3287 gdbarch_stack_frame_destroyed_p_ftype stack_frame_destroyed_p)
3289 gdbarch->stack_frame_destroyed_p = stack_frame_destroyed_p;
3293 gdbarch_elf_make_msymbol_special_p (struct gdbarch *gdbarch)
3295 gdb_assert (gdbarch != NULL);
3296 return gdbarch->elf_make_msymbol_special != NULL;
3300 gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
3302 gdb_assert (gdbarch != NULL);
3303 gdb_assert (gdbarch->elf_make_msymbol_special != NULL);
3304 if (gdbarch_debug >= 2)
3305 fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
3306 gdbarch->elf_make_msymbol_special (sym, msym);
3310 set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
3311 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
3313 gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
3317 gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
3319 gdb_assert (gdbarch != NULL);
3320 gdb_assert (gdbarch->coff_make_msymbol_special != NULL);
3321 if (gdbarch_debug >= 2)
3322 fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
3323 gdbarch->coff_make_msymbol_special (val, msym);
3327 set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
3328 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
3330 gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
3334 gdbarch_make_symbol_special (struct gdbarch *gdbarch, struct symbol *sym, struct objfile *objfile)
3336 gdb_assert (gdbarch != NULL);
3337 gdb_assert (gdbarch->make_symbol_special != NULL);
3338 if (gdbarch_debug >= 2)
3339 fprintf_unfiltered (gdb_stdlog, "gdbarch_make_symbol_special called\n");
3340 gdbarch->make_symbol_special (sym, objfile);
3344 set_gdbarch_make_symbol_special (struct gdbarch *gdbarch,
3345 gdbarch_make_symbol_special_ftype make_symbol_special)
3347 gdbarch->make_symbol_special = make_symbol_special;
3351 gdbarch_adjust_dwarf2_addr (struct gdbarch *gdbarch, CORE_ADDR pc)
3353 gdb_assert (gdbarch != NULL);
3354 gdb_assert (gdbarch->adjust_dwarf2_addr != NULL);
3355 if (gdbarch_debug >= 2)
3356 fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_dwarf2_addr called\n");
3357 return gdbarch->adjust_dwarf2_addr (pc);
3361 set_gdbarch_adjust_dwarf2_addr (struct gdbarch *gdbarch,
3362 gdbarch_adjust_dwarf2_addr_ftype adjust_dwarf2_addr)
3364 gdbarch->adjust_dwarf2_addr = adjust_dwarf2_addr;
3368 gdbarch_adjust_dwarf2_line (struct gdbarch *gdbarch, CORE_ADDR addr, int rel)
3370 gdb_assert (gdbarch != NULL);
3371 gdb_assert (gdbarch->adjust_dwarf2_line != NULL);
3372 if (gdbarch_debug >= 2)
3373 fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_dwarf2_line called\n");
3374 return gdbarch->adjust_dwarf2_line (addr, rel);
3378 set_gdbarch_adjust_dwarf2_line (struct gdbarch *gdbarch,
3379 gdbarch_adjust_dwarf2_line_ftype adjust_dwarf2_line)
3381 gdbarch->adjust_dwarf2_line = adjust_dwarf2_line;
3385 gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
3387 gdb_assert (gdbarch != NULL);
3388 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
3389 if (gdbarch_debug >= 2)
3390 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
3391 return gdbarch->cannot_step_breakpoint;
3395 set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
3396 int cannot_step_breakpoint)
3398 gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
3402 gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
3404 gdb_assert (gdbarch != NULL);
3405 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
3406 if (gdbarch_debug >= 2)
3407 fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
3408 return gdbarch->have_nonsteppable_watchpoint;
3412 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
3413 int have_nonsteppable_watchpoint)
3415 gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
3419 gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
3421 gdb_assert (gdbarch != NULL);
3422 return gdbarch->address_class_type_flags != NULL;
3426 gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
3428 gdb_assert (gdbarch != NULL);
3429 gdb_assert (gdbarch->address_class_type_flags != NULL);
3430 if (gdbarch_debug >= 2)
3431 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
3432 return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
3436 set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
3437 gdbarch_address_class_type_flags_ftype address_class_type_flags)
3439 gdbarch->address_class_type_flags = address_class_type_flags;
3443 gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
3445 gdb_assert (gdbarch != NULL);
3446 return gdbarch->address_class_type_flags_to_name != NULL;
3450 gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
3452 gdb_assert (gdbarch != NULL);
3453 gdb_assert (gdbarch->address_class_type_flags_to_name != NULL);
3454 if (gdbarch_debug >= 2)
3455 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
3456 return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
3460 set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
3461 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
3463 gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
3467 gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
3469 gdb_assert (gdbarch != NULL);
3470 return gdbarch->address_class_name_to_type_flags != NULL;
3474 gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
3476 gdb_assert (gdbarch != NULL);
3477 gdb_assert (gdbarch->address_class_name_to_type_flags != NULL);
3478 if (gdbarch_debug >= 2)
3479 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
3480 return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
3484 set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
3485 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
3487 gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
3491 gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
3493 gdb_assert (gdbarch != NULL);
3494 gdb_assert (gdbarch->register_reggroup_p != NULL);
3495 if (gdbarch_debug >= 2)
3496 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
3497 return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
3501 set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
3502 gdbarch_register_reggroup_p_ftype register_reggroup_p)
3504 gdbarch->register_reggroup_p = register_reggroup_p;
3508 gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch)
3510 gdb_assert (gdbarch != NULL);
3511 return gdbarch->fetch_pointer_argument != NULL;
3515 gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type)
3517 gdb_assert (gdbarch != NULL);
3518 gdb_assert (gdbarch->fetch_pointer_argument != NULL);
3519 if (gdbarch_debug >= 2)
3520 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n");
3521 return gdbarch->fetch_pointer_argument (frame, argi, type);
3525 set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch,
3526 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument)
3528 gdbarch->fetch_pointer_argument = fetch_pointer_argument;
3532 gdbarch_iterate_over_regset_sections_p (struct gdbarch *gdbarch)
3534 gdb_assert (gdbarch != NULL);
3535 return gdbarch->iterate_over_regset_sections != NULL;
3539 gdbarch_iterate_over_regset_sections (struct gdbarch *gdbarch, iterate_over_regset_sections_cb *cb, void *cb_data, const struct regcache *regcache)
3541 gdb_assert (gdbarch != NULL);
3542 gdb_assert (gdbarch->iterate_over_regset_sections != NULL);
3543 if (gdbarch_debug >= 2)
3544 fprintf_unfiltered (gdb_stdlog, "gdbarch_iterate_over_regset_sections called\n");
3545 gdbarch->iterate_over_regset_sections (gdbarch, cb, cb_data, regcache);
3549 set_gdbarch_iterate_over_regset_sections (struct gdbarch *gdbarch,
3550 gdbarch_iterate_over_regset_sections_ftype iterate_over_regset_sections)
3552 gdbarch->iterate_over_regset_sections = iterate_over_regset_sections;
3556 gdbarch_make_corefile_notes_p (struct gdbarch *gdbarch)
3558 gdb_assert (gdbarch != NULL);
3559 return gdbarch->make_corefile_notes != NULL;
3563 gdbarch_make_corefile_notes (struct gdbarch *gdbarch, bfd *obfd, int *note_size)
3565 gdb_assert (gdbarch != NULL);
3566 gdb_assert (gdbarch->make_corefile_notes != NULL);
3567 if (gdbarch_debug >= 2)
3568 fprintf_unfiltered (gdb_stdlog, "gdbarch_make_corefile_notes called\n");
3569 return gdbarch->make_corefile_notes (gdbarch, obfd, note_size);
3573 set_gdbarch_make_corefile_notes (struct gdbarch *gdbarch,
3574 gdbarch_make_corefile_notes_ftype make_corefile_notes)
3576 gdbarch->make_corefile_notes = make_corefile_notes;
3580 gdbarch_elfcore_write_linux_prpsinfo_p (struct gdbarch *gdbarch)
3582 gdb_assert (gdbarch != NULL);
3583 return gdbarch->elfcore_write_linux_prpsinfo != NULL;
3587 gdbarch_elfcore_write_linux_prpsinfo (struct gdbarch *gdbarch, bfd *obfd, char *note_data, int *note_size, const struct elf_internal_linux_prpsinfo *info)
3589 gdb_assert (gdbarch != NULL);
3590 gdb_assert (gdbarch->elfcore_write_linux_prpsinfo != NULL);
3591 if (gdbarch_debug >= 2)
3592 fprintf_unfiltered (gdb_stdlog, "gdbarch_elfcore_write_linux_prpsinfo called\n");
3593 return gdbarch->elfcore_write_linux_prpsinfo (obfd, note_data, note_size, info);
3597 set_gdbarch_elfcore_write_linux_prpsinfo (struct gdbarch *gdbarch,
3598 gdbarch_elfcore_write_linux_prpsinfo_ftype elfcore_write_linux_prpsinfo)
3600 gdbarch->elfcore_write_linux_prpsinfo = elfcore_write_linux_prpsinfo;
3604 gdbarch_find_memory_regions_p (struct gdbarch *gdbarch)
3606 gdb_assert (gdbarch != NULL);
3607 return gdbarch->find_memory_regions != NULL;
3611 gdbarch_find_memory_regions (struct gdbarch *gdbarch, find_memory_region_ftype func, void *data)
3613 gdb_assert (gdbarch != NULL);
3614 gdb_assert (gdbarch->find_memory_regions != NULL);
3615 if (gdbarch_debug >= 2)
3616 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_memory_regions called\n");
3617 return gdbarch->find_memory_regions (gdbarch, func, data);
3621 set_gdbarch_find_memory_regions (struct gdbarch *gdbarch,
3622 gdbarch_find_memory_regions_ftype find_memory_regions)
3624 gdbarch->find_memory_regions = find_memory_regions;
3628 gdbarch_core_xfer_shared_libraries_p (struct gdbarch *gdbarch)
3630 gdb_assert (gdbarch != NULL);
3631 return gdbarch->core_xfer_shared_libraries != NULL;
3635 gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len)
3637 gdb_assert (gdbarch != NULL);
3638 gdb_assert (gdbarch->core_xfer_shared_libraries != NULL);
3639 if (gdbarch_debug >= 2)
3640 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_xfer_shared_libraries called\n");
3641 return gdbarch->core_xfer_shared_libraries (gdbarch, readbuf, offset, len);
3645 set_gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch,
3646 gdbarch_core_xfer_shared_libraries_ftype core_xfer_shared_libraries)
3648 gdbarch->core_xfer_shared_libraries = core_xfer_shared_libraries;
3652 gdbarch_core_xfer_shared_libraries_aix_p (struct gdbarch *gdbarch)
3654 gdb_assert (gdbarch != NULL);
3655 return gdbarch->core_xfer_shared_libraries_aix != NULL;
3659 gdbarch_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len)
3661 gdb_assert (gdbarch != NULL);
3662 gdb_assert (gdbarch->core_xfer_shared_libraries_aix != NULL);
3663 if (gdbarch_debug >= 2)
3664 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_xfer_shared_libraries_aix called\n");
3665 return gdbarch->core_xfer_shared_libraries_aix (gdbarch, readbuf, offset, len);
3669 set_gdbarch_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch,
3670 gdbarch_core_xfer_shared_libraries_aix_ftype core_xfer_shared_libraries_aix)
3672 gdbarch->core_xfer_shared_libraries_aix = core_xfer_shared_libraries_aix;
3676 gdbarch_core_pid_to_str_p (struct gdbarch *gdbarch)
3678 gdb_assert (gdbarch != NULL);
3679 return gdbarch->core_pid_to_str != NULL;
3683 gdbarch_core_pid_to_str (struct gdbarch *gdbarch, ptid_t ptid)
3685 gdb_assert (gdbarch != NULL);
3686 gdb_assert (gdbarch->core_pid_to_str != NULL);
3687 if (gdbarch_debug >= 2)
3688 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_pid_to_str called\n");
3689 return gdbarch->core_pid_to_str (gdbarch, ptid);
3693 set_gdbarch_core_pid_to_str (struct gdbarch *gdbarch,
3694 gdbarch_core_pid_to_str_ftype core_pid_to_str)
3696 gdbarch->core_pid_to_str = core_pid_to_str;
3700 gdbarch_core_thread_name_p (struct gdbarch *gdbarch)
3702 gdb_assert (gdbarch != NULL);
3703 return gdbarch->core_thread_name != NULL;
3707 gdbarch_core_thread_name (struct gdbarch *gdbarch, struct thread_info *thr)
3709 gdb_assert (gdbarch != NULL);
3710 gdb_assert (gdbarch->core_thread_name != NULL);
3711 if (gdbarch_debug >= 2)
3712 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_thread_name called\n");
3713 return gdbarch->core_thread_name (gdbarch, thr);
3717 set_gdbarch_core_thread_name (struct gdbarch *gdbarch,
3718 gdbarch_core_thread_name_ftype core_thread_name)
3720 gdbarch->core_thread_name = core_thread_name;
3724 gdbarch_gcore_bfd_target_p (struct gdbarch *gdbarch)
3726 gdb_assert (gdbarch != NULL);
3727 return gdbarch->gcore_bfd_target != 0;
3731 gdbarch_gcore_bfd_target (struct gdbarch *gdbarch)
3733 gdb_assert (gdbarch != NULL);
3734 /* Check variable changed from pre-default. */
3735 gdb_assert (gdbarch->gcore_bfd_target != 0);
3736 if (gdbarch_debug >= 2)
3737 fprintf_unfiltered (gdb_stdlog, "gdbarch_gcore_bfd_target called\n");
3738 return gdbarch->gcore_bfd_target;
3742 set_gdbarch_gcore_bfd_target (struct gdbarch *gdbarch,
3743 const char * gcore_bfd_target)
3745 gdbarch->gcore_bfd_target = gcore_bfd_target;
3749 gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch)
3751 gdb_assert (gdbarch != NULL);
3752 /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
3753 if (gdbarch_debug >= 2)
3754 fprintf_unfiltered (gdb_stdlog, "gdbarch_vtable_function_descriptors called\n");
3755 return gdbarch->vtable_function_descriptors;
3759 set_gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch,
3760 int vtable_function_descriptors)
3762 gdbarch->vtable_function_descriptors = vtable_function_descriptors;
3766 gdbarch_vbit_in_delta (struct gdbarch *gdbarch)
3768 gdb_assert (gdbarch != NULL);
3769 /* Skip verify of vbit_in_delta, invalid_p == 0 */
3770 if (gdbarch_debug >= 2)
3771 fprintf_unfiltered (gdb_stdlog, "gdbarch_vbit_in_delta called\n");
3772 return gdbarch->vbit_in_delta;
3776 set_gdbarch_vbit_in_delta (struct gdbarch *gdbarch,
3779 gdbarch->vbit_in_delta = vbit_in_delta;
3783 gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch, struct regcache *regcache)
3785 gdb_assert (gdbarch != NULL);
3786 gdb_assert (gdbarch->skip_permanent_breakpoint != NULL);
3787 if (gdbarch_debug >= 2)
3788 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_permanent_breakpoint called\n");
3789 gdbarch->skip_permanent_breakpoint (regcache);
3793 set_gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch,
3794 gdbarch_skip_permanent_breakpoint_ftype skip_permanent_breakpoint)
3796 gdbarch->skip_permanent_breakpoint = skip_permanent_breakpoint;
3800 gdbarch_max_insn_length_p (struct gdbarch *gdbarch)
3802 gdb_assert (gdbarch != NULL);
3803 return gdbarch->max_insn_length != 0;
3807 gdbarch_max_insn_length (struct gdbarch *gdbarch)
3809 gdb_assert (gdbarch != NULL);
3810 /* Check variable changed from pre-default. */
3811 gdb_assert (gdbarch->max_insn_length != 0);
3812 if (gdbarch_debug >= 2)
3813 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_insn_length called\n");
3814 return gdbarch->max_insn_length;
3818 set_gdbarch_max_insn_length (struct gdbarch *gdbarch,
3819 ULONGEST max_insn_length)
3821 gdbarch->max_insn_length = max_insn_length;
3825 gdbarch_displaced_step_copy_insn_p (struct gdbarch *gdbarch)
3827 gdb_assert (gdbarch != NULL);
3828 return gdbarch->displaced_step_copy_insn != NULL;
3831 struct displaced_step_closure *
3832 gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch, CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
3834 gdb_assert (gdbarch != NULL);
3835 gdb_assert (gdbarch->displaced_step_copy_insn != NULL);
3836 if (gdbarch_debug >= 2)
3837 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_copy_insn called\n");
3838 return gdbarch->displaced_step_copy_insn (gdbarch, from, to, regs);
3842 set_gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch,
3843 gdbarch_displaced_step_copy_insn_ftype displaced_step_copy_insn)
3845 gdbarch->displaced_step_copy_insn = displaced_step_copy_insn;
3849 gdbarch_displaced_step_hw_singlestep (struct gdbarch *gdbarch, struct displaced_step_closure *closure)
3851 gdb_assert (gdbarch != NULL);
3852 gdb_assert (gdbarch->displaced_step_hw_singlestep != NULL);
3853 if (gdbarch_debug >= 2)
3854 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_hw_singlestep called\n");
3855 return gdbarch->displaced_step_hw_singlestep (gdbarch, closure);
3859 set_gdbarch_displaced_step_hw_singlestep (struct gdbarch *gdbarch,
3860 gdbarch_displaced_step_hw_singlestep_ftype displaced_step_hw_singlestep)
3862 gdbarch->displaced_step_hw_singlestep = displaced_step_hw_singlestep;
3866 gdbarch_displaced_step_fixup_p (struct gdbarch *gdbarch)
3868 gdb_assert (gdbarch != NULL);
3869 return gdbarch->displaced_step_fixup != NULL;
3873 gdbarch_displaced_step_fixup (struct gdbarch *gdbarch, struct displaced_step_closure *closure, CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
3875 gdb_assert (gdbarch != NULL);
3876 gdb_assert (gdbarch->displaced_step_fixup != NULL);
3877 /* Do not check predicate: gdbarch->displaced_step_fixup != NULL, allow call. */
3878 if (gdbarch_debug >= 2)
3879 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_fixup called\n");
3880 gdbarch->displaced_step_fixup (gdbarch, closure, from, to, regs);
3884 set_gdbarch_displaced_step_fixup (struct gdbarch *gdbarch,
3885 gdbarch_displaced_step_fixup_ftype displaced_step_fixup)
3887 gdbarch->displaced_step_fixup = displaced_step_fixup;
3891 gdbarch_displaced_step_free_closure (struct gdbarch *gdbarch, struct displaced_step_closure *closure)
3893 gdb_assert (gdbarch != NULL);
3894 gdb_assert (gdbarch->displaced_step_free_closure != NULL);
3895 if (gdbarch_debug >= 2)
3896 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_free_closure called\n");
3897 gdbarch->displaced_step_free_closure (gdbarch, closure);
3901 set_gdbarch_displaced_step_free_closure (struct gdbarch *gdbarch,
3902 gdbarch_displaced_step_free_closure_ftype displaced_step_free_closure)
3904 gdbarch->displaced_step_free_closure = displaced_step_free_closure;
3908 gdbarch_displaced_step_location (struct gdbarch *gdbarch)
3910 gdb_assert (gdbarch != NULL);
3911 gdb_assert (gdbarch->displaced_step_location != NULL);
3912 if (gdbarch_debug >= 2)
3913 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_location called\n");
3914 return gdbarch->displaced_step_location (gdbarch);
3918 set_gdbarch_displaced_step_location (struct gdbarch *gdbarch,
3919 gdbarch_displaced_step_location_ftype displaced_step_location)
3921 gdbarch->displaced_step_location = displaced_step_location;
3925 gdbarch_relocate_instruction_p (struct gdbarch *gdbarch)
3927 gdb_assert (gdbarch != NULL);
3928 return gdbarch->relocate_instruction != NULL;
3932 gdbarch_relocate_instruction (struct gdbarch *gdbarch, CORE_ADDR *to, CORE_ADDR from)
3934 gdb_assert (gdbarch != NULL);
3935 gdb_assert (gdbarch->relocate_instruction != NULL);
3936 /* Do not check predicate: gdbarch->relocate_instruction != NULL, allow call. */
3937 if (gdbarch_debug >= 2)
3938 fprintf_unfiltered (gdb_stdlog, "gdbarch_relocate_instruction called\n");
3939 gdbarch->relocate_instruction (gdbarch, to, from);
3943 set_gdbarch_relocate_instruction (struct gdbarch *gdbarch,
3944 gdbarch_relocate_instruction_ftype relocate_instruction)
3946 gdbarch->relocate_instruction = relocate_instruction;
3950 gdbarch_overlay_update_p (struct gdbarch *gdbarch)
3952 gdb_assert (gdbarch != NULL);
3953 return gdbarch->overlay_update != NULL;
3957 gdbarch_overlay_update (struct gdbarch *gdbarch, struct obj_section *osect)
3959 gdb_assert (gdbarch != NULL);
3960 gdb_assert (gdbarch->overlay_update != NULL);
3961 if (gdbarch_debug >= 2)
3962 fprintf_unfiltered (gdb_stdlog, "gdbarch_overlay_update called\n");
3963 gdbarch->overlay_update (osect);
3967 set_gdbarch_overlay_update (struct gdbarch *gdbarch,
3968 gdbarch_overlay_update_ftype overlay_update)
3970 gdbarch->overlay_update = overlay_update;
3974 gdbarch_core_read_description_p (struct gdbarch *gdbarch)
3976 gdb_assert (gdbarch != NULL);
3977 return gdbarch->core_read_description != NULL;
3980 const struct target_desc *
3981 gdbarch_core_read_description (struct gdbarch *gdbarch, struct target_ops *target, bfd *abfd)
3983 gdb_assert (gdbarch != NULL);
3984 gdb_assert (gdbarch->core_read_description != NULL);
3985 if (gdbarch_debug >= 2)
3986 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_read_description called\n");
3987 return gdbarch->core_read_description (gdbarch, target, abfd);
3991 set_gdbarch_core_read_description (struct gdbarch *gdbarch,
3992 gdbarch_core_read_description_ftype core_read_description)
3994 gdbarch->core_read_description = core_read_description;
3998 gdbarch_static_transform_name_p (struct gdbarch *gdbarch)
4000 gdb_assert (gdbarch != NULL);
4001 return gdbarch->static_transform_name != NULL;
4005 gdbarch_static_transform_name (struct gdbarch *gdbarch, const char *name)
4007 gdb_assert (gdbarch != NULL);
4008 gdb_assert (gdbarch->static_transform_name != NULL);
4009 if (gdbarch_debug >= 2)
4010 fprintf_unfiltered (gdb_stdlog, "gdbarch_static_transform_name called\n");
4011 return gdbarch->static_transform_name (name);
4015 set_gdbarch_static_transform_name (struct gdbarch *gdbarch,
4016 gdbarch_static_transform_name_ftype static_transform_name)
4018 gdbarch->static_transform_name = static_transform_name;
4022 gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch)
4024 gdb_assert (gdbarch != NULL);
4025 /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
4026 if (gdbarch_debug >= 2)
4027 fprintf_unfiltered (gdb_stdlog, "gdbarch_sofun_address_maybe_missing called\n");
4028 return gdbarch->sofun_address_maybe_missing;
4032 set_gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch,
4033 int sofun_address_maybe_missing)
4035 gdbarch->sofun_address_maybe_missing = sofun_address_maybe_missing;
4039 gdbarch_process_record_p (struct gdbarch *gdbarch)
4041 gdb_assert (gdbarch != NULL);
4042 return gdbarch->process_record != NULL;
4046 gdbarch_process_record (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR addr)
4048 gdb_assert (gdbarch != NULL);
4049 gdb_assert (gdbarch->process_record != NULL);
4050 if (gdbarch_debug >= 2)
4051 fprintf_unfiltered (gdb_stdlog, "gdbarch_process_record called\n");
4052 return gdbarch->process_record (gdbarch, regcache, addr);
4056 set_gdbarch_process_record (struct gdbarch *gdbarch,
4057 gdbarch_process_record_ftype process_record)
4059 gdbarch->process_record = process_record;
4063 gdbarch_process_record_signal_p (struct gdbarch *gdbarch)
4065 gdb_assert (gdbarch != NULL);
4066 return gdbarch->process_record_signal != NULL;
4070 gdbarch_process_record_signal (struct gdbarch *gdbarch, struct regcache *regcache, enum gdb_signal signal)
4072 gdb_assert (gdbarch != NULL);
4073 gdb_assert (gdbarch->process_record_signal != NULL);
4074 if (gdbarch_debug >= 2)
4075 fprintf_unfiltered (gdb_stdlog, "gdbarch_process_record_signal called\n");
4076 return gdbarch->process_record_signal (gdbarch, regcache, signal);
4080 set_gdbarch_process_record_signal (struct gdbarch *gdbarch,
4081 gdbarch_process_record_signal_ftype process_record_signal)
4083 gdbarch->process_record_signal = process_record_signal;
4087 gdbarch_gdb_signal_from_target_p (struct gdbarch *gdbarch)
4089 gdb_assert (gdbarch != NULL);
4090 return gdbarch->gdb_signal_from_target != NULL;
4094 gdbarch_gdb_signal_from_target (struct gdbarch *gdbarch, int signo)
4096 gdb_assert (gdbarch != NULL);
4097 gdb_assert (gdbarch->gdb_signal_from_target != NULL);
4098 if (gdbarch_debug >= 2)
4099 fprintf_unfiltered (gdb_stdlog, "gdbarch_gdb_signal_from_target called\n");
4100 return gdbarch->gdb_signal_from_target (gdbarch, signo);
4104 set_gdbarch_gdb_signal_from_target (struct gdbarch *gdbarch,
4105 gdbarch_gdb_signal_from_target_ftype gdb_signal_from_target)
4107 gdbarch->gdb_signal_from_target = gdb_signal_from_target;
4111 gdbarch_gdb_signal_to_target_p (struct gdbarch *gdbarch)
4113 gdb_assert (gdbarch != NULL);
4114 return gdbarch->gdb_signal_to_target != NULL;
4118 gdbarch_gdb_signal_to_target (struct gdbarch *gdbarch, enum gdb_signal signal)
4120 gdb_assert (gdbarch != NULL);
4121 gdb_assert (gdbarch->gdb_signal_to_target != NULL);
4122 if (gdbarch_debug >= 2)
4123 fprintf_unfiltered (gdb_stdlog, "gdbarch_gdb_signal_to_target called\n");
4124 return gdbarch->gdb_signal_to_target (gdbarch, signal);
4128 set_gdbarch_gdb_signal_to_target (struct gdbarch *gdbarch,
4129 gdbarch_gdb_signal_to_target_ftype gdb_signal_to_target)
4131 gdbarch->gdb_signal_to_target = gdb_signal_to_target;
4135 gdbarch_get_siginfo_type_p (struct gdbarch *gdbarch)
4137 gdb_assert (gdbarch != NULL);
4138 return gdbarch->get_siginfo_type != NULL;
4142 gdbarch_get_siginfo_type (struct gdbarch *gdbarch)
4144 gdb_assert (gdbarch != NULL);
4145 gdb_assert (gdbarch->get_siginfo_type != NULL);
4146 if (gdbarch_debug >= 2)
4147 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_siginfo_type called\n");
4148 return gdbarch->get_siginfo_type (gdbarch);
4152 set_gdbarch_get_siginfo_type (struct gdbarch *gdbarch,
4153 gdbarch_get_siginfo_type_ftype get_siginfo_type)
4155 gdbarch->get_siginfo_type = get_siginfo_type;
4159 gdbarch_record_special_symbol_p (struct gdbarch *gdbarch)
4161 gdb_assert (gdbarch != NULL);
4162 return gdbarch->record_special_symbol != NULL;
4166 gdbarch_record_special_symbol (struct gdbarch *gdbarch, struct objfile *objfile, asymbol *sym)
4168 gdb_assert (gdbarch != NULL);
4169 gdb_assert (gdbarch->record_special_symbol != NULL);
4170 if (gdbarch_debug >= 2)
4171 fprintf_unfiltered (gdb_stdlog, "gdbarch_record_special_symbol called\n");
4172 gdbarch->record_special_symbol (gdbarch, objfile, sym);
4176 set_gdbarch_record_special_symbol (struct gdbarch *gdbarch,
4177 gdbarch_record_special_symbol_ftype record_special_symbol)
4179 gdbarch->record_special_symbol = record_special_symbol;
4183 gdbarch_get_syscall_number_p (struct gdbarch *gdbarch)
4185 gdb_assert (gdbarch != NULL);
4186 return gdbarch->get_syscall_number != NULL;
4190 gdbarch_get_syscall_number (struct gdbarch *gdbarch, ptid_t ptid)
4192 gdb_assert (gdbarch != NULL);
4193 gdb_assert (gdbarch->get_syscall_number != NULL);
4194 if (gdbarch_debug >= 2)
4195 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_syscall_number called\n");
4196 return gdbarch->get_syscall_number (gdbarch, ptid);
4200 set_gdbarch_get_syscall_number (struct gdbarch *gdbarch,
4201 gdbarch_get_syscall_number_ftype get_syscall_number)
4203 gdbarch->get_syscall_number = get_syscall_number;
4207 gdbarch_xml_syscall_file (struct gdbarch *gdbarch)
4209 gdb_assert (gdbarch != NULL);
4210 /* Skip verify of xml_syscall_file, invalid_p == 0 */
4211 if (gdbarch_debug >= 2)
4212 fprintf_unfiltered (gdb_stdlog, "gdbarch_xml_syscall_file called\n");
4213 return gdbarch->xml_syscall_file;
4217 set_gdbarch_xml_syscall_file (struct gdbarch *gdbarch,
4218 const char * xml_syscall_file)
4220 gdbarch->xml_syscall_file = xml_syscall_file;
4223 struct syscalls_info *
4224 gdbarch_syscalls_info (struct gdbarch *gdbarch)
4226 gdb_assert (gdbarch != NULL);
4227 /* Skip verify of syscalls_info, invalid_p == 0 */
4228 if (gdbarch_debug >= 2)
4229 fprintf_unfiltered (gdb_stdlog, "gdbarch_syscalls_info called\n");
4230 return gdbarch->syscalls_info;
4234 set_gdbarch_syscalls_info (struct gdbarch *gdbarch,
4235 struct syscalls_info * syscalls_info)
4237 gdbarch->syscalls_info = syscalls_info;
4241 gdbarch_stap_integer_prefixes (struct gdbarch *gdbarch)
4243 gdb_assert (gdbarch != NULL);
4244 /* Skip verify of stap_integer_prefixes, invalid_p == 0 */
4245 if (gdbarch_debug >= 2)
4246 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_integer_prefixes called\n");
4247 return gdbarch->stap_integer_prefixes;
4251 set_gdbarch_stap_integer_prefixes (struct gdbarch *gdbarch,
4252 const char *const * stap_integer_prefixes)
4254 gdbarch->stap_integer_prefixes = stap_integer_prefixes;
4258 gdbarch_stap_integer_suffixes (struct gdbarch *gdbarch)
4260 gdb_assert (gdbarch != NULL);
4261 /* Skip verify of stap_integer_suffixes, invalid_p == 0 */
4262 if (gdbarch_debug >= 2)
4263 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_integer_suffixes called\n");
4264 return gdbarch->stap_integer_suffixes;
4268 set_gdbarch_stap_integer_suffixes (struct gdbarch *gdbarch,
4269 const char *const * stap_integer_suffixes)
4271 gdbarch->stap_integer_suffixes = stap_integer_suffixes;
4275 gdbarch_stap_register_prefixes (struct gdbarch *gdbarch)
4277 gdb_assert (gdbarch != NULL);
4278 /* Skip verify of stap_register_prefixes, invalid_p == 0 */
4279 if (gdbarch_debug >= 2)
4280 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_prefixes called\n");
4281 return gdbarch->stap_register_prefixes;
4285 set_gdbarch_stap_register_prefixes (struct gdbarch *gdbarch,
4286 const char *const * stap_register_prefixes)
4288 gdbarch->stap_register_prefixes = stap_register_prefixes;
4292 gdbarch_stap_register_suffixes (struct gdbarch *gdbarch)
4294 gdb_assert (gdbarch != NULL);
4295 /* Skip verify of stap_register_suffixes, invalid_p == 0 */
4296 if (gdbarch_debug >= 2)
4297 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_suffixes called\n");
4298 return gdbarch->stap_register_suffixes;
4302 set_gdbarch_stap_register_suffixes (struct gdbarch *gdbarch,
4303 const char *const * stap_register_suffixes)
4305 gdbarch->stap_register_suffixes = stap_register_suffixes;
4309 gdbarch_stap_register_indirection_prefixes (struct gdbarch *gdbarch)
4311 gdb_assert (gdbarch != NULL);
4312 /* Skip verify of stap_register_indirection_prefixes, invalid_p == 0 */
4313 if (gdbarch_debug >= 2)
4314 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_indirection_prefixes called\n");
4315 return gdbarch->stap_register_indirection_prefixes;
4319 set_gdbarch_stap_register_indirection_prefixes (struct gdbarch *gdbarch,
4320 const char *const * stap_register_indirection_prefixes)
4322 gdbarch->stap_register_indirection_prefixes = stap_register_indirection_prefixes;
4326 gdbarch_stap_register_indirection_suffixes (struct gdbarch *gdbarch)
4328 gdb_assert (gdbarch != NULL);
4329 /* Skip verify of stap_register_indirection_suffixes, invalid_p == 0 */
4330 if (gdbarch_debug >= 2)
4331 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_indirection_suffixes called\n");
4332 return gdbarch->stap_register_indirection_suffixes;
4336 set_gdbarch_stap_register_indirection_suffixes (struct gdbarch *gdbarch,
4337 const char *const * stap_register_indirection_suffixes)
4339 gdbarch->stap_register_indirection_suffixes = stap_register_indirection_suffixes;
4343 gdbarch_stap_gdb_register_prefix (struct gdbarch *gdbarch)
4345 gdb_assert (gdbarch != NULL);
4346 /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */
4347 if (gdbarch_debug >= 2)
4348 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_gdb_register_prefix called\n");
4349 return gdbarch->stap_gdb_register_prefix;
4353 set_gdbarch_stap_gdb_register_prefix (struct gdbarch *gdbarch,
4354 const char * stap_gdb_register_prefix)
4356 gdbarch->stap_gdb_register_prefix = stap_gdb_register_prefix;
4360 gdbarch_stap_gdb_register_suffix (struct gdbarch *gdbarch)
4362 gdb_assert (gdbarch != NULL);
4363 /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */
4364 if (gdbarch_debug >= 2)
4365 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_gdb_register_suffix called\n");
4366 return gdbarch->stap_gdb_register_suffix;
4370 set_gdbarch_stap_gdb_register_suffix (struct gdbarch *gdbarch,
4371 const char * stap_gdb_register_suffix)
4373 gdbarch->stap_gdb_register_suffix = stap_gdb_register_suffix;
4377 gdbarch_stap_is_single_operand_p (struct gdbarch *gdbarch)
4379 gdb_assert (gdbarch != NULL);
4380 return gdbarch->stap_is_single_operand != NULL;
4384 gdbarch_stap_is_single_operand (struct gdbarch *gdbarch, const char *s)
4386 gdb_assert (gdbarch != NULL);
4387 gdb_assert (gdbarch->stap_is_single_operand != NULL);
4388 if (gdbarch_debug >= 2)
4389 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_is_single_operand called\n");
4390 return gdbarch->stap_is_single_operand (gdbarch, s);
4394 set_gdbarch_stap_is_single_operand (struct gdbarch *gdbarch,
4395 gdbarch_stap_is_single_operand_ftype stap_is_single_operand)
4397 gdbarch->stap_is_single_operand = stap_is_single_operand;
4401 gdbarch_stap_parse_special_token_p (struct gdbarch *gdbarch)
4403 gdb_assert (gdbarch != NULL);
4404 return gdbarch->stap_parse_special_token != NULL;
4408 gdbarch_stap_parse_special_token (struct gdbarch *gdbarch, struct stap_parse_info *p)
4410 gdb_assert (gdbarch != NULL);
4411 gdb_assert (gdbarch->stap_parse_special_token != NULL);
4412 if (gdbarch_debug >= 2)
4413 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_parse_special_token called\n");
4414 return gdbarch->stap_parse_special_token (gdbarch, p);
4418 set_gdbarch_stap_parse_special_token (struct gdbarch *gdbarch,
4419 gdbarch_stap_parse_special_token_ftype stap_parse_special_token)
4421 gdbarch->stap_parse_special_token = stap_parse_special_token;
4425 gdbarch_dtrace_parse_probe_argument_p (struct gdbarch *gdbarch)
4427 gdb_assert (gdbarch != NULL);
4428 return gdbarch->dtrace_parse_probe_argument != NULL;
4432 gdbarch_dtrace_parse_probe_argument (struct gdbarch *gdbarch, struct parser_state *pstate, int narg)
4434 gdb_assert (gdbarch != NULL);
4435 gdb_assert (gdbarch->dtrace_parse_probe_argument != NULL);
4436 if (gdbarch_debug >= 2)
4437 fprintf_unfiltered (gdb_stdlog, "gdbarch_dtrace_parse_probe_argument called\n");
4438 gdbarch->dtrace_parse_probe_argument (gdbarch, pstate, narg);
4442 set_gdbarch_dtrace_parse_probe_argument (struct gdbarch *gdbarch,
4443 gdbarch_dtrace_parse_probe_argument_ftype dtrace_parse_probe_argument)
4445 gdbarch->dtrace_parse_probe_argument = dtrace_parse_probe_argument;
4449 gdbarch_dtrace_probe_is_enabled_p (struct gdbarch *gdbarch)
4451 gdb_assert (gdbarch != NULL);
4452 return gdbarch->dtrace_probe_is_enabled != NULL;
4456 gdbarch_dtrace_probe_is_enabled (struct gdbarch *gdbarch, CORE_ADDR addr)
4458 gdb_assert (gdbarch != NULL);
4459 gdb_assert (gdbarch->dtrace_probe_is_enabled != NULL);
4460 if (gdbarch_debug >= 2)
4461 fprintf_unfiltered (gdb_stdlog, "gdbarch_dtrace_probe_is_enabled called\n");
4462 return gdbarch->dtrace_probe_is_enabled (gdbarch, addr);
4466 set_gdbarch_dtrace_probe_is_enabled (struct gdbarch *gdbarch,
4467 gdbarch_dtrace_probe_is_enabled_ftype dtrace_probe_is_enabled)
4469 gdbarch->dtrace_probe_is_enabled = dtrace_probe_is_enabled;
4473 gdbarch_dtrace_enable_probe_p (struct gdbarch *gdbarch)
4475 gdb_assert (gdbarch != NULL);
4476 return gdbarch->dtrace_enable_probe != NULL;
4480 gdbarch_dtrace_enable_probe (struct gdbarch *gdbarch, CORE_ADDR addr)
4482 gdb_assert (gdbarch != NULL);
4483 gdb_assert (gdbarch->dtrace_enable_probe != NULL);
4484 if (gdbarch_debug >= 2)
4485 fprintf_unfiltered (gdb_stdlog, "gdbarch_dtrace_enable_probe called\n");
4486 gdbarch->dtrace_enable_probe (gdbarch, addr);
4490 set_gdbarch_dtrace_enable_probe (struct gdbarch *gdbarch,
4491 gdbarch_dtrace_enable_probe_ftype dtrace_enable_probe)
4493 gdbarch->dtrace_enable_probe = dtrace_enable_probe;
4497 gdbarch_dtrace_disable_probe_p (struct gdbarch *gdbarch)
4499 gdb_assert (gdbarch != NULL);
4500 return gdbarch->dtrace_disable_probe != NULL;
4504 gdbarch_dtrace_disable_probe (struct gdbarch *gdbarch, CORE_ADDR addr)
4506 gdb_assert (gdbarch != NULL);
4507 gdb_assert (gdbarch->dtrace_disable_probe != NULL);
4508 if (gdbarch_debug >= 2)
4509 fprintf_unfiltered (gdb_stdlog, "gdbarch_dtrace_disable_probe called\n");
4510 gdbarch->dtrace_disable_probe (gdbarch, addr);
4514 set_gdbarch_dtrace_disable_probe (struct gdbarch *gdbarch,
4515 gdbarch_dtrace_disable_probe_ftype dtrace_disable_probe)
4517 gdbarch->dtrace_disable_probe = dtrace_disable_probe;
4521 gdbarch_has_global_solist (struct gdbarch *gdbarch)
4523 gdb_assert (gdbarch != NULL);
4524 /* Skip verify of has_global_solist, invalid_p == 0 */
4525 if (gdbarch_debug >= 2)
4526 fprintf_unfiltered (gdb_stdlog, "gdbarch_has_global_solist called\n");
4527 return gdbarch->has_global_solist;
4531 set_gdbarch_has_global_solist (struct gdbarch *gdbarch,
4532 int has_global_solist)
4534 gdbarch->has_global_solist = has_global_solist;
4538 gdbarch_has_global_breakpoints (struct gdbarch *gdbarch)
4540 gdb_assert (gdbarch != NULL);
4541 /* Skip verify of has_global_breakpoints, invalid_p == 0 */
4542 if (gdbarch_debug >= 2)
4543 fprintf_unfiltered (gdb_stdlog, "gdbarch_has_global_breakpoints called\n");
4544 return gdbarch->has_global_breakpoints;
4548 set_gdbarch_has_global_breakpoints (struct gdbarch *gdbarch,
4549 int has_global_breakpoints)
4551 gdbarch->has_global_breakpoints = has_global_breakpoints;
4555 gdbarch_has_shared_address_space (struct gdbarch *gdbarch)
4557 gdb_assert (gdbarch != NULL);
4558 gdb_assert (gdbarch->has_shared_address_space != NULL);
4559 if (gdbarch_debug >= 2)
4560 fprintf_unfiltered (gdb_stdlog, "gdbarch_has_shared_address_space called\n");
4561 return gdbarch->has_shared_address_space (gdbarch);
4565 set_gdbarch_has_shared_address_space (struct gdbarch *gdbarch,
4566 gdbarch_has_shared_address_space_ftype has_shared_address_space)
4568 gdbarch->has_shared_address_space = has_shared_address_space;
4572 gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch, CORE_ADDR addr, char **msg)
4574 gdb_assert (gdbarch != NULL);
4575 gdb_assert (gdbarch->fast_tracepoint_valid_at != NULL);
4576 if (gdbarch_debug >= 2)
4577 fprintf_unfiltered (gdb_stdlog, "gdbarch_fast_tracepoint_valid_at called\n");
4578 return gdbarch->fast_tracepoint_valid_at (gdbarch, addr, msg);
4582 set_gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch,
4583 gdbarch_fast_tracepoint_valid_at_ftype fast_tracepoint_valid_at)
4585 gdbarch->fast_tracepoint_valid_at = fast_tracepoint_valid_at;
4589 gdbarch_guess_tracepoint_registers (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR addr)
4591 gdb_assert (gdbarch != NULL);
4592 gdb_assert (gdbarch->guess_tracepoint_registers != NULL);
4593 if (gdbarch_debug >= 2)
4594 fprintf_unfiltered (gdb_stdlog, "gdbarch_guess_tracepoint_registers called\n");
4595 gdbarch->guess_tracepoint_registers (gdbarch, regcache, addr);
4599 set_gdbarch_guess_tracepoint_registers (struct gdbarch *gdbarch,
4600 gdbarch_guess_tracepoint_registers_ftype guess_tracepoint_registers)
4602 gdbarch->guess_tracepoint_registers = guess_tracepoint_registers;
4606 gdbarch_auto_charset (struct gdbarch *gdbarch)
4608 gdb_assert (gdbarch != NULL);
4609 gdb_assert (gdbarch->auto_charset != NULL);
4610 if (gdbarch_debug >= 2)
4611 fprintf_unfiltered (gdb_stdlog, "gdbarch_auto_charset called\n");
4612 return gdbarch->auto_charset ();
4616 set_gdbarch_auto_charset (struct gdbarch *gdbarch,
4617 gdbarch_auto_charset_ftype auto_charset)
4619 gdbarch->auto_charset = auto_charset;
4623 gdbarch_auto_wide_charset (struct gdbarch *gdbarch)
4625 gdb_assert (gdbarch != NULL);
4626 gdb_assert (gdbarch->auto_wide_charset != NULL);
4627 if (gdbarch_debug >= 2)
4628 fprintf_unfiltered (gdb_stdlog, "gdbarch_auto_wide_charset called\n");
4629 return gdbarch->auto_wide_charset ();
4633 set_gdbarch_auto_wide_charset (struct gdbarch *gdbarch,
4634 gdbarch_auto_wide_charset_ftype auto_wide_charset)
4636 gdbarch->auto_wide_charset = auto_wide_charset;
4640 gdbarch_solib_symbols_extension (struct gdbarch *gdbarch)
4642 gdb_assert (gdbarch != NULL);
4643 if (gdbarch_debug >= 2)
4644 fprintf_unfiltered (gdb_stdlog, "gdbarch_solib_symbols_extension called\n");
4645 return gdbarch->solib_symbols_extension;
4649 set_gdbarch_solib_symbols_extension (struct gdbarch *gdbarch,
4650 const char * solib_symbols_extension)
4652 gdbarch->solib_symbols_extension = solib_symbols_extension;
4656 gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch)
4658 gdb_assert (gdbarch != NULL);
4659 /* Skip verify of has_dos_based_file_system, invalid_p == 0 */
4660 if (gdbarch_debug >= 2)
4661 fprintf_unfiltered (gdb_stdlog, "gdbarch_has_dos_based_file_system called\n");
4662 return gdbarch->has_dos_based_file_system;
4666 set_gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch,
4667 int has_dos_based_file_system)
4669 gdbarch->has_dos_based_file_system = has_dos_based_file_system;
4673 gdbarch_gen_return_address (struct gdbarch *gdbarch, struct agent_expr *ax, struct axs_value *value, CORE_ADDR scope)
4675 gdb_assert (gdbarch != NULL);
4676 gdb_assert (gdbarch->gen_return_address != NULL);
4677 if (gdbarch_debug >= 2)
4678 fprintf_unfiltered (gdb_stdlog, "gdbarch_gen_return_address called\n");
4679 gdbarch->gen_return_address (gdbarch, ax, value, scope);
4683 set_gdbarch_gen_return_address (struct gdbarch *gdbarch,
4684 gdbarch_gen_return_address_ftype gen_return_address)
4686 gdbarch->gen_return_address = gen_return_address;
4690 gdbarch_info_proc_p (struct gdbarch *gdbarch)
4692 gdb_assert (gdbarch != NULL);
4693 return gdbarch->info_proc != NULL;
4697 gdbarch_info_proc (struct gdbarch *gdbarch, const char *args, enum info_proc_what what)
4699 gdb_assert (gdbarch != NULL);
4700 gdb_assert (gdbarch->info_proc != NULL);
4701 if (gdbarch_debug >= 2)
4702 fprintf_unfiltered (gdb_stdlog, "gdbarch_info_proc called\n");
4703 gdbarch->info_proc (gdbarch, args, what);
4707 set_gdbarch_info_proc (struct gdbarch *gdbarch,
4708 gdbarch_info_proc_ftype info_proc)
4710 gdbarch->info_proc = info_proc;
4714 gdbarch_core_info_proc_p (struct gdbarch *gdbarch)
4716 gdb_assert (gdbarch != NULL);
4717 return gdbarch->core_info_proc != NULL;
4721 gdbarch_core_info_proc (struct gdbarch *gdbarch, const char *args, enum info_proc_what what)
4723 gdb_assert (gdbarch != NULL);
4724 gdb_assert (gdbarch->core_info_proc != NULL);
4725 if (gdbarch_debug >= 2)
4726 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_info_proc called\n");
4727 gdbarch->core_info_proc (gdbarch, args, what);
4731 set_gdbarch_core_info_proc (struct gdbarch *gdbarch,
4732 gdbarch_core_info_proc_ftype core_info_proc)
4734 gdbarch->core_info_proc = core_info_proc;
4738 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)
4740 gdb_assert (gdbarch != NULL);
4741 gdb_assert (gdbarch->iterate_over_objfiles_in_search_order != NULL);
4742 if (gdbarch_debug >= 2)
4743 fprintf_unfiltered (gdb_stdlog, "gdbarch_iterate_over_objfiles_in_search_order called\n");
4744 gdbarch->iterate_over_objfiles_in_search_order (gdbarch, cb, cb_data, current_objfile);
4748 set_gdbarch_iterate_over_objfiles_in_search_order (struct gdbarch *gdbarch,
4749 gdbarch_iterate_over_objfiles_in_search_order_ftype iterate_over_objfiles_in_search_order)
4751 gdbarch->iterate_over_objfiles_in_search_order = iterate_over_objfiles_in_search_order;
4754 struct ravenscar_arch_ops *
4755 gdbarch_ravenscar_ops (struct gdbarch *gdbarch)
4757 gdb_assert (gdbarch != NULL);
4758 /* Skip verify of ravenscar_ops, invalid_p == 0 */
4759 if (gdbarch_debug >= 2)
4760 fprintf_unfiltered (gdb_stdlog, "gdbarch_ravenscar_ops called\n");
4761 return gdbarch->ravenscar_ops;
4765 set_gdbarch_ravenscar_ops (struct gdbarch *gdbarch,
4766 struct ravenscar_arch_ops * ravenscar_ops)
4768 gdbarch->ravenscar_ops = ravenscar_ops;
4772 gdbarch_insn_is_call (struct gdbarch *gdbarch, CORE_ADDR addr)
4774 gdb_assert (gdbarch != NULL);
4775 gdb_assert (gdbarch->insn_is_call != NULL);
4776 if (gdbarch_debug >= 2)
4777 fprintf_unfiltered (gdb_stdlog, "gdbarch_insn_is_call called\n");
4778 return gdbarch->insn_is_call (gdbarch, addr);
4782 set_gdbarch_insn_is_call (struct gdbarch *gdbarch,
4783 gdbarch_insn_is_call_ftype insn_is_call)
4785 gdbarch->insn_is_call = insn_is_call;
4789 gdbarch_insn_is_ret (struct gdbarch *gdbarch, CORE_ADDR addr)
4791 gdb_assert (gdbarch != NULL);
4792 gdb_assert (gdbarch->insn_is_ret != NULL);
4793 if (gdbarch_debug >= 2)
4794 fprintf_unfiltered (gdb_stdlog, "gdbarch_insn_is_ret called\n");
4795 return gdbarch->insn_is_ret (gdbarch, addr);
4799 set_gdbarch_insn_is_ret (struct gdbarch *gdbarch,
4800 gdbarch_insn_is_ret_ftype insn_is_ret)
4802 gdbarch->insn_is_ret = insn_is_ret;
4806 gdbarch_insn_is_jump (struct gdbarch *gdbarch, CORE_ADDR addr)
4808 gdb_assert (gdbarch != NULL);
4809 gdb_assert (gdbarch->insn_is_jump != NULL);
4810 if (gdbarch_debug >= 2)
4811 fprintf_unfiltered (gdb_stdlog, "gdbarch_insn_is_jump called\n");
4812 return gdbarch->insn_is_jump (gdbarch, addr);
4816 set_gdbarch_insn_is_jump (struct gdbarch *gdbarch,
4817 gdbarch_insn_is_jump_ftype insn_is_jump)
4819 gdbarch->insn_is_jump = insn_is_jump;
4823 gdbarch_auxv_parse_p (struct gdbarch *gdbarch)
4825 gdb_assert (gdbarch != NULL);
4826 return gdbarch->auxv_parse != NULL;
4830 gdbarch_auxv_parse (struct gdbarch *gdbarch, gdb_byte **readptr, gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp)
4832 gdb_assert (gdbarch != NULL);
4833 gdb_assert (gdbarch->auxv_parse != NULL);
4834 if (gdbarch_debug >= 2)
4835 fprintf_unfiltered (gdb_stdlog, "gdbarch_auxv_parse called\n");
4836 return gdbarch->auxv_parse (gdbarch, readptr, endptr, typep, valp);
4840 set_gdbarch_auxv_parse (struct gdbarch *gdbarch,
4841 gdbarch_auxv_parse_ftype auxv_parse)
4843 gdbarch->auxv_parse = auxv_parse;
4847 gdbarch_print_auxv_entry (struct gdbarch *gdbarch, struct ui_file *file, CORE_ADDR type, CORE_ADDR val)
4849 gdb_assert (gdbarch != NULL);
4850 gdb_assert (gdbarch->print_auxv_entry != NULL);
4851 if (gdbarch_debug >= 2)
4852 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_auxv_entry called\n");
4853 gdbarch->print_auxv_entry (gdbarch, file, type, val);
4857 set_gdbarch_print_auxv_entry (struct gdbarch *gdbarch,
4858 gdbarch_print_auxv_entry_ftype print_auxv_entry)
4860 gdbarch->print_auxv_entry = print_auxv_entry;
4864 gdbarch_vsyscall_range (struct gdbarch *gdbarch, struct mem_range *range)
4866 gdb_assert (gdbarch != NULL);
4867 gdb_assert (gdbarch->vsyscall_range != NULL);
4868 if (gdbarch_debug >= 2)
4869 fprintf_unfiltered (gdb_stdlog, "gdbarch_vsyscall_range called\n");
4870 return gdbarch->vsyscall_range (gdbarch, range);
4874 set_gdbarch_vsyscall_range (struct gdbarch *gdbarch,
4875 gdbarch_vsyscall_range_ftype vsyscall_range)
4877 gdbarch->vsyscall_range = vsyscall_range;
4881 gdbarch_infcall_mmap (struct gdbarch *gdbarch, CORE_ADDR size, unsigned prot)
4883 gdb_assert (gdbarch != NULL);
4884 gdb_assert (gdbarch->infcall_mmap != NULL);
4885 if (gdbarch_debug >= 2)
4886 fprintf_unfiltered (gdb_stdlog, "gdbarch_infcall_mmap called\n");
4887 return gdbarch->infcall_mmap (size, prot);
4891 set_gdbarch_infcall_mmap (struct gdbarch *gdbarch,
4892 gdbarch_infcall_mmap_ftype infcall_mmap)
4894 gdbarch->infcall_mmap = infcall_mmap;
4898 gdbarch_infcall_munmap (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR size)
4900 gdb_assert (gdbarch != NULL);
4901 gdb_assert (gdbarch->infcall_munmap != NULL);
4902 if (gdbarch_debug >= 2)
4903 fprintf_unfiltered (gdb_stdlog, "gdbarch_infcall_munmap called\n");
4904 gdbarch->infcall_munmap (addr, size);
4908 set_gdbarch_infcall_munmap (struct gdbarch *gdbarch,
4909 gdbarch_infcall_munmap_ftype infcall_munmap)
4911 gdbarch->infcall_munmap = infcall_munmap;
4915 gdbarch_gcc_target_options (struct gdbarch *gdbarch)
4917 gdb_assert (gdbarch != NULL);
4918 gdb_assert (gdbarch->gcc_target_options != NULL);
4919 if (gdbarch_debug >= 2)
4920 fprintf_unfiltered (gdb_stdlog, "gdbarch_gcc_target_options called\n");
4921 return gdbarch->gcc_target_options (gdbarch);
4925 set_gdbarch_gcc_target_options (struct gdbarch *gdbarch,
4926 gdbarch_gcc_target_options_ftype gcc_target_options)
4928 gdbarch->gcc_target_options = gcc_target_options;
4932 gdbarch_gnu_triplet_regexp (struct gdbarch *gdbarch)
4934 gdb_assert (gdbarch != NULL);
4935 gdb_assert (gdbarch->gnu_triplet_regexp != NULL);
4936 if (gdbarch_debug >= 2)
4937 fprintf_unfiltered (gdb_stdlog, "gdbarch_gnu_triplet_regexp called\n");
4938 return gdbarch->gnu_triplet_regexp (gdbarch);
4942 set_gdbarch_gnu_triplet_regexp (struct gdbarch *gdbarch,
4943 gdbarch_gnu_triplet_regexp_ftype gnu_triplet_regexp)
4945 gdbarch->gnu_triplet_regexp = gnu_triplet_regexp;
4949 gdbarch_addressable_memory_unit_size (struct gdbarch *gdbarch)
4951 gdb_assert (gdbarch != NULL);
4952 gdb_assert (gdbarch->addressable_memory_unit_size != NULL);
4953 if (gdbarch_debug >= 2)
4954 fprintf_unfiltered (gdb_stdlog, "gdbarch_addressable_memory_unit_size called\n");
4955 return gdbarch->addressable_memory_unit_size (gdbarch);
4959 set_gdbarch_addressable_memory_unit_size (struct gdbarch *gdbarch,
4960 gdbarch_addressable_memory_unit_size_ftype addressable_memory_unit_size)
4962 gdbarch->addressable_memory_unit_size = addressable_memory_unit_size;
4966 /* Keep a registry of per-architecture data-pointers required by GDB
4973 gdbarch_data_pre_init_ftype *pre_init;
4974 gdbarch_data_post_init_ftype *post_init;
4977 struct gdbarch_data_registration
4979 struct gdbarch_data *data;
4980 struct gdbarch_data_registration *next;
4983 struct gdbarch_data_registry
4986 struct gdbarch_data_registration *registrations;
4989 struct gdbarch_data_registry gdbarch_data_registry =
4994 static struct gdbarch_data *
4995 gdbarch_data_register (gdbarch_data_pre_init_ftype *pre_init,
4996 gdbarch_data_post_init_ftype *post_init)
4998 struct gdbarch_data_registration **curr;
5000 /* Append the new registration. */
5001 for (curr = &gdbarch_data_registry.registrations;
5003 curr = &(*curr)->next);
5004 (*curr) = XNEW (struct gdbarch_data_registration);
5005 (*curr)->next = NULL;
5006 (*curr)->data = XNEW (struct gdbarch_data);
5007 (*curr)->data->index = gdbarch_data_registry.nr++;
5008 (*curr)->data->pre_init = pre_init;
5009 (*curr)->data->post_init = post_init;
5010 (*curr)->data->init_p = 1;
5011 return (*curr)->data;
5014 struct gdbarch_data *
5015 gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype *pre_init)
5017 return gdbarch_data_register (pre_init, NULL);
5020 struct gdbarch_data *
5021 gdbarch_data_register_post_init (gdbarch_data_post_init_ftype *post_init)
5023 return gdbarch_data_register (NULL, post_init);
5026 /* Create/delete the gdbarch data vector. */
5029 alloc_gdbarch_data (struct gdbarch *gdbarch)
5031 gdb_assert (gdbarch->data == NULL);
5032 gdbarch->nr_data = gdbarch_data_registry.nr;
5033 gdbarch->data = GDBARCH_OBSTACK_CALLOC (gdbarch, gdbarch->nr_data, void *);
5036 /* Initialize the current value of the specified per-architecture
5040 deprecated_set_gdbarch_data (struct gdbarch *gdbarch,
5041 struct gdbarch_data *data,
5044 gdb_assert (data->index < gdbarch->nr_data);
5045 gdb_assert (gdbarch->data[data->index] == NULL);
5046 gdb_assert (data->pre_init == NULL);
5047 gdbarch->data[data->index] = pointer;
5050 /* Return the current value of the specified per-architecture
5054 gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
5056 gdb_assert (data->index < gdbarch->nr_data);
5057 if (gdbarch->data[data->index] == NULL)
5059 /* The data-pointer isn't initialized, call init() to get a
5061 if (data->pre_init != NULL)
5062 /* Mid architecture creation: pass just the obstack, and not
5063 the entire architecture, as that way it isn't possible for
5064 pre-init code to refer to undefined architecture
5066 gdbarch->data[data->index] = data->pre_init (gdbarch->obstack);
5067 else if (gdbarch->initialized_p
5068 && data->post_init != NULL)
5069 /* Post architecture creation: pass the entire architecture
5070 (as all fields are valid), but be careful to also detect
5071 recursive references. */
5073 gdb_assert (data->init_p);
5075 gdbarch->data[data->index] = data->post_init (gdbarch);
5079 /* The architecture initialization hasn't completed - punt -
5080 hope that the caller knows what they are doing. Once
5081 deprecated_set_gdbarch_data has been initialized, this can be
5082 changed to an internal error. */
5084 gdb_assert (gdbarch->data[data->index] != NULL);
5086 return gdbarch->data[data->index];
5090 /* Keep a registry of the architectures known by GDB. */
5092 struct gdbarch_registration
5094 enum bfd_architecture bfd_architecture;
5095 gdbarch_init_ftype *init;
5096 gdbarch_dump_tdep_ftype *dump_tdep;
5097 struct gdbarch_list *arches;
5098 struct gdbarch_registration *next;
5101 static struct gdbarch_registration *gdbarch_registry = NULL;
5104 append_name (const char ***buf, int *nr, const char *name)
5106 *buf = XRESIZEVEC (const char *, *buf, *nr + 1);
5112 gdbarch_printable_names (void)
5114 /* Accumulate a list of names based on the registed list of
5117 const char **arches = NULL;
5118 struct gdbarch_registration *rego;
5120 for (rego = gdbarch_registry;
5124 const struct bfd_arch_info *ap;
5125 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
5127 internal_error (__FILE__, __LINE__,
5128 _("gdbarch_architecture_names: multi-arch unknown"));
5131 append_name (&arches, &nr_arches, ap->printable_name);
5136 append_name (&arches, &nr_arches, NULL);
5142 gdbarch_register (enum bfd_architecture bfd_architecture,
5143 gdbarch_init_ftype *init,
5144 gdbarch_dump_tdep_ftype *dump_tdep)
5146 struct gdbarch_registration **curr;
5147 const struct bfd_arch_info *bfd_arch_info;
5149 /* Check that BFD recognizes this architecture */
5150 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
5151 if (bfd_arch_info == NULL)
5153 internal_error (__FILE__, __LINE__,
5154 _("gdbarch: Attempt to register "
5155 "unknown architecture (%d)"),
5158 /* Check that we haven't seen this architecture before. */
5159 for (curr = &gdbarch_registry;
5161 curr = &(*curr)->next)
5163 if (bfd_architecture == (*curr)->bfd_architecture)
5164 internal_error (__FILE__, __LINE__,
5165 _("gdbarch: Duplicate registration "
5166 "of architecture (%s)"),
5167 bfd_arch_info->printable_name);
5171 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, %s)\n",
5172 bfd_arch_info->printable_name,
5173 host_address_to_string (init));
5175 (*curr) = XNEW (struct gdbarch_registration);
5176 (*curr)->bfd_architecture = bfd_architecture;
5177 (*curr)->init = init;
5178 (*curr)->dump_tdep = dump_tdep;
5179 (*curr)->arches = NULL;
5180 (*curr)->next = NULL;
5184 register_gdbarch_init (enum bfd_architecture bfd_architecture,
5185 gdbarch_init_ftype *init)
5187 gdbarch_register (bfd_architecture, init, NULL);
5191 /* Look for an architecture using gdbarch_info. */
5193 struct gdbarch_list *
5194 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
5195 const struct gdbarch_info *info)
5197 for (; arches != NULL; arches = arches->next)
5199 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
5201 if (info->byte_order != arches->gdbarch->byte_order)
5203 if (info->osabi != arches->gdbarch->osabi)
5205 if (info->target_desc != arches->gdbarch->target_desc)
5213 /* Find an architecture that matches the specified INFO. Create a new
5214 architecture if needed. Return that new architecture. */
5217 gdbarch_find_by_info (struct gdbarch_info info)
5219 struct gdbarch *new_gdbarch;
5220 struct gdbarch_registration *rego;
5222 /* Fill in missing parts of the INFO struct using a number of
5223 sources: "set ..."; INFOabfd supplied; and the global
5225 gdbarch_info_fill (&info);
5227 /* Must have found some sort of architecture. */
5228 gdb_assert (info.bfd_arch_info != NULL);
5232 fprintf_unfiltered (gdb_stdlog,
5233 "gdbarch_find_by_info: info.bfd_arch_info %s\n",
5234 (info.bfd_arch_info != NULL
5235 ? info.bfd_arch_info->printable_name
5237 fprintf_unfiltered (gdb_stdlog,
5238 "gdbarch_find_by_info: info.byte_order %d (%s)\n",
5240 (info.byte_order == BFD_ENDIAN_BIG ? "big"
5241 : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
5243 fprintf_unfiltered (gdb_stdlog,
5244 "gdbarch_find_by_info: info.osabi %d (%s)\n",
5245 info.osabi, gdbarch_osabi_name (info.osabi));
5246 fprintf_unfiltered (gdb_stdlog,
5247 "gdbarch_find_by_info: info.abfd %s\n",
5248 host_address_to_string (info.abfd));
5249 fprintf_unfiltered (gdb_stdlog,
5250 "gdbarch_find_by_info: info.tdep_info %s\n",
5251 host_address_to_string (info.tdep_info));
5254 /* Find the tdep code that knows about this architecture. */
5255 for (rego = gdbarch_registry;
5258 if (rego->bfd_architecture == info.bfd_arch_info->arch)
5263 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
5264 "No matching architecture\n");
5268 /* Ask the tdep code for an architecture that matches "info". */
5269 new_gdbarch = rego->init (info, rego->arches);
5271 /* Did the tdep code like it? No. Reject the change and revert to
5272 the old architecture. */
5273 if (new_gdbarch == NULL)
5276 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
5277 "Target rejected architecture\n");
5281 /* Is this a pre-existing architecture (as determined by already
5282 being initialized)? Move it to the front of the architecture
5283 list (keeping the list sorted Most Recently Used). */
5284 if (new_gdbarch->initialized_p)
5286 struct gdbarch_list **list;
5287 struct gdbarch_list *self;
5289 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
5290 "Previous architecture %s (%s) selected\n",
5291 host_address_to_string (new_gdbarch),
5292 new_gdbarch->bfd_arch_info->printable_name);
5293 /* Find the existing arch in the list. */
5294 for (list = ®o->arches;
5295 (*list) != NULL && (*list)->gdbarch != new_gdbarch;
5296 list = &(*list)->next);
5297 /* It had better be in the list of architectures. */
5298 gdb_assert ((*list) != NULL && (*list)->gdbarch == new_gdbarch);
5301 (*list) = self->next;
5302 /* Insert SELF at the front. */
5303 self->next = rego->arches;
5304 rego->arches = self;
5309 /* It's a new architecture. */
5311 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
5312 "New architecture %s (%s) selected\n",
5313 host_address_to_string (new_gdbarch),
5314 new_gdbarch->bfd_arch_info->printable_name);
5316 /* Insert the new architecture into the front of the architecture
5317 list (keep the list sorted Most Recently Used). */
5319 struct gdbarch_list *self = XNEW (struct gdbarch_list);
5320 self->next = rego->arches;
5321 self->gdbarch = new_gdbarch;
5322 rego->arches = self;
5325 /* Check that the newly installed architecture is valid. Plug in
5326 any post init values. */
5327 new_gdbarch->dump_tdep = rego->dump_tdep;
5328 verify_gdbarch (new_gdbarch);
5329 new_gdbarch->initialized_p = 1;
5332 gdbarch_dump (new_gdbarch, gdb_stdlog);
5337 /* Make the specified architecture current. */
5340 set_target_gdbarch (struct gdbarch *new_gdbarch)
5342 gdb_assert (new_gdbarch != NULL);
5343 gdb_assert (new_gdbarch->initialized_p);
5344 current_inferior ()->gdbarch = new_gdbarch;
5345 observer_notify_architecture_changed (new_gdbarch);
5346 registers_changed ();
5349 /* Return the current inferior's arch. */
5352 target_gdbarch (void)
5354 return current_inferior ()->gdbarch;
5357 extern void _initialize_gdbarch (void);
5360 _initialize_gdbarch (void)
5362 add_setshow_zuinteger_cmd ("arch", class_maintenance, &gdbarch_debug, _("\
5363 Set architecture debugging."), _("\
5364 Show architecture debugging."), _("\
5365 When non-zero, architecture debugging is enabled."),
5368 &setdebuglist, &showdebuglist);