[Lldb-commits] [PATCH] Fix =thread-exited message (MI)

Ilia K ki.stfu at gmail.com
Wed Mar 25 05:47:09 PDT 2015

Comment at: tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp:1677
@@ -1693,3 +1676,3 @@
             // Form MI "=thread-exited,id=\"%ld\",group-id=\"i1\""
-            const CMIUtilString strValue(CMIUtilString::Format("%ld", thread.GetIndexID()));
+            const CMIUtilString strValue(CMIUtilString::Format("%ld", threadIndexID));
             const CMICmnMIValueConst miValueConst(strValue);
abidh wrote:
> Just a question. It was printing invalid thread id because thread.GetIndexID() was returning a garbage value?
It's not quite correct. SBThread::IsValid() means that SBThread.m_opaque_ptr isn't null. Therefore when it's invalid the m_opaque_ptr is null and in this case the SBThread::GetIndexID() returns LLDB_INVALID_THREAD_ID constant (I don't remember the name of this constant exactly).



More information about the lldb-commits mailing list