[Lldb-commits] [lldb] r182893 - <rdar://problem/13956179>

Greg Clayton gclayton at apple.com
Wed May 29 16:31:15 PDT 2013


Author: gclayton
Date: Wed May 29 18:31:14 2013
New Revision: 182893

URL: http://llvm.org/viewvc/llvm-project?rev=182893&view=rev
Log:
<rdar://problem/13956179>

Cleaned up the thread updating code in the OperatingSystemPython class. It doesn't need to clear the "new_thread_list" anymore as it is always empty. 

It also now assigns the "core_thread_list" to "new_thread_list" if no threads are detected through python.


Modified:
    lldb/trunk/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp

Modified: lldb/trunk/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp?rev=182893&r1=182892&r2=182893&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp (original)
+++ lldb/trunk/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp Wed May 29 18:31:14 2013
@@ -207,21 +207,6 @@ OperatingSystemPython::UpdateThreadList
                 PythonDictionary thread_dict(threads_list.GetItemAtIndex(i));
                 if (thread_dict)
                 {
-                    if (thread_dict.GetItemForKey("core"))
-                    {
-                        // We have some threads that are saying they are on a "core", which means
-                        // they map the threads that are gotten from the lldb_private::Process subclass
-                        // so clear the new threads list so the core threads don't show up
-                        new_thread_list.Clear();
-                        break;
-                    }
-                }
-            }
-            for (i=0; i<num_threads; ++i)
-            {
-                PythonDictionary thread_dict(threads_list.GetItemAtIndex(i));
-                if (thread_dict)
-                {
                     ThreadSP thread_sp (CreateThreadFromThreadInfo (thread_dict, core_thread_list, old_thread_list, NULL));
                     if (thread_sp)
                         new_thread_list.AddThread(thread_sp);
@@ -230,8 +215,10 @@ OperatingSystemPython::UpdateThreadList
         }
     }
     
+    // No new threads added from the thread info array gotten from python, just
+    // display the core threads.
     if (new_thread_list.GetSize(false) == 0)
-        new_thread_list = old_thread_list;
+        new_thread_list = core_thread_list;
 
     return new_thread_list.GetSize(false) > 0;
 }





More information about the lldb-commits mailing list