aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/lib/future.exp
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2012-07-25 20:17:59 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2012-07-25 20:17:59 +0000
commit9cc8e32c67048524f87488aec68cee059c242613 (patch)
tree9893911e7eb160be20371ca7ea96e3f59c94bf90 /gdb/testsuite/lib/future.exp
parentaec8845cae511168303528f7afd5f5aba22a5c4c (diff)
downloadgdb-9cc8e32c67048524f87488aec68cee059c242613.zip
gdb-9cc8e32c67048524f87488aec68cee059c242613.tar.gz
gdb-9cc8e32c67048524f87488aec68cee059c242613.tar.bz2
gdb/testsuite/
Fix compatibility with Tcl before 7.5. * lib/future.exp (lreverse): New function if it does not exist.
Diffstat (limited to 'gdb/testsuite/lib/future.exp')
-rw-r--r--gdb/testsuite/lib/future.exp13
1 files changed, 13 insertions, 0 deletions
diff --git a/gdb/testsuite/lib/future.exp b/gdb/testsuite/lib/future.exp
index bf47988..226a690 100644
--- a/gdb/testsuite/lib/future.exp
+++ b/gdb/testsuite/lib/future.exp
@@ -521,3 +521,16 @@ if {$use_gdb_compile} {
catch {rename default_target_compile {}}
rename gdb_default_target_compile default_target_compile
}
+
+
+# Provide 'lreverse' missing in Tcl before 7.5.
+
+if {[info procs lreverse] == ""} {
+ proc lreverse { arg } {
+ set retval {}
+ while { [llength $retval] < [llength $arg] } {
+ lappend retval [lindex $arg end-[llength $retval]]
+ }
+ return $retval
+ }
+}