aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/gdb.python/py-record-btrace.exp15
1 files changed, 11 insertions, 4 deletions
diff --git a/gdb/testsuite/gdb.python/py-record-btrace.exp b/gdb/testsuite/gdb.python/py-record-btrace.exp
index 0731af1..b035e14 100644
--- a/gdb/testsuite/gdb.python/py-record-btrace.exp
+++ b/gdb/testsuite/gdb.python/py-record-btrace.exp
@@ -144,10 +144,6 @@ with_test_prefix "instruction " {
gdb_test "python print(i.decoded)" ".*"
gdb_test "python print(i.size)" "$decimal"
gdb_test "python print(i.is_speculative)" "False"
- gdb_test_no_output "python r.clear()"
- gdb_test "python insn = r.instruction_history"
- gdb_test_no_output "python i = insn\[0\]"
- gdb_test "python print(i.size)" "$decimal" "size after clear"
}
with_test_prefix "function call" {
@@ -202,3 +198,14 @@ with_test_prefix "level" {
gdb_test "python print(gdb.current_recording().function_call_history\[0\].level)" "1"
gdb_test "python print(gdb.current_recording().function_call_history\[1\].level)" "0"
}
+
+# Note: GDB can incrementally add to the recording from the raw trace data.
+# After a clear(), GDB might not have all the raw trace data available in its
+# buffer to recreate the full recording it had before the clear().
+# So, do this testing last to avoid disturbing subsequent tests.
+with_test_prefix "clear" {
+ gdb_test_no_output "python r.clear()"
+ gdb_test "python insn = r.instruction_history"
+ gdb_test_no_output "python i = insn\[0\]"
+ gdb_test "python print(i.size)" "$decimal"
+}