* [pushed] [gdb/testsuite] Fix gdb.dap/corefile.exp with Tcl 9.0
@ 2026-05-11 9:50 Tom de Vries
0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2026-05-11 9:50 UTC (permalink / raw)
To: gdb-patches
With test-case gdb.dap/corefile.exp and Tcl 9.0 I run into:
...
ERROR: tcl error sourcing gdb/testsuite/gdb.dap/corefile.exp.
ERROR: tcl error code TCL LOOKUP VARNAME reg_name
ERROR: can't read "reg_name": no such variable
while executing
"s \$$reg_name"
(in namespace eval "::ton::2json" script line 1)
invoked from within
"namespace eval ton::2json $obj"
...
Fix this by making clear that reg_name is a variable in the global namespace.
Likewise for variable new_value.
Tested on aarch64-linux.
---
gdb/testsuite/gdb.dap/corefile.exp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/testsuite/gdb.dap/corefile.exp b/gdb/testsuite/gdb.dap/corefile.exp
index 088cc82d4c8..256edcfb6fe 100644
--- a/gdb/testsuite/gdb.dap/corefile.exp
+++ b/gdb/testsuite/gdb.dap/corefile.exp
@@ -97,7 +97,7 @@ set expected_exception_count 1
if {[string is integer -strict $reg_value]} {
set new_value [expr {$reg_value + 1}]
set obj [dap_request_and_response setExpression \
- {o expression [s \$$reg_name] value [s $new_value]}]
+ {o expression [s \$$::reg_name] value [s $::new_value]}]
set response [lindex $obj 0]
gdb_assert { [dict get $response success] == "false" } \
"set register fails"
base-commit: 9c16e272180d38bcdc9ab11e812102db8b88a87e
--
2.51.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-05-11 9:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-11 9:50 [pushed] [gdb/testsuite] Fix gdb.dap/corefile.exp with Tcl 9.0 Tom de Vries
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox