From: Keith Seitz <keiths@redhat.com>
To: Sendao Yan <yansendao@126.com>, gdb-patches@sourceware.org
Cc: Andrew Burgess <aburgess@redhat.com>
Subject: Re: [PATCH] [gdb/symtab] Fall back to symtabs when the quick lookup misses
Date: Fri, 20 Nov 2026 11:46:24 -0800 [thread overview]
Message-ID: <d862012b-5344-4483-8611-034051e5635b@redhat.com> (raw)
In-Reply-To: <xhuyfse0v2wcm.fsf@aburgess-thinkpadp1gen8.rmtgb.csb>
Hi,
I'd also like to ask a question or two...
On 11/20/26 10:26 AM, Andrew Burgess wrote:
> Sendao Yan <yansendao@126.com> writes:
>
>> lookup_symbol_in_objfile has only searched the cooked index since commit
>> 86ac8c546235 ("Convert lookup_symbol_in_objfile"). The index stores the
>> DWARF spelling of a name, so a DWARF5 static constexpr member of a
>> template instantiation can be missed when the C++ expression evaluator
>> looks it up using canonicalised template arguments: GCC records
>> std::ratio<1, 1> but the lookup uses std::ratio<1l, 1l>.
This "std::ratio<1, 1>" vs "std::ratio<1l, 1l>" is exactly
what canonicalization is supposed to address. Both symbol
names from the compiler and user input should be canonicalized.
> Can you talk more about why this bug cannot be fixed in the quick syms
> lookup path. At the very least, if we are baking in a known limitation
> (reliance on expanded symtabs), then this should be documented in both
> the commit message and code comments.
I really wonder whether there is some canonicalization that isn't
happening. From the description, it sounds like the compiler's
name for the symbol was not canonicalized.
Keith
next prev parent reply other threads:[~2026-11-20 19:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 9:18 Sendao Yan
2026-11-20 18:26 ` Andrew Burgess
2026-11-20 19:46 ` Keith Seitz [this message]
2026-11-21 0:50 ` Tom Tromey
2026-11-21 3:53 ` Simon Marchi
2026-11-21 16:31 ` Tom Tromey
2026-11-22 12:03 ` [PATCH v3 0/1] [gdb/symtab] Add canonical-name aliases for C++ template static members Sendao Yan
2026-11-22 12:03 ` [PATCH v3 1/1] " Sendao Yan
2026-11-23 2:09 ` [PATCH v4 0/1] " Sendao Yan
2026-11-23 2:09 ` [PATCH v4 1/1] " Sendao Yan
2026-11-21 14:59 ` [PATCH v2] " Sendao Yan
2026-11-21 15:07 ` Sendao Yan
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=d862012b-5344-4483-8611-034051e5635b@redhat.com \
--to=keiths@redhat.com \
--cc=aburgess@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=yansendao@126.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