Hi, all:
I have reported a issue about gdb:
https://sourceware.org/bugzilla/show_bug.cgi?id=17045. To be simple, it is the
64-bit gdb on Solaris can't parse 32-bit core dump file. I also find this issue
has been reported in 2012:https://sourceware.org/bugzilla/show_bug.cgi?id=14944.
I have tried to analyse the issue, and find the cause:
asection *
bfd_get_section_by_name (bfd *abfd, const char *name)
{
struct section_hash_entry *sh;
sh = section_hash_lookup (&abfd->section_htab, name, FALSE, FALSE);
if (sh != NULL)
return &sh->section;
return NULL;
}
static void
core_open (char *filename, int from_tty)
{
......
bfd_map_over_sections (core_bfd, add_to_thread_list,
bfd_get_section_by_name (core_bfd, ".reg"));
......
}
The core_open try to get ".reg" section, and the ".reg" section doesn't
exist, but section_hash_lookup doesn't create it.
Then when execute get_core_register_section
(core_open->post_create_inferior->.....->get_core_register_section) function:
static void
get_core_register_section (struct regcache *regcache,
const char *name,
int which,
const char *human_name,
int required)
{
......
section = bfd_get_section_by_name (core_bfd, section_name);
if (! section)
{
if (required)
warning (_("Couldn't find %s registers in core file."),
human_name);
return;
}
......
}
Because the ".reg" section doesn't exist, so the warning will report.
Could anyone help or comment on this issue? Thanks very much!
Best Regards
Nan Xiao
_______________________________________________
bug-gdb mailing list
bug-gdb@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-gdb