]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Require Tcl 8.6.2
authorTom Tromey <tromey@adacore.com>
Mon, 28 Jul 2025 16:06:00 +0000 (10:06 -0600)
committerTom Tromey <tromey@adacore.com>
Mon, 8 Sep 2025 14:39:19 +0000 (08:39 -0600)
This changes the gdb test suite to require Tcl 8.6.2.  This allows the
removal of some more compatibility code.

I wrote this as a separate patch so make it simpler to drop if some
platform only provides Tcl 8.5.  According to research in the bug,
though, it seems like this isn't likely.

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

index 914e10c68d626af85beb0ec242a7133e6fefe1d0..ece164a0ea7db30b846c45d699e4735b3fd418f5 100644 (file)
@@ -45,15 +45,12 @@ gdb_test "tui new-layout example src 1 src 1" \
 gdb_test "tui new-layout example src 1" \
     "New layout does not contain the \"cmd\" window"
 
-# Avoid unbalanced curly braces problems with tcl 8.5.
-if { [tcl_version_at_least 8 6] } {
-    gdb_test "tui new-layout example src 1\}" \
-       "Extra '\}' in layout specification"
-    gdb_test "tui new-layout example {src 1} 1\}" \
-       "Extra '\}' in layout specification"
-    gdb_test "tui new-layout example \{src 1" \
-       "Missing '\}' in layout specification"
-}
+gdb_test "tui new-layout example src 1\}" \
+    "Extra '\}' in layout specification"
+gdb_test "tui new-layout example {src 1} 1\}" \
+    "Extra '\}' in layout specification"
+gdb_test "tui new-layout example \{src 1" \
+    "Missing '\}' in layout specification"
 
 # Each entry of this list describes a layout, and some associated
 # tests.  The items within each entry are:
index b5092c6132bb9ae093b81da80570b8452feb6403..930462f63faeafca2e076322b9509c32066a0319 100644 (file)
@@ -15,7 +15,7 @@
 
 # This file was written by Fred Fish. (fnf@cygnus.com)
 
-package require Tcl 8.5
+package require Tcl 8.6.2
 
 # 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
@@ -1685,44 +1685,6 @@ proc tcl_version_at_least { major minor {patchlevel 0} } {
     return [expr {[package vcompare $current_version $min_version] >= 0}]
 }
 
-if { [tcl_version_at_least 8 6] == 0 } {
-    # lmap was added in tcl 8.6.  Only add if missing.
-
-    # Note that we only implement the simple variant for now.
-    proc lmap { varname list body } {
-       set res {}
-       foreach val $list {
-           uplevel 1 "set $varname $val"
-           lappend res [uplevel 1 $body]
-       }
-
-       return $res
-    }
-
-    # ::tcl_platform(pathSeparator) was added in 8.6.
-    switch $::tcl_platform(platform) {
-       windows {
-           set ::tcl_platform(pathSeparator) ;
-       }
-       default {
-           set ::tcl_platform(pathSeparator) :
-       }
-    }
-}
-
-if { [tcl_version_at_least 8 6 2] == 0 } {
-    # string cat was added in tcl 8.6.2.  Only add if missing.
-
-    rename string tcl_proc_string
-
-    proc string { what args } {
-       if { $what == "cat" } {
-           return [join $args ""]
-       }
-       return [tcl_proc_string $what {*}$args]
-    }
-}
-
 # gdb_test_no_output [-prompt PROMPT_REGEXP] [-nopass] COMMAND [MESSAGE]
 # Send a command to GDB and verify that this command generated no output.
 #
@@ -3029,11 +2991,6 @@ gdb_caching_proc allow_dap_tests {} {
        return 0
     }
 
-    # ton.tcl uses "string is entier", supported starting tcl 8.6.
-    if { ![tcl_version_at_least 8 6] } {
-       return 0
-    }
-
     # With set auto-connect-native-target off, we run into:
     # +++ run
     # Traceback (most recent call last):