forked from qt-creator/qt-creator
assert pid presence
This commit is contained in:
@@ -92,6 +92,7 @@ void AttachGdbAdapter::handleAttach(const GdbResponse &response)
|
|||||||
void AttachGdbAdapter::interruptInferior()
|
void AttachGdbAdapter::interruptInferior()
|
||||||
{
|
{
|
||||||
const qint64 pid = startParameters().attachPID;
|
const qint64 pid = startParameters().attachPID;
|
||||||
|
QTC_ASSERT(pid > 0, return);
|
||||||
if (!interruptProcess(pid))
|
if (!interruptProcess(pid))
|
||||||
debugMessage(_("CANNOT INTERRUPT %1").arg(pid));
|
debugMessage(_("CANNOT INTERRUPT %1").arg(pid));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -132,6 +132,7 @@ void TermGdbAdapter::startInferiorPhase2()
|
|||||||
void TermGdbAdapter::interruptInferior()
|
void TermGdbAdapter::interruptInferior()
|
||||||
{
|
{
|
||||||
const qint64 attachedPID = m_engine->inferiorPid();
|
const qint64 attachedPID = m_engine->inferiorPid();
|
||||||
|
QTC_ASSERT(attachedPID > 0, return);
|
||||||
if (!interruptProcess(attachedPID))
|
if (!interruptProcess(attachedPID))
|
||||||
debugMessage(_("CANNOT INTERRUPT %1").arg(attachedPID));
|
debugMessage(_("CANNOT INTERRUPT %1").arg(attachedPID));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user