public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Tom Tromey <tromey@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] Do not put linkage names into .gdb_index
Date: Mon, 25 Apr 2022 13:26:54 +0000 (GMT)	[thread overview]
Message-ID: <20220425132654.7EF4D385842B@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=2cf349be0e378fdedcb7d0b19dbc431df524cbe7

commit 2cf349be0e378fdedcb7d0b19dbc431df524cbe7
Author: Tom Tromey <tromey@adacore.com>
Date:   Fri Apr 22 11:44:59 2022 -0600

    Do not put linkage names into .gdb_index
    
    This changes the .gdb_index writer to skip linkage names.  This was
    always done historically (though somewhat implicitly).

Diff:
---
 gdb/dwarf2/index-write.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/gdb/dwarf2/index-write.c b/gdb/dwarf2/index-write.c
index b7a2e214f6b..afe55da6c1b 100644
--- a/gdb/dwarf2/index-write.c
+++ b/gdb/dwarf2/index-write.c
@@ -1093,6 +1093,14 @@ write_cooked_index (cooked_index_vector *table,
 {
   for (const cooked_index_entry *entry : table->all_entries ())
     {
+      /* GDB never put linkage names into .gdb_index.  The theory here
+	 is that a linkage name will normally be in the minimal
+	 symbols anyway, so including it in the index is usually
+	 redundant -- and the cases where it would not be redundant
+	 are rare and not worth supporting.  */
+      if ((entry->flags & IS_LINKAGE) != 0)
+	continue;
+
       const auto it = cu_index_htab.find (entry->per_cu);
       gdb_assert (it != cu_index_htab.cend ());


                 reply	other threads:[~2022-04-25 13:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20220425132654.7EF4D385842B@sourceware.org \
    --to=tromey@sourceware.org \
    --cc=gdb-cvs@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: link
Be 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).