diff options
author | Jim Ingham <jingham@apple.com> | 2012-03-09 04:10:47 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2012-03-09 04:10:47 +0000 |
commit | 564d8bc255ac3b47be4a3f595d767dc205026736 (patch) | |
tree | c9f2642e40aa39bc9be1b955ca8c9a51e470aa7c /lldb/source/Target/ThreadPlanStepOverRange.cpp | |
parent | ef4290281647150fdfb4ab531f0bc3622e50e218 (diff) | |
download | bcm5719-llvm-564d8bc255ac3b47be4a3f595d767dc205026736.tar.gz bcm5719-llvm-564d8bc255ac3b47be4a3f595d767dc205026736.zip |
First stage of implementing step by "run to next branch". Doesn't work yet, is turned off.
<rdar://problem/10975912>
llvm-svn: 152376
Diffstat (limited to 'lldb/source/Target/ThreadPlanStepOverRange.cpp')
-rw-r--r-- | lldb/source/Target/ThreadPlanStepOverRange.cpp | 55 |
1 files changed, 20 insertions, 35 deletions
diff --git a/lldb/source/Target/ThreadPlanStepOverRange.cpp b/lldb/source/Target/ThreadPlanStepOverRange.cpp index 8b4907f863f..54fe8ea62a8 100644 --- a/lldb/source/Target/ThreadPlanStepOverRange.cpp +++ b/lldb/source/Target/ThreadPlanStepOverRange.cpp @@ -63,31 +63,6 @@ ThreadPlanStepOverRange::GetDescription (Stream *s, lldb::DescriptionLevel level } bool -ThreadPlanStepOverRange::PlanExplainsStop () -{ - // We don't explain signals or breakpoints (breakpoints that handle stepping in or - // out will be handled by a child plan. - StopInfoSP stop_info_sp = GetPrivateStopReason(); - if (stop_info_sp) - { - StopReason reason = stop_info_sp->GetStopReason(); - - switch (reason) - { - case eStopReasonBreakpoint: - case eStopReasonWatchpoint: - case eStopReasonSignal: - case eStopReasonException: - return false; - default: - return true; - } - } - return true; -} - - -bool ThreadPlanStepOverRange::ShouldStop (Event *event_ptr) { LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP)); @@ -100,10 +75,6 @@ ThreadPlanStepOverRange::ShouldStop (Event *event_ptr) log->Printf("ThreadPlanStepOverRange reached %s.", s.GetData()); } - // If we're still in the range, keep going. - if (InRange()) - return false; - // If we're out of the range but in the same frame or in our caller's frame // then we should stop. // When stepping out we only step if we are forcing running one thread. @@ -158,15 +129,29 @@ ThreadPlanStepOverRange::ShouldStop (Event *event_ptr) } } } - else if (!InSymbol()) + else { - // This one is a little tricky. Sometimes we may be in a stub or something similar, - // in which case we need to get out of there. But if we are in a stub then it's - // likely going to be hard to get out from here. It is probably easiest to step into the - // stub, and then it will be straight-forward to step out. - new_plan = m_thread.QueueThreadPlanForStepThrough (false, stop_others); + // If we're still in the range, keep going. + if (InRange()) + { + SetNextBranchBreakpoint(); + return false; + } + + + if (!InSymbol()) + { + // This one is a little tricky. Sometimes we may be in a stub or something similar, + // in which case we need to get out of there. But if we are in a stub then it's + // likely going to be hard to get out from here. It is probably easiest to step into the + // stub, and then it will be straight-forward to step out. + new_plan = m_thread.QueueThreadPlanForStepThrough (false, stop_others); + } } + // If we get to this point, we're not going to use a previously set "next branch" breakpoint, so delete it: + ClearNextBranchBreakpoint(); + if (new_plan == NULL) m_no_more_plans = true; else |