Make sure we keep the old value of timeout set properly.

This commit is contained in:
Bob Manson 1997-05-23 06:15:46 +00:00
parent d8b63305a2
commit 19d31cb3e8
1 changed files with 7 additions and 3 deletions

View File

@ -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
}