Debugger: Add separator between cdb extension paths

According to
https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/
general-environment-variables
extension paths have to be separated by a semicolon.
Skipping the separator results in not being able to
debug with cdb since the debugger cannot find the
Qt Creator cdbextension in the now invalid extension path.

Change-Id: Ic1c478dbb94f4e774e6742a3800dbcf6452898d5
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
David Schulz
2020-03-19 15:15:01 +01:00
parent e9f54804e1
commit b17de35ef4

View File

@@ -441,11 +441,12 @@ void CdbEngine::setupEngine()
inferiorEnvironment.set(qtLoggingToConsoleKey, "0");
static const char cdbExtensionPathVariableC[] = "_NT_DEBUGGER_EXTENSION_PATH";
inferiorEnvironment.prependOrSet(cdbExtensionPathVariableC, extensionFi.absolutePath());
inferiorEnvironment.prependOrSet(cdbExtensionPathVariableC, extensionFi.absolutePath(), {";"});
const QByteArray oldCdbExtensionPath = qgetenv(cdbExtensionPathVariableC);
if (!oldCdbExtensionPath.isEmpty()) {
inferiorEnvironment.appendOrSet(cdbExtensionPathVariableC,
QString::fromLocal8Bit(oldCdbExtensionPath));
QString::fromLocal8Bit(oldCdbExtensionPath),
{";"});
}
m_process.setEnvironment(inferiorEnvironment);