From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [PATCH v4 1/8] Don't call add_dependence from index_imported_unit
Date: Mon, 23 Feb 2026 18:16:54 -0700 [thread overview]
Message-ID: <20260223-dw-inline-fixup-pr-symtab-30728-2-v4-1-bf923dc5fb19@tromey.com> (raw)
In-Reply-To: <20260223-dw-inline-fixup-pr-symtab-30728-2-v4-0-bf923dc5fb19@tromey.com>
cooked_indexer::index_imported_unit calls add_dependence. However,
this field is only needed during full symbol reading. Remove this
call.
---
gdb/dwarf2/cooked-indexer.c | 6 +-----
gdb/dwarf2/cu.h | 6 +++---
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/gdb/dwarf2/cooked-indexer.c b/gdb/dwarf2/cooked-indexer.c
index 40f62de80eb..3221ccd34f8 100644
--- a/gdb/dwarf2/cooked-indexer.c
+++ b/gdb/dwarf2/cooked-indexer.c
@@ -430,11 +430,7 @@ cooked_indexer::index_imported_unit (cutu_reader *reader,
cutu_reader *new_reader
= ensure_cu_exists (reader, *target, true);
if (new_reader != nullptr)
- {
- index_dies (new_reader, new_reader->info_ptr (), nullptr, false);
-
- reader->cu ()->add_dependence (new_reader->cu ()->per_cu);
- }
+ index_dies (new_reader, new_reader->info_ptr (), nullptr, false);
return info_ptr;
}
diff --git a/gdb/dwarf2/cu.h b/gdb/dwarf2/cu.h
index 1361898accc..8ece6ddc010 100644
--- a/gdb/dwarf2/cu.h
+++ b/gdb/dwarf2/cu.h
@@ -300,9 +300,9 @@ struct dwarf2_cu
symbols are being read. */
buildsym_compunit_up m_builder;
- /* A set of pointers to dwarf2_per_cu objects for compilation units referenced
- by this one. Only used during full symbol processing; partial symbol
- tables do not have dependencies. */
+ /* A set of pointers to dwarf2_per_cu objects for compilation units
+ referenced by this one. Only used during full symbol
+ processing. */
gdb::unordered_set<dwarf2_per_cu *> m_dependencies;
public:
--
2.49.0
next prev parent reply other threads:[~2026-02-24 1:19 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-24 1:16 [PATCH v4 0/8] Correctly handle inline functions with dwz Tom Tromey
2026-02-24 1:16 ` Tom Tromey [this message]
2026-02-24 1:16 ` [PATCH v4 2/8] Skip partial units in process_psymtab_comp_unit Tom Tromey
2026-02-24 1:16 ` [PATCH v4 3/8] Don't consider DW_TAG_inlined_subroutine as interesting Tom Tromey
2026-02-24 1:16 ` [PATCH v4 4/8] Combine two cases in cooked_index_functions::search Tom Tromey
2026-02-24 1:16 ` [PATCH v4 5/8] Remove C++ special case from process_imported_unit_die Tom Tromey
2026-02-24 9:18 ` Tom de Vries
2026-04-07 18:54 ` Tom Tromey
2026-04-08 11:17 ` Tom de Vries
2026-02-24 1:16 ` [PATCH v4 6/8] Have iterate_over_one_compunit_symtab search included symtabs Tom Tromey
2026-02-24 1:17 ` [PATCH v4 7/8] Handle inline functions with dwz Tom Tromey
2026-02-24 1:17 ` [PATCH v4 8/8] Update .debug_names documentation Tom Tromey
2026-02-24 9:46 ` [PATCH v4 0/8] Correctly handle inline functions with dwz Tom de Vries
2026-04-07 19:10 ` 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=20260223-dw-inline-fixup-pr-symtab-30728-2-v4-1-bf923dc5fb19@tromey.com \
--to=tom@tromey.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