2005-03-14 Paul Brook <paul@codesourcery.com>
authorPaul Brook <paul@codesourcery.com>
Mon, 14 Mar 2005 15:42:52 +0000 (15:42 +0000)
committerPaul Brook <paul@codesourcery.com>
Mon, 14 Mar 2005 15:42:52 +0000 (15:42 +0000)
* lib/mi-support.exp: Use mi_gdb_target_cmd to connect to remote
targets.

gdb/testsuite/ChangeLog
gdb/testsuite/lib/mi-support.exp

index 4c24847a13126e33aabd8e05ecad605b5a05eaac..b50169e588a0463b7c6bdfaacfed68ffcf600248 100644 (file)
@@ -1,3 +1,8 @@
+2005-03-14  Paul Brook  <paul@codesourcery.com>
+
+       * lib/mi-support.exp: Use mi_gdb_target_cmd to connect to remote
+       targets.
+
 2005-03-09  Joel Brobecker  <brobecker@adacore.com>
 
        * gdb.dwarf2/dup-psym.S: New file.
index 29a4f76d93e87cb259594d1026d297423b97bb60..6d1d8675235f936202c41bc056639650fa98f50e 100644 (file)
@@ -494,14 +494,9 @@ proc mi_gdb_load { arg } {
        }
     } elseif { [target_info gdb_protocol] == "remote" } {
        # remote targets
-       send_gdb "target [target_info gdb_protocol] [target_info netport]\n"
-       gdb_expect 60 {
-           -re "\\^done,.*$mi_gdb_prompt$" {
-           }
-           timeout {
-               perror "Unable to connect to remote target"
-               return -1
-           }
+       if { [mi_gdb_target_cmd "remote" [target_info netport]] != 0 } {
+           perror "Unable to connect to remote target"
+           return -1
        }
        send_gdb "48-target-download\n"
        gdb_expect 10 {