From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 693B2386F012; Wed, 24 Feb 2021 14:22:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 693B2386F012 From: "mark at klomp dot org" To: gdb-prs@sourceware.org Subject: [Bug gdb/23504] index cache: Produce and consume DWARF5 format Date: Wed, 24 Feb 2021 14:22:18 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mark at klomp 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 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, 24 Feb 2021 14:22:18 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D23504 --- Comment #5 from Mark Wielaard --- (In reply to Tom Tromey from comment #4) > The context here is GDB generating an index and putting it into the index > cache. .debug_names refers to symbol names using their index in .debug_s= tr, > so if a string does not appear there, then how would GDB cope? > Currently I think it writes out a new .debug_str section, but of course > (see the other PR), what's currently done is wrong; and also this seemed > weird for the index cache, because in that scenario nobody is rewriting > the original object file. >=20 > Not sure if this is clear or not... It is clear, I just don't know enough about the index cache to understand w= hich design makes most sense. It seems for strings you need some way to tell whi= ch section they came from, either .debug_string (the default), .debug_info (for DW_FORM_string, if the index already associates a DIE offset with that, may= be just have a flag that it looks up the DW_AT_name there?) and .debug_line_str (DW_FORM_line_str) for those symbols which have a name that also represents= a file/path (dunno how to easily represent that). And then there are the DW_FORM_strp_sup/DW_FORM_GNU_strp_alt strings (then the .debug_strp is in another file...). I think the summary is that DWARF5 got a lot of ways to store a string :) --=20 You are receiving this mail because: You are on the CC list for the bug.=