From: Tom Tromey <tromey@adacore.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tromey@adacore.com>
Subject: [PATCH v2 1/4] Fix regression in c-linkage-name.exp with gdb index
Date: Fri, 14 Oct 2022 10:08:46 -0600 [thread overview]
Message-ID: <20221014160849.919621-2-tromey@adacore.com> (raw)
In-Reply-To: <20221014160849.919621-1-tromey@adacore.com>
c-linkage-name.exp started failing with the gdb-index target board due
to an earlier patch. The problem here is that some linkage names must
be in the index -- but, based on inspection, not C++ linkage names.
This patch updates the code to exclude only these.
---
gdb/dwarf2/index-write.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/gdb/dwarf2/index-write.c b/gdb/dwarf2/index-write.c
index 4827b594994..4f89dfb65f7 100644
--- a/gdb/dwarf2/index-write.c
+++ b/gdb/dwarf2/index-write.c
@@ -1111,12 +1111,13 @@ 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
+ /* GDB never put C++ 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)
+ if (entry->per_cu->lang () == language_cplus
+ && (entry->flags & IS_LINKAGE) != 0)
continue;
const auto it = cu_index_htab.find (entry->per_cu);
--
2.34.3
next prev parent reply other threads:[~2022-10-14 16:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-14 16:08 [PATCH v2 0/4] Fix .gdb_index with Ada Tom Tromey
2022-10-14 16:08 ` Tom Tromey [this message]
2022-10-14 16:08 ` [PATCH v2 2/4] Don't add type linkage names to cooked index Tom Tromey
2022-10-14 16:08 ` [PATCH v2 3/4] Improve Ada support in .gdb_index Tom Tromey
2022-10-14 16:08 ` [PATCH v2 4/4] Change .gdb_index de-duplication implementation Tom Tromey
2022-10-17 4:01 ` [PATCH v2 0/4] Fix .gdb_index with Ada Tom de Vries
2022-10-17 16:03 ` Tom Tromey
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=20221014160849.919621-2-tromey@adacore.com \
--to=tromey@adacore.com \
--cc=gdb-patches@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).