[Lldb-commits] [lldb] r349865 - Add an assertion to aid in tracking down a bug

Adrian Prantl via lldb-commits lldb-commits at lists.llvm.org
Thu Dec 20 17:09:15 PST 2018


Author: adrian
Date: Thu Dec 20 17:09:15 2018
New Revision: 349865

URL: http://llvm.org/viewvc/llvm-project?rev=349865&view=rev
Log:
Add an assertion to aid in tracking down a bug

Modified:
    lldb/trunk/source/Target/Thread.cpp

Modified: lldb/trunk/source/Target/Thread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Thread.cpp?rev=349865&r1=349864&r2=349865&view=diff
==============================================================================
--- lldb/trunk/source/Target/Thread.cpp (original)
+++ lldb/trunk/source/Target/Thread.cpp Thu Dec 20 17:09:15 2018
@@ -1038,9 +1038,11 @@ void Thread::PushPlan(ThreadPlanSP &thre
   if (thread_plan_sp) {
     // If the thread plan doesn't already have a tracer, give it its parent's
     // tracer:
-    if (!thread_plan_sp->GetThreadPlanTracer())
+    if (!thread_plan_sp->GetThreadPlanTracer()) {
+      assert(!m_plan_stack.empty());
       thread_plan_sp->SetThreadPlanTracer(
           m_plan_stack.back()->GetThreadPlanTracer());
+    }
     m_plan_stack.push_back(thread_plan_sp);
 
     thread_plan_sp->DidPush();




More information about the lldb-commits mailing list