* arch-utils.c (gdbarch_info_fill): Also try core_bfd.
* corelow.c (core_read_description): New. (init_core_ops): Set to_read_description. * gdbarch.sh: Add gdbarch_core_read_description. * mips-linux-tdep.c (mips_linux_core_read_description): New. (mips_linux_init_abi): Call set_gdbarch_core_read_description. * mips-tdep.c (mips_tdesc_gp32, mips_tdesc_gp64): New. (mips_register_g_packet_guesses): Use them. (_initialize_mips_tdep): Initialize them. * mips-tdep.h (mips_tdesc_gp32, mips_tdesc_gp64): Declare. * gdbarch.h, gdbarch.c: Regenerated.
This commit is contained in:
parent
6a6b96b9c2
commit
4eb0ad19f3
9 changed files with 117 additions and 18 deletions
|
@ -573,6 +573,28 @@ static struct core_fns regset_core_fns =
|
|||
NULL /* next */
|
||||
};
|
||||
|
||||
static const struct target_desc *
|
||||
mips_linux_core_read_description (struct gdbarch *gdbarch,
|
||||
struct target_ops *target,
|
||||
bfd *abfd)
|
||||
{
|
||||
asection *section = bfd_get_section_by_name (abfd, ".reg");
|
||||
if (! section)
|
||||
return NULL;
|
||||
|
||||
switch (bfd_section_size (abfd, section))
|
||||
{
|
||||
case sizeof (mips_elf_gregset_t):
|
||||
return mips_tdesc_gp32;
|
||||
|
||||
case sizeof (mips64_elf_gregset_t):
|
||||
return mips_tdesc_gp64;
|
||||
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Check the code at PC for a dynamic linker lazy resolution stub.
|
||||
Because they aren't in the .plt section, we pattern-match on the
|
||||
|
@ -1160,6 +1182,9 @@ mips_linux_init_abi (struct gdbarch_info info,
|
|||
|
||||
set_gdbarch_write_pc (gdbarch, mips_linux_write_pc);
|
||||
|
||||
set_gdbarch_core_read_description (gdbarch,
|
||||
mips_linux_core_read_description);
|
||||
|
||||
if (tdesc_data)
|
||||
{
|
||||
const struct tdesc_feature *feature;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue