public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug symtab/27307] New: CUs counted twice by create_cus_from_debug_names_list Date: Mon, 01 Feb 2021 11:22:16 +0000 [thread overview] Message-ID: <bug-27307-4717@http.sourceware.org/bugzilla/> (raw) https://sourceware.org/bugzilla/show_bug.cgi?id=27307 Bug ID: 27307 Summary: CUs counted twice by create_cus_from_debug_names_list Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: symtab Assignee: unassigned at sourceware dot org Reporter: vries at gcc dot gnu.org Target Milestone: --- I stumbled upon this code in create_addrmap_from_aranges: ... for (dwarf2_per_cu_data *per_cu : per_objfile->per_bfd->all_comp_units) { const auto insertpair = debug_info_offset_to_per_cu.emplace (per_cu->sect_off, per_cu); if (!insertpair.second) { warning (_("Section .debug_aranges in %s has duplicate " "debug_info_offset %s, ignoring .debug_aranges."), objfile_name (objfile), sect_offset_str (per_cu->sect_off)); return; } } ... and had difficulty understanding this. The iteration is over all_comp_units, which has no relation to .debug_aranges, so the warning does not make sense. I tried to see if I could trigger it, so I added a "gdb_assert (false)" after the warning. I ran into the assert in test-cases gdb.dwarf2/clang-debug-names.exp and gdb.dwarf2/clang-debug-names-2.exp. Investigation showed that this is due to a bug in create_cus_from_debug_names_list, which is fixed by: ... @@ -5323,6 +5324,7 @@ create_cus_from_debug_names_list (dwarf2_per_bfd *per_bf d, = create_cu_from_index_list (per_bfd, §ion, is_dwz, sect_off, 0); per_bfd->all_comp_units.push_back (per_cu); } + return; } sect_offset sect_off_prev; ... -- You are receiving this mail because: You are on the CC list for the bug.
next reply other threads:[~2021-02-01 11:22 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-02-01 11:22 vries at gcc dot gnu.org [this message] 2021-02-02 11:38 ` [Bug symtab/27307] " vries at gcc dot gnu.org 2021-02-05 8:14 ` cvs-commit at gcc dot gnu.org 2021-02-05 8:20 ` vries at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-27307-4717@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).