Took the timeout for a ClangUserExpression down from a 10 second timeout to
500 ms.

Make MachThreadList more threadsafe.

Added code to make sure the thread register state was properly flushed for x86_64.

Fixed an missing return code for the current thread in the new thread suffix code.

Improved debugserver logging.

llvm-svn: 123815
diff --git a/lldb/tools/debugserver/source/MacOSX/MachProcess.cpp b/lldb/tools/debugserver/source/MacOSX/MachProcess.cpp
index 0529816..aa3465b 100644
--- a/lldb/tools/debugserver/source/MacOSX/MachProcess.cpp
+++ b/lldb/tools/debugserver/source/MacOSX/MachProcess.cpp
@@ -170,12 +170,6 @@
     return m_thread_list.ThreadIDAtIndex(thread_idx);
 }
 
-uint32_t
-MachProcess::GetThreadIndexFromThreadID (nub_thread_t tid)
-{
-    return m_thread_list.GetThreadIndexByID(tid);
-}
-
 nub_thread_t
 MachProcess::GetCurrentThread ()
 {
@@ -207,12 +201,12 @@
 }
 
 const DNBRegisterSetInfo *
-MachProcess::GetRegisterSetInfo(nub_thread_t tid, nub_size_t *num_reg_sets ) const
+MachProcess::GetRegisterSetInfo (nub_thread_t tid, nub_size_t *num_reg_sets) const
 {
-    MachThread *thread = m_thread_list.GetThreadByID (tid);
-    if (thread)
+    MachThreadSP thread_sp (m_thread_list.GetThreadByID (tid));
+    if (thread_sp)
     {
-        DNBArchProtocol *arch = thread->GetArchProtocol();
+        DNBArchProtocol *arch = thread_sp->GetArchProtocol();
         if (arch)
             return arch->GetRegisterSetInfo (num_reg_sets);
     }