diff options
Diffstat (limited to 'lldb/tools/lldb-mi/MIDriver.cpp')
| -rw-r--r-- | lldb/tools/lldb-mi/MIDriver.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lldb/tools/lldb-mi/MIDriver.cpp b/lldb/tools/lldb-mi/MIDriver.cpp index c24f193e894..7d1d9e45b6d 100644 --- a/lldb/tools/lldb-mi/MIDriver.cpp +++ b/lldb/tools/lldb-mi/MIDriver.cpp @@ -536,12 +536,8 @@ CMIDriver::DoMainLoop(void) CMIUtilString lineText(pCmd); if (!lineText.empty ()) { - if (lineText == "quit") - { - // We want to be exiting when receiving a quit command - m_bExitApp = true; - break; - } + // Check that the handler thread is alive (otherwise we stuck here) + assert(CMICmnLLDBDebugger::Instance().ThreadIsActive()); { // Lock Mutex before processing commands so that we don't disturb an event @@ -549,9 +545,13 @@ CMIDriver::DoMainLoop(void) CMIUtilThreadLock lock(CMICmnLLDBDebugSessionInfo::Instance().GetSessionMutex()); bOk = InterpretCommand(lineText); } + // Draw prompt if desired if (bOk && m_rStdin.GetEnablePrompt()) bOk = m_rStdOut.WriteMIResponse(m_rStdin.GetPrompt()); + + // Wait while the handler thread handles incoming events + CMICmnLLDBDebugger::Instance().WaitForHandleEvent(); } } } |

