aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Manson <manson@cygnus>1997-05-23 06:15:46 +0000
committerBob Manson <manson@cygnus>1997-05-23 06:15:46 +0000
commit19d31cb3e82d4cf06ef7e593148b46234b1ac2ab (patch)
tree1fb28519313b96b78491b329bcd6850e615483ac
parentd8b63305a22bc34c053b0b430ec0efb8383b566a (diff)
downloadgdb-19d31cb3e82d4cf06ef7e593148b46234b1ac2ab.zip
gdb-19d31cb3e82d4cf06ef7e593148b46234b1ac2ab.tar.gz
gdb-19d31cb3e82d4cf06ef7e593148b46234b1ac2ab.tar.bz2
Make sure we keep the old value of timeout set properly.
-rw-r--r--gdb/testsuite/lib/gdb.exp10
1 files changed, 7 insertions, 3 deletions
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 4a55850..0a44f6d 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -857,14 +857,18 @@ proc gdb_expect { args } {
upvar timeout timeout
if [target_info exists gdb,timeout] {
if [info exists timeout] {
- set oldt $timeout
+ set oldt $timeout;
+ if { $timeout < [target_info gdb,timeout] } {
+ set timeout [target_info gdb,timeout];
+ }
+ } else {
+ set timeout [target_info gdb,timeout];
}
- set timeout [target_info gdb,timeout];
}
set code [catch {uplevel remote_expect host $args} string];
if [target_info exists gdb,timeout] {
if [info exists oldt] {
- set timeout oldt
+ set timeout $oldt
} else {
unset timeout
}