[Bug exp/34202] [gdb/exp] Namespace variable found before using statement
vries at gcc dot gnu.org
sourceware-bugzilla@sourceware.org
Thu Jun 4 12:16:24 GMT 2026
https://sourceware.org/bugzilla/show_bug.cgi?id=34202
--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
This simple patch fixes it:
...
diff --git a/gdb/namespace.c b/gdb/namespace.c
index 5b5749369ee..9e3f3b1331b 100644
--- a/gdb/namespace.c
+++ b/gdb/namespace.c
@@ -114,7 +114,7 @@ using_direct::valid_line (unsigned int boundary) const
CORE_ADDR curr_pc = get_frame_pc (get_selected_frame (nullptr));
symtab_and_line curr_sal = find_sal_for_pc (curr_pc, 0);
return (decl_line <= curr_sal.line)
- || (decl_line >= boundary);
+ || (decl_line > boundary);
}
catch (const gdb_exception &ex)
{
...
but I'm running into more trouble with the decl_line vs boundary comparison.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Gdb-prs
mailing list