From 5d1323544e7deb3fc75b8df14556c1bdbb416340 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 25 Jul 2025 12:16:50 -0600 Subject: Require Tcl 8.5 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 --- gdb/testsuite/lib/gdb.exp | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) (limited to 'gdb') diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index a8524bc..58cdd7d 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -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. -- cgit v1.1