Debugger: Use Utils::ProcessHandle for DebuggerEngine::m_inferiorPid

That's the intended "typesafe" use.

Change-Id: Ib288fe87a47bd9484bda83e05406f0d22989b3c2
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
hjk
2017-02-27 13:30:08 +01:00
parent 96f615b477
commit 32ae4d3e09
10 changed files with 44 additions and 45 deletions

View File

@@ -428,10 +428,10 @@ void CdbEngine::consoleStubProcessStarted()
DebuggerRunParameters attachParameters = runParameters();
attachParameters.inferior.executable.clear();
attachParameters.inferior.commandLineArguments.clear();
attachParameters.attachPID = m_consoleStub->applicationPID();
attachParameters.attachPID = ProcessHandle(m_consoleStub->applicationPID());
attachParameters.startMode = AttachExternal;
attachParameters.useTerminal = false;
showMessage(QString("Attaching to %1...").arg(attachParameters.attachPID), LogMisc);
showMessage(QString("Attaching to %1...").arg(attachParameters.attachPID.pid()), LogMisc);
QString errorMessage;
if (!launchCDB(attachParameters, &errorMessage)) {
showMessage(errorMessage, LogError);
@@ -570,7 +570,7 @@ bool CdbEngine::launchCDB(const DebuggerRunParameters &sp, QString *errorMessage
break;
case AttachExternal:
case AttachCrashedExternal:
arguments << "-p" << QString::number(sp.attachPID);
arguments << "-p" << QString::number(sp.attachPID.pid());
if (sp.startMode == AttachCrashedExternal) {
arguments << "-e" << sp.crashParameter << "-g";
} else {