+2014-09-30 Andreas Arnez <arnez@linux.vnet.ibm.com>
+
+ * gdbarch.sh (regset_from_core_section): Remove gdbarch method.
+ * gdbarch.c: Regenerate.
+ * gdbarch.h: Likewise.
+ * corelow.c (sniff_core_bfd): Drop presence check for deleted
+ gdbarch method 'regset_from_core_section'.
+ (get_core_register_section): Remove handling for the case that
+ regset == NULL and regset_from_core_section is defined.
+ (get_core_registers): Drop check for deleted method.
+ * procfs.c (procfs_do_thread_registers): Adjust comment.
+
2014-09-30 Andreas Arnez <arnez@linux.vnet.ibm.com>
* linux-nat.c (linux_nat_collect_thread_registers): Remove.
/* Don't sniff if we have support for register sets in
CORE_GDBARCH. */
- if (core_gdbarch
- && (gdbarch_iterate_over_regset_sections_p (core_gdbarch)
- || gdbarch_regset_from_core_section_p (core_gdbarch)))
+ if (core_gdbarch && gdbarch_iterate_over_regset_sections_p (core_gdbarch))
return NULL;
for (cf = core_file_fns; cf != NULL; cf = cf->next)
return;
}
- if (regset == NULL
- && core_gdbarch && gdbarch_regset_from_core_section_p (core_gdbarch))
- {
- regset = gdbarch_regset_from_core_section (core_gdbarch,
- name, size);
- if (regset == NULL)
- {
- if (required)
- warning (_("Couldn't recognize %s registers in core file."),
- human_name);
- return;
- }
- }
-
if (regset != NULL)
{
regset->supply_regset (regset, regcache, -1, contents, size);
int i;
struct gdbarch *gdbarch;
- if (!(core_gdbarch
- && (gdbarch_iterate_over_regset_sections_p (core_gdbarch)
- || gdbarch_regset_from_core_section_p (core_gdbarch)))
+ if (!(core_gdbarch && gdbarch_iterate_over_regset_sections_p (core_gdbarch))
&& (core_vec == NULL || core_vec->core_read_registers == NULL))
{
fprintf_filtered (gdb_stderr,
gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
gdbarch_register_reggroup_p_ftype *register_reggroup_p;
gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument;
- gdbarch_regset_from_core_section_ftype *regset_from_core_section;
gdbarch_iterate_over_regset_sections_ftype *iterate_over_regset_sections;
gdbarch_make_corefile_notes_ftype *make_corefile_notes;
gdbarch_elfcore_write_linux_prpsinfo_ftype *elfcore_write_linux_prpsinfo;
/* Skip verify of address_class_name_to_type_flags, has predicate. */
/* Skip verify of register_reggroup_p, invalid_p == 0 */
/* Skip verify of fetch_pointer_argument, has predicate. */
- /* Skip verify of regset_from_core_section, has predicate. */
/* Skip verify of iterate_over_regset_sections, has predicate. */
/* Skip verify of make_corefile_notes, has predicate. */
/* Skip verify of elfcore_write_linux_prpsinfo, has predicate. */
fprintf_unfiltered (file,
"gdbarch_dump: register_type = <%s>\n",
host_address_to_string (gdbarch->register_type));
- fprintf_unfiltered (file,
- "gdbarch_dump: gdbarch_regset_from_core_section_p() = %d\n",
- gdbarch_regset_from_core_section_p (gdbarch));
- fprintf_unfiltered (file,
- "gdbarch_dump: regset_from_core_section = <%s>\n",
- host_address_to_string (gdbarch->regset_from_core_section));
fprintf_unfiltered (file,
"gdbarch_dump: gdbarch_relocate_instruction_p() = %d\n",
gdbarch_relocate_instruction_p (gdbarch));
gdbarch->fetch_pointer_argument = fetch_pointer_argument;
}
-int
-gdbarch_regset_from_core_section_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->regset_from_core_section != NULL;
-}
-
-const struct regset *
-gdbarch_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size)
-{
- gdb_assert (gdbarch != NULL);
- gdb_assert (gdbarch->regset_from_core_section != NULL);
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_regset_from_core_section called\n");
- return gdbarch->regset_from_core_section (gdbarch, sect_name, sect_size);
-}
-
-void
-set_gdbarch_regset_from_core_section (struct gdbarch *gdbarch,
- gdbarch_regset_from_core_section_ftype regset_from_core_section)
-{
- gdbarch->regset_from_core_section = regset_from_core_section;
-}
-
int
gdbarch_iterate_over_regset_sections_p (struct gdbarch *gdbarch)
{
extern CORE_ADDR gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type);
extern void set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument);
-/* Return the appropriate register set for a core file section with
- name SECT_NAME and size SECT_SIZE. */
-
-extern int gdbarch_regset_from_core_section_p (struct gdbarch *gdbarch);
-
-typedef const struct regset * (gdbarch_regset_from_core_section_ftype) (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size);
-extern const struct regset * gdbarch_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size);
-extern void set_gdbarch_regset_from_core_section (struct gdbarch *gdbarch, gdbarch_regset_from_core_section_ftype *regset_from_core_section);
-
/* Iterate over all supported register notes in a core file. For each
supported register note section, the iterator must call CB and pass
CB_DATA unchanged. If REGCACHE is not NULL, the iterator can limit
# Fetch the pointer to the ith function argument.
F:CORE_ADDR:fetch_pointer_argument:struct frame_info *frame, int argi, struct type *type:frame, argi, type
-# Return the appropriate register set for a core file section with
-# name SECT_NAME and size SECT_SIZE.
-M:const struct regset *:regset_from_core_section:const char *sect_name, size_t sect_size:sect_name, sect_size
-
# Iterate over all supported register notes in a core file. For each
# supported register note section, the iterator must call CB and pass
# CB_DATA unchanged. If REGCACHE is not NULL, the iterator can limit
/* This part is the old method for fetching registers.
It should be replaced by the newer one using regsets
once it is implemented in this platform:
- gdbarch_regset_from_core_section() and regset->collect_regset(). */
+ gdbarch_iterate_over_regset_sections(). */
old_chain = save_inferior_ptid ();
inferior_ptid = ptid;