|
LLDB mainline
|
#include <ThreadPlanStepOut.h>
Public Member Functions | |
| ThreadPlanStepOut (Thread &thread, SymbolContext *addr_context, bool first_insn, bool stop_others, Vote report_stop_vote, Vote report_run_vote, uint32_t frame_idx, LazyBool step_out_avoids_code_without_debug_info, bool continue_to_next_branch=false, bool gather_return_value=true) | |
| Creates a thread plan to step out from frame_idx, skipping parent frames if they are artificial or hidden frames. | |
| ThreadPlanStepOut (Thread &thread, bool stop_others, Vote report_stop_vote, Vote report_run_vote, uint32_t frame_idx, bool continue_to_next_branch=false, bool gather_return_value=true) | |
| Creates a thread plan to step out from frame_idx to frame_idx + 1. | |
| ~ThreadPlanStepOut () override | |
| void | GetDescription (Stream *s, lldb::DescriptionLevel level) override |
| 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 |
| bool | StopOthers () override |
| void | SetStopOthers (bool new_value) override |
| lldb::StateType | GetPlanRunState () override |
| bool | WillStop () override |
| bool | MischiefManaged () override |
| void | DidPush () override |
| bool | IsPlanStale () override |
| ThreadPlanReturnValue | GetReturnValue () override |
| If the completion of the thread plan stepped out of or called a function, the value the function returned, or the error it threw, might have been captured by the thread plan. | |
| 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. | |
| bool | TracerExplainsStop () |
| lldb::StateType | RunState () |
| bool | PlanExplainsStop (Event *event_ptr) |
| 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 bool | SupportsResumeOthers () |
| virtual bool | ShouldRunBeforePublicStop () |
| bool | WillResume (lldb::StateType resume_state, bool current_plan) |
| bool | IsControllingPlan () |
| virtual bool | IsLeafPlan () |
| bool | SetIsControllingPlan (bool value) |
| virtual bool | OkayToDiscard () |
| void | SetOkayToDiscard (bool value) |
| virtual void | ThreadDestroyed () |
| bool | GetPrivate () |
| void | SetPrivate (bool input) |
| virtual void | DidPop () |
| ThreadPlanKind | GetKind () const |
| bool | IsPlanComplete () |
| void | SetPlanComplete (bool success=true) |
| bool | PlanSucceeded () |
| virtual bool | IsBasePlan () |
| lldb::ThreadPlanTracerSP & | GetThreadPlanTracer () |
| void | SetThreadPlanTracer (lldb::ThreadPlanTracerSP new_tracer_sp) |
| void | DoTraceLog () |
| virtual lldb::ExpressionVariableSP | GetExpressionVariable () |
| virtual void | RestoreThreadState () |
| virtual bool | IsVirtualStep () |
| bool | SetIterationCount (size_t count) |
| virtual lldb::RunDirection | GetDirection () 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::ThreadPlanShouldStopHere | |
| ThreadPlanShouldStopHere (ThreadPlan *owner) | |
| ThreadPlanShouldStopHere (ThreadPlan *owner, const ThreadPlanShouldStopHereCallbacks *callbacks, void *baton=nullptr) | |
| virtual | ~ThreadPlanShouldStopHere () |
| void | SetShouldStopHereCallbacks (const ThreadPlanShouldStopHereCallbacks *callbacks, void *baton) |
| void | ClearShouldStopHereCallbacks () |
| bool | InvokeShouldStopHereCallback (lldb::FrameComparison operation, Status &status) |
| lldb::ThreadPlanSP | CheckShouldStopHereAndQueueStepOut (lldb::FrameComparison operation, Status &status) |
| lldb_private::Flags & | GetFlags () |
| const lldb_private::Flags & | GetFlags () const |
Protected Member Functions | |
| void | SetFlagsToDefault () override |
| bool | DoPlanExplainsStop (Event *event_ptr) override |
| bool | DoWillResume (lldb::StateType resume_state, bool current_plan) override |
| bool | QueueInlinedStepPlan (bool queue_now) |
| Protected Member Functions inherited from lldb_private::ThreadPlan | |
| ThreadPlan (ThreadPlanKind kind, const char *name, Thread &thread, Vote report_stop_vote, Vote report_run_vote) | |
| void | PushPlan (lldb::ThreadPlanSP &thread_plan_sp) |
| ThreadPlan * | GetPreviousPlan () |
| lldb::StopInfoSP | GetPrivateStopInfo () |
| void | SetStopInfo (lldb::StopInfoSP stop_reason_sp) |
| bool | IsUsuallyUnexplainedStopReason (lldb::StopReason) |
| Protected Member Functions inherited from lldb_private::ThreadPlanShouldStopHere | |
| virtual lldb::ThreadPlanSP | QueueStepOutFromHerePlan (Flags &flags, lldb::FrameComparison operation, Status &status) |
Private Member Functions | |
| void | SetupAvoidNoDebug (LazyBool step_out_avoids_code_without_debug_info) |
| void | SetupReturnAddress (lldb::StackFrameSP return_frame_sp, lldb::StackFrameSP immediate_return_from_sp, uint32_t frame_idx, bool continue_to_next_branch) |
| void | CalculateReturnValue () |
| ThreadPlanStepOut (const ThreadPlanStepOut &)=delete | |
| const ThreadPlanStepOut & | operator= (const ThreadPlanStepOut &)=delete |
Static Private Attributes | |
| static uint32_t | s_default_flag_values |
Friends | |
| lldb::ThreadPlanSP | Thread::QueueThreadPlanForStepOut (bool abort_other_plans, SymbolContext *addr_context, bool first_insn, bool stop_others, Vote report_stop_vote, Vote report_run_vote, uint32_t frame_idx, Status &status, LazyBool step_out_avoids_code_without_debug_info) |
Definition at line 19 of file ThreadPlanStepOut.h.
| ThreadPlanStepOut::ThreadPlanStepOut | ( | Thread & | thread, |
| SymbolContext * | addr_context, | ||
| bool | first_insn, | ||
| bool | stop_others, | ||
| Vote | report_stop_vote, | ||
| Vote | report_run_vote, | ||
| uint32_t | frame_idx, | ||
| LazyBool | step_out_avoids_code_without_debug_info, | ||
| bool | continue_to_next_branch = false, | ||
| bool | gather_return_value = true ) |
Creates a thread plan to step out from frame_idx, skipping parent frames if they are artificial or hidden frames.
Also skips frames without debug info based on step_out_avoids_code_without_debug_info.
Definition at line 63 of file ThreadPlanStepOut.cpp.
References ComputeTargetFrame(), lldb_private::ThreadPlan::eKindStepOut, LLDB_INVALID_ADDRESS, LLDB_INVALID_BREAK_ID, m_calculate_return_value, m_immediate_step_from_function, m_return_addr, m_return_bp_id, m_step_from_insn, m_stepped_past_frames, m_stop_others, SetFlagsToDefault(), SetupAvoidNoDebug(), SetupReturnAddress(), lldb_private::ThreadPlan::ThreadPlan(), and lldb_private::ThreadPlanShouldStopHere::ThreadPlanShouldStopHere().
Referenced by lldb_private::AppleThreadPlanStepThroughDirectDispatch::AppleThreadPlanStepThroughDirectDispatch(), operator=(), SetupReturnAddress(), and ThreadPlanStepOut().
| ThreadPlanStepOut::ThreadPlanStepOut | ( | Thread & | thread, |
| bool | stop_others, | ||
| Vote | report_stop_vote, | ||
| Vote | report_run_vote, | ||
| uint32_t | frame_idx, | ||
| bool | continue_to_next_branch = false, | ||
| bool | gather_return_value = true ) |
Creates a thread plan to step out from frame_idx to frame_idx + 1.
Definition at line 88 of file ThreadPlanStepOut.cpp.
References lldb_private::ThreadPlan::eKindStepOut, LLDB_INVALID_ADDRESS, LLDB_INVALID_BREAK_ID, m_calculate_return_value, m_immediate_step_from_function, m_return_addr, m_return_bp_id, m_step_from_insn, m_stop_others, SetFlagsToDefault(), SetupReturnAddress(), lldb_private::ThreadPlan::ThreadPlan(), and lldb_private::ThreadPlanShouldStopHere::ThreadPlanShouldStopHere().
|
override |
Definition at line 241 of file ThreadPlanStepOut.cpp.
References lldb_private::ThreadPlan::GetTarget(), LLDB_INVALID_BREAK_ID, m_return_bp_id, and lldb_private::Target::RemoveBreakpointByID().
|
privatedelete |
References ThreadPlanStepOut().
|
private |
Definition at line 553 of file ThreadPlanStepOut.cpp.
References lldb_private::CompilerType::GetMinimumLanguage(), lldb_private::ThreadPlan::GetThread(), m_calculate_return_value, m_immediate_step_from_function, lldb_private::ThreadPlan::m_process, m_return_value, and m_thrown_error_location.
Referenced by DoPlanExplainsStop(), and ShouldStop().
|
overridevirtual |
Reimplemented from lldb_private::ThreadPlan.
Definition at line 233 of file ThreadPlanStepOut.cpp.
References lldb_private::ThreadPlan::GetThread(), m_step_out_to_inline_plan_sp, and m_step_through_inline_plan_sp.
Implements lldb_private::ThreadPlan.
Definition at line 320 of file ThreadPlanStepOut.cpp.
References CalculateReturnValue(), lldb::eFrameCompareOlder, lldb::eStopReasonBreakpoint, lldb_private::ThreadPlan::GetPrivateStopInfo(), lldb_private::Thread::GetStackFrameAtIndex(), lldb_private::ThreadPlan::GetThread(), lldb_private::ThreadPlanShouldStopHere::InvokeShouldStopHereCallback(), lldb_private::ThreadPlan::IsUsuallyUnexplainedStopReason(), m_immediate_step_from_id, lldb_private::ThreadPlan::m_process, m_return_bp_id, lldb_private::ThreadPlan::m_status, m_step_out_further_plan_sp, m_step_out_to_id, m_step_out_to_inline_plan_sp, m_step_through_inline_plan_sp, and lldb_private::ThreadPlan::SetPlanComplete().
Referenced by lldb_private::AppleThreadPlanStepThroughDirectDispatch::DoPlanExplainsStop().
|
overrideprotectedvirtual |
Reimplemented from lldb_private::ThreadPlan.
Definition at line 443 of file ThreadPlanStepOut.cpp.
References lldb_private::Target::GetBreakpointByID(), lldb_private::ThreadPlan::GetTarget(), LLDB_INVALID_BREAK_ID, m_return_bp_id, m_step_out_to_inline_plan_sp, m_step_through_inline_plan_sp, and lldb_private::Breakpoint::SetEnabled().
Referenced by lldb_private::AppleThreadPlanStepThroughDirectDispatch::DoWillResume().
|
overridevirtual |
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.
Definition at line 246 of file ThreadPlanStepOut.cpp.
References lldb_private::Address::Dump(), lldb_private::Address::DumpStyleLoadAddress, lldb_private::Address::DumpStyleResolvedDescription, lldb::eDescriptionLevelBrief, lldb::eDescriptionLevelVerbose, lldb_private::ThreadPlan::GetTarget(), lldb_private::ThreadPlan::m_process, m_return_addr, m_return_bp_id, m_step_from_insn, m_step_out_to_inline_plan_sp, m_step_through_inline_plan_sp, m_stepped_past_frames, lldb_private::Stream::Printf(), lldb_private::Stream::PutCString(), and lldb_private::Address::SetLoadAddress().
|
overridevirtual |
Implements lldb_private::ThreadPlan.
Definition at line 441 of file ThreadPlanStepOut.cpp.
References lldb::eStateRunning.
|
inlineoverridevirtual |
If the completion of the thread plan stepped out of or called a function, the value the function returned, or the error it threw, might have been captured by the thread plan.
If so, it can be retrieved from here.
Reimplemented from lldb_private::ThreadPlan.
Definition at line 50 of file ThreadPlanStepOut.h.
References m_return_value.
|
overridevirtual |
Reimplemented from lldb_private::ThreadPlan.
Definition at line 589 of file ThreadPlanStepOut.cpp.
References lldb_private::Thread::GetStackFrameAtIndex(), lldb_private::ThreadPlan::GetThread(), lldb_private::StackID::IsYoungerThan(), lldb_private::ThreadPlan::m_process, and m_step_out_to_id.
|
overridevirtual |
Reimplemented from lldb_private::ThreadPlan.
Definition at line 469 of file ThreadPlanStepOut.cpp.
References lldb_private::GetLog(), lldb_private::ThreadPlan::GetTarget(), lldb_private::ThreadPlan::IsPlanComplete(), LLDB_INVALID_BREAK_ID, LLDB_LOGF, m_return_bp_id, lldb_private::ThreadPlan::MischiefManaged(), lldb_private::Target::RemoveBreakpointByID(), and lldb_private::Step.
Referenced by lldb_private::AppleThreadPlanStepThroughDirectDispatch::MischiefManaged().
|
privatedelete |
References ThreadPlanStepOut().
Definition at line 492 of file ThreadPlanStepOut.cpp.
References lldb_private::ThreadPlanStepRange::AddRange(), lldb_private::Block::CalculateSymbolContext(), lldb::eAllThreads, lldb_private::eLazyBoolNo, lldb::eOnlyThisThread, lldb_private::Block::GetContainingInlinedBlock(), lldb_private::StreamString::GetData(), lldb_private::GetLog(), lldb_private::Block::GetNumRanges(), lldb_private::Block::GetRangeAtIndex(), lldb_private::ThreadPlan::GetTarget(), lldb_private::ThreadPlan::GetThread(), LLDB_LOGF, m_step_through_inline_plan_sp, m_stop_others, lldb_private::ThreadPlan::SetOkayToDiscard(), lldb_private::Step, lldb_private::SymbolContext::target_sp, and lldb_private::ThreadPlanStepRange::ValidatePlan().
Referenced by SetupReturnAddress(), and ShouldStop().
|
inlineoverrideprotectedvirtual |
Implements lldb_private::ThreadPlanShouldStopHere.
Definition at line 53 of file ThreadPlanStepOut.h.
References lldb_private::ThreadPlanShouldStopHere::GetFlags(), s_default_flag_values, and lldb_private::Flags::Set().
Referenced by ThreadPlanStepOut(), and ThreadPlanStepOut().
|
inlineoverridevirtual |
Reimplemented from lldb_private::ThreadPlan.
Definition at line 43 of file ThreadPlanStepOut.h.
References m_stop_others.
|
private |
Definition at line 213 of file ThreadPlanStepOut.cpp.
References lldb_private::Flags::Clear(), lldb_private::eLazyBoolCalculate, lldb_private::eLazyBoolNo, lldb_private::eLazyBoolYes, lldb_private::ThreadPlanShouldStopHere::eStepOutAvoidNoDebug, lldb_private::ThreadPlanShouldStopHere::GetFlags(), lldb_private::ThreadProperties::GetStepOutAvoidsNoDebug(), lldb_private::ThreadPlan::GetThread(), and lldb_private::Flags::Set().
Referenced by ThreadPlanStepOut().
|
private |
Definition at line 110 of file ThreadPlanStepOut.cpp.
References lldb_private::Address::CalculateSymbolContext(), lldb_private::Target::CreateBreakpoint(), lldb_private::eLazyBoolNo, lldb_private::eVoteNoOpinion, lldb_private::SymbolContext::function, lldb_private::AddressRange::GetByteSize(), lldb_private::Stoppoint::GetID(), lldb_private::Address::GetLoadAddress(), lldb_private::GetLog(), lldb_private::Address::GetOffset(), lldb_private::LineEntry::GetSameLineContiguousAddressRange(), lldb_private::ThreadPlan::GetTarget(), lldb_private::ThreadPlan::GetThread(), lldb_private::Breakpoint::HasResolvedLocations(), lldb_private::Breakpoint::IsHardware(), lldb_private::LineEntry::IsValid(), lldb_private::SymbolContext::line_entry, LLDB_INVALID_ADDRESS, LLDB_LOGF, m_constructor_errors, lldb_private::ThreadPlan::m_could_not_resolve_hw_bp, m_immediate_step_from_function, m_immediate_step_from_id, lldb_private::ThreadPlan::m_process, m_return_addr, m_return_bp_id, m_step_out_to_id, m_step_out_to_inline_plan_sp, m_stop_others, m_thrown_error_location, lldb_private::ThreadPlan::m_tid, QueueInlinedStepPlan(), lldb_private::Breakpoint::SetBreakpointKind(), lldb_private::Breakpoint::SetThreadID(), lldb_private::Address::Slide(), lldb_private::Step, and ThreadPlanStepOut().
Referenced by ThreadPlanStepOut(), and ThreadPlanStepOut().
Implements lldb_private::ThreadPlan.
Definition at line 386 of file ThreadPlanStepOut.cpp.
References CalculateReturnValue(), lldb::eFrameCompareOlder, lldb::eStopReasonBreakpoint, lldb_private::ThreadPlan::GetPrivateStopInfo(), lldb_private::Thread::GetStackFrameAtIndex(), lldb_private::ThreadPlan::GetThread(), lldb_private::ThreadPlanShouldStopHere::InvokeShouldStopHereCallback(), lldb_private::ThreadPlan::IsPlanComplete(), lldb_private::StackID::IsYoungerThan(), lldb_private::ThreadPlanShouldStopHere::m_flags, lldb_private::ThreadPlan::m_process, lldb_private::ThreadPlan::m_status, m_step_out_further_plan_sp, m_step_out_to_id, m_step_out_to_inline_plan_sp, m_step_through_inline_plan_sp, QueueInlinedStepPlan(), lldb_private::ThreadPlanShouldStopHere::QueueStepOutFromHerePlan(), and lldb_private::ThreadPlan::SetPlanComplete().
Referenced by lldb_private::AppleThreadPlanStepThroughDirectDispatch::ShouldStop().
|
overridevirtual |
Reimplemented from lldb_private::ThreadPlan.
Definition at line 439 of file ThreadPlanStepOut.cpp.
References m_stop_others.
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 292 of file ThreadPlanStepOut.cpp.
References error(), LLDB_INVALID_BREAK_ID, m_constructor_errors, lldb_private::ThreadPlan::m_could_not_resolve_hw_bp, m_return_bp_id, m_step_out_to_inline_plan_sp, and m_step_through_inline_plan_sp.
|
overridevirtual |
Implements lldb_private::ThreadPlan.
Definition at line 459 of file ThreadPlanStepOut.cpp.
References lldb_private::Target::GetBreakpointByID(), lldb_private::ThreadPlan::GetTarget(), LLDB_INVALID_BREAK_ID, m_return_bp_id, and lldb_private::Breakpoint::SetEnabled().
|
friend |
|
private |
Definition at line 83 of file ThreadPlanStepOut.h.
Referenced by CalculateReturnValue(), ThreadPlanStepOut(), and ThreadPlanStepOut().
|
private |
Definition at line 85 of file ThreadPlanStepOut.h.
Referenced by SetupReturnAddress(), and ValidatePlan().
|
private |
Definition at line 80 of file ThreadPlanStepOut.h.
Referenced by CalculateReturnValue(), SetupReturnAddress(), ThreadPlanStepOut(), and ThreadPlanStepOut().
|
private |
Definition at line 67 of file ThreadPlanStepOut.h.
Referenced by DoPlanExplainsStop(), and SetupReturnAddress().
|
private |
Definition at line 69 of file ThreadPlanStepOut.h.
Referenced by GetDescription(), SetupReturnAddress(), ThreadPlanStepOut(), and ThreadPlanStepOut().
|
private |
Definition at line 68 of file ThreadPlanStepOut.h.
Referenced by DoPlanExplainsStop(), DoWillResume(), GetDescription(), MischiefManaged(), SetupReturnAddress(), ThreadPlanStepOut(), ThreadPlanStepOut(), ValidatePlan(), WillStop(), and ~ThreadPlanStepOut().
|
private |
Definition at line 82 of file ThreadPlanStepOut.h.
Referenced by CalculateReturnValue(), and GetReturnValue().
|
private |
Definition at line 65 of file ThreadPlanStepOut.h.
Referenced by GetDescription(), ThreadPlanStepOut(), and ThreadPlanStepOut().
|
private |
Definition at line 77 of file ThreadPlanStepOut.h.
Referenced by DoPlanExplainsStop(), and ShouldStop().
|
private |
Definition at line 66 of file ThreadPlanStepOut.h.
Referenced by DoPlanExplainsStop(), IsPlanStale(), SetupReturnAddress(), and ShouldStop().
|
private |
Definition at line 71 of file ThreadPlanStepOut.h.
Referenced by DidPush(), DoPlanExplainsStop(), DoWillResume(), GetDescription(), SetupReturnAddress(), ShouldStop(), and ValidatePlan().
|
private |
Definition at line 75 of file ThreadPlanStepOut.h.
Referenced by DidPush(), DoPlanExplainsStop(), DoWillResume(), GetDescription(), QueueInlinedStepPlan(), ShouldStop(), and ValidatePlan().
|
private |
Definition at line 81 of file ThreadPlanStepOut.h.
Referenced by GetDescription(), and ThreadPlanStepOut().
|
private |
Definition at line 70 of file ThreadPlanStepOut.h.
Referenced by QueueInlinedStepPlan(), SetStopOthers(), SetupReturnAddress(), StopOthers(), ThreadPlanStepOut(), and ThreadPlanStepOut().
|
private |
Definition at line 84 of file ThreadPlanStepOut.h.
Referenced by CalculateReturnValue(), and SetupReturnAddress().
|
staticprivate |
Definition at line 62 of file ThreadPlanStepOut.h.
Referenced by SetFlagsToDefault().