diff options
Diffstat (limited to 'lldb/source/Target/ThreadPlanStepOut.cpp')
-rw-r--r-- | lldb/source/Target/ThreadPlanStepOut.cpp | 55 |
1 files changed, 23 insertions, 32 deletions
diff --git a/lldb/source/Target/ThreadPlanStepOut.cpp b/lldb/source/Target/ThreadPlanStepOut.cpp index 6b6ed06e9b3..f2db6e4b6f4 100644 --- a/lldb/source/Target/ThreadPlanStepOut.cpp +++ b/lldb/source/Target/ThreadPlanStepOut.cpp @@ -63,17 +63,14 @@ ThreadPlanStepOut::ThreadPlanStepOut( m_step_out_to_id = return_frame_sp->GetStackID(); m_immediate_step_from_id = immediate_return_from_sp->GetStackID(); - // If the frame directly below the one we are returning to is inlined, we have - // to be - // a little more careful. It is non-trivial to determine the real "return - // code address" for - // an inlined frame, so we have to work our way to that frame and then step - // out. + // If the frame directly below the one we are returning to is inlined, we + // have to be a little more careful. It is non-trivial to determine the real + // "return code address" for an inlined frame, so we have to work our way to + // that frame and then step out. if (immediate_return_from_sp && immediate_return_from_sp->IsInlined()) { if (frame_idx > 0) { // First queue a plan that gets us to this inlined frame, and when we get - // there we'll queue a second - // plan that walks us out of this frame. + // there we'll queue a second plan that walks us out of this frame. m_step_out_to_inline_plan_sp.reset(new ThreadPlanStepOut( m_thread, nullptr, false, stop_others, eVoteNoOpinion, eVoteNoOpinion, frame_idx - 1, eLazyBoolNo, continue_to_next_branch)); @@ -81,8 +78,8 @@ ThreadPlanStepOut::ThreadPlanStepOut( ->SetShouldStopHereCallbacks(nullptr, nullptr); m_step_out_to_inline_plan_sp->SetPrivate(true); } else { - // If we're already at the inlined frame we're stepping through, then just - // do that now. + // If we're already at the inlined frame we're stepping through, then + // just do that now. QueueInlinedStepPlan(false); } } else if (return_frame_sp) { @@ -217,8 +214,8 @@ bool ThreadPlanStepOut::ValidatePlan(Stream *error) { } bool ThreadPlanStepOut::DoPlanExplainsStop(Event *event_ptr) { - // If the step out plan is done, then we just need to step through the inlined - // frame. + // If the step out plan is done, then we just need to step through the + // inlined frame. if (m_step_out_to_inline_plan_sp) { return m_step_out_to_inline_plan_sp->MischiefManaged(); } else if (m_step_through_inline_plan_sp) { @@ -233,15 +230,14 @@ bool ThreadPlanStepOut::DoPlanExplainsStop(Event *event_ptr) { } // We don't explain signals or breakpoints (breakpoints that handle stepping - // in or - // out will be handled by a child plan. + // in or out will be handled by a child plan. StopInfoSP stop_info_sp = GetPrivateStopInfo(); if (stop_info_sp) { StopReason reason = stop_info_sp->GetStopReason(); if (reason == eStopReasonBreakpoint) { - // If this is OUR breakpoint, we're fine, otherwise we don't know why this - // happened... + // If this is OUR breakpoint, we're fine, otherwise we don't know why + // this happened... BreakpointSiteSP site_sp( m_thread.GetProcess()->GetBreakpointSiteList().FindByID( stop_info_sp->GetValue())); @@ -268,11 +264,10 @@ bool ThreadPlanStepOut::DoPlanExplainsStop(Event *event_ptr) { } // If there was only one owner, then we're done. But if we also hit - // some - // user breakpoint on our way out, we should mark ourselves as done, but - // also not claim to explain the stop, since it is more important to - // report - // the user breakpoint than the step out completion. + // some user breakpoint on our way out, we should mark ourselves as + // done, but also not claim to explain the stop, since it is more + // important to report the user breakpoint than the step out + // completion. if (site_sp->GetNumberOfOwners() == 1) return true; @@ -320,9 +315,8 @@ bool ThreadPlanStepOut::ShouldStop(Event *event_ptr) { done = !(frame_zero_id < m_step_out_to_id); } - // The normal step out computations think we are done, so all we need to do is - // consult the ShouldStopHere, - // and we are done. + // The normal step out computations think we are done, so all we need to do + // is consult the ShouldStopHere, and we are done. if (done) { if (InvokeShouldStopHereCallback(eFrameCompareOlder)) { @@ -377,8 +371,7 @@ bool ThreadPlanStepOut::MischiefManaged() { // I also check the stack depth, since if we've blown past the breakpoint // for some // reason and we're now stopping for some other reason altogether, then - // we're done - // with this step out operation. + // we're done with this step out operation. Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP)); if (log) @@ -397,10 +390,8 @@ bool ThreadPlanStepOut::MischiefManaged() { bool ThreadPlanStepOut::QueueInlinedStepPlan(bool queue_now) { // Now figure out the range of this inlined block, and set up a "step through - // range" - // plan for that. If we've been provided with a context, then use the block - // in that - // context. + // range" plan for that. If we've been provided with a context, then use the + // block in that context. StackFrameSP immediate_return_from_sp(m_thread.GetStackFrameAtIndex(0)); if (!immediate_return_from_sp) return false; @@ -477,8 +468,8 @@ void ThreadPlanStepOut::CalculateReturnValue() { } bool ThreadPlanStepOut::IsPlanStale() { - // If we are still lower on the stack than the frame we are returning to, then - // there's something for us to do. Otherwise, we're stale. + // If we are still lower on the stack than the frame we are returning to, + // then there's something for us to do. Otherwise, we're stale. StackID frame_zero_id = m_thread.GetStackFrameAtIndex(0)->GetStackID(); return !(frame_zero_id < m_step_out_to_id); |