LLDB mainline
|
#include <ThreadPlanStepRange.h>
Public Member Functions | |
ThreadPlanStepRange (ThreadPlanKind kind, const char *name, Thread &thread, const AddressRange &range, const SymbolContext &addr_context, lldb::RunMode stop_others, bool given_ranges_only=false) | |
~ThreadPlanStepRange () override | |
void | GetDescription (Stream *s, lldb::DescriptionLevel level) override=0 |
Print a description of this thread to the stream s. | |
bool | ValidatePlan (Stream *error) override |
Returns whether this plan could be successfully created. | |
bool | ShouldStop (Event *event_ptr) override=0 |
Vote | ShouldReportStop (Event *event_ptr) override |
bool | StopOthers () override |
lldb::StateType | GetPlanRunState () override |
bool | WillStop () override |
bool | MischiefManaged () override |
void | DidPush () override |
bool | IsPlanStale () override |
void | AddRange (const AddressRange &new_range) |
Public Member Functions inherited from lldb_private::ThreadPlan | |
virtual | ~ThreadPlan () |
const char * | GetName () const |
Returns the name of this thread plan. | |
Thread & | GetThread () |
Returns the Thread that is using this thread plan. | |
Target & | GetTarget () |
const Target & | GetTarget () const |
void | ClearThreadCache () |
Clear the Thread* cache. | |
virtual void | GetDescription (Stream *s, lldb::DescriptionLevel level)=0 |
Print a description of this thread to the stream s. | |
virtual bool | ValidatePlan (Stream *error)=0 |
Returns whether this plan could be successfully created. | |
bool | TracerExplainsStop () |
lldb::StateType | RunState () |
bool | PlanExplainsStop (Event *event_ptr) |
virtual bool | ShouldStop (Event *event_ptr)=0 |
virtual bool | ShouldAutoContinue (Event *event_ptr) |
Returns whether this thread plan overrides the ShouldStop of subsequently processed plans. | |
virtual Vote | ShouldReportStop (Event *event_ptr) |
Vote | ShouldReportRun (Event *event_ptr) |
virtual void | SetStopOthers (bool new_value) |
virtual bool | StopOthers () |
virtual bool | SupportsResumeOthers () |
virtual bool | ShouldRunBeforePublicStop () |
bool | WillResume (lldb::StateType resume_state, bool current_plan) |
virtual bool | WillStop ()=0 |
bool | IsControllingPlan () |
virtual bool | IsLeafPlan () |
bool | SetIsControllingPlan (bool value) |
virtual bool | OkayToDiscard () |
void | SetOkayToDiscard (bool value) |
virtual bool | MischiefManaged () |
virtual void | ThreadDestroyed () |
bool | GetPrivate () |
void | SetPrivate (bool input) |
virtual void | DidPush () |
virtual void | DidPop () |
ThreadPlanKind | GetKind () const |
bool | IsPlanComplete () |
void | SetPlanComplete (bool success=true) |
virtual bool | IsPlanStale () |
bool | PlanSucceeded () |
virtual bool | IsBasePlan () |
lldb::ThreadPlanTracerSP & | GetThreadPlanTracer () |
void | SetThreadPlanTracer (lldb::ThreadPlanTracerSP new_tracer_sp) |
void | DoTraceLog () |
virtual lldb::ValueObjectSP | GetReturnValueObject () |
virtual lldb::ExpressionVariableSP | GetExpressionVariable () |
virtual void | RestoreThreadState () |
virtual bool | IsVirtualStep () |
bool | SetIterationCount (size_t count) |
virtual lldb::StateType | GetPlanRunState ()=0 |
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. | |
Protected Attributes | |
SymbolContext | m_addr_context |
std::vector< AddressRange > | m_address_ranges |
lldb::RunMode | m_stop_others |
StackID | m_stack_id |
StackID | m_parent_stack_id |
bool | m_no_more_plans |
bool | m_first_run_event |
lldb::BreakpointSP | m_next_branch_bp_sp |
bool | m_use_fast_step |
bool | m_given_ranges_only |
bool | m_found_calls = false |
Protected Attributes inherited from lldb_private::ThreadPlan | |
Status | m_status |
Process & | m_process |
lldb::tid_t | m_tid |
Vote | m_report_stop_vote |
Vote | m_report_run_vote |
bool | m_takes_iteration_count |
bool | m_could_not_resolve_hw_bp |
int32_t | m_iteration_count = 1 |
Protected Attributes inherited from lldb_private::UserID | |
lldb::user_id_t | m_uid |
The user ID that uniquely identifies an object. | |
Private Member Functions | |
ThreadPlanStepRange (const ThreadPlanStepRange &)=delete | |
const ThreadPlanStepRange & | operator= (const ThreadPlanStepRange &)=delete |
Private Attributes | |
std::vector< lldb::DisassemblerSP > | m_instruction_ranges |
Additional Inherited Members | |
Public Types inherited from lldb_private::ThreadPlan | |
enum | ThreadPlanKind { eKindGeneric , eKindNull , eKindBase , eKindCallFunction , eKindPython , eKindStepInstruction , eKindStepOut , eKindStepOverBreakpoint , eKindStepOverRange , eKindStepInRange , eKindRunToAddress , eKindStepThrough , eKindStepUntil , eKindSingleThreadTimeout } |
Definition at line 20 of file ThreadPlanStepRange.h.
ThreadPlanStepRange::ThreadPlanStepRange | ( | ThreadPlanKind | kind, |
const char * | name, | ||
Thread & | thread, | ||
const AddressRange & | range, | ||
const SymbolContext & | addr_context, | ||
lldb::RunMode | stop_others, | ||
bool | given_ranges_only = false |
||
) |
Definition at line 32 of file ThreadPlanStepRange.cpp.
References AddRange(), lldb_private::Thread::GetStackFrameAtIndex(), lldb_private::ThreadPlan::GetTarget(), lldb_private::TargetProperties::GetUseFastStepping(), m_parent_stack_id, m_stack_id, and m_use_fast_step.
|
override |
Definition at line 51 of file ThreadPlanStepRange.cpp.
References ClearNextBranchBreakpoint().
|
privatedelete |
void ThreadPlanStepRange::AddRange | ( | const AddressRange & | new_range | ) |
Definition at line 77 of file ThreadPlanStepRange.cpp.
References m_address_ranges, and m_instruction_ranges.
Referenced by InRange(), lldb_private::ThreadPlanStepOut::QueueInlinedStepPlan(), and ThreadPlanStepRange().
|
protected |
Definition at line 312 of file ThreadPlanStepRange.cpp.
References lldb_private::GetLog(), lldb_private::ThreadPlan::GetTarget(), LLDB_LOGF, lldb_private::ThreadPlan::m_could_not_resolve_hw_bp, m_found_calls, m_next_branch_bp_sp, lldb_private::Target::RemoveBreakpointByID(), and lldb_private::Step.
Referenced by ClearNextBranchBreakpointExplainedStop(), MischiefManaged(), lldb_private::ThreadPlanStepInRange::ShouldStop(), lldb_private::ThreadPlanStepOverRange::ShouldStop(), and ~ThreadPlanStepRange().
|
protected |
Definition at line 324 of file ThreadPlanStepRange.cpp.
References ClearNextBranchBreakpoint(), lldb_private::ThreadPlan::GetPrivateStopInfo(), and IsNextBranchBreakpointStop().
Referenced by lldb_private::ThreadPlanStepInRange::ShouldStop(), and lldb_private::ThreadPlanStepOverRange::ShouldStop().
|
protected |
Definition at line 217 of file ThreadPlanStepRange.cpp.
References lldb::eFrameCompareEqual, lldb::eFrameCompareOlder, lldb::eFrameCompareSameParent, lldb::eFrameCompareYounger, lldb_private::Thread::GetStackFrameAtIndex(), lldb_private::ThreadPlan::GetThread(), lldb_private::StackID::IsValid(), m_parent_stack_id, and m_stack_id.
Referenced by IsPlanStale(), MischiefManaged(), lldb_private::ThreadPlanStepInRange::ShouldStop(), and lldb_private::ThreadPlanStepOverRange::ShouldStop().
|
overridevirtual |
Reimplemented from lldb_private::ThreadPlan.
Definition at line 53 of file ThreadPlanStepRange.cpp.
References SetNextBranchBreakpoint().
Referenced by lldb_private::ThreadPlanStepOverRange::DidPush().
|
protected |
Definition at line 89 of file ThreadPlanStepRange.cpp.
References lldb_private::Address::DumpStyleLoadAddress, lldb_private::ThreadPlan::GetTarget(), m_address_ranges, and lldb_private::Stream::Printf().
Referenced by lldb_private::ThreadPlanStepOverRange::DoWillResume(), lldb_private::ThreadPlanStepInRange::GetDescription(), and lldb_private::ThreadPlanStepOverRange::GetDescription().
|
overridepure virtual |
Print a description of this thread to the stream s.
thread. Don't expect that the result of GetThread is valid in the description method. This might get called when the underlying Thread has not been reported, so we only know the TID and not the thread.
[in] | s | The stream to which to print the description. |
[in] | level | The level of description desired. Note that eDescriptionLevelBrief will be used in the stop message printed when the plan is complete. |
Implements lldb_private::ThreadPlan.
Implemented in lldb_private::ThreadPlanStepInRange, and lldb_private::ThreadPlanStepOverRange.
|
protected |
|
protected |
Definition at line 256 of file ThreadPlanStepRange.cpp.
References lldb_private::Disassembler::DisassembleRange(), lldb_private::ThreadPlan::GetTarget(), m_address_ranges, m_instruction_ranges, and UINT32_MAX.
Referenced by SetNextBranchBreakpoint().
|
overridevirtual |
Implements lldb_private::ThreadPlan.
Definition at line 493 of file ThreadPlanStepRange.cpp.
References lldb::eStateRunning, lldb::eStateStepping, and m_next_branch_bp_sp.
|
protected |
Definition at line 101 of file ThreadPlanStepRange.cpp.
References AddRange(), lldb_private::LineEntry::Dump(), lldb_private::Address::DumpStyleLoadAddress, lldb_private::SupportFile::eEqualFileSpecAndChecksumIfSet, lldb_private::ThreadPlan::eKindStepOverRange, lldb_private::AddressRange::GetBaseAddress(), lldb_private::StreamString::GetData(), lldb_private::ThreadPlan::GetKind(), lldb_private::Address::GetLoadAddress(), lldb_private::GetLog(), lldb_private::Thread::GetRegisterContext(), lldb_private::LineEntry::GetSameLineContiguousAddressRange(), lldb_private::Thread::GetStackFrameAtIndex(), lldb_private::StackFrame::GetSymbolContext(), lldb_private::ThreadPlan::GetTarget(), lldb_private::ThreadPlan::GetThread(), lldb_private::LineEntry::IsValid(), lldb_private::LineEntry::line, lldb_private::SymbolContext::line_entry, LLDB_LOGF, m_addr_context, m_address_ranges, m_given_ranges_only, lldb_private::LineEntry::original_file_sp, lldb_private::LineEntry::range, and lldb_private::Step.
Referenced by IsPlanStale(), MischiefManaged(), lldb_private::ThreadPlanStepInRange::ShouldStop(), and lldb_private::ThreadPlanStepOverRange::ShouldStop().
|
protected |
Definition at line 197 of file ThreadPlanStepRange.cpp.
References lldb_private::AddressRange::ContainsLoadAddress(), lldb_private::SymbolContext::function, lldb_private::Function::GetAddressRange(), lldb_private::Symbol::GetAddressRef(), lldb_private::Symbol::GetByteSize(), lldb_private::Thread::GetRegisterContext(), lldb_private::ThreadPlan::GetTarget(), lldb_private::ThreadPlan::GetThread(), m_addr_context, lldb_private::SymbolContext::symbol, and lldb_private::Symbol::ValueIsAddress().
Referenced by IsPlanStale(), lldb_private::ThreadPlanStepInRange::ShouldStop(), and lldb_private::ThreadPlanStepOverRange::ShouldStop().
|
protected |
Definition at line 298 of file ThreadPlanStepRange.cpp.
References lldb_private::StopPointSiteList< StopPointSite >::FindByID(), lldb_private::Process::GetBreakpointSiteList(), m_next_branch_bp_sp, and lldb_private::ThreadPlan::m_process.
Referenced by ClearNextBranchBreakpointExplainedStop(), and NextRangeBreakpointExplainsStop().
|
overridevirtual |
Reimplemented from lldb_private::ThreadPlan.
Definition at line 533 of file ThreadPlanStepRange.cpp.
References CompareCurrentFrameToStartFrame(), lldb::eFrameCompareEqual, lldb::eFrameCompareOlder, lldb_private::GetLog(), lldb_private::Thread::GetRegisterContext(), lldb_private::ThreadPlan::GetTarget(), lldb_private::ThreadPlan::GetThread(), InRange(), InSymbol(), LLDB_LOGF, m_address_ranges, lldb_private::ThreadPlan::SetPlanComplete(), and lldb_private::Step.
|
overridevirtual |
Reimplemented from lldb_private::ThreadPlan.
Definition at line 500 of file ThreadPlanStepRange.cpp.
References ClearNextBranchBreakpoint(), CompareCurrentFrameToStartFrame(), lldb::eFrameCompareOlder, lldb_private::GetLog(), InRange(), lldb_private::ThreadPlan::IsPlanComplete(), LLDB_LOGF, m_no_more_plans, lldb_private::ThreadPlan::MischiefManaged(), and lldb_private::Step.
|
protected |
Definition at line 458 of file ThreadPlanStepRange.cpp.
References lldb_private::StopPointSiteList< StopPointSite >::FindByID(), lldb_private::Process::GetBreakpointSiteList(), lldb_private::GetLog(), IsNextBranchBreakpointStop(), LLDB_LOGF, lldb_private::ThreadPlan::m_process, and lldb_private::Step.
Referenced by lldb_private::ThreadPlanStepInRange::DoPlanExplainsStop(), and lldb_private::ThreadPlanStepOverRange::DoPlanExplainsStop().
|
privatedelete |
|
protected |
Definition at line 329 of file ThreadPlanStepRange.cpp.
References lldb_private::LineEntry::ApplyFileMappings(), lldb_private::Address::CalculateSymbolContextBlock(), lldb_private::LineEntry::column, lldb_private::Target::CreateBreakpoint(), lldb_private::ThreadPlan::eKindStepOverRange, lldb_private::LineEntry::file_sp, lldb_private::AddressRange::GetBaseAddress(), lldb_private::InlineFunctionInfo::GetCallSite(), lldb_private::Declaration::GetColumn(), lldb_private::Block::GetContainingInlinedBlock(), lldb_private::Declaration::GetFile(), lldb_private::LineEntry::GetFile(), lldb_private::Address::GetFileAddress(), lldb_private::InstructionList::GetIndexOfNextBranchInstruction(), lldb_private::Block::GetInlinedParent(), lldb_private::InstructionList::GetInstructionAtIndex(), GetInstructionsForAddress(), lldb_private::ThreadPlan::GetKind(), lldb_private::Declaration::GetLine(), lldb_private::Address::GetLoadAddress(), lldb_private::GetLog(), lldb_private::Thread::GetRegisterContext(), lldb_private::InstructionList::GetSize(), lldb_private::Process::GetTarget(), lldb_private::ThreadPlan::GetTarget(), lldb_private::ThreadPlan::GetThread(), lldb_private::Address::IsValid(), lldb_private::LineEntry::IsValid(), lldb_private::LineEntry::line, LLDB_INVALID_BREAK_ID, LLDB_LOG, LLDB_LOGF, lldb_private::ThreadPlan::m_could_not_resolve_hw_bp, m_found_calls, m_next_branch_bp_sp, lldb_private::ThreadPlan::m_process, lldb_private::ThreadPlan::m_tid, m_use_fast_step, lldb_private::LineEntry::original_file_sp, lldb_private::LineEntry::range, lldb_private::Address::Slide(), lldb_private::Step, and UINT32_MAX.
Referenced by DidPush(), lldb_private::ThreadPlanStepInRange::ShouldStop(), and lldb_private::ThreadPlanStepOverRange::ShouldStop().
Reimplemented from lldb_private::ThreadPlan.
Definition at line 68 of file ThreadPlanStepRange.cpp.
References lldb_private::eVoteNo, lldb_private::eVoteYes, lldb_private::GetLog(), lldb_private::ThreadPlan::IsPlanComplete(), LLDB_LOGF, and lldb_private::Step.
|
overridepure virtual |
Implements lldb_private::ThreadPlan.
Implemented in lldb_private::ThreadPlanStepInRange, and lldb_private::ThreadPlanStepOverRange.
|
overridevirtual |
Reimplemented from lldb_private::ThreadPlan.
Definition at line 240 of file ThreadPlanStepRange.cpp.
References lldb::eAllThreads, lldb::eOnlyDuringStepping, lldb::eOnlyThisThread, m_found_calls, and m_stop_others.
|
overridevirtual |
Returns whether this plan could be successfully created.
[in] | error | A stream to which to print some reason why the plan could not be created. Can be NULL. |
Implements lldb_private::ThreadPlan.
Definition at line 58 of file ThreadPlanStepRange.cpp.
References error(), and lldb_private::ThreadPlan::m_could_not_resolve_hw_bp.
Referenced by lldb_private::ThreadPlanStepOut::QueueInlinedStepPlan().
|
overridevirtual |
Implements lldb_private::ThreadPlan.
Definition at line 491 of file ThreadPlanStepRange.cpp.
|
protected |
Definition at line 72 of file ThreadPlanStepRange.h.
Referenced by lldb_private::ThreadPlanStepInRange::GetDescription(), lldb_private::ThreadPlanStepOverRange::GetDescription(), InRange(), InSymbol(), lldb_private::ThreadPlanStepOverRange::IsEquivalentContext(), and lldb_private::ThreadPlanStepOverRange::ShouldStop().
|
protected |
Definition at line 73 of file ThreadPlanStepRange.h.
Referenced by AddRange(), lldb_private::ThreadPlanStepOverRange::DoWillResume(), DumpRanges(), GetInstructionsForAddress(), InRange(), and IsPlanStale().
|
protected |
Definition at line 81 of file ThreadPlanStepRange.h.
|
protected |
Definition at line 86 of file ThreadPlanStepRange.h.
Referenced by ClearNextBranchBreakpoint(), SetNextBranchBreakpoint(), and StopOthers().
|
protected |
Definition at line 85 of file ThreadPlanStepRange.h.
Referenced by InRange().
|
private |
Definition at line 94 of file ThreadPlanStepRange.h.
Referenced by AddRange(), and GetInstructionsForAddress().
|
protected |
Definition at line 83 of file ThreadPlanStepRange.h.
Referenced by ClearNextBranchBreakpoint(), GetPlanRunState(), IsNextBranchBreakpointStop(), SetNextBranchBreakpoint(), and lldb_private::ThreadPlanStepOverRange::ShouldStop().
|
protected |
Definition at line 78 of file ThreadPlanStepRange.h.
Referenced by MischiefManaged(), lldb_private::ThreadPlanStepInRange::ShouldStop(), and lldb_private::ThreadPlanStepOverRange::ShouldStop().
|
protected |
Definition at line 76 of file ThreadPlanStepRange.h.
Referenced by CompareCurrentFrameToStartFrame(), and ThreadPlanStepRange().
|
protected |
Definition at line 75 of file ThreadPlanStepRange.h.
Referenced by CompareCurrentFrameToStartFrame(), lldb_private::ThreadPlanStepInRange::ShouldStop(), lldb_private::ThreadPlanStepOverRange::ShouldStop(), and ThreadPlanStepRange().
|
protected |
Definition at line 74 of file ThreadPlanStepRange.h.
Referenced by lldb_private::ThreadPlanStepOverRange::SetStopOthers(), lldb_private::ThreadPlanStepInRange::ShouldStop(), lldb_private::ThreadPlanStepOverRange::ShouldStop(), and StopOthers().
|
protected |
Definition at line 84 of file ThreadPlanStepRange.h.
Referenced by SetNextBranchBreakpoint(), and ThreadPlanStepRange().