aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.trace/tfind.exp
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2010-06-02 19:41:11 +0000
committerMichael Snyder <msnyder@vmware.com>2010-06-02 19:41:11 +0000
commit0ab48859b9a642d6393ccb0c43bda33360b83750 (patch)
tree5c23eb8063438843a1cca824ffd7f29c36a1b7af /gdb/testsuite/gdb.trace/tfind.exp
parent9eae7c5264c14e142dd52988f70d58f62755b2d0 (diff)
downloadgdb-0ab48859b9a642d6393ccb0c43bda33360b83750.zip
gdb-0ab48859b9a642d6393ccb0c43bda33360b83750.tar.gz
gdb-0ab48859b9a642d6393ccb0c43bda33360b83750.tar.bz2
2010-05-26 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
* gdb.trace/actions.exp: Replace uses of send_gdb / gdb_expect. * gdb.trace/backtrace.exp: Replace uses of send_gdb / gdb_expect. * gdb.trace/collection.exp: Replace uses of send_gdb / gdb_expect. * gdb.trace/deltrace.exp: Replace uses of send_gdb / gdb_expect. * gdb.trace/infotrace.exp: Replace uses of send_gdb / gdb_expect. * gdb.trace/limits.exp: Replace uses of send_gdb / gdb_expect. * gdb.trace/report.exp: Replace uses of send_gdb / gdb_expect. * gdb.trace/save-trace.exp: Replace uses of send_gdb / gdb_expect. * gdb.trace/tfind.exp: Replace uses of send_gdb / gdb_expect. * gdb.trace/tracecmd.exp: Replace uses of send_gdb / gdb_expect. * gdb.trace/tsv.exp: Replace uses of send_gdb / gdb_expect.
Diffstat (limited to 'gdb/testsuite/gdb.trace/tfind.exp')
-rw-r--r--gdb/testsuite/gdb.trace/tfind.exp43
1 files changed, 19 insertions, 24 deletions
diff --git a/gdb/testsuite/gdb.trace/tfind.exp b/gdb/testsuite/gdb.trace/tfind.exp
index 49f2210..04e670f 100644
--- a/gdb/testsuite/gdb.trace/tfind.exp
+++ b/gdb/testsuite/gdb.trace/tfind.exp
@@ -83,29 +83,28 @@ if { $tdp1 <= 0 || $tdp2 <= 0 || $tdp3 <= 0 || \
}
# 6.1 test tstart command
-send_gdb "tstart\n"
-gdb_expect {
+
+set return_me 1
+gdb_test_multiple "tstart" "6.1: tstart" {
-re "Trace can only be run on remote targets.*$gdb_prompt $" {
fail "6.1: tstart (not connected to remote?)"
- return;
}
-re "Target does not support this command.*$gdb_prompt $" {
fail "6.1: tstart (connected to wrong target?)"
- return;
}
-re "Target returns error code.*$gdb_prompt $" {
fail "6.1: tstart (connected to wrong target?)"
- return;
}
-re "$gdb_prompt $" {
pass "6.1: tstart"
- }
- default {
- fail "6.1: tstart (default)"
- return;
+ set return_me 0
}
}
+if { $return_me == 1 } then {
+ return -1;
+}
+
# test tstatus (when trace on)
gdb_test "tstatus" "\[Tt\]race is running.*" "test tstatus on"
@@ -118,27 +117,26 @@ gdb_test "continue" \
"run trace experiment"
# 7.1 test tstop command
-send_gdb "tstop\n"
-gdb_expect {
+
+set return_me 1
+gdb_test_multiple "tstop" "7.1: tstop" {
-re "Trace can only be run on remote targets.*$gdb_prompt $" {
fail "7.1: tstop (not connected to remote?)"
- return;
}
-re "Target does not support this command.*$gdb_prompt $" {
fail "7.1: tstop (connected to wrong target?)"
- return;
}
-re "Target returns error code.*$gdb_prompt $" {
fail "7.1: tstop (connected to wrong target?)"
- return;
}
-re "$gdb_prompt $" {
pass "7.1: tstop"
+ set return_me 0
}
- default {
- fail "7.1: tstop (default)"
- return;
- }
+}
+
+if { $return_me == 1 } then {
+ return -1;
}
# 7.2 test help tstop
@@ -329,13 +327,10 @@ gdb_tfind_test "8.17: tfind line <no arg>" "line" "\$trace_line != $testline3" "
# 8.36 tfind and disassembly
gdb_tfind_test "8.36: tfind start" "start" "0"
set timeout 60
-send_gdb "disassemble gdb_c_test\n"
# look for disassembly of function label
-gdb_expect {
- -re "<(\.\[0-9\]+|)>:.*End of assembler dump.*$gdb_prompt $" { pass "8.36: trace disassembly" }
- -re ".*$gdb_prompt $" { fail "8.36: trace disassembly" }
- timeout { fail "8.36: trace disassembly (timeout)" }
-}
+gdb_test "disassemble gdb_c_test" \
+ "<(\.\[0-9\]+|)>:.*End of assembler dump.*" \
+ "8.36: trace disassembly"
gdb_test "tfind line 0" \
"out of range.*|failed to find.*" \