"advance through tracing"
# Now play with tstatus a bit.
- # Since note support is optional, we need to match both with and without
- # cases.
- gdb_test_multiple "tstatus" "check on trace status" {
+ # Since support for notes, user, stop reason, etc. is optional, we
+ # need to match both with and without cases.
+
+ set test "tstatus reports trace note"
+ gdb_test_multiple "tstatus" $test {
-re "Trace is running.*Trace will stop if GDB disconnects\.\[\r\n\]+Trace notes: my tracing note\.\[\r\n\]+Not looking at any trace frame\..*\r\n$gdb_prompt $" {
- pass "tstatus reports trace note"
+ pass $test
}
-re "Trace is running.*Trace will stop if GDB disconnects\.\[\r\n\]+Not looking at any trace frame.*\r\n$gdb_prompt $" {
- pass "tstatus does not report any trace note"
+ unsupported $test
}
}
gdb_test "set trace-notes different note" "" "change tracing note"
- gdb_test_multiple "tstatus" "check on trace status with diff note" {
+ set test "tstatus reports different trace note"
+ gdb_test_multiple "tstatus" $test {
-re "Trace is running.*Trace will stop if GDB disconnects\.\[\r\n\]+Trace notes: different note\.\[\r\n\]+Not looking at any trace frame\..*\r\n$gdb_prompt $" {
- pass "tstatus reports different trace note"
+ pass $test
}
-re "Trace is running.*Trace will stop if GDB disconnects\.\[\r\n\]+Not looking at any trace frame.*\r\n$gdb_prompt $" {
- pass "tstatus does not report any different trace note"
+ unsupported $test
}
}
gdb_test "set trace-user me me me" "" "change tracing user"
- gdb_test_multiple "tstatus" "check on trace status with diff note" {
+ set test "tstatus reports trace user"
+ gdb_test_multiple "tstatus" $test {
-re "Trace is running.*Trace will stop if GDB disconnects\.\[\r\n\]+Trace user is me me me\.\[\r\n\]+Trace notes: different note\.\[\r\n\]+Not looking at any trace frame\..*\r\n$gdb_prompt $" {
- pass "tstatus reports trace user"
+ pass $test
}
-re "Trace is running.*Trace will stop if GDB disconnects\.\[\r\n\]+Not looking at any trace frame.*\r\n$gdb_prompt $" {
- pass "tstatus does not report trace user"
+ unsupported $test
}
}
gdb_test_no_output "tstop because I can" "trace stopped with note"
- gdb_test_multiple "tstatus" "check on trace status after stop" {
+ set test "tstatus reports trace stop reason"
+ gdb_test_multiple "tstatus" $test {
-re "Trace stopped by a tstop command \\(because I can\\)\..*Trace will stop if GDB disconnects\.\[\r\n\]+Trace user is me me me\.\[\r\n\]+Trace notes: different note\.\[\r\n\]+Not looking at any trace frame\..*\r\n$gdb_prompt $" {
- pass "tstatus reports trace stop reason"
+ pass $test
}
-re "Trace stopped by a tstop command\..*\r\n$gdb_prompt $" {
- pass "tstatus does not report trace stop reason"
+ unsupported $test
}
}
- # Hit count and traceframe usage of tracepoint is optional, so
- # pass it either way.
-
- gdb_test_multiple "info trace" "show tracepoint state" {
+ set test "info trace reports tracepoint hit count and traceframe usage"
+ gdb_test_multiple "info trace" $test {
-re "actions\.c:\[0-9\]+\[\r\n\]+\[\t ]+tracepoint already hit 1 time\[\r\n\]+\[\t ]+trace buffer usage ${decimal} bytes\.\[\r\n\]+\[\t ]+collect parm.*\r\n$gdb_prompt $" {
- pass "info trace reports tracepoint hit count and traceframe usage"
+ pass $test
}
-re "actions\.c:\[0-9\]+\[\r\n\]+\[\t ]+collect parm.*\r\n$gdb_prompt $" {
- pass "info trace does not report tracepoint hit count and traceframe usage"
+ unsupported $test
}
}
}