From: Tom Tromey <tom@tromey.com>
To: Tom de Vries <tdevries@suse.de>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v5 3/3] [gdb/exp] Handle recursive namespace import
Date: Fri, 01 May 2026 13:37:55 -0600 [thread overview]
Message-ID: <875x56hqek.fsf@tromey.com> (raw)
In-Reply-To: <20260419081236.570600-4-tdevries@suse.de> (Tom de Vries's message of "Sun, 19 Apr 2026 10:12:36 +0200")
>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
Tom> Fix this by additionally iterating over the super blocks instead of only using
Tom> the current block.
FWIW I haven't really commented much on the core part of this series
because I find this code pretty confusing and I'm not really sure I
understand it well enough to do a good job reviewing it.
Tom> + for (const struct block *b = block; b != nullptr;
Tom> + b = b->superblock ())
Tom> + cp_lookup_symbol_via_imports (current->import_src, name,
Tom> + b, domain, 1, 0, 0,
In this spot, suppose 'block' is from an inlined function. Then when
iterating, I think we'll end up seeing blocks from the enclosing
function (the one that was inlined-into). However, that could yield the
wrong result, because the inlined and inlined-into functions could come
from completely different namespace contexts with different 'using'
directives.
Tom
next prev parent reply other threads:[~2026-05-01 19:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-19 8:12 [PATCH v5 0/3] [gdb/exp] Fix some namespace issues Tom de Vries
2026-04-19 8:12 ` [PATCH v5 1/3] [gdb] Break up complex assignment in cp_lookup_symbol_via_imports Tom de Vries
2026-04-19 8:12 ` [PATCH v5 2/3] [gdb/exp] Fix ignoring of incorrect namespace prefix Tom de Vries
2026-05-01 19:44 ` Tom Tromey
2026-05-12 10:15 ` Tom de Vries
2026-05-12 10:24 ` Tom de Vries
2026-04-19 8:12 ` [PATCH v5 3/3] [gdb/exp] Handle recursive namespace import Tom de Vries
2026-05-01 19:37 ` Tom Tromey [this message]
2026-05-12 10:22 ` Tom de Vries
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=875x56hqek.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
--cc=tdevries@suse.de \
/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