[Lldb-commits] [lldb] r124938 - in /lldb/branches/apple/calcite/lldb/tools/debugserver/source/MacOSX: MachThread.cpp MachThreadList.cpp
Greg Clayton
gclayton at apple.com
Fri Feb 4 21:47:28 PST 2011
Author: gclayton
Date: Fri Feb 4 23:47:28 2011
New Revision: 124938
URL: http://llvm.org/viewvc/llvm-project?rev=124938&view=rev
Log:
Revert previous hail mary and now only add thread to new threads list if
the thread is user ready.
Modified:
lldb/branches/apple/calcite/lldb/tools/debugserver/source/MacOSX/MachThread.cpp
lldb/branches/apple/calcite/lldb/tools/debugserver/source/MacOSX/MachThreadList.cpp
Modified: lldb/branches/apple/calcite/lldb/tools/debugserver/source/MacOSX/MachThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/calcite/lldb/tools/debugserver/source/MacOSX/MachThread.cpp?rev=124938&r1=124937&r2=124938&view=diff
==============================================================================
--- lldb/branches/apple/calcite/lldb/tools/debugserver/source/MacOSX/MachThread.cpp (original)
+++ lldb/branches/apple/calcite/lldb/tools/debugserver/source/MacOSX/MachThread.cpp Fri Feb 4 23:47:28 2011
@@ -193,22 +193,22 @@
bool
MachThread::IsUserReady()
{
-// if (m_basicInfo.run_state == 0)
-// GetBasicInfo ();
-//
-// switch (m_basicInfo.run_state)
-// {
-// default:
-// case TH_STATE_UNINTERRUPTIBLE:
-// break;
-//
-// case TH_STATE_RUNNING:
-// case TH_STATE_STOPPED:
-// case TH_STATE_WAITING:
-// case TH_STATE_HALTED:
+ if (m_basicInfo.run_state == 0)
+ GetBasicInfo ();
+
+ switch (m_basicInfo.run_state)
+ {
+ default:
+ case TH_STATE_UNINTERRUPTIBLE:
+ break;
+
+ case TH_STATE_RUNNING:
+ case TH_STATE_STOPPED:
+ case TH_STATE_WAITING:
+ case TH_STATE_HALTED:
return true;
-// }
-// return false;
+ }
+ return false;
}
struct thread_basic_info *
Modified: lldb/branches/apple/calcite/lldb/tools/debugserver/source/MacOSX/MachThreadList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/calcite/lldb/tools/debugserver/source/MacOSX/MachThreadList.cpp?rev=124938&r1=124937&r2=124938&view=diff
==============================================================================
--- lldb/branches/apple/calcite/lldb/tools/debugserver/source/MacOSX/MachThreadList.cpp (original)
+++ lldb/branches/apple/calcite/lldb/tools/debugserver/source/MacOSX/MachThreadList.cpp Fri Feb 4 23:47:28 2011
@@ -252,13 +252,15 @@
thread_sp.reset(new MachThread(process, tid));
// Add the new thread regardless of its is user ready state...
- if (new_threads)
- new_threads->push_back(thread_sp);
-
// Make sure the thread is ready to be displayed and shown to users
// before we add this thread to our list...
if (thread_sp->IsUserReady())
+ {
+ if (new_threads)
+ new_threads->push_back(thread_sp);
+
currThreads.push_back(thread_sp);
+ }
}
}
More information about the lldb-commits
mailing list