|
LLDB mainline
|
#include <SBThread.h>
Public Types | |
| enum | { eBroadcastBitStackChanged = (1 << 0) , eBroadcastBitThreadSuspended = (1 << 1) , eBroadcastBitThreadResumed = (1 << 2) , eBroadcastBitSelectedFrameChanged = (1 << 3) , eBroadcastBitThreadSelected = (1 << 4) } |
Public Member Functions | |
| SBThread () | |
| SBThread (const lldb::SBThread &thread) | |
| ~SBThread () | |
| lldb::SBQueue | GetQueue () const |
| operator bool () const | |
| bool | IsValid () const |
| void | Clear () |
| lldb::StopReason | GetStopReason () |
| size_t | GetStopReasonDataCount () |
| Get the number of words associated with the stop reason. | |
| uint64_t | GetStopReasonDataAtIndex (uint32_t idx) |
| Get information associated with a stop reason. | |
| bool | GetStopReasonExtendedInfoAsJSON (lldb::SBStream &stream) |
| SBThreadCollection | GetStopReasonExtendedBacktraces (InstrumentationRuntimeType type) |
| bool | GetStopDescription (lldb::SBStream &stream) const |
| Gets a human-readable description of why the thread stopped. | |
| size_t | GetStopDescription (char *dst_or_null, size_t dst_len) |
| SBValue | GetStopReturnValue () |
| Get the value the function returned, if the thread stopped because it stepped out of a function. | |
| SBValue | GetStopErrorValue () |
| Get the error the function threw, if the thread stopped because it stepped out of a function that threw instead of returning. | |
| lldb::tid_t | GetThreadID () const |
| uint32_t | GetIndexID () const |
| const char * | GetName () const |
| const char * | GetQueueName () const |
| lldb::queue_id_t | GetQueueID () const |
| bool | GetInfoItemByPathAsString (const char *path, SBStream &strm) |
| void | StepOver (lldb::RunMode stop_other_threads=lldb::eOnlyDuringStepping) |
| void | StepOver (lldb::RunMode stop_other_threads, SBError &error) |
| void | StepInto (lldb::RunMode stop_other_threads=lldb::eOnlyDuringStepping) |
| void | StepInto (const char *target_name, lldb::RunMode stop_other_threads=lldb::eOnlyDuringStepping) |
| void | StepInto (const char *target_name, uint32_t end_line, SBError &error, lldb::RunMode stop_other_threads=lldb::eOnlyDuringStepping) |
| void | StepOut () |
| void | StepOut (SBError &error) |
| void | StepOutOfFrame (SBFrame &frame) |
| void | StepOutOfFrame (SBFrame &frame, SBError &error) |
| void | StepInstruction (bool step_over) |
| void | StepInstruction (bool step_over, SBError &error) |
| SBError | StepOverUntil (lldb::SBFrame &frame, lldb::SBFileSpec &file_spec, uint32_t line) |
| SBError | StepUsingScriptedThreadPlan (const char *script_class_name) |
| SBError | StepUsingScriptedThreadPlan (const char *script_class_name, bool resume_immediately) |
| SBError | StepUsingScriptedThreadPlan (const char *script_class_name, lldb::SBStructuredData &args_data, bool resume_immediately) |
| SBError | JumpToLine (lldb::SBFileSpec &file_spec, uint32_t line) |
| void | RunToAddress (lldb::addr_t addr) |
| void | RunToAddress (lldb::addr_t addr, SBError &error) |
| SBError | ReturnFromFrame (SBFrame &frame, SBValue &return_value) |
| SBError | UnwindInnermostExpression () |
| bool | Suspend () |
| LLDB currently supports process centric debugging which means when any thread in a process stops, all other threads are stopped. | |
| bool | Suspend (SBError &error) |
| bool | Resume () |
| bool | Resume (SBError &error) |
| bool | IsSuspended () |
| bool | IsStopped () |
| uint32_t | GetNumFrames () |
| lldb::SBFrame | GetFrameAtIndex (uint32_t idx) |
| lldb::SBFrameList | GetFrames () const |
| lldb::SBFrame | GetSelectedFrame () |
| lldb::SBFrame | SetSelectedFrame (uint32_t frame_idx) |
| lldb::SBProcess | GetProcess () |
| const lldb::SBThread & | operator= (const lldb::SBThread &rhs) |
| bool | operator== (const lldb::SBThread &rhs) const |
| bool | operator!= (const lldb::SBThread &rhs) const |
| bool | GetDescription (lldb::SBStream &description) const |
| bool | GetDescription (lldb::SBStream &description, bool stop_format) const |
| SBError | GetDescriptionWithFormat (const SBFormat &format, SBStream &output) |
Similar to GetDescription() but the format of the description can be configured via the format parameter. | |
| bool | GetStatus (lldb::SBStream &status) const |
| SBThread | GetExtendedBacktraceThread (const char *type) |
| uint32_t | GetExtendedBacktraceOriginatingIndexID () |
| SBValue | GetCurrentException () |
| SBThread | GetCurrentExceptionBacktrace () |
| bool | SafeToCallFunctions () |
| SBValue | GetSiginfo () |
Static Public Member Functions | |
| static const char * | GetBroadcasterClassName () |
| static bool | EventIsThreadEvent (const SBEvent &event) |
| static SBFrame | GetStackFrameFromEvent (const SBEvent &event) |
| static SBThread | GetThreadFromEvent (const SBEvent &event) |
Private Member Functions | |
| SBThread (const lldb::ThreadSP &lldb_object_sp) | |
| void | SetThread (const lldb::ThreadSP &lldb_object_sp) |
| lldb::ThreadSP | GetSP () const |
| lldb_private::Thread * | operator-> () |
| lldb_private::Thread * | get () |
Private Attributes | |
| lldb::ExecutionContextRefSP | m_opaque_sp |
Friends | |
| class | SBBreakpoint |
| class | SBBreakpointLocation |
| class | SBBreakpointCallbackBaton |
| class | SBSaveCoreOptions |
| class | SBExecutionContext |
| class | SBFrame |
| class | SBFrameList |
| class | SBProcess |
| class | SBDebugger |
| class | SBValue |
| class | lldb_private::QueueImpl |
| class | SBQueueItem |
| class | SBThreadCollection |
| class | SBThreadPlan |
| class | SBTrace |
| class | lldb_private::ScriptInterpreterBridge |
| class | lldb_private::python::SWIGBridge |
Definition at line 26 of file SBThread.h.
| anonymous enum |
| Enumerator | |
|---|---|
| eBroadcastBitStackChanged | |
| eBroadcastBitThreadSuspended | |
| eBroadcastBitThreadResumed | |
| eBroadcastBitSelectedFrameChanged | |
| eBroadcastBitThreadSelected | |
Definition at line 28 of file SBThread.h.
| SBThread::SBThread | ( | ) |
Definition at line 63 of file SBThread.cpp.
References LLDB_INSTRUMENT_VA, and m_opaque_sp.
Referenced by GetCurrentExceptionBacktrace(), GetExtendedBacktraceThread(), GetThreadFromEvent(), lldb_private::python::SWIGBridge, operator!=(), operator=(), operator==(), SBThread(), and ~SBThread().
| SBThread::SBThread | ( | const lldb::SBThread & | thread | ) |
Definition at line 72 of file SBThread.cpp.
References lldb_private::clone(), LLDB_INSTRUMENT_VA, m_opaque_sp, and SBThread().
|
default |
References Clear(), lldb::eOnlyDuringStepping, error(), EventIsThreadEvent(), GetCurrentException(), GetCurrentExceptionBacktrace(), GetDescription(), GetDescriptionWithFormat(), GetExtendedBacktraceOriginatingIndexID(), GetExtendedBacktraceThread(), GetFrameAtIndex(), GetFrames(), GetIndexID(), GetInfoItemByPathAsString(), GetNumFrames(), GetProcess(), GetQueue(), GetQueueID(), GetQueueName(), GetSelectedFrame(), GetSiginfo(), GetStackFrameFromEvent(), GetStatus(), GetStopDescription(), GetStopErrorValue(), GetStopReason(), GetStopReasonDataAtIndex(), GetStopReasonDataCount(), GetStopReasonExtendedBacktraces(), GetStopReasonExtendedInfoAsJSON(), GetStopReturnValue(), GetThreadFromEvent(), GetThreadID(), IsStopped(), IsSuspended(), IsValid(), JumpToLine(), operator!=(), operator=(), operator==(), Resume(), ReturnFromFrame(), RunToAddress(), SafeToCallFunctions(), SBFrame, SBThread(), SBThreadCollection, SBValue, SetSelectedFrame(), StepInstruction(), StepInto(), StepOut(), StepOutOfFrame(), StepOver(), StepOverUntil(), StepUsingScriptedThreadPlan(), Suspend(), and UnwindInnermostExpression().
|
private |
Definition at line 67 of file SBThread.cpp.
References LLDB_INSTRUMENT_VA, and m_opaque_sp.
| void SBThread::Clear | ( | ) |
Definition at line 132 of file SBThread.cpp.
References LLDB_INSTRUMENT_VA, and m_opaque_sp.
Referenced by ~SBThread().
Definition at line 1258 of file SBThread.cpp.
References lldb::SBEvent::get(), lldb_private::Thread::ThreadEventData::GetEventDataFromEvent(), and LLDB_INSTRUMENT_VA.
Referenced by ~SBThread().
|
private |
Definition at line 1475 of file SBThread.cpp.
References m_opaque_sp.
Referenced by operator->(), lldb::SBThreadPlan::SBThreadPlan(), and lldb::SBThreadPlan::SBThreadPlan().
|
static |
Definition at line 55 of file SBThread.cpp.
References lldb_private::Thread::GetStaticBroadcasterClass(), lldb_private::StringPool::GetSystemPool(), lldb_private::StringPoolRef::InternNonEmpty(), and LLDB_INSTRUMENT.
| SBValue SBThread::GetCurrentException | ( | ) |
Definition at line 1419 of file SBThread.cpp.
References lldb_private::API, lldb_private::GetLog(), lldb_private::GetStoppedExecutionContext(), LLDB_INSTRUMENT_VA, LLDB_LOG_ERROR, m_opaque_sp, and SBValue.
Referenced by ~SBThread().
| SBThread SBThread::GetCurrentExceptionBacktrace | ( | ) |
Definition at line 1436 of file SBThread.cpp.
References lldb_private::API, lldb_private::GetLog(), lldb_private::GetStoppedExecutionContext(), LLDB_INSTRUMENT_VA, LLDB_LOG_ERROR, m_opaque_sp, and SBThread().
Referenced by ~SBThread().
| bool SBThread::GetDescription | ( | lldb::SBStream & | description | ) | const |
Definition at line 1311 of file SBThread.cpp.
References GetDescription(), and LLDB_INSTRUMENT_VA.
Referenced by GetDescription(), and ~SBThread().
| bool SBThread::GetDescription | ( | lldb::SBStream & | description, |
| bool | stop_format ) const |
Definition at line 1317 of file SBThread.cpp.
References lldb_private::API, lldb_private::GetLog(), lldb_private::GetStoppedExecutionContext(), LLDB_INSTRUMENT_VA, LLDB_INVALID_THREAD_ID, LLDB_LOG_ERROR, m_opaque_sp, lldb_private::Stream::PutCString(), and lldb::SBStream::ref().
Similar to GetDescription() but the format of the description can be configured via the format parameter.
See https://lldb.llvm.org/use/formatting.html for more information on format strings.
| [in] | format | The format to use for generating the description. |
| [out] | output | The stream where the description will be written to. |
Definition at line 1338 of file SBThread.cpp.
References lldb_private::API, error(), lldb_private::Status::FromErrorString(), lldb_private::Status::FromErrorStringWithFormat(), lldb::SBFormat::GetFormatEntrySP(), lldb_private::GetLog(), lldb_private::GetStoppedExecutionContext(), LLDB_INVALID_THREAD_ID, LLDB_LOG_ERROR, m_opaque_sp, and lldb::SBStream::ref().
Referenced by ~SBThread().
| uint32_t SBThread::GetExtendedBacktraceOriginatingIndexID | ( | ) |
Definition at line 1403 of file SBThread.cpp.
References lldb_private::API, lldb_private::GetLog(), lldb_private::GetStoppedExecutionContext(), LLDB_INSTRUMENT_VA, LLDB_INVALID_INDEX32, LLDB_LOG_ERROR, and m_opaque_sp.
Referenced by ~SBThread().
| SBThread SBThread::GetExtendedBacktraceThread | ( | const char * | type | ) |
Definition at line 1369 of file SBThread.cpp.
References lldb_private::ThreadCollection::AddThread(), lldb_private::API, lldb_private::SystemRuntime::GetExtendedBacktraceThread(), lldb_private::Process::GetExtendedThreadList(), lldb_private::GetLog(), lldb_private::GetStoppedExecutionContext(), lldb_private::Process::GetSystemRuntime(), LLDB_INSTRUMENT_VA, LLDB_LOG_ERROR, m_opaque_sp, SBThread(), and SetThread().
Referenced by ~SBThread().
| SBFrame SBThread::GetFrameAtIndex | ( | uint32_t | idx | ) |
Definition at line 1175 of file SBThread.cpp.
References lldb_private::API, lldb_private::GetLog(), lldb_private::GetStoppedExecutionContext(), LLDB_INSTRUMENT_VA, LLDB_LOG_ERROR, m_opaque_sp, SBFrame, and lldb::SBFrame::SetFrameSP().
Referenced by ~SBThread().
| lldb::SBFrameList SBThread::GetFrames | ( | ) | const |
Definition at line 1194 of file SBThread.cpp.
References lldb_private::API, lldb_private::GetLog(), lldb_private::GetStoppedExecutionContext(), LLDB_INSTRUMENT_VA, LLDB_LOG_ERROR, m_opaque_sp, SBFrameList, and lldb::SBFrameList::SetFrameList().
Referenced by ~SBThread().
| uint32_t SBThread::GetIndexID | ( | ) | const |
Definition at line 352 of file SBThread.cpp.
References lldb_private::API, lldb_private::GetLog(), lldb_private::GetStoppedExecutionContext(), LLDB_INSTRUMENT_VA, LLDB_INVALID_INDEX32, LLDB_LOG_ERROR, and m_opaque_sp.
Referenced by ~SBThread().
Definition at line 420 of file SBThread.cpp.
References lldb_private::API, lldb::eStructuredDataTypeBoolean, lldb::eStructuredDataTypeFloat, lldb::eStructuredDataTypeInteger, lldb::eStructuredDataTypeNull, lldb::eStructuredDataTypeString, lldb_private::GetLog(), lldb_private::GetStoppedExecutionContext(), LLDB_INSTRUMENT_VA, LLDB_LOG_ERROR, m_opaque_sp, and lldb::SBStream::ref().
Referenced by ~SBThread().
| const char * SBThread::GetName | ( | ) | const |
Definition at line 368 of file SBThread.cpp.
References lldb_private::API, lldb_private::GetDebuggerStringPool(), lldb_private::GetLog(), lldb_private::GetStoppedExecutionContext(), lldb_private::StringPoolRef::Intern(), LLDB_INSTRUMENT_VA, LLDB_LOG_ERROR, and m_opaque_sp.
| uint32_t SBThread::GetNumFrames | ( | ) |
Definition at line 1159 of file SBThread.cpp.
References lldb_private::API, lldb_private::GetLog(), lldb_private::GetStoppedExecutionContext(), LLDB_INSTRUMENT_VA, LLDB_LOG_ERROR, and m_opaque_sp.
Referenced by ~SBThread().
| SBProcess SBThread::GetProcess | ( | ) |
Definition at line 1139 of file SBThread.cpp.
References lldb_private::API, lldb_private::GetLog(), lldb_private::GetStoppedExecutionContext(), LLDB_INSTRUMENT_VA, LLDB_LOG_ERROR, m_opaque_sp, SBProcess, and lldb::SBProcess::SetSP().
Referenced by ~SBThread().
| lldb::SBQueue SBThread::GetQueue | ( | ) | const |
Definition at line 91 of file SBThread.cpp.
References lldb_private::API, lldb_private::GetLog(), lldb_private::GetStoppedExecutionContext(), LLDB_INSTRUMENT_VA, LLDB_LOG_ERROR, m_opaque_sp, lldb::SBQueue, and lldb::SBQueue::SetQueue().
Referenced by ~SBThread().
| lldb::queue_id_t SBThread::GetQueueID | ( | ) | const |
Definition at line 402 of file SBThread.cpp.
References lldb_private::API, lldb_private::GetLog(), lldb_private::GetStoppedExecutionContext(), LLDB_INSTRUMENT_VA, LLDB_INVALID_QUEUE_ID, LLDB_LOG_ERROR, and m_opaque_sp.
Referenced by ~SBThread().
| const char * SBThread::GetQueueName | ( | ) | const |
Definition at line 385 of file SBThread.cpp.
References lldb_private::API, lldb_private::GetDebuggerStringPool(), lldb_private::GetLog(), lldb_private::GetStoppedExecutionContext(), lldb_private::StringPoolRef::Intern(), LLDB_INSTRUMENT_VA, LLDB_LOG_ERROR, and m_opaque_sp.
Referenced by ~SBThread().
| lldb::SBFrame SBThread::GetSelectedFrame | ( | ) |
Definition at line 1214 of file SBThread.cpp.
References lldb_private::API, lldb_private::GetLog(), lldb_private::GetStoppedExecutionContext(), LLDB_INSTRUMENT_VA, LLDB_LOG_ERROR, m_opaque_sp, SBFrame, SelectMostRelevantFrame, and lldb::SBFrame::SetFrameSP().
Referenced by ~SBThread().
| SBValue SBThread::GetSiginfo | ( | ) |
Definition at line 1479 of file SBThread.cpp.
References lldb_private::API, lldb_private::GetLog(), lldb_private::GetStoppedExecutionContext(), LLDB_INSTRUMENT_VA, LLDB_LOG_ERROR, m_opaque_sp, and SBValue.
Referenced by ~SBThread().
|
private |
Definition at line 1469 of file SBThread.cpp.
References m_opaque_sp.
Referenced by lldb_private::python::SWIGBridge.
Definition at line 1264 of file SBThread.cpp.
References lldb::SBEvent::get(), lldb_private::Thread::ThreadEventData::GetStackFrameFromEvent(), LLDB_INSTRUMENT_VA, and SBFrame.
Referenced by ~SBThread().
| bool SBThread::GetStatus | ( | lldb::SBStream & | status | ) | const |
Definition at line 1290 of file SBThread.cpp.
References lldb_private::API, lldb_private::GetLog(), lldb_private::GetStoppedExecutionContext(), LLDB_INSTRUMENT_VA, LLDB_LOG_ERROR, m_opaque_sp, lldb_private::Stream::PutCString(), and lldb::SBStream::ref().
Referenced by ~SBThread().
| size_t SBThread::GetStopDescription | ( | char * | dst_or_null, |
| size_t | dst_len ) |
Definition at line 268 of file SBThread.cpp.
References lldb_private::API, lldb_private::GetLog(), lldb_private::GetStoppedExecutionContext(), LLDB_INSTRUMENT_VA, LLDB_LOG_ERROR, and m_opaque_sp.
| bool SBThread::GetStopDescription | ( | lldb::SBStream & | stream | ) | const |
Gets a human-readable description of why the thread stopped.
| stream | Output stream to receive the stop description text |
Definition at line 245 of file SBThread.cpp.
References lldb_private::API, lldb_private::GetLog(), lldb_private::GetStoppedExecutionContext(), LLDB_INSTRUMENT_VA, LLDB_LOG_ERROR, m_opaque_sp, lldb_private::Stream::PutCString(), and lldb::SBStream::ref().
Referenced by ~SBThread().
| SBValue SBThread::GetStopErrorValue | ( | ) |
Get the error the function threw, if the thread stopped because it stepped out of a function that threw instead of returning.
Only languages whose runtime can find thrown errors, such as Swift, report one.
Definition at line 323 of file SBThread.cpp.
References GetStopReturnValueImpl(), LLDB_INSTRUMENT_VA, m_opaque_sp, and SBValue.
Referenced by ~SBThread().
| StopReason SBThread::GetStopReason | ( | ) |
Definition at line 138 of file SBThread.cpp.
References lldb_private::API, lldb::eStopReasonInvalid, lldb_private::GetLog(), lldb_private::GetStoppedExecutionContext(), LLDB_INSTRUMENT_VA, LLDB_LOG_ERROR, and m_opaque_sp.
Referenced by ~SBThread().
| uint64_t SBThread::GetStopReasonDataAtIndex | ( | uint32_t | idx | ) |
Get information associated with a stop reason.
Breakpoint stop reasons will have data that consists of pairs of breakpoint IDs followed by the breakpoint location IDs (they always come in pairs).
Stop Reason Count Data Type ======================== ===== ========================================= eStopReasonNone 0 eStopReasonTrace 0 eStopReasonBreakpoint N duple: {breakpoint id, location id} eStopReasonWatchpoint 1 watchpoint id eStopReasonSignal 1 unix signal number eStopReasonException N exception data eStopReasonExec 0 eStopReasonFork 1 pid of the child process eStopReasonVFork 1 pid of the child process eStopReasonVForkDone 0 eStopReasonPlanComplete 0
Definition at line 173 of file SBThread.cpp.
References lldb_private::API, lldb_private::GetLog(), lldb_private::GetStoppedExecutionContext(), LLDB_INSTRUMENT_VA, LLDB_LOG_ERROR, and m_opaque_sp.
Referenced by ~SBThread().
| size_t SBThread::GetStopReasonDataCount | ( | ) |
Get the number of words associated with the stop reason.
See also GetStopReasonDataAtIndex().
Definition at line 155 of file SBThread.cpp.
References lldb_private::API, lldb_private::GetLog(), lldb_private::GetStoppedExecutionContext(), LLDB_INSTRUMENT_VA, LLDB_LOG_ERROR, and m_opaque_sp.
Referenced by ~SBThread().
| SBThreadCollection SBThread::GetStopReasonExtendedBacktraces | ( | InstrumentationRuntimeType | type | ) |
Definition at line 218 of file SBThread.cpp.
References lldb_private::API, lldb_private::GetLog(), lldb_private::GetStoppedExecutionContext(), LLDB_INSTRUMENT_VA, LLDB_LOG_ERROR, m_opaque_sp, and SBThreadCollection.
Referenced by ~SBThread().
| bool SBThread::GetStopReasonExtendedInfoAsJSON | ( | lldb::SBStream & | stream | ) |
Definition at line 192 of file SBThread.cpp.
References lldb_private::API, lldb_private::GetLog(), lldb_private::GetStoppedExecutionContext(), LLDB_INSTRUMENT_VA, LLDB_LOG_ERROR, m_opaque_sp, and lldb::SBStream::ref().
Referenced by ~SBThread().
| SBValue SBThread::GetStopReturnValue | ( | ) |
Get the value the function returned, if the thread stopped because it stepped out of a function.
Invalid if the function threw an error instead. See GetStopErrorValue.
Definition at line 314 of file SBThread.cpp.
References GetStopReturnValueImpl(), LLDB_INSTRUMENT_VA, m_opaque_sp, and SBValue.
Referenced by ~SBThread().
Definition at line 1270 of file SBThread.cpp.
References lldb::SBEvent::get(), lldb_private::Thread::ThreadEventData::GetThreadFromEvent(), LLDB_INSTRUMENT_VA, and SBThread().
Referenced by ~SBThread().
| lldb::tid_t SBThread::GetThreadID | ( | ) | const |
Definition at line 336 of file SBThread.cpp.
References lldb_private::API, lldb_private::GetLog(), lldb_private::GetStoppedExecutionContext(), LLDB_INSTRUMENT_VA, LLDB_INVALID_THREAD_ID, LLDB_LOG_ERROR, and m_opaque_sp.
Referenced by StepOutOfFrame(), and ~SBThread().
| bool SBThread::IsStopped | ( | ) |
Definition at line 1124 of file SBThread.cpp.
References lldb_private::API, lldb_private::GetLog(), lldb_private::GetStoppedExecutionContext(), LLDB_INSTRUMENT_VA, LLDB_LOG_ERROR, m_opaque_sp, and lldb_private::StateIsStoppedState().
Referenced by ~SBThread().
| bool SBThread::IsSuspended | ( | ) |
Definition at line 1109 of file SBThread.cpp.
References lldb_private::API, lldb::eStateSuspended, lldb_private::GetLog(), lldb_private::GetStoppedExecutionContext(), LLDB_INSTRUMENT_VA, LLDB_LOG_ERROR, and m_opaque_sp.
Referenced by ~SBThread().
| bool SBThread::IsValid | ( | ) | const |
Definition at line 113 of file SBThread.cpp.
References LLDB_INSTRUMENT_VA.
Referenced by ~SBThread().
| SBError SBThread::JumpToLine | ( | lldb::SBFileSpec & | file_spec, |
| uint32_t | line ) |
Definition at line 994 of file SBThread.cpp.
References lldb_private::Status::FromError(), lldb_private::Status::FromErrorString(), lldb_private::GetStoppedExecutionContext(), LLDB_INSTRUMENT_VA, m_opaque_sp, lldb::SBFileSpec::ref(), and lldb::SBError::SetError().
Referenced by ~SBThread().
|
explicit |
Definition at line 117 of file SBThread.cpp.
References lldb_private::API, lldb_private::GetLog(), lldb_private::GetStoppedExecutionContext(), LLDB_INSTRUMENT_VA, LLDB_LOG_ERROR, and m_opaque_sp.
| bool SBThread::operator!= | ( | const lldb::SBThread & | rhs | ) | const |
Definition at line 1283 of file SBThread.cpp.
References LLDB_INSTRUMENT_VA, m_opaque_sp, and SBThread().
Referenced by ~SBThread().
|
private |
Definition at line 1471 of file SBThread.cpp.
References get().
| const lldb::SBThread & SBThread::operator= | ( | const lldb::SBThread & | rhs | ) |
Definition at line 80 of file SBThread.cpp.
References lldb_private::clone(), LLDB_INSTRUMENT_VA, m_opaque_sp, and SBThread().
Referenced by ~SBThread().
| bool SBThread::operator== | ( | const lldb::SBThread & | rhs | ) | const |
Definition at line 1276 of file SBThread.cpp.
References LLDB_INSTRUMENT_VA, m_opaque_sp, and SBThread().
Referenced by ~SBThread().
| bool SBThread::Resume | ( | ) |
Definition at line 1081 of file SBThread.cpp.
References error(), LLDB_INSTRUMENT_VA, and Resume().
Referenced by Resume(), and ~SBThread().
Definition at line 1088 of file SBThread.cpp.
References lldb_private::API, error(), lldb::eStateRunning, lldb_private::Status::FromErrorString(), lldb_private::GetLog(), lldb_private::GetStoppedExecutionContext(), LLDB_INSTRUMENT_VA, LLDB_LOG_ERROR, and m_opaque_sp.
Definition at line 1016 of file SBThread.cpp.
References lldb_private::Status::FromError(), lldb::SBFrame::GetFrameSP(), lldb::SBValue::GetSP(), lldb_private::GetStoppedExecutionContext(), LLDB_INSTRUMENT_VA, m_opaque_sp, SBFrame, SBValue, and lldb::SBError::SetError().
Referenced by ~SBThread().
| void SBThread::RunToAddress | ( | lldb::addr_t | addr | ) |
Definition at line 811 of file SBThread.cpp.
References error(), LLDB_INSTRUMENT_VA, and RunToAddress().
Referenced by RunToAddress(), and ~SBThread().
| void SBThread::RunToAddress | ( | lldb::addr_t | addr, |
| SBError & | error ) |
Definition at line 818 of file SBThread.cpp.
References lldb_private::Status::AsCString(), error(), lldb_private::Status::FromError(), lldb_private::Status::FromErrorString(), lldb_private::GetStoppedExecutionContext(), LLDB_INSTRUMENT_VA, m_opaque_sp, ResumeNewPlan(), and lldb_private::Status::Success().
| bool SBThread::SafeToCallFunctions | ( | ) |
Definition at line 1453 of file SBThread.cpp.
References lldb_private::API, lldb_private::GetLog(), lldb_private::GetStoppedExecutionContext(), LLDB_INSTRUMENT_VA, LLDB_LOG_ERROR, and m_opaque_sp.
Referenced by ~SBThread().
| lldb::SBFrame SBThread::SetSelectedFrame | ( | uint32_t | frame_idx | ) |
Definition at line 1234 of file SBThread.cpp.
References lldb_private::API, lldb_private::GetLog(), lldb_private::GetStoppedExecutionContext(), LLDB_INSTRUMENT_VA, LLDB_LOG_ERROR, m_opaque_sp, SBFrame, and lldb::SBFrame::SetFrameSP().
Referenced by ~SBThread().
|
private |
Definition at line 332 of file SBThread.cpp.
References m_opaque_sp.
Referenced by lldb::SBProcess::CreateOSPluginThread(), lldb::SBQueueItem::GetExtendedBacktraceThread(), GetExtendedBacktraceThread(), lldb::SBProcess::GetSelectedThread(), lldb::SBExecutionContext::GetThread(), lldb::SBFrameList::GetThread(), lldb::SBValue::GetThread(), lldb::SBProcess::GetThreadAtIndex(), lldb_private::QueueImpl::GetThreadAtIndex(), lldb::SBProcess::GetThreadByID(), lldb::SBProcess::GetThreadByIndexID(), lldb_private::python::SWIGBridge, and lldb::SBBreakpointCallbackBaton::PrivateBreakpointHitCallback().
| void SBThread::StepInstruction | ( | bool | step_over | ) |
Definition at line 759 of file SBThread.cpp.
References error(), LLDB_INSTRUMENT_VA, and StepInstruction().
Referenced by StepInstruction(), and ~SBThread().
Definition at line 766 of file SBThread.cpp.
References lldb_private::Status::AsCString(), error(), lldb::eStepTypeTrace, lldb::eStepTypeTraceOver, lldb_private::Status::FromError(), lldb_private::Status::FromErrorString(), lldb_private::GetStoppedExecutionContext(), LLDB_INSTRUMENT_VA, m_opaque_sp, ResumeNewPlan(), and lldb_private::Status::Success().
| void SBThread::StepInto | ( | const char * | target_name, |
| lldb::RunMode | stop_other_threads = lldb::eOnlyDuringStepping ) |
Definition at line 563 of file SBThread.cpp.
References error(), LLDB_INSTRUMENT_VA, LLDB_INVALID_LINE_NUMBER, and StepInto().
| void SBThread::StepInto | ( | const char * | target_name, |
| uint32_t | end_line, | ||
| SBError & | error, | ||
| lldb::RunMode | stop_other_threads = lldb::eOnlyDuringStepping ) |
Definition at line 571 of file SBThread.cpp.
References lldb_private::Status::AsCString(), lldb_private::eLazyBoolCalculate, error(), lldb::eStepTypeInto, lldb::eStepTypeTrace, lldb_private::Status::FromError(), lldb_private::Status::FromErrorString(), lldb_private::SymbolContext::GetAddressRangeFromHereToEndLine(), lldb_private::GetStoppedExecutionContext(), lldb_private::SymbolContext::line_entry, LLDB_INSTRUMENT_VA, LLDB_INVALID_LINE_NUMBER, m_opaque_sp, lldb_private::LineEntry::range, ResumeNewPlan(), and lldb_private::Status::Success().
| void SBThread::StepInto | ( | lldb::RunMode | stop_other_threads = lldb::eOnlyDuringStepping | ) |
Definition at line 557 of file SBThread.cpp.
References LLDB_INSTRUMENT_VA, and StepInto().
Referenced by StepInto(), StepInto(), and ~SBThread().
| void SBThread::StepOut | ( | ) |
Definition at line 651 of file SBThread.cpp.
References error(), LLDB_INSTRUMENT_VA, and StepOut().
Referenced by StepOut(), and ~SBThread().
| void SBThread::StepOut | ( | SBError & | error | ) |
Definition at line 658 of file SBThread.cpp.
References lldb_private::Status::AsCString(), lldb_private::eLazyBoolCalculate, error(), lldb::eStepTypeOut, lldb_private::eVoteNoOpinion, lldb_private::eVoteYes, lldb_private::Status::FromError(), lldb_private::Status::FromErrorString(), lldb_private::GetStoppedExecutionContext(), LLDB_INSTRUMENT_VA, m_opaque_sp, ResumeNewPlan(), and lldb_private::Status::Success().
| void SBThread::StepOutOfFrame | ( | SBFrame & | frame | ) |
Definition at line 711 of file SBThread.cpp.
References error(), LLDB_INSTRUMENT_VA, SBFrame, and StepOutOfFrame().
Referenced by StepOutOfFrame(), and ~SBThread().
Definition at line 718 of file SBThread.cpp.
References lldb_private::Status::AsCString(), error(), lldb_private::eVoteNoOpinion, lldb_private::eVoteYes, lldb_private::Status::FromError(), lldb_private::Status::FromErrorString(), lldb::SBFrame::GetFrameSP(), lldb_private::GetStoppedExecutionContext(), lldb::SBFrame::GetThread(), GetThreadID(), lldb::SBFrame::IsValid(), LLDB_INSTRUMENT_VA, m_opaque_sp, ResumeNewPlan(), SBFrame, and lldb_private::Status::Success().
| void SBThread::StepOver | ( | lldb::RunMode | stop_other_threads, |
| SBError & | error ) |
Definition at line 500 of file SBThread.cpp.
References lldb_private::eLazyBoolCalculate, error(), lldb::eStepTypeOver, lldb::eStepTypeTraceOver, lldb_private::Status::FromError(), lldb_private::Status::FromErrorString(), lldb_private::GetStoppedExecutionContext(), lldb_private::SymbolContext::line_entry, LLDB_INSTRUMENT_VA, m_opaque_sp, and ResumeNewPlan().
| void SBThread::StepOver | ( | lldb::RunMode | stop_other_threads = lldb::eOnlyDuringStepping | ) |
Definition at line 493 of file SBThread.cpp.
References error(), LLDB_INSTRUMENT_VA, and StepOver().
Referenced by StepOver(), and ~SBThread().
| SBError SBThread::StepOverUntil | ( | lldb::SBFrame & | frame, |
| lldb::SBFileSpec & | file_spec, | ||
| uint32_t | line ) |
Definition at line 850 of file SBThread.cpp.
References lldb_private::Status::AsCString(), lldb_private::SymbolContext::comp_unit, DoNoSelectMostRelevantFrame, lldb_private::Status::FromError(), lldb_private::Status::FromErrorString(), lldb_private::Status::FromErrorStringWithFormat(), lldb_private::LineEntry::GetFile(), lldb::SBFrame::GetFrameSP(), lldb_private::GetStepUntilAddresses(), lldb_private::GetStoppedExecutionContext(), lldb::SBFileSpec::IsValid(), lldb_private::LineEntry::IsValid(), lldb_private::SymbolContext::line_entry, LLDB_INSTRUMENT_VA, m_opaque_sp, lldb::SBFileSpec::ref(), ResumeNewPlan(), and lldb_private::Status::Success().
Referenced by ~SBThread().
| SBError SBThread::StepUsingScriptedThreadPlan | ( | const char * | script_class_name | ) |
Definition at line 934 of file SBThread.cpp.
References LLDB_INSTRUMENT_VA, and StepUsingScriptedThreadPlan().
Referenced by StepUsingScriptedThreadPlan(), StepUsingScriptedThreadPlan(), and ~SBThread().
| SBError SBThread::StepUsingScriptedThreadPlan | ( | const char * | script_class_name, |
| bool | resume_immediately ) |
Definition at line 940 of file SBThread.cpp.
References LLDB_INSTRUMENT_VA, and StepUsingScriptedThreadPlan().
| SBError SBThread::StepUsingScriptedThreadPlan | ( | const char * | script_class_name, |
| lldb::SBStructuredData & | args_data, | ||
| bool | resume_immediately ) |
Definition at line 949 of file SBThread.cpp.
References lldb_private::Status::AsCString(), error(), lldb::eStructuredDataTypeDictionary, lldb_private::Status::Fail(), lldb_private::Status::FromError(), lldb_private::Status::FromErrorString(), lldb_private::GetStoppedExecutionContext(), LLDB_INSTRUMENT_VA, lldb::SBStructuredData::m_impl_up, m_opaque_sp, ResumeNewPlan(), and lldb_private::Status::Success().
| bool SBThread::Suspend | ( | ) |
LLDB currently supports process centric debugging which means when any thread in a process stops, all other threads are stopped.
The Suspend() call here tells our process to suspend a thread and not let it run when the other threads in a process are allowed to run. So when SBProcess::Continue() is called, any threads that aren't suspended will be allowed to run. If any of the SBThread functions for stepping are called (StepOver, StepInto, StepOut, StepInstruction, RunToAddress), the thread will not be allowed to run and these functions will simply return.
Eventually we plan to add support for thread centric debugging where each thread is controlled individually and each thread would broadcast its state, but we haven't implemented this yet.
Likewise the SBThread::Resume() call will again allow the thread to run when the process is continued.
Suspend() and Resume() functions are not currently reference counted, if anyone has the need for them to be reference counted, please let us know.
Definition at line 1055 of file SBThread.cpp.
References error(), LLDB_INSTRUMENT_VA, and Suspend().
Referenced by Suspend(), and ~SBThread().
Definition at line 1062 of file SBThread.cpp.
References error(), lldb::eStateSuspended, lldb_private::Status::FromError(), lldb_private::Status::FromErrorString(), lldb_private::GetStoppedExecutionContext(), LLDB_INSTRUMENT_VA, and m_opaque_sp.
| SBError SBThread::UnwindInnermostExpression | ( | ) |
Definition at line 1035 of file SBThread.cpp.
References lldb_private::Status::FromError(), lldb_private::GetStoppedExecutionContext(), LLDB_INSTRUMENT_VA, m_opaque_sp, lldb::SBError::SetError(), and lldb::SBError::Success().
Referenced by ~SBThread().
|
friend |
Definition at line 269 of file SBThread.h.
References GetSP(), SBThread(), and SetThread().
|
friend |
Definition at line 262 of file SBThread.h.
|
friend |
Definition at line 268 of file SBThread.h.
|
friend |
|
friend |
Definition at line 254 of file SBThread.h.
References SBBreakpointCallbackBaton.
Referenced by SBBreakpointCallbackBaton.
|
friend |
Definition at line 253 of file SBThread.h.
References SBBreakpointLocation.
Referenced by SBBreakpointLocation.
|
friend |
|
friend |
Definition at line 256 of file SBThread.h.
References SBExecutionContext.
Referenced by SBExecutionContext.
|
friend |
Definition at line 257 of file SBThread.h.
References SBFrame.
Referenced by GetFrameAtIndex(), GetSelectedFrame(), GetStackFrameFromEvent(), ReturnFromFrame(), SBFrame, SetSelectedFrame(), StepOutOfFrame(), StepOutOfFrame(), and ~SBThread().
|
friend |
Definition at line 258 of file SBThread.h.
References SBFrameList.
Referenced by GetFrames(), and SBFrameList.
|
friend |
Definition at line 259 of file SBThread.h.
References SBProcess.
Referenced by GetProcess(), and SBProcess.
|
friend |
|
friend |
Definition at line 255 of file SBThread.h.
References SBSaveCoreOptions.
Referenced by SBSaveCoreOptions.
|
friend |
Definition at line 264 of file SBThread.h.
References SBThreadCollection.
Referenced by GetStopReasonExtendedBacktraces(), SBThreadCollection, and ~SBThread().
|
friend |
|
friend |
|
friend |
Definition at line 261 of file SBThread.h.
References SBValue.
Referenced by GetCurrentException(), GetSiginfo(), GetStopErrorValue(), GetStopReturnValue(), ReturnFromFrame(), SBValue, and ~SBThread().
|
private |
Definition at line 277 of file SBThread.h.
Referenced by Clear(), get(), GetCurrentException(), GetCurrentExceptionBacktrace(), GetDescription(), GetDescriptionWithFormat(), GetExtendedBacktraceOriginatingIndexID(), GetExtendedBacktraceThread(), GetFrameAtIndex(), GetFrames(), GetIndexID(), GetInfoItemByPathAsString(), GetName(), GetNumFrames(), GetProcess(), GetQueue(), GetQueueID(), GetQueueName(), GetSelectedFrame(), GetSiginfo(), GetSP(), GetStatus(), GetStopDescription(), GetStopDescription(), GetStopErrorValue(), GetStopReason(), GetStopReasonDataAtIndex(), GetStopReasonDataCount(), GetStopReasonExtendedBacktraces(), GetStopReasonExtendedInfoAsJSON(), GetStopReturnValue(), GetThreadID(), IsStopped(), IsSuspended(), JumpToLine(), operator bool(), operator!=(), operator=(), operator==(), Resume(), ReturnFromFrame(), RunToAddress(), SafeToCallFunctions(), SBThread(), SBThread(), SBThread(), SetSelectedFrame(), SetThread(), StepInstruction(), StepInto(), StepOut(), StepOutOfFrame(), StepOver(), StepOverUntil(), StepUsingScriptedThreadPlan(), Suspend(), and UnwindInnermostExpression().