Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v5 3/3] [gdb/exp] Handle recursive namespace import
Date: Tue, 12 May 2026 12:22:36 +0200	[thread overview]
Message-ID: <f379c457-68b5-4692-9d1f-5b730b135072@suse.de> (raw)
In-Reply-To: <875x56hqek.fsf@tromey.com>

On 5/1/26 9:37 PM, Tom Tromey wrote:
>>>>>> "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.

Thanks for pointing this out, fixed in a v6 ( 
https://sourceware.org/pipermail/gdb-patches/2026-May/227330.html ).

Thanks,
- Tom

      reply	other threads:[~2026-05-12 10:24 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
2026-05-12 10:22     ` Tom de Vries [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=f379c457-68b5-4692-9d1f-5b730b135072@suse.de \
    --to=tdevries@suse.de \
    --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