Miscellaneous fixes for config/slite.exp.
authorBob Manson <manson@cygnus>
Fri, 31 Jan 1997 04:38:01 +0000 (04:38 +0000)
committerBob Manson <manson@cygnus>
Fri, 31 Jan 1997 04:38:01 +0000 (04:38 +0000)
gdb/testsuite/ChangeLog
gdb/testsuite/config/slite.exp

index e7a76b670434f1c29ce9d1697908be8a7913e055..5b9e68582f2360c58ed734a1c09c3736c48c9faa 100644 (file)
@@ -1,5 +1,7 @@
 Thu Jan 30 16:49:25 1997  Bob Manson  <manson@charmed.cygnus.com>
 
+       * config/slite.exp: Miscellaneous fixes.
+
        * lib/gdb.exp: Fix runto.
 
        * gdb.base/signals.exp: Check for a gdb,nosignals feature of
index 7109a2ed94ea54ec54a6a5a5f4f40adf43e13791..771a9e1dbb7038154be8fc954a010bb2a0bc3045 100644 (file)
@@ -141,23 +141,26 @@ proc gdb_load { arg } {
     }
 
     if [target_info exists gdb_serial] {
-       send_gdb "target remote [target_info gdb_serial]\n"
-       set timeout 60
-       verbose "Timeout is now $timeout seconds" 2
-       expect {
-           -i $gdb_spawn_id -re ".*Kill it?.*y or n.*" {
-               send_gdb "y\n";
-               exp_continue
-           }
-           -i $gdb_spawn_id -re ".*$prompt $"  {
-               verbose "Set remote target to [target_info serial]" 2
-           }
-           -i $gdb_spawn_id timeout { 
-               perror "Couldn't set remote target."
-               set timeout 10
-               verbose "Timeout is now $timeout seconds" 2
-               return -1
-           }
+       set serial [target_info gdb_serial];
+    } else {
+       set serial [target_info serial];
+    }
+    send_gdb "target remote $serial\n"
+    set timeout 60
+    verbose "Timeout is now $timeout seconds" 2
+    expect {
+       -i $gdb_spawn_id -re ".*Kill it?.*y or n.*" {
+           send_gdb "y\n";
+           exp_continue
+       }
+       -i $gdb_spawn_id -re ".*$prompt $"      {
+           verbose "Set remote target to [target_info serial]" 2
+       }
+       -i $gdb_spawn_id timeout {
+           perror "Couldn't set remote target."
+           set timeout 10
+           verbose "Timeout is now $timeout seconds" 2
+           return -1
        }
     }