Debugger: Prevent calling windows lldb on startup

The LLVM package on windows contains an LLDB linked against python but
misses a python library. Calling this lldb to get the version number
results in an ugly error message that python36.dll cannot be found. Use
the file version info instead.

Fixes: QTCREATORBUG-23848
Change-Id: I6d8e6cac07b427de564eaaedf7de369391aed37e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2020-11-23 14:05:16 +01:00
parent 3e00fd1ed0
commit 5cd057d9fe

View File

@@ -171,6 +171,18 @@ void DebuggerItem::reinitializeFromFile()
return;
}
// Prevent calling lldb on Windows because the lldb from the llvm package is linked against
// python but does not contain a python dll.
if (HostOsInfo::isWindowsHost() && m_command.fileName().startsWith("lldb")) {
QString errorMessage;
m_version = winGetDLLVersion(WinDLLFileVersion,
fileInfo.absoluteFilePath(),
&errorMessage);
m_engineType = LldbEngineType;
m_abis = Abi::abisOfBinary(m_command);
return;
}
SynchronousProcess proc;
SynchronousProcessResponse response = proc.runBlocking({m_command, {version}});
if (response.result != SynchronousProcessResponse::Finished) {