diff options
author | Bob Manson <manson@cygnus> | 1997-05-23 06:10:08 +0000 |
---|---|---|
committer | Bob Manson <manson@cygnus> | 1997-05-23 06:10:08 +0000 |
commit | d8b63305a22bc34c053b0b430ec0efb8383b566a (patch) | |
tree | 6cc31673982fcce81f7b9f126d38ecf966970dae /gdb | |
parent | c55809ce2dc022c3a8638aaa0f0f983fd4ce6cdf (diff) | |
download | gdb-d8b63305a22bc34c053b0b430ec0efb8383b566a.zip gdb-d8b63305a22bc34c053b0b430ec0efb8383b566a.tar.gz gdb-d8b63305a22bc34c053b0b430ec0efb8383b566a.tar.bz2 |
Don't look at timeout unless it exists.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/lib/gdb.exp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index b8fe400..4a55850 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -856,12 +856,18 @@ proc send_gdb { string } { proc gdb_expect { args } { upvar timeout timeout if [target_info exists gdb,timeout] { - set oldt $timeout + if [info exists timeout] { + set oldt $timeout + } set timeout [target_info gdb,timeout]; } set code [catch {uplevel remote_expect host $args} string]; - if [info exists oldt] { - set timeout oldt + if [target_info exists gdb,timeout] { + if [info exists oldt] { + set timeout oldt + } else { + unset timeout + } } if {$code == 1} { |