LLDB
mainline
|
#include <SBTrace.h>
Public Member Functions | |
SBTrace () | |
size_t | GetTraceData (SBError &error, void *buf, size_t size, size_t offset=0, lldb::tid_t thread_id=LLDB_INVALID_THREAD_ID) |
Obtain the trace data as raw bytes. More... | |
size_t | GetMetaData (SBError &error, void *buf, size_t size, size_t offset=0, lldb::tid_t thread_id=LLDB_INVALID_THREAD_ID) |
Obtain any meta data as raw bytes for the tracing instance. More... | |
void | StopTrace (SBError &error, lldb::tid_t thread_id=LLDB_INVALID_THREAD_ID) |
Stop the tracing instance. More... | |
void | GetTraceConfig (SBTraceOptions &options, SBError &error) |
Get the trace configuration being used for the trace instance. More... | |
lldb::user_id_t | GetTraceUID () |
operator bool () const | |
bool | IsValid () |
Protected Types | |
typedef std::shared_ptr< TraceImpl > | TraceImplSP |
Protected Member Functions | |
void | SetTraceUID (lldb::user_id_t uid) |
lldb::ProcessSP | GetSP () const |
void | SetSP (const ProcessSP &process_sp) |
Protected Attributes | |
TraceImplSP | m_trace_impl_sp |
lldb::ProcessWP | m_opaque_wp |
Friends | |
class | SBProcess |
|
protected |
SBTrace::SBTrace | ( | ) |
Definition at line 107 of file SBTrace.cpp.
References LLDB_INVALID_UID, and LLDB_RECORD_CONSTRUCTOR_NO_ARGS.
size_t SBTrace::GetMetaData | ( | SBError & | error, |
void * | buf, | ||
size_t | size, | ||
size_t | offset = 0 , |
||
lldb::tid_t | thread_id = LLDB_INVALID_THREAD_ID |
||
) |
Obtain any meta data as raw bytes for the tracing instance.
The input parameter definition is similar to the previous function.
Definition at line 46 of file SBTrace.cpp.
References lldb::SBError::Clear(), LLDB_RECORD_DUMMY, lldb::SBError::SetError(), and lldb::SBError::SetErrorString().
|
protected |
Definition at line 25 of file SBTrace.cpp.
void SBTrace::GetTraceConfig | ( | SBTraceOptions & | options, |
SBError & | error | ||
) |
Get the trace configuration being used for the trace instance.
The threadid in the SBTraceOptions needs to be set when the configuration used by a specific thread is being requested.
[out] | options | The trace options actually used by the trace instance would be filled by the API. |
[out] | error | An error explaining what went wrong. |
Definition at line 79 of file SBTrace.cpp.
References lldb::SBError::Clear(), LLDB_RECORD_METHOD, lldb::SBTraceOptions::m_traceoptions_sp, lldb::SBError::SetError(), and lldb::SBError::SetErrorString().
size_t SBTrace::GetTraceData | ( | SBError & | error, |
void * | buf, | ||
size_t | size, | ||
size_t | offset = 0 , |
||
lldb::tid_t | thread_id = LLDB_INVALID_THREAD_ID |
||
) |
Obtain the trace data as raw bytes.
[out] | error | An error explaining what went wrong. |
[in] | buf | Buffer to write the trace data to. |
[in] | size | The size of the buffer used to read the data. This is also the size of the data intended to read. It is also possible to partially read the trace data for some trace technologies by specifying a smaller buffer. |
[in] | offset | The start offset to begin reading the trace data. |
[in] | thread_id | Tracing could be started for the complete process or a single thread, in the first case the traceid obtained would map to all the threads existing within the process and the ones spawning later. The thread_id parameter can be used in such a scenario to select the trace data for a specific thread. |
Definition at line 27 of file SBTrace.cpp.
References lldb::SBError::Clear(), LLDB_RECORD_DUMMY, lldb::SBError::SetError(), and lldb::SBError::SetErrorString().
lldb::user_id_t SBTrace::GetTraceUID | ( | ) |
Definition at line 94 of file SBTrace.cpp.
References LLDB_INVALID_UID, and LLDB_RECORD_METHOD_NO_ARGS.
bool SBTrace::IsValid | ( | ) |
Definition at line 117 of file SBTrace.cpp.
References LLDB_RECORD_METHOD_NO_ARGS.
|
explicit |
Definition at line 121 of file SBTrace.cpp.
References LLDB_RECORD_METHOD_CONST_NO_ARGS.
|
protected |
Definition at line 115 of file SBTrace.cpp.
Referenced by lldb::SBProcess::StartTrace().
|
protected |
Definition at line 102 of file SBTrace.cpp.
Referenced by lldb::SBProcess::StartTrace().
void SBTrace::StopTrace | ( | SBError & | error, |
lldb::tid_t | thread_id = LLDB_INVALID_THREAD_ID |
||
) |
Stop the tracing instance.
Stopping the trace will also lead to deletion of any gathered trace data.
[out] | error | An error explaining what went wrong. |
[in] | thread_id | The trace id could map to a tracing instance for a thread or could also map to a group of threads being traced with the same trace options. A thread_id is normally optional except in the case of tracing a complete process and tracing needs to switched off on a particular thread. A situation could occur where initially a thread (lets say thread A) is being individually traced with a particular trace id and then tracing is started on the complete process, in this case thread A will continue without any change. All newly spawned threads would be traced with the trace id of the process. Now if the StopTrace API is called for the whole process, thread A will not be stopped and must be stopped separately. |
Definition at line 65 of file SBTrace.cpp.
References lldb::SBError::Clear(), LLDB_RECORD_METHOD, lldb::SBError::SetError(), and lldb::SBError::SetErrorString().
|
protected |