]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Require Tcl 8.5
authorTom Tromey <tromey@adacore.com>
Fri, 25 Jul 2025 18:16:50 +0000 (12:16 -0600)
committerTom Tromey <tromey@adacore.com>
Mon, 8 Sep 2025 14:39:19 +0000 (08:39 -0600)
This patch changes the gdb test suite to require Tcl 8.5.  It also
removes the one pre-8.5 compatibility function.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33205
Approved-By: Simon Marchi <simon.marchi@efficios.com>
gdb/testsuite/lib/gdb.exp

index a8524bc703da66b7ac099716e1d412eb6ff9aa20..58cdd7d672c7ef82ad9497bc66322291e3fa779b 100644 (file)
@@ -15,6 +15,8 @@
 
 # This file was written by Fred Fish. (fnf@cygnus.com)
 
+package require Tcl 8.5
+
 # Generic gdb subroutines that should work for any target.  If these
 # need to be modified for any target, it can be done with a variable
 # or by passing arguments.
@@ -1695,23 +1697,6 @@ proc tcl_version_at_least { major minor {patchlevel 0} } {
                  $tcl_version_patchlevel]]
 }
 
-if { [tcl_version_at_least 8 5] == 0 } {
-    # lrepeat was added in tcl 8.5.  Only add if missing.
-    proc lrepeat { n element } {
-        if { [string is integer -strict $n] == 0 } {
-            error "expected integer but got \"$n\""
-        }
-        if { $n < 0 } {
-            error "bad count \"$n\": must be integer >= 0"
-        }
-        set res [list]
-        for {set i 0} {$i < $n} {incr i} {
-            lappend res $element
-        }
-        return $res
-    }
-}
-
 if { [tcl_version_at_least 8 6] == 0 } {
     # lmap was added in tcl 8.6.  Only add if missing.