diff options
author | Maciej W. Rozycki <macro@linux-mips.org> | 2008-02-29 15:40:20 +0000 |
---|---|---|
committer | Maciej W. Rozycki <macro@linux-mips.org> | 2008-02-29 15:40:20 +0000 |
commit | 2f34202fde9c2bb70910463b6bdc2c8d4960497b (patch) | |
tree | 74f32cfb49b0680c499b404f6fc3477f636f491b /gdb | |
parent | 7b2185f9454e66b2eeaba48b13ccbfbd2d7171eb (diff) | |
download | gdb-2f34202fde9c2bb70910463b6bdc2c8d4960497b.zip gdb-2f34202fde9c2bb70910463b6bdc2c8d4960497b.tar.gz gdb-2f34202fde9c2bb70910463b6bdc2c8d4960497b.tar.bz2 |
* lib/gdb.exp (gdb_expect): Of all the timeouts provided always
select the largest.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/lib/gdb.exp | 46 |
2 files changed, 33 insertions, 18 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index f2c590e..3886227 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2008-02-29 Maciej W. Rozycki <macro@mips.com> + + * lib/gdb.exp (gdb_expect): Of all the timeouts provided always + select the largest. + 2008-02-28 Daniel Jacobowitz <dan@codesourcery.com> * gdb.base/annota1.exp, gdb.cp/annota2.exp: Update for fewer diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index cbfa253..0c0eafc 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -1776,34 +1776,44 @@ proc send_gdb { string } { proc gdb_expect { args } { if { [llength $args] == 2 && [lindex $args 0] != "-re" } { - set gtimeout [lindex $args 0]; + set atimeout [lindex $args 0]; set expcode [list [lindex $args 1]]; } else { - upvar timeout timeout; - set expcode $args; - if [target_info exists gdb,timeout] { - if [info exists timeout] { - if { $timeout < [target_info gdb,timeout] } { - set gtimeout [target_info gdb,timeout]; - } else { - set gtimeout $timeout; - } - } else { + } + + upvar timeout timeout; + + if [target_info exists gdb,timeout] { + if [info exists timeout] { + if { $timeout < [target_info gdb,timeout] } { set gtimeout [target_info gdb,timeout]; + } else { + set gtimeout $timeout; } + } else { + set gtimeout [target_info gdb,timeout]; } + } + if ![info exists gtimeout] { + global timeout; + if [info exists timeout] { + set gtimeout $timeout; + } + } + + if [info exists atimeout] { + if { ![info exists gtimeout] || $gtimeout < $atimeout } { + set $gtimeout $atimeout; + } + } else { if ![info exists gtimeout] { - global timeout; - if [info exists timeout] { - set gtimeout $timeout; - } else { - # Eeeeew. - set gtimeout 60; - } + # Eeeeew. + set gtimeout 60; } } + global suppress_flag; global remote_suppress_flag; if [info exists remote_suppress_flag] { |