Files
clang-p2996/lldb/bindings/interface/SBTrace.i
Jakob Johnson f9b4ea0ce9 [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
2022-08-02 16:55:33 -07:00

37 lines
980 B
C++

//===-- SWIG Interface for SBTrace.h ----------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
namespace lldb {
%feature("docstring",
"Represents a processor trace."
) SBTrace;
class LLDB_API SBTrace {
public:
SBTrace();
SBTraceCursor CreateNewCursor(SBError &error, SBThread &thread);
const char *GetStartConfigurationHelp();
SBFileSpec SaveToDisk(SBError &error, const SBFileSpec &bundle_dir, bool compact = false);
SBError Start(const SBStructuredData &configuration);
SBError Start(const SBThread &thread, const SBStructuredData &configuration);
SBError Stop();
SBError Stop(const SBThread &thread);
explicit operator bool() const;
bool IsValid();
};
} // namespace lldb