From 927bfa3fd9416f9059a352ff7f1b5725c390f1d0 Mon Sep 17 00:00:00 2001 From: Jim Ingham Date: Mon, 10 Sep 2012 23:42:44 +0000 Subject: Shortcut ThreadPlanStepRange::MischiefManaged - if we have pushed new plans and they are not done, then we aren't done either. llvm-svn: 163572 --- lldb/source/Target/ThreadPlanStepRange.cpp | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) (limited to 'lldb/source/Target/ThreadPlanStepRange.cpp') diff --git a/lldb/source/Target/ThreadPlanStepRange.cpp b/lldb/source/Target/ThreadPlanStepRange.cpp index 14ed8b66075..73db0440087 100644 --- a/lldb/source/Target/ThreadPlanStepRange.cpp +++ b/lldb/source/Target/ThreadPlanStepRange.cpp @@ -146,9 +146,12 @@ ThreadPlanStepRange::InRange () if (log) { StreamString s; - m_addr_context.line_entry.range.Dump (&s, - m_thread.CalculateTarget().get(), - Address::DumpStyleLoadAddress); + m_addr_context.line_entry.Dump (&s, + m_thread.CalculateTarget().get(), + true, + Address::DumpStyleLoadAddress, + Address::DumpStyleLoadAddress, + true); log->Printf ("Step range plan stepped to another range of same line: %s", s.GetData()); } @@ -167,9 +170,12 @@ ThreadPlanStepRange::InRange () if (log) { StreamString s; - m_addr_context.line_entry.range.Dump (&s, - m_thread.CalculateTarget().get(), - Address::DumpStyleLoadAddress); + m_addr_context.line_entry.Dump (&s, + m_thread.CalculateTarget().get(), + true, + Address::DumpStyleLoadAddress, + Address::DumpStyleLoadAddress, + true); log->Printf ("Step range plan stepped to the middle of new line(%d): %s, continuing to clear this line.", new_context.line_entry.line, @@ -367,6 +373,14 @@ ThreadPlanStepRange::GetPlanRunState () bool ThreadPlanStepRange::MischiefManaged () { + // If we have pushed some plans between ShouldStop & MischiefManaged, then we're not done... + // I do this check first because we might have stepped somewhere that will fool InRange into + // thinking it needs to step past the end of that line. This happens, for instance, when stepping + // over inlined code that is in the middle of the current line. + + if (!m_no_more_plans) + return false; + bool done = true; if (!IsPlanComplete()) { -- cgit v1.2.3