From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 49AA2385E006; Tue, 24 Mar 2020 13:01:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 49AA2385E006 From: "vries at gcc dot gnu.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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: symtab X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2020 13:01:48 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D25700 --- Comment #3 from Tom de Vries --- 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 !=3D 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); ... --=20 You are receiving this mail because: You are on the CC list for the bug.=