aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.trace/while-dyn.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.trace/while-dyn.exp')
-rw-r--r--gdb/testsuite/gdb.trace/while-dyn.exp61
1 files changed, 26 insertions, 35 deletions
diff --git a/gdb/testsuite/gdb.trace/while-dyn.exp b/gdb/testsuite/gdb.trace/while-dyn.exp
index ee8ba6b..c77bad7 100644
--- a/gdb/testsuite/gdb.trace/while-dyn.exp
+++ b/gdb/testsuite/gdb.trace/while-dyn.exp
@@ -33,8 +33,6 @@ if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
return -1
}
gdb_load $binfile
-gdb_test "tstop" ".*" ""
-gdb_test "tfind none" ".*" ""
runto_main
gdb_reinitialize_dir $srcdir/$subdir
@@ -53,49 +51,42 @@ proc test_while_stepping { while_stepping } {
global gdb_prompt
global executable
- clean_restart $executable
+ with_test_prefix "$while_stepping" {
+ clean_restart $executable
- gdb_test "tstop" ".*" ""
- gdb_test "tfind none" ".*" ""
- runto_main
+ runto_main
- ## verify number of trace frames collected matches stepcount
+ ## verify number of trace frames collected matches stepcount
- gdb_delete_tracepoints
- gdb_test "trace gdb_c_test" \
- "Tracepoint $decimal at .*" \
- "$while_stepping: Set tracepoint at gdb_c_test"
+ gdb_delete_tracepoints
+ gdb_test "trace gdb_c_test" \
+ "Tracepoint $decimal at .*" \
+ "Set tracepoint at gdb_c_test"
- gdb_trace_setactions "5.12: define $while_stepping <stepcount>" \
- "" \
- "collect \$$fpreg" "^$" \
- "$while_stepping 5" "^$" \
- "collect p" "^$" \
- "end" "^$" \
- "end" ""
+ gdb_trace_setactions "define $while_stepping <stepcount>" \
+ "" \
+ "collect \$$fpreg" "^$" \
+ "$while_stepping 5" "^$" \
+ "collect p" "^$" \
+ "end" "^$" \
+ "end" ""
- gdb_test "tstart" ".*" ""
+ gdb_test "tstart" ".*"
- gdb_breakpoint "end" qualified
- gdb_test "continue" \
- "Continuing.*Breakpoint $decimal, end.*" \
- "$while_stepping: run trace experiment"
+ gdb_breakpoint "end" qualified
+ gdb_test "continue" \
+ "Continuing.*Breakpoint $decimal, end.*" \
+ "run trace experiment"
- gdb_test "tstop" ".*" ""
+ gdb_test "tstop" ".*"
- gdb_tfind_test "$while_stepping: frame 5 should be the last one collected" "5" "5"
+ gdb_tfind_test "frame 5 should be the last one collected" "5" "5"
- set test "$while_stepping: trace stopped after 5 stepping frames"
- gdb_test_multiple "tfind 6" "$test" {
- -re "failed to find.*$gdb_prompt $" {
- pass "$test"
- }
- -re ".*$gdb_prompt $" {
- fail "$test"
- }
- }
+ gdb_test "tfind 6" "failed to find.*" \
+ "trace stopped after 5 stepping frames"
- gdb_test "tfind none" ".*" ""
+ gdb_test "tfind none" ".*"
+ }
}
# Test all while-stepping aliases.