summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2015-03-11 09:53:42 +0000
committerPavel Labath <labath@google.com>2015-03-11 09:53:42 +0000
commita55a953a29ebfc3f960531c2bcea3400d4cce4fe (patch)
tree2e8818cc9647c531335e99bab2147f071596cdad /lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
parente5bdc8516eb7ffb6d637a098d957f27b8f61805c (diff)
downloadbcm5719-llvm-a55a953a29ebfc3f960531c2bcea3400d4cce4fe.tar.gz
bcm5719-llvm-a55a953a29ebfc3f960531c2bcea3400d4cce4fe.zip
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
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index e88e29bed68..30caf92a335 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -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;
}
OpenPOWER on IntegriCloud