forked from qt-creator/qt-creator
Debugger: Start separating different process environments
Debugger and stub run locally, the debugged process not necessarily. Change-Id: Ibf6aec3dcaec60069866ec0765ec2178ca0a26d6 Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
@@ -424,8 +424,8 @@ bool CdbEngine::startConsole(const DebuggerRunParameters &sp, QString *errorMess
|
||||
connect(m_consoleStub.data(), &ConsoleProcess::stubStopped,
|
||||
this, &CdbEngine::consoleStubExited);
|
||||
m_consoleStub->setWorkingDirectory(sp.workingDirectory);
|
||||
if (sp.environment.size())
|
||||
m_consoleStub->setEnvironment(sp.environment);
|
||||
if (sp.stubEnvironment.size())
|
||||
m_consoleStub->setEnvironment(sp.stubEnvironment);
|
||||
if (!m_consoleStub->start(sp.executable, sp.processArgs)) {
|
||||
*errorMessage = tr("The console process \"%1\" could not be started.").arg(sp.executable);
|
||||
return false;
|
||||
@@ -620,10 +620,10 @@ bool CdbEngine::launchCDB(const DebuggerRunParameters &sp, QString *errorMessage
|
||||
|
||||
m_outputBuffer.clear();
|
||||
m_autoBreakPointCorrection = false;
|
||||
const QStringList environment = sp.environment.size() == 0 ?
|
||||
const QStringList inferiorEnvironment = sp.inferiorEnvironment.size() == 0 ?
|
||||
QProcessEnvironment::systemEnvironment().toStringList() :
|
||||
sp.environment.toStringList();
|
||||
m_process.setEnvironment(mergeEnvironment(environment, extensionFi.absolutePath()));
|
||||
sp.inferiorEnvironment.toStringList();
|
||||
m_process.setEnvironment(mergeEnvironment(inferiorEnvironment, extensionFi.absolutePath()));
|
||||
if (!sp.workingDirectory.isEmpty())
|
||||
m_process.setWorkingDirectory(sp.workingDirectory);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user