[Lldb-commits] [lldb] r253092 - Change the null check to an assert.

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Fri Nov 13 13:53:03 PST 2015


Author: zturner
Date: Fri Nov 13 15:53:03 2015
New Revision: 253092

URL: http://llvm.org/viewvc/llvm-project?rev=253092&view=rev
Log:
Change the null check to an assert.

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

Modified: lldb/trunk/source/Target/ThreadList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadList.cpp?rev=253092&r1=253091&r2=253092&view=diff
==============================================================================
--- lldb/trunk/source/Target/ThreadList.cpp (original)
+++ lldb/trunk/source/Target/ThreadList.cpp Fri Nov 13 15:53:03 2015
@@ -18,6 +18,7 @@
 #include "lldb/Target/ThreadPlan.h"
 #include "lldb/Target/Process.h"
 #include "lldb/Utility/ConvertEnum.h"
+#include "lldb/Utility/LLDBAssert.h"
 
 using namespace lldb;
 using namespace lldb_private;
@@ -538,7 +539,8 @@ ThreadList::WillResume ()
     
     for (pos = m_threads.begin(); pos != end; ++pos)
     {
-        if ((*pos)->GetResumeState() != eStateSuspended && (*pos)->GetCurrentPlan() &&
+        lldbassert((*pos)->GetCurrentPlan() && "thread should not have null thread plan");
+        if ((*pos)->GetResumeState() != eStateSuspended &&
                  (*pos)->GetCurrentPlan()->StopOthers())
         {
             if ((*pos)->IsOperatingSystemPluginThread() && !(*pos)->GetBackingThread())




More information about the lldb-commits mailing list