summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2015-09-03 09:36:22 +0000
committerPavel Labath <labath@google.com>2015-09-03 09:36:22 +0000
commit5055685cda022119052d86cb468cf2b7f4d19a13 (patch)
tree28e4b0856c1d2a8e1527bef4233a33b76db02a8e /lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
parentee0286201cb2d5a1462d521d3dc83261209e76b4 (diff)
downloadbcm5719-llvm-5055685cda022119052d86cb468cf2b7f4d19a13.tar.gz
bcm5719-llvm-5055685cda022119052d86cb468cf2b7f4d19a13.zip
Fix deadlock while attaching to inferiors
Summary: There was a race condition in the AsyncThread, where we would end up sending a vAttach notification to the thread before it got a chance set up its listener (this can be reproduced by adding a sleep() at the very beginning of ProcessGDBRemote::AsyncThread()). This event would then get lost and we LLDB would deadlock. I fix this by setting up the listener early on, in the ProcessGDBRemote constructor. This should improve the stability of all attach tests. For now, I am removing XTIMEOUT from TestAttachResume, and will watch the buildbots for signs of trouble. Reviewers: clayborg, ovyalov Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12552 llvm-svn: 246756
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
index 0048004ecd2..c3b201bddeb 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
@@ -358,6 +358,7 @@ protected:
Mutex m_last_stop_packet_mutex;
GDBRemoteDynamicRegisterInfo m_register_info;
Broadcaster m_async_broadcaster;
+ Listener m_async_listener;
HostThread m_async_thread;
Mutex m_async_thread_state_mutex;
typedef std::vector<lldb::tid_t> tid_collection;
OpenPOWER on IntegriCloud