LLDB  mainline
Public Member Functions | Protected Attributes | List of all members
lldb::SBTrace Class Reference

#include <SBTrace.h>

Collaboration diagram for lldb::SBTrace:
Collaboration graph
[legend]

Public Member Functions

 SBTrace ()
 Default constructor for an invalid Trace object. More...
 
 SBTrace (const lldb::TraceSP &trace_sp)
 
const char * GetStartConfigurationHelp ()
 
SBError Start (const SBStructuredData &configuration)
 Start tracing all current and future threads in a live process using a provided configuration. More...
 
SBError Start (const SBThread &thread, const SBStructuredData &configuration)
 Start tracing a specific thread in a live process using a provided configuration. More...
 
SBError Stop ()
 Stop tracing all threads in a live process. More...
 
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. More...
 
 operator bool () const
 
bool IsValid ()
 

Protected Attributes

lldb::TraceSP m_opaque_sp
 
lldb::ProcessWP m_opaque_wp
 deprecated More...
 

Detailed Description

Definition at line 19 of file SBTrace.h.

Constructor & Destructor Documentation

◆ SBTrace() [1/2]

SBTrace::SBTrace ( )

Default constructor for an invalid Trace object.

Definition at line 23 of file SBTrace.cpp.

References LLDB_RECORD_CONSTRUCTOR_NO_ARGS.

◆ SBTrace() [2/2]

SBTrace::SBTrace ( const lldb::TraceSP &  trace_sp)

Definition at line 25 of file SBTrace.cpp.

References LLDB_RECORD_CONSTRUCTOR.

Member Function Documentation

◆ GetStartConfigurationHelp()

const char * SBTrace::GetStartConfigurationHelp ( )
Returns
A description of the parameters to use for the SBTrace::Start method, or null if the object is invalid.

Definition at line 29 of file SBTrace.cpp.

References LLDB_RECORD_METHOD_NO_ARGS, LLDB_RECORD_RESULT, and m_opaque_sp.

◆ IsValid()

bool SBTrace::IsValid ( )

Definition at line 86 of file SBTrace.cpp.

References LLDB_RECORD_METHOD_NO_ARGS.

◆ operator bool()

SBTrace::operator bool ( ) const
explicit

Definition at line 91 of file SBTrace.cpp.

References LLDB_RECORD_METHOD_CONST_NO_ARGS.

◆ Start() [1/2]

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.

Parameters
[in]configurationDictionary 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().

Returns
An error explaining any failures.

Definition at line 35 of file SBTrace.cpp.

References error(), LLDB_RECORD_METHOD, LLDB_RECORD_RESULT, lldb::SBStructuredData::m_impl_up, m_opaque_sp, and lldb_private::toString().

Referenced by Start().

◆ Start() [2/2]

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.

Parameters
[in]configurationDictionary 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().

Returns
An error explaining any failures.

Definition at line 47 of file SBTrace.cpp.

References error(), LLDB_RECORD_METHOD, LLDB_RECORD_RESULT, lldb::SBStructuredData::m_impl_up, m_opaque_sp, Start(), and lldb_private::toString().

◆ Stop() [1/2]

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".

Returns
An error explaining any failures.

Definition at line 66 of file SBTrace.cpp.

References error(), LLDB_RECORD_METHOD_NO_ARGS, LLDB_RECORD_RESULT, m_opaque_sp, and lldb_private::toString().

Referenced by Stop().

◆ Stop() [2/2]

SBError SBTrace::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.

This is equivalent to the command "thread trace stop".

Returns
An error explaining any failures.

Definition at line 76 of file SBTrace.cpp.

References error(), LLDB_RECORD_METHOD, LLDB_RECORD_RESULT, m_opaque_sp, Stop(), and lldb_private::toString().

Member Data Documentation

◆ m_opaque_sp

lldb::TraceSP lldb::SBTrace::m_opaque_sp
protected

Definition at line 101 of file SBTrace.h.

Referenced by GetStartConfigurationHelp(), Start(), and Stop().

◆ m_opaque_wp

lldb::ProcessWP lldb::SBTrace::m_opaque_wp
protected

deprecated

Definition at line 103 of file SBTrace.h.


The documentation for this class was generated from the following files: