aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.server
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/gdb.server
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/gdb.server')
-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
5 files changed, 20 insertions, 0 deletions
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