void ProcessWindows::OnCreateThread(const HostThread &new_thread) { llvm::sys::ScopedLock lock(m_mutex); const HostThreadWindows &wnew_thread = new_thread.GetNativeThread(); m_session_data->m_new_threads[wnew_thread.GetThreadId()] = new_thread; }
void ProcessWindows::OnExitThread(const HostThread &exited_thread) { llvm::sys::ScopedLock lock(m_mutex); // A thread may have started and exited before the debugger stopped allowing a refresh. // Just remove it from the new threads list in that case. const HostThreadWindows &wexited_thread = exited_thread.GetNativeThread(); auto iter = m_session_data->m_new_threads.find(wexited_thread.GetThreadId()); if (iter != m_session_data->m_new_threads.end()) m_session_data->m_new_threads.erase(iter); else m_session_data->m_exited_threads[wexited_thread.GetThreadId()] = exited_thread; }