<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.

llvm-svn: 182893
This commit is contained in:
Greg Clayton
2013-05-29 23:31:14 +00:00
parent 086e085efa
commit 83793fc188

View File

@@ -202,21 +202,6 @@ OperatingSystemPython::UpdateThreadList (ThreadList &old_thread_list,
const uint32_t num_threads = threads_list.GetSize();
if (num_threads > 0)
{
for (i=0; i<num_threads; ++i)
{
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));
@@ -230,8 +215,10 @@ OperatingSystemPython::UpdateThreadList (ThreadList &old_thread_list,
}
}
// 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;
}