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 v3 2/2] [gdb/exp] Fix ignoring of incorrect namespace prefix
Date: Wed, 15 Apr 2026 12:12:20 +0200	[thread overview]
Message-ID: <0ffc110b-1475-43fc-b5f8-6ce4fc2e8d73@suse.de> (raw)
In-Reply-To: <87fr4xv1o3.fsf@tromey.com>

On 4/14/26 8:26 PM, Tom Tromey wrote:
>>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
> 
> Tom> @@ -431,7 +431,14 @@ cp_lookup_symbol_via_imports (const char *scope,
> 
> I find this function and related functions pretty hard to follow, so I'm
> not really sure about the bug or the patch, but:
> 
> Tom> +	      const char *current_scope = (block->function () != nullptr
> Tom> +					   ? block->scope ()
> Tom> +					   : nullptr /* Don't know.  */);
> 
> ... this line struck me as a bit weird, in that block->function() isn't
> set for all blocks inside a function, so this would mean that stepping
> into some nested block would seem to reproduce the bug again.

Hi Tom,

thanks for the review.

I've extended the test-case with the nested block scenario you describe, 
and indeed the bug reproduced again.  I've fixed that by checking for 
"block->function_block () != nullptr" instead.

V4 submitted here ( 
https://sourceware.org/pipermail/gdb-patches/2026-April/226488.html ).

Thanks,
- Tom


      reply	other threads:[~2026-04-15 10:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-10 12:11 [PATCH v3 0/2] " Tom de Vries
2026-04-10 12:11 ` [PATCH v3 1/2] [gdb] Break up complex assignment in cp_lookup_symbol_via_imports Tom de Vries
2026-04-14 17:49   ` Tom Tromey
2026-04-10 12:11 ` [PATCH v3 2/2] [gdb/exp] Fix ignoring of incorrect namespace prefix Tom de Vries
2026-04-14 18:26   ` Tom Tromey
2026-04-15 10:12     ` 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=0ffc110b-1475-43fc-b5f8-6ce4fc2e8d73@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