aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCristian Adam <cristian.adam@qt.io>2021-12-10 14:24:06 +0100
committerCristian Adam <cristian.adam@qt.io>2021-12-13 10:53:54 +0000
commit352e66531e366868e445a15319c64750b9bd4720 (patch)
tree73c5e2b8709563e259f3e7131cad5431c83db5f7
parentbbd435218868744f0942dbcd72c1234bf3d2a037 (diff)
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>
-rw-r--r--src/plugins/debugger/gdb/gdbengine.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp
index 5e9d337bbd..b36bf6891e 100644
--- a/src/plugins/debugger/gdb/gdbengine.cpp
+++ b/src/plugins/debugger/gdb/gdbengine.cpp
@@ -4062,6 +4062,8 @@ void GdbEngine::setEnvironmentVariables()
|| item.operation == EnvironmentItem::SetDisabled) {
runCommand({"unset environment " + name});
} else {
+ if (name != item.name)
+ runCommand({"unset environment " + item.name});
runCommand({"-gdb-set environment " + name + '=' + item.value});
}
}