2012-02-15 Pedro Alves <palves@redhat.com>
authorPedro Alves <palves@redhat.com>
Wed, 15 Feb 2012 12:51:17 +0000 (12:51 +0000)
committerPedro Alves <palves@redhat.com>
Wed, 15 Feb 2012 12:51:17 +0000 (12:51 +0000)
* 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.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.server/ext-attach.exp
gdb/testsuite/gdb.server/ext-run.exp
gdb/testsuite/gdb.server/file-transfer.exp
gdb/testsuite/gdb.server/server-mon.exp
gdb/testsuite/gdb.server/server-run.exp
gdb/testsuite/lib/gdbserver-support.exp

index 86da87fbf18db69925ec99e5a3cbb87539a4b88e..5816b0d33eb79d1b9bad652ca15ec9a82738985b 100644 (file)
@@ -1,3 +1,14 @@
+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.
index d9c7c0cdc7ad2579f6992437434744c5f7c0c55b..8cfcaaf4f779514071e9ba08b1ec3348e98e713a 100644 (file)
@@ -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
 
index 163e0cfb6e5fde7ef483f642e90574a252288dc7..53938ca41ef86aa80229e53b46df5efb7fbdd729 100644 (file)
@@ -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
 
index 6b48b0236e084ab8f56075103227ef3bf4283146..12e8f26a7bce50f714e258b820cba040583c66ae 100644 (file)
@@ -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 } {
index ffe95bc7b9fb8f1a206f5bc678fabe88cc022bcf..ca9ee3ed69a99350b5ed8f283ee17fb7180145ca 100644 (file)
@@ -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" {
index f9a41e9cf36d1818ed4cc73650bdd7b2aba84792..88031e7aa351bb5f1a41788d51ca2c01d4611678 100644 (file)
@@ -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
 
index 6d3a0e56e1c353b3e97860609c8ab1df928fbf72..ee66e48260a237fd03ccf31eaf3812842fcd66a7 100644 (file)
@@ -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