From: Lancelot SIX via Gdb-patches <gdb-patches@sourceware.org>
To: <gdb-patches@sourceware.org>
Cc: lsix@lancelotsix.com, Lancelot SIX <lancelot.six@amd.com>
Subject: [PATCH v2 2/2] gdb: Simplify psymbol_functions::require_partial_symbols
Date: Thu, 19 May 2022 19:45:57 +0100 [thread overview]
Message-ID: <20220519184557.2169347-3-lancelot.six@amd.com> (raw)
In-Reply-To: <20220519184557.2169347-1-lancelot.six@amd.com>
The previous patch ensured that partial symbols are read before calling
most of the quick_function's methods.
The psymbol_functions class has the require_partial_symbols method which
serves this exact purpose. This method does not need to try to read partial
symbols anymore, but it can instead assert that any partial symbol have
been read at this point.
Regression tested on x86_64-linux.
---
gdb/psymtab.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/psymtab.c b/gdb/psymtab.c
index 402d6085fe6..2bf6cbc5848 100644
--- a/gdb/psymtab.c
+++ b/gdb/psymtab.c
@@ -84,7 +84,7 @@ psymtab_storage::install_psymtab (partial_symtab *pst)
psymtab_storage::partial_symtab_range
psymbol_functions::require_partial_symbols (struct objfile *objfile)
{
- objfile->require_partial_symbols (true);
+ gdb_assert ((objfile->flags & OBJF_PSYMTABS_READ) != 0);
return m_partial_symtabs->range ();
}
--
2.25.1
next prev parent reply other threads:[~2022-05-19 18:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-19 18:45 [PATCH v2 0/2] Fix regression with lazy-loading of partial symbols Lancelot SIX via Gdb-patches
2022-05-19 18:45 ` [PATCH v2 1/2] gdb: Require psymtab before calling quick_functions in objfile Lancelot SIX via Gdb-patches
2022-05-20 15:51 ` Tom Tromey
2022-05-20 23:07 ` Lancelot SIX via Gdb-patches
2022-05-21 1:07 ` Tom Tromey
2022-05-19 18:45 ` Lancelot SIX via Gdb-patches [this message]
2022-05-20 15:51 ` [PATCH v2 2/2] gdb: Simplify psymbol_functions::require_partial_symbols Tom Tromey
2022-05-20 16:07 ` Simon Marchi via Gdb-patches
2022-05-20 22:55 ` [PATCH v3 2/2] gdb: Change psymbol_functions::require_partial_symbols to partial_symbols Lancelot SIX via Gdb-patches
2022-05-26 17:57 ` Tom Tromey
2022-05-26 20:42 ` Lancelot SIX via Gdb-patches
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=20220519184557.2169347-3-lancelot.six@amd.com \
--to=gdb-patches@sourceware.org \
--cc=lancelot.six@amd.com \
--cc=lsix@lancelotsix.com \
/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