mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-23 11:39:26 +08:00
lib/gdb.exp(gdb_expect): Handle getting a value for $timeout
more gracefully.
This commit is contained in:
@ -1,7 +1,8 @@
|
|||||||
Tue Jun 17 13:10:10 1997 Bob Manson <manson@charmed.cygnus.com>
|
Tue Jun 17 13:10:10 1997 Bob Manson <manson@charmed.cygnus.com>
|
||||||
|
|
||||||
* lib/gdb.exp(gdb_expect): Declare errorInfo and errorCode
|
* lib/gdb.exp(gdb_expect): Declare errorInfo and errorCode as
|
||||||
as global variables.
|
global variables. Handle getting a value for $timeout more
|
||||||
|
gracefully.
|
||||||
|
|
||||||
Sat Jun 14 09:23:26 1997 Bob Manson <manson@charmed.cygnus.com>
|
Sat Jun 14 09:23:26 1997 Bob Manson <manson@charmed.cygnus.com>
|
||||||
|
|
||||||
|
@ -859,22 +859,25 @@ proc gdb_expect { args } {
|
|||||||
upvar timeout timeout
|
upvar timeout timeout
|
||||||
if [target_info exists gdb,timeout] {
|
if [target_info exists gdb,timeout] {
|
||||||
if [info exists timeout] {
|
if [info exists timeout] {
|
||||||
set oldt $timeout;
|
|
||||||
if { $timeout < [target_info gdb,timeout] } {
|
if { $timeout < [target_info gdb,timeout] } {
|
||||||
set timeout [target_info gdb,timeout];
|
set gtimeout [target_info gdb,timeout];
|
||||||
|
} else {
|
||||||
|
set gtimeout $timeout;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
set timeout [target_info gdb,timeout];
|
set gtimeout [target_info gdb,timeout];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
set code [catch {uplevel remote_expect host $timeout $args} string];
|
if ![info exists gtimeout] {
|
||||||
if [target_info exists gdb,timeout] {
|
global timeout;
|
||||||
if [info exists oldt] {
|
if [info exists timeout] {
|
||||||
set timeout $oldt
|
set gtimeout $timeout;
|
||||||
} else {
|
} else {
|
||||||
unset timeout
|
# Eeeeew.
|
||||||
|
set gtimeout 60;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
set code [catch {uplevel remote_expect host $gtimeout $args} string];
|
||||||
|
|
||||||
if {$code == 1} {
|
if {$code == 1} {
|
||||||
global errorInfo errorCode;
|
global errorInfo errorCode;
|
||||||
|
Reference in New Issue
Block a user