public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Andrew Burgess <aburgess@redhat.com>,
	Tom Tromey via Gdb-patches <gdb-patches@sourceware.org>
Cc: Tom Tromey <tromey@adacore.com>
Subject: Re: [PATCH] Fix comparator bug in cooked index
Date: Mon, 30 Jan 2023 10:15:18 -0500	[thread overview]
Message-ID: <60b3975e-31ff-19a6-845a-f8f0d2385c19@simark.ca> (raw)
In-Reply-To: <87ilgouxac.fsf@redhat.com>

> I think you should replace "template" with "'<'" here.  The handling is
> not limited to template argument blocks, but to anything after a '<'.
> So languages that don't have templates will be impacted, as will things
> like 'operator<', 'operator<<', etc in C++.
> 
> This is all fine, returning false positives from the index is clearly
> OK, we do the exact matching back in core GDB once the symbols are
> expanded, but I don't think we should give the impression that this code
> is actually checking for / skipping template arguments, when all it's
> really doing is giving up on matching at a '<' (which, again, is fine).
> 
> I don't know if it's worth explicitly stating that the '<' handling is
> just a rough heuristic?  All the examples you give are template based,
> so the comment does leave the impression that the compare function does
> some smart detection/handling of template blocks.
> 
> Also, it might be worth saying why its fine that we do this C++ specific
> '<' handling for all languages.
> 
> On a similar theme, it might be worth saying why a case-insensitive
> match is fine, even for languages where symbols are case-sensitive.
> 
> For me, when I started looking at this code, these were all the
> questions that I had.  After some thought I figured out the answers, but
> I had to dig into other parts of GDB to confirm them.  It would have
> been useful for me if the comments had covered all this stuff.

Thanks for the precisions, I wasn't aware of all of that.

Simon


      reply	other threads:[~2023-01-30 15:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-27 19:56 Tom Tromey
2023-01-28  4:20 ` Simon Marchi
2023-01-30 14:30   ` Tom Tromey
2023-01-30 10:33 ` Andrew Burgess
2023-01-30 15:15   ` Simon Marchi [this message]

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=60b3975e-31ff-19a6-845a-f8f0d2385c19@simark.ca \
    --to=simark@simark.ca \
    --cc=aburgess@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@adacore.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).