aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2012-02-15 12:51:17 +0000
committerPedro Alves <palves@redhat.com>2012-02-15 12:51:17 +0000
commita1999d402252588a8087f705f21da889135a222c (patch)
treeef271b017ea848da40ea786979f088403c684fd4 /gdb/testsuite
parent7cee1e5405310dae3ab7f6356d56f6b5f69e4b2c (diff)
downloadgdb-a1999d402252588a8087f705f21da889135a222c.zip
gdb-a1999d402252588a8087f705f21da889135a222c.tar.gz
gdb-a1999d402252588a8087f705f21da889135a222c.tar.bz2
2012-02-15 Pedro Alves <palves@redhat.com>
* gdb.server/ext-attach.exp: Make sure gdb is disconnected. * gdb.server/ext-run.exp: Make sure gdb is disconnected. * gdb.server/file-transfer.exp: Make sure gdb is disconnected. * gdb.server/server-mon.exp: Make sure gdb is disconnected. * gdb.server/server-run.exp: Make sure gdb is disconnected. * lib/gdbserver-support.exp (gdbserver_start_extended): Only prepend "extended-" to $gdbserver_protocol if $gdbserver_protocol doesn't start with "extended-" already.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog11
-rw-r--r--gdb/testsuite/gdb.server/ext-attach.exp4
-rw-r--r--gdb/testsuite/gdb.server/ext-run.exp4
-rw-r--r--gdb/testsuite/gdb.server/file-transfer.exp4
-rw-r--r--gdb/testsuite/gdb.server/server-mon.exp4
-rw-r--r--gdb/testsuite/gdb.server/server-run.exp4
-rw-r--r--gdb/testsuite/lib/gdbserver-support.exp5
7 files changed, 35 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 86da87f..5816b0d 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,16 @@
2012-02-15 Pedro Alves <palves@redhat.com>
+ * gdb.server/ext-attach.exp: Make sure gdb is disconnected.
+ * gdb.server/ext-run.exp: Make sure gdb is disconnected.
+ * gdb.server/file-transfer.exp: Make sure gdb is disconnected.
+ * gdb.server/server-mon.exp: Make sure gdb is disconnected.
+ * gdb.server/server-run.exp: Make sure gdb is disconnected.
+ * lib/gdbserver-support.exp (gdbserver_start_extended): Only
+ prepend "extended-" to $gdbserver_protocol if $gdbserver_protocol
+ doesn't start with "extended-" already.
+
+2012-02-15 Pedro Alves <palves@redhat.com>
+
Support extended-remote. Avoid cascading timeouts.
* gdb.base/attach.exp (do_attach_tests): Add expected output for
diff --git a/gdb/testsuite/gdb.server/ext-attach.exp b/gdb/testsuite/gdb.server/ext-attach.exp
index d9c7c0c..8cfcaaf 100644
--- a/gdb/testsuite/gdb.server/ext-attach.exp
+++ b/gdb/testsuite/gdb.server/ext-attach.exp
@@ -42,6 +42,10 @@ gdb_start
gdb_load $binfile
gdb_reinitialize_dir $srcdir/$subdir
+# Make sure we're disconnected, in case we're testing with an
+# extended-remote board, therefore already connected.
+gdb_test "disconnect" ".*"
+
set target_exec [gdbserver_download_current_prog]
gdbserver_start_extended
diff --git a/gdb/testsuite/gdb.server/ext-run.exp b/gdb/testsuite/gdb.server/ext-run.exp
index 163e0cf..53938ca 100644
--- a/gdb/testsuite/gdb.server/ext-run.exp
+++ b/gdb/testsuite/gdb.server/ext-run.exp
@@ -40,6 +40,10 @@ gdb_start
gdb_load $binfile
gdb_reinitialize_dir $srcdir/$subdir
+# Make sure we're disconnected, in case we're testing with an
+# extended-remote board, therefore already connected.
+gdb_test "disconnect" ".*"
+
set target_exec [gdbserver_download_current_prog]
gdbserver_start_extended
diff --git a/gdb/testsuite/gdb.server/file-transfer.exp b/gdb/testsuite/gdb.server/file-transfer.exp
index 6b48b02..12e8f26 100644
--- a/gdb/testsuite/gdb.server/file-transfer.exp
+++ b/gdb/testsuite/gdb.server/file-transfer.exp
@@ -36,6 +36,10 @@ gdb_start
gdb_load $binfile
gdb_reinitialize_dir $srcdir/$subdir
+# Make sure we're disconnected, in case we're testing with an
+# extended-remote board, therefore already connected.
+gdb_test "disconnect" ".*"
+
gdbserver_run ""
proc test_file_transfer { filename description } {
diff --git a/gdb/testsuite/gdb.server/server-mon.exp b/gdb/testsuite/gdb.server/server-mon.exp
index ffe95bc..ca9ee3e 100644
--- a/gdb/testsuite/gdb.server/server-mon.exp
+++ b/gdb/testsuite/gdb.server/server-mon.exp
@@ -36,6 +36,10 @@ gdb_start
gdb_load $binfile
gdb_reinitialize_dir $srcdir/$subdir
+# Make sure we're disconnected, in case we're testing with an
+# extended-remote board, therefore already connected.
+gdb_test "disconnect" ".*"
+
gdbserver_run ""
gdb_test_multiple "monitor help" "monitor help" {
diff --git a/gdb/testsuite/gdb.server/server-run.exp b/gdb/testsuite/gdb.server/server-run.exp
index f9a41e9..88031e7 100644
--- a/gdb/testsuite/gdb.server/server-run.exp
+++ b/gdb/testsuite/gdb.server/server-run.exp
@@ -35,6 +35,10 @@ gdb_exit
gdb_start
gdb_load $binfile
+# Make sure we're disconnected, in case we're testing with an
+# extended-remote board, therefore already connected.
+gdb_test "disconnect" ".*"
+
gdbserver_run ""
gdb_reinitialize_dir $srcdir/$subdir
diff --git a/gdb/testsuite/lib/gdbserver-support.exp b/gdb/testsuite/lib/gdbserver-support.exp
index 6d3a0e5..ee66e48 100644
--- a/gdb/testsuite/lib/gdbserver-support.exp
+++ b/gdb/testsuite/lib/gdbserver-support.exp
@@ -364,7 +364,10 @@ proc gdbserver_start_extended { } {
global use_gdb_stub
set res [gdbserver_start "--multi" ""]
- set gdbserver_protocol "extended-[lindex $res 0]"
+ set gdbserver_protocol [lindex $res 0]
+ if { [string first "extended-" $gdbserver_protocol] != 0} {
+ set gdbserver_protocol "extended-$gdbserver_protocol"
+ }
set gdbserver_gdbport [lindex $res 1]
# Even if the board file is testing with target remote, our caller