mirror of
https://github.com/intel/llvm.git
synced 2026-01-20 01:58:44 +08:00
Fix bug in ProcessGDBRemote
Summary: ProcessGDBRemote::AsyncThread nuked its own thread handle upon exiting. This prevented the main thread from joining it correctly in StopAsyncThread. I address this by moving the Reset() call to StopAsyncThread, after the join. Reviewers: clayborg, zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8218 llvm-svn: 231915
This commit is contained in:
@@ -3025,6 +3025,7 @@ ProcessGDBRemote::StopAsyncThread ()
|
||||
|
||||
// Stop the stdio thread
|
||||
m_async_thread.Join(nullptr);
|
||||
m_async_thread.Reset();
|
||||
}
|
||||
else if (log)
|
||||
log->Printf("ProcessGDBRemote::%s () - Called when Async thread was not running.", __FUNCTION__);
|
||||
@@ -3169,7 +3170,6 @@ ProcessGDBRemote::AsyncThread (void *arg)
|
||||
if (log)
|
||||
log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %" PRIu64 ") thread exiting...", __FUNCTION__, arg, process->GetID());
|
||||
|
||||
process->m_async_thread.Reset();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user