From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DB74C3858C35; Sun, 3 Dec 2023 00:07:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DB74C3858C35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1701562038; bh=4CP17mCagbHJvvjnEyjv5OXa6LuZQCNT1Suk7fzQHf8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=mnBB73V/VyM+mTEI//27t3Pihao/wP+e3ccHSX2L8Swb2yeYO3DjG0L1cvlK9stD0 nHAc5xVVY0qQE4kpyS8s3BhBC4Q2rLyJ9JzqVHL+uEEiHSJuecjefO4D11cSk8XvJv kolReRx4OLvQxySvm3gxDhcD7uDMfhhQypD0hD+A= From: "tromey at sourceware dot org" To: gdb-prs@sourceware.org Subject: [Bug symtab/24820] .debug_names has incorrect contents Date: Sun, 03 Dec 2023 00:07:17 +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: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tromey at sourceware dot 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 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D24820 --- Comment #5 from Tom Tromey --- .debug_names is a bit weird. The 'parent' entry refers to an index in the name table, but this leaves no way to decide which of several meanings of the name might be the parent. Normally for gdb this doesn't matter, but it's still strange. clang doesn't emit parent entries so I think those tables can't be used. gdb needs to know the CU language but this isn't in the tables. gdb can emit it as an extension of course. I suppose we could read the first DIE of every CU -- but that's precisely the kind of work we want to avoid. gdb will have to mark some entries as linkage names. Otherwise there's no way to tell. The special case for "(anonymous namespace)" in the DWARF spec is bad, because it means that gdb might have to add to the string table -- but only for this one string. (I used to think we'd need to emit more strings, but that was mistaken.) For the index cache we can probably handle this via a trick. It's kind of sad that DWARF invented a new format and then didn't provide enough guidance for tools to be compatible at all. --=20 You are receiving this mail because: You are on the CC list for the bug.=