aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/config
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-07-01 00:19:25 +0000
committerMike Frysinger <vapier@gentoo.org>2011-07-01 00:19:25 +0000
commitdb863c4274ad1ea4f04feafe45540cc1c3dc7e4f (patch)
tree16f4e88578f45bf611379801a14001138148b246 /gdb/testsuite/config
parent5429523ed4a140a870c4ea8dde0e0efd03435c26 (diff)
downloadgdb-db863c4274ad1ea4f04feafe45540cc1c3dc7e4f.zip
gdb-db863c4274ad1ea4f04feafe45540cc1c3dc7e4f.tar.gz
gdb-db863c4274ad1ea4f04feafe45540cc1c3dc7e4f.tar.bz2
gdb: tests: set remotetimeout to gdb_load_timeout for remote targets
Rather than relying on the default remotetimeout value (which might be too small for some slower devices), use the existing gdb_load_timeout config option to set it. This adds two new helpers for getting/setting the remotetimout to keep the new logic simple. Signed-off-by: Jie Zhang <jie.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'gdb/testsuite/config')
-rw-r--r--gdb/testsuite/config/monitor.exp16
1 files changed, 15 insertions, 1 deletions
diff --git a/gdb/testsuite/config/monitor.exp b/gdb/testsuite/config/monitor.exp
index be98f1a..ca11600 100644
--- a/gdb/testsuite/config/monitor.exp
+++ b/gdb/testsuite/config/monitor.exp
@@ -226,6 +226,12 @@ proc gdb_load { arg } {
set loadtimeout 1600
}
+ if [is_remote target] {
+ set oldremotetimeout [get_remotetimeout]
+ set_remotetimeout $loadtimeout
+ }
+
+ set load_ok 0
send_gdb $command;
gdb_expect $loadtimeout {
-re "\[Ff\]ailed.*$gdb_prompt $" {
@@ -235,7 +241,7 @@ proc gdb_load { arg } {
}
-re "$gdb_prompt $" {
verbose "Loaded $farg into $GDB\n"
- return 0;
+ set load_ok 1
}
timeout {
if { $verbose > 1 } {
@@ -243,6 +249,14 @@ proc gdb_load { arg } {
}
}
}
+
+ if [is_remote target] {
+ set_remotetimeout $oldremotetimeout
+ }
+
+ if { $load_ok == 1 } {
+ return 0;
+ }
}
# Make sure we don't have an open connection to the target.