public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug symtab/24820] .debug_names has incorrect contents Date: Thu, 18 Jan 2024 20:38:15 +0000 [thread overview] Message-ID: <bug-24820-4717-SYVqlfp4T5@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-24820-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=24820 --- Comment #14 from Sourceware Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Tom Tromey <tromey@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=91a42a618085f236c5f6527322f88044e7550a63 commit 91a42a618085f236c5f6527322f88044e7550a63 Author: Tom Tromey <tom@tromey.com> Date: Sun Dec 3 18:20:37 2023 -0700 Rewrite .debug_names writer This rewrites GDB's .debug_names writer. It is now closer to the form imagined in the DWARF spec. In particular, names are emitted exactly as they appear in the original DWARF. In order to make the reader work nicely, some extensions were needed. These were all documented in an earlier patch. Note that in particular this writer solves the "main name" problem by putting a flag into the table. GDB does not use the .debug_names hash table, so it also does not write one. I consider this hash table to be essentially useless in general, due to the name canonicalization problem -- while DWARF says that writers should use the system demangling style, (1) this style varies across systems, so it can't truly be relied on; and (2) at least GCC and one other compiler don't actually follow this part of the spec anyway. It's important to note, though, that even if the hash was somehow useful, GDB probably still would not use it -- a sorted list of names is needed for completion and performs reasonably well for other lookups, so a hash table is just overhead, IMO. String emission is also simplified. There's no need in this writer to ingest the contents of .debug_str. A couple of tests are updated to reflect the fact that they now "fail" because the tests don't include .debug_aranges in the .S file. Arguably the .debug_names writer should also create this section; but I did not implement that in this series, and there is a separate bug about it. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=24820 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=24549 -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2024-01-18 20:38 UTC|newest] Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-24820-4717@http.sourceware.org/bugzilla/> 2020-09-01 18:53 ` mark at klomp dot org 2021-02-18 16:27 ` tromey at sourceware dot org 2021-02-22 2:36 ` tromey at sourceware dot org 2021-02-22 8:55 ` fweimer at redhat dot com 2021-06-11 16:30 ` tromey at sourceware dot org 2022-04-22 18:03 ` tromey at sourceware dot org 2023-01-23 19:52 ` tromey at sourceware dot org 2023-12-03 0:07 ` tromey at sourceware dot org 2023-12-03 0:13 ` tromey at sourceware dot org 2023-12-03 0:16 ` tromey at sourceware dot org 2023-12-03 20:32 ` tromey at sourceware dot org 2023-12-04 14:19 ` tromey at sourceware dot org 2023-12-10 15:15 ` tromey at sourceware dot org 2023-12-10 15:16 ` tromey at sourceware dot org 2023-12-10 15:17 ` tromey at sourceware dot org 2023-12-10 15:21 ` tromey at sourceware dot org 2023-12-10 15:30 ` tromey at sourceware dot org 2024-01-10 2:01 ` tromey at sourceware dot org 2024-01-10 18:17 ` dblaikie at gmail dot com 2024-01-10 18:37 ` dblaikie at gmail dot com 2024-01-10 20:51 ` tromey at sourceware dot org 2024-01-10 20:58 ` tromey at sourceware dot org 2024-01-18 20:38 ` cvs-commit at gcc dot gnu.org [this message] 2024-01-18 20:38 ` tromey at sourceware dot org 2024-04-22 21:18 ` dblaikie at gmail dot com
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-24820-4717-SYVqlfp4T5@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: linkBe 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).