From: Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
To: Tom Tromey <tom@tromey.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH 1/2] Allow expand_symtabs_matching to examine imported psymtabs
Date: Thu, 25 Mar 2021 15:29:39 -0400 [thread overview]
Message-ID: <514da557-94e9-23c3-df1a-59ae42e32399@polymtl.ca> (raw)
In-Reply-To: <20210324201510.23655-2-tom@tromey.com>
On 2021-03-24 4:15 p.m., Tom Tromey wrote:
> Currently the psymtab variant of expand_symtabs_matching has this
> check:
>
> /* We skip shared psymtabs because file-matching doesn't apply
> to them; but we search them later in the loop. */
> if (ps->user != NULL)
> continue;
>
> In a larger series I'm working on, it's convenient to remove this
> check. And, I noticed that a similar check is not done for
> expand_symtabs_with_fullname. So, it made sense to me to remove the
> check here as well.
>
> gdb/ChangeLog
> 2021-03-24 Tom Tromey <tom@tromey.com>
>
> * psymtab.c (psymbol_functions::expand_symtabs_matching): Remove
> "user" check.
> ---
> gdb/ChangeLog | 5 +++++
> gdb/psymtab.c | 5 -----
> 2 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/gdb/psymtab.c b/gdb/psymtab.c
> index 597817269c1..5a64166d983 100644
> --- a/gdb/psymtab.c
> +++ b/gdb/psymtab.c
> @@ -1313,11 +1313,6 @@ psymbol_functions::expand_symtabs_matching
> if (ps->readin_p (objfile))
> continue;
>
> - /* We skip shared psymtabs because file-matching doesn't apply
> - to them; but we search them later in the loop. */
> - if (ps->user != NULL)
> - continue;
> -
> if (file_matcher)
> {
> bool match;
>
I'm not against this change, but I don't understand it. It seems
logical to me to skip shared psymtabs, because we'll reach them through
some other psymtabs that include them. So, both versions seem correct,
but maybe knowing why it's convenient to you would help.
Simon
next prev parent reply other threads:[~2021-03-25 19:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-24 20:15 [PATCH 0/2] Two minor partial symtab cleanups Tom Tromey
2021-03-24 20:15 ` [PATCH 1/2] Allow expand_symtabs_matching to examine imported psymtabs Tom Tromey
2021-03-25 19:29 ` Simon Marchi via Gdb-patches [this message]
2021-03-26 18:17 ` Tom Tromey
2021-03-26 18:27 ` Simon Marchi via Gdb-patches
2021-03-24 20:15 ` [PATCH 2/2] Simplify psymbol_functions::expand_symtabs_matching Tom Tromey
2021-03-25 19:31 ` Simon Marchi 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=514da557-94e9-23c3-df1a-59ae42e32399@polymtl.ca \
--to=gdb-patches@sourceware.org \
--cc=simon.marchi@polymtl.ca \
--cc=tom@tromey.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