diff options
Diffstat (limited to 'contrib/llvm/tools/lldb/source/Target/ThreadPlanStepRange.cpp')
-rw-r--r-- | contrib/llvm/tools/lldb/source/Target/ThreadPlanStepRange.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepRange.cpp b/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepRange.cpp index 309f773..82ca59f 100644 --- a/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepRange.cpp +++ b/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepRange.cpp @@ -50,6 +50,7 @@ ThreadPlanStepRange::ThreadPlanStepRange (ThreadPlanKind kind, m_address_ranges (), m_stop_others (stop_others), m_stack_id (), + m_parent_stack_id(), m_no_more_plans (false), m_first_run_event (true), m_use_fast_step(false) @@ -57,6 +58,9 @@ ThreadPlanStepRange::ThreadPlanStepRange (ThreadPlanKind kind, m_use_fast_step = GetTarget().GetUseFastStepping(); AddRange(range); m_stack_id = m_thread.GetStackFrameAtIndex(0)->GetStackID(); + StackFrameSP parent_stack = m_thread.GetStackFrameAtIndex(1); + if (parent_stack) + m_parent_stack_id = parent_stack->GetStackID(); } ThreadPlanStepRange::~ThreadPlanStepRange () @@ -270,7 +274,16 @@ ThreadPlanStepRange::CompareCurrentFrameToStartFrame() } else { - frame_order = eFrameCompareOlder; + StackFrameSP cur_parent_frame = m_thread.GetStackFrameAtIndex(1); + StackID cur_parent_id; + if (cur_parent_frame) + cur_parent_id = cur_parent_frame->GetStackID(); + if (m_parent_stack_id.IsValid() + && cur_parent_id.IsValid() + && m_parent_stack_id == cur_parent_id) + frame_order = eFrameCompareSameParent; + else + frame_order = eFrameCompareOlder; } return frame_order; } @@ -443,8 +456,8 @@ ThreadPlanStepRange::NextRangeBreakpointExplainsStop (lldb::StopInfoSP stop_info } } if (log) - log->Printf ("ThreadPlanStepRange::NextRangeBreakpointExplainsStop - Hit next range breakpoint which has %zu owners - explains stop: %u.", - num_owners, + log->Printf ("ThreadPlanStepRange::NextRangeBreakpointExplainsStop - Hit next range breakpoint which has %" PRIu64 " owners - explains stop: %u.", + (uint64_t)num_owners, explains_stop); ClearNextBranchBreakpoint(); return explains_stop; |