assert pid presence

This commit is contained in:
Oswald Buddenhagen
2009-10-28 20:03:50 +01:00
parent 954b2b1786
commit ad3d1c5887
2 changed files with 2 additions and 0 deletions

View File

@@ -92,6 +92,7 @@ void AttachGdbAdapter::handleAttach(const GdbResponse &response)
void AttachGdbAdapter::interruptInferior()
{
const qint64 pid = startParameters().attachPID;
QTC_ASSERT(pid > 0, return);
if (!interruptProcess(pid))
debugMessage(_("CANNOT INTERRUPT %1").arg(pid));
}

View File

@@ -132,6 +132,7 @@ void TermGdbAdapter::startInferiorPhase2()
void TermGdbAdapter::interruptInferior()
{
const qint64 attachedPID = m_engine->inferiorPid();
QTC_ASSERT(attachedPID > 0, return);
if (!interruptProcess(attachedPID))
debugMessage(_("CANNOT INTERRUPT %1").arg(attachedPID));
}