diff options
author | Felix Willgerodt <felix.willgerodt@intel.com> | 2019-02-25 15:30:29 +0100 |
---|---|---|
committer | Felix Willgerodt <felix.willgerodt@intel.com> | 2024-08-14 11:20:56 +0200 |
commit | 8958aefd34200c8d2cd6e81bba32198468789c62 (patch) | |
tree | 3811d80cd4d2a0743da4ab090cfd5640ef8c4c42 /gdb/testsuite | |
parent | bea4f6fac4e0b1700188fad19499c62c46f8e70d (diff) | |
download | binutils-8958aefd34200c8d2cd6e81bba32198468789c62.zip binutils-8958aefd34200c8d2cd6e81bba32198468789c62.tar.gz binutils-8958aefd34200c8d2cd6e81bba32198468789c62.tar.bz2 |
python: Add clear() to gdb.Record.
This function allows to clear the trace data from python, forcing to
re-decode the trace for successive commands.
This will be used in future ptwrite patches, to trigger re-decoding when
the ptwrite filter changes.
Reviewed-By: Eli Zaretskii <eliz@gnu.org>
Approved-By: Markus Metzger <markus.t.metzger@intel.com>
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/gdb.python/py-record-btrace.exp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.python/py-record-btrace.exp b/gdb/testsuite/gdb.python/py-record-btrace.exp index fba0b98..0731af1 100644 --- a/gdb/testsuite/gdb.python/py-record-btrace.exp +++ b/gdb/testsuite/gdb.python/py-record-btrace.exp @@ -144,6 +144,10 @@ 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" { |