From: Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
To: Lancelot SIX <lancelot.six@amd.com>, gdb-patches@sourceware.org
Cc: lsix@lancelotsix.com
Subject: Re: [PATCH v2 2/2] gdb: Simplify psymbol_functions::require_partial_symbols
Date: Fri, 20 May 2022 12:07:19 -0400 [thread overview]
Message-ID: <da5a2538-d0e3-d326-ba2b-d467b8c078d7@simark.ca> (raw)
In-Reply-To: <20220519184557.2169347-3-lancelot.six@amd.com>
On 2022-05-19 14:45, Lancelot SIX via Gdb-patches wrote:
> 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 ();
> }
It sounds like the method should be renamed then. The "require" meant
that it would read the psymbols if needed. Now it's really just a
getter, so it could probably be named just "partial_symbols".
Simon
next prev parent reply other threads:[~2022-05-20 16:07 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 ` [PATCH v2 2/2] gdb: Simplify psymbol_functions::require_partial_symbols Lancelot SIX via Gdb-patches
2022-05-20 15:51 ` Tom Tromey
2022-05-20 16:07 ` Simon Marchi via Gdb-patches [this message]
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=da5a2538-d0e3-d326-ba2b-d467b8c078d7@simark.ca \
--to=gdb-patches@sourceware.org \
--cc=lancelot.six@amd.com \
--cc=lsix@lancelotsix.com \
--cc=simark@simark.ca \
/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