mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-12-14 15:50:34 +00:00
Don't look at timeout unless it exists.
This commit is contained in:
parent
c55809ce2d
commit
d8b63305a2
@ -856,12 +856,18 @@ proc send_gdb { string } {
|
|||||||
proc gdb_expect { args } {
|
proc gdb_expect { args } {
|
||||||
upvar timeout timeout
|
upvar timeout timeout
|
||||||
if [target_info exists gdb,timeout] {
|
if [target_info exists gdb,timeout] {
|
||||||
set oldt $timeout
|
if [info exists timeout] {
|
||||||
|
set oldt $timeout
|
||||||
|
}
|
||||||
set timeout [target_info gdb,timeout];
|
set timeout [target_info gdb,timeout];
|
||||||
}
|
}
|
||||||
set code [catch {uplevel remote_expect host $args} string];
|
set code [catch {uplevel remote_expect host $args} string];
|
||||||
if [info exists oldt] {
|
if [target_info exists gdb,timeout] {
|
||||||
set timeout oldt
|
if [info exists oldt] {
|
||||||
|
set timeout oldt
|
||||||
|
} else {
|
||||||
|
unset timeout
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if {$code == 1} {
|
if {$code == 1} {
|
||||||
|
Loading…
Reference in New Issue
Block a user