[Bug exp/34034] GDB fails to evaluate Fortran module variables
vries at gcc dot gnu.org
sourceware-bugzilla@sourceware.org
Fri Apr 17 13:19:38 GMT 2026
https://sourceware.org/bugzilla/show_bug.cgi?id=34034
--- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> ---
Tentative patch:
...
diff --git a/gdb/cp-namespace.c b/gdb/cp-namespace.c
index d7a960127dc..a0d86fd26f0 100644
--- a/gdb/cp-namespace.c
+++ b/gdb/cp-namespace.c
@@ -502,9 +502,11 @@ cp_lookup_symbol_via_imports (const char *scope,
/* If this import statement creates no alias, pass
current->inner as NAMESPACE to direct the search
towards the imported namespace. */
- cp_lookup_symbol_via_imports (current->import_src, name,
- block, domain, 1, 0, 0,
- found_symbols);
+ for (const struct block *b = block; b != nullptr;
+ b = b->superblock ())
+ cp_lookup_symbol_via_imports (current->import_src, name,
+ b, domain, 1, 0, 0,
+ found_symbols);
}
}
...
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Gdb-prs
mailing list