* lib/gdb.exp (gdb_run_cmd): Special handling for targets use stubs.
authorKung Hsu <kung@cygnus>
Fri, 31 Mar 1995 00:43:12 +0000 (00:43 +0000)
committerKung Hsu <kung@cygnus>
Fri, 31 Mar 1995 00:43:12 +0000 (00:43 +0000)
gdb/testsuite/lib/gdb.exp

index 943191220b5dc4ee3dcff108f79f130ddf2290bf..b7b94e0b8f1243171622e6efa071d912c720db24 100644 (file)
@@ -136,6 +136,24 @@ proc delete_breakpoints {} {
 # elsewhere.
 #
 proc gdb_run_cmd {} {
+    global usestubs
+    global prompt
+
+    if $usestubs!=0 {
+       send "jump *start\n"
+       expect {
+           -re "Line.* Jump anyway.*y or n. $" {
+               send "y\n"
+               expect {
+                   -re "Continuing.*$prompt $" {}
+                   timeout { perror "Jump to start() failed"; return }
+               }
+            }
+           timeout { perror "Jump to start() failed (timeout)"; return }
+       }
+       send "continue\n"
+       return
+    }
     send "run\n"
     expect {
        -re "The program .* has been started already.*y or n. $" {