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/25700] Forward-imported CU causes duplicate partial symtab
Date: Tue, 24 Mar 2020 13:01:48 +0000	[thread overview]
Message-ID: <bug-25700-4717-OYSVwLmqEs@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-25700-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=25700

--- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> ---
Tentative patch:
...
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 0e879e08a0..97f7c8f003 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -7808,7 +7808,12 @@ dwarf2_build_psymtabs_hard (struct dwarf2_per_objfile
*dwarf2_per_objfile)
                           addrmap_create_mutable (&temp_obstack));

   for (dwarf2_per_cu_data *per_cu : dwarf2_per_objfile->all_comp_units)
-    process_psymtab_comp_unit (per_cu, false, language_minimal);
+    {
+      if (per_cu->v.psymtab != NULL)
+       /* In case a forward DW_TAG_imported_unit has read the CU already.  */
+       continue;
+      process_psymtab_comp_unit (per_cu, false, language_minimal);
+    }

   /* This has to wait until we read the CUs, we need the list of DWOs.  */
   process_skeletonless_type_units (dwarf2_per_objfile);
...

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2020-03-24 13:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-19 13:36 [Bug gdb/25700] New: " vries at gcc dot gnu.org
2020-03-19 13:37 ` [Bug gdb/25700] " vries at gcc dot gnu.org
2020-03-19 13:58 ` vries at gcc dot gnu.org
2020-03-19 14:06 ` vries at gcc dot gnu.org
2020-03-20 13:55 ` [Bug symtab/25700] " vries at gcc dot gnu.org
2020-03-24 13:01 ` vries at gcc dot gnu.org [this message]
2020-03-24 13:05 ` vries at gcc dot gnu.org
2020-03-24 13:36 ` vries at gcc dot gnu.org
2020-03-24 14:17 ` vries at gcc dot gnu.org
2020-03-27 12:50 ` vries at gcc dot gnu.org
2020-03-31 10:17 ` cvs-commit at gcc dot gnu.org
2020-04-08 10:20 ` vries at gcc dot gnu.org
2020-04-22  6:09 ` cvs-commit at gcc dot gnu.org
2020-04-22  6:11 ` 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-25700-4717-OYSVwLmqEs@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: link
Be 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).