LLDB mainline
|
#include <SBTrace.h>
Public Member Functions | |
SBTrace () | |
Default constructor for an invalid Trace object. | |
SBTraceCursor | CreateNewCursor (SBError &error, SBThread &thread) |
Get a TraceCursor for the given thread's trace. | |
SBFileSpec | SaveToDisk (SBError &error, const SBFileSpec &bundle_dir, bool compact=false) |
Save the trace to the specified directory, which will be created if needed. | |
const char * | GetStartConfigurationHelp () |
SBError | Start (const SBStructuredData &configuration) |
Start tracing all current and future threads in a live process using a provided configuration. | |
SBError | Start (const SBThread &thread, const SBStructuredData &configuration) |
Start tracing a specific thread in a live process using a provided configuration. | |
SBError | Stop () |
Stop tracing all threads in a live process. | |
SBError | Stop (const SBThread &thread) |
Stop tracing a specific thread in a live process regardless of whether the thread was traced explicitly or as part of a "process tracing" operation. | |
operator bool () const | |
bool | IsValid () |
Static Public Member Functions | |
static SBTrace | LoadTraceFromFile (SBError &error, SBDebugger &debugger, const SBFileSpec &trace_description_file) |
See SBDebugger::LoadTraceFromFile. | |
Protected Member Functions | |
SBTrace (const lldb::TraceSP &trace_sp) | |
Protected Attributes | |
lldb::TraceSP | m_opaque_sp |
lldb::ProcessWP | m_opaque_wp |
deprecated | |
Friends | |
class | SBTarget |
SBTrace::SBTrace | ( | ) |
Default constructor for an invalid Trace object.
Definition at line 25 of file SBTrace.cpp.
References LLDB_INSTRUMENT_VA.
Referenced by LoadTraceFromFile().
|
protected |
Definition at line 27 of file SBTrace.cpp.
References LLDB_INSTRUMENT_VA.
SBTraceCursor SBTrace::CreateNewCursor | ( | SBError & | error, |
SBThread & | thread | ||
) |
Get a TraceCursor for the given thread's trace.
[out] | error | This will be set with an error in case of failures. |
[in] | thread | The thread to get a TraceCursor for. |
error
parameter is set. Definition at line 46 of file SBTrace.cpp.
References error(), lldb_private::Status::FromErrorString(), lldb::SBThread::get(), LLDB_INSTRUMENT_VA, and m_opaque_sp.
const char * SBTrace::GetStartConfigurationHelp | ( | ) |
Definition at line 87 of file SBTrace.cpp.
References lldb_private::ConstString::GetCString(), LLDB_INSTRUMENT_VA, and m_opaque_sp.
bool SBTrace::IsValid | ( | ) |
Definition at line 143 of file SBTrace.cpp.
References LLDB_INSTRUMENT_VA.
|
static |
See SBDebugger::LoadTraceFromFile.
Definition at line 31 of file SBTrace.cpp.
References error(), lldb_private::Status::FromErrorString(), LLDB_INSTRUMENT_VA, lldb_private::Trace::LoadPostMortemTraceFromFile(), lldb::SBDebugger::ref(), lldb::SBFileSpec::ref(), SBTrace(), and lldb_private::toString().
Referenced by lldb::SBDebugger::LoadTraceFromFile().
|
explicit |
Definition at line 148 of file SBTrace.cpp.
References LLDB_INSTRUMENT_VA.
SBFileSpec SBTrace::SaveToDisk | ( | SBError & | error, |
const SBFileSpec & | bundle_dir, | ||
bool | compact = false |
||
) |
Save the trace to the specified directory, which will be created if needed.
This will also create a file <directory>/trace.json with the main properties of the trace session, along with others files which contain the actual trace data. The trace.json file can be used later as input for the "trace load" command to load the trace in LLDB, or for the method SBDebugger.LoadTraceFromFile().
[out] | error | This will be set with an error in case of failures. |
[in] | bundle_dir | The directory where the trace files will be saved. |
[in] | compact | Try not to save to disk information irrelevant to the traced processes. Each trace plug-in implements this in a different fashion. |
Definition at line 68 of file SBTrace.cpp.
References error(), lldb_private::Status::FromErrorString(), LLDB_INSTRUMENT_VA, m_opaque_sp, lldb::SBFileSpec::ref(), and lldb::SBFileSpec::SetFileSpec().
SBError SBTrace::Start | ( | const SBStructuredData & | configuration | ) |
Start tracing all current and future threads in a live process using a provided configuration.
This is referred as "process tracing" in the documentation.
This is equivalent to the command "process trace start".
This operation fails if it is invoked twice in a row without first stopping the process trace with SBTrace::Stop().
If a thread is already being traced explicitly, e.g. with SBTrace::Start(const SBThread &thread, const SBStructuredData &configuration), it is left unaffected by this operation.
[in] | configuration | Dictionary object with custom fields for the corresponding trace technology. |
Full details for the trace start parameters that can be set can be retrieved by calling SBTrace::GetStartConfigurationHelp().
Definition at line 95 of file SBTrace.cpp.
References error(), lldb_private::Status::FromErrorString(), LLDB_INSTRUMENT_VA, lldb::SBStructuredData::m_impl_up, and m_opaque_sp.
SBError SBTrace::Start | ( | const SBThread & | thread, |
const SBStructuredData & | configuration | ||
) |
Start tracing a specific thread in a live process using a provided configuration.
This is referred as "thread tracing" in the documentation.
This is equivalent to the command "thread trace start".
If the thread is already being traced by a "process tracing" operation, e.g. with SBTrace::Start(const SBStructuredData &configuration), this operation fails.
[in] | configuration | Dictionary object with custom fields for the corresponding trace technology. |
Full details for the trace start parameters that can be set can be retrieved by calling SBTrace::GetStartConfigurationHelp().
Definition at line 106 of file SBTrace.cpp.
References error(), lldb_private::Status::FromErrorString(), LLDB_INSTRUMENT_VA, lldb::SBStructuredData::m_impl_up, and m_opaque_sp.
SBError SBTrace::Stop | ( | ) |
Stop tracing all threads in a live process.
If a "process tracing" operation is active, e.g. SBTrace::Start(const SBStructuredData &configuration), this effectively prevents future threads from being traced.
This is equivalent to the command "process trace stop".
Definition at line 123 of file SBTrace.cpp.
References error(), lldb_private::Status::FromErrorString(), LLDB_INSTRUMENT_VA, and m_opaque_sp.
Stop tracing a specific thread in a live process regardless of whether the thread was traced explicitly or as part of a "process tracing" operation.
This is equivalent to the command "thread trace stop".
Definition at line 133 of file SBTrace.cpp.
References error(), lldb_private::Status::FromErrorString(), LLDB_INSTRUMENT_VA, and m_opaque_sp.
|
protected |
Definition at line 142 of file SBTrace.h.
Referenced by CreateNewCursor(), GetStartConfigurationHelp(), SaveToDisk(), Start(), and Stop().
|
protected |