Commit b2489532 authored by David Schulz's avatar David Schulz

Debugger: Fix attaching to running process with cdb

Do not add inferior command line arguments to the cdb process if we are
attaching to an already running process.

Task-number: QTCREATORBUG-19034
Change-Id: I7b9a98b790e819fc76ff4ec75769785741bfde83
Reviewed-by: default avatarhjk <hjk@qt.io>
Reviewed-by: Christian Stenger's avatarChristian Stenger <christian.stenger@qt.io>
parent eb5b45aa
......@@ -476,6 +476,11 @@ void CdbEngine::setupEngine()
nativeArguments.push_back(blank);
QtcProcess::addArgs(&nativeArguments,
QStringList(QDir::toNativeSeparators(sp.inferior.executable)));
if (!sp.inferior.commandLineArguments.isEmpty()) { // Complete native argument string.
if (!nativeArguments.isEmpty())
nativeArguments.push_back(blank);
nativeArguments += sp.inferior.commandLineArguments;
}
break;
case AttachToRemoteServer:
break;
......@@ -496,11 +501,6 @@ void CdbEngine::setupEngine()
handleSetupFailure(QString("Internal error: Unsupported start mode %1.").arg(sp.startMode));
return;
}
if (!sp.inferior.commandLineArguments.isEmpty()) { // Complete native argument string.
if (!nativeArguments.isEmpty())
nativeArguments.push_back(blank);
nativeArguments += sp.inferior.commandLineArguments;
}
const QString msg = QString("Launching %1 %2\nusing %3 of %4.").
arg(QDir::toNativeSeparators(executable),
......
Markdown is supported
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