Changed pattern in gdb_run_cmd to match up to the first newline only.
authorJ.T. Conklin <jtc@acorntoolworks.com>
Wed, 20 Jul 1994 17:29:02 +0000 (17:29 +0000)
committerJ.T. Conklin <jtc@acorntoolworks.com>
Wed, 20 Jul 1994 17:29:02 +0000 (17:29 +0000)
The old pattern used ".*$", which could, and did, swallow up output
that we were attempting to match elsewhere.

gdb/testsuite/lib/gdb.exp

index 1747e1d32ddb6236c3f5cdccfaef45fb77eff7a9..f6764d02f49de6e755b4eee57c385e6279d19f78 100644 (file)
@@ -123,7 +123,10 @@ proc gdb_run_cmd {} {
            exp_continue
        }
 
-       -re "Starting program: .*$" {}
+       # The following pattern matches up to to the first newline *only*.
+       # Using ``.*$'' could swallow up output that we attempt to match
+       # elsewhere.
+       -re "Starting program: \[^\n\]*" {}
     }
 }