summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alves <pedro@codesourcery.com>2012-02-15 12:51:17 +0000
committerPedro Alves <pedro@codesourcery.com>2012-02-15 12:51:17 +0000
commit8cdab31fb7aa3f84a27f8614703ceb0559da3605 (patch)
tree38f13988c29a278470203e6863fd608db3745c74
parent9d3d69a8dba50601e15a9e153dddff3fc3e304bd (diff)
downloadgdb-8cdab31fb7aa3f84a27f8614703ceb0559da3605.tar.gz
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.
-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 86da87fbf18..5816b0d33eb 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 d9c7c0cdc7a..8cfcaaf4f77 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 163e0cfb6e5..53938ca41ef 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 6b48b0236e0..12e8f26a7bc 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 ffe95bc7b9f..ca9ee3ed69a 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 f9a41e9cf36..88031e7aa35 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 6d3a0e56e1c..ee66e48260a 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