## check $pc == startPC
gdb_test "printf \"x \%d x\\n\", \$pc == $save_pc" \
"x 1 x" \
- "8.8b: tfind none (restores non-trace PC)"
+ "8.8b: tfind none restores non-trace PC"
# 8.9 tfind end
## check $trace_frame == -1
## check $pc == startPC
gdb_test "printf \"x \%d x\\n\", \$pc == $save_pc" \
"x 1 x" \
- "8.9b: tfind end (restores non-tracing PC)"
+ "8.9b: tfind end restores non-tracing PC"
# 8.1 tfind n
## check $trace_frame == n
gdb_tfind_test "8.1: tfind 1" "1" "1"
## check $trace_line corresponds to tracepoint for frame n
-gdb_test "print \$trace_line" "$testline2" "8.1b: tfind 1 (correct line)"
+gdb_test "print \$trace_line" "$testline2" "8.1b: tfind 1, correct line"
# 8.28 tfind invalid n (big number)
## check "not found" error
gdb_test "printf \"x \%d x\\n\", \$trace_frame == 32767" \
"x 0 x" \
- "8.28: tfind <n> rejected bad input (32767)"
+ "8.28: tfind <n> rejected bad input of 32767"
# 8.31 tfind negative n
## check error
gdb_test "tfind -3" "invalid input.*" "8.31: tfind <n> rejects negative input"
## check $trace_frame != -n
gdb_test "printf \"x \%d x\\n\", \$trace_frame == -3" "x 0 x" \
- "8.31: tfind <n> rejected negative input (-3)"
+ "8.31: tfind <n> rejected negative input of -3"
# 8.10 tfind <no arg>
## check $trace_frame += 1
gdb_tfind_test "8.10: tfind start" "start" "0"
gdb_test "print \$trace_line" "$baseline" \
- "8.10: tfind 0 (correct line $baseline)"
+ "8.10: tfind 0 has correct line"
gdb_tfind_test "8.10: tfind noargument 1" "" "1"
gdb_test "print \$trace_line" "$testline2" \
- "8.10: tfind 1 (correct line $testline2)"
+ "8.10: tfind 1 has correct line"
gdb_tfind_test "8.10: tfind noargument 2" "" "2"
gdb_test "print \$trace_line" "$testline3" \
- "8.10: tfind 2 (correct line $testline3)"
+ "8.10: tfind 2 has correct line"
gdb_tfind_test "8.10: tfind noargument 3" "" "3"
gdb_test "print \$trace_line" "$testline4" \
- "8.10: tfind 3 (correct line $testline4)"
+ "8.10: tfind 3 has correct line"
gdb_tfind_test "8.11: tfind 3" "3" "3"
gdb_test "print \$trace_line" "$testline4" \
- "8.11: tfind 3 (correct line $testline4)"
+ "8.11: tfind 3 has correct line"
gdb_tfind_test "8.11: tfind backward 2" "-" "2"
gdb_test "print \$trace_line" "$testline3" \
"8.11: tfind 2 (correct line $testline3)"
gdb_tfind_test "8.12: tfind tracepoint <n>" "tracepoint $tdp2" \
"\$tracepoint" "$tdp2"
gdb_test "print \$trace_line" "$testline2" \
- "8.12: tfind tracepoint <n> (line $testline2)"
+ "8.12: tfind tracepoint <n> correct line"
gdb_tfind_test "8.25: tfind none" "none" "-1"
gdb_test "tfind tracepoint 0" "failed to find.*" \
"8.25: tfind tracepoint rejects zero"
gdb_test "tfind tracepoint 32767" "failed to find.*" \
- "8.25: tfind tracepoint rejects nonexistant tracepoint (32767)"
+ "8.25: tfind tracepoint rejects nonexistant tracepoint"
gdb_test "tfind tracepoint -1" "failed to find.*" \
- "8.25: tfind tracepoint rejects nonexistant tracepoint (-1)"
+ "8.25: tfind tracepoint rejects nonexistant tracepoint of -1"
# 8.37 tfind tracepoint n where n no longer exists (but used to)
gdb_test_no_output "delete trace $tdp2" ""
"tracepoint $tdp2" \
"\$tracepoint" "$tdp2"
gdb_test "print \$trace_line" "$testline2" \
- "8.37: tfind deleted tracepoint (line $testline2)"
+ "8.37: tfind deleted tracepoint has correct line"
# 8.13 tfind tracepoint <no arg>
## check $tracepoint same before and after, $trace_frame changed
gdb_tfind_test "8.13: tracepoint $tdp1" "tracepoint $tdp1" \
"\$tracepoint" "$tdp1"
gdb_test "print \$trace_line" "$baseline" \
- "8.13: tfind tracepoint $tdp1 (line $baseline)"
+ "8.13: tfind tracepoint $tdp1 has correct line"
gdb_test_no_output "set \$save_frame = \$trace_frame" ""
gdb_tfind_test "8.13: tracepoint <no arg>" "tracepoint" \
"\$tracepoint" "$tdp1"
## check pc == x, $trace_frame != -1
gdb_tfind_test "8.14: tfind 3" "3" "3"
gdb_test "print \$trace_line" "$testline4" \
- "8.14: tfind 3 (line $testline4)"
+ "8.14: tfind 3 has correct line"
gdb_test_no_output "set \$test_pc = \$pc" "8.14: set \$test_pc"
gdb_tfind_test "8.14: tfind none" "none" "-1"
gdb_tfind_test "8.14: tfind pc" "pc \$test_pc" "\$trace_frame != -1" "1"
gdb_test "print \$trace_line" "$testline4" \
- "8.14: tfind pc x (line $testline4)"
+ "8.14: tfind pc x has correct line"
gdb_test "printf \"x \%d x\\n\", \$pc == \$test_pc" \
"x 1 x" \
- "8.14: tfind pc x"
+ "8.14: tfind pc x has corrrect address"
# 8.15 tfind pc <no arg>
## check pc same before and after, $trace_frame changed
gdb_tfind_test "8.15: tfind 3" "3" "3"
gdb_test "print \$trace_line" "$testline4" \
- "8.15: tfind 3 (line $testline4)"
+ "8.15: tfind 3 has correct line"
gdb_test_no_output "set \$test_pc = \$pc" "8.15: set \$test_pc"
gdb_tfind_test "8.15: tfind pc" "pc" "\$pc == \$test_pc" "1"
gdb_test "print \$trace_line" "$testline4" \
- "8.15: tfind pc (line $testline4)"
+ "8.15: tfind pc has correct line"
gdb_test "printf \"x \%d x\\n\", \$trace_frame != 3" "x 1 x" \
"8.15: trace frame didn't change"
gdb_test "${trace_type1} set_point" \
"\(Fast t|T\)racepoint \[0-9\] at $hex: file.*" \
- "${trace_type1} set_point (1)"
+ "${trace_type1} set_point, first trace type"
gdb_test "${trace_type2} set_point" \
"\(Fast t|T\)racepoint \[0-9\] at $hex: file.*" \
- "${trace_type2} set_point (2)"
+ "${trace_type2} set_point, second trace type"
gdb_test_no_output "tstart"
gdb_test "continue" "Continuing\\.\[ \r\n\]+(Thread .* hit )?Breakpoint.*" \
"Data collected at tracepoint .*, trace frame \[0-9\]:.*\\$${pcreg} = .*" \
"tdump 1"
gdb_test "tfind 0" "Found trace frame 0, tracepoint .*" \
- "reset to frame 0 (1)"
+ "reset to frame 0, first time"
gdb_test "tfind tracepoint 5" "Found trace frame \[0-9\], tracepoint .*" \
"tfind test frame of tracepoint 5"
gdb_test "tdump" \
"Data collected at tracepoint .*, trace frame \[0-9\]:.*\\$${spreg} = .*" \
"tdump 2"
gdb_test "tfind 0" "Found trace frame 0, tracepoint .*" \
- "reset to frame 0 (2)"
+ "reset to frame 0, second time"
gdb_test "tfind tracepoint 6" "Found trace frame \[0-9\], tracepoint .*" \
"tfind test frame of tracepoint 6"
gdb_test "tdump" \
"Data collected at tracepoint .*, trace frame \[0-9\]:.*\\$${pcreg} = .*" \
"tdump 1"
gdb_test "tfind 0" "Found trace frame 0, tracepoint .*" \
- "reset to frame 0 (1)"
+ "reset to frame 0, first time"
} else {
gdb_test "tfind tracepoint 4" "Target failed to find requested trace frame.*" \
"tfind test frame of tracepoint 4"
"Data collected at tracepoint .*, trace frame \[0-9\]:.*\\$${spreg} = .*" \
"tdump 2"
gdb_test "tfind 0" "Found trace frame 0, tracepoint .*" \
- "reset to frame 0 (2)"
+ "reset to frame 0, second time"
} else {
gdb_test "tfind tracepoint 5" "Target failed to find requested trace frame.*" \
"tfind test frame of tracepoint 5"
}}
-foreach break_always_inserted { "on" "off" } {
+foreach_with_prefix break_always_inserted { "on" "off" } {
break_trace_same_addr_1 "trace" ${break_always_inserted}
break_trace_same_addr_2 "trace" "trace" ${break_always_inserted}
break_trace_same_addr_3 "trace" ${break_always_inserted}