Debugger: Unset previous Path environment variable

Newer gdb versions (11.1) on msys2 32bit environment pick up the
`Path` value and not the `PATH` value that we set.

By having one one value (`PATH`) we fix such issues.

Fixes: QTCREATORBUG-26670
Change-Id: I3fb9da75c2a037eb43a69f6f82474c7ec4972b75
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Cristian Adam
2021-12-10 14:24:06 +01:00
parent bbd4352188
commit 352e66531e

View File

@@ -4062,6 +4062,8 @@ void GdbEngine::setEnvironmentVariables()
|| item.operation == EnvironmentItem::SetDisabled) { || item.operation == EnvironmentItem::SetDisabled) {
runCommand({"unset environment " + name}); runCommand({"unset environment " + name});
} else { } else {
if (name != item.name)
runCommand({"unset environment " + item.name});
runCommand({"-gdb-set environment " + name + '=' + item.value}); runCommand({"-gdb-set environment " + name + '=' + item.value});
} }
} }