LLDB mainline
|
#include <SBThread.h>
Public Types | |
enum | { eBroadcastBitStackChanged = (1 << 0) , eBroadcastBitThreadSuspended = (1 << 1) , eBroadcastBitThreadResumed = (1 << 2) , eBroadcastBitSelectedFrameChanged = (1 << 3) , eBroadcastBitThreadSelected = (1 << 4) } |
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) |
SBError | ResumeNewPlan (lldb_private::ExecutionContext &exe_ctx, lldb_private::ThreadPlan *new_plan) |
lldb_private::Thread * | operator-> () |
lldb_private::Thread * | get () |
Private Attributes | |
lldb::ExecutionContextRefSP | m_opaque_sp |
Friends | |
class | SBBreakpoint |
class | SBBreakpointLocation |
class | SBBreakpointCallbackBaton |
class | SBExecutionContext |
class | SBFrame |
class | SBProcess |
class | SBDebugger |
class | SBValue |
class | lldb_private::QueueImpl |
class | SBQueueItem |
class | SBThreadCollection |
class | SBThreadPlan |
class | SBTrace |
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 60 of file SBThread.cpp.
References LLDB_INSTRUMENT_VA.
Referenced by GetCurrentExceptionBacktrace().
SBThread::SBThread | ( | const lldb::SBThread & | thread | ) |
Definition at line 69 of file SBThread.cpp.
References lldb_private::clone(), LLDB_INSTRUMENT_VA, and m_opaque_sp.
|
default |
References lldb::operator==().
|
private |
Definition at line 64 of file SBThread.cpp.
References LLDB_INSTRUMENT_VA.
void SBThread::Clear | ( | ) |
Definition at line 130 of file SBThread.cpp.
References LLDB_INSTRUMENT_VA, and m_opaque_sp.
|
static |
Definition at line 1164 of file SBThread.cpp.
References lldb::SBEvent::get(), lldb_private::Thread::ThreadEventData::GetEventDataFromEvent(), and LLDB_INSTRUMENT_VA.
|
private |
Definition at line 1338 of file SBThread.cpp.
References m_opaque_sp.
Referenced by lldb::SBTrace::CreateNewCursor(), operator->(), lldb::SBExecutionContext::SBExecutionContext(), and lldb::SBThreadPlan::SBThreadPlan().
|
static |
Definition at line 53 of file SBThread.cpp.
References lldb_private::ConstString::AsCString(), lldb_private::Thread::GetStaticBroadcasterClass(), and LLDB_INSTRUMENT.
SBValue SBThread::GetCurrentException | ( | ) |
Definition at line 1305 of file SBThread.cpp.
References LLDB_INSTRUMENT_VA, m_opaque_sp, and SBValue.
SBThread SBThread::GetCurrentExceptionBacktrace | ( | ) |
Definition at line 1315 of file SBThread.cpp.
References LLDB_INSTRUMENT_VA, m_opaque_sp, and SBThread().
bool SBThread::GetDescription | ( | lldb::SBStream & | description | ) | const |
Definition at line 1212 of file SBThread.cpp.
References GetDescription(), and LLDB_INSTRUMENT_VA.
Referenced by GetDescription().
bool SBThread::GetDescription | ( | lldb::SBStream & | description, |
bool | stop_format | ||
) | const |
Definition at line 1218 of file SBThread.cpp.
References lldb_private::Thread::DumpUsingSettingsFormat(), lldb_private::ExecutionContext::GetThreadPtr(), lldb_private::ExecutionContext::HasThreadScope(), LLDB_INSTRUMENT_VA, LLDB_INVALID_THREAD_ID, 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 1235 of file SBThread.cpp.
References lldb_private::Thread::DumpUsingFormat(), error(), lldb::SBFormat::GetFormatEntrySP(), lldb_private::ExecutionContext::GetThreadPtr(), lldb_private::ExecutionContext::HasThreadScope(), LLDB_INVALID_THREAD_ID, m_opaque_sp, and lldb::SBStream::ref().
uint32_t SBThread::GetExtendedBacktraceOriginatingIndexID | ( | ) |
Definition at line 1296 of file SBThread.cpp.
References LLDB_INSTRUMENT_VA, LLDB_INVALID_INDEX32, and m_opaque_sp.
SBThread SBThread::GetExtendedBacktraceThread | ( | const char * | type | ) |
Definition at line 1262 of file SBThread.cpp.
References lldb_private::ThreadCollection::AddThread(), lldb_private::SystemRuntime::GetExtendedBacktraceThread(), lldb_private::Process::GetExtendedThreadList(), lldb_private::ExecutionContext::GetProcessPtr(), lldb_private::Process::GetRunLock(), lldb_private::Process::GetSystemRuntime(), lldb_private::ExecutionContext::GetThreadSP(), lldb_private::ExecutionContext::HasThreadScope(), LLDB_INSTRUMENT_VA, m_opaque_sp, SetThread(), and lldb_private::ProcessRunLock::ProcessRunLocker::TryLock().
SBFrame SBThread::GetFrameAtIndex | ( | uint32_t | idx | ) |
Definition at line 1102 of file SBThread.cpp.
References lldb_private::ExecutionContext::GetProcessPtr(), lldb_private::Process::GetRunLock(), lldb_private::Thread::GetStackFrameAtIndex(), lldb_private::ExecutionContext::GetThreadPtr(), lldb_private::ExecutionContext::HasThreadScope(), LLDB_INSTRUMENT_VA, m_opaque_sp, lldb::SBFrame::SetFrameSP(), and lldb_private::ProcessRunLock::ProcessRunLocker::TryLock().
uint32_t SBThread::GetIndexID | ( | ) | const |
Definition at line 385 of file SBThread.cpp.
References LLDB_INSTRUMENT_VA, LLDB_INVALID_INDEX32, and m_opaque_sp.
bool SBThread::GetInfoItemByPathAsString | ( | const char * | path, |
SBStream & | strm | ||
) |
Definition at line 443 of file SBThread.cpp.
References lldb::eStructuredDataTypeBoolean, lldb::eStructuredDataTypeFloat, lldb::eStructuredDataTypeInteger, lldb::eStructuredDataTypeNull, lldb::eStructuredDataTypeString, lldb_private::Thread::GetExtendedInfo(), lldb_private::ExecutionContext::GetProcessPtr(), lldb_private::Process::GetRunLock(), lldb_private::ExecutionContext::GetThreadPtr(), lldb_private::ExecutionContext::HasThreadScope(), LLDB_INSTRUMENT_VA, m_opaque_sp, lldb::SBStream::ref(), and lldb_private::ProcessRunLock::ProcessRunLocker::TryLock().
const char * SBThread::GetName | ( | ) | const |
Definition at line 394 of file SBThread.cpp.
References lldb_private::ConstString::GetCString(), lldb_private::Thread::GetName(), lldb_private::ExecutionContext::GetProcessPtr(), lldb_private::Process::GetRunLock(), lldb_private::ExecutionContext::GetThreadPtr(), lldb_private::ExecutionContext::HasThreadScope(), LLDB_INSTRUMENT_VA, m_opaque_sp, and lldb_private::ProcessRunLock::ProcessRunLocker::TryLock().
uint32_t SBThread::GetNumFrames | ( | ) |
Definition at line 1085 of file SBThread.cpp.
References lldb_private::ExecutionContext::GetProcessPtr(), lldb_private::Process::GetRunLock(), lldb_private::Thread::GetStackFrameCount(), lldb_private::ExecutionContext::GetThreadPtr(), lldb_private::ExecutionContext::HasThreadScope(), LLDB_INSTRUMENT_VA, m_opaque_sp, and lldb_private::ProcessRunLock::ProcessRunLocker::TryLock().
SBProcess SBThread::GetProcess | ( | ) |
Definition at line 1069 of file SBThread.cpp.
References lldb_private::ExecutionContext::GetProcessSP(), lldb_private::ExecutionContext::HasThreadScope(), LLDB_INSTRUMENT_VA, m_opaque_sp, and lldb::SBProcess::SetSP().
lldb::SBQueue SBThread::GetQueue | ( | ) | const |
Definition at line 88 of file SBThread.cpp.
References lldb_private::ExecutionContext::GetProcessPtr(), lldb_private::Thread::GetQueue(), lldb_private::Process::GetRunLock(), lldb_private::ExecutionContext::GetThreadPtr(), lldb_private::ExecutionContext::HasThreadScope(), LLDB_INSTRUMENT_VA, m_opaque_sp, lldb::SBQueue::SetQueue(), and lldb_private::ProcessRunLock::ProcessRunLocker::TryLock().
lldb::queue_id_t SBThread::GetQueueID | ( | ) | const |
Definition at line 426 of file SBThread.cpp.
References lldb_private::ExecutionContext::GetProcessPtr(), lldb_private::Thread::GetQueueID(), lldb_private::Process::GetRunLock(), lldb_private::ExecutionContext::GetThreadPtr(), lldb_private::ExecutionContext::HasThreadScope(), LLDB_INSTRUMENT_VA, LLDB_INVALID_QUEUE_ID, m_opaque_sp, and lldb_private::ProcessRunLock::ProcessRunLocker::TryLock().
const char * SBThread::GetQueueName | ( | ) | const |
Definition at line 410 of file SBThread.cpp.
References lldb_private::ConstString::GetCString(), lldb_private::ExecutionContext::GetProcessPtr(), lldb_private::Thread::GetQueueName(), lldb_private::Process::GetRunLock(), lldb_private::ExecutionContext::GetThreadPtr(), lldb_private::ExecutionContext::HasThreadScope(), LLDB_INSTRUMENT_VA, m_opaque_sp, and lldb_private::ProcessRunLock::ProcessRunLocker::TryLock().
lldb::SBFrame SBThread::GetSelectedFrame | ( | ) |
Definition at line 1121 of file SBThread.cpp.
References lldb_private::ExecutionContext::GetProcessPtr(), lldb_private::Process::GetRunLock(), lldb_private::Thread::GetSelectedFrame(), lldb_private::ExecutionContext::GetThreadPtr(), lldb_private::ExecutionContext::HasThreadScope(), LLDB_INSTRUMENT_VA, m_opaque_sp, SelectMostRelevantFrame, lldb::SBFrame::SetFrameSP(), and lldb_private::ProcessRunLock::ProcessRunLocker::TryLock().
SBValue SBThread::GetSiginfo | ( | ) |
Definition at line 1342 of file SBThread.cpp.
References LLDB_INSTRUMENT_VA, m_opaque_sp, and SBValue.
Definition at line 1170 of file SBThread.cpp.
References lldb::SBEvent::get(), lldb_private::Thread::ThreadEventData::GetStackFrameFromEvent(), and LLDB_INSTRUMENT_VA.
bool SBThread::GetStatus | ( | lldb::SBStream & | status | ) | const |
Definition at line 1196 of file SBThread.cpp.
References lldb_private::Thread::GetStatus(), lldb_private::ExecutionContext::GetThreadPtr(), lldb_private::ExecutionContext::HasThreadScope(), LLDB_INSTRUMENT_VA, m_opaque_sp, lldb_private::Stream::PutCString(), and lldb::SBStream::ref().
size_t SBThread::GetStopDescription | ( | char * | dst_or_null, |
size_t | dst_len | ||
) |
Definition at line 324 of file SBThread.cpp.
References lldb_private::ExecutionContext::GetProcessPtr(), lldb_private::Process::GetRunLock(), lldb_private::Thread::GetStopDescription(), lldb_private::ExecutionContext::GetThreadPtr(), lldb_private::ExecutionContext::HasThreadScope(), LLDB_INSTRUMENT_VA, m_opaque_sp, and lldb_private::ProcessRunLock::ProcessRunLocker::TryLock().
StopReason SBThread::GetStopReason | ( | ) |
Definition at line 136 of file SBThread.cpp.
References lldb::eStopReasonInvalid, lldb_private::ExecutionContext::GetProcessPtr(), lldb_private::Process::GetRunLock(), lldb_private::Thread::GetStopReason(), lldb_private::ExecutionContext::GetThreadPtr(), lldb_private::ExecutionContext::HasThreadScope(), LLDB_INSTRUMENT_VA, m_opaque_sp, and lldb_private::ProcessRunLock::ProcessRunLocker::TryLock().
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 210 of file SBThread.cpp.
References lldb::eStopReasonBreakpoint, lldb::eStopReasonException, lldb::eStopReasonExec, lldb::eStopReasonFork, lldb::eStopReasonInstrumentation, lldb::eStopReasonInvalid, lldb::eStopReasonNone, lldb::eStopReasonPlanComplete, lldb::eStopReasonProcessorTrace, lldb::eStopReasonSignal, lldb::eStopReasonThreadExiting, lldb::eStopReasonTrace, lldb::eStopReasonVFork, lldb::eStopReasonVForkDone, lldb::eStopReasonWatchpoint, lldb_private::StopPointSiteList< StopPointSite >::FindByID(), lldb_private::Process::GetBreakpointSiteList(), lldb_private::ExecutionContext::GetProcessPtr(), lldb_private::Process::GetRunLock(), lldb_private::Thread::GetStopInfo(), lldb_private::ExecutionContext::GetThreadPtr(), lldb_private::ExecutionContext::HasThreadScope(), LLDB_INSTRUMENT_VA, LLDB_INVALID_BREAK_ID, m_opaque_sp, and lldb_private::ProcessRunLock::ProcessRunLocker::TryLock().
size_t SBThread::GetStopReasonDataCount | ( | ) |
Get the number of words associated with the stop reason.
See also GetStopReasonDataAtIndex().
Definition at line 153 of file SBThread.cpp.
References lldb::eStopReasonBreakpoint, lldb::eStopReasonException, lldb::eStopReasonExec, lldb::eStopReasonFork, lldb::eStopReasonInstrumentation, lldb::eStopReasonInvalid, lldb::eStopReasonNone, lldb::eStopReasonPlanComplete, lldb::eStopReasonProcessorTrace, lldb::eStopReasonSignal, lldb::eStopReasonThreadExiting, lldb::eStopReasonTrace, lldb::eStopReasonVFork, lldb::eStopReasonVForkDone, lldb::eStopReasonWatchpoint, lldb_private::StopPointSiteList< StopPointSite >::FindByID(), lldb_private::Process::GetBreakpointSiteList(), lldb_private::ExecutionContext::GetProcessPtr(), lldb_private::Process::GetRunLock(), lldb_private::Thread::GetStopInfo(), lldb_private::ExecutionContext::GetThreadPtr(), lldb_private::ExecutionContext::HasThreadScope(), LLDB_INSTRUMENT_VA, m_opaque_sp, and lldb_private::ProcessRunLock::ProcessRunLocker::TryLock().
SBThreadCollection SBThread::GetStopReasonExtendedBacktraces | ( | InstrumentationRuntimeType | type | ) |
bool SBThread::GetStopReasonExtendedInfoAsJSON | ( | lldb::SBStream & | stream | ) |
Definition at line 279 of file SBThread.cpp.
References lldb_private::Thread::GetStopInfo(), lldb_private::ExecutionContext::GetThreadPtr(), lldb_private::ExecutionContext::HasThreadScope(), LLDB_INSTRUMENT_VA, m_opaque_sp, and lldb::SBStream::ref().
SBValue SBThread::GetStopReturnValue | ( | ) |
Definition at line 352 of file SBThread.cpp.
References lldb_private::ExecutionContext::GetProcessPtr(), lldb_private::StopInfo::GetReturnValueObject(), lldb_private::Process::GetRunLock(), lldb_private::Thread::GetStopInfo(), lldb_private::ExecutionContext::GetThreadPtr(), lldb_private::ExecutionContext::HasThreadScope(), LLDB_INSTRUMENT_VA, m_opaque_sp, SBValue, and lldb_private::ProcessRunLock::ProcessRunLocker::TryLock().
Definition at line 1176 of file SBThread.cpp.
References lldb::SBEvent::get(), lldb_private::Thread::ThreadEventData::GetThreadFromEvent(), and LLDB_INSTRUMENT_VA.
lldb::tid_t SBThread::GetThreadID | ( | ) | const |
Definition at line 376 of file SBThread.cpp.
References LLDB_INSTRUMENT_VA, LLDB_INVALID_THREAD_ID, and m_opaque_sp.
Referenced by lldb::SBProcess::SetSelectedThread(), and StepOutOfFrame().
bool SBThread::IsStopped | ( | ) |
Definition at line 1058 of file SBThread.cpp.
References lldb_private::Thread::GetState(), lldb_private::ExecutionContext::GetThreadPtr(), lldb_private::ExecutionContext::HasThreadScope(), LLDB_INSTRUMENT_VA, m_opaque_sp, and lldb_private::StateIsStoppedState().
bool SBThread::IsSuspended | ( | ) |
Definition at line 1047 of file SBThread.cpp.
References lldb::eStateSuspended, lldb_private::Thread::GetResumeState(), lldb_private::ExecutionContext::GetThreadPtr(), lldb_private::ExecutionContext::HasThreadScope(), LLDB_INSTRUMENT_VA, and m_opaque_sp.
bool SBThread::IsValid | ( | ) | const |
Definition at line 109 of file SBThread.cpp.
References LLDB_INSTRUMENT_VA.
SBError SBThread::JumpToLine | ( | lldb::SBFileSpec & | file_spec, |
uint32_t | line | ||
) |
Definition at line 937 of file SBThread.cpp.
References lldb_private::ExecutionContext::GetThreadPtr(), lldb_private::ExecutionContext::HasThreadScope(), lldb_private::Thread::JumpToLine(), LLDB_INSTRUMENT_VA, m_opaque_sp, lldb::SBFileSpec::ref(), lldb::SBError::SetError(), and lldb::SBError::SetErrorString().
|
explicit |
bool SBThread::operator!= | ( | const lldb::SBThread & | rhs | ) | const |
Definition at line 1189 of file SBThread.cpp.
References LLDB_INSTRUMENT_VA, and m_opaque_sp.
|
private |
Definition at line 1334 of file SBThread.cpp.
References get().
const lldb::SBThread & SBThread::operator= | ( | const lldb::SBThread & | rhs | ) |
Definition at line 77 of file SBThread.cpp.
References lldb_private::clone(), LLDB_INSTRUMENT_VA, and m_opaque_sp.
bool SBThread::operator== | ( | const lldb::SBThread & | rhs | ) | const |
Definition at line 1182 of file SBThread.cpp.
References LLDB_INSTRUMENT_VA, and m_opaque_sp.
bool SBThread::Resume | ( | ) |
Definition at line 1019 of file SBThread.cpp.
References error(), LLDB_INSTRUMENT_VA, and Resume().
Referenced by Resume().
bool SBThread::Resume | ( | SBError & | error | ) |
Definition at line 1026 of file SBThread.cpp.
References error(), lldb::eStateRunning, lldb_private::ExecutionContext::GetProcessPtr(), lldb_private::Process::GetRunLock(), lldb_private::ExecutionContext::GetThreadPtr(), lldb_private::ExecutionContext::HasThreadScope(), LLDB_INSTRUMENT_VA, m_opaque_sp, lldb_private::Thread::SetResumeState(), and lldb_private::ProcessRunLock::ProcessRunLocker::TryLock().
|
private |
Definition at line 490 of file SBThread.cpp.
References lldb_private::Debugger::GetAsyncExecution(), lldb_private::Target::GetDebugger(), lldb_private::UserID::GetID(), lldb_private::ExecutionContext::GetProcessPtr(), lldb_private::Process::GetTarget(), lldb_private::Process::GetThreadList(), lldb_private::ExecutionContext::GetThreadPtr(), lldb::SBError::ref(), lldb_private::Process::Resume(), lldb_private::Process::ResumeSynchronous(), lldb::SBError::SetErrorString(), lldb_private::ThreadPlan::SetIsControllingPlan(), lldb_private::ThreadPlan::SetOkayToDiscard(), and lldb_private::ThreadList::SetSelectedThreadByID().
Referenced by RunToAddress(), StepInstruction(), StepInto(), StepOut(), StepOutOfFrame(), StepOver(), StepOverUntil(), and StepUsingScriptedThreadPlan().
Definition at line 957 of file SBThread.cpp.
References lldb::SBFrame::GetFrameSP(), lldb::SBValue::GetSP(), lldb_private::ExecutionContext::GetThreadPtr(), lldb_private::ExecutionContext::HasThreadScope(), LLDB_INSTRUMENT_VA, m_opaque_sp, lldb_private::Thread::ReturnFromFrame(), and lldb::SBError::SetError().
void SBThread::RunToAddress | ( | lldb::addr_t | addr | ) |
Definition at line 733 of file SBThread.cpp.
References error(), LLDB_INSTRUMENT_VA, and RunToAddress().
Referenced by RunToAddress().
void SBThread::RunToAddress | ( | lldb::addr_t | addr, |
SBError & | error | ||
) |
Definition at line 740 of file SBThread.cpp.
References lldb_private::Status::AsCString(), error(), lldb_private::ExecutionContext::GetThreadPtr(), lldb_private::ExecutionContext::HasThreadScope(), LLDB_INSTRUMENT_VA, m_opaque_sp, lldb_private::Thread::QueueThreadPlanForRunToAddress(), ResumeNewPlan(), and lldb_private::Status::Success().
bool SBThread::SafeToCallFunctions | ( | ) |
Definition at line 1325 of file SBThread.cpp.
References LLDB_INSTRUMENT_VA, and m_opaque_sp.
lldb::SBFrame SBThread::SetSelectedFrame | ( | uint32_t | frame_idx | ) |
Definition at line 1141 of file SBThread.cpp.
References lldb_private::ExecutionContext::GetProcessPtr(), lldb_private::Process::GetRunLock(), lldb_private::Thread::GetStackFrameAtIndex(), lldb_private::ExecutionContext::GetThreadPtr(), lldb_private::ExecutionContext::HasThreadScope(), LLDB_INSTRUMENT_VA, m_opaque_sp, lldb::SBFrame::SetFrameSP(), lldb_private::Thread::SetSelectedFrame(), and lldb_private::ProcessRunLock::ProcessRunLocker::TryLock().
|
private |
Definition at line 372 of file SBThread.cpp.
References m_opaque_sp.
Referenced by lldb::SBProcess::CreateOSPluginThread(), lldb::SBQueueItem::GetExtendedBacktraceThread(), GetExtendedBacktraceThread(), lldb::SBProcess::GetSelectedThread(), lldb::SBValue::GetThread(), lldb::SBExecutionContext::GetThread(), lldb::SBProcess::GetThreadAtIndex(), lldb_private::QueueImpl::GetThreadAtIndex(), lldb::SBProcess::GetThreadByID(), lldb::SBProcess::GetThreadByIndexID(), and lldb::SBBreakpointCallbackBaton::PrivateBreakpointHitCallback().
void SBThread::StepInstruction | ( | bool | step_over | ) |
Definition at line 704 of file SBThread.cpp.
References error(), LLDB_INSTRUMENT_VA, and StepInstruction().
Referenced by StepInstruction().
void SBThread::StepInstruction | ( | bool | step_over, |
SBError & | error | ||
) |
Definition at line 711 of file SBThread.cpp.
References lldb_private::Status::AsCString(), error(), lldb_private::ExecutionContext::GetThreadPtr(), lldb_private::ExecutionContext::HasThreadScope(), LLDB_INSTRUMENT_VA, m_opaque_sp, lldb_private::Thread::QueueThreadPlanForStepSingleInstruction(), ResumeNewPlan(), and lldb_private::Status::Success().
void SBThread::StepInto | ( | const char * | target_name, |
lldb::RunMode | stop_other_threads = lldb::eOnlyDuringStepping |
||
) |
Definition at line 569 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 577 of file SBThread.cpp.
References lldb_private::Status::AsCString(), lldb_private::eLazyBoolCalculate, error(), lldb_private::SymbolContext::GetAddressRangeFromHereToEndLine(), lldb_private::Thread::GetStackFrameAtIndex(), lldb_private::ExecutionContext::GetThreadPtr(), lldb_private::ExecutionContext::HasThreadScope(), lldb_private::SymbolContext::line_entry, LLDB_INSTRUMENT_VA, LLDB_INVALID_LINE_NUMBER, m_opaque_sp, lldb_private::Thread::QueueThreadPlanForStepInRange(), lldb_private::Thread::QueueThreadPlanForStepSingleInstruction(), lldb_private::LineEntry::range, ResumeNewPlan(), and lldb_private::Status::Success().
void SBThread::StepInto | ( | lldb::RunMode | stop_other_threads = lldb::eOnlyDuringStepping | ) |
Definition at line 563 of file SBThread.cpp.
References LLDB_INSTRUMENT_VA, and StepInto().
Referenced by StepInto().
void SBThread::StepOut | ( | ) |
Definition at line 625 of file SBThread.cpp.
References error(), LLDB_INSTRUMENT_VA, and StepOut().
Referenced by StepOut().
void SBThread::StepOut | ( | SBError & | error | ) |
Definition at line 632 of file SBThread.cpp.
References lldb_private::Status::AsCString(), lldb_private::eLazyBoolCalculate, error(), lldb_private::eVoteNoOpinion, lldb_private::eVoteYes, lldb_private::ExecutionContext::GetThreadPtr(), lldb_private::ExecutionContext::HasThreadScope(), LLDB_INSTRUMENT_VA, m_opaque_sp, lldb_private::Thread::QueueThreadPlanForStepOut(), ResumeNewPlan(), and lldb_private::Status::Success().
void SBThread::StepOutOfFrame | ( | SBFrame & | frame | ) |
Definition at line 660 of file SBThread.cpp.
References error(), LLDB_INSTRUMENT_VA, and StepOutOfFrame().
Referenced by StepOutOfFrame().
Definition at line 667 of file SBThread.cpp.
References lldb_private::Status::AsCString(), error(), lldb_private::eVoteNoOpinion, lldb_private::eVoteYes, lldb::SBFrame::GetFrameSP(), lldb_private::UserID::GetID(), lldb::SBFrame::GetThread(), GetThreadID(), lldb_private::ExecutionContext::GetThreadPtr(), lldb_private::ExecutionContext::HasThreadScope(), lldb::SBFrame::IsValid(), LLDB_INSTRUMENT_VA, m_opaque_sp, lldb_private::Thread::QueueThreadPlanForStepOut(), ResumeNewPlan(), and lldb_private::Status::Success().
void SBThread::StepOver | ( | lldb::RunMode | stop_other_threads, |
SBError & | error | ||
) |
Definition at line 531 of file SBThread.cpp.
References lldb_private::eLazyBoolCalculate, error(), lldb_private::Thread::GetStackFrameAtIndex(), lldb_private::ExecutionContext::GetThreadPtr(), lldb_private::ExecutionContext::HasThreadScope(), lldb_private::SymbolContext::line_entry, LLDB_INSTRUMENT_VA, m_opaque_sp, lldb_private::Thread::QueueThreadPlanForStepOverRange(), lldb_private::Thread::QueueThreadPlanForStepSingleInstruction(), and ResumeNewPlan().
void SBThread::StepOver | ( | lldb::RunMode | stop_other_threads = lldb::eOnlyDuringStepping | ) |
Definition at line 524 of file SBThread.cpp.
References error(), LLDB_INSTRUMENT_VA, and StepOver().
Referenced by StepOver().
SBError SBThread::StepOverUntil | ( | lldb::SBFrame & | frame, |
lldb::SBFileSpec & | file_spec, | ||
uint32_t | line | ||
) |
Definition at line 768 of file SBThread.cpp.
References lldb_private::Status::AsCString(), lldb_private::SymbolContext::comp_unit, lldb_private::AddressRange::ContainsLoadAddress(), DoNoSelectMostRelevantFrame, lldb_private::LineEntry::file, lldb_private::SymbolContext::function, lldb_private::Function::GetAddressRange(), lldb::SBFrame::GetFrameSP(), lldb_private::FileSpec::GetPath(), lldb_private::Thread::GetSelectedFrame(), lldb_private::Thread::GetStackFrameAtIndex(), lldb_private::ExecutionContext::GetTargetPtr(), lldb_private::ExecutionContext::GetThreadPtr(), lldb_private::ExecutionContext::HasThreadScope(), lldb::SBFileSpec::IsValid(), lldb_private::LineEntry::IsValid(), lldb_private::SymbolContext::line_entry, LLDB_INSTRUMENT_VA, LLDB_INVALID_ADDRESS, m_opaque_sp, PATH_MAX, lldb_private::Thread::QueueThreadPlanForStepUntil(), lldb::SBFileSpec::ref(), lldb_private::CompileUnit::ResolveSymbolContext(), ResumeNewPlan(), lldb::SBError::SetErrorString(), and lldb_private::Status::Success().
SBError SBThread::StepUsingScriptedThreadPlan | ( | const char * | script_class_name | ) |
Definition at line 884 of file SBThread.cpp.
References LLDB_INSTRUMENT_VA, and StepUsingScriptedThreadPlan().
Referenced by StepUsingScriptedThreadPlan().
SBError SBThread::StepUsingScriptedThreadPlan | ( | const char * | script_class_name, |
bool | resume_immediately | ||
) |
Definition at line 890 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 899 of file SBThread.cpp.
References lldb_private::Status::AsCString(), error(), lldb_private::Status::Fail(), lldb_private::ExecutionContext::GetThreadPtr(), lldb_private::ExecutionContext::HasThreadScope(), LLDB_INSTRUMENT_VA, lldb::SBStructuredData::m_impl_up, m_opaque_sp, lldb_private::Thread::QueueThreadPlanForStepScripted(), 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 992 of file SBThread.cpp.
References error(), LLDB_INSTRUMENT_VA, and Suspend().
Referenced by Suspend().
bool SBThread::Suspend | ( | SBError & | error | ) |
Definition at line 999 of file SBThread.cpp.
References error(), lldb::eStateSuspended, lldb_private::ExecutionContext::GetProcessPtr(), lldb_private::Process::GetRunLock(), lldb_private::ExecutionContext::GetThreadPtr(), lldb_private::ExecutionContext::HasThreadScope(), LLDB_INSTRUMENT_VA, m_opaque_sp, lldb_private::Thread::SetResumeState(), and lldb_private::ProcessRunLock::ProcessRunLocker::TryLock().
SBError SBThread::UnwindInnermostExpression | ( | ) |
Definition at line 974 of file SBThread.cpp.
References lldb_private::ExecutionContext::GetThreadPtr(), lldb_private::ExecutionContext::HasThreadScope(), LLDB_INSTRUMENT_VA, m_opaque_sp, lldb::SBError::SetError(), lldb_private::Thread::SetSelectedFrameByIndex(), lldb::SBError::Success(), and lldb_private::Thread::UnwindInnermostExpression().
|
friend |
Definition at line 247 of file SBThread.h.
|
friend |
Definition at line 241 of file SBThread.h.
|
friend |
Definition at line 233 of file SBThread.h.
|
friend |
Definition at line 235 of file SBThread.h.
|
friend |
Definition at line 234 of file SBThread.h.
|
friend |
Definition at line 239 of file SBThread.h.
|
friend |
Definition at line 236 of file SBThread.h.
|
friend |
Definition at line 237 of file SBThread.h.
|
friend |
Definition at line 238 of file SBThread.h.
|
friend |
Definition at line 242 of file SBThread.h.
|
friend |
Definition at line 243 of file SBThread.h.
Referenced by GetStopReasonExtendedBacktraces().
|
friend |
Definition at line 244 of file SBThread.h.
|
friend |
Definition at line 245 of file SBThread.h.
|
friend |
Definition at line 240 of file SBThread.h.
Referenced by GetCurrentException(), GetSiginfo(), and GetStopReturnValue().
|
private |
Definition at line 256 of file SBThread.h.
Referenced by Clear(), get(), GetCurrentException(), GetCurrentExceptionBacktrace(), GetDescription(), GetDescriptionWithFormat(), GetExtendedBacktraceOriginatingIndexID(), GetExtendedBacktraceThread(), GetFrameAtIndex(), GetIndexID(), GetInfoItemByPathAsString(), GetName(), GetNumFrames(), GetProcess(), GetQueue(), GetQueueID(), GetQueueName(), GetSelectedFrame(), GetSiginfo(), GetStatus(), GetStopDescription(), GetStopReason(), GetStopReasonDataAtIndex(), GetStopReasonDataCount(), GetStopReasonExtendedBacktraces(), GetStopReasonExtendedInfoAsJSON(), GetStopReturnValue(), GetThreadID(), IsStopped(), IsSuspended(), JumpToLine(), operator!=(), operator=(), operator==(), Resume(), ReturnFromFrame(), RunToAddress(), SafeToCallFunctions(), SBThread(), SetSelectedFrame(), SetThread(), StepInstruction(), StepInto(), StepOut(), StepOutOfFrame(), StepOver(), StepOverUntil(), StepUsingScriptedThreadPlan(), Suspend(), and UnwindInnermostExpression().