[Lldb-commits] [lldb] r175761 - <rdar://problem/13259230>
Han Ming Ong
hanming at apple.com
Thu Feb 21 08:31:31 PST 2013
Author: hanming
Date: Thu Feb 21 10:31:31 2013
New Revision: 175761
URL: http://llvm.org/viewvc/llvm-project?rev=175761&view=rev
Log:
<rdar://problem/13259230>
Remember to set m_profile_thread to NULL once the profile thread is turned off.
Modified:
lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.cpp
Modified: lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.cpp?rev=175761&r1=175760&r2=175761&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.cpp (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.cpp Thu Feb 21 10:31:31 2013
@@ -313,10 +313,15 @@ MachProcess::SetEnableAsyncProfiling(boo
m_profile_enabled = enable;
m_profile_interval_usec = interval_usec;
- if (m_profile_enabled && (m_profile_thread == 0))
+ if (m_profile_enabled && (m_profile_thread == NULL))
{
StartProfileThread();
}
+ else if (!m_profile_enabled && m_profile_thread)
+ {
+ pthread_join(m_profile_thread, NULL);
+ m_profile_thread = NULL;
+ }
}
bool
More information about the lldb-commits
mailing list