* lib/mi-support.exp (mi_gdb_start): If a remote target, use the
authorAndrew Cagney <cagney@redhat.com>
Sun, 19 Aug 2001 01:02:58 +0000 (01:02 +0000)
committerAndrew Cagney <cagney@redhat.com>
Sun, 19 Aug 2001 01:02:58 +0000 (01:02 +0000)
CLI jump command to start it.
(mi_run_to_main): Fail immediatly when unexpected output.

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

index bf7e12beb6a144acbf153301d380cf25685863d2..79fc4c6030f8ceb0226f1a898eb1e796ba013c1f 100644 (file)
@@ -1,3 +1,9 @@
+2001-08-18  Andrew Cagney  <ac131313@redhat.com>
+
+       * lib/mi-support.exp (mi_gdb_start): If a remote target, use the
+       CLI jump command to start it.
+       (mi_run_to_main): Fail immediatly when unexpected output.
+
 2001-08-18  Andrew Cagney  <ac131313@redhat.com>
 
        * lib/mi-support.exp (mi_gdb_start): Move call to sid_start to
index b3c01ec6dbebf2d0ee4ae8676f80e084f3396e48..76fad161a38375e6a847afd26c9fd1d9579aa090 100644 (file)
@@ -590,6 +590,18 @@ proc mi_run_cmd {args} {
            }
            return;
        }
+
+       if [target_info exists gdb,start_symbol] {
+           set start [target_info gdb,start_symbol];
+       } else {
+           set start "start";
+       }
+
+       # HACK: Should either use 000-jump or fix the target code
+       # to better handle RUN.
+       send_gdb  "jump *$start\n"
+       warning "Using CLI jump command, expect run-to-main FAIL"
+       return
     }
 
     send_gdb "000-exec-run $args\n"
@@ -637,6 +649,9 @@ proc mi_run_to_main { } {
            pass "$test"
            return 0
        }
+       -re ".*$mi_gdb_prompt$" {
+           fail "$test (2)"
+       }
        timeout {
            fail "$test (timeout)"
            return -1