aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Target/ThreadPlanStepOverRange.cpp
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2011-12-03 01:52:59 +0000
committerJim Ingham <jingham@apple.com>2011-12-03 01:52:59 +0000
commit25f66700038aecf35396c15ee6bdedc98ea04e8f (patch)
treeaea2acb33a41048b50f3b4cf2c6d85a4cb7acdb3 /lldb/source/Target/ThreadPlanStepOverRange.cpp
parent26c5df4733b7c83f5ca6a4ab11fb4a36c371fe26 (diff)
downloadllvm-25f66700038aecf35396c15ee6bdedc98ea04e8f.zip
llvm-25f66700038aecf35396c15ee6bdedc98ea04e8f.tar.gz
llvm-25f66700038aecf35396c15ee6bdedc98ea04e8f.tar.bz2
Make the ThreadPlanStepThrough set a backstop breakpoint on the return address from
the function it is being asked to step through, so that even if we get the trampoline target wrong (for instance) we will still not lose control. The other fix here is to tighten up the handling of the case where the current plan doesn't explain the stop, but a plan above us does. In that case, if the plan that does explain the stop says it is done, we need to clean up the plans below it and continue on with our processing. llvm-svn: 145740
Diffstat (limited to 'lldb/source/Target/ThreadPlanStepOverRange.cpp')
-rw-r--r--lldb/source/Target/ThreadPlanStepOverRange.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/lldb/source/Target/ThreadPlanStepOverRange.cpp b/lldb/source/Target/ThreadPlanStepOverRange.cpp
index 57ea97b..0df0156 100644
--- a/lldb/source/Target/ThreadPlanStepOverRange.cpp
+++ b/lldb/source/Target/ThreadPlanStepOverRange.cpp
@@ -63,6 +63,31 @@ 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));