aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorJ.T. Conklin <jtc@acorntoolworks.com>1994-07-20 16:40:08 +0000
committerJ.T. Conklin <jtc@acorntoolworks.com>1994-07-20 16:40:08 +0000
commit4f2ec2eeb86254e6d29fc86f899e4372984f985d (patch)
tree7034e07520bed4f03e4aa715e5bd74cdf1897640 /gdb/testsuite
parentf61ca5fae479b82b295889a9c636c4092570a6f5 (diff)
downloadgdb-4f2ec2eeb86254e6d29fc86f899e4372984f985d.zip
gdb-4f2ec2eeb86254e6d29fc86f899e4372984f985d.tar.gz
gdb-4f2ec2eeb86254e6d29fc86f899e4372984f985d.tar.bz2
New implementation of gdb_run_cmd which fixes some subtle bugs.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/lib/gdb.exp21
1 files changed, 14 insertions, 7 deletions
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 2a967a2..1747e1d 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -122,6 +122,8 @@ proc gdb_run_cmd {} {
send "y\n"
exp_continue
}
+
+ -re "Starting program: .*$" {}
}
}
@@ -159,20 +161,25 @@ proc runto { function } {
timeout { fail "setting breakpoint at $function (timeout)" ; return 0 }
}
- send "run\n"
+ gdb_run_cmd
+
# the "at foo.c:36" output we get with -g.
# the "in func" output we get without -g.
expect {
- -re "The program .* has been started already.*y or n. $" {
- send "y\n"
- exp_continue
+ -re "Break.* at .*:$decimal.*$prompt $" {
+ return 1
}
- -re "Starting.*Break.* at .*:$decimal.*$prompt $" { return 1 }
-re "Breakpoint \[0-9\]*, \[0-9xa-f\]* in $function.*$prompt $" {
return 1
}
- -re "$prompt $" { fail "running to $function" ; return 0 }
- timeout { fail "running to $function (timeout)" ; return 0 }
+ -re "$prompt $" {
+ fail "running to $function"
+ return 0
+ }
+ timeout {
+ fail "running to $function (timeout)"
+ return 0
+ }
}
}