Fix inline stepping test case on Linux because Thread::ThreadStoppedForAReason ignored virtual steps.
- add IsVirtualStep() virtual function to ThreadPlan, and implement it for
ThreadPlanStepInRange
- make GetPrivateStopReason query the current thread plan for a virtual stop to
decide if the current stop reason needs to be preserved
- remove extra check for an existing process in GetPrivateStopReason
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@181795 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Target/Thread.cpp b/source/Target/Thread.cpp
index c4aa254..9abf514 100644
--- a/source/Target/Thread.cpp
+++ b/source/Target/Thread.cpp
@@ -390,32 +390,23 @@
ProcessSP process_sp (GetProcess());
if (process_sp)
{
- ProcessSP process_sp (GetProcess());
- if (process_sp)
+ const uint32_t process_stop_id = process_sp->GetStopID();
+ if (m_stop_info_stop_id != process_stop_id)
{
- const uint32_t process_stop_id = process_sp->GetStopID();
- if (m_stop_info_stop_id != process_stop_id)
+ if (m_stop_info_sp)
{
- if (m_stop_info_sp)
- {
- if (m_stop_info_sp->IsValid())
- {
- SetStopInfo (m_stop_info_sp);
- }
- else
- {
- if (IsStillAtLastBreakpointHit())
- SetStopInfo(m_stop_info_sp);
- else
- m_stop_info_sp.reset();
- }
- }
-
- if (!m_stop_info_sp)
- {
- if (CalculateStopInfo() == false)
- SetStopInfo (StopInfoSP());
- }
+ if (m_stop_info_sp->IsValid()
+ || IsStillAtLastBreakpointHit()
+ || GetCurrentPlan()->IsVirtualStep())
+ SetStopInfo (m_stop_info_sp);
+ else
+ m_stop_info_sp.reset();
+ }
+
+ if (!m_stop_info_sp)
+ {
+ if (CalculateStopInfo() == false)
+ SetStopInfo (StopInfoSP());
}
}
}
@@ -693,6 +684,10 @@
return false;
}
+ // Based on the current thread plan and process stop info, check if this
+ // thread caused the process to stop. NOTE: this must take place before
+ // the plan is moved from the current plan stack to the completed plan
+ // stack.
if (ThreadStoppedForAReason() == false)
{
if (log)