summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepInstruction.cpp
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2015-02-06 22:25:21 +0000
committeremaste <emaste@FreeBSD.org>2015-02-06 22:25:21 +0000
commitfa0e7b41694bc598cd3df2405d0384ea29d7537e (patch)
tree5e5b6a0774e0d93bb4cfa2f9f83b9c41b38c4448 /contrib/llvm/tools/lldb/source/Target/ThreadPlanStepInstruction.cpp
parentd2b9c88b24f95cd9f8e7bd621cfa454ce759c687 (diff)
parent0c2019f4ca6b2dc6d710f6bb16a0e3ed10271531 (diff)
downloadFreeBSD-src-fa0e7b41694bc598cd3df2405d0384ea29d7537e.zip
FreeBSD-src-fa0e7b41694bc598cd3df2405d0384ea29d7537e.tar.gz
Update LLDB snapshot to upstream r225923 (git 2b588ecd)
Sponsored by: DARPA, AFRL
Diffstat (limited to 'contrib/llvm/tools/lldb/source/Target/ThreadPlanStepInstruction.cpp')
-rw-r--r--contrib/llvm/tools/lldb/source/Target/ThreadPlanStepInstruction.cpp29
1 files changed, 28 insertions, 1 deletions
diff --git a/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepInstruction.cpp b/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepInstruction.cpp
index fabf63b..0f6d7b7 100644
--- a/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepInstruction.cpp
+++ b/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepInstruction.cpp
@@ -150,7 +150,16 @@ ThreadPlanStepInstruction::ShouldStop (Event *event_ptr)
{
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
- StackID cur_frame_zero_id = m_thread.GetStackFrameAtIndex(0)->GetStackID();
+ StackFrameSP cur_frame_sp = m_thread.GetStackFrameAtIndex(0);
+ if (!cur_frame_sp)
+ {
+ if (log)
+ log->Printf ("ThreadPlanStepInstruction couldn't get the 0th frame, stopping.");
+ SetPlanComplete();
+ return true;
+ }
+
+ StackID cur_frame_zero_id = cur_frame_sp->GetStackID();
if (cur_frame_zero_id == m_stack_id || m_stack_id < cur_frame_zero_id)
{
@@ -180,6 +189,24 @@ ThreadPlanStepInstruction::ShouldStop (Event *event_ptr)
{
if (return_frame->GetStackID() != m_parent_frame_id || m_start_has_symbol)
{
+ // next-instruction shouldn't step out of inlined functions. But we may have stepped into a
+ // real function that starts with an inlined function, and we do want to step out of that...
+
+ if (cur_frame_sp->IsInlined())
+ {
+ StackFrameSP parent_frame_sp = m_thread.GetFrameWithStackID(m_stack_id);
+
+ if(parent_frame_sp && parent_frame_sp->GetConcreteFrameIndex() == cur_frame_sp->GetConcreteFrameIndex())
+ {
+ SetPlanComplete();
+ if (log)
+ {
+ log->Printf("Frame we stepped into is inlined into the frame we were stepping from, stopping.");
+ }
+ return true;
+ }
+ }
+
if (log)
{
StreamString s;
OpenPOWER on IntegriCloud