diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp index e55328b93e77..c5fc4affe32c 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp @@ -264,7 +264,11 @@ GDBRemoteCommunication::GetAck () bool GDBRemoteCommunication::GetSequenceMutex (Mutex::Locker& locker) { - return locker.TryLock (m_sequence_mutex); + if (IsRunning()) + return locker.TryLock (m_sequence_mutex); + + locker.Lock (m_sequence_mutex); + return true; }