Commit e632c9fc authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

Debugger/MinGW: Set environment correctly.

Extend the environment instead of clobbering
it with the Python setup.
Reviewed-by: dt
parent d86f7dcd
......@@ -4041,13 +4041,14 @@ bool GdbEngine::startGdb(const QStringList &args, const QString &gdb, const QStr
gdbArgs += args;
#ifdef Q_OS_WIN
// Set python path. By convention, python is located below gdb executable.
// Extend the environment set on the process in startAdapter().
const QFileInfo fi(location);
bool foundPython = false;
if (fi.isAbsolute()) {
const QString winPythonVersion = QLatin1String(winPythonVersionC);
const QDir dir = fi.absoluteDir();
if (dir.exists(winPythonVersion)) {
QProcessEnvironment environment = QProcessEnvironment::systemEnvironment();
QProcessEnvironment environment = m_gdbProc.processEnvironment();
const QString pythonPathVariable = QLatin1String("PYTHONPATH");
// Check for existing values.
if (environment.contains(pythonPathVariable)) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment