From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [pushed] [gdb/testsuite] Fix gdb.dap/corefile.exp with Tcl 9.0
Date: Mon, 11 May 2026 11:50:32 +0200 [thread overview]
Message-ID: <20260511095032.2605528-1-tdevries@suse.de> (raw)
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
reply other threads:[~2026-05-11 9:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260511095032.2605528-1-tdevries@suse.de \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
/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