Re: [PATCH v3 2/2] [gdb/exp] Fix ignoring of incorrect namespace prefix

Tom Tromey
2026-04-14T18:27:04Z

>>>>> "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.

Tom