LLDB mainline
|
#include <Thread.h>
Classes | |
class | ThreadEventData |
struct | ThreadStateCheckpoint |
Public Types | |
enum | { eBroadcastBitStackChanged = (1 << 0) , eBroadcastBitThreadSuspended = (1 << 1) , eBroadcastBitThreadResumed = (1 << 2) , eBroadcastBitSelectedFrameChanged = (1 << 3) , eBroadcastBitThreadSelected = (1 << 4) } |
Broadcaster event bits definitions. More... | |
Public Member Functions | |
llvm::StringRef | GetBroadcasterClass () const override |
This needs to be filled in if you are going to register the broadcaster with the broadcaster manager and do broadcaster class matching. | |
Thread (Process &process, lldb::tid_t tid, bool use_invalid_index_id=false) | |
Constructor. | |
~Thread () override | |
lldb::ProcessSP | GetProcess () const |
int | GetResumeSignal () const |
void | SetResumeSignal (int signal) |
lldb::StateType | GetState () const |
void | SetState (lldb::StateType state) |
void | SetResumeState (lldb::StateType state, bool override_suspend=false) |
Sets the USER resume state for this thread. | |
lldb::StateType | GetResumeState () const |
Gets the USER resume state for this thread. | |
void | SetupForResume () |
bool | ShouldResume (lldb::StateType resume_state) |
virtual void | WillResume (lldb::StateType resume_state) |
virtual void | DidResume () |
virtual void | DidStop () |
virtual void | RefreshStateAfterStop ()=0 |
std::string | GetStopDescription () |
std::string | GetStopDescriptionRaw () |
void | WillStop () |
bool | ShouldStop (Event *event_ptr) |
Vote | ShouldReportStop (Event *event_ptr) |
Vote | ShouldReportRun (Event *event_ptr) |
void | Flush () |
virtual bool | MatchesSpec (const ThreadSpec *spec) |
lldb::StopInfoSP | GetStopInfo () |
lldb::StopReason | GetStopReason () |
bool | StopInfoIsUpToDate () const |
void | SetStopInfoToNothing () |
bool | ThreadStoppedForAReason () |
virtual const char * | GetInfo () |
StructuredData::ObjectSP | GetExtendedInfo () |
Retrieve a dictionary of information about this thread. | |
virtual const char * | GetName () |
virtual void | SetName (const char *name) |
virtual lldb_private::LazyBool | GetAssociatedWithLibdispatchQueue () |
Whether this thread can be associated with a libdispatch queue. | |
virtual void | SetAssociatedWithLibdispatchQueue (lldb_private::LazyBool associated_with_libdispatch_queue) |
virtual lldb::queue_id_t | GetQueueID () |
Retrieve the Queue ID for the queue currently using this Thread. | |
virtual void | SetQueueID (lldb::queue_id_t new_val) |
virtual const char * | GetQueueName () |
Retrieve the Queue name for the queue currently using this Thread. | |
virtual void | SetQueueName (const char *name) |
virtual lldb::QueueKind | GetQueueKind () |
Retrieve the Queue kind for the queue currently using this Thread. | |
virtual void | SetQueueKind (lldb::QueueKind kind) |
virtual lldb::QueueSP | GetQueue () |
Retrieve the Queue for this thread, if any. | |
virtual lldb::addr_t | GetQueueLibdispatchQueueAddress () |
Retrieve the address of the libdispatch_queue_t struct for queue currently using this Thread. | |
virtual void | SetQueueLibdispatchQueueAddress (lldb::addr_t dispatch_queue_t) |
virtual bool | ThreadHasQueueInformation () const |
Whether this Thread already has all the Queue information cached or not. | |
virtual uint32_t | GetStackFrameCount () |
GetStackFrameCount can be expensive. | |
virtual lldb::StackFrameSP | GetStackFrameAtIndex (uint32_t idx) |
virtual lldb::StackFrameSP | GetFrameWithConcreteFrameIndex (uint32_t unwind_idx) |
bool | DecrementCurrentInlinedDepth () |
uint32_t | GetCurrentInlinedDepth () |
Status | ReturnFromFrameWithIndex (uint32_t frame_idx, lldb::ValueObjectSP return_value_sp, bool broadcast=false) |
Status | ReturnFromFrame (lldb::StackFrameSP frame_sp, lldb::ValueObjectSP return_value_sp, bool broadcast=false) |
Status | JumpToLine (const FileSpec &file, uint32_t line, bool can_leave_function, std::string *warnings=nullptr) |
virtual lldb::StackFrameSP | GetFrameWithStackID (const StackID &stack_id) |
uint32_t | GetSelectedFrameIndex (SelectMostRelevant select_most_relevant) |
lldb::StackFrameSP | GetSelectedFrame (SelectMostRelevant select_most_relevant) |
uint32_t | SetSelectedFrame (lldb_private::StackFrame *frame, bool broadcast=false) |
bool | SetSelectedFrameByIndex (uint32_t frame_idx, bool broadcast=false) |
bool | SetSelectedFrameByIndexNoisily (uint32_t frame_idx, Stream &output_stream) |
void | SetDefaultFileAndLineToSelectedFrame () |
virtual lldb::RegisterContextSP | GetRegisterContext ()=0 |
virtual lldb::RegisterContextSP | CreateRegisterContextForFrame (StackFrame *frame)=0 |
virtual void | ClearStackFrames () |
virtual bool | SetBackingThread (const lldb::ThreadSP &thread_sp) |
virtual lldb::ThreadSP | GetBackingThread () const |
virtual void | ClearBackingThread () |
void | DumpTraceInstructions (Stream &s, size_t count, size_t start_position=0) const |
Dump count instructions of the thread's Trace starting at the start_position position in reverse order. | |
bool | DumpUsingFormat (Stream &strm, uint32_t frame_idx, const FormatEntity::Entry *format) |
Print a description of this thread using the provided thread format. | |
void | DumpUsingSettingsFormat (Stream &strm, uint32_t frame_idx, bool stop_format) |
bool | GetDescription (Stream &s, lldb::DescriptionLevel level, bool print_json_thread, bool print_json_stopinfo) |
virtual Status | StepIn (bool source_step, LazyBool step_in_avoids_code_without_debug_info=eLazyBoolCalculate, LazyBool step_out_avoids_code_without_debug_info=eLazyBoolCalculate) |
Default implementation for stepping into. | |
virtual Status | StepOver (bool source_step, LazyBool step_out_avoids_code_without_debug_info=eLazyBoolCalculate) |
Default implementation for stepping over. | |
virtual Status | StepOut (uint32_t frame_idx=0) |
Default implementation for stepping out. | |
virtual lldb::addr_t | GetThreadPointer () |
Retrieves the per-thread data area. | |
virtual lldb::addr_t | GetThreadLocalData (const lldb::ModuleSP module, lldb::addr_t tls_file_addr) |
Retrieves the per-module TLS block for a thread. | |
virtual bool | SafeToCallFunctions () |
Check whether this thread is safe to run functions. | |
lldb::ThreadPlanSP | QueueBasePlan (bool abort_other_plans) |
Queues the base plan for a thread. | |
virtual lldb::ThreadPlanSP | QueueThreadPlanForStepSingleInstruction (bool step_over, bool abort_other_plans, bool stop_other_threads, Status &status) |
Queues the plan used to step one instruction from the current PC of thread. | |
virtual lldb::ThreadPlanSP | QueueThreadPlanForStepOverRange (bool abort_other_plans, const AddressRange &range, const SymbolContext &addr_context, lldb::RunMode stop_other_threads, Status &status, LazyBool step_out_avoids_code_without_debug_info=eLazyBoolCalculate) |
Queues the plan used to step through an address range, stepping over function calls. | |
virtual lldb::ThreadPlanSP | QueueThreadPlanForStepOverRange (bool abort_other_plans, const LineEntry &line_entry, const SymbolContext &addr_context, lldb::RunMode stop_other_threads, Status &status, LazyBool step_out_avoids_code_without_debug_info=eLazyBoolCalculate) |
virtual lldb::ThreadPlanSP | QueueThreadPlanForStepInRange (bool abort_other_plans, const AddressRange &range, const SymbolContext &addr_context, const char *step_in_target, lldb::RunMode stop_other_threads, Status &status, LazyBool step_in_avoids_code_without_debug_info=eLazyBoolCalculate, LazyBool step_out_avoids_code_without_debug_info=eLazyBoolCalculate) |
Queues the plan used to step through an address range, stepping into functions. | |
virtual lldb::ThreadPlanSP | QueueThreadPlanForStepInRange (bool abort_other_plans, const LineEntry &line_entry, const SymbolContext &addr_context, const char *step_in_target, lldb::RunMode stop_other_threads, Status &status, LazyBool step_in_avoids_code_without_debug_info=eLazyBoolCalculate, LazyBool step_out_avoids_code_without_debug_info=eLazyBoolCalculate) |
virtual lldb::ThreadPlanSP | QueueThreadPlanForStepOut (bool abort_other_plans, SymbolContext *addr_context, bool first_insn, bool stop_other_threads, Vote report_stop_vote, Vote report_run_vote, uint32_t frame_idx, Status &status, LazyBool step_out_avoids_code_without_debug_info=eLazyBoolCalculate) |
Queue the plan used to step out of the function at the current PC of thread. | |
virtual lldb::ThreadPlanSP | QueueThreadPlanForStepOutNoShouldStop (bool abort_other_plans, SymbolContext *addr_context, bool first_insn, bool stop_other_threads, Vote report_stop_vote, Vote report_run_vote, uint32_t frame_idx, Status &status, bool continue_to_next_branch=false) |
Queue the plan used to step out of the function at the current PC of a thread. | |
virtual lldb::ThreadPlanSP | QueueThreadPlanForStepThrough (StackID &return_stack_id, bool abort_other_plans, bool stop_other_threads, Status &status) |
Gets the plan used to step through the code that steps from a function call site at the current PC into the actual function call. | |
virtual lldb::ThreadPlanSP | QueueThreadPlanForRunToAddress (bool abort_other_plans, Address &target_addr, bool stop_other_threads, Status &status) |
Gets the plan used to continue from the current PC. | |
virtual lldb::ThreadPlanSP | QueueThreadPlanForStepUntil (bool abort_other_plans, lldb::addr_t *address_list, size_t num_addresses, bool stop_others, uint32_t frame_idx, Status &status) |
virtual lldb::ThreadPlanSP | QueueThreadPlanForStepScripted (bool abort_other_plans, const char *class_name, StructuredData::ObjectSP extra_args_sp, bool stop_other_threads, Status &status) |
void | AutoCompleteThreadPlans (CompletionRequest &request) const |
Format the thread plan information for auto completion. | |
ThreadPlan * | GetCurrentPlan () const |
Gets the plan which will execute next on the plan stack. | |
Status | UnwindInnermostExpression () |
Unwinds the thread stack for the innermost expression plan currently on the thread plan stack. | |
lldb::ThreadPlanSP | GetCompletedPlan () const |
Gets the outer-most plan that was popped off the plan stack in the most recent stop. | |
lldb::ValueObjectSP | GetReturnValueObject () const |
Gets the outer-most return value from the completed plans. | |
lldb::ExpressionVariableSP | GetExpressionVariable () const |
Gets the outer-most expression variable from the completed plans. | |
bool | IsThreadPlanDone (ThreadPlan *plan) const |
Checks whether the given plan is in the completed plans for this stop. | |
bool | WasThreadPlanDiscarded (ThreadPlan *plan) const |
Checks whether the given plan is in the discarded plans for this stop. | |
bool | CompletedPlanOverridesBreakpoint () const |
Check if we have completed plan to override breakpoint stop reason. | |
Status | QueueThreadPlan (lldb::ThreadPlanSP &plan_sp, bool abort_other_plans) |
Queues a generic thread plan. | |
void | DiscardThreadPlans (bool force) |
Discards the plans queued on the plan stack of the current thread. | |
void | DiscardThreadPlansUpToPlan (lldb::ThreadPlanSP &up_to_plan_sp) |
Discards the plans queued on the plan stack of the current thread up to and including up_to_plan_sp. | |
void | DiscardThreadPlansUpToPlan (ThreadPlan *up_to_plan_ptr) |
bool | DiscardUserThreadPlansUpToIndex (uint32_t thread_index) |
Discards the plans queued on the plan stack of the current thread up to and including the plan in that matches thread_index counting only the non-Private plans. | |
virtual bool | CheckpointThreadState (ThreadStateCheckpoint &saved_state) |
virtual bool | RestoreRegisterStateFromCheckpoint (ThreadStateCheckpoint &saved_state) |
void | RestoreThreadStateFromCheckpoint (ThreadStateCheckpoint &saved_state) |
uint32_t | GetIndexID () const |
virtual uint32_t | GetExtendedBacktraceOriginatingIndexID () |
virtual lldb::user_id_t | GetProtocolID () const |
lldb::TargetSP | CalculateTarget () override |
lldb::ProcessSP | CalculateProcess () override |
lldb::ThreadSP | CalculateThread () override |
lldb::StackFrameSP | CalculateStackFrame () override |
void | CalculateExecutionContext (ExecutionContext &exe_ctx) override |
Reconstruct the object's execution context into sc. | |
lldb::StackFrameSP | GetStackFrameSPForStackFramePtr (StackFrame *stack_frame_ptr) |
size_t | GetStatus (Stream &strm, uint32_t start_frame, uint32_t num_frames, uint32_t num_frames_with_source, bool stop_format, bool show_hidden, bool only_stacks=false) |
size_t | GetStackFrameStatus (Stream &strm, uint32_t first_frame, uint32_t num_frames, bool show_frame_info, uint32_t num_frames_with_source, bool show_hidden) |
bool | IsValid () const |
virtual lldb::StopInfoSP | GetPrivateStopInfo (bool calculate=true) |
void | CalculatePublicStopInfo () |
virtual bool | CalculateStopInfo ()=0 |
Ask the thread subclass to set its stop info. | |
lldb::StateType | GetTemporaryResumeState () const |
void | SetStopInfo (const lldb::StopInfoSP &stop_info_sp) |
void | ResetStopInfo () |
void | SetShouldReportStop (Vote vote) |
void | SetShouldRunBeforePublicStop (bool newval) |
bool | ShouldRunBeforePublicStop () |
virtual void | SetExtendedBacktraceToken (uint64_t token) |
Sets the extended backtrace token for this thread. | |
virtual uint64_t | GetExtendedBacktraceToken () |
Gets the extended backtrace token for this thread. | |
lldb::ValueObjectSP | GetCurrentException () |
lldb::ThreadSP | GetCurrentExceptionBacktrace () |
lldb::ValueObjectSP | GetSiginfoValue () |
std::optional< lldb::addr_t > | GetPreviousFrameZeroPC () |
Request the pc value the thread had when previously stopped. | |
Public Member Functions inherited from lldb_private::ThreadProperties | |
ThreadProperties (bool is_global) | |
~ThreadProperties () override | |
const RegularExpression * | GetSymbolsToAvoidRegexp () |
The regular expression returned determines symbols that this thread won't stop in during "step-in" operations. | |
FileSpecList | GetLibrariesToAvoid () const |
bool | GetTraceEnabledState () const |
bool | GetStepInAvoidsNoDebug () const |
bool | GetStepOutAvoidsNoDebug () const |
uint64_t | GetMaxBacktraceDepth () const |
uint64_t | GetSingleThreadPlanTimeout () const |
Public Member Functions inherited from lldb_private::Properties | |
Properties () | |
Properties (const lldb::OptionValuePropertiesSP &collection_sp) | |
virtual | ~Properties () |
virtual lldb::OptionValuePropertiesSP | GetValueProperties () const |
virtual lldb::OptionValueSP | GetPropertyValue (const ExecutionContext *exe_ctx, llvm::StringRef property_path, Status &error) const |
virtual Status | SetPropertyValue (const ExecutionContext *exe_ctx, VarSetOperationType op, llvm::StringRef property_path, llvm::StringRef value) |
virtual Status | DumpPropertyValue (const ExecutionContext *exe_ctx, Stream &strm, llvm::StringRef property_path, uint32_t dump_mask, bool is_json=false) |
virtual void | DumpAllPropertyValues (const ExecutionContext *exe_ctx, Stream &strm, uint32_t dump_mask, bool is_json=false) |
virtual void | DumpAllDescriptions (CommandInterpreter &interpreter, Stream &strm) const |
size_t | Apropos (llvm::StringRef keyword, std::vector< const Property * > &matching_properties) const |
template<typename T > | |
T | GetPropertyAtIndexAs (uint32_t idx, T default_value, const ExecutionContext *exe_ctx=nullptr) const |
template<typename T , typename U = typename std::remove_pointer<T>::type, std::enable_if_t< std::is_pointer_v< T >, bool > = true> | |
const U * | GetPropertyAtIndexAs (uint32_t idx, const ExecutionContext *exe_ctx=nullptr) const |
template<typename T > | |
bool | SetPropertyAtIndex (uint32_t idx, T t, const ExecutionContext *exe_ctx=nullptr) const |
Public Member Functions inherited from lldb_private::UserID | |
UserID (lldb::user_id_t uid=LLDB_INVALID_UID) | |
Construct with optional user ID. | |
~UserID ()=default | |
Destructor. | |
void | Clear () |
Clears the object state. | |
lldb::user_id_t | GetID () const |
Get accessor for the user ID. | |
void | SetID (lldb::user_id_t uid) |
Set accessor for the user ID. | |
Public Member Functions inherited from lldb_private::ExecutionContextScope | |
virtual | ~ExecutionContextScope ()=default |
virtual lldb::TargetSP | CalculateTarget ()=0 |
virtual lldb::ProcessSP | CalculateProcess ()=0 |
virtual lldb::ThreadSP | CalculateThread ()=0 |
virtual lldb::StackFrameSP | CalculateStackFrame ()=0 |
virtual void | CalculateExecutionContext (ExecutionContext &exe_ctx)=0 |
Reconstruct the object's execution context into sc. | |
Public Member Functions inherited from lldb_private::Broadcaster | |
Broadcaster (lldb::BroadcasterManagerSP manager_sp, std::string name) | |
Construct with a broadcaster with a name. | |
virtual | ~Broadcaster () |
Destructor. | |
void | CheckInWithManager () |
void | BroadcastEvent (lldb::EventSP &event_sp) |
Broadcast an event which has no associated data. | |
void | BroadcastEventIfUnique (lldb::EventSP &event_sp) |
void | BroadcastEvent (uint32_t event_type, const lldb::EventDataSP &event_data_sp) |
void | BroadcastEvent (uint32_t event_type) |
void | BroadcastEventIfUnique (uint32_t event_type) |
void | Clear () |
virtual void | AddInitialEventsToListener (const lldb::ListenerSP &listener_sp, uint32_t requested_events) |
uint32_t | AddListener (const lldb::ListenerSP &listener_sp, uint32_t event_mask) |
Listen for any events specified by event_mask. | |
const std::string & | GetBroadcasterName () |
Get this broadcaster's name. | |
bool | GetEventNames (Stream &s, const uint32_t event_mask, bool prefix_with_broadcaster_name) const |
Get the event name(s) for one or more event bits. | |
void | SetEventName (uint32_t event_mask, const char *name) |
Set the name for an event bit. | |
const char * | GetEventName (uint32_t event_mask) const |
bool | EventTypeHasListeners (uint32_t event_type) |
bool | RemoveListener (const lldb::ListenerSP &listener_sp, uint32_t event_mask=UINT32_MAX) |
Removes a Listener from this broadcasters list and frees the event bits specified by event_mask that were previously acquired by listener (assuming listener was listening to this object) for other listener objects to use. | |
bool | HijackBroadcaster (const lldb::ListenerSP &listener_sp, uint32_t event_mask=UINT32_MAX) |
Provides a simple mechanism to temporarily redirect events from broadcaster. | |
bool | IsHijackedForEvent (uint32_t event_mask) |
void | RestoreBroadcaster () |
Restore the state of the Broadcaster from a previous hijack attempt. | |
virtual llvm::StringRef | GetBroadcasterClass () const |
This needs to be filled in if you are going to register the broadcaster with the broadcaster manager and do broadcaster class matching. | |
lldb::BroadcasterManagerSP | GetManager () |
void | SetPrimaryListener (lldb::ListenerSP listener_sp) |
lldb::ListenerSP | GetPrimaryListener () |
Static Public Member Functions | |
static llvm::StringRef | GetStaticBroadcasterClass () |
static void | SettingsInitialize () |
static void | SettingsTerminate () |
static ThreadProperties & | GetGlobalProperties () |
static std::string | RunModeAsString (lldb::RunMode mode) |
static std::string | StopReasonAsString (lldb::StopReason reason) |
Static Public Member Functions inherited from lldb_private::Properties | |
static llvm::StringRef | GetExperimentalSettingsName () |
static bool | IsSettingExperimental (llvm::StringRef setting) |
Protected Member Functions | |
virtual void | DestroyThread () |
ThreadPlanStack & | GetPlans () const |
void | PushPlan (lldb::ThreadPlanSP plan_sp) |
void | PopPlan () |
void | DiscardPlan () |
ThreadPlan * | GetPreviousPlan (ThreadPlan *plan) const |
virtual Unwind & | GetUnwinder () |
virtual bool | IsStillAtLastBreakpointHit () |
virtual bool | IsOperatingSystemPluginThread () const |
virtual lldb_private::StructuredData::ObjectSP | FetchThreadExtendedInfo () |
lldb::StackFrameListSP | GetStackFrameList () |
void | SetTemporaryResumeState (lldb::StateType new_state) |
void | FrameSelectedCallback (lldb_private::StackFrame *frame) |
virtual llvm::Expected< std::unique_ptr< llvm::MemoryBuffer > > | GetSiginfo (size_t max_size) const |
Protected Member Functions inherited from lldb_private::Broadcaster | |
BroadcasterImplSP | GetBroadcasterImpl () |
const char * | GetHijackingListenerName () |
Protected Attributes | |
lldb::ProcessWP | m_process_wp |
The process that owns this thread. | |
lldb::StopInfoSP | m_stop_info_sp |
The private stop reason for this thread. | |
uint32_t | m_stop_info_stop_id |
uint32_t | m_stop_info_override_stop_id |
bool | m_should_run_before_public_stop |
const uint32_t | m_index_id |
A unique 1 based index assigned to each thread for easy UI/command line access. | |
lldb::RegisterContextSP | m_reg_context_sp |
The register context for this thread's current register state. | |
lldb::StateType | m_state |
The state of our process. | |
std::recursive_mutex | m_state_mutex |
Multithreaded protection for m_state. | |
std::recursive_mutex | m_frame_mutex |
Multithreaded protection for m_state. | |
lldb::StackFrameListSP | m_curr_frames_sp |
The stack frames that get lazily populated after a thread stops. | |
lldb::StackFrameListSP | m_prev_frames_sp |
The previous stack frames from the last time this thread stopped. | |
std::optional< lldb::addr_t > | m_prev_framezero_pc |
Frame 0's PC the last time this thread was stopped. | |
int | m_resume_signal |
The signal that should be used when continuing this thread. | |
lldb::StateType | m_resume_state |
This state is used to force a thread to be suspended from outside the ThreadPlan logic. | |
lldb::StateType | m_temporary_resume_state |
This state records what the thread was told to do by the thread plan logic for the current resume. | |
std::unique_ptr< lldb_private::Unwind > | m_unwinder_up |
It gets set in Thread::ShouldResume. | |
bool | m_destroy_called |
LazyBool | m_override_should_notify |
std::unique_ptr< ThreadPlanStack > | m_null_plan_stack_up |
Protected Attributes inherited from lldb_private::Properties | |
lldb::OptionValuePropertiesSP | m_collection_sp |
Protected Attributes inherited from lldb_private::UserID | |
lldb::user_id_t | m_uid |
The user ID that uniquely identifies an object. | |
Private Member Functions | |
void | BroadcastSelectedFrameChange (StackID &new_frame_id) |
Thread (const Thread &)=delete | |
const Thread & | operator= (const Thread &)=delete |
Private Attributes | |
bool | m_extended_info_fetched |
StructuredData::ObjectSP | m_extended_info |
Friends | |
class | ThreadPlan |
class | ThreadList |
class | ThreadEventData |
class | StackFrameList |
class | StackFrame |
class | OperatingSystem |
Additional Inherited Members | |
Protected Types inherited from lldb_private::Broadcaster | |
typedef std::shared_ptr< BroadcasterImpl > | BroadcasterImplSP |
typedef std::weak_ptr< BroadcasterImpl > | BroadcasterImplWP |
anonymous enum |
Broadcaster event bits definitions.
Enumerator | |
---|---|
eBroadcastBitStackChanged | |
eBroadcastBitThreadSuspended | |
eBroadcastBitThreadResumed | |
eBroadcastBitSelectedFrameChanged | |
eBroadcastBitThreadSelected |
Thread::Thread | ( | Process & | process, |
lldb::tid_t | tid, | ||
bool | use_invalid_index_id = false |
||
) |
Constructor.
[in] | use_invalid_index_id | Optional parameter, defaults to false. The only subclass that is likely to set use_invalid_index_id == true is the HistoryThread class. In that case, the Thread we are constructing represents a thread from earlier in the program execution. We may have the tid of the original thread that they represent but we don't want to reuse the IndexID of that thread, or create a new one. If a client wants to know the original thread's IndexID, they should use Thread::GetExtendedBacktraceOriginatingIndexID(). |
Definition at line 219 of file Thread.cpp.
References lldb_private::Broadcaster::CheckInWithManager(), lldb_private::UserID::GetID(), lldb_private::GetLog(), LLDB_LOGF, and lldb_private::Object.
|
override |
If you hit this assert, it means your derived class forgot to call DestroyThread in its destructor.
Definition at line 242 of file Thread.cpp.
References lldb_private::UserID::GetID(), lldb_private::GetLog(), LLDB_LOGF, m_destroy_called, and lldb_private::Object.
|
privatedelete |
void Thread::AutoCompleteThreadPlans | ( | CompletionRequest & | request | ) | const |
Format the thread plan information for auto completion.
[in] | request | The reference to the completion handler. |
Definition at line 1127 of file Thread.cpp.
References lldb_private::ThreadPlanStack::AnyPlans(), lldb::eDescriptionLevelInitial, lldb_private::ThreadPlanStack::GetPlanByIndex(), GetPlans(), lldb_private::StreamString::GetString(), and lldb_private::CompletionRequest::TryCompleteCurrentArg().
Referenced by CommandObjectThreadPlanDiscard::HandleArgumentCompletion().
|
private |
Definition at line 262 of file Thread.cpp.
References lldb_private::Broadcaster::BroadcastEvent(), eBroadcastBitSelectedFrameChanged, and lldb_private::Broadcaster::EventTypeHasListeners().
Referenced by SetSelectedFrame(), and SetSelectedFrameByIndex().
|
overridevirtual |
Reconstruct the object's execution context into sc.
The object should fill in as much of the ExecutionContextScope as it can so function calls that require a execution context can be made for the given object.
[out] | exe_ctx | A reference to an execution context object that gets filled in. |
Implements lldb_private::ExecutionContextScope.
Definition at line 1422 of file Thread.cpp.
References lldb_private::ExecutionContext::SetContext().
Referenced by lldb_private::RegisterContext::CalculateExecutionContext(), lldb_private::AppleGetQueuesHandler::GetCurrentQueues(), lldb_private::AppleGetItemInfoHandler::GetItemInfo(), lldb_private::AppleGetPendingItemsHandler::GetPendingItems(), lldb_private::AppleGetThreadItemInfoHandler::GetThreadItemInfo(), lldb_private::AppleThreadPlanStepThroughObjCTrampoline::InitializeFunctionCaller(), and lldb_private::AppleThreadPlanStepThroughObjCTrampoline::ShouldStop().
|
overridevirtual |
Implements lldb_private::ExecutionContextScope.
Definition at line 1416 of file Thread.cpp.
References GetProcess().
Referenced by lldb_private::RegisterContext::CalculateProcess(), ThreadKDP::CreateRegisterContextForFrame(), lldb_private::StopInfoMachException::CreateStopReasonWithMachException(), lldb_private::AppleGetQueuesHandler::GetCurrentQueues(), lldb_private::AppleGetItemInfoHandler::GetItemInfo(), lldb_private::AppleGetPendingItemsHandler::GetPendingItems(), lldb_private::AppleObjCTrampolineHandler::GetStepThroughDispatchPlan(), lldb_private::AppleGetThreadItemInfoHandler::GetThreadItemInfo(), lldb_private::FuncUnwinders::GetUnwindPlanArchitectureDefault(), and lldb_private::FuncUnwinders::GetUnwindPlanArchitectureDefaultAtFunctionEntry().
void Thread::CalculatePublicStopInfo | ( | ) |
Definition at line 380 of file Thread.cpp.
References GetStopInfo(), ResetStopInfo(), and SetStopInfo().
|
overridevirtual |
Implements lldb_private::ExecutionContextScope.
Definition at line 1420 of file Thread.cpp.
|
pure virtual |
Ask the thread subclass to set its stop info.
Thread subclasses should call Thread::SetStopInfo(...) with the reason the thread stopped.
A thread that is sitting at a breakpoint site, but has not yet executed the breakpoint instruction, should have a breakpoint-hit StopInfo set. When execution is resumed, any thread sitting at a breakpoint site will instruction-step over the breakpoint instruction silently, and we will never record this breakpoint as being hit, updating the hit count, possibly executing breakpoint commands or conditions.
Implemented in ThreadElfCore, ThreadFreeBSDKernel, lldb_private::process_gdb_remote::ThreadGDBRemote, ThreadMachCore, ThreadKDP, lldb_private::minidump::ThreadMinidump, lldb_private::ScriptedThread, lldb_private::HistoryThread, ThreadMemory, lldb_private::TargetThreadWindows, and lldb_private::ThreadPostMortemTrace.
Referenced by GetPrivateStopInfo().
|
overridevirtual |
Implements lldb_private::ExecutionContextScope.
Definition at line 1408 of file Thread.cpp.
References GetProcess().
Referenced by lldb_private::RegisterContext::CalculateTarget(), lldb_private::UnwindPlan::Dump(), lldb_private::StackFrameList::FetchFramesUpTo(), lldb_private::AppleGetQueuesHandler::GetCurrentQueues(), lldb_private::RegisterContextUnwind::GetFastUnwindPlanForFrame(), lldb_private::AppleGetItemInfoHandler::GetItemInfo(), lldb_private::RegisterContext::GetPC(), lldb_private::RegisterContext::GetPCForSymbolication(), lldb_private::AppleGetPendingItemsHandler::GetPendingItems(), lldb_private::ABI::GetReturnValueObject(), lldb_private::AppleObjCTrampolineHandler::GetStepThroughDispatchPlan(), lldb_private::DynamicLoaderDarwin::GetStepThroughTrampolinePlan(), lldb_private::CPPLanguageRuntime::GetStepThroughTrampolinePlan(), lldb_private::AppleGetThreadItemInfoHandler::GetThreadItemInfo(), ABIMacOSX_arm::PrepareTrivialCall(), ABISysV_arm::PrepareTrivialCall(), lldb_private::StackFrameList::SetDefaultFileAndLineToSelectedFrame(), lldb_private::RegisterContext::SetPC(), lldb_private::ThreadPlanRunToAddress::ThreadPlanRunToAddress(), lldb_private::ThreadPlanStepThrough::ThreadPlanStepThrough(), and lldb_private::ThreadPlanStepUntil::ThreadPlanStepUntil().
|
overridevirtual |
Implements lldb_private::ExecutionContextScope.
Definition at line 1418 of file Thread.cpp.
|
virtual |
Definition at line 506 of file Thread.cpp.
References lldb_private::ThreadPlanStack::CheckpointCompletedPlans(), lldb_private::Thread::ThreadStateCheckpoint::current_inlined_depth, lldb_private::RegisterCheckpoint::eExpression, GetCurrentInlinedDepth(), GetPlans(), GetProcess(), GetStackFrameAtIndex(), GetStopInfo(), lldb_private::Thread::ThreadStateCheckpoint::m_completed_plan_checkpoint, lldb_private::Thread::ThreadStateCheckpoint::orig_stop_id, lldb_private::Thread::ThreadStateCheckpoint::register_backup_sp, and lldb_private::Thread::ThreadStateCheckpoint::stop_info_sp.
Referenced by lldb_private::ThreadPlanCallFunction::ConstructorSetup().
|
inlinevirtual |
Reimplemented in ThreadMemory.
|
virtual |
Reimplemented in lldb_private::ScriptedThread, and ThreadMemory.
Definition at line 1440 of file Thread.cpp.
References lldb_private::Unwind::Clear(), GetRegisterContext(), GetUnwinder(), m_curr_frames_sp, m_extended_info, m_extended_info_fetched, m_frame_mutex, m_prev_frames_sp, and m_prev_framezero_pc.
Referenced by lldb_private::ScriptedThread::ClearStackFrames(), ThreadMemory::ClearStackFrames(), Flush(), RestoreRegisterStateFromCheckpoint(), ReturnFromFrame(), lldb_private::RegisterContext::SetPC(), and ShouldResume().
bool Thread::CompletedPlanOverridesBreakpoint | ( | ) | const |
Check if we have completed plan to override breakpoint stop reason.
Definition at line 1167 of file Thread.cpp.
References lldb_private::ThreadPlanStack::AnyCompletedPlans(), and GetPlans().
|
pure virtual |
Implemented in ThreadElfCore, ThreadFreeBSDKernel, ThreadMachCore, ThreadKDP, lldb_private::ScriptedThread, ThreadMemory, lldb_private::process_gdb_remote::ThreadGDBRemote, lldb_private::minidump::ThreadMinidump, lldb_private::HistoryThread, lldb_private::TargetThreadWindows, and lldb_private::ThreadPostMortemTrace.
|
inline |
Definition at line 415 of file Thread.h.
References GetStackFrameList().
Referenced by lldb_private::ThreadPlanStepInRange::DoWillResume(), and lldb_private::ThreadPlanStepOverRange::DoWillResume().
|
protectedvirtual |
Definition at line 251 of file Thread.cpp.
References m_curr_frames_sp, m_destroy_called, m_frame_mutex, m_prev_frames_sp, m_prev_framezero_pc, m_reg_context_sp, m_stop_info_sp, and m_unwinder_up.
Referenced by lldb_private::HistoryThread::~HistoryThread(), lldb_private::ScriptedThread::~ScriptedThread(), lldb_private::TargetThreadWindows::~TargetThreadWindows(), ThreadElfCore::~ThreadElfCore(), lldb_private::process_gdb_remote::ThreadGDBRemote::~ThreadGDBRemote(), ThreadKDP::~ThreadKDP(), ThreadMachCore::~ThreadMachCore(), and ThreadMemory::~ThreadMemory().
|
virtual |
Reimplemented in ThreadMemory.
Definition at line 735 of file Thread.cpp.
References LLDB_INVALID_SIGNAL_NUMBER, SetResumeSignal(), and SetShouldRunBeforePublicStop().
|
virtual |
Reimplemented in lldb_private::TargetThreadWindows.
Definition at line 741 of file Thread.cpp.
References lldb::eStateStopped, and SetState().
|
protected |
Definition at line 1118 of file Thread.cpp.
References lldb_private::ThreadPlanStack::DiscardPlan(), lldb_private::GetLog(), GetPlans(), LLDB_LOGF, and lldb_private::Step.
Referenced by ShouldStop().
void Thread::DiscardThreadPlans | ( | bool | force | ) |
Discards the plans queued on the plan stack of the current thread.
This is arbitrated by the "Controlling" ThreadPlans, using the "OkayToDiscard" call.
Definition at line 1228 of file Thread.cpp.
References lldb_private::ThreadPlanStack::DiscardAllPlans(), lldb_private::ThreadPlanStack::DiscardConsultingControllingPlans(), lldb_private::UserID::GetID(), lldb_private::GetLog(), GetPlans(), LLDB_LOGF, and lldb_private::Step.
Referenced by QueueThreadPlan(), ReturnFromFrame(), and lldb_private::ThreadPlanBase::ShouldStop().
void Thread::DiscardThreadPlansUpToPlan | ( | lldb::ThreadPlanSP & | up_to_plan_sp | ) |
Discards the plans queued on the plan stack of the current thread up to and including up_to_plan_sp.
Definition at line 1215 of file Thread.cpp.
References DiscardThreadPlansUpToPlan().
Referenced by DiscardThreadPlansUpToPlan(), DiscardUserThreadPlansUpToIndex(), QueueThreadPlan(), lldb_private::Process::RunThreadPlan(), and UnwindInnermostExpression().
void Thread::DiscardThreadPlansUpToPlan | ( | ThreadPlan * | up_to_plan_ptr | ) |
Definition at line 1219 of file Thread.cpp.
References lldb_private::ThreadPlanStack::DiscardPlansUpToPlan(), lldb_private::UserID::GetID(), lldb_private::GetLog(), GetPlans(), LLDB_LOGF, and lldb_private::Step.
bool Thread::DiscardUserThreadPlansUpToIndex | ( | uint32_t | thread_index | ) |
Discards the plans queued on the plan stack of the current thread up to and including the plan in that matches thread_index counting only the non-Private plans.
[in] | thread_index | Discard all plans up to and including this user plan given by this index. |
Definition at line 1203 of file Thread.cpp.
References DiscardThreadPlansUpToPlan(), lldb_private::ThreadPlanStack::GetPlanByIndex(), and GetPlans().
Referenced by CommandObjectThreadPlanDiscard::DoExecute().
void lldb_private::Thread::DumpTraceInstructions | ( | Stream & | s, |
size_t | count, | ||
size_t | start_position = 0 |
||
) | const |
Dump count instructions of the thread's Trace starting at the start_position position in reverse order.
The instructions are indexed in reverse order, which means that the start_position 0 represents the last instruction of the trace chronologically.
[in] | s | The stream object where the instructions are printed. |
[in] | count | The number of instructions to print. |
[in] | start_position | The position of the first instruction to print. |
bool Thread::DumpUsingFormat | ( | Stream & | strm, |
uint32_t | frame_idx, | ||
const FormatEntity::Entry * | format | ||
) |
Print a description of this thread using the provided thread format.
[out] | strm | The Stream to print the description to. |
[in] | frame_idx | If not LLDB_INVALID_FRAME_ID, then use this frame index as context to generate the description. |
[in] | format | The input format. |
format
worked. Definition at line 1631 of file Thread.cpp.
References lldb_private::FormatEntity::Format(), lldb_private::ExecutionContext::GetProcessPtr(), GetStackFrameAtIndex(), LLDB_INVALID_FRAME_ID, and lldb_private::ExecutionContext::SetFrameSP().
Referenced by DumpUsingSettingsFormat(), and lldb::SBThread::GetDescriptionWithFormat().
void Thread::DumpUsingSettingsFormat | ( | Stream & | strm, |
uint32_t | frame_idx, | ||
bool | stop_format | ||
) |
Definition at line 1652 of file Thread.cpp.
References DumpUsingFormat(), lldb_private::Target::GetDebugger(), lldb_private::ExecutionContext::GetTargetRef(), lldb_private::Debugger::GetThreadFormat(), and lldb_private::Debugger::GetThreadStopFormat().
Referenced by lldb::SBThread::GetDescription(), GetDescription(), and GetStatus().
|
inlineprotectedvirtual |
Reimplemented in lldb_private::process_gdb_remote::ThreadGDBRemote, and lldb_private::ScriptedThread.
Definition at line 1287 of file Thread.h.
Referenced by GetExtendedInfo().
void Thread::Flush | ( | ) |
Definition at line 1921 of file Thread.cpp.
References ClearStackFrames(), and m_reg_context_sp.
Referenced by CommandObjectRegisterWrite::DoExecute(), and lldb_private::Process::RunThreadPlan().
|
protected |
Definition at line 333 of file Thread.cpp.
References GetProcess(), lldb_private::StackFrame::GetSymbolContext(), and lldb_private::StackFrame::HasDebugInformation().
Referenced by GetSelectedFrame(), SetSelectedFrame(), SetSelectedFrameByIndex(), and SetSelectedFrameByIndexNoisily().
|
inlinevirtual |
Whether this thread can be associated with a libdispatch queue.
The Thread may know if it is associated with a libdispatch queue, it may know definitively that it is NOT associated with a libdispatch queue, or it may be unknown whether it is associated with a libdispatch queue.
eLazyBoolYes this thread is associated with a libdispatch queue.
eLazyBoolCalculate this thread may be associated with a libdispatch queue but the thread doesn't know one way or the other.
Reimplemented in lldb_private::process_gdb_remote::ThreadGDBRemote.
Definition at line 303 of file Thread.h.
References lldb_private::eLazyBoolNo.
|
inlinevirtual |
Reimplemented in ThreadMemory.
Definition at line 474 of file Thread.h.
Referenced by ShouldResume().
|
inlineoverridevirtual |
This needs to be filled in if you are going to register the broadcaster with the broadcaster manager and do broadcaster class matching.
FIXME: Probably should make a ManagedBroadcaster subclass with all the bits needed to work with the BroadcasterManager, so that it is clearer how to add one.
Reimplemented from lldb_private::Broadcaster.
Definition at line 82 of file Thread.h.
References GetStaticBroadcasterClass().
ThreadPlanSP Thread::GetCompletedPlan | ( | ) | const |
Gets the outer-most plan that was popped off the plan stack in the most recent stop.
Useful for printing the stop reason accurately.
Definition at line 1147 of file Thread.cpp.
References lldb_private::ThreadPlanStack::GetCompletedPlan(), and GetPlans().
Referenced by GetStopInfo(), and ShouldReportRun().
ValueObjectSP Thread::GetCurrentException | ( | ) |
Definition at line 2040 of file Thread.cpp.
References GetProcess(), and GetStackFrameAtIndex().
Referenced by GetCurrentExceptionBacktrace().
ThreadSP Thread::GetCurrentExceptionBacktrace | ( | ) |
Definition at line 2056 of file Thread.cpp.
References GetCurrentException(), and GetProcess().
|
inline |
Definition at line 419 of file Thread.h.
References GetStackFrameList().
Referenced by CheckpointThreadState(), lldb_private::ThreadPlanStepInRange::DoWillResume(), lldb_private::ThreadPlanStepOverRange::DoWillResume(), and lldb_private::ThreadPlanStepInRange::IsVirtualStep().
ThreadPlan * Thread::GetCurrentPlan | ( | ) | const |
Gets the plan which will execute next on the plan stack.
Definition at line 1143 of file Thread.cpp.
References lldb_private::ThreadPlanStack::GetCurrentPlan(), and GetPlans().
Referenced by GetPrivateStopInfo(), lldb_private::ThreadPlanSingleThreadTimeout::HandleEvent(), lldb_private::ThreadPlanSingleThreadTimeout::PushNewWithTimeout(), lldb_private::ThreadPlanSingleThreadTimeout::ResumeFromPrevState(), SetupForResume(), ShouldReportRun(), ShouldReportStop(), ShouldResume(), ShouldStop(), and WillStop().
bool Thread::GetDescription | ( | Stream & | s, |
lldb::DescriptionLevel | level, | ||
bool | print_json_thread, | ||
bool | print_json_stopinfo | ||
) |
Definition at line 1818 of file Thread.cpp.
References DumpUsingSettingsFormat(), lldb::eStructuredDataTypeArray, lldb::eStructuredDataTypeDictionary, lldb::eStructuredDataTypeInteger, lldb::eStructuredDataTypeString, lldb_private::Stream::Format(), lldb_private::StructuredData::Object::GetAsArray(), lldb_private::StructuredData::Object::GetAsDictionary(), GetExtendedInfo(), lldb_private::StructuredData::Array::GetItemAtIndex(), lldb_private::StructuredData::Array::GetSize(), lldb_private::StructuredData::Dictionary::GetValueForKey(), m_stop_info_sp, and lldb_private::Stream::Printf().
Referenced by CommandObjectThreadInfo::HandleOneThread().
ExpressionVariableSP Thread::GetExpressionVariable | ( | ) | const |
Gets the outer-most expression variable from the completed plans.
Definition at line 1155 of file Thread.cpp.
References lldb_private::ThreadPlanStack::GetExpressionVariable(), and GetPlans().
Referenced by GetStopInfo().
|
inlinevirtual |
Reimplemented in lldb_private::HistoryThread.
Definition at line 1105 of file Thread.h.
References GetIndexID().
|
inlinevirtual |
Gets the extended backtrace token for this thread.
Some Thread subclasses may maintain a token to help with providing an extended backtrace. The SystemRuntime plugin will set/request this.
Reimplemented in lldb_private::HistoryThread.
Definition at line 1232 of file Thread.h.
References LLDB_INVALID_ADDRESS.
|
inline |
Retrieve a dictionary of information about this thread.
On Mac OS X systems there may be voucher information. The top level dictionary returned will have an "activity" key and the value of the activity is a dictionary. Keys in that dictionary will be "name" and "id", among others. There may also be "trace_messages" (an array) with each entry in that array being a dictionary (keys include "message" with the text of the trace message).
Definition at line 275 of file Thread.h.
References FetchThreadExtendedInfo(), m_extended_info, and m_extended_info_fetched.
Referenced by lldb_private::FormatEntity::Format(), GetDescription(), and lldb::SBThread::GetInfoItemByPathAsString().
|
virtual |
Definition at line 1460 of file Thread.cpp.
References GetStackFrameList().
Referenced by lldb_private::RegisterContext::SetPC().
|
inlinevirtual |
Definition at line 434 of file Thread.h.
References GetStackFrameList(), and lldb_private::StackID::IsValid().
Referenced by lldb_private::Process::RunThreadPlan(), lldb_private::ThreadPlanStepInstruction::ShouldStop(), and lldb_private::ThreadPlanStepThrough::ThreadPlanStepThrough().
|
static |
Definition at line 61 of file Thread.cpp.
Referenced by lldb_private::ProcessProperties::ProcessProperties(), and lldb_private::ThreadProperties::ThreadProperties().
uint32_t Thread::GetIndexID | ( | ) | const |
Definition at line 1406 of file Thread.cpp.
References m_index_id.
Referenced by lldb_private::UnwindLLDB::AddFirstFrame(), lldb_private::UnwindLLDB::AddOneMoreFrame(), lldb_private::CommandObjectIterateOverThreads::BucketThread(), CommandObjectThreadJump::DoExecute(), CommandObjectThreadContinue::DoExecute(), lldb_private::trace_intel_pt::TraceIntelPT::DumpTraceInfo(), lldb_private::FormatEntity::Format(), GetExtendedBacktraceOriginatingIndexID(), lldb_private::UnwindLLDB::GetOneMoreFrame(), CommandObjectThreadBacktrace::HandleOneThread(), CommandObjectThreadInfo::HandleOneThread(), lldb_private::ThreadSpec::IndexMatches(), OutputWriterCLI::OutputWriterCLI(), lldb_private::Process::RunThreadPlan(), ShouldReportRun(), lldb_private::RegisterContextUnwind::UnwindLogMsg(), and lldb_private::RegisterContextUnwind::UnwindLogMsgVerbose().
|
inlinevirtual |
Reimplemented in lldb_private::ScriptedThread, and ThreadMemory.
|
inlinevirtual |
Reimplemented in ThreadElfCore, ThreadFreeBSDKernel, lldb_private::process_gdb_remote::ThreadGDBRemote, ThreadMachCore, ThreadKDP, lldb_private::ScriptedThread, lldb_private::HistoryThread, ThreadMemory, and lldb_private::TargetThreadWindows.
Definition at line 283 of file Thread.h.
Referenced by lldb_private::FormatEntity::Format(), lldb::SBThread::GetName(), lldb_private::ThreadSpec::NameMatches(), and ShouldReportRun().
|
protected |
Definition at line 1078 of file Thread.cpp.
References lldb_private::UserID::GetID(), GetProcess(), and m_null_plan_stack_up.
Referenced by AutoCompleteThreadPlans(), CheckpointThreadState(), CompletedPlanOverridesBreakpoint(), DiscardPlan(), DiscardThreadPlans(), DiscardThreadPlansUpToPlan(), DiscardUserThreadPlansUpToIndex(), GetCompletedPlan(), GetCurrentPlan(), GetExpressionVariable(), GetPreviousPlan(), GetReturnValueObject(), IsThreadPlanDone(), PopPlan(), PushPlan(), RestoreThreadStateFromCheckpoint(), ShouldReportRun(), ShouldReportStop(), ShouldResume(), UnwindInnermostExpression(), and WasThreadPlanDiscarded().
std::optional< addr_t > Thread::GetPreviousFrameZeroPC | ( | ) |
Request the pc value the thread had when previously stopped.
When the thread performs execution, it copies the current RegisterContext GetPC() value. This method returns that value, if it is available.
Definition at line 1436 of file Thread.cpp.
References m_prev_framezero_pc.
Referenced by lldb_private::StopInfoMachException::WasContinueInterrupted().
|
protected |
Definition at line 1171 of file Thread.cpp.
References GetPlans(), and lldb_private::ThreadPlanStack::GetPreviousPlan().
Referenced by lldb_private::ThreadPlan::GetPreviousPlan(), ShouldReportStop(), ShouldResume(), and ShouldStop().
|
virtual |
Definition at line 385 of file Thread.cpp.
References CalculateStopInfo(), lldb::eStateSuspended, GetCurrentPlan(), GetProcess(), GetTemporaryResumeState(), IsStillAtLastBreakpointHit(), m_destroy_called, m_stop_info_override_stop_id, m_stop_info_sp, m_stop_info_stop_id, and SetStopInfo().
Referenced by lldb_private::StopInfoWatchpoint::ThreadPlanStepOverWatchpoint::DoPlanExplainsStop(), lldb_private::ThreadPlan::GetPrivateStopInfo(), GetStopInfo(), lldb_private::Process::RunThreadPlan(), ShouldResume(), ShouldStop(), and ThreadStoppedForAReason().
|
inline |
Definition at line 157 of file Thread.h.
References m_process_wp.
Referenced by lldb_private::UnwindLLDB::AddFirstFrame(), UnwindAssembly_x86::AugmentUnwindPlanFromCallSite(), CalculateProcess(), ThreadElfCore::CalculateStopInfo(), lldb_private::process_gdb_remote::ThreadGDBRemote::CalculateStopInfo(), ThreadMachCore::CalculateStopInfo(), ThreadKDP::CalculateStopInfo(), ThreadMemory::CalculateStopInfo(), CalculateTarget(), lldb_private::process_gdb_remote::ProcessGDBRemote::CalculateThreadStopInfo(), CheckpointThreadState(), lldb_private::ThreadPlanCallFunction::ConstructorSetup(), ThreadElfCore::CreateRegisterContextForFrame(), ThreadFreeBSDKernel::CreateRegisterContextForFrame(), ThreadMachCore::CreateRegisterContextForFrame(), lldb_private::process_gdb_remote::ThreadGDBRemote::CreateRegisterContextForFrame(), lldb_private::minidump::ThreadMinidump::CreateRegisterContextForFrame(), lldb_private::ThreadPostMortemTrace::CreateRegisterContextForFrame(), lldb_private::StopInfoMachException::CreateStopReasonWithMachException(), lldb_private::StopInfo::CreateStopReasonWithSignal(), lldb_private::UnwindLLDB::DoCreateRegisterContextForFrame(), CommandObjectThreadBacktrace::DoExtendedBacktrace(), lldb_private::UnwindLLDB::DoGetFrameCount(), lldb_private::UnwindLLDB::DoGetFrameInfoAtIndex(), lldb_private::AppleThreadPlanStepThroughDirectDispatch::DoPlanExplainsStop(), lldb_private::TargetThreadWindows::DoResume(), lldb_private::StopInfoWatchpoint::ThreadPlanStepOverWatchpoint::DoWillResume(), lldb_private::StackFrameList::FetchFramesUpTo(), lldb_private::process_gdb_remote::ThreadGDBRemote::FetchThreadExtendedInfo(), lldb_private::FormatEntity::Format(), FrameSelectedCallback(), lldb_private::process_gdb_remote::GDBRemoteRegisterContext::GDBRemoteRegisterContext(), ABIMacOSX_i386::GetArgumentValues(), ABISysV_i386::GetArgumentValues(), GetByteOrderAndAddrSize(), GetCurrentException(), GetCurrentExceptionBacktrace(), lldb_private::HistoryThread::GetExtendedBacktraceOriginatingIndexID(), UnwindAssembly_x86::GetFastUnwindPlan(), UnwindAssembly_x86::GetNonCallSiteUnwindPlanFromAssembly(), GetPlans(), GetPrivateStopInfo(), lldb_private::process_gdb_remote::ThreadGDBRemote::GetQueue(), lldb_private::process_gdb_remote::ThreadGDBRemote::GetQueueID(), lldb_private::process_gdb_remote::ThreadGDBRemote::GetQueueKind(), lldb_private::process_gdb_remote::ThreadGDBRemote::GetQueueLibdispatchQueueAddress(), lldb_private::process_gdb_remote::ThreadGDBRemote::GetQueueName(), lldb_private::HistoryThread::GetRegisterContext(), lldb_private::RegisterContextUnwind::GetReturnAddressHint(), ABIMacOSX_arm::GetReturnValueObjectImpl(), ABISysV_arm::GetReturnValueObjectImpl(), ABISysV_riscv::GetReturnValueObjectImpl(), ABISysV_loongarch::GetReturnValueObjectSimple(), ABISysV_ppc::GetReturnValueObjectSimple(), ABISysV_riscv::GetReturnValueObjectSimple(), ABISysV_i386::GetReturnValueObjectSimple(), ABISysV_x86_64::GetReturnValueObjectSimple(), ABIWindows_x86_64::GetReturnValueObjectSimple(), GetReturnValuePassedInMemory(), lldb_private::LanguageRuntime::GetRuntimeUnwindPlan(), lldb_private::process_gdb_remote::ThreadGDBRemote::GetSiginfo(), GetSiginfoValue(), lldb_private::RegisterContextUnwind::GetStartPC(), lldb_private::StackFrameList::GetStatus(), GetStatus(), lldb_private::AppleObjCTrampolineHandler::GetStepThroughDispatchPlan(), DynamicLoaderHexagonDYLD::GetStepThroughTrampolinePlan(), lldb_private::DynamicLoaderDarwin::GetStepThroughTrampolinePlan(), DynamicLoaderPOSIXDYLD::GetStepThroughTrampolinePlan(), GetStopInfo(), GetStopInfoForHardwareBP(), GetThreadLocalData(), GetValObjFromIntRegs(), lldb_private::RegisterContext::InvalidateIfNeeded(), ABISysV_arm::IsArmHardFloat(), IsStillAtLastBreakpointHit(), lldb_private::StopInfoBreakpoint::IsValidForOperatingSystemThread(), lldb_private::ScriptedThread::LoadArtificialStackFrames(), lldb_private::ThreadPlanStepThrough::LookForPlanToStepThroughFromCurrentPC(), lldb_private::ArchitectureArm::OverrideStopInfo(), ABISysV_ppc::PrepareTrivialCall(), ABISysV_ppc64::PrepareTrivialCall(), ABISysV_s390x::PrepareTrivialCall(), ABISysV_x86_64::PrepareTrivialCall(), ABIWindows_x86_64::PrepareTrivialCall(), lldb_private::RegisterContextUnwind::ReadFrameAddress(), lldb_private::RegisterContextUnwind::ReadGPRValue(), ReadIntegerArgument(), lldb_private::RegisterContextUnwind::ReadPC(), RegisterContextDarwin_arm64::ReadRegister(), lldb_private::RegisterContextUnwind::ReadRegister(), RegisterContextFreeBSDKernel_arm64::ReadRegister(), RegisterContextFreeBSDKernel_i386::ReadRegister(), RegisterContextFreeBSDKernel_x86_64::ReadRegister(), lldb_private::RegisterContext::ReadRegisterValueFromMemory(), lldb_private::AbortWithPayloadFrameRecognizer::RecognizeFrame(), RegisterContextCorePOSIX_arm64::RegisterContextCorePOSIX_arm64(), lldb_private::StopInfoWatchpoint::ThreadPlanStepOverWatchpoint::ResetWatchpoint(), ReturnFromFrame(), lldb_private::ExpressionParser::RunStaticInitializers(), SafeToCallFunctions(), lldb_private::StackFrameList::SelectMostRelevantFrame(), lldb_private::StackFrameList::SetDefaultFileAndLineToSelectedFrame(), SetSelectedFrameByIndexNoisily(), SetStopInfo(), lldb_private::AppleObjCTrampolineHandler::SetupDispatchFunction(), SetupForResume(), lldb_private::AppleGetItemInfoHandler::SetupGetItemInfoFunction(), lldb_private::AppleGetPendingItemsHandler::SetupGetPendingItemsFunction(), lldb_private::AppleGetQueuesHandler::SetupGetQueuesFunction(), lldb_private::AppleGetThreadItemInfoHandler::SetupGetThreadItemInfoFunction(), ShouldResume(), ShouldStop(), lldb_private::AppleThreadPlanStepThroughObjCTrampoline::ShouldStop(), lldb_private::AppleThreadPlanStepThroughDirectDispatch::ShouldStop(), StepIn(), StepOut(), StepOver(), StopInfoIsUpToDate(), lldb_private::ThreadPlanRunToAddress::ThreadPlanRunToAddress(), lldb_private::ThreadPlanStepOverBreakpoint::ThreadPlanStepOverBreakpoint(), lldb_private::RegisterContextUnwind::TryFallbackUnwindPlan(), lldb_private::UnwindLLDB::UnwindLLDB(), lldb_private::StopInfoMachException::WasContinueInterrupted(), lldb_private::process_gdb_remote::ThreadGDBRemote::WillResume(), lldb_private::process_gdb_remote::GDBRemoteRegisterContext::WriteAllRegisterValues(), lldb_private::RegisterContext::WriteRegisterValueToMemory(), and lldb_private::process_gdb_remote::ThreadGDBRemote::~ThreadGDBRemote().
|
inlinevirtual |
Reimplemented in ThreadMemory.
Definition at line 1113 of file Thread.h.
References lldb_private::UserID::GetID().
Referenced by lldb_private::process_gdb_remote::ProcessGDBRemote::CalculateThreadStopInfo(), lldb_private::process_gdb_remote::ThreadGDBRemote::FetchThreadExtendedInfo(), lldb_private::FormatEntity::Format(), lldb_private::process_gdb_remote::GDBRemoteRegisterContext::GetPrimordialRegister(), lldb_private::process_gdb_remote::GDBRemoteRegisterContext::ReadAllRegisterValues(), lldb_private::process_gdb_remote::GDBRemoteRegisterContext::ReadRegisterBytes(), lldb_private::Process::SendAsyncInterrupt(), lldb_private::process_gdb_remote::GDBRemoteRegisterContext::SetPrimordialRegister(), ShouldStop(), lldb_private::process_gdb_remote::ThreadGDBRemote::WillResume(), lldb_private::process_gdb_remote::GDBRemoteRegisterContext::WriteAllRegisterValues(), and lldb_private::process_gdb_remote::GDBRemoteRegisterContext::WriteRegisterBytes().
|
inlinevirtual |
Retrieve the Queue for this thread, if any.
Reimplemented in lldb_private::process_gdb_remote::ThreadGDBRemote.
Definition at line 361 of file Thread.h.
Referenced by lldb::SBThread::GetQueue().
|
inlinevirtual |
Retrieve the Queue ID for the queue currently using this Thread.
If this Thread is doing work on behalf of a libdispatch/GCD queue, retrieve the QueueID.
This is a unique identifier for the libdispatch/GCD queue in a process. Often starting at 1 for the initial system-created queues and incrementing, a QueueID will not be reused for a different queue during the lifetime of a process.
Reimplemented in lldb_private::process_gdb_remote::ThreadGDBRemote, and lldb_private::HistoryThread.
Definition at line 323 of file Thread.h.
References LLDB_INVALID_QUEUE_ID.
Referenced by lldb::SBThread::GetQueueID().
|
inlinevirtual |
Retrieve the Queue kind for the queue currently using this Thread.
If this Thread is doing work on behalf of a libdispatch/GCD queue, retrieve the Queue kind - either eQueueKindSerial or eQueueKindConcurrent, indicating that this queue processes work items serially or concurrently.
Reimplemented in lldb_private::process_gdb_remote::ThreadGDBRemote.
Definition at line 349 of file Thread.h.
References lldb::eQueueKindUnknown.
|
inlinevirtual |
Retrieve the address of the libdispatch_queue_t struct for queue currently using this Thread.
If this Thread is doing work on behalf of a libdispatch/GCD queue, retrieve the address of the libdispatch_queue_t structure describing the queue.
This address may be reused for different queues later in the Process lifetime and should not be used to identify a queue uniquely. Use the GetQueueID() call for that.
Reimplemented in lldb_private::process_gdb_remote::ThreadGDBRemote.
Definition at line 377 of file Thread.h.
References LLDB_INVALID_ADDRESS.
|
inlinevirtual |
Retrieve the Queue name for the queue currently using this Thread.
If this Thread is doing work on behalf of a libdispatch/GCD queue, retrieve the Queue name.
Reimplemented in lldb_private::process_gdb_remote::ThreadGDBRemote, ThreadKDP, lldb_private::ScriptedThread, lldb_private::HistoryThread, and ThreadMemory.
Definition at line 335 of file Thread.h.
Referenced by lldb_private::FormatEntity::Format(), lldb::SBThread::GetQueueName(), and lldb_private::ThreadSpec::QueueNameMatches().
|
pure virtual |
Implemented in ThreadElfCore, ThreadFreeBSDKernel, lldb_private::process_gdb_remote::ThreadGDBRemote, ThreadMachCore, ThreadKDP, lldb_private::minidump::ThreadMinidump, lldb_private::ScriptedThread, lldb_private::HistoryThread, ThreadMemory, lldb_private::TargetThreadWindows, and lldb_private::ThreadPostMortemTrace.
Referenced by lldb_private::ThreadPlanRunToAddress::AtOurAddress(), UnwindAssembly_x86::AugmentUnwindPlanFromCallSite(), ClearStackFrames(), lldb_private::ThreadPlanCallFunction::ConstructorSetup(), lldb_private::RegisterContextUnwind::ConvertRegisterKindToRegisterNumber(), lldb_private::RegisterContext::CopyFromRegisterContext(), RegisterContextDarwin_x86_64_Mach::Create_LC_THREAD(), RegisterContextDarwin_i386_Mach::Create_LC_THREAD(), RegisterContextDarwin_arm_Mach::Create_LC_THREAD(), RegisterContextDarwin_arm64_Mach::Create_LC_THREAD(), lldb_private::StopInfoMachException::CreateStopReasonWithMachException(), lldb_private::ProcessWindows::DisableWatchpoint(), lldb_private::UnwindLLDB::DoCreateRegisterContextForFrame(), lldb_private::ThreadPlanStepOverBreakpoint::DoPlanExplainsStop(), lldb_private::ThreadPlanStepOverRange::DoWillResume(), lldb_private::ProcessWindows::EnableWatchpoint(), lldb_private::StackFrameList::FetchFramesUpTo(), ABIMacOSX_arm64::GetArgumentValues(), ABISysV_arm64::GetArgumentValues(), ABIMacOSX_arm::GetArgumentValues(), ABISysV_arm::GetArgumentValues(), ABISysV_ppc::GetArgumentValues(), ABISysV_ppc64::GetArgumentValues(), ABISysV_s390x::GetArgumentValues(), ABIMacOSX_i386::GetArgumentValues(), ABISysV_i386::GetArgumentValues(), ABISysV_x86_64::GetArgumentValues(), ABIWindows_x86_64::GetArgumentValues(), lldb_private::StackFrameList::GetCurrentInlinedDepth(), UnwindAssembly_x86::GetNonCallSiteUnwindPlanFromAssembly(), lldb_private::RegisterContextUnwind::GetRegisterCount(), lldb_private::UnwindPlan::GetRegisterInfo(), lldb_private::RegisterContextUnwind::GetRegisterInfoAtIndex(), lldb_private::RegisterContextUnwind::GetRegisterSet(), lldb_private::RegisterContextUnwind::GetRegisterSetCount(), ABIMacOSX_arm64::GetReturnValueObjectImpl(), ABISysV_arm64::GetReturnValueObjectImpl(), ABIMacOSX_arm::GetReturnValueObjectImpl(), ABISysV_arm::GetReturnValueObjectImpl(), ABIMacOSX_i386::GetReturnValueObjectImpl(), ABISysV_mips::GetReturnValueObjectImpl(), ABISysV_mips64::GetReturnValueObjectImpl(), ABISysV_ppc::GetReturnValueObjectImpl(), ABISysV_s390x::GetReturnValueObjectImpl(), ABISysV_i386::GetReturnValueObjectImpl(), ABISysV_x86_64::GetReturnValueObjectImpl(), ABIWindows_x86_64::GetReturnValueObjectImpl(), ABISysV_arc::GetReturnValueObjectImpl(), ABISysV_hexagon::GetReturnValueObjectImpl(), ABISysV_riscv::GetReturnValueObjectImpl(), ABISysV_arc::GetReturnValueObjectSimple(), ABISysV_loongarch::GetReturnValueObjectSimple(), ABISysV_ppc::GetReturnValueObjectSimple(), ABISysV_riscv::GetReturnValueObjectSimple(), ABISysV_s390x::GetReturnValueObjectSimple(), ABISysV_i386::GetReturnValueObjectSimple(), ABISysV_x86_64::GetReturnValueObjectSimple(), ABIWindows_x86_64::GetReturnValueObjectSimple(), lldb_private::AppleObjCTrampolineHandler::GetStepThroughDispatchPlan(), lldb_private::DynamicLoaderWindowsDYLD::GetStepThroughTrampolinePlan(), lldb_private::CPPLanguageRuntime::GetStepThroughTrampolinePlan(), lldb_private::FuncUnwinders::GetSymbolFileUnwindPlan(), RegisterNumber::init(), lldb_private::RegisterContextUnwind::InitializeNonZerothFrame(), lldb_private::RegisterContextUnwind::InitializeZerothFrame(), lldb_private::ThreadPlanStepRange::InRange(), lldb_private::ThreadPlanStepRange::InSymbol(), lldb_private::ThreadPlanShouldStopHere::InvokeShouldStopHereCallback(), lldb_private::ThreadPlanStepInstruction::IsPlanStale(), lldb_private::ThreadPlanStepOverBreakpoint::IsPlanStale(), lldb_private::ThreadPlanStepRange::IsPlanStale(), IsStillAtLastBreakpointHit(), lldb_private::ThreadPlanAssemblyTracer::Log(), lldb_private::ThreadPlanStepThrough::LookForPlanToStepThroughFromCurrentPC(), lldb_private::ThreadPlanStepOverBreakpoint::MischiefManaged(), lldb_private::ArchitectureArm::OverrideStopInfo(), ABIMacOSX_i386::PrepareTrivialCall(), ABIMacOSX_arm::PrepareTrivialCall(), ABISysV_arm::PrepareTrivialCall(), ABIMacOSX_arm64::PrepareTrivialCall(), ABISysV_arm64::PrepareTrivialCall(), ABISysV_loongarch::PrepareTrivialCall(), ABISysV_mips::PrepareTrivialCall(), ABISysV_mips64::PrepareTrivialCall(), ABISysV_ppc::PrepareTrivialCall(), ABISysV_ppc64::PrepareTrivialCall(), ABISysV_s390x::PrepareTrivialCall(), ABISysV_i386::PrepareTrivialCall(), ABISysV_x86_64::PrepareTrivialCall(), ABIWindows_x86_64::PrepareTrivialCall(), lldb_private::RegisterContextUnwind::ReadGPRValue(), ReadIntegerArgument(), lldb_private::RegisterContextUnwind::ReadRegister(), lldb_private::RegisterContextUnwind::ReadRegisterValueFromRegisterLocation(), lldb_private::ThreadPlanCallFunction::ReportRegisterState(), lldb_private::StackFrameList::ResetCurrentInlinedDepth(), lldb_private::Process::RunThreadPlan(), lldb_private::StackFrameList::SetCurrentInlinedDepth(), lldb_private::ThreadPlanStepRange::SetNextBranchBreakpoint(), ABIMacOSX_arm64::SetReturnValueObject(), ABISysV_arm64::SetReturnValueObject(), ABIMacOSX_arm::SetReturnValueObject(), ABISysV_arm::SetReturnValueObject(), ABISysV_mips::SetReturnValueObject(), ABISysV_mips64::SetReturnValueObject(), ABISysV_ppc::SetReturnValueObject(), ABISysV_ppc64::SetReturnValueObject(), ABISysV_s390x::SetReturnValueObject(), ABIMacOSX_i386::SetReturnValueObject(), ABISysV_i386::SetReturnValueObject(), ABISysV_x86_64::SetReturnValueObject(), ABIWindows_x86_64::SetReturnValueObject(), SetupForResume(), lldb_private::ThreadPlanStepInstruction::SetUpState(), ShouldStop(), lldb_private::ThreadPlanStepInRange::ShouldStop(), lldb_private::ThreadPlanStepInstruction::ShouldStop(), lldb_private::ThreadPlanStepOverRange::ShouldStop(), lldb_private::ThreadPlanStepOut::ThreadPlanStepOut(), lldb_private::ThreadPlanStepOverBreakpoint::ThreadPlanStepOverBreakpoint(), lldb_private::ThreadPlanStepThrough::ThreadPlanStepThrough(), lldb_private::StopInfoMachException::WasContinueInterrupted(), lldb_private::ThreadPlan::WillResume(), lldb_private::RegisterContextUnwind::WriteRegister(), and lldb_private::RegisterContextUnwind::WriteRegisterValueToRegisterLocation().
|
inline |
Definition at line 159 of file Thread.h.
References m_resume_signal.
Referenced by lldb_private::process_gdb_remote::ThreadGDBRemote::WillResume().
|
inline |
Gets the USER resume state for this thread.
This is not the same as what this thread is going to do for any particular step, however if this thread returns eStateSuspended, then the process control logic will never allow this thread to run.
Definition at line 201 of file Thread.h.
References m_resume_state.
Referenced by lldb::SBThread::IsSuspended(), SetupForResume(), ShouldReportRun(), ShouldReportStop(), and ShouldStop().
ValueObjectSP Thread::GetReturnValueObject | ( | ) | const |
Gets the outer-most return value from the completed plans.
Definition at line 1151 of file Thread.cpp.
References GetPlans(), and lldb_private::ThreadPlanStack::GetReturnValueObject().
Referenced by GetStopInfo().
lldb::StackFrameSP Thread::GetSelectedFrame | ( | SelectMostRelevant | select_most_relevant | ) |
Definition at line 271 of file Thread.cpp.
References FrameSelectedCallback(), and GetStackFrameList().
Referenced by CommandObjectFrameDiagnose::DoExecute(), CommandObjectFrameSelect::DoExecute(), CommandObjectThreadReturn::DoExecute(), lldb_private::AppleObjCRuntime::GetObjectDescription(), lldb::SBThread::GetSelectedFrame(), lldb_private::StackFrameList::GetStatus(), lldb_private::REPL::IOHandlerInputComplete(), lldb_private::Process::RunThreadPlan(), SetSelectedFrameByIndexNoisily(), and lldb::SBThread::StepOverUntil().
|
inline |
Definition at line 444 of file Thread.h.
References GetStackFrameList().
Referenced by CommandObjectFrameSelect::DoExecute(), and CommandObjectThreadStepWithTypeAndScope::DoExecute().
|
inlineprotectedvirtual |
Reimplemented in lldb_private::process_gdb_remote::ThreadGDBRemote.
Definition at line 1300 of file Thread.h.
Referenced by GetSiginfoValue().
lldb::ValueObjectSP Thread::GetSiginfoValue | ( | ) |
Definition at line 2071 of file Thread.cpp.
References lldb_private::ValueObjectConstResult::Create(), lldb_private::Status::FromError(), lldb_private::Status::FromErrorString(), lldb_private::ArchSpec::GetAddressByteSize(), lldb_private::Target::GetArchitecture(), lldb_private::DataExtractor::GetByteOrder(), lldb_private::CompilerType::GetByteSize(), lldb_private::Target::GetPlatform(), GetProcess(), GetSiginfo(), lldb_private::ArchSpec::GetTriple(), and lldb_private::CompilerType::IsValid().
|
inlinevirtual |
Definition at line 408 of file Thread.h.
References GetStackFrameList().
Referenced by CommandObjectTargetSymbolsAdd::AddSymbolsForStack(), lldb_private::ThreadPlanStepUntil::AnalyzeStop(), lldb_private::CommandObjectIterateOverThreads::BucketThread(), lldb_private::Process::CallVoidArgVoidPtrReturn(), CheckpointThreadState(), lldb_private::ThreadPlanStepRange::CompareCurrentFrameToStartFrame(), lldb_private::ThreadPlanShouldStopHere::DefaultShouldStopHereCallback(), lldb_private::ThreadPlanStepInRange::DefaultShouldStopHereCallback(), lldb_private::ThreadPlanShouldStopHere::DefaultStepFromHereCallback(), lldb_private::StopInfoMachException::DeterminePtrauthFailure(), CommandObjectFrameSelect::DoExecute(), CommandObjectFrameRecognizerInfo::DoExecute(), CommandObjectThreadStepWithTypeAndScope::DoExecute(), CommandObjectThreadUntil::DoExecute(), lldb_private::ThreadPlanStepOut::DoPlanExplainsStop(), lldb_private::ThreadPlanCallFunction::DoTakedown(), lldb_private::ThreadPlanStepOverRange::DoWillResume(), DumpUsingFormat(), Evaluate_DW_OP_entry_value(), FindMostRelevantFrame(), lldb_private::ThreadPlanStepInRange::FrameMatchesAvoidCriteria(), GetCurrentException(), lldb_private::AppleGetQueuesHandler::GetCurrentQueues(), lldb::SBThread::GetFrameAtIndex(), lldb_private::AppleGetItemInfoHandler::GetItemInfo(), lldb_private::AppleGetPendingItemsHandler::GetPendingItems(), ABIMacOSX_arm64::GetReturnValueObjectImpl(), ABISysV_arm64::GetReturnValueObjectImpl(), ABIMacOSX_arm::GetReturnValueObjectImpl(), ABISysV_arm::GetReturnValueObjectImpl(), ABIMacOSX_i386::GetReturnValueObjectImpl(), ABISysV_mips::GetReturnValueObjectImpl(), ABISysV_mips64::GetReturnValueObjectImpl(), ABISysV_arc::GetReturnValueObjectImpl(), ABISysV_hexagon::GetReturnValueObjectImpl(), ABISysV_riscv::GetReturnValueObjectImpl(), ABISysV_arc::GetReturnValueObjectSimple(), ABISysV_loongarch::GetReturnValueObjectSimple(), ABISysV_ppc::GetReturnValueObjectSimple(), ABISysV_riscv::GetReturnValueObjectSimple(), ABISysV_s390x::GetReturnValueObjectSimple(), ABISysV_i386::GetReturnValueObjectSimple(), ABISysV_x86_64::GetReturnValueObjectSimple(), ABIWindows_x86_64::GetReturnValueObjectSimple(), GetStatus(), lldb_private::AppleObjCTrampolineHandler::GetStepThroughDispatchPlan(), DynamicLoaderHexagonDYLD::GetStepThroughTrampolinePlan(), lldb_private::DynamicLoaderDarwin::GetStepThroughTrampolinePlan(), DynamicLoaderPOSIXDYLD::GetStepThroughTrampolinePlan(), lldb_private::CPPLanguageRuntime::GetStepThroughTrampolinePlan(), GetStopDescription(), lldb_private::AppleGetThreadItemInfoHandler::GetThreadItemInfo(), GetValObjFromFPRegs(), GetValObjFromIntRegs(), lldb_private::ThreadPlanStepThrough::HitOurBackstopBreakpoint(), lldb_private::InferiorCallMmap(), lldb_private::InferiorCallMunmap(), lldb_private::ThreadPlanStepRange::InRange(), lldb_private::ThreadPlanStepInstruction::IsPlanStale(), lldb_private::ThreadPlanStepOut::IsPlanStale(), JumpToLine(), lldb_private::ThreadPlanTracer::Log(), lldb_private::ThreadPlanStepOut::QueueInlinedStepPlan(), RestoreRegisterStateFromCheckpoint(), ReturnFromFrame(), ReturnFromFrameWithIndex(), lldb::SBThread::SetSelectedFrame(), lldb_private::ThreadPlanStepInstruction::SetUpState(), lldb_private::ThreadPlanStepInRange::ShouldStop(), lldb_private::ThreadPlanStepInstruction::ShouldStop(), lldb_private::ThreadPlanStepOut::ShouldStop(), lldb_private::ThreadPlanStepOverRange::ShouldStop(), lldb_private::AppleThreadPlanStepThroughObjCTrampoline::ShouldStop(), StepIn(), lldb::SBThread::StepInto(), StepOver(), lldb::SBThread::StepOver(), lldb::SBThread::StepOverUntil(), lldb_private::ThreadPlanStepOut::ThreadPlanStepOut(), lldb_private::ThreadPlanStepRange::ThreadPlanStepRange(), lldb_private::ThreadPlanStepUntil::ThreadPlanStepUntil(), and lldb_private::ClangExpressionDeclMap::WillParse().
|
inlinevirtual |
GetStackFrameCount can be expensive.
Stacks can get very deep, and they require memory reads for each frame. So only use GetStackFrameCount when you need to know the depth of the stack. When iterating over frames, its better to generate the frames one by one with GetFrameAtIndex, and when that returns NULL, you are at the end of the stack. That way your loop will only do the work it needs to, without forcing lldb to realize StackFrames you weren't going to look at.
Definition at line 404 of file Thread.h.
References GetStackFrameList().
Referenced by CommandObjectTargetSymbolsAdd::AddSymbolsForStack(), lldb_private::CommandObjectIterateOverThreads::BucketThread(), CommandObjectFrameSelect::DoExecute(), and lldb::SBThread::GetNumFrames().
|
protected |
Definition at line 1426 of file Thread.cpp.
References m_curr_frames_sp, m_frame_mutex, and m_prev_frames_sp.
Referenced by DecrementCurrentInlinedDepth(), GetCurrentInlinedDepth(), GetFrameWithConcreteFrameIndex(), GetFrameWithStackID(), GetSelectedFrame(), GetSelectedFrameIndex(), GetStackFrameAtIndex(), GetStackFrameCount(), GetStackFrameSPForStackFramePtr(), GetStackFrameStatus(), GetStatus(), lldb_private::ScriptedThread::LoadArtificialStackFrames(), RestoreThreadStateFromCheckpoint(), SetDefaultFileAndLineToSelectedFrame(), SetSelectedFrame(), SetSelectedFrameByIndex(), and ShouldStop().
lldb::StackFrameSP Thread::GetStackFrameSPForStackFramePtr | ( | StackFrame * | stack_frame_ptr | ) |
Definition at line 1705 of file Thread.cpp.
References GetStackFrameList().
size_t Thread::GetStackFrameStatus | ( | Stream & | strm, |
uint32_t | first_frame, | ||
uint32_t | num_frames, | ||
bool | show_frame_info, | ||
uint32_t | num_frames_with_source, | ||
bool | show_hidden | ||
) |
Definition at line 1906 of file Thread.cpp.
References GetStackFrameList().
Referenced by lldb_private::Process::RunThreadPlan().
StateType Thread::GetState | ( | ) | const |
Definition at line 565 of file Thread.cpp.
References m_state, and m_state_mutex.
Referenced by lldb_private::TargetThreadWindows::DoResume(), and lldb::SBThread::IsStopped().
|
static |
Definition at line 214 of file Thread.cpp.
Referenced by lldb_private::Debugger::DefaultEventHandler(), GetBroadcasterClass(), and lldb::SBThread::GetBroadcasterClassName().
size_t Thread::GetStatus | ( | Stream & | strm, |
uint32_t | start_frame, | ||
uint32_t | num_frames, | ||
uint32_t | num_frames_with_source, | ||
bool | stop_format, | ||
bool | show_hidden, | ||
bool | only_stacks = false |
||
) |
Definition at line 1761 of file Thread.cpp.
References DumpUsingSettingsFormat(), lldb_private::Target::GetDebugger(), lldb_private::Debugger::GetExternalEditor(), lldb_private::LineEntry::GetFile(), lldb_private::UserID::GetID(), lldb_private::GetLog(), GetProcess(), lldb_private::ExecutionContext::GetProcessPtr(), lldb_private::ThreadList::GetSelectedThread(), GetStackFrameAtIndex(), GetStackFrameList(), lldb_private::ExecutionContext::GetTargetPtr(), lldb_private::Process::GetThreadList(), lldb_private::Debugger::GetUseExternalEditor(), lldb_private::Host, lldb_private::Stream::Indent(), lldb_private::Stream::IndentLess(), lldb_private::Stream::IndentMore(), lldb_private::LineEntry::line, lldb_private::SymbolContext::line_entry, LLDB_LOG_ERROR, lldb_private::Host::OpenFileInExternalEditor(), and lldb_private::Stream::Printf().
Referenced by lldb::SBThread::GetStatus(), and CommandObjectThreadBacktrace::HandleOneThread().
std::string Thread::GetStopDescription | ( | ) |
Definition at line 576 of file Thread.cpp.
References GetStackFrameAtIndex(), and GetStopDescriptionRaw().
Referenced by lldb::SBThread::GetStopDescription().
std::string Thread::GetStopDescriptionRaw | ( | ) |
Definition at line 596 of file Thread.cpp.
References lldb::eStopReasonNone, and GetStopInfo().
Referenced by GetStopDescription().
lldb::StopInfoSP Thread::GetStopInfo | ( | ) |
Definition at line 347 of file Thread.cpp.
References lldb_private::StopInfo::CreateStopReasonWithPlan(), lldb::eStopReasonTrace, GetCompletedPlan(), GetExpressionVariable(), GetPrivateStopInfo(), GetProcess(), GetReturnValueObject(), m_destroy_called, m_stop_info_sp, m_stop_info_stop_id, and UINT32_MAX.
Referenced by CalculatePublicStopInfo(), CheckpointThreadState(), CommandObjectFrameDiagnose::DoExecute(), lldb_private::FormatEntity::Format(), GetStopDescriptionRaw(), GetStopReason(), lldb::SBThread::GetStopReasonDataAtIndex(), lldb::SBThread::GetStopReasonDataCount(), lldb::SBThread::GetStopReasonExtendedBacktraces(), lldb::SBThread::GetStopReasonExtendedInfoAsJSON(), lldb::SBThread::GetStopReturnValue(), lldb_private::ThreadPlanStepThrough::HitOurBackstopBreakpoint(), lldb_private::ThreadPlanSingleThreadTimeout::IsTimeoutAsyncInterrupt(), lldb_private::StackFrameList::ResetCurrentInlinedDepth(), lldb_private::StackFrameList::SelectMostRelevantFrame(), lldb_private::ThreadPlanBase::ShouldReportStop(), and lldb_private::ThreadPlanTracer::TracerExplainsStop().
lldb::StopReason Thread::GetStopReason | ( | ) |
Definition at line 441 of file Thread.cpp.
References lldb::eStopReasonNone, and GetStopInfo().
Referenced by lldb::SBThread::GetStopReason().
|
inline |
Definition at line 1198 of file Thread.h.
References m_temporary_resume_state.
Referenced by lldb_private::StopInfoMachException::CreateStopReasonWithMachException(), lldb_private::TargetThreadWindows::DoResume(), GetPrivateStopInfo(), ShouldReportRun(), ShouldReportStop(), ShouldResume(), and ShouldStop().
|
virtual |
Retrieves the per-module TLS block for a thread.
[in] | module | The module to query TLS data for. |
[in] | tls_file_addr | The thread local address in module |
Definition at line 1677 of file Thread.cpp.
References GetProcess(), lldb_private::DynamicLoader::GetThreadLocalData(), and LLDB_INVALID_ADDRESS.
Referenced by lldb_private::DWARFExpression::Evaluate().
|
virtual |
Retrieves the per-thread data area.
Most OSs maintain a per-thread pointer (e.g. the FS register on x64), which we return the value of here.
Definition at line 1671 of file Thread.cpp.
References LLDB_INVALID_ADDRESS, and m_reg_context_sp.
|
protectedvirtual |
Definition at line 1915 of file Thread.cpp.
References m_unwinder_up.
Referenced by ClearStackFrames(), ThreadElfCore::CreateRegisterContextForFrame(), ThreadFreeBSDKernel::CreateRegisterContextForFrame(), ThreadMachCore::CreateRegisterContextForFrame(), ThreadKDP::CreateRegisterContextForFrame(), lldb_private::ScriptedThread::CreateRegisterContextForFrame(), ThreadMemory::CreateRegisterContextForFrame(), lldb_private::process_gdb_remote::ThreadGDBRemote::CreateRegisterContextForFrame(), lldb_private::TargetThreadWindows::CreateRegisterContextForFrame(), lldb_private::StackFrameList::FetchFramesUpTo(), and lldb_private::StackFrameList::FetchOnlyConcreteFramesUpTo().
|
inlineprotectedvirtual |
Reimplemented in ThreadMemory.
|
protectedvirtual |
Definition at line 1926 of file Thread.cpp.
References lldb::eStopReasonBreakpoint, GetProcess(), GetRegisterContext(), m_stop_info_sp, and pc.
Referenced by GetPrivateStopInfo().
bool Thread::IsThreadPlanDone | ( | ThreadPlan * | plan | ) | const |
Checks whether the given plan is in the completed plans for this stop.
[in] | plan | Pointer to the plan you're checking. |
Definition at line 1159 of file Thread.cpp.
References GetPlans(), and lldb_private::ThreadPlanStack::IsPlanDone().
Referenced by lldb_private::Process::RunThreadPlan().
|
inline |
Definition at line 1141 of file Thread.h.
References m_destroy_called.
Referenced by lldb_private::StackFrameList::FetchOnlyConcreteFramesUpTo(), lldb_private::StackFrameList::GetFrameAtIndex(), and lldb_private::StackFrameList::GetFramesUpTo().
Status Thread::JumpToLine | ( | const FileSpec & | file, |
uint32_t | line, | ||
bool | can_leave_function, | ||
std::string * | warnings = nullptr |
||
) |
Definition at line 1571 of file Thread.cpp.
References lldb_private::ConstString::AsCString(), DumpAddressList(), lldb_private::ModuleList::FindAddressesForLine(), lldb_private::Status::FromErrorString(), lldb_private::Status::FromErrorStringWithFormat(), lldb_private::SymbolContext::function, lldb_private::StreamString::GetData(), lldb_private::FileSpec::GetFilename(), lldb_private::ExecutionContext::GetFramePtr(), lldb_private::Target::GetImages(), lldb_private::ExecutionContext::GetRegisterContext(), GetStackFrameAtIndex(), lldb_private::StreamString::GetString(), lldb_private::StackFrame::GetSymbolContext(), lldb_private::ExecutionContext::GetTargetPtr(), lldb_private::ExecutionContext::GetTargetSP(), lldb_private::Stream::Printf(), and lldb_private::RegisterContext::SetPC().
Referenced by CommandObjectThreadJump::DoExecute(), and lldb::SBThread::JumpToLine().
|
virtual |
Definition at line 1074 of file Thread.cpp.
References lldb_private::ThreadSpec::ThreadPassesBasicTests().
Referenced by lldb_private::BreakpointLocation::ValidForThisThread().
|
protected |
Definition at line 1109 of file Thread.cpp.
References lldb_private::GetLog(), GetPlans(), LLDB_LOGF, lldb_private::ThreadPlanStack::PopPlan(), and lldb_private::Step.
Referenced by ShouldStop().
|
protected |
Definition at line 1094 of file Thread.cpp.
References lldb::eDescriptionLevelFull, lldb_private::StreamString::GetData(), lldb_private::GetLog(), GetPlans(), LLDB_LOGF, lldb_private::ThreadPlanStack::PushPlan(), and lldb_private::Step.
Referenced by lldb_private::ThreadPlan::PushPlan(), and QueueThreadPlan().
ThreadPlanSP Thread::QueueBasePlan | ( | bool | abort_other_plans | ) |
Queues the base plan for a thread.
The version returned by Process does some things that are useful, like handle breakpoints and signals, so if you return a plugin specific one you probably want to call through to the Process one for anything your plugin doesn't explicitly handle.
[in] | abort_other_plans | true if we discard the currently queued plans and replace them with this one. Otherwise this plan will go on the end of the plan stack. |
Definition at line 1256 of file Thread.cpp.
References QueueThreadPlan().
Status Thread::QueueThreadPlan | ( | lldb::ThreadPlanSP & | plan_sp, |
bool | abort_other_plans | ||
) |
Queues a generic thread plan.
[in] | plan_sp | The plan to queue. |
[in] | abort_other_plans | true if we discard the currently queued plans and replace them with this one. Otherwise this plan will go on the end of the plan stack. |
Definition at line 1175 of file Thread.cpp.
References DiscardThreadPlans(), DiscardThreadPlansUpToPlan(), lldb_private::StreamString::GetString(), and PushPlan().
Referenced by lldb_private::ThreadPlanCallFunction::DidPush(), lldb_private::ThreadPlanStepOut::DidPush(), lldb_private::ThreadPlanSingleThreadTimeout::PushNewWithTimeout(), QueueBasePlan(), lldb_private::ThreadPlanStepOut::QueueInlinedStepPlan(), QueueThreadPlanForRunToAddress(), QueueThreadPlanForStepInRange(), QueueThreadPlanForStepOut(), QueueThreadPlanForStepOutNoShouldStop(), QueueThreadPlanForStepOverRange(), QueueThreadPlanForStepScripted(), QueueThreadPlanForStepSingleInstruction(), QueueThreadPlanForStepThrough(), QueueThreadPlanForStepUntil(), lldb_private::ThreadPlanSingleThreadTimeout::ResumeFromPrevState(), lldb_private::Process::RunThreadPlan(), SetupForResume(), and lldb_private::AppleThreadPlanStepThroughDirectDispatch::ShouldStop().
|
virtual |
Gets the plan used to continue from the current PC.
This is a simple plan, mostly useful as a backstop when you are continuing for some particular purpose.
[in] | abort_other_plans | true if we discard the currently queued plans and replace them with this one. Otherwise this plan will go on the end of the plan stack. |
[in] | target_addr | The address to which we're running. |
[in] | stop_other_threads | true if we will stop other threads while we single step this one. |
[out] | status | A status with an error if queuing failed. |
Definition at line 1373 of file Thread.cpp.
References QueueThreadPlan().
Referenced by lldb::SBThread::RunToAddress(), and lldb_private::ThreadPlanStepInRange::ShouldStop().
|
virtual |
Queues the plan used to step through an address range, stepping into functions.
[in] | abort_other_plans | true if we discard the currently queued plans and replace them with this one. Otherwise this plan will go on the end of the plan stack. |
[in] | type | Type of step to do, only eStepTypeInto and eStepTypeOver are supported by this plan. |
[in] | range | The address range to step through. |
[in] | addr_context | When dealing with stepping through inlined functions the current PC is not enough information to know what "step" means. For instance a series of nested inline functions might start at the same address. is supposed to be out of. |
[in] | step_in_target | Name if function we are trying to step into. We will step out if we don't land in that function. |
[in] | stop_other_threads | true if we will stop other threads while we single step this one. |
[out] | status | A status with an error if queuing failed. |
[in] | step_in_avoids_code_without_debug_info | If eLazyBoolYes we will step out if we step into code with no debug info. If eLazyBoolCalculate we will consult the default set in the thread. |
[in] | step_out_avoids_code_without_debug_info | If eLazyBoolYes, if the step over steps out it will continue to step out till it comes to a frame with debug info. If eLazyBoolCalculate, it will consult the default set in the thread. |
Definition at line 1298 of file Thread.cpp.
References QueueThreadPlan().
Referenced by lldb_private::ThreadPlanShouldStopHere::DefaultStepFromHereCallback(), CommandObjectThreadStepWithTypeAndScope::DoExecute(), QueueThreadPlanForStepInRange(), StepIn(), and lldb::SBThread::StepInto().
|
virtual |
Definition at line 1313 of file Thread.cpp.
References lldb_private::LineEntry::GetSameLineContiguousAddressRange(), and QueueThreadPlanForStepInRange().
|
virtual |
Queue the plan used to step out of the function at the current PC of thread.
[in] | abort_other_plans | true if we discard the currently queued plans and replace them with this one. Otherwise this plan will go on the end of the plan stack. |
[in] | addr_context | When dealing with stepping through inlined functions the current PC is not enough information to know what "step" means. For instance a series of nested inline functions might start at the same address. is supposed to be out of. |
[in] | first_insn | true if this is the first instruction of a function. |
[in] | stop_other_threads | true if we will stop other threads while we single step this one. |
[in] | report_stop_vote | See standard meanings for the stop & run votes in ThreadPlan.h. |
[in] | report_run_vote | See standard meanings for the stop & run votes in ThreadPlan.h. |
[out] | status | A status with an error if queuing failed. |
[in] | step_out_avoids_code_without_debug_info | If eLazyBoolYes, if the step over steps out it will continue to step out till it comes to a frame with debug info. If eLazyBoolCalculate, it will consult the default set in the thread. |
Definition at line 1328 of file Thread.cpp.
References QueueThreadPlan().
Referenced by lldb_private::ThreadPlanCallOnFunctionExit::DidPush(), CommandObjectThreadStepWithTypeAndScope::DoExecute(), lldb::SBThread::StepOut(), StepOut(), and lldb::SBThread::StepOutOfFrame().
|
virtual |
Queue the plan used to step out of the function at the current PC of a thread.
This version does not consult the should stop here callback, and should only be used by other thread plans when they need to retain control of the step out.
[in] | abort_other_plans | true if we discard the currently queued plans and replace them with this one. Otherwise this plan will go on the end of the plan stack. |
[in] | addr_context | When dealing with stepping through inlined functions the current PC is not enough information to know what "step" means. For instance a series of nested inline functions might start at the same address. is supposed to be out of. |
[in] | first_insn | true if this is the first instruction of a function. |
[in] | stop_other_threads | true if we will stop other threads while we single step this one. |
[in] | report_stop_vote | See standard meanings for the stop & run votes in ThreadPlan.h. |
[in] | report_run_vote | See standard meanings for the stop & run votes in ThreadPlan.h. |
[in] | frame_idx | The frame index. |
[out] | status | A status with an error if queuing failed. |
[in] | continue_to_next_branch | Normally this will enqueue a plan that will put a breakpoint on the return address and continue to there. If continue_to_next_branch is true, this is an operation not involving the user – e.g. stepping "next" in a source line and we instruction stepped into another function – so instead of putting a breakpoint on the return address, advance the breakpoint to the end of the source line that is doing the call, or until the next flow control instruction. If the return value from the function call is to be retrieved / displayed to the user, you must stop on the return address. The return value may be stored in volatile registers which are overwritten before the next branch instruction. |
Definition at line 1341 of file Thread.cpp.
References lldb_private::ThreadPlanShouldStopHere::ClearShouldStopHereCallbacks(), lldb_private::eLazyBoolNo, and QueueThreadPlan().
Referenced by lldb_private::ThreadPlanShouldStopHere::DefaultStepFromHereCallback(), lldb_private::ThreadPlanStepInstruction::ShouldStop(), lldb_private::ThreadPlanStepOverRange::ShouldStop(), and lldb_private::AppleThreadPlanStepThroughObjCTrampoline::ShouldStop().
|
virtual |
Queues the plan used to step through an address range, stepping over function calls.
[in] | abort_other_plans | true if we discard the currently queued plans and replace them with this one. Otherwise this plan will go on the end of the plan stack. |
[in] | type | Type of step to do, only eStepTypeInto and eStepTypeOver are supported by this plan. |
[in] | range | The address range to step through. |
[in] | addr_context | When dealing with stepping through inlined functions the current PC is not enough information to know what "step" means. For instance a series of nested inline functions might start at the same address. is supposed to be out of. |
[in] | stop_other_threads | true if we will stop other threads while we single step this one. |
[out] | status | A status with an error if queuing failed. |
[in] | step_out_avoids_code_without_debug_info | If eLazyBoolYes, if the step over steps out it will continue to step out till it comes to a frame with debug info. If eLazyBoolCalculate, we will consult the default set in the thread. |
Definition at line 1271 of file Thread.cpp.
References QueueThreadPlan().
Referenced by CommandObjectThreadStepWithTypeAndScope::DoExecute(), QueueThreadPlanForStepOverRange(), lldb_private::ThreadPlanStepOverRange::ShouldStop(), StepOver(), and lldb::SBThread::StepOver().
|
virtual |
Definition at line 1286 of file Thread.cpp.
References lldb_private::LineEntry::GetSameLineContiguousAddressRange(), and QueueThreadPlanForStepOverRange().
|
virtual |
Definition at line 1394 of file Thread.cpp.
References QueueThreadPlan().
Referenced by CommandObjectThreadStepWithTypeAndScope::DoExecute(), and lldb::SBThread::StepUsingScriptedThreadPlan().
|
virtual |
Queues the plan used to step one instruction from the current PC of thread.
[in] | step_over | true if we step over calls to functions, false if we step in. |
[in] | abort_other_plans | true if we discard the currently queued plans and replace them with this one. Otherwise this plan will go on the end of the plan stack. |
[in] | stop_other_threads | true if we will stop other threads while we single step this one. |
[out] | status | A status with an error if queuing failed. |
Definition at line 1262 of file Thread.cpp.
References lldb_private::eVoteNoOpinion, and QueueThreadPlan().
Referenced by CommandObjectThreadStepWithTypeAndScope::DoExecute(), StepIn(), lldb::SBThread::StepInstruction(), lldb::SBThread::StepInto(), StepOver(), and lldb::SBThread::StepOver().
|
virtual |
Gets the plan used to step through the code that steps from a function call site at the current PC into the actual function call.
[in] | return_stack_id | The stack id that we will return to (by setting backstop breakpoints on the return address to that frame) if we fail to step through. |
[in] | abort_other_plans | true if we discard the currently queued plans and replace them with this one. Otherwise this plan will go on the end of the plan stack. |
[in] | stop_other_threads | true if we will stop other threads while we single step this one. |
[out] | status | A status with an error if queuing failed. |
Definition at line 1360 of file Thread.cpp.
References QueueThreadPlan().
Referenced by lldb_private::ThreadPlanStepInRange::ShouldStop(), and lldb_private::ThreadPlanStepOverRange::ShouldStop().
|
virtual |
Definition at line 1384 of file Thread.cpp.
References QueueThreadPlan().
Referenced by CommandObjectThreadUntil::DoExecute(), and lldb::SBThread::StepOverUntil().
|
pure virtual |
Implemented in ThreadElfCore, ThreadFreeBSDKernel, lldb_private::process_gdb_remote::ThreadGDBRemote, ThreadMachCore, ThreadKDP, lldb_private::minidump::ThreadMinidump, lldb_private::ScriptedThread, lldb_private::HistoryThread, ThreadMemory, lldb_private::TargetThreadWindows, and lldb_private::ThreadPostMortemTrace.
void Thread::ResetStopInfo | ( | ) |
Definition at line 457 of file Thread.cpp.
References m_stop_info_sp.
Referenced by CalculatePublicStopInfo().
|
virtual |
Definition at line 532 of file Thread.cpp.
References ClearStackFrames(), GetStackFrameAtIndex(), m_unwinder_up, and lldb_private::Thread::ThreadStateCheckpoint::register_backup_sp.
Referenced by lldb_private::ThreadPlanCallFunction::DoTakedown().
void Thread::RestoreThreadStateFromCheckpoint | ( | ThreadStateCheckpoint & | saved_state | ) |
Definition at line 554 of file Thread.cpp.
References lldb_private::Thread::ThreadStateCheckpoint::current_inlined_depth, GetPlans(), GetStackFrameList(), lldb_private::Thread::ThreadStateCheckpoint::m_completed_plan_checkpoint, lldb_private::ThreadPlanStack::RestoreCompletedPlanCheckpoint(), SetStopInfo(), and lldb_private::Thread::ThreadStateCheckpoint::stop_info_sp.
Referenced by lldb_private::ThreadPlanCallFunction::RestoreThreadState().
Status Thread::ReturnFromFrame | ( | lldb::StackFrameSP | frame_sp, |
lldb::ValueObjectSP | return_value_sp, | ||
bool | broadcast = false |
||
) |
Definition at line 1479 of file Thread.cpp.
References lldb_private::Broadcaster::BroadcastEvent(), ClearStackFrames(), DiscardThreadPlans(), lldb_private::CompilerType::DumpTypeDescription(), eBroadcastBitStackChanged, lldb::eFormatHex, lldb_private::Broadcaster::EventTypeHasListeners(), lldb_private::Status::FromErrorString(), lldb_private::SymbolContext::function, lldb_private::Function::GetCompilerType(), lldb_private::CompilerType::GetFunctionReturnType(), GetProcess(), GetStackFrameAtIndex(), lldb_private::Function::GetType(), and lldb_private::Status::Success().
Referenced by lldb::SBThread::ReturnFromFrame(), and ReturnFromFrameWithIndex().
Status Thread::ReturnFromFrameWithIndex | ( | uint32_t | frame_idx, |
lldb::ValueObjectSP | return_value_sp, | ||
bool | broadcast = false |
||
) |
Definition at line 1464 of file Thread.cpp.
References lldb_private::Status::FromErrorStringWithFormat(), lldb_private::UserID::GetID(), GetStackFrameAtIndex(), and ReturnFromFrame().
|
static |
Definition at line 1748 of file Thread.cpp.
References lldb::eAllThreads, lldb::eOnlyDuringStepping, and lldb::eOnlyThisThread.
|
virtual |
Check whether this thread is safe to run functions.
The SystemRuntime may know of certain thread states (functions in process of execution, for instance) which can make it unsafe for functions to be called.
Definition at line 1689 of file Thread.cpp.
References GetProcess(), lldb_private::Process::GetSystemRuntime(), lldb_private::DynamicLoader::IsFullyInitialized(), and lldb_private::SystemRuntime::SafeToCallFunctionsOnThisThread().
Referenced by lldb_private::AppleGetQueuesHandler::GetCurrentQueues(), lldb_private::AppleGetItemInfoHandler::GetItemInfo(), lldb_private::AppleGetPendingItemsHandler::GetPendingItems(), and lldb_private::AppleGetThreadItemInfoHandler::GetThreadItemInfo().
|
inlinevirtual |
Reimplemented in lldb_private::process_gdb_remote::ThreadGDBRemote.
|
inlinevirtual |
Reimplemented in ThreadMemory.
|
inline |
Definition at line 459 of file Thread.h.
References GetStackFrameList().
|
inlinevirtual |
Sets the extended backtrace token for this thread.
Some Thread subclasses may maintain a token to help with providing an extended backtrace. The SystemRuntime plugin will set/request this.
[in] | token | The extended backtrace token. |
Reimplemented in lldb_private::HistoryThread.
|
inlinevirtual |
|
inlinevirtual |
Reimplemented in lldb_private::HistoryThread.
|
inlinevirtual |
|
inlinevirtual |
Reimplemented in lldb_private::process_gdb_remote::ThreadGDBRemote.
|
inlinevirtual |
Reimplemented in lldb_private::HistoryThread.
|
inline |
|
inline |
Sets the USER resume state for this thread.
If you set a thread to suspended with this API, it won't take part in any of the arbitration for ShouldResume, and will stay suspended even when other threads do get to run.
N.B. This is not the state that is used internally by thread plans to implement staying on one thread while stepping over a breakpoint, etc. The is the TemporaryResume state, and if you are implementing some bit of strategy in the stepping machinery you should be using that state and not the user resume state.
If you are just preparing all threads to run, you should not override the threads that are marked as suspended by the debugger. In that case, pass override_suspend = false. If you want to force the thread to run (e.g. the "thread continue" command, or are resetting the state (e.g. in SBThread::Resume()), then pass true to override_suspend.
Definition at line 187 of file Thread.h.
References lldb::eStateSuspended, and m_resume_state.
Referenced by CommandObjectThreadContinue::DoExecute(), lldb::SBThread::Resume(), and lldb::SBThread::Suspend().
uint32_t Thread::SetSelectedFrame | ( | lldb_private::StackFrame * | frame, |
bool | broadcast = false |
||
) |
Definition at line 279 of file Thread.cpp.
References BroadcastSelectedFrameChange(), FrameSelectedCallback(), GetStackFrameList(), and lldb_private::StackFrame::GetStackID().
Referenced by lldb_private::Process::RunThreadPlan(), and lldb::SBThread::SetSelectedFrame().
bool Thread::SetSelectedFrameByIndex | ( | uint32_t | frame_idx, |
bool | broadcast = false |
||
) |
Definition at line 288 of file Thread.cpp.
References BroadcastSelectedFrameChange(), FrameSelectedCallback(), and GetStackFrameList().
Referenced by lldb_private::REPL::IOHandlerInputComplete(), SetSelectedFrameByIndexNoisily(), and lldb::SBThread::UnwindInnermostExpression().
bool Thread::SetSelectedFrameByIndexNoisily | ( | uint32_t | frame_idx, |
Stream & | output_stream | ||
) |
Definition at line 300 of file Thread.cpp.
References DoNoSelectMostRelevantFrame, FrameSelectedCallback(), lldb_private::Debugger::GetExternalEditor(), lldb_private::LineEntry::GetFile(), lldb_private::GetLog(), GetProcess(), GetSelectedFrame(), lldb_private::Debugger::GetUseExternalEditor(), lldb_private::Host, lldb_private::LineEntry::line, lldb_private::SymbolContext::line_entry, LLDB_LOG_ERROR, lldb_private::Host::OpenFileInExternalEditor(), and SetSelectedFrameByIndex().
Referenced by CommandObjectFrameSelect::DoExecute(), and CommandObjectThreadReturn::DoExecute().
void Thread::SetShouldReportStop | ( | Vote | vote | ) |
Definition at line 485 of file Thread.cpp.
References lldb_private::eLazyBoolNo, lldb_private::eLazyBoolYes, lldb_private::eVoteNoOpinion, lldb_private::eVoteYes, m_override_should_notify, and m_stop_info_sp.
|
inline |
Definition at line 1208 of file Thread.h.
References m_should_run_before_public_stop.
Referenced by DidResume(), and ShouldStop().
void Thread::SetState | ( | lldb::StateType | state | ) |
Definition at line 571 of file Thread.cpp.
References m_state, and m_state_mutex.
Referenced by DidStop(), and lldb_private::TargetThreadWindows::RefreshStateAfterStop().
void Thread::SetStopInfo | ( | const lldb::StopInfoSP & | stop_info_sp | ) |
Definition at line 463 of file Thread.cpp.
References lldb_private::eLazyBoolCalculate, lldb_private::eLazyBoolYes, lldb_private::UserID::GetID(), lldb_private::GetLog(), GetProcess(), LLDB_LOGF, m_override_should_notify, m_stop_info_sp, m_stop_info_stop_id, lldb_private::Thread, and UINT32_MAX.
Referenced by CalculatePublicStopInfo(), ThreadElfCore::CalculateStopInfo(), ThreadMachCore::CalculateStopInfo(), ThreadKDP::CalculateStopInfo(), lldb_private::ScriptedThread::CalculateStopInfo(), ThreadMemory::CalculateStopInfo(), lldb_private::TargetThreadWindows::CalculateStopInfo(), lldb_private::process_gdb_remote::ProcessGDBRemote::CalculateThreadStopInfo(), GetPrivateStopInfo(), lldb_private::ArchitectureArm::OverrideStopInfo(), RestoreThreadStateFromCheckpoint(), lldb_private::ThreadPlan::SetStopInfo(), SetStopInfoToNothing(), and lldb_private::StopInfoWatchpoint::ThreadPlanStepOverWatchpoint::ShouldStop().
void Thread::SetStopInfoToNothing | ( | ) |
Definition at line 496 of file Thread.cpp.
References lldb_private::StopInfo::CreateStopReasonWithSignal(), LLDB_INVALID_SIGNAL_NUMBER, and SetStopInfo().
Referenced by lldb_private::ThreadPlanCallFunction::DidPush().
|
inlineprotected |
Definition at line 1293 of file Thread.h.
References m_temporary_resume_state.
Referenced by ShouldResume().
|
static |
Definition at line 1667 of file Thread.cpp.
Referenced by lldb_private::Process::SettingsInitialize().
|
static |
Definition at line 1669 of file Thread.cpp.
Referenced by lldb_private::Process::SettingsTerminate().
void Thread::SetupForResume | ( | ) |
Definition at line 620 of file Thread.cpp.
References lldb_private::ThreadPlan::eKindStepOverBreakpoint, lldb::eStateStepping, lldb::eStateSuspended, lldb_private::ThreadPlanStepOverBreakpoint::GetBreakpointLoadAddress(), GetCurrentPlan(), lldb_private::ThreadPlan::GetKind(), GetProcess(), GetRegisterContext(), GetResumeState(), QueueThreadPlan(), and lldb_private::ThreadPlanStepOverBreakpoint::SetAutoContinue().
Definition at line 1043 of file Thread.cpp.
References lldb::eStateInvalid, lldb::eStateSuspended, lldb_private::eVoteNoOpinion, GetCompletedPlan(), lldb_private::ThreadPlanStack::GetCompletedPlan(), GetCurrentPlan(), lldb_private::UserID::GetID(), GetIndexID(), lldb_private::GetLog(), GetName(), GetPlans(), GetResumeState(), GetTemporaryResumeState(), LLDB_LOGF, lldb_private::ThreadPlan::ShouldReportRun(), lldb_private::StateAsCString(), and lldb_private::Step.
Definition at line 982 of file Thread.cpp.
References lldb::eStateInvalid, lldb::eStateSuspended, lldb_private::eVoteNoOpinion, lldb_private::ThreadPlanStack::GetCompletedPlan(), GetCurrentPlan(), lldb_private::UserID::GetID(), lldb_private::GetLog(), GetPlans(), GetPreviousPlan(), GetResumeState(), GetTemporaryResumeState(), lldb_private::ThreadPlan::IsBasePlan(), LLDB_LOGF, lldb_private::ThreadPlan::PlanExplainsStop(), lldb_private::ThreadPlan::ShouldReportStop(), lldb_private::Step, and ThreadStoppedForAReason().
bool Thread::ShouldResume | ( | lldb::StateType | resume_state | ) |
Definition at line 673 of file Thread.cpp.
References ClearStackFrames(), lldb_private::eLazyBoolCalculate, lldb::eStateSuspended, GetBackingThread(), GetCurrentPlan(), GetPlans(), GetPreviousPlan(), GetPrivateStopInfo(), GetProcess(), GetTemporaryResumeState(), m_override_should_notify, m_stop_info_sp, m_stop_info_stop_id, SetTemporaryResumeState(), lldb_private::ThreadPlanStack::WillResume(), lldb_private::StopInfo::WillResume(), WillResume(), and lldb_private::ThreadPlan::WillResume().
|
inline |
Definition at line 1212 of file Thread.h.
References m_should_run_before_public_stop.
bool Thread::ShouldStop | ( | Event * | event_ptr | ) |
Definition at line 743 of file Thread.cpp.
References DiscardPlan(), lldb_private::ThreadPlan::DoTraceLog(), lldb::eDescriptionLevelVerbose, lldb::eStateSuspended, GetCurrentPlan(), lldb_private::StreamString::GetData(), lldb_private::UserID::GetID(), lldb_private::GetLog(), lldb_private::ThreadPlan::GetName(), GetPreviousPlan(), GetPrivateStopInfo(), GetProcess(), GetProtocolID(), GetRegisterContext(), lldb_private::Process::ProcessEventData::GetRestartedFromEvent(), GetResumeState(), GetStackFrameList(), GetTemporaryResumeState(), lldb_private::Stream::IndentMore(), lldb_private::ThreadPlan::IsBasePlan(), lldb_private::ThreadPlan::IsControllingPlan(), lldb_private::ThreadPlan::IsLeafPlan(), lldb_private::ThreadPlan::IsPlanComplete(), lldb_private::ThreadPlan::IsPlanStale(), LLDB_INVALID_ADDRESS, LLDB_LOGF, lldb_private::ThreadPlan::MischiefManaged(), lldb_private::ThreadPlan::OkayToDiscard(), lldb_private::ThreadPlan::PlanExplainsStop(), PopPlan(), SetShouldRunBeforePublicStop(), lldb_private::ThreadPlan::ShouldAutoContinue(), lldb_private::ThreadPlan::ShouldRunBeforePublicStop(), lldb_private::ThreadPlan::ShouldStop(), lldb_private::Step, ThreadStoppedForAReason(), lldb_private::ThreadPlan::TracerExplainsStop(), and lldb_private::ThreadPlan::WillStop().
|
virtual |
Default implementation for stepping into.
This function is designed to be used by commands where the process is publicly stopped.
[in] | source_step | If true and the frame has debug info, then do a source level step in, else do a single instruction step in. |
[in] | step_in_avoids_code_without_debug_info | If true, then avoid stepping into code that doesn't have debug info, else step into any code regardless of whether it has debug info. |
[in] | step_out_avoids_code_without_debug_info | If true, then if you step out to code with no debug info, keep stepping out till you get to code with debug info. |
Definition at line 1947 of file Thread.cpp.
References lldb::eOnlyThisThread, error(), lldb_private::Status::FromErrorString(), lldb_private::UserID::GetID(), GetProcess(), GetStackFrameAtIndex(), lldb_private::Process::GetState(), lldb_private::Process::GetThreadList(), lldb_private::SymbolContext::line_entry, QueueThreadPlanForStepInRange(), QueueThreadPlanForStepSingleInstruction(), lldb_private::Process::Resume(), lldb_private::ThreadList::SetSelectedThreadByID(), and lldb_private::StateIsStoppedState().
|
virtual |
Default implementation for stepping out.
This function is designed to be used by commands where the process is publicly stopped.
[in] | frame_idx | The frame index to step out of. |
Definition at line 2016 of file Thread.cpp.
References error(), lldb_private::eVoteNoOpinion, lldb_private::eVoteYes, lldb_private::Status::FromErrorString(), lldb_private::UserID::GetID(), GetProcess(), lldb_private::Process::GetState(), lldb_private::Process::GetThreadList(), QueueThreadPlanForStepOut(), lldb_private::Process::Resume(), lldb_private::ThreadList::SetSelectedThreadByID(), and lldb_private::StateIsStoppedState().
|
virtual |
Default implementation for stepping over.
This function is designed to be used by commands where the process is publicly stopped.
[in] | source_step | If true and the frame has debug info, then do a source level step over, else do a single instruction step over. |
Definition at line 1983 of file Thread.cpp.
References lldb::eOnlyThisThread, error(), lldb_private::Status::FromErrorString(), lldb_private::UserID::GetID(), GetProcess(), GetStackFrameAtIndex(), lldb_private::Process::GetState(), lldb_private::Process::GetThreadList(), lldb_private::SymbolContext::line_entry, QueueThreadPlanForStepOverRange(), QueueThreadPlanForStepSingleInstruction(), lldb_private::Process::Resume(), lldb_private::ThreadList::SetSelectedThreadByID(), and lldb_private::StateIsStoppedState().
bool Thread::StopInfoIsUpToDate | ( | ) | const |
Definition at line 448 of file Thread.cpp.
References GetProcess(), and m_stop_info_stop_id.
|
static |
Definition at line 1709 of file Thread.cpp.
References lldb::eStopReasonBreakpoint, lldb::eStopReasonException, lldb::eStopReasonExec, lldb::eStopReasonFork, lldb::eStopReasonInstrumentation, lldb::eStopReasonInterrupt, lldb::eStopReasonInvalid, lldb::eStopReasonNone, lldb::eStopReasonPlanComplete, lldb::eStopReasonProcessorTrace, lldb::eStopReasonSignal, lldb::eStopReasonThreadExiting, lldb::eStopReasonTrace, lldb::eStopReasonVFork, lldb::eStopReasonVForkDone, and lldb::eStopReasonWatchpoint.
Referenced by lldb_private::ThreadPlanCallFunction::DoPlanExplainsStop(), and lldb_private::ThreadPlanStepOverBreakpoint::DoPlanExplainsStop().
|
inlinevirtual |
Whether this Thread already has all the Queue information cached or not.
A Thread may be associated with a libdispatch work Queue at a given public stop event. If so, the thread can satisify requests like GetQueueLibdispatchQueueAddress, GetQueueKind, GetQueueName, and GetQueueID either from information from the remote debug stub when it is initially created, or it can query the SystemRuntime for that information.
This method allows the SystemRuntime to discover if a thread has this information already, instead of calling the thread to get the information and having the thread call the SystemRuntime again.
Reimplemented in lldb_private::process_gdb_remote::ThreadGDBRemote.
bool Thread::ThreadStoppedForAReason | ( | ) |
Definition at line 504 of file Thread.cpp.
References GetPrivateStopInfo().
Referenced by ShouldReportStop(), and ShouldStop().
Status Thread::UnwindInnermostExpression | ( | ) |
Unwinds the thread stack for the innermost expression plan currently on the thread plan stack.
Definition at line 1244 of file Thread.cpp.
References DiscardThreadPlansUpToPlan(), error(), lldb_private::Status::FromErrorString(), lldb_private::ThreadPlanStack::GetInnermostExpression(), and GetPlans().
Referenced by CommandObjectThreadReturn::DoExecute(), lldb_private::REPL::IOHandlerInputComplete(), and lldb::SBThread::UnwindInnermostExpression().
bool Thread::WasThreadPlanDiscarded | ( | ThreadPlan * | plan | ) | const |
Checks whether the given plan is in the discarded plans for this stop.
[in] | plan | Pointer to the plan you're checking. |
Definition at line 1163 of file Thread.cpp.
References GetPlans(), and lldb_private::ThreadPlanStack::WasPlanDiscarded().
Referenced by lldb_private::Process::RunThreadPlan().
|
inlinevirtual |
Reimplemented in lldb_private::process_gdb_remote::ThreadGDBRemote, lldb_private::ScriptedThread, ThreadMemory, and lldb_private::TargetThreadWindows.
Definition at line 213 of file Thread.h.
Referenced by ShouldResume().
void Thread::WillStop | ( | ) |
Definition at line 608 of file Thread.cpp.
References GetCurrentPlan(), and lldb_private::ThreadPlan::WillStop().
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
protected |
The stack frames that get lazily populated after a thread stops.
Definition at line 1326 of file Thread.h.
Referenced by ClearStackFrames(), DestroyThread(), and GetStackFrameList().
|
protected |
Definition at line 1344 of file Thread.h.
Referenced by DestroyThread(), GetPrivateStopInfo(), GetStopInfo(), IsValid(), and ~Thread().
|
private |
Definition at line 1352 of file Thread.h.
Referenced by ClearStackFrames(), and GetExtendedInfo().
|
private |
Definition at line 1350 of file Thread.h.
Referenced by ClearStackFrames(), and GetExtendedInfo().
|
mutableprotected |
Multithreaded protection for m_state.
Definition at line 1325 of file Thread.h.
Referenced by ClearStackFrames(), DestroyThread(), and GetStackFrameList().
|
protected |
A unique 1 based index assigned to each thread for easy UI/command line access.
Definition at line 1317 of file Thread.h.
Referenced by GetIndexID().
|
mutableprotected |
Definition at line 1347 of file Thread.h.
Referenced by GetPlans().
|
protected |
Definition at line 1346 of file Thread.h.
Referenced by SetShouldReportStop(), SetStopInfo(), and ShouldResume().
|
protected |
The previous stack frames from the last time this thread stopped.
Definition at line 1328 of file Thread.h.
Referenced by ClearStackFrames(), DestroyThread(), and GetStackFrameList().
|
protected |
Frame 0's PC the last time this thread was stopped.
Definition at line 1331 of file Thread.h.
Referenced by ClearStackFrames(), DestroyThread(), and GetPreviousFrameZeroPC().
|
protected |
The process that owns this thread.
Definition at line 1305 of file Thread.h.
Referenced by GetProcess().
|
protected |
The register context for this thread's current register state.
Definition at line 1319 of file Thread.h.
Referenced by lldb_private::ScriptedThread::CreateRegisterContextForFrame(), DestroyThread(), Flush(), ThreadElfCore::GetRegisterContext(), ThreadFreeBSDKernel::GetRegisterContext(), lldb_private::process_gdb_remote::ThreadGDBRemote::GetRegisterContext(), ThreadMachCore::GetRegisterContext(), ThreadKDP::GetRegisterContext(), lldb_private::minidump::ThreadMinidump::GetRegisterContext(), lldb_private::ScriptedThread::GetRegisterContext(), ThreadMemory::GetRegisterContext(), lldb_private::TargetThreadWindows::GetRegisterContext(), lldb_private::ThreadPostMortemTrace::GetRegisterContext(), GetThreadPointer(), and ThreadMemory::RefreshStateAfterStop().
|
protected |
The signal that should be used when continuing this thread.
Definition at line 1333 of file Thread.h.
Referenced by GetResumeSignal(), and SetResumeSignal().
|
protected |
This state is used to force a thread to be suspended from outside the ThreadPlan logic.
Definition at line 1335 of file Thread.h.
Referenced by GetResumeState(), and SetResumeState().
|
protected |
Definition at line 1314 of file Thread.h.
Referenced by SetShouldRunBeforePublicStop(), and ShouldRunBeforePublicStop().
|
protected |
The state of our process.
Definition at line 1321 of file Thread.h.
Referenced by GetState(), and SetState().
|
mutableprotected |
Multithreaded protection for m_state.
Definition at line 1323 of file Thread.h.
Referenced by GetState(), and SetState().
|
protected |
Definition at line 1311 of file Thread.h.
Referenced by GetPrivateStopInfo().
|
protected |
The private stop reason for this thread.
Definition at line 1306 of file Thread.h.
Referenced by ThreadElfCore::CalculateStopInfo(), lldb_private::TargetThreadWindows::CalculateStopInfo(), DestroyThread(), GetDescription(), GetPrivateStopInfo(), GetStopInfo(), IsStillAtLastBreakpointHit(), ResetStopInfo(), SetShouldReportStop(), SetStopInfo(), and ShouldResume().
|
protected |
Definition at line 1307 of file Thread.h.
Referenced by GetPrivateStopInfo(), GetStopInfo(), SetStopInfo(), ShouldResume(), and StopInfoIsUpToDate().
|
protected |
This state records what the thread was told to do by the thread plan logic for the current resume.
Definition at line 1338 of file Thread.h.
Referenced by GetTemporaryResumeState(), and SetTemporaryResumeState().
|
protected |
It gets set in Thread::ShouldResume.
Definition at line 1343 of file Thread.h.
Referenced by lldb_private::minidump::ThreadMinidump::CreateRegisterContextForFrame(), lldb_private::HistoryThread::CreateRegisterContextForFrame(), DestroyThread(), GetUnwinder(), lldb_private::HistoryThread::HistoryThread(), and RestoreRegisterStateFromCheckpoint().