Commit b0011229 authored by hjk's avatar hjk

Debugger: Do not abort LldbEngine too eagerly

Not all untimely requests to run a command are harmful,
e.g. reloadModules() can be triggered by visibility
changes of the modules view at any time.

Change-Id: Ie803135ff7b954eef5800b3becdc6104a61b8cb2
Task-number: QTCREATORBUG-16393
Reviewed-by: Christian Stenger's avatarChristian Stenger <christian.stenger@qt.io>
parent 43193ea4
......@@ -114,7 +114,13 @@ void LldbEngine::executeDebuggerCommand(const QString &command, DebuggerLanguage
void LldbEngine::runCommand(const DebuggerCommand &cmd)
{
QTC_ASSERT(m_lldbProc.state() == QProcess::Running, notifyEngineIll());
if (m_lldbProc.state() != QProcess::Running) {
// This can legally happen e.g. through a reloadModule()
// triggered by changes in view visibility.
showMessage(_("NO LLDB PROCESS RUNNING, CMD IGNORED: %1 %2")
.arg(_(cmd.function)).arg(state()));
return;
}
const int tok = ++currentToken();
DebuggerCommand command = cmd;
command.arg("token", tok);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment