From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 553473858420; Wed, 25 Aug 2021 07:50:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 553473858420 From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug symtab/28261] [debug-names] FAIL: gdb.dwarf2/dw2-ranges-psym.exp: No complaints Date: Wed, 25 Aug 2021 07:50:30 +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: cc 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: Wed, 25 Aug 2021 07:50:30 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28261 Tom de Vries changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |simark at simark dot ca --- Comment #3 from Tom de Vries --- Fixed by: ... diff --git a/gdb/dwarf2/index-write.c b/gdb/dwarf2/index-write.c index 4e00c716d91..813c19ef850 100644 --- a/gdb/dwarf2/index-write.c +++ b/gdb/dwarf2/index-write.c @@ -1428,16 +1428,10 @@ write_debug_names (dwarf2_per_objfile *per_objfile, =3D per_objfile->per_bfd->all_comp_units[i].get (); partial_symtab *psymtab =3D per_cu->v.psymtab; - /* CU of a shared file from 'dwz -m' may be unused by this main - file. It may be referenced from a local scope but in such - case it does not need to be present in .debug_names. */ - if (psymtab =3D=3D NULL) - continue; - int &this_counter =3D per_cu->is_debug_types ? types_counter : count= er; data_buf &this_list =3D per_cu->is_debug_types ? types_cu_list : cu_= list; - if (psymtab->user =3D=3D NULL) + if (psymtab !=3D nullptr && psymtab->user =3D=3D nullptr) nametable.recursively_write_psymbols (objfile, psymtab, psyms_seen, this_counter); ... which gives us: ... CU table: [ 0] 0x0 [ 1] 0x2e [ 2] 0xa5 [ 3] 0xc7 [ 4] 0xd2 [ 5] 0x145 [ 6] 0x150 [ 7] 0x308 ... --=20 You are receiving this mail because: You are on the CC list for the bug.=