|
LLDB mainline
|
#include <SBTrace.h>
Public Member Functions | |
| SBTrace () | |
| Default constructor for an invalid Trace object. | |
| SBTrace (const lldb::SBTrace &rhs) | |
| lldb::SBTrace & | operator= (const lldb::SBTrace &rhs) |
| SBTrace (lldb::SBTrace &&rhs) | |
| lldb::SBTrace & | operator= (lldb::SBTrace &&rhs) |
| ~SBTrace () | |
| 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 26 of file SBTrace.cpp.
References LLDB_INSTRUMENT_VA.
Referenced by LoadTraceFromFile(), operator=(), operator=(), SBTarget, SBTrace(), SBTrace(), and ~SBTrace().
| SBTrace::SBTrace | ( | const lldb::SBTrace & | rhs | ) |
Definition at line 28 of file SBTrace.cpp.
References LLDB_INSTRUMENT_VA, m_opaque_sp, m_opaque_wp, and SBTrace().
| SBTrace::SBTrace | ( | lldb::SBTrace && | rhs | ) |
Definition at line 43 of file SBTrace.cpp.
References m_opaque_sp, m_opaque_wp, and SBTrace().
|
default |
References CreateNewCursor(), error(), GetStartConfigurationHelp(), IsValid(), LoadTraceFromFile(), SaveToDisk(), SBTrace(), Start(), and Stop().
|
protected |
Definition at line 55 of file SBTrace.cpp.
References LLDB_INSTRUMENT_VA, and m_opaque_sp.
| 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 74 of file SBTrace.cpp.
References error(), lldb_private::Status::FromErrorString(), LLDB_INSTRUMENT_VA, m_opaque_sp, and lldb::SBTraceCursor.
Referenced by ~SBTrace().
| const char * SBTrace::GetStartConfigurationHelp | ( | ) |
Definition at line 115 of file SBTrace.cpp.
References lldb_private::StringPool::GetSystemPool(), lldb_private::StringPoolRef::Intern(), LLDB_INSTRUMENT_VA, and m_opaque_sp.
Referenced by ~SBTrace().
| bool SBTrace::IsValid | ( | ) |
Definition at line 172 of file SBTrace.cpp.
References LLDB_INSTRUMENT_VA.
Referenced by ~SBTrace().
|
static |
See SBDebugger::LoadTraceFromFile.
Definition at line 59 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(), and ~SBTrace().
|
explicit |
Definition at line 177 of file SBTrace.cpp.
References LLDB_INSTRUMENT_VA, and m_opaque_sp.
| SBTrace & SBTrace::operator= | ( | const lldb::SBTrace & | rhs | ) |
Definition at line 33 of file SBTrace.cpp.
References LLDB_INSTRUMENT_VA, m_opaque_sp, m_opaque_wp, and SBTrace().
| SBTrace & SBTrace::operator= | ( | lldb::SBTrace && | rhs | ) |
Definition at line 47 of file SBTrace.cpp.
References m_opaque_sp, m_opaque_wp, and SBTrace().
| 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 96 of file SBTrace.cpp.
References error(), lldb_private::Status::FromErrorString(), LLDB_INSTRUMENT_VA, m_opaque_sp, lldb::SBFileSpec::ref(), and lldb::SBFileSpec::SetFileSpec().
Referenced by ~SBTrace().
| 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 124 of file SBTrace.cpp.
References error(), lldb_private::Status::FromErrorString(), LLDB_INSTRUMENT_VA, lldb::SBStructuredData::m_impl_up, and m_opaque_sp.
Referenced by ~SBTrace().
| 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 135 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 152 of file SBTrace.cpp.
References error(), lldb_private::Status::FromErrorString(), LLDB_INSTRUMENT_VA, and m_opaque_sp.
Referenced by ~SBTrace().
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 162 of file SBTrace.cpp.
References error(), lldb_private::Status::FromErrorString(), LLDB_INSTRUMENT_VA, and m_opaque_sp.
|
friend |
|
protected |
Definition at line 154 of file SBTrace.h.
Referenced by CreateNewCursor(), GetStartConfigurationHelp(), operator bool(), operator=(), operator=(), SaveToDisk(), SBTrace(), SBTrace(), SBTrace(), Start(), Start(), Stop(), and Stop().
|
protected |
deprecated
Definition at line 156 of file SBTrace.h.
Referenced by operator=(), operator=(), SBTrace(), and SBTrace().