aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base
diff options
context:
space:
mode:
authorJ.T. Conklin <jtc@acorntoolworks.com>1994-07-25 23:34:23 +0000
committerJ.T. Conklin <jtc@acorntoolworks.com>1994-07-25 23:34:23 +0000
commita488d496eca4d42c8c944e2ba852325ffe43e4ee (patch)
treeeb6dbed6596fb2e40c40cc7b87c6621344f9670c /gdb/testsuite/gdb.base
parent1ded65d1aa58293444521230095363674b3f95a2 (diff)
downloadgdb-a488d496eca4d42c8c944e2ba852325ffe43e4ee.zip
gdb-a488d496eca4d42c8c944e2ba852325ffe43e4ee.tar.gz
gdb-a488d496eca4d42c8c944e2ba852325ffe43e4ee.tar.bz2
* gdb.base/opaque.exp: use runto instead of messing around with
breakpoints.
Diffstat (limited to 'gdb/testsuite/gdb.base')
-rw-r--r--gdb/testsuite/gdb.base/opaque.exp55
1 files changed, 11 insertions, 44 deletions
diff --git a/gdb/testsuite/gdb.base/opaque.exp b/gdb/testsuite/gdb.base/opaque.exp
index 3ba955e..5d03faf 100644
--- a/gdb/testsuite/gdb.base/opaque.exp
+++ b/gdb/testsuite/gdb.base/opaque.exp
@@ -158,24 +158,9 @@ if [istarget "mips-idt-*"] then {
gdb_reinitialize_dir $srcdir/$subdir
gdb_load $objdir/$subdir/$binfile
-# Set breakpoint on main, where struct foo is incomplete.
-
-send "break main\n"
-expect {
- -re "Breakpoint.*at.* file .*opaque0.c, line.*$prompt $" {}
- -re ".*$prompt $" { fail "setting breakpoint at main" }
- timeout { fail "(timeout) setting breakpoint" }
-}
-
-
-# Run until break at main. Struct foo is opaque in the file containing
-# main().
-
-gdb_run_cmd
-expect {
- -re "Breakpoint 1.*$prompt $" {}
- -re ".*$prompt $" { fail "run until main()" }
- timeout { fail "(timeout) run until main()" }
+# Run to main, where struct foo is incomplete.
+if ![runto main] {
+ perror "cannot run to breakpoint at main"
}
@@ -253,35 +238,17 @@ $prompt $" { pass "ptype on opaque struct tagname (dynamically)" }
# Now reload the symbols again so we forget about anything we might
# have learned reading the symbols during the previous tests.
+if [istarget "mips-idt-*"] then {
+ # Restart because IDT/SIM runs out of file descriptors.
+ gdb_exit
+ gdb_start
+}
gdb_reinitialize_dir $srcdir/$subdir
gdb_load $objdir/$subdir/$binfile
-# Disable the breakoint on main().
-# Set breakpoint on getfoo, where struct foo is complete.
-
-send "disable 1\n"
-expect {
- -re ".*$prompt $" {}
- timeout { fail "(timeout) disabling breakpoint" }
-}
-
-
-send "break getfoo\n"
-expect {
- -re "Breakpoint.*at.* file .*opaque1\.c, line.*$prompt $" {}
- -re ".*$prompt $" { fail "setting breakpoint at getfoo" }
- timeout { fail "(timeout) setting breakpoint" }
-}
-
-
-# Run until break at getfoo(). Struct foo is defined here.
-# Retry all the tests we we tried at main() where struct foo was opaque.
-
-gdb_run_cmd
-expect {
- -re "Breakpoint.*$prompt $" {}
- -re ".*$prompt $" { fail "run until getfoo()" }
- timeout { fail "(timeout) run until getfoo()" }
+# Run to getfoo, where struct foo is complete.
+if ![runto getfoo] {
+ perror "cannot run to breakpoint at getfoo"
}