Handle stepping through ObjC vtable trampoline code.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118270 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Target/ThreadPlanStepOverRange.cpp b/source/Target/ThreadPlanStepOverRange.cpp
index 83e9c23..731232c 100644
--- a/source/Target/ThreadPlanStepOverRange.cpp
+++ b/source/Target/ThreadPlanStepOverRange.cpp
@@ -88,7 +88,19 @@
ThreadPlan* new_plan = NULL;
if (FrameIsOlder())
- return true;
+ {
+ // If we're in an older frame then we should stop.
+ //
+ // A caveat to this is if we think the frame is older but we're actually in a trampoline.
+ // I'm going to make the assumption that you wouldn't RETURN to a trampoline. So if we are
+ // in a trampoline we think the frame is older because the trampoline confused the backtracer.
+ // As below, we step through first, and then try to figure out how to get back out again.
+
+ new_plan = m_thread.QueueThreadPlanForStepThrough (false, stop_others);
+
+ if (new_plan != NULL && log)
+ log->Printf("Thought I stepped out, but in fact arrived at a trampoline.");
+ }
else if (FrameIsYounger())
{
new_plan = m_thread.QueueThreadPlanForStepOut (false, NULL, true, stop_others, lldb::eVoteNo, lldb::eVoteNoOpinion);