(gdb_target_cmd): Add explicit error return.
authorMark Salter <msalter@sadr.localdomain>
Thu, 15 Mar 2001 18:51:25 +0000 (18:51 +0000)
committerMark Salter <msalter@sadr.localdomain>
Thu, 15 Mar 2001 18:51:25 +0000 (18:51 +0000)
(gdb_target_monitor): Add check of gdb_target_cmd return value.

gdb/testsuite/config/monitor.exp

index e9a22184855ac9bfd10a8ec4ff292c172c7604d3..e48d0d94461c035dbf94e91cca6a198da75660ab 100644 (file)
@@ -67,6 +67,7 @@ proc gdb_target_cmd { targetname serialport } {
            }
        }
     }
+    return 1
 }
 
 
@@ -109,7 +110,7 @@ proc gdb_target_monitor { exec_file } {
     for {set j 1} {$j <= 2} {incr j} {
        if [gdb_file_cmd $exec_file] { return -1; }
 
-       gdb_target_cmd $targetname $serialport;
+       if ![gdb_target_cmd $targetname $serialport] { return 0; }
 
        gdb_target_exec;