LLDB  mainline
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
lldb_private::HistoryThread Class Reference

A thread object representing a backtrace from a previous point in the process execution. More...

#include "HistoryThread.h"

Inheritance diagram for lldb_private::HistoryThread:
Inheritance graph
[legend]
Collaboration diagram for lldb_private::HistoryThread:
Collaboration graph
[legend]

Public Member Functions

 HistoryThread (lldb_private::Process &process, lldb::tid_t tid, std::vector< lldb::addr_t > pcs, uint32_t stop_id, bool stop_id_is_valid)
 
 ~HistoryThread () override
 
lldb::RegisterContextSP GetRegisterContext () override
 
lldb::RegisterContextSP CreateRegisterContextForFrame (StackFrame *frame) override
 
void RefreshStateAfterStop () override
 
bool CalculateStopInfo () override
 
void SetExtendedBacktraceToken (uint64_t token) override
 Sets the extended backtrace token for this thread. More...
 
uint64_t GetExtendedBacktraceToken () override
 Gets the extended backtrace token for this thread. More...
 
const char * GetQueueName () override
 Retrieve the Queue name for the queue currently using this Thread. More...
 
void SetQueueName (const char *name) override
 
lldb::queue_id_t GetQueueID () override
 Retrieve the Queue ID for the queue currently using this Thread. More...
 
void SetQueueID (lldb::queue_id_t queue) override
 
const char * GetThreadName ()
 
uint32_t GetExtendedBacktraceOriginatingIndexID () override
 
void SetThreadName (const char *name)
 
const char * GetName () override
 
void SetName (const char *name) override
 
- Public Member Functions inherited from lldb_private::Thread
ConstStringGetBroadcasterClass () const override
 
 Thread (Process &process, lldb::tid_t tid, bool use_invalid_index_id=false)
 Constructor. More...
 
 ~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. More...
 
lldb::StateType GetResumeState () const
 Gets the USER resume state for this thread. More...
 
void SetupForResume ()
 
bool ShouldResume (lldb::StateType resume_state)
 
virtual void WillResume (lldb::StateType resume_state)
 
virtual void DidResume ()
 
virtual void DidStop ()
 
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. More...
 
virtual lldb_private::LazyBool GetAssociatedWithLibdispatchQueue ()
 Whether this thread can be associated with a libdispatch queue. More...
 
virtual void SetAssociatedWithLibdispatchQueue (lldb_private::LazyBool associated_with_libdispatch_queue)
 
virtual lldb::QueueKind GetQueueKind ()
 Retrieve the Queue kind for the queue currently using this Thread. More...
 
virtual void SetQueueKind (lldb::QueueKind kind)
 
virtual lldb::QueueSP GetQueue ()
 Retrieve the Queue for this thread, if any. More...
 
virtual lldb::addr_t GetQueueLibdispatchQueueAddress ()
 Retrieve the address of the libdispatch_queue_t struct for queue currently using this Thread. More...
 
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. More...
 
virtual uint32_t GetStackFrameCount ()
 
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 ()
 
lldb::StackFrameSP GetSelectedFrame ()
 
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 void ClearStackFrames ()
 
virtual bool SetBackingThread (const lldb::ThreadSP &thread_sp)
 
virtual lldb::ThreadSP GetBackingThread () const
 
virtual void ClearBackingThread ()
 
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. More...
 
virtual Status StepOver (bool source_step, LazyBool step_out_avoids_code_without_debug_info=eLazyBoolCalculate)
 Default implementation for stepping over. More...
 
virtual Status StepOut ()
 Default implementation for stepping out. More...
 
virtual lldb::addr_t GetThreadPointer ()
 Retrieves the per-thread data area. More...
 
virtual lldb::addr_t GetThreadLocalData (const lldb::ModuleSP module, lldb::addr_t tls_file_addr)
 Retrieves the per-module TLS block for a thread. More...
 
virtual bool SafeToCallFunctions ()
 Check whether this thread is safe to run functions. More...
 
virtual lldb::ThreadPlanSP QueueFundamentalPlan (bool abort_other_plans)
 Queues the base plan for a thread. More...
 
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. More...
 
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. More...
 
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. More...
 
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 stop_vote, Vote 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. More...
 
virtual lldb::ThreadPlanSP QueueThreadPlanForStepOutNoShouldStop (bool abort_other_plans, SymbolContext *addr_context, bool first_insn, bool stop_other_threads, Vote stop_vote, Vote 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. More...
 
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. More...
 
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. More...
 
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, bool stop_other_threads, Status &status)
 
ThreadPlanGetCurrentPlan ()
 Gets the plan which will execute next on the plan stack. More...
 
Status UnwindInnermostExpression ()
 Unwinds the thread stack for the innermost expression plan currently on the thread plan stack. More...
 
lldb::ThreadPlanSP GetCompletedPlan ()
 Gets the outer-most plan that was popped off the plan stack in the most recent stop. More...
 
lldb::ValueObjectSP GetReturnValueObject ()
 Gets the outer-most return value from the completed plans. More...
 
lldb::ExpressionVariableSP GetExpressionVariable ()
 Gets the outer-most expression variable from the completed plans. More...
 
bool IsThreadPlanDone (ThreadPlan *plan)
 Checks whether the given plan is in the completed plans for this stop. More...
 
bool WasThreadPlanDiscarded (ThreadPlan *plan)
 Checks whether the given plan is in the discarded plans for this stop. More...
 
bool CompletedPlanOverridesBreakpoint ()
 Check if we have completed plan to override breakpoint stop reason. More...
 
Status QueueThreadPlan (lldb::ThreadPlanSP &plan_sp, bool abort_other_plans)
 Queues a generic thread plan. More...
 
void DiscardThreadPlans (bool force)
 Discards the plans queued on the plan stack of the current thread. More...
 
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. More...
 
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. More...
 
void DumpThreadPlans (Stream *s, lldb::DescriptionLevel desc_level=lldb::eDescriptionLevelVerbose, bool include_internal=true, bool ignore_boring=false) const
 Prints the current plan stack. More...
 
virtual bool CheckpointThreadState (ThreadStateCheckpoint &saved_state)
 
virtual bool RestoreRegisterStateFromCheckpoint (ThreadStateCheckpoint &saved_state)
 
virtual bool RestoreThreadStateFromCheckpoint (ThreadStateCheckpoint &saved_state)
 
void EnableTracer (bool value, bool single_step)
 
void SetTracer (lldb::ThreadPlanTracerSP &tracer_sp)
 
uint32_t GetIndexID () const
 
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. More...
 
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 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 IsValid () const
 
virtual lldb::StopInfoSP GetPrivateStopInfo ()
 
lldb::StateType GetTemporaryResumeState () const
 
void SetStopInfo (const lldb::StopInfoSP &stop_info_sp)
 
void ResetStopInfo ()
 
void SetShouldReportStop (Vote vote)
 
lldb::ValueObjectSP GetCurrentException ()
 
lldb::ThreadSP GetCurrentExceptionBacktrace ()
 
- Public Member Functions inherited from lldb_private::ThreadProperties
 ThreadProperties (bool is_global)
 
 ~ThreadProperties () override
 
const RegularExpressionGetSymbolsToAvoidRegexp ()
 The regular expression returned determines symbols that this thread won't stop in during "step-in" operations. More...
 
FileSpecList GetLibrariesToAvoid () const
 
bool GetTraceEnabledState () const
 
bool GetStepInAvoidsNoDebug () const
 
bool GetStepOutAvoidsNoDebug () const
 
uint64_t GetMaxBacktraceDepth () 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, bool will_modify, 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)
 
virtual void DumpAllPropertyValues (const ExecutionContext *exe_ctx, Stream &strm, uint32_t dump_mask)
 
virtual void DumpAllDescriptions (CommandInterpreter &interpreter, Stream &strm) const
 
size_t Apropos (llvm::StringRef keyword, std::vector< const Property *> &matching_properties) const
 
lldb::OptionValuePropertiesSP GetSubProperty (const ExecutionContext *exe_ctx, ConstString name)
 
- Public Member Functions inherited from lldb_private::UserID
 UserID (lldb::user_id_t uid=LLDB_INVALID_UID)
 Construct with optional user ID. More...
 
 ~UserID ()
 Destructor. More...
 
void Clear ()
 Clears the object state. More...
 
lldb::user_id_t GetID () const
 Get accessor for the user ID. More...
 
void SetID (lldb::user_id_t uid)
 Set accessor for the user ID. More...
 
- Public Member Functions inherited from lldb_private::ExecutionContextScope
virtual ~ExecutionContextScope ()
 
- Public Member Functions inherited from lldb_private::Broadcaster
 Broadcaster (lldb::BroadcasterManagerSP manager_sp, const char *name)
 Construct with a broadcaster with a name. More...
 
virtual ~Broadcaster ()
 Destructor. More...
 
void CheckInWithManager ()
 
void BroadcastEvent (lldb::EventSP &event_sp)
 Broadcast an event which has no associated data. More...
 
void BroadcastEventIfUnique (lldb::EventSP &event_sp)
 
void BroadcastEvent (uint32_t event_type, const lldb::EventDataSP &event_data_sp)
 
void BroadcastEvent (uint32_t event_type, EventData *event_data=nullptr)
 
void BroadcastEventIfUnique (uint32_t event_type, EventData *event_data=nullptr)
 
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. More...
 
ConstString GetBroadcasterName ()
 Get the NULL terminated C string name of this Broadcaster object. More...
 
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. More...
 
void SetEventName (uint32_t event_mask, const char *name)
 Set the name for an event bit. More...
 
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. More...
 
bool HijackBroadcaster (const lldb::ListenerSP &listener_sp, uint32_t event_mask=UINT32_MAX)
 Provides a simple mechanism to temporarily redirect events from broadcaster. More...
 
bool IsHijackedForEvent (uint32_t event_mask)
 
void RestoreBroadcaster ()
 Restore the state of the Broadcaster from a previous hijack attempt. More...
 
lldb::BroadcasterManagerSP GetManager ()
 

Protected Member Functions

virtual lldb::StackFrameListSP GetStackFrameList ()
 
- Protected Member Functions inherited from lldb_private::Thread
virtual void DestroyThread ()
 
void PushPlan (lldb::ThreadPlanSP &plan_sp)
 
void PopPlan ()
 
void DiscardPlan ()
 
ThreadPlanGetPreviousPlan (ThreadPlan *plan)
 
virtual lldb_private::UnwindGetUnwinder ()
 
virtual bool IsStillAtLastBreakpointHit ()
 
virtual bool IsOperatingSystemPluginThread () const
 
virtual lldb_private::StructuredData::ObjectSP FetchThreadExtendedInfo ()
 
lldb::StackFrameListSP GetStackFrameList ()
 
void SetTemporaryResumeState (lldb::StateType new_state)
 
void FunctionOptimizationWarning (lldb_private::StackFrame *frame)
 
- Protected Member Functions inherited from lldb_private::Broadcaster
BroadcasterImplSP GetBroadcasterImpl ()
 
const char * GetHijackingListenerName ()
 

Protected Attributes

std::mutex m_framelist_mutex
 
lldb::StackFrameListSP m_framelist
 
std::vector< lldb::addr_tm_pcs
 
uint32_t m_stop_id
 
bool m_stop_id_is_valid
 
uint64_t m_extended_unwind_token
 
std::string m_queue_name
 
std::string m_thread_name
 
lldb::tid_t m_originating_unique_thread_id
 
lldb::queue_id_t m_queue_id
 
- Protected Attributes inherited from lldb_private::Thread
lldb::ProcessWP m_process_wp
 The process that owns this thread. More...
 
lldb::StopInfoSP m_stop_info_sp
 The private stop reason for this thread. More...
 
uint32_t m_stop_info_stop_id
 
uint32_t m_stop_info_override_stop_id
 
const uint32_t m_index_id
 A unique 1 based index assigned to each thread for easy UI/command line access. More...
 
lldb::RegisterContextSP m_reg_context_sp
 The register context for this thread's current register state. More...
 
lldb::StateType m_state
 The state of our process. More...
 
std::recursive_mutex m_state_mutex
 Multithreaded protection for m_state. More...
 
plan_stack m_plan_stack
 The stack of plans this thread is executing. More...
 
plan_stack m_completed_plan_stack
 Plans that have been completed by this stop. More...
 
plan_stack m_discarded_plan_stack
 Plans that have been discarded by this stop. More...
 
std::recursive_mutex m_frame_mutex
 Multithreaded protection for m_state. More...
 
lldb::StackFrameListSP m_curr_frames_sp
 The stack frames that get lazily populated after a thread stops. More...
 
lldb::StackFrameListSP m_prev_frames_sp
 The previous stack frames from the last time this thread stopped. More...
 
int m_resume_signal
 The signal that should be used when continuing this thread. More...
 
lldb::StateType m_resume_state
 This state is used to force a thread to be suspended from outside the ThreadPlan logic. More...
 
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. More...
 
std::unique_ptr< lldb_private::Unwindm_unwinder_up
 It gets set in Thread::ShouldResume. More...
 
bool m_destroy_called
 
LazyBool m_override_should_notify
 
- 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. More...
 

Additional Inherited Members

- Public Types inherited from lldb_private::Thread
enum  {
  eBroadcastBitStackChanged = (1 << 0), eBroadcastBitThreadSuspended = (1 << 1), eBroadcastBitThreadResumed = (1 << 2), eBroadcastBitSelectedFrameChanged = (1 << 3),
  eBroadcastBitThreadSelected = (1 << 4)
}
 Broadcaster event bits definitions. More...
 
- Static Public Member Functions inherited from lldb_private::Thread
static ConstStringGetStaticBroadcasterClass ()
 
static void SettingsInitialize ()
 
static void SettingsTerminate ()
 
static const ThreadPropertiesSPGetGlobalProperties ()
 
static const char * RunModeAsCString (lldb::RunMode mode)
 
static const char * StopReasonAsCString (lldb::StopReason reason)
 
- Static Public Member Functions inherited from lldb_private::Properties
static const char * GetExperimentalSettingsName ()
 
static bool IsSettingExperimental (llvm::StringRef setting)
 
- Protected Types inherited from lldb_private::Thread
typedef std::vector< lldb::ThreadPlanSP > plan_stack
 
- Protected Types inherited from lldb_private::Broadcaster
typedef std::shared_ptr< BroadcasterImplBroadcasterImplSP
 
typedef std::weak_ptr< BroadcasterImplBroadcasterImplWP
 

Detailed Description

A thread object representing a backtrace from a previous point in the process execution.

This subclass of Thread is used to provide a backtrace from earlier in process execution. It is given a backtrace list of pc addresses and optionally a stop_id of when those pc addresses were collected, and it will create stack frames for them.

Definition at line 34 of file HistoryThread.h.

Constructor & Destructor Documentation

◆ HistoryThread()

HistoryThread::HistoryThread ( lldb_private::Process process,
lldb::tid_t  tid,
std::vector< lldb::addr_t pcs,
uint32_t  stop_id,
bool  stop_id_is_valid 
)

◆ ~HistoryThread()

HistoryThread::~HistoryThread ( )
override

Member Function Documentation

◆ CalculateStopInfo()

bool lldb_private::HistoryThread::CalculateStopInfo ( )
inlineoverridevirtual

Implements lldb_private::Thread.

Definition at line 49 of file HistoryThread.h.

◆ CreateRegisterContextForFrame()

lldb::RegisterContextSP HistoryThread::CreateRegisterContextForFrame ( StackFrame frame)
overridevirtual

Implements lldb_private::Thread.

Definition at line 61 of file HistoryThread.cpp.

References lldb_private::Thread::m_unwinder_up.

◆ GetExtendedBacktraceOriginatingIndexID()

uint32_t HistoryThread::GetExtendedBacktraceOriginatingIndexID ( )
overridevirtual

◆ GetExtendedBacktraceToken()

uint64_t lldb_private::HistoryThread::GetExtendedBacktraceToken ( )
inlineoverridevirtual

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.

Returns
The token needed by the SystemRuntime to create an extended backtrace. LLDB_INVALID_ADDRESS is returned if no token is available.

Reimplemented from lldb_private::Thread.

Definition at line 55 of file HistoryThread.h.

References m_extended_unwind_token.

◆ GetName()

const char* lldb_private::HistoryThread::GetName ( )
inlineoverridevirtual

Reimplemented from lldb_private::Thread.

Definition at line 73 of file HistoryThread.h.

References m_thread_name.

◆ GetQueueID()

lldb::queue_id_t lldb_private::HistoryThread::GetQueueID ( )
inlineoverridevirtual

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.

Returns
A QueueID if the Thread subclass implements this, else LLDB_INVALID_QUEUE_ID.

Reimplemented from lldb_private::Thread.

Definition at line 63 of file HistoryThread.h.

References m_queue_id.

◆ GetQueueName()

const char* lldb_private::HistoryThread::GetQueueName ( )
inlineoverridevirtual

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.

Returns
The Queue name, if the Thread subclass implements this, else nullptr.

Reimplemented from lldb_private::Thread.

Definition at line 59 of file HistoryThread.h.

References m_queue_name.

◆ GetRegisterContext()

lldb::RegisterContextSP HistoryThread::GetRegisterContext ( )
overridevirtual

Implements lldb_private::Thread.

Definition at line 51 of file HistoryThread.cpp.

References lldb_private::Thread::GetProcess(), and m_pcs.

◆ GetStackFrameList()

lldb::StackFrameListSP HistoryThread::GetStackFrameList ( )
protectedvirtual

Definition at line 65 of file HistoryThread.cpp.

References m_framelist, and m_framelist_mutex.

Referenced by SetName().

◆ GetThreadName()

const char* lldb_private::HistoryThread::GetThreadName ( )
inline

Definition at line 67 of file HistoryThread.h.

References GetExtendedBacktraceOriginatingIndexID(), and m_thread_name.

◆ RefreshStateAfterStop()

void lldb_private::HistoryThread::RefreshStateAfterStop ( )
inlineoverridevirtual

Implements lldb_private::Thread.

Definition at line 47 of file HistoryThread.h.

◆ SetExtendedBacktraceToken()

void lldb_private::HistoryThread::SetExtendedBacktraceToken ( uint64_t  token)
inlineoverridevirtual

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.

Parameters
[in]token

Reimplemented from lldb_private::Thread.

Definition at line 51 of file HistoryThread.h.

References m_extended_unwind_token.

◆ SetName()

void lldb_private::HistoryThread::SetName ( const char *  name)
inlineoverridevirtual

Reimplemented from lldb_private::Thread.

Definition at line 75 of file HistoryThread.h.

References GetStackFrameList(), and m_thread_name.

◆ SetQueueID()

void lldb_private::HistoryThread::SetQueueID ( lldb::queue_id_t  queue)
inlineoverridevirtual

Reimplemented from lldb_private::Thread.

Definition at line 65 of file HistoryThread.h.

References m_queue_id.

◆ SetQueueName()

void lldb_private::HistoryThread::SetQueueName ( const char *  name)
inlineoverridevirtual

Reimplemented from lldb_private::Thread.

Definition at line 61 of file HistoryThread.h.

References m_queue_name.

◆ SetThreadName()

void lldb_private::HistoryThread::SetThreadName ( const char *  name)
inline

Definition at line 71 of file HistoryThread.h.

References m_thread_name.

Referenced by CreateHistoryThreadFromValueObject().

Member Data Documentation

◆ m_extended_unwind_token

uint64_t lldb_private::HistoryThread::m_extended_unwind_token
protected

Definition at line 86 of file HistoryThread.h.

Referenced by GetExtendedBacktraceToken(), and SetExtendedBacktraceToken().

◆ m_framelist

lldb::StackFrameListSP lldb_private::HistoryThread::m_framelist
protected

Definition at line 81 of file HistoryThread.h.

Referenced by GetStackFrameList().

◆ m_framelist_mutex

std::mutex lldb_private::HistoryThread::m_framelist_mutex
mutableprotected

Definition at line 80 of file HistoryThread.h.

Referenced by GetStackFrameList().

◆ m_originating_unique_thread_id

lldb::tid_t lldb_private::HistoryThread::m_originating_unique_thread_id
protected

Definition at line 89 of file HistoryThread.h.

Referenced by GetExtendedBacktraceOriginatingIndexID().

◆ m_pcs

std::vector<lldb::addr_t> lldb_private::HistoryThread::m_pcs
protected

Definition at line 82 of file HistoryThread.h.

Referenced by GetRegisterContext().

◆ m_queue_id

lldb::queue_id_t lldb_private::HistoryThread::m_queue_id
protected

Definition at line 90 of file HistoryThread.h.

Referenced by GetQueueID(), and SetQueueID().

◆ m_queue_name

std::string lldb_private::HistoryThread::m_queue_name
protected

Definition at line 87 of file HistoryThread.h.

Referenced by GetQueueName(), and SetQueueName().

◆ m_stop_id

uint32_t lldb_private::HistoryThread::m_stop_id
protected

Definition at line 83 of file HistoryThread.h.

◆ m_stop_id_is_valid

bool lldb_private::HistoryThread::m_stop_id_is_valid
protected

Definition at line 84 of file HistoryThread.h.

◆ m_thread_name

std::string lldb_private::HistoryThread::m_thread_name
protected

Definition at line 88 of file HistoryThread.h.

Referenced by GetName(), GetThreadName(), SetName(), and SetThreadName().


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