diff options
author | Ed Maste <emaste@FreeBSD.org> | 2015-02-09 01:44:09 +0000 |
---|---|---|
committer | Ed Maste <emaste@FreeBSD.org> | 2015-02-09 01:44:09 +0000 |
commit | 12bd4897ff0678fa663e09d78ebc22dd255ceb86 (patch) | |
tree | a8f4b3abea3e6937e60728991c736e6e3d322fc1 /tools/lldb-mi/MIDriver.cpp | |
parent | 205afe679855a4ce8149cdaa94d3f0868ce796dc (diff) |
Notes
Diffstat (limited to 'tools/lldb-mi/MIDriver.cpp')
-rw-r--r-- | tools/lldb-mi/MIDriver.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tools/lldb-mi/MIDriver.cpp b/tools/lldb-mi/MIDriver.cpp index accde1c7cde7..5628e344952b 100644 --- a/tools/lldb-mi/MIDriver.cpp +++ b/tools/lldb-mi/MIDriver.cpp @@ -22,7 +22,7 @@ // Third party headers: #include <stdarg.h> // va_list, va_start, var_end #include <iostream> -#include <lldb/API/SBError.h> +#include "lldb/API/SBError.h" // In-house headers: #include "Driver.h" @@ -41,6 +41,7 @@ #include "MICmdArgValFile.h" #include "MICmdArgValString.h" #include "MICmnConfig.h" +#include "MICmnLLDBDebugSessionInfo.h" // Instantiations: #if _DEBUG @@ -687,7 +688,13 @@ CMIDriver::ReadStdinLineQueue(void) } // Process the command - const bool bOk = InterpretCommand(lineText); + bool bOk = false; + { + // Lock Mutex before processing commands so that we don't disturb an event + // that is being processed. + CMIUtilThreadLock lock(CMICmnLLDBDebugSessionInfo::Instance().GetSessionMutex()); + bOk = InterpretCommand(lineText); + } // Draw prompt if desired if (bOk && m_rStdin.GetEnablePrompt()) |