From f9b4ea0ce9efb4132a75551c40b2efc049e5b9f7 Mon Sep 17 00:00:00 2001 From: Jakob Johnson Date: Mon, 1 Aug 2022 12:23:22 -0700 Subject: [trace] Add SBTraceCursor bindings Add bindings for the `TraceCursor` to allow for programatic traversal of traces. This diff adds bindings for all public `TraceCursor` methods except `GetHwClock` and also adds `SBTrace::CreateNewCursor`. A new unittest has been added to TestTraceLoad.py that uses the new `SBTraceCursor` API to test that the sequential and random access APIs of the `TraceCursor` are equivalent. This diff depends on D130925. Test Plan: `ninja lldb-dotest && ./bin/lldb-dotest -p TestTraceLoad` Differential Revision: https://reviews.llvm.org/D130930 --- lldb/source/Commands/CommandObjectThread.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lldb/source/Commands/CommandObjectThread.cpp') diff --git a/lldb/source/Commands/CommandObjectThread.cpp b/lldb/source/Commands/CommandObjectThread.cpp index 9aa128a..76457d1 100644 --- a/lldb/source/Commands/CommandObjectThread.cpp +++ b/lldb/source/Commands/CommandObjectThread.cpp @@ -2295,7 +2295,7 @@ protected: // We need to stop processing data when we already ran out of instructions // in a previous command. We can fake this by setting the cursor past the // end of the trace. - cursor_sp->Seek(1, TraceCursor::SeekType::End); + cursor_sp->Seek(1, lldb::eTraceCursorSeekTypeEnd); } TraceDumper dumper(std::move(cursor_sp), -- cgit v1.1