1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED -*- buffer-read-only: t -*- */
4 /* Dynamic architecture support for GDB, the GNU debugger.
6 Copyright (C) 1998-2014 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"
45 #include "gdb_assert.h"
47 #include "reggroups.h"
49 #include "gdb_obstack.h"
54 /* Static function declarations */
56 static void alloc_gdbarch_data (struct gdbarch *);
58 /* Non-zero if we want to trace architecture code. */
61 #define GDBARCH_DEBUG 0
63 unsigned int gdbarch_debug = GDBARCH_DEBUG;
65 show_gdbarch_debug (struct ui_file *file, int from_tty,
66 struct cmd_list_element *c, const char *value)
68 fprintf_filtered (file, _("Architecture debugging is %s.\n"), value);
72 pformat (const struct floatformat **format)
77 /* Just print out one of them - this is only for diagnostics. */
78 return format[0]->name;
82 pstring (const char *string)
89 /* Helper function to print a list of strings, represented as "const
90 char *const *". The list is printed comma-separated. */
93 pstring_list (const char *const *list)
103 for (p = list; *p != NULL && offset < sizeof (ret); ++p)
105 size_t s = xsnprintf (ret + offset, sizeof (ret) - offset, "%s, ", *p);
111 gdb_assert (offset - 2 < sizeof (ret));
112 ret[offset - 2] = '\0';
119 /* Maintain the struct gdbarch object. */
123 /* Has this architecture been fully initialized? */
126 /* An obstack bound to the lifetime of the architecture. */
127 struct obstack *obstack;
129 /* basic architectural information. */
130 const struct bfd_arch_info * bfd_arch_info;
131 enum bfd_endian byte_order;
132 enum bfd_endian byte_order_for_code;
133 enum gdb_osabi osabi;
134 const struct target_desc * target_desc;
136 /* target specific vector. */
137 struct gdbarch_tdep *tdep;
138 gdbarch_dump_tdep_ftype *dump_tdep;
140 /* per-architecture data-pointers. */
144 /* Multi-arch values.
146 When extending this structure you must:
150 Declare set/get functions and define the corresponding
153 gdbarch_alloc(): If zero/NULL is not a suitable default,
154 initialize the new field.
156 verify_gdbarch(): Confirm that the target updated the field
159 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
162 ``startup_gdbarch()'': Append an initial value to the static
163 variable (base values on the host's c-type system).
165 get_gdbarch(): Implement the set/get functions (probably using
166 the macro's as shortcuts).
175 int long_long_align_bit;
177 const struct floatformat ** half_format;
179 const struct floatformat ** float_format;
181 const struct floatformat ** double_format;
183 const struct floatformat ** long_double_format;
186 int dwarf2_addr_size;
188 gdbarch_read_pc_ftype *read_pc;
189 gdbarch_write_pc_ftype *write_pc;
190 gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer;
191 gdbarch_pseudo_register_read_ftype *pseudo_register_read;
192 gdbarch_pseudo_register_read_value_ftype *pseudo_register_read_value;
193 gdbarch_pseudo_register_write_ftype *pseudo_register_write;
196 gdbarch_ax_pseudo_register_collect_ftype *ax_pseudo_register_collect;
197 gdbarch_ax_pseudo_register_push_stack_ftype *ax_pseudo_register_push_stack;
202 gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum;
203 gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum;
204 gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum;
205 gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum;
206 gdbarch_register_name_ftype *register_name;
207 gdbarch_register_type_ftype *register_type;
208 gdbarch_dummy_id_ftype *dummy_id;
209 int deprecated_fp_regnum;
210 gdbarch_push_dummy_call_ftype *push_dummy_call;
211 int call_dummy_location;
212 gdbarch_push_dummy_code_ftype *push_dummy_code;
213 gdbarch_print_registers_info_ftype *print_registers_info;
214 gdbarch_print_float_info_ftype *print_float_info;
215 gdbarch_print_vector_info_ftype *print_vector_info;
216 gdbarch_register_sim_regno_ftype *register_sim_regno;
217 gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
218 gdbarch_cannot_store_register_ftype *cannot_store_register;
219 gdbarch_get_longjmp_target_ftype *get_longjmp_target;
220 int believe_pcc_promotion;
221 gdbarch_convert_register_p_ftype *convert_register_p;
222 gdbarch_register_to_value_ftype *register_to_value;
223 gdbarch_value_to_register_ftype *value_to_register;
224 gdbarch_value_from_register_ftype *value_from_register;
225 gdbarch_pointer_to_address_ftype *pointer_to_address;
226 gdbarch_address_to_pointer_ftype *address_to_pointer;
227 gdbarch_integer_to_address_ftype *integer_to_address;
228 gdbarch_return_value_ftype *return_value;
229 gdbarch_return_in_first_hidden_param_p_ftype *return_in_first_hidden_param_p;
230 gdbarch_skip_prologue_ftype *skip_prologue;
231 gdbarch_skip_main_prologue_ftype *skip_main_prologue;
232 gdbarch_skip_entrypoint_ftype *skip_entrypoint;
233 gdbarch_inner_than_ftype *inner_than;
234 gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
235 gdbarch_remote_breakpoint_from_pc_ftype *remote_breakpoint_from_pc;
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_in_function_epilogue_p_ftype *in_function_epilogue_p;
259 gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
260 gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
261 int cannot_step_breakpoint;
262 int have_nonsteppable_watchpoint;
263 gdbarch_address_class_type_flags_ftype *address_class_type_flags;
264 gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name;
265 gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
266 gdbarch_register_reggroup_p_ftype *register_reggroup_p;
267 gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument;
268 gdbarch_regset_from_core_section_ftype *regset_from_core_section;
269 struct core_regset_section * core_regset_sections;
270 gdbarch_make_corefile_notes_ftype *make_corefile_notes;
271 gdbarch_elfcore_write_linux_prpsinfo_ftype *elfcore_write_linux_prpsinfo;
272 gdbarch_find_memory_regions_ftype *find_memory_regions;
273 gdbarch_core_xfer_shared_libraries_ftype *core_xfer_shared_libraries;
274 gdbarch_core_xfer_shared_libraries_aix_ftype *core_xfer_shared_libraries_aix;
275 gdbarch_core_pid_to_str_ftype *core_pid_to_str;
276 const char * gcore_bfd_target;
277 int vtable_function_descriptors;
279 gdbarch_skip_permanent_breakpoint_ftype *skip_permanent_breakpoint;
280 ULONGEST max_insn_length;
281 gdbarch_displaced_step_copy_insn_ftype *displaced_step_copy_insn;
282 gdbarch_displaced_step_hw_singlestep_ftype *displaced_step_hw_singlestep;
283 gdbarch_displaced_step_fixup_ftype *displaced_step_fixup;
284 gdbarch_displaced_step_free_closure_ftype *displaced_step_free_closure;
285 gdbarch_displaced_step_location_ftype *displaced_step_location;
286 gdbarch_relocate_instruction_ftype *relocate_instruction;
287 gdbarch_overlay_update_ftype *overlay_update;
288 gdbarch_core_read_description_ftype *core_read_description;
289 gdbarch_static_transform_name_ftype *static_transform_name;
290 int sofun_address_maybe_missing;
291 gdbarch_process_record_ftype *process_record;
292 gdbarch_process_record_signal_ftype *process_record_signal;
293 gdbarch_gdb_signal_from_target_ftype *gdb_signal_from_target;
294 gdbarch_gdb_signal_to_target_ftype *gdb_signal_to_target;
295 gdbarch_get_siginfo_type_ftype *get_siginfo_type;
296 gdbarch_record_special_symbol_ftype *record_special_symbol;
297 gdbarch_get_syscall_number_ftype *get_syscall_number;
298 const char *const * stap_integer_prefixes;
299 const char *const * stap_integer_suffixes;
300 const char *const * stap_register_prefixes;
301 const char *const * stap_register_suffixes;
302 const char *const * stap_register_indirection_prefixes;
303 const char *const * stap_register_indirection_suffixes;
304 const char * stap_gdb_register_prefix;
305 const char * stap_gdb_register_suffix;
306 gdbarch_stap_is_single_operand_ftype *stap_is_single_operand;
307 gdbarch_stap_parse_special_token_ftype *stap_parse_special_token;
308 int has_global_solist;
309 int has_global_breakpoints;
310 gdbarch_has_shared_address_space_ftype *has_shared_address_space;
311 gdbarch_fast_tracepoint_valid_at_ftype *fast_tracepoint_valid_at;
312 gdbarch_auto_charset_ftype *auto_charset;
313 gdbarch_auto_wide_charset_ftype *auto_wide_charset;
314 const char * solib_symbols_extension;
315 int has_dos_based_file_system;
316 gdbarch_gen_return_address_ftype *gen_return_address;
317 gdbarch_info_proc_ftype *info_proc;
318 gdbarch_core_info_proc_ftype *core_info_proc;
319 gdbarch_iterate_over_objfiles_in_search_order_ftype *iterate_over_objfiles_in_search_order;
320 struct ravenscar_arch_ops * ravenscar_ops;
321 gdbarch_insn_is_call_ftype *insn_is_call;
322 gdbarch_insn_is_ret_ftype *insn_is_ret;
323 gdbarch_insn_is_jump_ftype *insn_is_jump;
327 /* The default architecture uses host values (for want of a better
330 extern const struct bfd_arch_info bfd_default_arch_struct;
332 struct gdbarch startup_gdbarch =
334 1, /* Always initialized. */
335 NULL, /* The obstack. */
336 /* basic architecture information. */
337 &bfd_default_arch_struct, /* bfd_arch_info */
338 BFD_ENDIAN_BIG, /* byte_order */
339 BFD_ENDIAN_BIG, /* byte_order_for_code */
340 GDB_OSABI_UNKNOWN, /* osabi */
342 /* target specific vector and its dump routine. */
344 /*per-architecture data-pointers. */
346 /* Multi-arch values */
347 1, /* bits_big_endian */
348 8 * sizeof (short), /* short_bit */
349 8 * sizeof (int), /* int_bit */
350 8 * sizeof (long), /* long_bit */
351 8 * sizeof (LONGEST), /* long_long_bit */
352 8 * sizeof (LONGEST), /* long_long_align_bit */
355 8 * sizeof (float), /* float_bit */
356 0, /* float_format */
357 8 * sizeof (double), /* double_bit */
358 0, /* double_format */
359 8 * sizeof (long double), /* long_double_bit */
360 0, /* long_double_format */
361 8 * sizeof (void*), /* ptr_bit */
362 8 * sizeof (void*), /* addr_bit */
363 sizeof (void*), /* dwarf2_addr_size */
367 legacy_virtual_frame_pointer, /* virtual_frame_pointer */
368 0, /* pseudo_register_read */
369 0, /* pseudo_register_read_value */
370 0, /* pseudo_register_write */
372 0, /* num_pseudo_regs */
373 0, /* ax_pseudo_register_collect */
374 0, /* ax_pseudo_register_push_stack */
379 no_op_reg_to_regnum, /* stab_reg_to_regnum */
380 no_op_reg_to_regnum, /* ecoff_reg_to_regnum */
381 no_op_reg_to_regnum, /* sdb_reg_to_regnum */
382 no_op_reg_to_regnum, /* dwarf2_reg_to_regnum */
383 0, /* register_name */
384 0, /* register_type */
386 -1, /* deprecated_fp_regnum */
387 0, /* push_dummy_call */
388 0, /* call_dummy_location */
389 0, /* push_dummy_code */
390 default_print_registers_info, /* print_registers_info */
391 0, /* print_float_info */
392 0, /* print_vector_info */
393 legacy_register_sim_regno, /* register_sim_regno */
394 cannot_register_not, /* cannot_fetch_register */
395 cannot_register_not, /* cannot_store_register */
396 0, /* get_longjmp_target */
397 0, /* believe_pcc_promotion */
398 generic_convert_register_p, /* convert_register_p */
399 0, /* register_to_value */
400 0, /* value_to_register */
401 0, /* value_from_register */
402 unsigned_pointer_to_address, /* pointer_to_address */
403 unsigned_address_to_pointer, /* address_to_pointer */
404 0, /* integer_to_address */
405 0, /* return_value */
406 default_return_in_first_hidden_param_p, /* return_in_first_hidden_param_p */
407 0, /* skip_prologue */
408 0, /* skip_main_prologue */
409 0, /* skip_entrypoint */
411 0, /* breakpoint_from_pc */
412 default_remote_breakpoint_from_pc, /* remote_breakpoint_from_pc */
413 0, /* adjust_breakpoint_address */
414 default_memory_insert_breakpoint, /* memory_insert_breakpoint */
415 default_memory_remove_breakpoint, /* memory_remove_breakpoint */
416 0, /* decr_pc_after_break */
417 0, /* deprecated_function_start_offset */
418 default_remote_register_number, /* remote_register_number */
419 0, /* fetch_tls_load_module_address */
420 0, /* frame_args_skip */
423 0, /* frame_num_args */
425 default_stabs_argument_has_addr, /* stabs_argument_has_addr */
426 0, /* frame_red_zone_size */
427 convert_from_func_ptr_addr_identity, /* convert_from_func_ptr_addr */
428 core_addr_identity, /* addr_bits_remove */
429 0, /* software_single_step */
430 0, /* single_step_through_delay */
432 0, /* skip_trampoline_code */
433 generic_skip_solib_resolver, /* skip_solib_resolver */
434 generic_in_solib_return_trampoline, /* in_solib_return_trampoline */
435 generic_in_function_epilogue_p, /* in_function_epilogue_p */
436 0, /* elf_make_msymbol_special */
437 0, /* coff_make_msymbol_special */
438 0, /* cannot_step_breakpoint */
439 0, /* have_nonsteppable_watchpoint */
440 0, /* address_class_type_flags */
441 0, /* address_class_type_flags_to_name */
442 0, /* address_class_name_to_type_flags */
443 default_register_reggroup_p, /* register_reggroup_p */
444 0, /* fetch_pointer_argument */
445 0, /* regset_from_core_section */
446 0, /* core_regset_sections */
447 0, /* make_corefile_notes */
448 0, /* elfcore_write_linux_prpsinfo */
449 0, /* find_memory_regions */
450 0, /* core_xfer_shared_libraries */
451 0, /* core_xfer_shared_libraries_aix */
452 0, /* core_pid_to_str */
453 0, /* gcore_bfd_target */
454 0, /* vtable_function_descriptors */
455 0, /* vbit_in_delta */
456 0, /* skip_permanent_breakpoint */
457 0, /* max_insn_length */
458 0, /* displaced_step_copy_insn */
459 default_displaced_step_hw_singlestep, /* displaced_step_hw_singlestep */
460 0, /* displaced_step_fixup */
461 NULL, /* displaced_step_free_closure */
462 NULL, /* displaced_step_location */
463 0, /* relocate_instruction */
464 0, /* overlay_update */
465 0, /* core_read_description */
466 0, /* static_transform_name */
467 0, /* sofun_address_maybe_missing */
468 0, /* process_record */
469 0, /* process_record_signal */
470 0, /* gdb_signal_from_target */
471 0, /* gdb_signal_to_target */
472 0, /* get_siginfo_type */
473 0, /* record_special_symbol */
474 0, /* get_syscall_number */
475 0, /* stap_integer_prefixes */
476 0, /* stap_integer_suffixes */
477 0, /* stap_register_prefixes */
478 0, /* stap_register_suffixes */
479 0, /* stap_register_indirection_prefixes */
480 0, /* stap_register_indirection_suffixes */
481 0, /* stap_gdb_register_prefix */
482 0, /* stap_gdb_register_suffix */
483 0, /* stap_is_single_operand */
484 0, /* stap_parse_special_token */
485 0, /* has_global_solist */
486 0, /* has_global_breakpoints */
487 default_has_shared_address_space, /* has_shared_address_space */
488 default_fast_tracepoint_valid_at, /* fast_tracepoint_valid_at */
489 default_auto_charset, /* auto_charset */
490 default_auto_wide_charset, /* auto_wide_charset */
491 0, /* solib_symbols_extension */
492 0, /* has_dos_based_file_system */
493 default_gen_return_address, /* gen_return_address */
495 0, /* core_info_proc */
496 default_iterate_over_objfiles_in_search_order, /* iterate_over_objfiles_in_search_order */
497 NULL, /* ravenscar_ops */
498 default_insn_is_call, /* insn_is_call */
499 default_insn_is_ret, /* insn_is_ret */
500 default_insn_is_jump, /* insn_is_jump */
501 /* startup_gdbarch() */
505 /* Create a new ``struct gdbarch'' based on information provided by
506 ``struct gdbarch_info''. */
509 gdbarch_alloc (const struct gdbarch_info *info,
510 struct gdbarch_tdep *tdep)
512 struct gdbarch *gdbarch;
514 /* Create an obstack for allocating all the per-architecture memory,
515 then use that to allocate the architecture vector. */
516 struct obstack *obstack = XNEW (struct obstack);
517 obstack_init (obstack);
518 gdbarch = obstack_alloc (obstack, sizeof (*gdbarch));
519 memset (gdbarch, 0, sizeof (*gdbarch));
520 gdbarch->obstack = obstack;
522 alloc_gdbarch_data (gdbarch);
524 gdbarch->tdep = tdep;
526 gdbarch->bfd_arch_info = info->bfd_arch_info;
527 gdbarch->byte_order = info->byte_order;
528 gdbarch->byte_order_for_code = info->byte_order_for_code;
529 gdbarch->osabi = info->osabi;
530 gdbarch->target_desc = info->target_desc;
532 /* Force the explicit initialization of these. */
533 gdbarch->bits_big_endian = (gdbarch->byte_order == BFD_ENDIAN_BIG);
534 gdbarch->short_bit = 2*TARGET_CHAR_BIT;
535 gdbarch->int_bit = 4*TARGET_CHAR_BIT;
536 gdbarch->long_bit = 4*TARGET_CHAR_BIT;
537 gdbarch->long_long_bit = 2*gdbarch->long_bit;
538 gdbarch->long_long_align_bit = 2*gdbarch->long_bit;
539 gdbarch->half_bit = 2*TARGET_CHAR_BIT;
540 gdbarch->float_bit = 4*TARGET_CHAR_BIT;
541 gdbarch->double_bit = 8*TARGET_CHAR_BIT;
542 gdbarch->long_double_bit = 8*TARGET_CHAR_BIT;
543 gdbarch->ptr_bit = gdbarch->int_bit;
544 gdbarch->char_signed = -1;
545 gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
546 gdbarch->num_regs = -1;
547 gdbarch->sp_regnum = -1;
548 gdbarch->pc_regnum = -1;
549 gdbarch->ps_regnum = -1;
550 gdbarch->fp0_regnum = -1;
551 gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
552 gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
553 gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
554 gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
555 gdbarch->deprecated_fp_regnum = -1;
556 gdbarch->call_dummy_location = AT_ENTRY_POINT;
557 gdbarch->print_registers_info = default_print_registers_info;
558 gdbarch->register_sim_regno = legacy_register_sim_regno;
559 gdbarch->cannot_fetch_register = cannot_register_not;
560 gdbarch->cannot_store_register = cannot_register_not;
561 gdbarch->convert_register_p = generic_convert_register_p;
562 gdbarch->value_from_register = default_value_from_register;
563 gdbarch->pointer_to_address = unsigned_pointer_to_address;
564 gdbarch->address_to_pointer = unsigned_address_to_pointer;
565 gdbarch->return_in_first_hidden_param_p = default_return_in_first_hidden_param_p;
566 gdbarch->remote_breakpoint_from_pc = default_remote_breakpoint_from_pc;
567 gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
568 gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
569 gdbarch->remote_register_number = default_remote_register_number;
570 gdbarch->stabs_argument_has_addr = default_stabs_argument_has_addr;
571 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr_identity;
572 gdbarch->addr_bits_remove = core_addr_identity;
573 gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
574 gdbarch->skip_solib_resolver = generic_skip_solib_resolver;
575 gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
576 gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
577 gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
578 gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
579 gdbarch->register_reggroup_p = default_register_reggroup_p;
580 gdbarch->displaced_step_hw_singlestep = default_displaced_step_hw_singlestep;
581 gdbarch->displaced_step_fixup = NULL;
582 gdbarch->displaced_step_free_closure = NULL;
583 gdbarch->displaced_step_location = NULL;
584 gdbarch->relocate_instruction = NULL;
585 gdbarch->has_shared_address_space = default_has_shared_address_space;
586 gdbarch->fast_tracepoint_valid_at = default_fast_tracepoint_valid_at;
587 gdbarch->auto_charset = default_auto_charset;
588 gdbarch->auto_wide_charset = default_auto_wide_charset;
589 gdbarch->gen_return_address = default_gen_return_address;
590 gdbarch->iterate_over_objfiles_in_search_order = default_iterate_over_objfiles_in_search_order;
591 gdbarch->ravenscar_ops = NULL;
592 gdbarch->insn_is_call = default_insn_is_call;
593 gdbarch->insn_is_ret = default_insn_is_ret;
594 gdbarch->insn_is_jump = default_insn_is_jump;
595 /* gdbarch_alloc() */
601 /* Allocate extra space using the per-architecture obstack. */
604 gdbarch_obstack_zalloc (struct gdbarch *arch, long size)
606 void *data = obstack_alloc (arch->obstack, size);
608 memset (data, 0, size);
613 /* Free a gdbarch struct. This should never happen in normal
614 operation --- once you've created a gdbarch, you keep it around.
615 However, if an architecture's init function encounters an error
616 building the structure, it may need to clean up a partially
617 constructed gdbarch. */
620 gdbarch_free (struct gdbarch *arch)
622 struct obstack *obstack;
624 gdb_assert (arch != NULL);
625 gdb_assert (!arch->initialized_p);
626 obstack = arch->obstack;
627 obstack_free (obstack, 0); /* Includes the ARCH. */
632 /* Ensure that all values in a GDBARCH are reasonable. */
635 verify_gdbarch (struct gdbarch *gdbarch)
638 struct cleanup *cleanups;
642 log = mem_fileopen ();
643 cleanups = make_cleanup_ui_file_delete (log);
645 if (gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
646 fprintf_unfiltered (log, "\n\tbyte-order");
647 if (gdbarch->bfd_arch_info == NULL)
648 fprintf_unfiltered (log, "\n\tbfd_arch_info");
649 /* Check those that need to be defined for the given multi-arch level. */
650 /* Skip verify of bits_big_endian, invalid_p == 0 */
651 /* Skip verify of short_bit, invalid_p == 0 */
652 /* Skip verify of int_bit, invalid_p == 0 */
653 /* Skip verify of long_bit, invalid_p == 0 */
654 /* Skip verify of long_long_bit, invalid_p == 0 */
655 /* Skip verify of long_long_align_bit, invalid_p == 0 */
656 /* Skip verify of half_bit, invalid_p == 0 */
657 if (gdbarch->half_format == 0)
658 gdbarch->half_format = floatformats_ieee_half;
659 /* Skip verify of float_bit, invalid_p == 0 */
660 if (gdbarch->float_format == 0)
661 gdbarch->float_format = floatformats_ieee_single;
662 /* Skip verify of double_bit, invalid_p == 0 */
663 if (gdbarch->double_format == 0)
664 gdbarch->double_format = floatformats_ieee_double;
665 /* Skip verify of long_double_bit, invalid_p == 0 */
666 if (gdbarch->long_double_format == 0)
667 gdbarch->long_double_format = floatformats_ieee_double;
668 /* Skip verify of ptr_bit, invalid_p == 0 */
669 if (gdbarch->addr_bit == 0)
670 gdbarch->addr_bit = gdbarch_ptr_bit (gdbarch);
671 if (gdbarch->dwarf2_addr_size == 0)
672 gdbarch->dwarf2_addr_size = gdbarch_ptr_bit (gdbarch) / TARGET_CHAR_BIT;
673 if (gdbarch->char_signed == -1)
674 gdbarch->char_signed = 1;
675 /* Skip verify of read_pc, has predicate. */
676 /* Skip verify of write_pc, has predicate. */
677 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
678 /* Skip verify of pseudo_register_read, has predicate. */
679 /* Skip verify of pseudo_register_read_value, has predicate. */
680 /* Skip verify of pseudo_register_write, has predicate. */
681 if (gdbarch->num_regs == -1)
682 fprintf_unfiltered (log, "\n\tnum_regs");
683 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
684 /* Skip verify of ax_pseudo_register_collect, has predicate. */
685 /* Skip verify of ax_pseudo_register_push_stack, has predicate. */
686 /* Skip verify of sp_regnum, invalid_p == 0 */
687 /* Skip verify of pc_regnum, invalid_p == 0 */
688 /* Skip verify of ps_regnum, invalid_p == 0 */
689 /* Skip verify of fp0_regnum, invalid_p == 0 */
690 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
691 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
692 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
693 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
694 if (gdbarch->register_name == 0)
695 fprintf_unfiltered (log, "\n\tregister_name");
696 /* Skip verify of register_type, has predicate. */
697 /* Skip verify of dummy_id, has predicate. */
698 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
699 /* Skip verify of push_dummy_call, has predicate. */
700 /* Skip verify of call_dummy_location, invalid_p == 0 */
701 /* Skip verify of push_dummy_code, has predicate. */
702 /* Skip verify of print_registers_info, invalid_p == 0 */
703 /* Skip verify of print_float_info, has predicate. */
704 /* Skip verify of print_vector_info, has predicate. */
705 /* Skip verify of register_sim_regno, invalid_p == 0 */
706 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
707 /* Skip verify of cannot_store_register, invalid_p == 0 */
708 /* Skip verify of get_longjmp_target, has predicate. */
709 /* Skip verify of convert_register_p, invalid_p == 0 */
710 /* Skip verify of value_from_register, invalid_p == 0 */
711 /* Skip verify of pointer_to_address, invalid_p == 0 */
712 /* Skip verify of address_to_pointer, invalid_p == 0 */
713 /* Skip verify of integer_to_address, has predicate. */
714 /* Skip verify of return_value, has predicate. */
715 /* Skip verify of return_in_first_hidden_param_p, invalid_p == 0 */
716 if (gdbarch->skip_prologue == 0)
717 fprintf_unfiltered (log, "\n\tskip_prologue");
718 /* Skip verify of skip_main_prologue, has predicate. */
719 /* Skip verify of skip_entrypoint, has predicate. */
720 if (gdbarch->inner_than == 0)
721 fprintf_unfiltered (log, "\n\tinner_than");
722 if (gdbarch->breakpoint_from_pc == 0)
723 fprintf_unfiltered (log, "\n\tbreakpoint_from_pc");
724 /* Skip verify of remote_breakpoint_from_pc, invalid_p == 0 */
725 /* Skip verify of adjust_breakpoint_address, has predicate. */
726 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
727 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
728 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
729 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
730 /* Skip verify of remote_register_number, invalid_p == 0 */
731 /* Skip verify of fetch_tls_load_module_address, has predicate. */
732 /* Skip verify of frame_args_skip, invalid_p == 0 */
733 /* Skip verify of unwind_pc, has predicate. */
734 /* Skip verify of unwind_sp, has predicate. */
735 /* Skip verify of frame_num_args, has predicate. */
736 /* Skip verify of frame_align, has predicate. */
737 /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
738 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
739 /* Skip verify of addr_bits_remove, invalid_p == 0 */
740 /* Skip verify of software_single_step, has predicate. */
741 /* Skip verify of single_step_through_delay, has predicate. */
742 if (gdbarch->print_insn == 0)
743 fprintf_unfiltered (log, "\n\tprint_insn");
744 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
745 /* Skip verify of skip_solib_resolver, invalid_p == 0 */
746 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
747 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
748 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
749 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
750 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
751 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
752 /* Skip verify of address_class_type_flags, has predicate. */
753 /* Skip verify of address_class_type_flags_to_name, has predicate. */
754 /* Skip verify of address_class_name_to_type_flags, has predicate. */
755 /* Skip verify of register_reggroup_p, invalid_p == 0 */
756 /* Skip verify of fetch_pointer_argument, has predicate. */
757 /* Skip verify of regset_from_core_section, has predicate. */
758 /* Skip verify of make_corefile_notes, has predicate. */
759 /* Skip verify of elfcore_write_linux_prpsinfo, has predicate. */
760 /* Skip verify of find_memory_regions, has predicate. */
761 /* Skip verify of core_xfer_shared_libraries, has predicate. */
762 /* Skip verify of core_xfer_shared_libraries_aix, has predicate. */
763 /* Skip verify of core_pid_to_str, has predicate. */
764 /* Skip verify of gcore_bfd_target, has predicate. */
765 /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
766 /* Skip verify of vbit_in_delta, invalid_p == 0 */
767 /* Skip verify of skip_permanent_breakpoint, has predicate. */
768 /* Skip verify of max_insn_length, has predicate. */
769 /* Skip verify of displaced_step_copy_insn, has predicate. */
770 /* Skip verify of displaced_step_hw_singlestep, invalid_p == 0 */
771 /* Skip verify of displaced_step_fixup, has predicate. */
772 if ((! gdbarch->displaced_step_free_closure) != (! gdbarch->displaced_step_copy_insn))
773 fprintf_unfiltered (log, "\n\tdisplaced_step_free_closure");
774 if ((! gdbarch->displaced_step_location) != (! gdbarch->displaced_step_copy_insn))
775 fprintf_unfiltered (log, "\n\tdisplaced_step_location");
776 /* Skip verify of relocate_instruction, has predicate. */
777 /* Skip verify of overlay_update, has predicate. */
778 /* Skip verify of core_read_description, has predicate. */
779 /* Skip verify of static_transform_name, has predicate. */
780 /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
781 /* Skip verify of process_record, has predicate. */
782 /* Skip verify of process_record_signal, has predicate. */
783 /* Skip verify of gdb_signal_from_target, has predicate. */
784 /* Skip verify of gdb_signal_to_target, has predicate. */
785 /* Skip verify of get_siginfo_type, has predicate. */
786 /* Skip verify of record_special_symbol, has predicate. */
787 /* Skip verify of get_syscall_number, has predicate. */
788 /* Skip verify of stap_integer_prefixes, invalid_p == 0 */
789 /* Skip verify of stap_integer_suffixes, invalid_p == 0 */
790 /* Skip verify of stap_register_prefixes, invalid_p == 0 */
791 /* Skip verify of stap_register_suffixes, invalid_p == 0 */
792 /* Skip verify of stap_register_indirection_prefixes, invalid_p == 0 */
793 /* Skip verify of stap_register_indirection_suffixes, invalid_p == 0 */
794 /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */
795 /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */
796 /* Skip verify of stap_is_single_operand, has predicate. */
797 /* Skip verify of stap_parse_special_token, has predicate. */
798 /* Skip verify of has_global_solist, invalid_p == 0 */
799 /* Skip verify of has_global_breakpoints, invalid_p == 0 */
800 /* Skip verify of has_shared_address_space, invalid_p == 0 */
801 /* Skip verify of fast_tracepoint_valid_at, invalid_p == 0 */
802 /* Skip verify of auto_charset, invalid_p == 0 */
803 /* Skip verify of auto_wide_charset, invalid_p == 0 */
804 /* Skip verify of has_dos_based_file_system, invalid_p == 0 */
805 /* Skip verify of gen_return_address, invalid_p == 0 */
806 /* Skip verify of info_proc, has predicate. */
807 /* Skip verify of core_info_proc, has predicate. */
808 /* Skip verify of iterate_over_objfiles_in_search_order, invalid_p == 0 */
809 /* Skip verify of ravenscar_ops, invalid_p == 0 */
810 /* Skip verify of insn_is_call, invalid_p == 0 */
811 /* Skip verify of insn_is_ret, invalid_p == 0 */
812 /* Skip verify of insn_is_jump, invalid_p == 0 */
813 buf = ui_file_xstrdup (log, &length);
814 make_cleanup (xfree, buf);
816 internal_error (__FILE__, __LINE__,
817 _("verify_gdbarch: the following are invalid ...%s"),
819 do_cleanups (cleanups);
823 /* Print out the details of the current architecture. */
826 gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
828 const char *gdb_nm_file = "<not-defined>";
830 #if defined (GDB_NM_FILE)
831 gdb_nm_file = GDB_NM_FILE;
833 fprintf_unfiltered (file,
834 "gdbarch_dump: GDB_NM_FILE = %s\n",
836 fprintf_unfiltered (file,
837 "gdbarch_dump: addr_bit = %s\n",
838 plongest (gdbarch->addr_bit));
839 fprintf_unfiltered (file,
840 "gdbarch_dump: addr_bits_remove = <%s>\n",
841 host_address_to_string (gdbarch->addr_bits_remove));
842 fprintf_unfiltered (file,
843 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
844 gdbarch_address_class_name_to_type_flags_p (gdbarch));
845 fprintf_unfiltered (file,
846 "gdbarch_dump: address_class_name_to_type_flags = <%s>\n",
847 host_address_to_string (gdbarch->address_class_name_to_type_flags));
848 fprintf_unfiltered (file,
849 "gdbarch_dump: gdbarch_address_class_type_flags_p() = %d\n",
850 gdbarch_address_class_type_flags_p (gdbarch));
851 fprintf_unfiltered (file,
852 "gdbarch_dump: address_class_type_flags = <%s>\n",
853 host_address_to_string (gdbarch->address_class_type_flags));
854 fprintf_unfiltered (file,
855 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
856 gdbarch_address_class_type_flags_to_name_p (gdbarch));
857 fprintf_unfiltered (file,
858 "gdbarch_dump: address_class_type_flags_to_name = <%s>\n",
859 host_address_to_string (gdbarch->address_class_type_flags_to_name));
860 fprintf_unfiltered (file,
861 "gdbarch_dump: address_to_pointer = <%s>\n",
862 host_address_to_string (gdbarch->address_to_pointer));
863 fprintf_unfiltered (file,
864 "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n",
865 gdbarch_adjust_breakpoint_address_p (gdbarch));
866 fprintf_unfiltered (file,
867 "gdbarch_dump: adjust_breakpoint_address = <%s>\n",
868 host_address_to_string (gdbarch->adjust_breakpoint_address));
869 fprintf_unfiltered (file,
870 "gdbarch_dump: auto_charset = <%s>\n",
871 host_address_to_string (gdbarch->auto_charset));
872 fprintf_unfiltered (file,
873 "gdbarch_dump: auto_wide_charset = <%s>\n",
874 host_address_to_string (gdbarch->auto_wide_charset));
875 fprintf_unfiltered (file,
876 "gdbarch_dump: gdbarch_ax_pseudo_register_collect_p() = %d\n",
877 gdbarch_ax_pseudo_register_collect_p (gdbarch));
878 fprintf_unfiltered (file,
879 "gdbarch_dump: ax_pseudo_register_collect = <%s>\n",
880 host_address_to_string (gdbarch->ax_pseudo_register_collect));
881 fprintf_unfiltered (file,
882 "gdbarch_dump: gdbarch_ax_pseudo_register_push_stack_p() = %d\n",
883 gdbarch_ax_pseudo_register_push_stack_p (gdbarch));
884 fprintf_unfiltered (file,
885 "gdbarch_dump: ax_pseudo_register_push_stack = <%s>\n",
886 host_address_to_string (gdbarch->ax_pseudo_register_push_stack));
887 fprintf_unfiltered (file,
888 "gdbarch_dump: believe_pcc_promotion = %s\n",
889 plongest (gdbarch->believe_pcc_promotion));
890 fprintf_unfiltered (file,
891 "gdbarch_dump: bfd_arch_info = %s\n",
892 gdbarch_bfd_arch_info (gdbarch)->printable_name);
893 fprintf_unfiltered (file,
894 "gdbarch_dump: bits_big_endian = %s\n",
895 plongest (gdbarch->bits_big_endian));
896 fprintf_unfiltered (file,
897 "gdbarch_dump: breakpoint_from_pc = <%s>\n",
898 host_address_to_string (gdbarch->breakpoint_from_pc));
899 fprintf_unfiltered (file,
900 "gdbarch_dump: byte_order = %s\n",
901 plongest (gdbarch->byte_order));
902 fprintf_unfiltered (file,
903 "gdbarch_dump: byte_order_for_code = %s\n",
904 plongest (gdbarch->byte_order_for_code));
905 fprintf_unfiltered (file,
906 "gdbarch_dump: call_dummy_location = %s\n",
907 plongest (gdbarch->call_dummy_location));
908 fprintf_unfiltered (file,
909 "gdbarch_dump: cannot_fetch_register = <%s>\n",
910 host_address_to_string (gdbarch->cannot_fetch_register));
911 fprintf_unfiltered (file,
912 "gdbarch_dump: cannot_step_breakpoint = %s\n",
913 plongest (gdbarch->cannot_step_breakpoint));
914 fprintf_unfiltered (file,
915 "gdbarch_dump: cannot_store_register = <%s>\n",
916 host_address_to_string (gdbarch->cannot_store_register));
917 fprintf_unfiltered (file,
918 "gdbarch_dump: char_signed = %s\n",
919 plongest (gdbarch->char_signed));
920 fprintf_unfiltered (file,
921 "gdbarch_dump: coff_make_msymbol_special = <%s>\n",
922 host_address_to_string (gdbarch->coff_make_msymbol_special));
923 fprintf_unfiltered (file,
924 "gdbarch_dump: convert_from_func_ptr_addr = <%s>\n",
925 host_address_to_string (gdbarch->convert_from_func_ptr_addr));
926 fprintf_unfiltered (file,
927 "gdbarch_dump: convert_register_p = <%s>\n",
928 host_address_to_string (gdbarch->convert_register_p));
929 fprintf_unfiltered (file,
930 "gdbarch_dump: gdbarch_core_info_proc_p() = %d\n",
931 gdbarch_core_info_proc_p (gdbarch));
932 fprintf_unfiltered (file,
933 "gdbarch_dump: core_info_proc = <%s>\n",
934 host_address_to_string (gdbarch->core_info_proc));
935 fprintf_unfiltered (file,
936 "gdbarch_dump: gdbarch_core_pid_to_str_p() = %d\n",
937 gdbarch_core_pid_to_str_p (gdbarch));
938 fprintf_unfiltered (file,
939 "gdbarch_dump: core_pid_to_str = <%s>\n",
940 host_address_to_string (gdbarch->core_pid_to_str));
941 fprintf_unfiltered (file,
942 "gdbarch_dump: gdbarch_core_read_description_p() = %d\n",
943 gdbarch_core_read_description_p (gdbarch));
944 fprintf_unfiltered (file,
945 "gdbarch_dump: core_read_description = <%s>\n",
946 host_address_to_string (gdbarch->core_read_description));
947 fprintf_unfiltered (file,
948 "gdbarch_dump: core_regset_sections = %s\n",
949 host_address_to_string (gdbarch->core_regset_sections));
950 fprintf_unfiltered (file,
951 "gdbarch_dump: gdbarch_core_xfer_shared_libraries_p() = %d\n",
952 gdbarch_core_xfer_shared_libraries_p (gdbarch));
953 fprintf_unfiltered (file,
954 "gdbarch_dump: core_xfer_shared_libraries = <%s>\n",
955 host_address_to_string (gdbarch->core_xfer_shared_libraries));
956 fprintf_unfiltered (file,
957 "gdbarch_dump: gdbarch_core_xfer_shared_libraries_aix_p() = %d\n",
958 gdbarch_core_xfer_shared_libraries_aix_p (gdbarch));
959 fprintf_unfiltered (file,
960 "gdbarch_dump: core_xfer_shared_libraries_aix = <%s>\n",
961 host_address_to_string (gdbarch->core_xfer_shared_libraries_aix));
962 fprintf_unfiltered (file,
963 "gdbarch_dump: decr_pc_after_break = %s\n",
964 core_addr_to_string_nz (gdbarch->decr_pc_after_break));
965 fprintf_unfiltered (file,
966 "gdbarch_dump: deprecated_fp_regnum = %s\n",
967 plongest (gdbarch->deprecated_fp_regnum));
968 fprintf_unfiltered (file,
969 "gdbarch_dump: deprecated_function_start_offset = %s\n",
970 core_addr_to_string_nz (gdbarch->deprecated_function_start_offset));
971 fprintf_unfiltered (file,
972 "gdbarch_dump: gdbarch_displaced_step_copy_insn_p() = %d\n",
973 gdbarch_displaced_step_copy_insn_p (gdbarch));
974 fprintf_unfiltered (file,
975 "gdbarch_dump: displaced_step_copy_insn = <%s>\n",
976 host_address_to_string (gdbarch->displaced_step_copy_insn));
977 fprintf_unfiltered (file,
978 "gdbarch_dump: gdbarch_displaced_step_fixup_p() = %d\n",
979 gdbarch_displaced_step_fixup_p (gdbarch));
980 fprintf_unfiltered (file,
981 "gdbarch_dump: displaced_step_fixup = <%s>\n",
982 host_address_to_string (gdbarch->displaced_step_fixup));
983 fprintf_unfiltered (file,
984 "gdbarch_dump: displaced_step_free_closure = <%s>\n",
985 host_address_to_string (gdbarch->displaced_step_free_closure));
986 fprintf_unfiltered (file,
987 "gdbarch_dump: displaced_step_hw_singlestep = <%s>\n",
988 host_address_to_string (gdbarch->displaced_step_hw_singlestep));
989 fprintf_unfiltered (file,
990 "gdbarch_dump: displaced_step_location = <%s>\n",
991 host_address_to_string (gdbarch->displaced_step_location));
992 fprintf_unfiltered (file,
993 "gdbarch_dump: double_bit = %s\n",
994 plongest (gdbarch->double_bit));
995 fprintf_unfiltered (file,
996 "gdbarch_dump: double_format = %s\n",
997 pformat (gdbarch->double_format));
998 fprintf_unfiltered (file,
999 "gdbarch_dump: gdbarch_dummy_id_p() = %d\n",
1000 gdbarch_dummy_id_p (gdbarch));
1001 fprintf_unfiltered (file,
1002 "gdbarch_dump: dummy_id = <%s>\n",
1003 host_address_to_string (gdbarch->dummy_id));
1004 fprintf_unfiltered (file,
1005 "gdbarch_dump: dwarf2_addr_size = %s\n",
1006 plongest (gdbarch->dwarf2_addr_size));
1007 fprintf_unfiltered (file,
1008 "gdbarch_dump: dwarf2_reg_to_regnum = <%s>\n",
1009 host_address_to_string (gdbarch->dwarf2_reg_to_regnum));
1010 fprintf_unfiltered (file,
1011 "gdbarch_dump: ecoff_reg_to_regnum = <%s>\n",
1012 host_address_to_string (gdbarch->ecoff_reg_to_regnum));
1013 fprintf_unfiltered (file,
1014 "gdbarch_dump: elf_make_msymbol_special = <%s>\n",
1015 host_address_to_string (gdbarch->elf_make_msymbol_special));
1016 fprintf_unfiltered (file,
1017 "gdbarch_dump: gdbarch_elfcore_write_linux_prpsinfo_p() = %d\n",
1018 gdbarch_elfcore_write_linux_prpsinfo_p (gdbarch));
1019 fprintf_unfiltered (file,
1020 "gdbarch_dump: elfcore_write_linux_prpsinfo = <%s>\n",
1021 host_address_to_string (gdbarch->elfcore_write_linux_prpsinfo));
1022 fprintf_unfiltered (file,
1023 "gdbarch_dump: fast_tracepoint_valid_at = <%s>\n",
1024 host_address_to_string (gdbarch->fast_tracepoint_valid_at));
1025 fprintf_unfiltered (file,
1026 "gdbarch_dump: gdbarch_fetch_pointer_argument_p() = %d\n",
1027 gdbarch_fetch_pointer_argument_p (gdbarch));
1028 fprintf_unfiltered (file,
1029 "gdbarch_dump: fetch_pointer_argument = <%s>\n",
1030 host_address_to_string (gdbarch->fetch_pointer_argument));
1031 fprintf_unfiltered (file,
1032 "gdbarch_dump: gdbarch_fetch_tls_load_module_address_p() = %d\n",
1033 gdbarch_fetch_tls_load_module_address_p (gdbarch));
1034 fprintf_unfiltered (file,
1035 "gdbarch_dump: fetch_tls_load_module_address = <%s>\n",
1036 host_address_to_string (gdbarch->fetch_tls_load_module_address));
1037 fprintf_unfiltered (file,
1038 "gdbarch_dump: gdbarch_find_memory_regions_p() = %d\n",
1039 gdbarch_find_memory_regions_p (gdbarch));
1040 fprintf_unfiltered (file,
1041 "gdbarch_dump: find_memory_regions = <%s>\n",
1042 host_address_to_string (gdbarch->find_memory_regions));
1043 fprintf_unfiltered (file,
1044 "gdbarch_dump: float_bit = %s\n",
1045 plongest (gdbarch->float_bit));
1046 fprintf_unfiltered (file,
1047 "gdbarch_dump: float_format = %s\n",
1048 pformat (gdbarch->float_format));
1049 fprintf_unfiltered (file,
1050 "gdbarch_dump: fp0_regnum = %s\n",
1051 plongest (gdbarch->fp0_regnum));
1052 fprintf_unfiltered (file,
1053 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
1054 gdbarch_frame_align_p (gdbarch));
1055 fprintf_unfiltered (file,
1056 "gdbarch_dump: frame_align = <%s>\n",
1057 host_address_to_string (gdbarch->frame_align));
1058 fprintf_unfiltered (file,
1059 "gdbarch_dump: frame_args_skip = %s\n",
1060 core_addr_to_string_nz (gdbarch->frame_args_skip));
1061 fprintf_unfiltered (file,
1062 "gdbarch_dump: gdbarch_frame_num_args_p() = %d\n",
1063 gdbarch_frame_num_args_p (gdbarch));
1064 fprintf_unfiltered (file,
1065 "gdbarch_dump: frame_num_args = <%s>\n",
1066 host_address_to_string (gdbarch->frame_num_args));
1067 fprintf_unfiltered (file,
1068 "gdbarch_dump: frame_red_zone_size = %s\n",
1069 plongest (gdbarch->frame_red_zone_size));
1070 fprintf_unfiltered (file,
1071 "gdbarch_dump: gdbarch_gcore_bfd_target_p() = %d\n",
1072 gdbarch_gcore_bfd_target_p (gdbarch));
1073 fprintf_unfiltered (file,
1074 "gdbarch_dump: gcore_bfd_target = %s\n",
1075 pstring (gdbarch->gcore_bfd_target));
1076 fprintf_unfiltered (file,
1077 "gdbarch_dump: gdbarch_gdb_signal_from_target_p() = %d\n",
1078 gdbarch_gdb_signal_from_target_p (gdbarch));
1079 fprintf_unfiltered (file,
1080 "gdbarch_dump: gdb_signal_from_target = <%s>\n",
1081 host_address_to_string (gdbarch->gdb_signal_from_target));
1082 fprintf_unfiltered (file,
1083 "gdbarch_dump: gdbarch_gdb_signal_to_target_p() = %d\n",
1084 gdbarch_gdb_signal_to_target_p (gdbarch));
1085 fprintf_unfiltered (file,
1086 "gdbarch_dump: gdb_signal_to_target = <%s>\n",
1087 host_address_to_string (gdbarch->gdb_signal_to_target));
1088 fprintf_unfiltered (file,
1089 "gdbarch_dump: gen_return_address = <%s>\n",
1090 host_address_to_string (gdbarch->gen_return_address));
1091 fprintf_unfiltered (file,
1092 "gdbarch_dump: gdbarch_get_longjmp_target_p() = %d\n",
1093 gdbarch_get_longjmp_target_p (gdbarch));
1094 fprintf_unfiltered (file,
1095 "gdbarch_dump: get_longjmp_target = <%s>\n",
1096 host_address_to_string (gdbarch->get_longjmp_target));
1097 fprintf_unfiltered (file,
1098 "gdbarch_dump: gdbarch_get_siginfo_type_p() = %d\n",
1099 gdbarch_get_siginfo_type_p (gdbarch));
1100 fprintf_unfiltered (file,
1101 "gdbarch_dump: get_siginfo_type = <%s>\n",
1102 host_address_to_string (gdbarch->get_siginfo_type));
1103 fprintf_unfiltered (file,
1104 "gdbarch_dump: gdbarch_get_syscall_number_p() = %d\n",
1105 gdbarch_get_syscall_number_p (gdbarch));
1106 fprintf_unfiltered (file,
1107 "gdbarch_dump: get_syscall_number = <%s>\n",
1108 host_address_to_string (gdbarch->get_syscall_number));
1109 fprintf_unfiltered (file,
1110 "gdbarch_dump: half_bit = %s\n",
1111 plongest (gdbarch->half_bit));
1112 fprintf_unfiltered (file,
1113 "gdbarch_dump: half_format = %s\n",
1114 pformat (gdbarch->half_format));
1115 fprintf_unfiltered (file,
1116 "gdbarch_dump: has_dos_based_file_system = %s\n",
1117 plongest (gdbarch->has_dos_based_file_system));
1118 fprintf_unfiltered (file,
1119 "gdbarch_dump: has_global_breakpoints = %s\n",
1120 plongest (gdbarch->has_global_breakpoints));
1121 fprintf_unfiltered (file,
1122 "gdbarch_dump: has_global_solist = %s\n",
1123 plongest (gdbarch->has_global_solist));
1124 fprintf_unfiltered (file,
1125 "gdbarch_dump: has_shared_address_space = <%s>\n",
1126 host_address_to_string (gdbarch->has_shared_address_space));
1127 fprintf_unfiltered (file,
1128 "gdbarch_dump: have_nonsteppable_watchpoint = %s\n",
1129 plongest (gdbarch->have_nonsteppable_watchpoint));
1130 fprintf_unfiltered (file,
1131 "gdbarch_dump: in_function_epilogue_p = <%s>\n",
1132 host_address_to_string (gdbarch->in_function_epilogue_p));
1133 fprintf_unfiltered (file,
1134 "gdbarch_dump: in_solib_return_trampoline = <%s>\n",
1135 host_address_to_string (gdbarch->in_solib_return_trampoline));
1136 fprintf_unfiltered (file,
1137 "gdbarch_dump: gdbarch_info_proc_p() = %d\n",
1138 gdbarch_info_proc_p (gdbarch));
1139 fprintf_unfiltered (file,
1140 "gdbarch_dump: info_proc = <%s>\n",
1141 host_address_to_string (gdbarch->info_proc));
1142 fprintf_unfiltered (file,
1143 "gdbarch_dump: inner_than = <%s>\n",
1144 host_address_to_string (gdbarch->inner_than));
1145 fprintf_unfiltered (file,
1146 "gdbarch_dump: insn_is_call = <%s>\n",
1147 host_address_to_string (gdbarch->insn_is_call));
1148 fprintf_unfiltered (file,
1149 "gdbarch_dump: insn_is_jump = <%s>\n",
1150 host_address_to_string (gdbarch->insn_is_jump));
1151 fprintf_unfiltered (file,
1152 "gdbarch_dump: insn_is_ret = <%s>\n",
1153 host_address_to_string (gdbarch->insn_is_ret));
1154 fprintf_unfiltered (file,
1155 "gdbarch_dump: int_bit = %s\n",
1156 plongest (gdbarch->int_bit));
1157 fprintf_unfiltered (file,
1158 "gdbarch_dump: gdbarch_integer_to_address_p() = %d\n",
1159 gdbarch_integer_to_address_p (gdbarch));
1160 fprintf_unfiltered (file,
1161 "gdbarch_dump: integer_to_address = <%s>\n",
1162 host_address_to_string (gdbarch->integer_to_address));
1163 fprintf_unfiltered (file,
1164 "gdbarch_dump: iterate_over_objfiles_in_search_order = <%s>\n",
1165 host_address_to_string (gdbarch->iterate_over_objfiles_in_search_order));
1166 fprintf_unfiltered (file,
1167 "gdbarch_dump: long_bit = %s\n",
1168 plongest (gdbarch->long_bit));
1169 fprintf_unfiltered (file,
1170 "gdbarch_dump: long_double_bit = %s\n",
1171 plongest (gdbarch->long_double_bit));
1172 fprintf_unfiltered (file,
1173 "gdbarch_dump: long_double_format = %s\n",
1174 pformat (gdbarch->long_double_format));
1175 fprintf_unfiltered (file,
1176 "gdbarch_dump: long_long_align_bit = %s\n",
1177 plongest (gdbarch->long_long_align_bit));
1178 fprintf_unfiltered (file,
1179 "gdbarch_dump: long_long_bit = %s\n",
1180 plongest (gdbarch->long_long_bit));
1181 fprintf_unfiltered (file,
1182 "gdbarch_dump: gdbarch_make_corefile_notes_p() = %d\n",
1183 gdbarch_make_corefile_notes_p (gdbarch));
1184 fprintf_unfiltered (file,
1185 "gdbarch_dump: make_corefile_notes = <%s>\n",
1186 host_address_to_string (gdbarch->make_corefile_notes));
1187 fprintf_unfiltered (file,
1188 "gdbarch_dump: gdbarch_max_insn_length_p() = %d\n",
1189 gdbarch_max_insn_length_p (gdbarch));
1190 fprintf_unfiltered (file,
1191 "gdbarch_dump: max_insn_length = %s\n",
1192 plongest (gdbarch->max_insn_length));
1193 fprintf_unfiltered (file,
1194 "gdbarch_dump: memory_insert_breakpoint = <%s>\n",
1195 host_address_to_string (gdbarch->memory_insert_breakpoint));
1196 fprintf_unfiltered (file,
1197 "gdbarch_dump: memory_remove_breakpoint = <%s>\n",
1198 host_address_to_string (gdbarch->memory_remove_breakpoint));
1199 fprintf_unfiltered (file,
1200 "gdbarch_dump: num_pseudo_regs = %s\n",
1201 plongest (gdbarch->num_pseudo_regs));
1202 fprintf_unfiltered (file,
1203 "gdbarch_dump: num_regs = %s\n",
1204 plongest (gdbarch->num_regs));
1205 fprintf_unfiltered (file,
1206 "gdbarch_dump: osabi = %s\n",
1207 plongest (gdbarch->osabi));
1208 fprintf_unfiltered (file,
1209 "gdbarch_dump: gdbarch_overlay_update_p() = %d\n",
1210 gdbarch_overlay_update_p (gdbarch));
1211 fprintf_unfiltered (file,
1212 "gdbarch_dump: overlay_update = <%s>\n",
1213 host_address_to_string (gdbarch->overlay_update));
1214 fprintf_unfiltered (file,
1215 "gdbarch_dump: pc_regnum = %s\n",
1216 plongest (gdbarch->pc_regnum));
1217 fprintf_unfiltered (file,
1218 "gdbarch_dump: pointer_to_address = <%s>\n",
1219 host_address_to_string (gdbarch->pointer_to_address));
1220 fprintf_unfiltered (file,
1221 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
1222 gdbarch_print_float_info_p (gdbarch));
1223 fprintf_unfiltered (file,
1224 "gdbarch_dump: print_float_info = <%s>\n",
1225 host_address_to_string (gdbarch->print_float_info));
1226 fprintf_unfiltered (file,
1227 "gdbarch_dump: print_insn = <%s>\n",
1228 host_address_to_string (gdbarch->print_insn));
1229 fprintf_unfiltered (file,
1230 "gdbarch_dump: print_registers_info = <%s>\n",
1231 host_address_to_string (gdbarch->print_registers_info));
1232 fprintf_unfiltered (file,
1233 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1234 gdbarch_print_vector_info_p (gdbarch));
1235 fprintf_unfiltered (file,
1236 "gdbarch_dump: print_vector_info = <%s>\n",
1237 host_address_to_string (gdbarch->print_vector_info));
1238 fprintf_unfiltered (file,
1239 "gdbarch_dump: gdbarch_process_record_p() = %d\n",
1240 gdbarch_process_record_p (gdbarch));
1241 fprintf_unfiltered (file,
1242 "gdbarch_dump: process_record = <%s>\n",
1243 host_address_to_string (gdbarch->process_record));
1244 fprintf_unfiltered (file,
1245 "gdbarch_dump: gdbarch_process_record_signal_p() = %d\n",
1246 gdbarch_process_record_signal_p (gdbarch));
1247 fprintf_unfiltered (file,
1248 "gdbarch_dump: process_record_signal = <%s>\n",
1249 host_address_to_string (gdbarch->process_record_signal));
1250 fprintf_unfiltered (file,
1251 "gdbarch_dump: ps_regnum = %s\n",
1252 plongest (gdbarch->ps_regnum));
1253 fprintf_unfiltered (file,
1254 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
1255 gdbarch_pseudo_register_read_p (gdbarch));
1256 fprintf_unfiltered (file,
1257 "gdbarch_dump: pseudo_register_read = <%s>\n",
1258 host_address_to_string (gdbarch->pseudo_register_read));
1259 fprintf_unfiltered (file,
1260 "gdbarch_dump: gdbarch_pseudo_register_read_value_p() = %d\n",
1261 gdbarch_pseudo_register_read_value_p (gdbarch));
1262 fprintf_unfiltered (file,
1263 "gdbarch_dump: pseudo_register_read_value = <%s>\n",
1264 host_address_to_string (gdbarch->pseudo_register_read_value));
1265 fprintf_unfiltered (file,
1266 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
1267 gdbarch_pseudo_register_write_p (gdbarch));
1268 fprintf_unfiltered (file,
1269 "gdbarch_dump: pseudo_register_write = <%s>\n",
1270 host_address_to_string (gdbarch->pseudo_register_write));
1271 fprintf_unfiltered (file,
1272 "gdbarch_dump: ptr_bit = %s\n",
1273 plongest (gdbarch->ptr_bit));
1274 fprintf_unfiltered (file,
1275 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
1276 gdbarch_push_dummy_call_p (gdbarch));
1277 fprintf_unfiltered (file,
1278 "gdbarch_dump: push_dummy_call = <%s>\n",
1279 host_address_to_string (gdbarch->push_dummy_call));
1280 fprintf_unfiltered (file,
1281 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
1282 gdbarch_push_dummy_code_p (gdbarch));
1283 fprintf_unfiltered (file,
1284 "gdbarch_dump: push_dummy_code = <%s>\n",
1285 host_address_to_string (gdbarch->push_dummy_code));
1286 fprintf_unfiltered (file,
1287 "gdbarch_dump: ravenscar_ops = %s\n",
1288 host_address_to_string (gdbarch->ravenscar_ops));
1289 fprintf_unfiltered (file,
1290 "gdbarch_dump: gdbarch_read_pc_p() = %d\n",
1291 gdbarch_read_pc_p (gdbarch));
1292 fprintf_unfiltered (file,
1293 "gdbarch_dump: read_pc = <%s>\n",
1294 host_address_to_string (gdbarch->read_pc));
1295 fprintf_unfiltered (file,
1296 "gdbarch_dump: gdbarch_record_special_symbol_p() = %d\n",
1297 gdbarch_record_special_symbol_p (gdbarch));
1298 fprintf_unfiltered (file,
1299 "gdbarch_dump: record_special_symbol = <%s>\n",
1300 host_address_to_string (gdbarch->record_special_symbol));
1301 fprintf_unfiltered (file,
1302 "gdbarch_dump: register_name = <%s>\n",
1303 host_address_to_string (gdbarch->register_name));
1304 fprintf_unfiltered (file,
1305 "gdbarch_dump: register_reggroup_p = <%s>\n",
1306 host_address_to_string (gdbarch->register_reggroup_p));
1307 fprintf_unfiltered (file,
1308 "gdbarch_dump: register_sim_regno = <%s>\n",
1309 host_address_to_string (gdbarch->register_sim_regno));
1310 fprintf_unfiltered (file,
1311 "gdbarch_dump: register_to_value = <%s>\n",
1312 host_address_to_string (gdbarch->register_to_value));
1313 fprintf_unfiltered (file,
1314 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
1315 gdbarch_register_type_p (gdbarch));
1316 fprintf_unfiltered (file,
1317 "gdbarch_dump: register_type = <%s>\n",
1318 host_address_to_string (gdbarch->register_type));
1319 fprintf_unfiltered (file,
1320 "gdbarch_dump: gdbarch_regset_from_core_section_p() = %d\n",
1321 gdbarch_regset_from_core_section_p (gdbarch));
1322 fprintf_unfiltered (file,
1323 "gdbarch_dump: regset_from_core_section = <%s>\n",
1324 host_address_to_string (gdbarch->regset_from_core_section));
1325 fprintf_unfiltered (file,
1326 "gdbarch_dump: gdbarch_relocate_instruction_p() = %d\n",
1327 gdbarch_relocate_instruction_p (gdbarch));
1328 fprintf_unfiltered (file,
1329 "gdbarch_dump: relocate_instruction = <%s>\n",
1330 host_address_to_string (gdbarch->relocate_instruction));
1331 fprintf_unfiltered (file,
1332 "gdbarch_dump: remote_breakpoint_from_pc = <%s>\n",
1333 host_address_to_string (gdbarch->remote_breakpoint_from_pc));
1334 fprintf_unfiltered (file,
1335 "gdbarch_dump: remote_register_number = <%s>\n",
1336 host_address_to_string (gdbarch->remote_register_number));
1337 fprintf_unfiltered (file,
1338 "gdbarch_dump: return_in_first_hidden_param_p = <%s>\n",
1339 host_address_to_string (gdbarch->return_in_first_hidden_param_p));
1340 fprintf_unfiltered (file,
1341 "gdbarch_dump: gdbarch_return_value_p() = %d\n",
1342 gdbarch_return_value_p (gdbarch));
1343 fprintf_unfiltered (file,
1344 "gdbarch_dump: return_value = <%s>\n",
1345 host_address_to_string (gdbarch->return_value));
1346 fprintf_unfiltered (file,
1347 "gdbarch_dump: sdb_reg_to_regnum = <%s>\n",
1348 host_address_to_string (gdbarch->sdb_reg_to_regnum));
1349 fprintf_unfiltered (file,
1350 "gdbarch_dump: short_bit = %s\n",
1351 plongest (gdbarch->short_bit));
1352 fprintf_unfiltered (file,
1353 "gdbarch_dump: gdbarch_single_step_through_delay_p() = %d\n",
1354 gdbarch_single_step_through_delay_p (gdbarch));
1355 fprintf_unfiltered (file,
1356 "gdbarch_dump: single_step_through_delay = <%s>\n",
1357 host_address_to_string (gdbarch->single_step_through_delay));
1358 fprintf_unfiltered (file,
1359 "gdbarch_dump: gdbarch_skip_entrypoint_p() = %d\n",
1360 gdbarch_skip_entrypoint_p (gdbarch));
1361 fprintf_unfiltered (file,
1362 "gdbarch_dump: skip_entrypoint = <%s>\n",
1363 host_address_to_string (gdbarch->skip_entrypoint));
1364 fprintf_unfiltered (file,
1365 "gdbarch_dump: gdbarch_skip_main_prologue_p() = %d\n",
1366 gdbarch_skip_main_prologue_p (gdbarch));
1367 fprintf_unfiltered (file,
1368 "gdbarch_dump: skip_main_prologue = <%s>\n",
1369 host_address_to_string (gdbarch->skip_main_prologue));
1370 fprintf_unfiltered (file,
1371 "gdbarch_dump: gdbarch_skip_permanent_breakpoint_p() = %d\n",
1372 gdbarch_skip_permanent_breakpoint_p (gdbarch));
1373 fprintf_unfiltered (file,
1374 "gdbarch_dump: skip_permanent_breakpoint = <%s>\n",
1375 host_address_to_string (gdbarch->skip_permanent_breakpoint));
1376 fprintf_unfiltered (file,
1377 "gdbarch_dump: skip_prologue = <%s>\n",
1378 host_address_to_string (gdbarch->skip_prologue));
1379 fprintf_unfiltered (file,
1380 "gdbarch_dump: skip_solib_resolver = <%s>\n",
1381 host_address_to_string (gdbarch->skip_solib_resolver));
1382 fprintf_unfiltered (file,
1383 "gdbarch_dump: skip_trampoline_code = <%s>\n",
1384 host_address_to_string (gdbarch->skip_trampoline_code));
1385 fprintf_unfiltered (file,
1386 "gdbarch_dump: gdbarch_software_single_step_p() = %d\n",
1387 gdbarch_software_single_step_p (gdbarch));
1388 fprintf_unfiltered (file,
1389 "gdbarch_dump: software_single_step = <%s>\n",
1390 host_address_to_string (gdbarch->software_single_step));
1391 fprintf_unfiltered (file,
1392 "gdbarch_dump: sofun_address_maybe_missing = %s\n",
1393 plongest (gdbarch->sofun_address_maybe_missing));
1394 fprintf_unfiltered (file,
1395 "gdbarch_dump: solib_symbols_extension = %s\n",
1396 pstring (gdbarch->solib_symbols_extension));
1397 fprintf_unfiltered (file,
1398 "gdbarch_dump: sp_regnum = %s\n",
1399 plongest (gdbarch->sp_regnum));
1400 fprintf_unfiltered (file,
1401 "gdbarch_dump: stab_reg_to_regnum = <%s>\n",
1402 host_address_to_string (gdbarch->stab_reg_to_regnum));
1403 fprintf_unfiltered (file,
1404 "gdbarch_dump: stabs_argument_has_addr = <%s>\n",
1405 host_address_to_string (gdbarch->stabs_argument_has_addr));
1406 fprintf_unfiltered (file,
1407 "gdbarch_dump: stap_gdb_register_prefix = %s\n",
1408 pstring (gdbarch->stap_gdb_register_prefix));
1409 fprintf_unfiltered (file,
1410 "gdbarch_dump: stap_gdb_register_suffix = %s\n",
1411 pstring (gdbarch->stap_gdb_register_suffix));
1412 fprintf_unfiltered (file,
1413 "gdbarch_dump: stap_integer_prefixes = %s\n",
1414 pstring_list (gdbarch->stap_integer_prefixes));
1415 fprintf_unfiltered (file,
1416 "gdbarch_dump: stap_integer_suffixes = %s\n",
1417 pstring_list (gdbarch->stap_integer_suffixes));
1418 fprintf_unfiltered (file,
1419 "gdbarch_dump: gdbarch_stap_is_single_operand_p() = %d\n",
1420 gdbarch_stap_is_single_operand_p (gdbarch));
1421 fprintf_unfiltered (file,
1422 "gdbarch_dump: stap_is_single_operand = <%s>\n",
1423 host_address_to_string (gdbarch->stap_is_single_operand));
1424 fprintf_unfiltered (file,
1425 "gdbarch_dump: gdbarch_stap_parse_special_token_p() = %d\n",
1426 gdbarch_stap_parse_special_token_p (gdbarch));
1427 fprintf_unfiltered (file,
1428 "gdbarch_dump: stap_parse_special_token = <%s>\n",
1429 host_address_to_string (gdbarch->stap_parse_special_token));
1430 fprintf_unfiltered (file,
1431 "gdbarch_dump: stap_register_indirection_prefixes = %s\n",
1432 pstring_list (gdbarch->stap_register_indirection_prefixes));
1433 fprintf_unfiltered (file,
1434 "gdbarch_dump: stap_register_indirection_suffixes = %s\n",
1435 pstring_list (gdbarch->stap_register_indirection_suffixes));
1436 fprintf_unfiltered (file,
1437 "gdbarch_dump: stap_register_prefixes = %s\n",
1438 pstring_list (gdbarch->stap_register_prefixes));
1439 fprintf_unfiltered (file,
1440 "gdbarch_dump: stap_register_suffixes = %s\n",
1441 pstring_list (gdbarch->stap_register_suffixes));
1442 fprintf_unfiltered (file,
1443 "gdbarch_dump: gdbarch_static_transform_name_p() = %d\n",
1444 gdbarch_static_transform_name_p (gdbarch));
1445 fprintf_unfiltered (file,
1446 "gdbarch_dump: static_transform_name = <%s>\n",
1447 host_address_to_string (gdbarch->static_transform_name));
1448 fprintf_unfiltered (file,
1449 "gdbarch_dump: target_desc = %s\n",
1450 host_address_to_string (gdbarch->target_desc));
1451 fprintf_unfiltered (file,
1452 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
1453 gdbarch_unwind_pc_p (gdbarch));
1454 fprintf_unfiltered (file,
1455 "gdbarch_dump: unwind_pc = <%s>\n",
1456 host_address_to_string (gdbarch->unwind_pc));
1457 fprintf_unfiltered (file,
1458 "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
1459 gdbarch_unwind_sp_p (gdbarch));
1460 fprintf_unfiltered (file,
1461 "gdbarch_dump: unwind_sp = <%s>\n",
1462 host_address_to_string (gdbarch->unwind_sp));
1463 fprintf_unfiltered (file,
1464 "gdbarch_dump: value_from_register = <%s>\n",
1465 host_address_to_string (gdbarch->value_from_register));
1466 fprintf_unfiltered (file,
1467 "gdbarch_dump: value_to_register = <%s>\n",
1468 host_address_to_string (gdbarch->value_to_register));
1469 fprintf_unfiltered (file,
1470 "gdbarch_dump: vbit_in_delta = %s\n",
1471 plongest (gdbarch->vbit_in_delta));
1472 fprintf_unfiltered (file,
1473 "gdbarch_dump: virtual_frame_pointer = <%s>\n",
1474 host_address_to_string (gdbarch->virtual_frame_pointer));
1475 fprintf_unfiltered (file,
1476 "gdbarch_dump: vtable_function_descriptors = %s\n",
1477 plongest (gdbarch->vtable_function_descriptors));
1478 fprintf_unfiltered (file,
1479 "gdbarch_dump: gdbarch_write_pc_p() = %d\n",
1480 gdbarch_write_pc_p (gdbarch));
1481 fprintf_unfiltered (file,
1482 "gdbarch_dump: write_pc = <%s>\n",
1483 host_address_to_string (gdbarch->write_pc));
1484 if (gdbarch->dump_tdep != NULL)
1485 gdbarch->dump_tdep (gdbarch, file);
1488 struct gdbarch_tdep *
1489 gdbarch_tdep (struct gdbarch *gdbarch)
1491 if (gdbarch_debug >= 2)
1492 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
1493 return gdbarch->tdep;
1497 const struct bfd_arch_info *
1498 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
1500 gdb_assert (gdbarch != NULL);
1501 if (gdbarch_debug >= 2)
1502 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
1503 return gdbarch->bfd_arch_info;
1507 gdbarch_byte_order (struct gdbarch *gdbarch)
1509 gdb_assert (gdbarch != NULL);
1510 if (gdbarch_debug >= 2)
1511 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
1512 return gdbarch->byte_order;
1516 gdbarch_byte_order_for_code (struct gdbarch *gdbarch)
1518 gdb_assert (gdbarch != NULL);
1519 if (gdbarch_debug >= 2)
1520 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order_for_code called\n");
1521 return gdbarch->byte_order_for_code;
1525 gdbarch_osabi (struct gdbarch *gdbarch)
1527 gdb_assert (gdbarch != NULL);
1528 if (gdbarch_debug >= 2)
1529 fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n");
1530 return gdbarch->osabi;
1533 const struct target_desc *
1534 gdbarch_target_desc (struct gdbarch *gdbarch)
1536 gdb_assert (gdbarch != NULL);
1537 if (gdbarch_debug >= 2)
1538 fprintf_unfiltered (gdb_stdlog, "gdbarch_target_desc called\n");
1539 return gdbarch->target_desc;
1543 gdbarch_bits_big_endian (struct gdbarch *gdbarch)
1545 gdb_assert (gdbarch != NULL);
1546 /* Skip verify of bits_big_endian, invalid_p == 0 */
1547 if (gdbarch_debug >= 2)
1548 fprintf_unfiltered (gdb_stdlog, "gdbarch_bits_big_endian called\n");
1549 return gdbarch->bits_big_endian;
1553 set_gdbarch_bits_big_endian (struct gdbarch *gdbarch,
1554 int bits_big_endian)
1556 gdbarch->bits_big_endian = bits_big_endian;
1560 gdbarch_short_bit (struct gdbarch *gdbarch)
1562 gdb_assert (gdbarch != NULL);
1563 /* Skip verify of short_bit, invalid_p == 0 */
1564 if (gdbarch_debug >= 2)
1565 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
1566 return gdbarch->short_bit;
1570 set_gdbarch_short_bit (struct gdbarch *gdbarch,
1573 gdbarch->short_bit = short_bit;
1577 gdbarch_int_bit (struct gdbarch *gdbarch)
1579 gdb_assert (gdbarch != NULL);
1580 /* Skip verify of int_bit, invalid_p == 0 */
1581 if (gdbarch_debug >= 2)
1582 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
1583 return gdbarch->int_bit;
1587 set_gdbarch_int_bit (struct gdbarch *gdbarch,
1590 gdbarch->int_bit = int_bit;
1594 gdbarch_long_bit (struct gdbarch *gdbarch)
1596 gdb_assert (gdbarch != NULL);
1597 /* Skip verify of long_bit, invalid_p == 0 */
1598 if (gdbarch_debug >= 2)
1599 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
1600 return gdbarch->long_bit;
1604 set_gdbarch_long_bit (struct gdbarch *gdbarch,
1607 gdbarch->long_bit = long_bit;
1611 gdbarch_long_long_bit (struct gdbarch *gdbarch)
1613 gdb_assert (gdbarch != NULL);
1614 /* Skip verify of long_long_bit, invalid_p == 0 */
1615 if (gdbarch_debug >= 2)
1616 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
1617 return gdbarch->long_long_bit;
1621 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
1624 gdbarch->long_long_bit = long_long_bit;
1628 gdbarch_long_long_align_bit (struct gdbarch *gdbarch)
1630 gdb_assert (gdbarch != NULL);
1631 /* Skip verify of long_long_align_bit, invalid_p == 0 */
1632 if (gdbarch_debug >= 2)
1633 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_align_bit called\n");
1634 return gdbarch->long_long_align_bit;
1638 set_gdbarch_long_long_align_bit (struct gdbarch *gdbarch,
1639 int long_long_align_bit)
1641 gdbarch->long_long_align_bit = long_long_align_bit;
1645 gdbarch_half_bit (struct gdbarch *gdbarch)
1647 gdb_assert (gdbarch != NULL);
1648 /* Skip verify of half_bit, invalid_p == 0 */
1649 if (gdbarch_debug >= 2)
1650 fprintf_unfiltered (gdb_stdlog, "gdbarch_half_bit called\n");
1651 return gdbarch->half_bit;
1655 set_gdbarch_half_bit (struct gdbarch *gdbarch,
1658 gdbarch->half_bit = half_bit;
1661 const struct floatformat **
1662 gdbarch_half_format (struct gdbarch *gdbarch)
1664 gdb_assert (gdbarch != NULL);
1665 if (gdbarch_debug >= 2)
1666 fprintf_unfiltered (gdb_stdlog, "gdbarch_half_format called\n");
1667 return gdbarch->half_format;
1671 set_gdbarch_half_format (struct gdbarch *gdbarch,
1672 const struct floatformat ** half_format)
1674 gdbarch->half_format = half_format;
1678 gdbarch_float_bit (struct gdbarch *gdbarch)
1680 gdb_assert (gdbarch != NULL);
1681 /* Skip verify of float_bit, invalid_p == 0 */
1682 if (gdbarch_debug >= 2)
1683 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
1684 return gdbarch->float_bit;
1688 set_gdbarch_float_bit (struct gdbarch *gdbarch,
1691 gdbarch->float_bit = float_bit;
1694 const struct floatformat **
1695 gdbarch_float_format (struct gdbarch *gdbarch)
1697 gdb_assert (gdbarch != NULL);
1698 if (gdbarch_debug >= 2)
1699 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
1700 return gdbarch->float_format;
1704 set_gdbarch_float_format (struct gdbarch *gdbarch,
1705 const struct floatformat ** float_format)
1707 gdbarch->float_format = float_format;
1711 gdbarch_double_bit (struct gdbarch *gdbarch)
1713 gdb_assert (gdbarch != NULL);
1714 /* Skip verify of double_bit, invalid_p == 0 */
1715 if (gdbarch_debug >= 2)
1716 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
1717 return gdbarch->double_bit;
1721 set_gdbarch_double_bit (struct gdbarch *gdbarch,
1724 gdbarch->double_bit = double_bit;
1727 const struct floatformat **
1728 gdbarch_double_format (struct gdbarch *gdbarch)
1730 gdb_assert (gdbarch != NULL);
1731 if (gdbarch_debug >= 2)
1732 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
1733 return gdbarch->double_format;
1737 set_gdbarch_double_format (struct gdbarch *gdbarch,
1738 const struct floatformat ** double_format)
1740 gdbarch->double_format = double_format;
1744 gdbarch_long_double_bit (struct gdbarch *gdbarch)
1746 gdb_assert (gdbarch != NULL);
1747 /* Skip verify of long_double_bit, invalid_p == 0 */
1748 if (gdbarch_debug >= 2)
1749 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
1750 return gdbarch->long_double_bit;
1754 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
1755 int long_double_bit)
1757 gdbarch->long_double_bit = long_double_bit;
1760 const struct floatformat **
1761 gdbarch_long_double_format (struct gdbarch *gdbarch)
1763 gdb_assert (gdbarch != NULL);
1764 if (gdbarch_debug >= 2)
1765 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
1766 return gdbarch->long_double_format;
1770 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
1771 const struct floatformat ** long_double_format)
1773 gdbarch->long_double_format = long_double_format;
1777 gdbarch_ptr_bit (struct gdbarch *gdbarch)
1779 gdb_assert (gdbarch != NULL);
1780 /* Skip verify of ptr_bit, invalid_p == 0 */
1781 if (gdbarch_debug >= 2)
1782 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
1783 return gdbarch->ptr_bit;
1787 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
1790 gdbarch->ptr_bit = ptr_bit;
1794 gdbarch_addr_bit (struct gdbarch *gdbarch)
1796 gdb_assert (gdbarch != NULL);
1797 /* Check variable changed from pre-default. */
1798 gdb_assert (gdbarch->addr_bit != 0);
1799 if (gdbarch_debug >= 2)
1800 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
1801 return gdbarch->addr_bit;
1805 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
1808 gdbarch->addr_bit = addr_bit;
1812 gdbarch_dwarf2_addr_size (struct gdbarch *gdbarch)
1814 gdb_assert (gdbarch != NULL);
1815 /* Check variable changed from pre-default. */
1816 gdb_assert (gdbarch->dwarf2_addr_size != 0);
1817 if (gdbarch_debug >= 2)
1818 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_addr_size called\n");
1819 return gdbarch->dwarf2_addr_size;
1823 set_gdbarch_dwarf2_addr_size (struct gdbarch *gdbarch,
1824 int dwarf2_addr_size)
1826 gdbarch->dwarf2_addr_size = dwarf2_addr_size;
1830 gdbarch_char_signed (struct gdbarch *gdbarch)
1832 gdb_assert (gdbarch != NULL);
1833 /* Check variable changed from pre-default. */
1834 gdb_assert (gdbarch->char_signed != -1);
1835 if (gdbarch_debug >= 2)
1836 fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
1837 return gdbarch->char_signed;
1841 set_gdbarch_char_signed (struct gdbarch *gdbarch,
1844 gdbarch->char_signed = char_signed;
1848 gdbarch_read_pc_p (struct gdbarch *gdbarch)
1850 gdb_assert (gdbarch != NULL);
1851 return gdbarch->read_pc != NULL;
1855 gdbarch_read_pc (struct gdbarch *gdbarch, struct regcache *regcache)
1857 gdb_assert (gdbarch != NULL);
1858 gdb_assert (gdbarch->read_pc != NULL);
1859 if (gdbarch_debug >= 2)
1860 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
1861 return gdbarch->read_pc (regcache);
1865 set_gdbarch_read_pc (struct gdbarch *gdbarch,
1866 gdbarch_read_pc_ftype read_pc)
1868 gdbarch->read_pc = read_pc;
1872 gdbarch_write_pc_p (struct gdbarch *gdbarch)
1874 gdb_assert (gdbarch != NULL);
1875 return gdbarch->write_pc != NULL;
1879 gdbarch_write_pc (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR val)
1881 gdb_assert (gdbarch != NULL);
1882 gdb_assert (gdbarch->write_pc != NULL);
1883 if (gdbarch_debug >= 2)
1884 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
1885 gdbarch->write_pc (regcache, val);
1889 set_gdbarch_write_pc (struct gdbarch *gdbarch,
1890 gdbarch_write_pc_ftype write_pc)
1892 gdbarch->write_pc = write_pc;
1896 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
1898 gdb_assert (gdbarch != NULL);
1899 gdb_assert (gdbarch->virtual_frame_pointer != NULL);
1900 if (gdbarch_debug >= 2)
1901 fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
1902 gdbarch->virtual_frame_pointer (gdbarch, pc, frame_regnum, frame_offset);
1906 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
1907 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
1909 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
1913 gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
1915 gdb_assert (gdbarch != NULL);
1916 return gdbarch->pseudo_register_read != NULL;
1919 enum register_status
1920 gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, gdb_byte *buf)
1922 gdb_assert (gdbarch != NULL);
1923 gdb_assert (gdbarch->pseudo_register_read != NULL);
1924 if (gdbarch_debug >= 2)
1925 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
1926 return gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
1930 set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
1931 gdbarch_pseudo_register_read_ftype pseudo_register_read)
1933 gdbarch->pseudo_register_read = pseudo_register_read;
1937 gdbarch_pseudo_register_read_value_p (struct gdbarch *gdbarch)
1939 gdb_assert (gdbarch != NULL);
1940 return gdbarch->pseudo_register_read_value != NULL;
1944 gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum)
1946 gdb_assert (gdbarch != NULL);
1947 gdb_assert (gdbarch->pseudo_register_read_value != NULL);
1948 if (gdbarch_debug >= 2)
1949 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read_value called\n");
1950 return gdbarch->pseudo_register_read_value (gdbarch, regcache, cookednum);
1954 set_gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch,
1955 gdbarch_pseudo_register_read_value_ftype pseudo_register_read_value)
1957 gdbarch->pseudo_register_read_value = pseudo_register_read_value;
1961 gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
1963 gdb_assert (gdbarch != NULL);
1964 return gdbarch->pseudo_register_write != NULL;
1968 gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const gdb_byte *buf)
1970 gdb_assert (gdbarch != NULL);
1971 gdb_assert (gdbarch->pseudo_register_write != NULL);
1972 if (gdbarch_debug >= 2)
1973 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
1974 gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
1978 set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
1979 gdbarch_pseudo_register_write_ftype pseudo_register_write)
1981 gdbarch->pseudo_register_write = pseudo_register_write;
1985 gdbarch_num_regs (struct gdbarch *gdbarch)
1987 gdb_assert (gdbarch != NULL);
1988 /* Check variable changed from pre-default. */
1989 gdb_assert (gdbarch->num_regs != -1);
1990 if (gdbarch_debug >= 2)
1991 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
1992 return gdbarch->num_regs;
1996 set_gdbarch_num_regs (struct gdbarch *gdbarch,
1999 gdbarch->num_regs = num_regs;
2003 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
2005 gdb_assert (gdbarch != NULL);
2006 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2007 if (gdbarch_debug >= 2)
2008 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
2009 return gdbarch->num_pseudo_regs;
2013 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
2014 int num_pseudo_regs)
2016 gdbarch->num_pseudo_regs = num_pseudo_regs;
2020 gdbarch_ax_pseudo_register_collect_p (struct gdbarch *gdbarch)
2022 gdb_assert (gdbarch != NULL);
2023 return gdbarch->ax_pseudo_register_collect != NULL;
2027 gdbarch_ax_pseudo_register_collect (struct gdbarch *gdbarch, struct agent_expr *ax, int reg)
2029 gdb_assert (gdbarch != NULL);
2030 gdb_assert (gdbarch->ax_pseudo_register_collect != NULL);
2031 if (gdbarch_debug >= 2)
2032 fprintf_unfiltered (gdb_stdlog, "gdbarch_ax_pseudo_register_collect called\n");
2033 return gdbarch->ax_pseudo_register_collect (gdbarch, ax, reg);
2037 set_gdbarch_ax_pseudo_register_collect (struct gdbarch *gdbarch,
2038 gdbarch_ax_pseudo_register_collect_ftype ax_pseudo_register_collect)
2040 gdbarch->ax_pseudo_register_collect = ax_pseudo_register_collect;
2044 gdbarch_ax_pseudo_register_push_stack_p (struct gdbarch *gdbarch)
2046 gdb_assert (gdbarch != NULL);
2047 return gdbarch->ax_pseudo_register_push_stack != NULL;
2051 gdbarch_ax_pseudo_register_push_stack (struct gdbarch *gdbarch, struct agent_expr *ax, int reg)
2053 gdb_assert (gdbarch != NULL);
2054 gdb_assert (gdbarch->ax_pseudo_register_push_stack != NULL);
2055 if (gdbarch_debug >= 2)
2056 fprintf_unfiltered (gdb_stdlog, "gdbarch_ax_pseudo_register_push_stack called\n");
2057 return gdbarch->ax_pseudo_register_push_stack (gdbarch, ax, reg);
2061 set_gdbarch_ax_pseudo_register_push_stack (struct gdbarch *gdbarch,
2062 gdbarch_ax_pseudo_register_push_stack_ftype ax_pseudo_register_push_stack)
2064 gdbarch->ax_pseudo_register_push_stack = ax_pseudo_register_push_stack;
2068 gdbarch_sp_regnum (struct gdbarch *gdbarch)
2070 gdb_assert (gdbarch != NULL);
2071 /* Skip verify of sp_regnum, invalid_p == 0 */
2072 if (gdbarch_debug >= 2)
2073 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
2074 return gdbarch->sp_regnum;
2078 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
2081 gdbarch->sp_regnum = sp_regnum;
2085 gdbarch_pc_regnum (struct gdbarch *gdbarch)
2087 gdb_assert (gdbarch != NULL);
2088 /* Skip verify of pc_regnum, invalid_p == 0 */
2089 if (gdbarch_debug >= 2)
2090 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
2091 return gdbarch->pc_regnum;
2095 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
2098 gdbarch->pc_regnum = pc_regnum;
2102 gdbarch_ps_regnum (struct gdbarch *gdbarch)
2104 gdb_assert (gdbarch != NULL);
2105 /* Skip verify of ps_regnum, invalid_p == 0 */
2106 if (gdbarch_debug >= 2)
2107 fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
2108 return gdbarch->ps_regnum;
2112 set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
2115 gdbarch->ps_regnum = ps_regnum;
2119 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
2121 gdb_assert (gdbarch != NULL);
2122 /* Skip verify of fp0_regnum, invalid_p == 0 */
2123 if (gdbarch_debug >= 2)
2124 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
2125 return gdbarch->fp0_regnum;
2129 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
2132 gdbarch->fp0_regnum = fp0_regnum;
2136 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
2138 gdb_assert (gdbarch != NULL);
2139 gdb_assert (gdbarch->stab_reg_to_regnum != NULL);
2140 if (gdbarch_debug >= 2)
2141 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
2142 return gdbarch->stab_reg_to_regnum (gdbarch, stab_regnr);
2146 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
2147 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
2149 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
2153 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
2155 gdb_assert (gdbarch != NULL);
2156 gdb_assert (gdbarch->ecoff_reg_to_regnum != NULL);
2157 if (gdbarch_debug >= 2)
2158 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
2159 return gdbarch->ecoff_reg_to_regnum (gdbarch, ecoff_regnr);
2163 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
2164 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
2166 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
2170 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
2172 gdb_assert (gdbarch != NULL);
2173 gdb_assert (gdbarch->sdb_reg_to_regnum != NULL);
2174 if (gdbarch_debug >= 2)
2175 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
2176 return gdbarch->sdb_reg_to_regnum (gdbarch, sdb_regnr);
2180 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
2181 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
2183 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
2187 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
2189 gdb_assert (gdbarch != NULL);
2190 gdb_assert (gdbarch->dwarf2_reg_to_regnum != NULL);
2191 if (gdbarch_debug >= 2)
2192 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
2193 return gdbarch->dwarf2_reg_to_regnum (gdbarch, dwarf2_regnr);
2197 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
2198 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
2200 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
2204 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
2206 gdb_assert (gdbarch != NULL);
2207 gdb_assert (gdbarch->register_name != NULL);
2208 if (gdbarch_debug >= 2)
2209 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
2210 return gdbarch->register_name (gdbarch, regnr);
2214 set_gdbarch_register_name (struct gdbarch *gdbarch,
2215 gdbarch_register_name_ftype register_name)
2217 gdbarch->register_name = register_name;
2221 gdbarch_register_type_p (struct gdbarch *gdbarch)
2223 gdb_assert (gdbarch != NULL);
2224 return gdbarch->register_type != NULL;
2228 gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
2230 gdb_assert (gdbarch != NULL);
2231 gdb_assert (gdbarch->register_type != NULL);
2232 if (gdbarch_debug >= 2)
2233 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
2234 return gdbarch->register_type (gdbarch, reg_nr);
2238 set_gdbarch_register_type (struct gdbarch *gdbarch,
2239 gdbarch_register_type_ftype register_type)
2241 gdbarch->register_type = register_type;
2245 gdbarch_dummy_id_p (struct gdbarch *gdbarch)
2247 gdb_assert (gdbarch != NULL);
2248 return gdbarch->dummy_id != NULL;
2252 gdbarch_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
2254 gdb_assert (gdbarch != NULL);
2255 gdb_assert (gdbarch->dummy_id != NULL);
2256 if (gdbarch_debug >= 2)
2257 fprintf_unfiltered (gdb_stdlog, "gdbarch_dummy_id called\n");
2258 return gdbarch->dummy_id (gdbarch, this_frame);
2262 set_gdbarch_dummy_id (struct gdbarch *gdbarch,
2263 gdbarch_dummy_id_ftype dummy_id)
2265 gdbarch->dummy_id = dummy_id;
2269 gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch)
2271 gdb_assert (gdbarch != NULL);
2272 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
2273 if (gdbarch_debug >= 2)
2274 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n");
2275 return gdbarch->deprecated_fp_regnum;
2279 set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch,
2280 int deprecated_fp_regnum)
2282 gdbarch->deprecated_fp_regnum = deprecated_fp_regnum;
2286 gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
2288 gdb_assert (gdbarch != NULL);
2289 return gdbarch->push_dummy_call != NULL;
2293 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)
2295 gdb_assert (gdbarch != NULL);
2296 gdb_assert (gdbarch->push_dummy_call != NULL);
2297 if (gdbarch_debug >= 2)
2298 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
2299 return gdbarch->push_dummy_call (gdbarch, function, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr);
2303 set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
2304 gdbarch_push_dummy_call_ftype push_dummy_call)
2306 gdbarch->push_dummy_call = push_dummy_call;
2310 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
2312 gdb_assert (gdbarch != NULL);
2313 /* Skip verify of call_dummy_location, invalid_p == 0 */
2314 if (gdbarch_debug >= 2)
2315 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
2316 return gdbarch->call_dummy_location;
2320 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
2321 int call_dummy_location)
2323 gdbarch->call_dummy_location = call_dummy_location;
2327 gdbarch_push_dummy_code_p (struct gdbarch *gdbarch)
2329 gdb_assert (gdbarch != NULL);
2330 return gdbarch->push_dummy_code != NULL;
2334 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)
2336 gdb_assert (gdbarch != NULL);
2337 gdb_assert (gdbarch->push_dummy_code != NULL);
2338 if (gdbarch_debug >= 2)
2339 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n");
2340 return gdbarch->push_dummy_code (gdbarch, sp, funaddr, args, nargs, value_type, real_pc, bp_addr, regcache);
2344 set_gdbarch_push_dummy_code (struct gdbarch *gdbarch,
2345 gdbarch_push_dummy_code_ftype push_dummy_code)
2347 gdbarch->push_dummy_code = push_dummy_code;
2351 gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
2353 gdb_assert (gdbarch != NULL);
2354 gdb_assert (gdbarch->print_registers_info != NULL);
2355 if (gdbarch_debug >= 2)
2356 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
2357 gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
2361 set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
2362 gdbarch_print_registers_info_ftype print_registers_info)
2364 gdbarch->print_registers_info = print_registers_info;
2368 gdbarch_print_float_info_p (struct gdbarch *gdbarch)
2370 gdb_assert (gdbarch != NULL);
2371 return gdbarch->print_float_info != NULL;
2375 gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
2377 gdb_assert (gdbarch != NULL);
2378 gdb_assert (gdbarch->print_float_info != NULL);
2379 if (gdbarch_debug >= 2)
2380 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
2381 gdbarch->print_float_info (gdbarch, file, frame, args);
2385 set_gdbarch_print_float_info (struct gdbarch *gdbarch,
2386 gdbarch_print_float_info_ftype print_float_info)
2388 gdbarch->print_float_info = print_float_info;
2392 gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
2394 gdb_assert (gdbarch != NULL);
2395 return gdbarch->print_vector_info != NULL;
2399 gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
2401 gdb_assert (gdbarch != NULL);
2402 gdb_assert (gdbarch->print_vector_info != NULL);
2403 if (gdbarch_debug >= 2)
2404 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
2405 gdbarch->print_vector_info (gdbarch, file, frame, args);
2409 set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
2410 gdbarch_print_vector_info_ftype print_vector_info)
2412 gdbarch->print_vector_info = print_vector_info;
2416 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
2418 gdb_assert (gdbarch != NULL);
2419 gdb_assert (gdbarch->register_sim_regno != NULL);
2420 if (gdbarch_debug >= 2)
2421 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
2422 return gdbarch->register_sim_regno (gdbarch, reg_nr);
2426 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
2427 gdbarch_register_sim_regno_ftype register_sim_regno)
2429 gdbarch->register_sim_regno = register_sim_regno;
2433 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
2435 gdb_assert (gdbarch != NULL);
2436 gdb_assert (gdbarch->cannot_fetch_register != NULL);
2437 if (gdbarch_debug >= 2)
2438 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
2439 return gdbarch->cannot_fetch_register (gdbarch, regnum);
2443 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
2444 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
2446 gdbarch->cannot_fetch_register = cannot_fetch_register;
2450 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
2452 gdb_assert (gdbarch != NULL);
2453 gdb_assert (gdbarch->cannot_store_register != NULL);
2454 if (gdbarch_debug >= 2)
2455 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
2456 return gdbarch->cannot_store_register (gdbarch, regnum);
2460 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
2461 gdbarch_cannot_store_register_ftype cannot_store_register)
2463 gdbarch->cannot_store_register = cannot_store_register;
2467 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
2469 gdb_assert (gdbarch != NULL);
2470 return gdbarch->get_longjmp_target != NULL;
2474 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR *pc)
2476 gdb_assert (gdbarch != NULL);
2477 gdb_assert (gdbarch->get_longjmp_target != NULL);
2478 if (gdbarch_debug >= 2)
2479 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
2480 return gdbarch->get_longjmp_target (frame, pc);
2484 set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
2485 gdbarch_get_longjmp_target_ftype get_longjmp_target)
2487 gdbarch->get_longjmp_target = get_longjmp_target;
2491 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
2493 gdb_assert (gdbarch != NULL);
2494 if (gdbarch_debug >= 2)
2495 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
2496 return gdbarch->believe_pcc_promotion;
2500 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
2501 int believe_pcc_promotion)
2503 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
2507 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
2509 gdb_assert (gdbarch != NULL);
2510 gdb_assert (gdbarch->convert_register_p != NULL);
2511 if (gdbarch_debug >= 2)
2512 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
2513 return gdbarch->convert_register_p (gdbarch, regnum, type);
2517 set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
2518 gdbarch_convert_register_p_ftype convert_register_p)
2520 gdbarch->convert_register_p = convert_register_p;
2524 gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, gdb_byte *buf, int *optimizedp, int *unavailablep)
2526 gdb_assert (gdbarch != NULL);
2527 gdb_assert (gdbarch->register_to_value != NULL);
2528 if (gdbarch_debug >= 2)
2529 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
2530 return gdbarch->register_to_value (frame, regnum, type, buf, optimizedp, unavailablep);
2534 set_gdbarch_register_to_value (struct gdbarch *gdbarch,
2535 gdbarch_register_to_value_ftype register_to_value)
2537 gdbarch->register_to_value = register_to_value;
2541 gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const gdb_byte *buf)
2543 gdb_assert (gdbarch != NULL);
2544 gdb_assert (gdbarch->value_to_register != NULL);
2545 if (gdbarch_debug >= 2)
2546 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
2547 gdbarch->value_to_register (frame, regnum, type, buf);
2551 set_gdbarch_value_to_register (struct gdbarch *gdbarch,
2552 gdbarch_value_to_register_ftype value_to_register)
2554 gdbarch->value_to_register = value_to_register;
2558 gdbarch_value_from_register (struct gdbarch *gdbarch, struct type *type, int regnum, struct frame_info *frame)
2560 gdb_assert (gdbarch != NULL);
2561 gdb_assert (gdbarch->value_from_register != NULL);
2562 if (gdbarch_debug >= 2)
2563 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_from_register called\n");
2564 return gdbarch->value_from_register (type, regnum, frame);
2568 set_gdbarch_value_from_register (struct gdbarch *gdbarch,
2569 gdbarch_value_from_register_ftype value_from_register)
2571 gdbarch->value_from_register = value_from_register;
2575 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
2577 gdb_assert (gdbarch != NULL);
2578 gdb_assert (gdbarch->pointer_to_address != NULL);
2579 if (gdbarch_debug >= 2)
2580 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
2581 return gdbarch->pointer_to_address (gdbarch, type, buf);
2585 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
2586 gdbarch_pointer_to_address_ftype pointer_to_address)
2588 gdbarch->pointer_to_address = pointer_to_address;
2592 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, gdb_byte *buf, CORE_ADDR addr)
2594 gdb_assert (gdbarch != NULL);
2595 gdb_assert (gdbarch->address_to_pointer != NULL);
2596 if (gdbarch_debug >= 2)
2597 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
2598 gdbarch->address_to_pointer (gdbarch, type, buf, addr);
2602 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
2603 gdbarch_address_to_pointer_ftype address_to_pointer)
2605 gdbarch->address_to_pointer = address_to_pointer;
2609 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
2611 gdb_assert (gdbarch != NULL);
2612 return gdbarch->integer_to_address != NULL;
2616 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
2618 gdb_assert (gdbarch != NULL);
2619 gdb_assert (gdbarch->integer_to_address != NULL);
2620 if (gdbarch_debug >= 2)
2621 fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
2622 return gdbarch->integer_to_address (gdbarch, type, buf);
2626 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
2627 gdbarch_integer_to_address_ftype integer_to_address)
2629 gdbarch->integer_to_address = integer_to_address;
2633 gdbarch_return_value_p (struct gdbarch *gdbarch)
2635 gdb_assert (gdbarch != NULL);
2636 return gdbarch->return_value != NULL;
2639 enum return_value_convention
2640 gdbarch_return_value (struct gdbarch *gdbarch, struct value *function, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
2642 gdb_assert (gdbarch != NULL);
2643 gdb_assert (gdbarch->return_value != NULL);
2644 if (gdbarch_debug >= 2)
2645 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value called\n");
2646 return gdbarch->return_value (gdbarch, function, valtype, regcache, readbuf, writebuf);
2650 set_gdbarch_return_value (struct gdbarch *gdbarch,
2651 gdbarch_return_value_ftype return_value)
2653 gdbarch->return_value = return_value;
2657 gdbarch_return_in_first_hidden_param_p (struct gdbarch *gdbarch, struct type *type)
2659 gdb_assert (gdbarch != NULL);
2660 gdb_assert (gdbarch->return_in_first_hidden_param_p != NULL);
2661 if (gdbarch_debug >= 2)
2662 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_in_first_hidden_param_p called\n");
2663 return gdbarch->return_in_first_hidden_param_p (gdbarch, type);
2667 set_gdbarch_return_in_first_hidden_param_p (struct gdbarch *gdbarch,
2668 gdbarch_return_in_first_hidden_param_p_ftype return_in_first_hidden_param_p)
2670 gdbarch->return_in_first_hidden_param_p = return_in_first_hidden_param_p;
2674 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
2676 gdb_assert (gdbarch != NULL);
2677 gdb_assert (gdbarch->skip_prologue != NULL);
2678 if (gdbarch_debug >= 2)
2679 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
2680 return gdbarch->skip_prologue (gdbarch, ip);
2684 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
2685 gdbarch_skip_prologue_ftype skip_prologue)
2687 gdbarch->skip_prologue = skip_prologue;
2691 gdbarch_skip_main_prologue_p (struct gdbarch *gdbarch)
2693 gdb_assert (gdbarch != NULL);
2694 return gdbarch->skip_main_prologue != NULL;
2698 gdbarch_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
2700 gdb_assert (gdbarch != NULL);
2701 gdb_assert (gdbarch->skip_main_prologue != NULL);
2702 if (gdbarch_debug >= 2)
2703 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_main_prologue called\n");
2704 return gdbarch->skip_main_prologue (gdbarch, ip);
2708 set_gdbarch_skip_main_prologue (struct gdbarch *gdbarch,
2709 gdbarch_skip_main_prologue_ftype skip_main_prologue)
2711 gdbarch->skip_main_prologue = skip_main_prologue;
2715 gdbarch_skip_entrypoint_p (struct gdbarch *gdbarch)
2717 gdb_assert (gdbarch != NULL);
2718 return gdbarch->skip_entrypoint != NULL;
2722 gdbarch_skip_entrypoint (struct gdbarch *gdbarch, CORE_ADDR ip)
2724 gdb_assert (gdbarch != NULL);
2725 gdb_assert (gdbarch->skip_entrypoint != NULL);
2726 if (gdbarch_debug >= 2)
2727 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_entrypoint called\n");
2728 return gdbarch->skip_entrypoint (gdbarch, ip);
2732 set_gdbarch_skip_entrypoint (struct gdbarch *gdbarch,
2733 gdbarch_skip_entrypoint_ftype skip_entrypoint)
2735 gdbarch->skip_entrypoint = skip_entrypoint;
2739 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
2741 gdb_assert (gdbarch != NULL);
2742 gdb_assert (gdbarch->inner_than != NULL);
2743 if (gdbarch_debug >= 2)
2744 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
2745 return gdbarch->inner_than (lhs, rhs);
2749 set_gdbarch_inner_than (struct gdbarch *gdbarch,
2750 gdbarch_inner_than_ftype inner_than)
2752 gdbarch->inner_than = inner_than;
2756 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
2758 gdb_assert (gdbarch != NULL);
2759 gdb_assert (gdbarch->breakpoint_from_pc != NULL);
2760 if (gdbarch_debug >= 2)
2761 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
2762 return gdbarch->breakpoint_from_pc (gdbarch, pcptr, lenptr);
2766 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
2767 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
2769 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
2773 gdbarch_remote_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *kindptr)
2775 gdb_assert (gdbarch != NULL);
2776 gdb_assert (gdbarch->remote_breakpoint_from_pc != NULL);
2777 if (gdbarch_debug >= 2)
2778 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_breakpoint_from_pc called\n");
2779 gdbarch->remote_breakpoint_from_pc (gdbarch, pcptr, kindptr);
2783 set_gdbarch_remote_breakpoint_from_pc (struct gdbarch *gdbarch,
2784 gdbarch_remote_breakpoint_from_pc_ftype remote_breakpoint_from_pc)
2786 gdbarch->remote_breakpoint_from_pc = remote_breakpoint_from_pc;
2790 gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch)
2792 gdb_assert (gdbarch != NULL);
2793 return gdbarch->adjust_breakpoint_address != NULL;
2797 gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr)
2799 gdb_assert (gdbarch != NULL);
2800 gdb_assert (gdbarch->adjust_breakpoint_address != NULL);
2801 if (gdbarch_debug >= 2)
2802 fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_breakpoint_address called\n");
2803 return gdbarch->adjust_breakpoint_address (gdbarch, bpaddr);
2807 set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch,
2808 gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address)
2810 gdbarch->adjust_breakpoint_address = adjust_breakpoint_address;
2814 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
2816 gdb_assert (gdbarch != NULL);
2817 gdb_assert (gdbarch->memory_insert_breakpoint != NULL);
2818 if (gdbarch_debug >= 2)
2819 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
2820 return gdbarch->memory_insert_breakpoint (gdbarch, bp_tgt);
2824 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
2825 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
2827 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
2831 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
2833 gdb_assert (gdbarch != NULL);
2834 gdb_assert (gdbarch->memory_remove_breakpoint != NULL);
2835 if (gdbarch_debug >= 2)
2836 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
2837 return gdbarch->memory_remove_breakpoint (gdbarch, bp_tgt);
2841 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
2842 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
2844 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
2848 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
2850 gdb_assert (gdbarch != NULL);
2851 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
2852 if (gdbarch_debug >= 2)
2853 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
2854 return gdbarch->decr_pc_after_break;
2858 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
2859 CORE_ADDR decr_pc_after_break)
2861 gdbarch->decr_pc_after_break = decr_pc_after_break;
2865 gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch)
2867 gdb_assert (gdbarch != NULL);
2868 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
2869 if (gdbarch_debug >= 2)
2870 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_function_start_offset called\n");
2871 return gdbarch->deprecated_function_start_offset;
2875 set_gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch,
2876 CORE_ADDR deprecated_function_start_offset)
2878 gdbarch->deprecated_function_start_offset = deprecated_function_start_offset;
2882 gdbarch_remote_register_number (struct gdbarch *gdbarch, int regno)
2884 gdb_assert (gdbarch != NULL);
2885 gdb_assert (gdbarch->remote_register_number != NULL);
2886 if (gdbarch_debug >= 2)
2887 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_register_number called\n");
2888 return gdbarch->remote_register_number (gdbarch, regno);
2892 set_gdbarch_remote_register_number (struct gdbarch *gdbarch,
2893 gdbarch_remote_register_number_ftype remote_register_number)
2895 gdbarch->remote_register_number = remote_register_number;
2899 gdbarch_fetch_tls_load_module_address_p (struct gdbarch *gdbarch)
2901 gdb_assert (gdbarch != NULL);
2902 return gdbarch->fetch_tls_load_module_address != NULL;
2906 gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch, struct objfile *objfile)
2908 gdb_assert (gdbarch != NULL);
2909 gdb_assert (gdbarch->fetch_tls_load_module_address != NULL);
2910 if (gdbarch_debug >= 2)
2911 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_tls_load_module_address called\n");
2912 return gdbarch->fetch_tls_load_module_address (objfile);
2916 set_gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch,
2917 gdbarch_fetch_tls_load_module_address_ftype fetch_tls_load_module_address)
2919 gdbarch->fetch_tls_load_module_address = fetch_tls_load_module_address;
2923 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
2925 gdb_assert (gdbarch != NULL);
2926 /* Skip verify of frame_args_skip, invalid_p == 0 */
2927 if (gdbarch_debug >= 2)
2928 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
2929 return gdbarch->frame_args_skip;
2933 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
2934 CORE_ADDR frame_args_skip)
2936 gdbarch->frame_args_skip = frame_args_skip;
2940 gdbarch_unwind_pc_p (struct gdbarch *gdbarch)
2942 gdb_assert (gdbarch != NULL);
2943 return gdbarch->unwind_pc != NULL;
2947 gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
2949 gdb_assert (gdbarch != NULL);
2950 gdb_assert (gdbarch->unwind_pc != NULL);
2951 if (gdbarch_debug >= 2)
2952 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n");
2953 return gdbarch->unwind_pc (gdbarch, next_frame);
2957 set_gdbarch_unwind_pc (struct gdbarch *gdbarch,
2958 gdbarch_unwind_pc_ftype unwind_pc)
2960 gdbarch->unwind_pc = unwind_pc;
2964 gdbarch_unwind_sp_p (struct gdbarch *gdbarch)
2966 gdb_assert (gdbarch != NULL);
2967 return gdbarch->unwind_sp != NULL;
2971 gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
2973 gdb_assert (gdbarch != NULL);
2974 gdb_assert (gdbarch->unwind_sp != NULL);
2975 if (gdbarch_debug >= 2)
2976 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_sp called\n");
2977 return gdbarch->unwind_sp (gdbarch, next_frame);
2981 set_gdbarch_unwind_sp (struct gdbarch *gdbarch,
2982 gdbarch_unwind_sp_ftype unwind_sp)
2984 gdbarch->unwind_sp = unwind_sp;
2988 gdbarch_frame_num_args_p (struct gdbarch *gdbarch)
2990 gdb_assert (gdbarch != NULL);
2991 return gdbarch->frame_num_args != NULL;
2995 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
2997 gdb_assert (gdbarch != NULL);
2998 gdb_assert (gdbarch->frame_num_args != NULL);
2999 if (gdbarch_debug >= 2)
3000 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
3001 return gdbarch->frame_num_args (frame);
3005 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
3006 gdbarch_frame_num_args_ftype frame_num_args)
3008 gdbarch->frame_num_args = frame_num_args;
3012 gdbarch_frame_align_p (struct gdbarch *gdbarch)
3014 gdb_assert (gdbarch != NULL);
3015 return gdbarch->frame_align != NULL;
3019 gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
3021 gdb_assert (gdbarch != NULL);
3022 gdb_assert (gdbarch->frame_align != NULL);
3023 if (gdbarch_debug >= 2)
3024 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
3025 return gdbarch->frame_align (gdbarch, address);
3029 set_gdbarch_frame_align (struct gdbarch *gdbarch,
3030 gdbarch_frame_align_ftype frame_align)
3032 gdbarch->frame_align = frame_align;
3036 gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type)
3038 gdb_assert (gdbarch != NULL);
3039 gdb_assert (gdbarch->stabs_argument_has_addr != NULL);
3040 if (gdbarch_debug >= 2)
3041 fprintf_unfiltered (gdb_stdlog, "gdbarch_stabs_argument_has_addr called\n");
3042 return gdbarch->stabs_argument_has_addr (gdbarch, type);
3046 set_gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch,
3047 gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr)
3049 gdbarch->stabs_argument_has_addr = stabs_argument_has_addr;
3053 gdbarch_frame_red_zone_size (struct gdbarch *gdbarch)
3055 gdb_assert (gdbarch != NULL);
3056 if (gdbarch_debug >= 2)
3057 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_red_zone_size called\n");
3058 return gdbarch->frame_red_zone_size;
3062 set_gdbarch_frame_red_zone_size (struct gdbarch *gdbarch,
3063 int frame_red_zone_size)
3065 gdbarch->frame_red_zone_size = frame_red_zone_size;
3069 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
3071 gdb_assert (gdbarch != NULL);
3072 gdb_assert (gdbarch->convert_from_func_ptr_addr != NULL);
3073 if (gdbarch_debug >= 2)
3074 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
3075 return gdbarch->convert_from_func_ptr_addr (gdbarch, addr, targ);
3079 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
3080 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
3082 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
3086 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
3088 gdb_assert (gdbarch != NULL);
3089 gdb_assert (gdbarch->addr_bits_remove != NULL);
3090 if (gdbarch_debug >= 2)
3091 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
3092 return gdbarch->addr_bits_remove (gdbarch, addr);
3096 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
3097 gdbarch_addr_bits_remove_ftype addr_bits_remove)
3099 gdbarch->addr_bits_remove = addr_bits_remove;
3103 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
3105 gdb_assert (gdbarch != NULL);
3106 return gdbarch->software_single_step != NULL;
3110 gdbarch_software_single_step (struct gdbarch *gdbarch, struct frame_info *frame)
3112 gdb_assert (gdbarch != NULL);
3113 gdb_assert (gdbarch->software_single_step != NULL);
3114 if (gdbarch_debug >= 2)
3115 fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
3116 return gdbarch->software_single_step (frame);
3120 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
3121 gdbarch_software_single_step_ftype software_single_step)
3123 gdbarch->software_single_step = software_single_step;
3127 gdbarch_single_step_through_delay_p (struct gdbarch *gdbarch)
3129 gdb_assert (gdbarch != NULL);
3130 return gdbarch->single_step_through_delay != NULL;
3134 gdbarch_single_step_through_delay (struct gdbarch *gdbarch, struct frame_info *frame)
3136 gdb_assert (gdbarch != NULL);
3137 gdb_assert (gdbarch->single_step_through_delay != NULL);
3138 if (gdbarch_debug >= 2)
3139 fprintf_unfiltered (gdb_stdlog, "gdbarch_single_step_through_delay called\n");
3140 return gdbarch->single_step_through_delay (gdbarch, frame);
3144 set_gdbarch_single_step_through_delay (struct gdbarch *gdbarch,
3145 gdbarch_single_step_through_delay_ftype single_step_through_delay)
3147 gdbarch->single_step_through_delay = single_step_through_delay;
3151 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info)
3153 gdb_assert (gdbarch != NULL);
3154 gdb_assert (gdbarch->print_insn != NULL);
3155 if (gdbarch_debug >= 2)
3156 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
3157 return gdbarch->print_insn (vma, info);
3161 set_gdbarch_print_insn (struct gdbarch *gdbarch,
3162 gdbarch_print_insn_ftype print_insn)
3164 gdbarch->print_insn = print_insn;
3168 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR pc)
3170 gdb_assert (gdbarch != NULL);
3171 gdb_assert (gdbarch->skip_trampoline_code != NULL);
3172 if (gdbarch_debug >= 2)
3173 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
3174 return gdbarch->skip_trampoline_code (frame, pc);
3178 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
3179 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
3181 gdbarch->skip_trampoline_code = skip_trampoline_code;
3185 gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
3187 gdb_assert (gdbarch != NULL);
3188 gdb_assert (gdbarch->skip_solib_resolver != NULL);
3189 if (gdbarch_debug >= 2)
3190 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_solib_resolver called\n");
3191 return gdbarch->skip_solib_resolver (gdbarch, pc);
3195 set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch,
3196 gdbarch_skip_solib_resolver_ftype skip_solib_resolver)
3198 gdbarch->skip_solib_resolver = skip_solib_resolver;
3202 gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, const char *name)
3204 gdb_assert (gdbarch != NULL);
3205 gdb_assert (gdbarch->in_solib_return_trampoline != NULL);
3206 if (gdbarch_debug >= 2)
3207 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
3208 return gdbarch->in_solib_return_trampoline (gdbarch, pc, name);
3212 set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
3213 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
3215 gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
3219 gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
3221 gdb_assert (gdbarch != NULL);
3222 gdb_assert (gdbarch->in_function_epilogue_p != NULL);
3223 if (gdbarch_debug >= 2)
3224 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n");
3225 return gdbarch->in_function_epilogue_p (gdbarch, addr);
3229 set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch,
3230 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p)
3232 gdbarch->in_function_epilogue_p = in_function_epilogue_p;
3236 gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
3238 gdb_assert (gdbarch != NULL);
3239 gdb_assert (gdbarch->elf_make_msymbol_special != NULL);
3240 if (gdbarch_debug >= 2)
3241 fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
3242 gdbarch->elf_make_msymbol_special (sym, msym);
3246 set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
3247 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
3249 gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
3253 gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
3255 gdb_assert (gdbarch != NULL);
3256 gdb_assert (gdbarch->coff_make_msymbol_special != NULL);
3257 if (gdbarch_debug >= 2)
3258 fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
3259 gdbarch->coff_make_msymbol_special (val, msym);
3263 set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
3264 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
3266 gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
3270 gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
3272 gdb_assert (gdbarch != NULL);
3273 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
3274 if (gdbarch_debug >= 2)
3275 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
3276 return gdbarch->cannot_step_breakpoint;
3280 set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
3281 int cannot_step_breakpoint)
3283 gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
3287 gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
3289 gdb_assert (gdbarch != NULL);
3290 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
3291 if (gdbarch_debug >= 2)
3292 fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
3293 return gdbarch->have_nonsteppable_watchpoint;
3297 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
3298 int have_nonsteppable_watchpoint)
3300 gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
3304 gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
3306 gdb_assert (gdbarch != NULL);
3307 return gdbarch->address_class_type_flags != NULL;
3311 gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
3313 gdb_assert (gdbarch != NULL);
3314 gdb_assert (gdbarch->address_class_type_flags != NULL);
3315 if (gdbarch_debug >= 2)
3316 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
3317 return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
3321 set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
3322 gdbarch_address_class_type_flags_ftype address_class_type_flags)
3324 gdbarch->address_class_type_flags = address_class_type_flags;
3328 gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
3330 gdb_assert (gdbarch != NULL);
3331 return gdbarch->address_class_type_flags_to_name != NULL;
3335 gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
3337 gdb_assert (gdbarch != NULL);
3338 gdb_assert (gdbarch->address_class_type_flags_to_name != NULL);
3339 if (gdbarch_debug >= 2)
3340 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
3341 return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
3345 set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
3346 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
3348 gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
3352 gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
3354 gdb_assert (gdbarch != NULL);
3355 return gdbarch->address_class_name_to_type_flags != NULL;
3359 gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
3361 gdb_assert (gdbarch != NULL);
3362 gdb_assert (gdbarch->address_class_name_to_type_flags != NULL);
3363 if (gdbarch_debug >= 2)
3364 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
3365 return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
3369 set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
3370 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
3372 gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
3376 gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
3378 gdb_assert (gdbarch != NULL);
3379 gdb_assert (gdbarch->register_reggroup_p != NULL);
3380 if (gdbarch_debug >= 2)
3381 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
3382 return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
3386 set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
3387 gdbarch_register_reggroup_p_ftype register_reggroup_p)
3389 gdbarch->register_reggroup_p = register_reggroup_p;
3393 gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch)
3395 gdb_assert (gdbarch != NULL);
3396 return gdbarch->fetch_pointer_argument != NULL;
3400 gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type)
3402 gdb_assert (gdbarch != NULL);
3403 gdb_assert (gdbarch->fetch_pointer_argument != NULL);
3404 if (gdbarch_debug >= 2)
3405 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n");
3406 return gdbarch->fetch_pointer_argument (frame, argi, type);
3410 set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch,
3411 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument)
3413 gdbarch->fetch_pointer_argument = fetch_pointer_argument;
3417 gdbarch_regset_from_core_section_p (struct gdbarch *gdbarch)
3419 gdb_assert (gdbarch != NULL);
3420 return gdbarch->regset_from_core_section != NULL;
3423 const struct regset *
3424 gdbarch_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size)
3426 gdb_assert (gdbarch != NULL);
3427 gdb_assert (gdbarch->regset_from_core_section != NULL);
3428 if (gdbarch_debug >= 2)
3429 fprintf_unfiltered (gdb_stdlog, "gdbarch_regset_from_core_section called\n");
3430 return gdbarch->regset_from_core_section (gdbarch, sect_name, sect_size);
3434 set_gdbarch_regset_from_core_section (struct gdbarch *gdbarch,
3435 gdbarch_regset_from_core_section_ftype regset_from_core_section)
3437 gdbarch->regset_from_core_section = regset_from_core_section;
3440 struct core_regset_section *
3441 gdbarch_core_regset_sections (struct gdbarch *gdbarch)
3443 gdb_assert (gdbarch != NULL);
3444 if (gdbarch_debug >= 2)
3445 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_regset_sections called\n");
3446 return gdbarch->core_regset_sections;
3450 set_gdbarch_core_regset_sections (struct gdbarch *gdbarch,
3451 struct core_regset_section * core_regset_sections)
3453 gdbarch->core_regset_sections = core_regset_sections;
3457 gdbarch_make_corefile_notes_p (struct gdbarch *gdbarch)
3459 gdb_assert (gdbarch != NULL);
3460 return gdbarch->make_corefile_notes != NULL;
3464 gdbarch_make_corefile_notes (struct gdbarch *gdbarch, bfd *obfd, int *note_size)
3466 gdb_assert (gdbarch != NULL);
3467 gdb_assert (gdbarch->make_corefile_notes != NULL);
3468 if (gdbarch_debug >= 2)
3469 fprintf_unfiltered (gdb_stdlog, "gdbarch_make_corefile_notes called\n");
3470 return gdbarch->make_corefile_notes (gdbarch, obfd, note_size);
3474 set_gdbarch_make_corefile_notes (struct gdbarch *gdbarch,
3475 gdbarch_make_corefile_notes_ftype make_corefile_notes)
3477 gdbarch->make_corefile_notes = make_corefile_notes;
3481 gdbarch_elfcore_write_linux_prpsinfo_p (struct gdbarch *gdbarch)
3483 gdb_assert (gdbarch != NULL);
3484 return gdbarch->elfcore_write_linux_prpsinfo != NULL;
3488 gdbarch_elfcore_write_linux_prpsinfo (struct gdbarch *gdbarch, bfd *obfd, char *note_data, int *note_size, const struct elf_internal_linux_prpsinfo *info)
3490 gdb_assert (gdbarch != NULL);
3491 gdb_assert (gdbarch->elfcore_write_linux_prpsinfo != NULL);
3492 if (gdbarch_debug >= 2)
3493 fprintf_unfiltered (gdb_stdlog, "gdbarch_elfcore_write_linux_prpsinfo called\n");
3494 return gdbarch->elfcore_write_linux_prpsinfo (obfd, note_data, note_size, info);
3498 set_gdbarch_elfcore_write_linux_prpsinfo (struct gdbarch *gdbarch,
3499 gdbarch_elfcore_write_linux_prpsinfo_ftype elfcore_write_linux_prpsinfo)
3501 gdbarch->elfcore_write_linux_prpsinfo = elfcore_write_linux_prpsinfo;
3505 gdbarch_find_memory_regions_p (struct gdbarch *gdbarch)
3507 gdb_assert (gdbarch != NULL);
3508 return gdbarch->find_memory_regions != NULL;
3512 gdbarch_find_memory_regions (struct gdbarch *gdbarch, find_memory_region_ftype func, void *data)
3514 gdb_assert (gdbarch != NULL);
3515 gdb_assert (gdbarch->find_memory_regions != NULL);
3516 if (gdbarch_debug >= 2)
3517 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_memory_regions called\n");
3518 return gdbarch->find_memory_regions (gdbarch, func, data);
3522 set_gdbarch_find_memory_regions (struct gdbarch *gdbarch,
3523 gdbarch_find_memory_regions_ftype find_memory_regions)
3525 gdbarch->find_memory_regions = find_memory_regions;
3529 gdbarch_core_xfer_shared_libraries_p (struct gdbarch *gdbarch)
3531 gdb_assert (gdbarch != NULL);
3532 return gdbarch->core_xfer_shared_libraries != NULL;
3536 gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len)
3538 gdb_assert (gdbarch != NULL);
3539 gdb_assert (gdbarch->core_xfer_shared_libraries != NULL);
3540 if (gdbarch_debug >= 2)
3541 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_xfer_shared_libraries called\n");
3542 return gdbarch->core_xfer_shared_libraries (gdbarch, readbuf, offset, len);
3546 set_gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch,
3547 gdbarch_core_xfer_shared_libraries_ftype core_xfer_shared_libraries)
3549 gdbarch->core_xfer_shared_libraries = core_xfer_shared_libraries;
3553 gdbarch_core_xfer_shared_libraries_aix_p (struct gdbarch *gdbarch)
3555 gdb_assert (gdbarch != NULL);
3556 return gdbarch->core_xfer_shared_libraries_aix != NULL;
3560 gdbarch_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len)
3562 gdb_assert (gdbarch != NULL);
3563 gdb_assert (gdbarch->core_xfer_shared_libraries_aix != NULL);
3564 if (gdbarch_debug >= 2)
3565 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_xfer_shared_libraries_aix called\n");
3566 return gdbarch->core_xfer_shared_libraries_aix (gdbarch, readbuf, offset, len);
3570 set_gdbarch_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch,
3571 gdbarch_core_xfer_shared_libraries_aix_ftype core_xfer_shared_libraries_aix)
3573 gdbarch->core_xfer_shared_libraries_aix = core_xfer_shared_libraries_aix;
3577 gdbarch_core_pid_to_str_p (struct gdbarch *gdbarch)
3579 gdb_assert (gdbarch != NULL);
3580 return gdbarch->core_pid_to_str != NULL;
3584 gdbarch_core_pid_to_str (struct gdbarch *gdbarch, ptid_t ptid)
3586 gdb_assert (gdbarch != NULL);
3587 gdb_assert (gdbarch->core_pid_to_str != NULL);
3588 if (gdbarch_debug >= 2)
3589 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_pid_to_str called\n");
3590 return gdbarch->core_pid_to_str (gdbarch, ptid);
3594 set_gdbarch_core_pid_to_str (struct gdbarch *gdbarch,
3595 gdbarch_core_pid_to_str_ftype core_pid_to_str)
3597 gdbarch->core_pid_to_str = core_pid_to_str;
3601 gdbarch_gcore_bfd_target_p (struct gdbarch *gdbarch)
3603 gdb_assert (gdbarch != NULL);
3604 return gdbarch->gcore_bfd_target != 0;
3608 gdbarch_gcore_bfd_target (struct gdbarch *gdbarch)
3610 gdb_assert (gdbarch != NULL);
3611 /* Check variable changed from pre-default. */
3612 gdb_assert (gdbarch->gcore_bfd_target != 0);
3613 if (gdbarch_debug >= 2)
3614 fprintf_unfiltered (gdb_stdlog, "gdbarch_gcore_bfd_target called\n");
3615 return gdbarch->gcore_bfd_target;
3619 set_gdbarch_gcore_bfd_target (struct gdbarch *gdbarch,
3620 const char * gcore_bfd_target)
3622 gdbarch->gcore_bfd_target = gcore_bfd_target;
3626 gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch)
3628 gdb_assert (gdbarch != NULL);
3629 /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
3630 if (gdbarch_debug >= 2)
3631 fprintf_unfiltered (gdb_stdlog, "gdbarch_vtable_function_descriptors called\n");
3632 return gdbarch->vtable_function_descriptors;
3636 set_gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch,
3637 int vtable_function_descriptors)
3639 gdbarch->vtable_function_descriptors = vtable_function_descriptors;
3643 gdbarch_vbit_in_delta (struct gdbarch *gdbarch)
3645 gdb_assert (gdbarch != NULL);
3646 /* Skip verify of vbit_in_delta, invalid_p == 0 */
3647 if (gdbarch_debug >= 2)
3648 fprintf_unfiltered (gdb_stdlog, "gdbarch_vbit_in_delta called\n");
3649 return gdbarch->vbit_in_delta;
3653 set_gdbarch_vbit_in_delta (struct gdbarch *gdbarch,
3656 gdbarch->vbit_in_delta = vbit_in_delta;
3660 gdbarch_skip_permanent_breakpoint_p (struct gdbarch *gdbarch)
3662 gdb_assert (gdbarch != NULL);
3663 return gdbarch->skip_permanent_breakpoint != NULL;
3667 gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch, struct regcache *regcache)
3669 gdb_assert (gdbarch != NULL);
3670 gdb_assert (gdbarch->skip_permanent_breakpoint != NULL);
3671 if (gdbarch_debug >= 2)
3672 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_permanent_breakpoint called\n");
3673 gdbarch->skip_permanent_breakpoint (regcache);
3677 set_gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch,
3678 gdbarch_skip_permanent_breakpoint_ftype skip_permanent_breakpoint)
3680 gdbarch->skip_permanent_breakpoint = skip_permanent_breakpoint;
3684 gdbarch_max_insn_length_p (struct gdbarch *gdbarch)
3686 gdb_assert (gdbarch != NULL);
3687 return gdbarch->max_insn_length != 0;
3691 gdbarch_max_insn_length (struct gdbarch *gdbarch)
3693 gdb_assert (gdbarch != NULL);
3694 /* Check variable changed from pre-default. */
3695 gdb_assert (gdbarch->max_insn_length != 0);
3696 if (gdbarch_debug >= 2)
3697 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_insn_length called\n");
3698 return gdbarch->max_insn_length;
3702 set_gdbarch_max_insn_length (struct gdbarch *gdbarch,
3703 ULONGEST max_insn_length)
3705 gdbarch->max_insn_length = max_insn_length;
3709 gdbarch_displaced_step_copy_insn_p (struct gdbarch *gdbarch)
3711 gdb_assert (gdbarch != NULL);
3712 return gdbarch->displaced_step_copy_insn != NULL;
3715 struct displaced_step_closure *
3716 gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch, CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
3718 gdb_assert (gdbarch != NULL);
3719 gdb_assert (gdbarch->displaced_step_copy_insn != NULL);
3720 if (gdbarch_debug >= 2)
3721 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_copy_insn called\n");
3722 return gdbarch->displaced_step_copy_insn (gdbarch, from, to, regs);
3726 set_gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch,
3727 gdbarch_displaced_step_copy_insn_ftype displaced_step_copy_insn)
3729 gdbarch->displaced_step_copy_insn = displaced_step_copy_insn;
3733 gdbarch_displaced_step_hw_singlestep (struct gdbarch *gdbarch, struct displaced_step_closure *closure)
3735 gdb_assert (gdbarch != NULL);
3736 gdb_assert (gdbarch->displaced_step_hw_singlestep != NULL);
3737 if (gdbarch_debug >= 2)
3738 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_hw_singlestep called\n");
3739 return gdbarch->displaced_step_hw_singlestep (gdbarch, closure);
3743 set_gdbarch_displaced_step_hw_singlestep (struct gdbarch *gdbarch,
3744 gdbarch_displaced_step_hw_singlestep_ftype displaced_step_hw_singlestep)
3746 gdbarch->displaced_step_hw_singlestep = displaced_step_hw_singlestep;
3750 gdbarch_displaced_step_fixup_p (struct gdbarch *gdbarch)
3752 gdb_assert (gdbarch != NULL);
3753 return gdbarch->displaced_step_fixup != NULL;
3757 gdbarch_displaced_step_fixup (struct gdbarch *gdbarch, struct displaced_step_closure *closure, CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
3759 gdb_assert (gdbarch != NULL);
3760 gdb_assert (gdbarch->displaced_step_fixup != NULL);
3761 /* Do not check predicate: gdbarch->displaced_step_fixup != NULL, allow call. */
3762 if (gdbarch_debug >= 2)
3763 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_fixup called\n");
3764 gdbarch->displaced_step_fixup (gdbarch, closure, from, to, regs);
3768 set_gdbarch_displaced_step_fixup (struct gdbarch *gdbarch,
3769 gdbarch_displaced_step_fixup_ftype displaced_step_fixup)
3771 gdbarch->displaced_step_fixup = displaced_step_fixup;
3775 gdbarch_displaced_step_free_closure (struct gdbarch *gdbarch, struct displaced_step_closure *closure)
3777 gdb_assert (gdbarch != NULL);
3778 gdb_assert (gdbarch->displaced_step_free_closure != NULL);
3779 if (gdbarch_debug >= 2)
3780 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_free_closure called\n");
3781 gdbarch->displaced_step_free_closure (gdbarch, closure);
3785 set_gdbarch_displaced_step_free_closure (struct gdbarch *gdbarch,
3786 gdbarch_displaced_step_free_closure_ftype displaced_step_free_closure)
3788 gdbarch->displaced_step_free_closure = displaced_step_free_closure;
3792 gdbarch_displaced_step_location (struct gdbarch *gdbarch)
3794 gdb_assert (gdbarch != NULL);
3795 gdb_assert (gdbarch->displaced_step_location != NULL);
3796 if (gdbarch_debug >= 2)
3797 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_location called\n");
3798 return gdbarch->displaced_step_location (gdbarch);
3802 set_gdbarch_displaced_step_location (struct gdbarch *gdbarch,
3803 gdbarch_displaced_step_location_ftype displaced_step_location)
3805 gdbarch->displaced_step_location = displaced_step_location;
3809 gdbarch_relocate_instruction_p (struct gdbarch *gdbarch)
3811 gdb_assert (gdbarch != NULL);
3812 return gdbarch->relocate_instruction != NULL;
3816 gdbarch_relocate_instruction (struct gdbarch *gdbarch, CORE_ADDR *to, CORE_ADDR from)
3818 gdb_assert (gdbarch != NULL);
3819 gdb_assert (gdbarch->relocate_instruction != NULL);
3820 /* Do not check predicate: gdbarch->relocate_instruction != NULL, allow call. */
3821 if (gdbarch_debug >= 2)
3822 fprintf_unfiltered (gdb_stdlog, "gdbarch_relocate_instruction called\n");
3823 gdbarch->relocate_instruction (gdbarch, to, from);
3827 set_gdbarch_relocate_instruction (struct gdbarch *gdbarch,
3828 gdbarch_relocate_instruction_ftype relocate_instruction)
3830 gdbarch->relocate_instruction = relocate_instruction;
3834 gdbarch_overlay_update_p (struct gdbarch *gdbarch)
3836 gdb_assert (gdbarch != NULL);
3837 return gdbarch->overlay_update != NULL;
3841 gdbarch_overlay_update (struct gdbarch *gdbarch, struct obj_section *osect)
3843 gdb_assert (gdbarch != NULL);
3844 gdb_assert (gdbarch->overlay_update != NULL);
3845 if (gdbarch_debug >= 2)
3846 fprintf_unfiltered (gdb_stdlog, "gdbarch_overlay_update called\n");
3847 gdbarch->overlay_update (osect);
3851 set_gdbarch_overlay_update (struct gdbarch *gdbarch,
3852 gdbarch_overlay_update_ftype overlay_update)
3854 gdbarch->overlay_update = overlay_update;
3858 gdbarch_core_read_description_p (struct gdbarch *gdbarch)
3860 gdb_assert (gdbarch != NULL);
3861 return gdbarch->core_read_description != NULL;
3864 const struct target_desc *
3865 gdbarch_core_read_description (struct gdbarch *gdbarch, struct target_ops *target, bfd *abfd)
3867 gdb_assert (gdbarch != NULL);
3868 gdb_assert (gdbarch->core_read_description != NULL);
3869 if (gdbarch_debug >= 2)
3870 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_read_description called\n");
3871 return gdbarch->core_read_description (gdbarch, target, abfd);
3875 set_gdbarch_core_read_description (struct gdbarch *gdbarch,
3876 gdbarch_core_read_description_ftype core_read_description)
3878 gdbarch->core_read_description = core_read_description;
3882 gdbarch_static_transform_name_p (struct gdbarch *gdbarch)
3884 gdb_assert (gdbarch != NULL);
3885 return gdbarch->static_transform_name != NULL;
3889 gdbarch_static_transform_name (struct gdbarch *gdbarch, const char *name)
3891 gdb_assert (gdbarch != NULL);
3892 gdb_assert (gdbarch->static_transform_name != NULL);
3893 if (gdbarch_debug >= 2)
3894 fprintf_unfiltered (gdb_stdlog, "gdbarch_static_transform_name called\n");
3895 return gdbarch->static_transform_name (name);
3899 set_gdbarch_static_transform_name (struct gdbarch *gdbarch,
3900 gdbarch_static_transform_name_ftype static_transform_name)
3902 gdbarch->static_transform_name = static_transform_name;
3906 gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch)
3908 gdb_assert (gdbarch != NULL);
3909 /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
3910 if (gdbarch_debug >= 2)
3911 fprintf_unfiltered (gdb_stdlog, "gdbarch_sofun_address_maybe_missing called\n");
3912 return gdbarch->sofun_address_maybe_missing;
3916 set_gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch,
3917 int sofun_address_maybe_missing)
3919 gdbarch->sofun_address_maybe_missing = sofun_address_maybe_missing;
3923 gdbarch_process_record_p (struct gdbarch *gdbarch)
3925 gdb_assert (gdbarch != NULL);
3926 return gdbarch->process_record != NULL;
3930 gdbarch_process_record (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR addr)
3932 gdb_assert (gdbarch != NULL);
3933 gdb_assert (gdbarch->process_record != NULL);
3934 if (gdbarch_debug >= 2)
3935 fprintf_unfiltered (gdb_stdlog, "gdbarch_process_record called\n");
3936 return gdbarch->process_record (gdbarch, regcache, addr);
3940 set_gdbarch_process_record (struct gdbarch *gdbarch,
3941 gdbarch_process_record_ftype process_record)
3943 gdbarch->process_record = process_record;
3947 gdbarch_process_record_signal_p (struct gdbarch *gdbarch)
3949 gdb_assert (gdbarch != NULL);
3950 return gdbarch->process_record_signal != NULL;
3954 gdbarch_process_record_signal (struct gdbarch *gdbarch, struct regcache *regcache, enum gdb_signal signal)
3956 gdb_assert (gdbarch != NULL);
3957 gdb_assert (gdbarch->process_record_signal != NULL);
3958 if (gdbarch_debug >= 2)
3959 fprintf_unfiltered (gdb_stdlog, "gdbarch_process_record_signal called\n");
3960 return gdbarch->process_record_signal (gdbarch, regcache, signal);
3964 set_gdbarch_process_record_signal (struct gdbarch *gdbarch,
3965 gdbarch_process_record_signal_ftype process_record_signal)
3967 gdbarch->process_record_signal = process_record_signal;
3971 gdbarch_gdb_signal_from_target_p (struct gdbarch *gdbarch)
3973 gdb_assert (gdbarch != NULL);
3974 return gdbarch->gdb_signal_from_target != NULL;
3978 gdbarch_gdb_signal_from_target (struct gdbarch *gdbarch, int signo)
3980 gdb_assert (gdbarch != NULL);
3981 gdb_assert (gdbarch->gdb_signal_from_target != NULL);
3982 if (gdbarch_debug >= 2)
3983 fprintf_unfiltered (gdb_stdlog, "gdbarch_gdb_signal_from_target called\n");
3984 return gdbarch->gdb_signal_from_target (gdbarch, signo);
3988 set_gdbarch_gdb_signal_from_target (struct gdbarch *gdbarch,
3989 gdbarch_gdb_signal_from_target_ftype gdb_signal_from_target)
3991 gdbarch->gdb_signal_from_target = gdb_signal_from_target;
3995 gdbarch_gdb_signal_to_target_p (struct gdbarch *gdbarch)
3997 gdb_assert (gdbarch != NULL);
3998 return gdbarch->gdb_signal_to_target != NULL;
4002 gdbarch_gdb_signal_to_target (struct gdbarch *gdbarch, enum gdb_signal signal)
4004 gdb_assert (gdbarch != NULL);
4005 gdb_assert (gdbarch->gdb_signal_to_target != NULL);
4006 if (gdbarch_debug >= 2)
4007 fprintf_unfiltered (gdb_stdlog, "gdbarch_gdb_signal_to_target called\n");
4008 return gdbarch->gdb_signal_to_target (gdbarch, signal);
4012 set_gdbarch_gdb_signal_to_target (struct gdbarch *gdbarch,
4013 gdbarch_gdb_signal_to_target_ftype gdb_signal_to_target)
4015 gdbarch->gdb_signal_to_target = gdb_signal_to_target;
4019 gdbarch_get_siginfo_type_p (struct gdbarch *gdbarch)
4021 gdb_assert (gdbarch != NULL);
4022 return gdbarch->get_siginfo_type != NULL;
4026 gdbarch_get_siginfo_type (struct gdbarch *gdbarch)
4028 gdb_assert (gdbarch != NULL);
4029 gdb_assert (gdbarch->get_siginfo_type != NULL);
4030 if (gdbarch_debug >= 2)
4031 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_siginfo_type called\n");
4032 return gdbarch->get_siginfo_type (gdbarch);
4036 set_gdbarch_get_siginfo_type (struct gdbarch *gdbarch,
4037 gdbarch_get_siginfo_type_ftype get_siginfo_type)
4039 gdbarch->get_siginfo_type = get_siginfo_type;
4043 gdbarch_record_special_symbol_p (struct gdbarch *gdbarch)
4045 gdb_assert (gdbarch != NULL);
4046 return gdbarch->record_special_symbol != NULL;
4050 gdbarch_record_special_symbol (struct gdbarch *gdbarch, struct objfile *objfile, asymbol *sym)
4052 gdb_assert (gdbarch != NULL);
4053 gdb_assert (gdbarch->record_special_symbol != NULL);
4054 if (gdbarch_debug >= 2)
4055 fprintf_unfiltered (gdb_stdlog, "gdbarch_record_special_symbol called\n");
4056 gdbarch->record_special_symbol (gdbarch, objfile, sym);
4060 set_gdbarch_record_special_symbol (struct gdbarch *gdbarch,
4061 gdbarch_record_special_symbol_ftype record_special_symbol)
4063 gdbarch->record_special_symbol = record_special_symbol;
4067 gdbarch_get_syscall_number_p (struct gdbarch *gdbarch)
4069 gdb_assert (gdbarch != NULL);
4070 return gdbarch->get_syscall_number != NULL;
4074 gdbarch_get_syscall_number (struct gdbarch *gdbarch, ptid_t ptid)
4076 gdb_assert (gdbarch != NULL);
4077 gdb_assert (gdbarch->get_syscall_number != NULL);
4078 if (gdbarch_debug >= 2)
4079 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_syscall_number called\n");
4080 return gdbarch->get_syscall_number (gdbarch, ptid);
4084 set_gdbarch_get_syscall_number (struct gdbarch *gdbarch,
4085 gdbarch_get_syscall_number_ftype get_syscall_number)
4087 gdbarch->get_syscall_number = get_syscall_number;
4091 gdbarch_stap_integer_prefixes (struct gdbarch *gdbarch)
4093 gdb_assert (gdbarch != NULL);
4094 /* Skip verify of stap_integer_prefixes, invalid_p == 0 */
4095 if (gdbarch_debug >= 2)
4096 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_integer_prefixes called\n");
4097 return gdbarch->stap_integer_prefixes;
4101 set_gdbarch_stap_integer_prefixes (struct gdbarch *gdbarch,
4102 const char *const * stap_integer_prefixes)
4104 gdbarch->stap_integer_prefixes = stap_integer_prefixes;
4108 gdbarch_stap_integer_suffixes (struct gdbarch *gdbarch)
4110 gdb_assert (gdbarch != NULL);
4111 /* Skip verify of stap_integer_suffixes, invalid_p == 0 */
4112 if (gdbarch_debug >= 2)
4113 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_integer_suffixes called\n");
4114 return gdbarch->stap_integer_suffixes;
4118 set_gdbarch_stap_integer_suffixes (struct gdbarch *gdbarch,
4119 const char *const * stap_integer_suffixes)
4121 gdbarch->stap_integer_suffixes = stap_integer_suffixes;
4125 gdbarch_stap_register_prefixes (struct gdbarch *gdbarch)
4127 gdb_assert (gdbarch != NULL);
4128 /* Skip verify of stap_register_prefixes, invalid_p == 0 */
4129 if (gdbarch_debug >= 2)
4130 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_prefixes called\n");
4131 return gdbarch->stap_register_prefixes;
4135 set_gdbarch_stap_register_prefixes (struct gdbarch *gdbarch,
4136 const char *const * stap_register_prefixes)
4138 gdbarch->stap_register_prefixes = stap_register_prefixes;
4142 gdbarch_stap_register_suffixes (struct gdbarch *gdbarch)
4144 gdb_assert (gdbarch != NULL);
4145 /* Skip verify of stap_register_suffixes, invalid_p == 0 */
4146 if (gdbarch_debug >= 2)
4147 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_suffixes called\n");
4148 return gdbarch->stap_register_suffixes;
4152 set_gdbarch_stap_register_suffixes (struct gdbarch *gdbarch,
4153 const char *const * stap_register_suffixes)
4155 gdbarch->stap_register_suffixes = stap_register_suffixes;
4159 gdbarch_stap_register_indirection_prefixes (struct gdbarch *gdbarch)
4161 gdb_assert (gdbarch != NULL);
4162 /* Skip verify of stap_register_indirection_prefixes, invalid_p == 0 */
4163 if (gdbarch_debug >= 2)
4164 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_indirection_prefixes called\n");
4165 return gdbarch->stap_register_indirection_prefixes;
4169 set_gdbarch_stap_register_indirection_prefixes (struct gdbarch *gdbarch,
4170 const char *const * stap_register_indirection_prefixes)
4172 gdbarch->stap_register_indirection_prefixes = stap_register_indirection_prefixes;
4176 gdbarch_stap_register_indirection_suffixes (struct gdbarch *gdbarch)
4178 gdb_assert (gdbarch != NULL);
4179 /* Skip verify of stap_register_indirection_suffixes, invalid_p == 0 */
4180 if (gdbarch_debug >= 2)
4181 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_indirection_suffixes called\n");
4182 return gdbarch->stap_register_indirection_suffixes;
4186 set_gdbarch_stap_register_indirection_suffixes (struct gdbarch *gdbarch,
4187 const char *const * stap_register_indirection_suffixes)
4189 gdbarch->stap_register_indirection_suffixes = stap_register_indirection_suffixes;
4193 gdbarch_stap_gdb_register_prefix (struct gdbarch *gdbarch)
4195 gdb_assert (gdbarch != NULL);
4196 /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */
4197 if (gdbarch_debug >= 2)
4198 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_gdb_register_prefix called\n");
4199 return gdbarch->stap_gdb_register_prefix;
4203 set_gdbarch_stap_gdb_register_prefix (struct gdbarch *gdbarch,
4204 const char * stap_gdb_register_prefix)
4206 gdbarch->stap_gdb_register_prefix = stap_gdb_register_prefix;
4210 gdbarch_stap_gdb_register_suffix (struct gdbarch *gdbarch)
4212 gdb_assert (gdbarch != NULL);
4213 /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */
4214 if (gdbarch_debug >= 2)
4215 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_gdb_register_suffix called\n");
4216 return gdbarch->stap_gdb_register_suffix;
4220 set_gdbarch_stap_gdb_register_suffix (struct gdbarch *gdbarch,
4221 const char * stap_gdb_register_suffix)
4223 gdbarch->stap_gdb_register_suffix = stap_gdb_register_suffix;
4227 gdbarch_stap_is_single_operand_p (struct gdbarch *gdbarch)
4229 gdb_assert (gdbarch != NULL);
4230 return gdbarch->stap_is_single_operand != NULL;
4234 gdbarch_stap_is_single_operand (struct gdbarch *gdbarch, const char *s)
4236 gdb_assert (gdbarch != NULL);
4237 gdb_assert (gdbarch->stap_is_single_operand != NULL);
4238 if (gdbarch_debug >= 2)
4239 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_is_single_operand called\n");
4240 return gdbarch->stap_is_single_operand (gdbarch, s);
4244 set_gdbarch_stap_is_single_operand (struct gdbarch *gdbarch,
4245 gdbarch_stap_is_single_operand_ftype stap_is_single_operand)
4247 gdbarch->stap_is_single_operand = stap_is_single_operand;
4251 gdbarch_stap_parse_special_token_p (struct gdbarch *gdbarch)
4253 gdb_assert (gdbarch != NULL);
4254 return gdbarch->stap_parse_special_token != NULL;
4258 gdbarch_stap_parse_special_token (struct gdbarch *gdbarch, struct stap_parse_info *p)
4260 gdb_assert (gdbarch != NULL);
4261 gdb_assert (gdbarch->stap_parse_special_token != NULL);
4262 if (gdbarch_debug >= 2)
4263 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_parse_special_token called\n");
4264 return gdbarch->stap_parse_special_token (gdbarch, p);
4268 set_gdbarch_stap_parse_special_token (struct gdbarch *gdbarch,
4269 gdbarch_stap_parse_special_token_ftype stap_parse_special_token)
4271 gdbarch->stap_parse_special_token = stap_parse_special_token;
4275 gdbarch_has_global_solist (struct gdbarch *gdbarch)
4277 gdb_assert (gdbarch != NULL);
4278 /* Skip verify of has_global_solist, invalid_p == 0 */
4279 if (gdbarch_debug >= 2)
4280 fprintf_unfiltered (gdb_stdlog, "gdbarch_has_global_solist called\n");
4281 return gdbarch->has_global_solist;
4285 set_gdbarch_has_global_solist (struct gdbarch *gdbarch,
4286 int has_global_solist)
4288 gdbarch->has_global_solist = has_global_solist;
4292 gdbarch_has_global_breakpoints (struct gdbarch *gdbarch)
4294 gdb_assert (gdbarch != NULL);
4295 /* Skip verify of has_global_breakpoints, invalid_p == 0 */
4296 if (gdbarch_debug >= 2)
4297 fprintf_unfiltered (gdb_stdlog, "gdbarch_has_global_breakpoints called\n");
4298 return gdbarch->has_global_breakpoints;
4302 set_gdbarch_has_global_breakpoints (struct gdbarch *gdbarch,
4303 int has_global_breakpoints)
4305 gdbarch->has_global_breakpoints = has_global_breakpoints;
4309 gdbarch_has_shared_address_space (struct gdbarch *gdbarch)
4311 gdb_assert (gdbarch != NULL);
4312 gdb_assert (gdbarch->has_shared_address_space != NULL);
4313 if (gdbarch_debug >= 2)
4314 fprintf_unfiltered (gdb_stdlog, "gdbarch_has_shared_address_space called\n");
4315 return gdbarch->has_shared_address_space (gdbarch);
4319 set_gdbarch_has_shared_address_space (struct gdbarch *gdbarch,
4320 gdbarch_has_shared_address_space_ftype has_shared_address_space)
4322 gdbarch->has_shared_address_space = has_shared_address_space;
4326 gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch, CORE_ADDR addr, int *isize, char **msg)
4328 gdb_assert (gdbarch != NULL);
4329 gdb_assert (gdbarch->fast_tracepoint_valid_at != NULL);
4330 if (gdbarch_debug >= 2)
4331 fprintf_unfiltered (gdb_stdlog, "gdbarch_fast_tracepoint_valid_at called\n");
4332 return gdbarch->fast_tracepoint_valid_at (gdbarch, addr, isize, msg);
4336 set_gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch,
4337 gdbarch_fast_tracepoint_valid_at_ftype fast_tracepoint_valid_at)
4339 gdbarch->fast_tracepoint_valid_at = fast_tracepoint_valid_at;
4343 gdbarch_auto_charset (struct gdbarch *gdbarch)
4345 gdb_assert (gdbarch != NULL);
4346 gdb_assert (gdbarch->auto_charset != NULL);
4347 if (gdbarch_debug >= 2)
4348 fprintf_unfiltered (gdb_stdlog, "gdbarch_auto_charset called\n");
4349 return gdbarch->auto_charset ();
4353 set_gdbarch_auto_charset (struct gdbarch *gdbarch,
4354 gdbarch_auto_charset_ftype auto_charset)
4356 gdbarch->auto_charset = auto_charset;
4360 gdbarch_auto_wide_charset (struct gdbarch *gdbarch)
4362 gdb_assert (gdbarch != NULL);
4363 gdb_assert (gdbarch->auto_wide_charset != NULL);
4364 if (gdbarch_debug >= 2)
4365 fprintf_unfiltered (gdb_stdlog, "gdbarch_auto_wide_charset called\n");
4366 return gdbarch->auto_wide_charset ();
4370 set_gdbarch_auto_wide_charset (struct gdbarch *gdbarch,
4371 gdbarch_auto_wide_charset_ftype auto_wide_charset)
4373 gdbarch->auto_wide_charset = auto_wide_charset;
4377 gdbarch_solib_symbols_extension (struct gdbarch *gdbarch)
4379 gdb_assert (gdbarch != NULL);
4380 if (gdbarch_debug >= 2)
4381 fprintf_unfiltered (gdb_stdlog, "gdbarch_solib_symbols_extension called\n");
4382 return gdbarch->solib_symbols_extension;
4386 set_gdbarch_solib_symbols_extension (struct gdbarch *gdbarch,
4387 const char * solib_symbols_extension)
4389 gdbarch->solib_symbols_extension = solib_symbols_extension;
4393 gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch)
4395 gdb_assert (gdbarch != NULL);
4396 /* Skip verify of has_dos_based_file_system, invalid_p == 0 */
4397 if (gdbarch_debug >= 2)
4398 fprintf_unfiltered (gdb_stdlog, "gdbarch_has_dos_based_file_system called\n");
4399 return gdbarch->has_dos_based_file_system;
4403 set_gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch,
4404 int has_dos_based_file_system)
4406 gdbarch->has_dos_based_file_system = has_dos_based_file_system;
4410 gdbarch_gen_return_address (struct gdbarch *gdbarch, struct agent_expr *ax, struct axs_value *value, CORE_ADDR scope)
4412 gdb_assert (gdbarch != NULL);
4413 gdb_assert (gdbarch->gen_return_address != NULL);
4414 if (gdbarch_debug >= 2)
4415 fprintf_unfiltered (gdb_stdlog, "gdbarch_gen_return_address called\n");
4416 gdbarch->gen_return_address (gdbarch, ax, value, scope);
4420 set_gdbarch_gen_return_address (struct gdbarch *gdbarch,
4421 gdbarch_gen_return_address_ftype gen_return_address)
4423 gdbarch->gen_return_address = gen_return_address;
4427 gdbarch_info_proc_p (struct gdbarch *gdbarch)
4429 gdb_assert (gdbarch != NULL);
4430 return gdbarch->info_proc != NULL;
4434 gdbarch_info_proc (struct gdbarch *gdbarch, char *args, enum info_proc_what what)
4436 gdb_assert (gdbarch != NULL);
4437 gdb_assert (gdbarch->info_proc != NULL);
4438 if (gdbarch_debug >= 2)
4439 fprintf_unfiltered (gdb_stdlog, "gdbarch_info_proc called\n");
4440 gdbarch->info_proc (gdbarch, args, what);
4444 set_gdbarch_info_proc (struct gdbarch *gdbarch,
4445 gdbarch_info_proc_ftype info_proc)
4447 gdbarch->info_proc = info_proc;
4451 gdbarch_core_info_proc_p (struct gdbarch *gdbarch)
4453 gdb_assert (gdbarch != NULL);
4454 return gdbarch->core_info_proc != NULL;
4458 gdbarch_core_info_proc (struct gdbarch *gdbarch, char *args, enum info_proc_what what)
4460 gdb_assert (gdbarch != NULL);
4461 gdb_assert (gdbarch->core_info_proc != NULL);
4462 if (gdbarch_debug >= 2)
4463 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_info_proc called\n");
4464 gdbarch->core_info_proc (gdbarch, args, what);
4468 set_gdbarch_core_info_proc (struct gdbarch *gdbarch,
4469 gdbarch_core_info_proc_ftype core_info_proc)
4471 gdbarch->core_info_proc = core_info_proc;
4475 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)
4477 gdb_assert (gdbarch != NULL);
4478 gdb_assert (gdbarch->iterate_over_objfiles_in_search_order != NULL);
4479 if (gdbarch_debug >= 2)
4480 fprintf_unfiltered (gdb_stdlog, "gdbarch_iterate_over_objfiles_in_search_order called\n");
4481 gdbarch->iterate_over_objfiles_in_search_order (gdbarch, cb, cb_data, current_objfile);
4485 set_gdbarch_iterate_over_objfiles_in_search_order (struct gdbarch *gdbarch,
4486 gdbarch_iterate_over_objfiles_in_search_order_ftype iterate_over_objfiles_in_search_order)
4488 gdbarch->iterate_over_objfiles_in_search_order = iterate_over_objfiles_in_search_order;
4491 struct ravenscar_arch_ops *
4492 gdbarch_ravenscar_ops (struct gdbarch *gdbarch)
4494 gdb_assert (gdbarch != NULL);
4495 /* Skip verify of ravenscar_ops, invalid_p == 0 */
4496 if (gdbarch_debug >= 2)
4497 fprintf_unfiltered (gdb_stdlog, "gdbarch_ravenscar_ops called\n");
4498 return gdbarch->ravenscar_ops;
4502 set_gdbarch_ravenscar_ops (struct gdbarch *gdbarch,
4503 struct ravenscar_arch_ops * ravenscar_ops)
4505 gdbarch->ravenscar_ops = ravenscar_ops;
4509 gdbarch_insn_is_call (struct gdbarch *gdbarch, CORE_ADDR addr)
4511 gdb_assert (gdbarch != NULL);
4512 gdb_assert (gdbarch->insn_is_call != NULL);
4513 if (gdbarch_debug >= 2)
4514 fprintf_unfiltered (gdb_stdlog, "gdbarch_insn_is_call called\n");
4515 return gdbarch->insn_is_call (gdbarch, addr);
4519 set_gdbarch_insn_is_call (struct gdbarch *gdbarch,
4520 gdbarch_insn_is_call_ftype insn_is_call)
4522 gdbarch->insn_is_call = insn_is_call;
4526 gdbarch_insn_is_ret (struct gdbarch *gdbarch, CORE_ADDR addr)
4528 gdb_assert (gdbarch != NULL);
4529 gdb_assert (gdbarch->insn_is_ret != NULL);
4530 if (gdbarch_debug >= 2)
4531 fprintf_unfiltered (gdb_stdlog, "gdbarch_insn_is_ret called\n");
4532 return gdbarch->insn_is_ret (gdbarch, addr);
4536 set_gdbarch_insn_is_ret (struct gdbarch *gdbarch,
4537 gdbarch_insn_is_ret_ftype insn_is_ret)
4539 gdbarch->insn_is_ret = insn_is_ret;
4543 gdbarch_insn_is_jump (struct gdbarch *gdbarch, CORE_ADDR addr)
4545 gdb_assert (gdbarch != NULL);
4546 gdb_assert (gdbarch->insn_is_jump != NULL);
4547 if (gdbarch_debug >= 2)
4548 fprintf_unfiltered (gdb_stdlog, "gdbarch_insn_is_jump called\n");
4549 return gdbarch->insn_is_jump (gdbarch, addr);
4553 set_gdbarch_insn_is_jump (struct gdbarch *gdbarch,
4554 gdbarch_insn_is_jump_ftype insn_is_jump)
4556 gdbarch->insn_is_jump = insn_is_jump;
4560 /* Keep a registry of per-architecture data-pointers required by GDB
4567 gdbarch_data_pre_init_ftype *pre_init;
4568 gdbarch_data_post_init_ftype *post_init;
4571 struct gdbarch_data_registration
4573 struct gdbarch_data *data;
4574 struct gdbarch_data_registration *next;
4577 struct gdbarch_data_registry
4580 struct gdbarch_data_registration *registrations;
4583 struct gdbarch_data_registry gdbarch_data_registry =
4588 static struct gdbarch_data *
4589 gdbarch_data_register (gdbarch_data_pre_init_ftype *pre_init,
4590 gdbarch_data_post_init_ftype *post_init)
4592 struct gdbarch_data_registration **curr;
4594 /* Append the new registration. */
4595 for (curr = &gdbarch_data_registry.registrations;
4597 curr = &(*curr)->next);
4598 (*curr) = XNEW (struct gdbarch_data_registration);
4599 (*curr)->next = NULL;
4600 (*curr)->data = XNEW (struct gdbarch_data);
4601 (*curr)->data->index = gdbarch_data_registry.nr++;
4602 (*curr)->data->pre_init = pre_init;
4603 (*curr)->data->post_init = post_init;
4604 (*curr)->data->init_p = 1;
4605 return (*curr)->data;
4608 struct gdbarch_data *
4609 gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype *pre_init)
4611 return gdbarch_data_register (pre_init, NULL);
4614 struct gdbarch_data *
4615 gdbarch_data_register_post_init (gdbarch_data_post_init_ftype *post_init)
4617 return gdbarch_data_register (NULL, post_init);
4620 /* Create/delete the gdbarch data vector. */
4623 alloc_gdbarch_data (struct gdbarch *gdbarch)
4625 gdb_assert (gdbarch->data == NULL);
4626 gdbarch->nr_data = gdbarch_data_registry.nr;
4627 gdbarch->data = GDBARCH_OBSTACK_CALLOC (gdbarch, gdbarch->nr_data, void *);
4630 /* Initialize the current value of the specified per-architecture
4634 deprecated_set_gdbarch_data (struct gdbarch *gdbarch,
4635 struct gdbarch_data *data,
4638 gdb_assert (data->index < gdbarch->nr_data);
4639 gdb_assert (gdbarch->data[data->index] == NULL);
4640 gdb_assert (data->pre_init == NULL);
4641 gdbarch->data[data->index] = pointer;
4644 /* Return the current value of the specified per-architecture
4648 gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
4650 gdb_assert (data->index < gdbarch->nr_data);
4651 if (gdbarch->data[data->index] == NULL)
4653 /* The data-pointer isn't initialized, call init() to get a
4655 if (data->pre_init != NULL)
4656 /* Mid architecture creation: pass just the obstack, and not
4657 the entire architecture, as that way it isn't possible for
4658 pre-init code to refer to undefined architecture
4660 gdbarch->data[data->index] = data->pre_init (gdbarch->obstack);
4661 else if (gdbarch->initialized_p
4662 && data->post_init != NULL)
4663 /* Post architecture creation: pass the entire architecture
4664 (as all fields are valid), but be careful to also detect
4665 recursive references. */
4667 gdb_assert (data->init_p);
4669 gdbarch->data[data->index] = data->post_init (gdbarch);
4673 /* The architecture initialization hasn't completed - punt -
4674 hope that the caller knows what they are doing. Once
4675 deprecated_set_gdbarch_data has been initialized, this can be
4676 changed to an internal error. */
4678 gdb_assert (gdbarch->data[data->index] != NULL);
4680 return gdbarch->data[data->index];
4684 /* Keep a registry of the architectures known by GDB. */
4686 struct gdbarch_registration
4688 enum bfd_architecture bfd_architecture;
4689 gdbarch_init_ftype *init;
4690 gdbarch_dump_tdep_ftype *dump_tdep;
4691 struct gdbarch_list *arches;
4692 struct gdbarch_registration *next;
4695 static struct gdbarch_registration *gdbarch_registry = NULL;
4698 append_name (const char ***buf, int *nr, const char *name)
4700 *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
4706 gdbarch_printable_names (void)
4708 /* Accumulate a list of names based on the registed list of
4711 const char **arches = NULL;
4712 struct gdbarch_registration *rego;
4714 for (rego = gdbarch_registry;
4718 const struct bfd_arch_info *ap;
4719 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
4721 internal_error (__FILE__, __LINE__,
4722 _("gdbarch_architecture_names: multi-arch unknown"));
4725 append_name (&arches, &nr_arches, ap->printable_name);
4730 append_name (&arches, &nr_arches, NULL);
4736 gdbarch_register (enum bfd_architecture bfd_architecture,
4737 gdbarch_init_ftype *init,
4738 gdbarch_dump_tdep_ftype *dump_tdep)
4740 struct gdbarch_registration **curr;
4741 const struct bfd_arch_info *bfd_arch_info;
4743 /* Check that BFD recognizes this architecture */
4744 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
4745 if (bfd_arch_info == NULL)
4747 internal_error (__FILE__, __LINE__,
4748 _("gdbarch: Attempt to register "
4749 "unknown architecture (%d)"),
4752 /* Check that we haven't seen this architecture before. */
4753 for (curr = &gdbarch_registry;
4755 curr = &(*curr)->next)
4757 if (bfd_architecture == (*curr)->bfd_architecture)
4758 internal_error (__FILE__, __LINE__,
4759 _("gdbarch: Duplicate registration "
4760 "of architecture (%s)"),
4761 bfd_arch_info->printable_name);
4765 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, %s)\n",
4766 bfd_arch_info->printable_name,
4767 host_address_to_string (init));
4769 (*curr) = XNEW (struct gdbarch_registration);
4770 (*curr)->bfd_architecture = bfd_architecture;
4771 (*curr)->init = init;
4772 (*curr)->dump_tdep = dump_tdep;
4773 (*curr)->arches = NULL;
4774 (*curr)->next = NULL;
4778 register_gdbarch_init (enum bfd_architecture bfd_architecture,
4779 gdbarch_init_ftype *init)
4781 gdbarch_register (bfd_architecture, init, NULL);
4785 /* Look for an architecture using gdbarch_info. */
4787 struct gdbarch_list *
4788 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
4789 const struct gdbarch_info *info)
4791 for (; arches != NULL; arches = arches->next)
4793 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
4795 if (info->byte_order != arches->gdbarch->byte_order)
4797 if (info->osabi != arches->gdbarch->osabi)
4799 if (info->target_desc != arches->gdbarch->target_desc)
4807 /* Find an architecture that matches the specified INFO. Create a new
4808 architecture if needed. Return that new architecture. */
4811 gdbarch_find_by_info (struct gdbarch_info info)
4813 struct gdbarch *new_gdbarch;
4814 struct gdbarch_registration *rego;
4816 /* Fill in missing parts of the INFO struct using a number of
4817 sources: "set ..."; INFOabfd supplied; and the global
4819 gdbarch_info_fill (&info);
4821 /* Must have found some sort of architecture. */
4822 gdb_assert (info.bfd_arch_info != NULL);
4826 fprintf_unfiltered (gdb_stdlog,
4827 "gdbarch_find_by_info: info.bfd_arch_info %s\n",
4828 (info.bfd_arch_info != NULL
4829 ? info.bfd_arch_info->printable_name
4831 fprintf_unfiltered (gdb_stdlog,
4832 "gdbarch_find_by_info: info.byte_order %d (%s)\n",
4834 (info.byte_order == BFD_ENDIAN_BIG ? "big"
4835 : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
4837 fprintf_unfiltered (gdb_stdlog,
4838 "gdbarch_find_by_info: info.osabi %d (%s)\n",
4839 info.osabi, gdbarch_osabi_name (info.osabi));
4840 fprintf_unfiltered (gdb_stdlog,
4841 "gdbarch_find_by_info: info.abfd %s\n",
4842 host_address_to_string (info.abfd));
4843 fprintf_unfiltered (gdb_stdlog,
4844 "gdbarch_find_by_info: info.tdep_info %s\n",
4845 host_address_to_string (info.tdep_info));
4848 /* Find the tdep code that knows about this architecture. */
4849 for (rego = gdbarch_registry;
4852 if (rego->bfd_architecture == info.bfd_arch_info->arch)
4857 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
4858 "No matching architecture\n");
4862 /* Ask the tdep code for an architecture that matches "info". */
4863 new_gdbarch = rego->init (info, rego->arches);
4865 /* Did the tdep code like it? No. Reject the change and revert to
4866 the old architecture. */
4867 if (new_gdbarch == NULL)
4870 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
4871 "Target rejected architecture\n");
4875 /* Is this a pre-existing architecture (as determined by already
4876 being initialized)? Move it to the front of the architecture
4877 list (keeping the list sorted Most Recently Used). */
4878 if (new_gdbarch->initialized_p)
4880 struct gdbarch_list **list;
4881 struct gdbarch_list *this;
4883 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
4884 "Previous architecture %s (%s) selected\n",
4885 host_address_to_string (new_gdbarch),
4886 new_gdbarch->bfd_arch_info->printable_name);
4887 /* Find the existing arch in the list. */
4888 for (list = ®o->arches;
4889 (*list) != NULL && (*list)->gdbarch != new_gdbarch;
4890 list = &(*list)->next);
4891 /* It had better be in the list of architectures. */
4892 gdb_assert ((*list) != NULL && (*list)->gdbarch == new_gdbarch);
4895 (*list) = this->next;
4896 /* Insert THIS at the front. */
4897 this->next = rego->arches;
4898 rego->arches = this;
4903 /* It's a new architecture. */
4905 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
4906 "New architecture %s (%s) selected\n",
4907 host_address_to_string (new_gdbarch),
4908 new_gdbarch->bfd_arch_info->printable_name);
4910 /* Insert the new architecture into the front of the architecture
4911 list (keep the list sorted Most Recently Used). */
4913 struct gdbarch_list *this = XNEW (struct gdbarch_list);
4914 this->next = rego->arches;
4915 this->gdbarch = new_gdbarch;
4916 rego->arches = this;
4919 /* Check that the newly installed architecture is valid. Plug in
4920 any post init values. */
4921 new_gdbarch->dump_tdep = rego->dump_tdep;
4922 verify_gdbarch (new_gdbarch);
4923 new_gdbarch->initialized_p = 1;
4926 gdbarch_dump (new_gdbarch, gdb_stdlog);
4931 /* Make the specified architecture current. */
4934 set_target_gdbarch (struct gdbarch *new_gdbarch)
4936 gdb_assert (new_gdbarch != NULL);
4937 gdb_assert (new_gdbarch->initialized_p);
4938 current_inferior ()->gdbarch = new_gdbarch;
4939 observer_notify_architecture_changed (new_gdbarch);
4940 registers_changed ();
4943 /* Return the current inferior's arch. */
4946 target_gdbarch (void)
4948 return current_inferior ()->gdbarch;
4951 extern void _initialize_gdbarch (void);
4954 _initialize_gdbarch (void)
4956 add_setshow_zuinteger_cmd ("arch", class_maintenance, &gdbarch_debug, _("\
4957 Set architecture debugging."), _("\
4958 Show architecture debugging."), _("\
4959 When non-zero, architecture debugging is enabled."),
4962 &setdebuglist, &showdebuglist);