Debugger: Ensure termination of lldb.exe

LLDB 12.0.8, which is included in NDK 23.1, hesitates to termiate when
being told to. Calling QtcProcess::stop() and using CtrlCStub on Windows
helps with that.

Amends: 17ff9317cd

Fixes: QTCREATORBUG-27723
Change-Id: Ie9d4ed23a833019f445c1517983c90ae899fbf39
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
Alessandro Portale
2022-06-16 10:12:23 +02:00
parent 1e70973c32
commit f873ad1cf0

View File

@@ -189,16 +189,13 @@ void LldbEngine::shutdownInferior()
void LldbEngine::shutdownEngine()
{
QTC_ASSERT(state() == EngineShutdownRequested, qDebug() << state());
if (m_lldbProc.isRunning())
m_lldbProc.terminate();
else
notifyEngineShutdownFinished();
abortDebuggerProcess();
}
void LldbEngine::abortDebuggerProcess()
{
if (m_lldbProc.isRunning())
m_lldbProc.kill();
m_lldbProc.stop();
else
notifyEngineShutdownFinished();
}
@@ -799,7 +796,7 @@ void LldbEngine::handleLldbError(QProcess::ProcessError error)
case QProcess::Timedout:
default:
//setState(EngineShutdownRequested, true);
m_lldbProc.kill();
m_lldbProc.stop();
AsynchronousMessageBox::critical(tr("LLDB I/O Error"), errorMessage(error));
break;
}