From: Bob Manson Date: Fri, 23 May 1997 06:10:08 +0000 (+0000) Subject: Don't look at timeout unless it exists. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d8b63305a22bc34c053b0b430ec0efb8383b566a;p=binutils-gdb.git Don't look at timeout unless it exists. --- diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index b8fe4004d9e..4a55850367f 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} {