| Index: gdb/gdbarch.c
|
| diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
|
| index f3d81a163c1ece92407adf8cbefcb3a61ff22fc8..fb3595f912942580e1fc2898dafcd12debf1997d 100644
|
| --- a/gdb/gdbarch.c
|
| +++ b/gdb/gdbarch.c
|
| @@ -1,9 +1,9 @@
|
| -/* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
|
| +/* *INDENT-OFF* */ /* THIS FILE IS GENERATED -*- buffer-read-only: t -*- */
|
| +/* vi:set ro: */
|
|
|
| /* Dynamic architecture support for GDB, the GNU debugger.
|
|
|
| - Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
|
| - 2007, 2008, 2009 Free Software Foundation, Inc.
|
| + Copyright (C) 1998-2013 Free Software Foundation, Inc.
|
|
|
| This file is part of GDB.
|
|
|
| @@ -43,7 +43,7 @@
|
| #include "floatformat.h"
|
|
|
| #include "gdb_assert.h"
|
| -#include "gdb_string.h"
|
| +#include <string.h>
|
| #include "reggroups.h"
|
| #include "osabi.h"
|
| #include "gdb_obstack.h"
|
| @@ -60,7 +60,7 @@ static void alloc_gdbarch_data (struct gdbarch *);
|
| #ifndef GDBARCH_DEBUG
|
| #define GDBARCH_DEBUG 0
|
| #endif
|
| -int gdbarch_debug = GDBARCH_DEBUG;
|
| +unsigned int gdbarch_debug = GDBARCH_DEBUG;
|
| static void
|
| show_gdbarch_debug (struct ui_file *file, int from_tty,
|
| struct cmd_list_element *c, const char *value)
|
| @@ -112,9 +112,6 @@ struct gdbarch
|
| unsigned nr_data;
|
| void **data;
|
|
|
| - /* per-architecture swap-regions. */
|
| - struct gdbarch_swap *swap;
|
| -
|
| /* Multi-arch values.
|
|
|
| When extending this structure you must:
|
| @@ -222,7 +219,6 @@ struct gdbarch
|
| int frame_red_zone_size;
|
| gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
|
| gdbarch_addr_bits_remove_ftype *addr_bits_remove;
|
| - gdbarch_smash_text_address_ftype *smash_text_address;
|
| gdbarch_software_single_step_ftype *software_single_step;
|
| gdbarch_single_step_through_delay_ftype *single_step_through_delay;
|
| gdbarch_print_insn_ftype *print_insn;
|
| @@ -242,8 +238,10 @@ struct gdbarch
|
| gdbarch_regset_from_core_section_ftype *regset_from_core_section;
|
| struct core_regset_section * core_regset_sections;
|
| gdbarch_make_corefile_notes_ftype *make_corefile_notes;
|
| + gdbarch_elfcore_write_linux_prpsinfo_ftype *elfcore_write_linux_prpsinfo;
|
| gdbarch_find_memory_regions_ftype *find_memory_regions;
|
| gdbarch_core_xfer_shared_libraries_ftype *core_xfer_shared_libraries;
|
| + gdbarch_core_xfer_shared_libraries_aix_ftype *core_xfer_shared_libraries_aix;
|
| gdbarch_core_pid_to_str_ftype *core_pid_to_str;
|
| const char * gcore_bfd_target;
|
| int vtable_function_descriptors;
|
| @@ -263,6 +261,7 @@ struct gdbarch
|
| gdbarch_process_record_ftype *process_record;
|
| gdbarch_process_record_signal_ftype *process_record_signal;
|
| gdbarch_gdb_signal_from_target_ftype *gdb_signal_from_target;
|
| + gdbarch_gdb_signal_to_target_ftype *gdb_signal_to_target;
|
| gdbarch_get_siginfo_type_ftype *get_siginfo_type;
|
| gdbarch_record_special_symbol_ftype *record_special_symbol;
|
| gdbarch_get_syscall_number_ftype *get_syscall_number;
|
| @@ -286,7 +285,9 @@ struct gdbarch
|
| int has_dos_based_file_system;
|
| gdbarch_gen_return_address_ftype *gen_return_address;
|
| gdbarch_info_proc_ftype *info_proc;
|
| + gdbarch_core_info_proc_ftype *core_info_proc;
|
| gdbarch_iterate_over_objfiles_in_search_order_ftype *iterate_over_objfiles_in_search_order;
|
| + struct ravenscar_arch_ops * ravenscar_ops;
|
| };
|
|
|
|
|
| @@ -307,8 +308,8 @@ struct gdbarch startup_gdbarch =
|
| 0, /* target_desc */
|
| /* target specific vector and its dump routine. */
|
| NULL, NULL,
|
| - /*per-architecture data-pointers and swap regions. */
|
| - 0, NULL, NULL,
|
| + /*per-architecture data-pointers. */
|
| + 0, NULL,
|
| /* Multi-arch values */
|
| 1, /* bits_big_endian */
|
| 8 * sizeof (short), /* short_bit */
|
| @@ -391,7 +392,6 @@ struct gdbarch startup_gdbarch =
|
| 0, /* frame_red_zone_size */
|
| convert_from_func_ptr_addr_identity, /* convert_from_func_ptr_addr */
|
| core_addr_identity, /* addr_bits_remove */
|
| - core_addr_identity, /* smash_text_address */
|
| 0, /* software_single_step */
|
| 0, /* single_step_through_delay */
|
| 0, /* print_insn */
|
| @@ -411,8 +411,10 @@ struct gdbarch startup_gdbarch =
|
| 0, /* regset_from_core_section */
|
| 0, /* core_regset_sections */
|
| 0, /* make_corefile_notes */
|
| + 0, /* elfcore_write_linux_prpsinfo */
|
| 0, /* find_memory_regions */
|
| 0, /* core_xfer_shared_libraries */
|
| + 0, /* core_xfer_shared_libraries_aix */
|
| 0, /* core_pid_to_str */
|
| 0, /* gcore_bfd_target */
|
| 0, /* vtable_function_descriptors */
|
| @@ -432,6 +434,7 @@ struct gdbarch startup_gdbarch =
|
| 0, /* process_record */
|
| 0, /* process_record_signal */
|
| 0, /* gdb_signal_from_target */
|
| + 0, /* gdb_signal_to_target */
|
| 0, /* get_siginfo_type */
|
| 0, /* record_special_symbol */
|
| 0, /* get_syscall_number */
|
| @@ -455,11 +458,12 @@ struct gdbarch startup_gdbarch =
|
| 0, /* has_dos_based_file_system */
|
| default_gen_return_address, /* gen_return_address */
|
| 0, /* info_proc */
|
| + 0, /* core_info_proc */
|
| default_iterate_over_objfiles_in_search_order, /* iterate_over_objfiles_in_search_order */
|
| + NULL, /* ravenscar_ops */
|
| /* startup_gdbarch() */
|
| };
|
|
|
| -struct gdbarch *target_gdbarch = &startup_gdbarch;
|
|
|
| /* Create a new ``struct gdbarch'' based on information provided by
|
| ``struct gdbarch_info''. */
|
| @@ -529,7 +533,6 @@ gdbarch_alloc (const struct gdbarch_info *info,
|
| gdbarch->stabs_argument_has_addr = default_stabs_argument_has_addr;
|
| gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr_identity;
|
| gdbarch->addr_bits_remove = core_addr_identity;
|
| - gdbarch->smash_text_address = core_addr_identity;
|
| gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
|
| gdbarch->skip_solib_resolver = generic_skip_solib_resolver;
|
| gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
|
| @@ -548,6 +551,7 @@ gdbarch_alloc (const struct gdbarch_info *info,
|
| gdbarch->auto_wide_charset = default_auto_wide_charset;
|
| gdbarch->gen_return_address = default_gen_return_address;
|
| gdbarch->iterate_over_objfiles_in_search_order = default_iterate_over_objfiles_in_search_order;
|
| + gdbarch->ravenscar_ops = NULL;
|
| /* gdbarch_alloc() */
|
|
|
| return gdbarch;
|
| @@ -692,7 +696,6 @@ verify_gdbarch (struct gdbarch *gdbarch)
|
| /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
|
| /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
|
| /* Skip verify of addr_bits_remove, invalid_p == 0 */
|
| - /* Skip verify of smash_text_address, invalid_p == 0 */
|
| /* Skip verify of software_single_step, has predicate. */
|
| /* Skip verify of single_step_through_delay, has predicate. */
|
| if (gdbarch->print_insn == 0)
|
| @@ -712,8 +715,10 @@ verify_gdbarch (struct gdbarch *gdbarch)
|
| /* Skip verify of fetch_pointer_argument, has predicate. */
|
| /* Skip verify of regset_from_core_section, has predicate. */
|
| /* Skip verify of make_corefile_notes, has predicate. */
|
| + /* Skip verify of elfcore_write_linux_prpsinfo, has predicate. */
|
| /* Skip verify of find_memory_regions, has predicate. */
|
| /* Skip verify of core_xfer_shared_libraries, has predicate. */
|
| + /* Skip verify of core_xfer_shared_libraries_aix, has predicate. */
|
| /* Skip verify of core_pid_to_str, has predicate. */
|
| /* Skip verify of gcore_bfd_target, has predicate. */
|
| /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
|
| @@ -735,6 +740,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
|
| /* Skip verify of process_record, has predicate. */
|
| /* Skip verify of process_record_signal, has predicate. */
|
| /* Skip verify of gdb_signal_from_target, has predicate. */
|
| + /* Skip verify of gdb_signal_to_target, has predicate. */
|
| /* Skip verify of get_siginfo_type, has predicate. */
|
| /* Skip verify of record_special_symbol, has predicate. */
|
| /* Skip verify of get_syscall_number, has predicate. */
|
| @@ -757,7 +763,9 @@ verify_gdbarch (struct gdbarch *gdbarch)
|
| /* Skip verify of has_dos_based_file_system, invalid_p == 0 */
|
| /* Skip verify of gen_return_address, invalid_p == 0 */
|
| /* Skip verify of info_proc, has predicate. */
|
| + /* Skip verify of core_info_proc, has predicate. */
|
| /* Skip verify of iterate_over_objfiles_in_search_order, invalid_p == 0 */
|
| + /* Skip verify of ravenscar_ops, invalid_p == 0 */
|
| buf = ui_file_xstrdup (log, &length);
|
| make_cleanup (xfree, buf);
|
| if (length > 0)
|
| @@ -875,6 +883,12 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
|
| "gdbarch_dump: convert_register_p = <%s>\n",
|
| host_address_to_string (gdbarch->convert_register_p));
|
| fprintf_unfiltered (file,
|
| + "gdbarch_dump: gdbarch_core_info_proc_p() = %d\n",
|
| + gdbarch_core_info_proc_p (gdbarch));
|
| + fprintf_unfiltered (file,
|
| + "gdbarch_dump: core_info_proc = <%s>\n",
|
| + host_address_to_string (gdbarch->core_info_proc));
|
| + fprintf_unfiltered (file,
|
| "gdbarch_dump: gdbarch_core_pid_to_str_p() = %d\n",
|
| gdbarch_core_pid_to_str_p (gdbarch));
|
| fprintf_unfiltered (file,
|
| @@ -896,6 +910,12 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
|
| "gdbarch_dump: core_xfer_shared_libraries = <%s>\n",
|
| host_address_to_string (gdbarch->core_xfer_shared_libraries));
|
| fprintf_unfiltered (file,
|
| + "gdbarch_dump: gdbarch_core_xfer_shared_libraries_aix_p() = %d\n",
|
| + gdbarch_core_xfer_shared_libraries_aix_p (gdbarch));
|
| + fprintf_unfiltered (file,
|
| + "gdbarch_dump: core_xfer_shared_libraries_aix = <%s>\n",
|
| + host_address_to_string (gdbarch->core_xfer_shared_libraries_aix));
|
| + fprintf_unfiltered (file,
|
| "gdbarch_dump: decr_pc_after_break = %s\n",
|
| core_addr_to_string_nz (gdbarch->decr_pc_after_break));
|
| fprintf_unfiltered (file,
|
| @@ -950,6 +970,12 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
|
| "gdbarch_dump: elf_make_msymbol_special = <%s>\n",
|
| host_address_to_string (gdbarch->elf_make_msymbol_special));
|
| fprintf_unfiltered (file,
|
| + "gdbarch_dump: gdbarch_elfcore_write_linux_prpsinfo_p() = %d\n",
|
| + gdbarch_elfcore_write_linux_prpsinfo_p (gdbarch));
|
| + fprintf_unfiltered (file,
|
| + "gdbarch_dump: elfcore_write_linux_prpsinfo = <%s>\n",
|
| + host_address_to_string (gdbarch->elfcore_write_linux_prpsinfo));
|
| + fprintf_unfiltered (file,
|
| "gdbarch_dump: fast_tracepoint_valid_at = <%s>\n",
|
| host_address_to_string (gdbarch->fast_tracepoint_valid_at));
|
| fprintf_unfiltered (file,
|
| @@ -1010,6 +1036,12 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
|
| "gdbarch_dump: gdb_signal_from_target = <%s>\n",
|
| host_address_to_string (gdbarch->gdb_signal_from_target));
|
| fprintf_unfiltered (file,
|
| + "gdbarch_dump: gdbarch_gdb_signal_to_target_p() = %d\n",
|
| + gdbarch_gdb_signal_to_target_p (gdbarch));
|
| + fprintf_unfiltered (file,
|
| + "gdbarch_dump: gdb_signal_to_target = <%s>\n",
|
| + host_address_to_string (gdbarch->gdb_signal_to_target));
|
| + fprintf_unfiltered (file,
|
| "gdbarch_dump: gen_return_address = <%s>\n",
|
| host_address_to_string (gdbarch->gen_return_address));
|
| fprintf_unfiltered (file,
|
| @@ -1199,6 +1231,9 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
|
| "gdbarch_dump: push_dummy_code = <%s>\n",
|
| host_address_to_string (gdbarch->push_dummy_code));
|
| fprintf_unfiltered (file,
|
| + "gdbarch_dump: ravenscar_ops = %s\n",
|
| + host_address_to_string (gdbarch->ravenscar_ops));
|
| + fprintf_unfiltered (file,
|
| "gdbarch_dump: gdbarch_read_pc_p() = %d\n",
|
| gdbarch_read_pc_p (gdbarch));
|
| fprintf_unfiltered (file,
|
| @@ -1289,9 +1324,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
|
| "gdbarch_dump: skip_trampoline_code = <%s>\n",
|
| host_address_to_string (gdbarch->skip_trampoline_code));
|
| fprintf_unfiltered (file,
|
| - "gdbarch_dump: smash_text_address = <%s>\n",
|
| - host_address_to_string (gdbarch->smash_text_address));
|
| - fprintf_unfiltered (file,
|
| "gdbarch_dump: gdbarch_software_single_step_p() = %d\n",
|
| gdbarch_software_single_step_p (gdbarch));
|
| fprintf_unfiltered (file,
|
| @@ -1314,16 +1346,16 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
|
| host_address_to_string (gdbarch->stabs_argument_has_addr));
|
| fprintf_unfiltered (file,
|
| "gdbarch_dump: stap_gdb_register_prefix = %s\n",
|
| - gdbarch->stap_gdb_register_prefix);
|
| + pstring (gdbarch->stap_gdb_register_prefix));
|
| fprintf_unfiltered (file,
|
| "gdbarch_dump: stap_gdb_register_suffix = %s\n",
|
| - gdbarch->stap_gdb_register_suffix);
|
| + pstring (gdbarch->stap_gdb_register_suffix));
|
| fprintf_unfiltered (file,
|
| "gdbarch_dump: stap_integer_prefix = %s\n",
|
| - gdbarch->stap_integer_prefix);
|
| + pstring (gdbarch->stap_integer_prefix));
|
| fprintf_unfiltered (file,
|
| "gdbarch_dump: stap_integer_suffix = %s\n",
|
| - gdbarch->stap_integer_suffix);
|
| + pstring (gdbarch->stap_integer_suffix));
|
| fprintf_unfiltered (file,
|
| "gdbarch_dump: gdbarch_stap_is_single_operand_p() = %d\n",
|
| gdbarch_stap_is_single_operand_p (gdbarch));
|
| @@ -1338,16 +1370,16 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
|
| host_address_to_string (gdbarch->stap_parse_special_token));
|
| fprintf_unfiltered (file,
|
| "gdbarch_dump: stap_register_indirection_prefix = %s\n",
|
| - gdbarch->stap_register_indirection_prefix);
|
| + pstring (gdbarch->stap_register_indirection_prefix));
|
| fprintf_unfiltered (file,
|
| "gdbarch_dump: stap_register_indirection_suffix = %s\n",
|
| - gdbarch->stap_register_indirection_suffix);
|
| + pstring (gdbarch->stap_register_indirection_suffix));
|
| fprintf_unfiltered (file,
|
| "gdbarch_dump: stap_register_prefix = %s\n",
|
| - gdbarch->stap_register_prefix);
|
| + pstring (gdbarch->stap_register_prefix));
|
| fprintf_unfiltered (file,
|
| "gdbarch_dump: stap_register_suffix = %s\n",
|
| - gdbarch->stap_register_suffix);
|
| + pstring (gdbarch->stap_register_suffix));
|
| fprintf_unfiltered (file,
|
| "gdbarch_dump: gdbarch_static_transform_name_p() = %d\n",
|
| gdbarch_static_transform_name_p (gdbarch));
|
| @@ -2984,23 +3016,6 @@ set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
|
| gdbarch->addr_bits_remove = addr_bits_remove;
|
| }
|
|
|
| -CORE_ADDR
|
| -gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr)
|
| -{
|
| - gdb_assert (gdbarch != NULL);
|
| - gdb_assert (gdbarch->smash_text_address != NULL);
|
| - if (gdbarch_debug >= 2)
|
| - fprintf_unfiltered (gdb_stdlog, "gdbarch_smash_text_address called\n");
|
| - return gdbarch->smash_text_address (gdbarch, addr);
|
| -}
|
| -
|
| -void
|
| -set_gdbarch_smash_text_address (struct gdbarch *gdbarch,
|
| - gdbarch_smash_text_address_ftype smash_text_address)
|
| -{
|
| - gdbarch->smash_text_address = smash_text_address;
|
| -}
|
| -
|
| int
|
| gdbarch_software_single_step_p (struct gdbarch *gdbarch)
|
| {
|
| @@ -3380,6 +3395,30 @@ set_gdbarch_make_corefile_notes (struct gdbarch *gdbarch,
|
| }
|
|
|
| int
|
| +gdbarch_elfcore_write_linux_prpsinfo_p (struct gdbarch *gdbarch)
|
| +{
|
| + gdb_assert (gdbarch != NULL);
|
| + return gdbarch->elfcore_write_linux_prpsinfo != NULL;
|
| +}
|
| +
|
| +char *
|
| +gdbarch_elfcore_write_linux_prpsinfo (struct gdbarch *gdbarch, bfd *obfd, char *note_data, int *note_size, const struct elf_internal_linux_prpsinfo *info)
|
| +{
|
| + gdb_assert (gdbarch != NULL);
|
| + gdb_assert (gdbarch->elfcore_write_linux_prpsinfo != NULL);
|
| + if (gdbarch_debug >= 2)
|
| + fprintf_unfiltered (gdb_stdlog, "gdbarch_elfcore_write_linux_prpsinfo called\n");
|
| + return gdbarch->elfcore_write_linux_prpsinfo (obfd, note_data, note_size, info);
|
| +}
|
| +
|
| +void
|
| +set_gdbarch_elfcore_write_linux_prpsinfo (struct gdbarch *gdbarch,
|
| + gdbarch_elfcore_write_linux_prpsinfo_ftype elfcore_write_linux_prpsinfo)
|
| +{
|
| + gdbarch->elfcore_write_linux_prpsinfo = elfcore_write_linux_prpsinfo;
|
| +}
|
| +
|
| +int
|
| gdbarch_find_memory_regions_p (struct gdbarch *gdbarch)
|
| {
|
| gdb_assert (gdbarch != NULL);
|
| @@ -3428,6 +3467,30 @@ set_gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch,
|
| }
|
|
|
| int
|
| +gdbarch_core_xfer_shared_libraries_aix_p (struct gdbarch *gdbarch)
|
| +{
|
| + gdb_assert (gdbarch != NULL);
|
| + return gdbarch->core_xfer_shared_libraries_aix != NULL;
|
| +}
|
| +
|
| +LONGEST
|
| +gdbarch_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, LONGEST len)
|
| +{
|
| + gdb_assert (gdbarch != NULL);
|
| + gdb_assert (gdbarch->core_xfer_shared_libraries_aix != NULL);
|
| + if (gdbarch_debug >= 2)
|
| + fprintf_unfiltered (gdb_stdlog, "gdbarch_core_xfer_shared_libraries_aix called\n");
|
| + return gdbarch->core_xfer_shared_libraries_aix (gdbarch, readbuf, offset, len);
|
| +}
|
| +
|
| +void
|
| +set_gdbarch_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch,
|
| + gdbarch_core_xfer_shared_libraries_aix_ftype core_xfer_shared_libraries_aix)
|
| +{
|
| + gdbarch->core_xfer_shared_libraries_aix = core_xfer_shared_libraries_aix;
|
| +}
|
| +
|
| +int
|
| gdbarch_core_pid_to_str_p (struct gdbarch *gdbarch)
|
| {
|
| gdb_assert (gdbarch != NULL);
|
| @@ -3846,6 +3909,30 @@ set_gdbarch_gdb_signal_from_target (struct gdbarch *gdbarch,
|
| }
|
|
|
| int
|
| +gdbarch_gdb_signal_to_target_p (struct gdbarch *gdbarch)
|
| +{
|
| + gdb_assert (gdbarch != NULL);
|
| + return gdbarch->gdb_signal_to_target != NULL;
|
| +}
|
| +
|
| +int
|
| +gdbarch_gdb_signal_to_target (struct gdbarch *gdbarch, enum gdb_signal signal)
|
| +{
|
| + gdb_assert (gdbarch != NULL);
|
| + gdb_assert (gdbarch->gdb_signal_to_target != NULL);
|
| + if (gdbarch_debug >= 2)
|
| + fprintf_unfiltered (gdb_stdlog, "gdbarch_gdb_signal_to_target called\n");
|
| + return gdbarch->gdb_signal_to_target (gdbarch, signal);
|
| +}
|
| +
|
| +void
|
| +set_gdbarch_gdb_signal_to_target (struct gdbarch *gdbarch,
|
| + gdbarch_gdb_signal_to_target_ftype gdb_signal_to_target)
|
| +{
|
| + gdbarch->gdb_signal_to_target = gdb_signal_to_target;
|
| +}
|
| +
|
| +int
|
| gdbarch_get_siginfo_type_p (struct gdbarch *gdbarch)
|
| {
|
| gdb_assert (gdbarch != NULL);
|
| @@ -4277,6 +4364,30 @@ set_gdbarch_info_proc (struct gdbarch *gdbarch,
|
| gdbarch->info_proc = info_proc;
|
| }
|
|
|
| +int
|
| +gdbarch_core_info_proc_p (struct gdbarch *gdbarch)
|
| +{
|
| + gdb_assert (gdbarch != NULL);
|
| + return gdbarch->core_info_proc != NULL;
|
| +}
|
| +
|
| +void
|
| +gdbarch_core_info_proc (struct gdbarch *gdbarch, char *args, enum info_proc_what what)
|
| +{
|
| + gdb_assert (gdbarch != NULL);
|
| + gdb_assert (gdbarch->core_info_proc != NULL);
|
| + if (gdbarch_debug >= 2)
|
| + fprintf_unfiltered (gdb_stdlog, "gdbarch_core_info_proc called\n");
|
| + gdbarch->core_info_proc (gdbarch, args, what);
|
| +}
|
| +
|
| +void
|
| +set_gdbarch_core_info_proc (struct gdbarch *gdbarch,
|
| + gdbarch_core_info_proc_ftype core_info_proc)
|
| +{
|
| + gdbarch->core_info_proc = core_info_proc;
|
| +}
|
| +
|
| void
|
| 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)
|
| {
|
| @@ -4294,6 +4405,23 @@ set_gdbarch_iterate_over_objfiles_in_search_order (struct gdbarch *gdbarch,
|
| gdbarch->iterate_over_objfiles_in_search_order = iterate_over_objfiles_in_search_order;
|
| }
|
|
|
| +struct ravenscar_arch_ops *
|
| +gdbarch_ravenscar_ops (struct gdbarch *gdbarch)
|
| +{
|
| + gdb_assert (gdbarch != NULL);
|
| + /* Skip verify of ravenscar_ops, invalid_p == 0 */
|
| + if (gdbarch_debug >= 2)
|
| + fprintf_unfiltered (gdb_stdlog, "gdbarch_ravenscar_ops called\n");
|
| + return gdbarch->ravenscar_ops;
|
| +}
|
| +
|
| +void
|
| +set_gdbarch_ravenscar_ops (struct gdbarch *gdbarch,
|
| + struct ravenscar_arch_ops * ravenscar_ops)
|
| +{
|
| + gdbarch->ravenscar_ops = ravenscar_ops;
|
| +}
|
| +
|
|
|
| /* Keep a registry of per-architecture data-pointers required by GDB
|
| modules. */
|
| @@ -4669,21 +4797,29 @@ gdbarch_find_by_info (struct gdbarch_info info)
|
| /* Make the specified architecture current. */
|
|
|
| void
|
| -deprecated_target_gdbarch_select_hack (struct gdbarch *new_gdbarch)
|
| +set_target_gdbarch (struct gdbarch *new_gdbarch)
|
| {
|
| gdb_assert (new_gdbarch != NULL);
|
| gdb_assert (new_gdbarch->initialized_p);
|
| - target_gdbarch = new_gdbarch;
|
| + current_inferior ()->gdbarch = new_gdbarch;
|
| observer_notify_architecture_changed (new_gdbarch);
|
| registers_changed ();
|
| }
|
|
|
| +/* Return the current inferior's arch. */
|
| +
|
| +struct gdbarch *
|
| +target_gdbarch (void)
|
| +{
|
| + return current_inferior ()->gdbarch;
|
| +}
|
| +
|
| extern void _initialize_gdbarch (void);
|
|
|
| void
|
| _initialize_gdbarch (void)
|
| {
|
| - add_setshow_zinteger_cmd ("arch", class_maintenance, &gdbarch_debug, _("\
|
| + add_setshow_zuinteger_cmd ("arch", class_maintenance, &gdbarch_debug, _("\
|
| Set architecture debugging."), _("\
|
| Show architecture debugging."), _("\
|
| When non-zero, architecture debugging is enabled."),
|
|
|