Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Dmitry Neverov <dmitry.neverov@jetbrains.com>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC v2][PR symtab/30520] gdb/symtab: fix the gdb.cp/anon-struct test
Date: Fri, 9 Feb 2024 17:32:33 +0100	[thread overview]
Message-ID: <CAEY59_K5f0iTFUfwuB2LKpvGEOGMGrW4dDJGRuLXO3v5+LHpTw@mail.gmail.com> (raw)
In-Reply-To: <87y1bw9g3b.fsf@tromey.com>

Tom> Dmitry> The symbol_name_match_type::SEARCH_NAME cannot be used because
Tom> Dmitry> demangle_for_lookup_info doesn't initialize a demangled name
Tom> Dmitry> for it which makes a subsequent name matching to fail.
Tom>
Tom> I don't think I understand this comment, but anyway shouldn't this patch
Tom> simply be folded into an earlier one in the series?

Sorry, this is the first time I submit a series. I've noticed a
test failure after I sent patches and wasn't sure how to update
them. What should I do in such a situation? Create [RFC v3]?

What I was trying to say in the commit message is that
demangle_for_lookup_info::demangle_for_lookup_info has the
following logic:

if (without_params != NULL)
  {
    if (lookup_name.match_type () != symbol_name_match_type::SEARCH_NAME)
      m_demangled_name = demangle_for_lookup (without_params.get (),
      lang, storage);
    return;
  }

So when symbol_name_match_type::SEARCH_NAME was used, the
demangled name wasn't initialized which made subsequent
name_matcher calls to not match. Switching to
symbol_name_match_type::FULL fixes this.

Tom> I read through these and they seem basically reasonable to me -- in line
Tom> with what I was hoping for.  There are some minor formatting issues.

Sorry, again. I've tried to follow the code style as closely as I
can, but have missed something. I will try to be more careful
next time. If there is some formatter I can run - please let me
know.

Tom> You didn't mention what testing you did, so I am curious about that.

I've done only manual testing in the project where I can
reproduce the problem with slow symbol lookup. I'm not sure how
to write an automatic test checking that CU is not expanded
unnecessarily. Are there any existing tests checking that?

On Wed, Feb 7, 2024 at 9:25 PM Tom Tromey <tom@tromey.com> wrote:
>
> >>>>> "Dmitry" == Dmitry Neverov <dmitry.neverov@jetbrains.com> writes:
>
> Dmitry> The symbol_name_match_type::SEARCH_NAME cannot be used because
> Dmitry> demangle_for_lookup_info doesn't initialize a demangled name
> Dmitry> for it which makes a subsequent name matching to fail.
>
> I don't think I understand this comment, but anyway shouldn't this patch
> simply be folded into an earlier one in the series?
>
> I read through these and they seem basically reasonable to me -- in line
> with what I was hoping for.  There are some minor formatting issues.
>
> You didn't mention what testing you did, so I am curious about that.
>
> thanks,
> Tom

  reply	other threads:[~2024-02-09 16:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-23 17:03 [RFC v2][PR symtab/30520 1/4] gdb/symtab: check name matches before expanding a CU Dmitry Neverov
2024-01-23 17:03 ` [RFC v2][PR symtab/30520 2/4] gdb/symtab: reuse last segment lookup name info Dmitry Neverov
2024-01-23 17:03 ` [RFC v2][PR symtab/30520 3/4] gdb/symtab: compute match_type outside the loop Dmitry Neverov
2024-01-23 17:03 ` [RFC v2][PR symtab/30520 4/4] gdb/symtab: use symbol name matcher for all segments in a qualified name Dmitry Neverov
2024-01-25  8:44 ` [RFC v2][PR symtab/30520] gdb/symtab: fix the gdb.cp/anon-struct test Dmitry Neverov
2024-02-07 20:25   ` Tom Tromey
2024-02-09 16:32     ` Dmitry Neverov [this message]
2024-02-09 19:38       ` Tom Tromey
2024-03-18 16:35         ` Dmitry Neverov
2024-03-18 17:58           ` Tom Tromey
2024-03-19 12:16             ` Dmitry Neverov
2024-03-22 17:29               ` Tom Tromey
2024-05-04  1:20                 ` Joel Brobecker
2024-05-06 14:32                   ` Dmitry Neverov

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=CAEY59_K5f0iTFUfwuB2LKpvGEOGMGrW4dDJGRuLXO3v5+LHpTw@mail.gmail.com \
    --to=dmitry.neverov@jetbrains.com \
    --cc=gdb-patches@sourceware.org \
    --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