47 lines
1.6 KiB
Diff
47 lines
1.6 KiB
Diff
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
|
From: Tom de Vries <tdevries@suse.de>
|
|
Date: Fri, 20 Mar 2026 10:13:27 +0100
|
|
Subject: gdb-fix-testsuite-newer-tcl.patch
|
|
|
|
;; Fix use of deprecated trace variable subcommand
|
|
;; (Tom de Vries)
|
|
|
|
With Tcl 9.0, we get:
|
|
...
|
|
bad option "variable": must be add, info, or remove
|
|
while executing
|
|
"trace variable "boards_dir" w append_gdb_boards_dir"
|
|
(file "lib/append_gdb_boards_dir.exp" line 48)
|
|
...
|
|
|
|
The trace subcommand "trace variable <name> <ops> <command>" [1]:
|
|
- is equivalent to "trace add variable <name> <ops> <command>"
|
|
- is for backwards compatibility,
|
|
- uses "an older syntax in which array, read, write, unset are replaced by a,
|
|
r, w and u respectively",
|
|
- has an ops argument which is "not a list, but simply a string concatenation
|
|
of the operations", and
|
|
- is "deprecated and will likely be removed in a future version of Tcl".
|
|
|
|
Fix this by using "trace add variable":
|
|
...
|
|
-trace variable "boards_dir" w append_gdb_boards_dir
|
|
+trace add variable "boards_dir" {write} append_gdb_boards_dir
|
|
...
|
|
|
|
Approved-By: Tom Tromey <tom@tromey.com>
|
|
|
|
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33948
|
|
|
|
[1] https://www.tcl-lang.org/man/tcl8.6/TclCmd/trace.htm#M27
|
|
|
|
diff --git a/gdb/testsuite/lib/append_gdb_boards_dir.exp b/gdb/testsuite/lib/append_gdb_boards_dir.exp
|
|
--- a/gdb/testsuite/lib/append_gdb_boards_dir.exp
|
|
+++ b/gdb/testsuite/lib/append_gdb_boards_dir.exp
|
|
@@ -45,4 +45,4 @@ proc append_gdb_boards_dir { name1 name2 op } {
|
|
}
|
|
lappend boards_dir "${gdb_boards_dir}"
|
|
}
|
|
-trace variable "boards_dir" w append_gdb_boards_dir
|
|
+trace add variable "boards_dir" {write} append_gdb_boards_dir
|