forked from qt-creator/qt-creator
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 <christian.stenger@qt.io>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user