Skip to content
Snippets Groups Projects
Commit ad3d1c58 authored by Oswald Buddenhagen's avatar Oswald Buddenhagen
Browse files

assert pid presence

parent 954b2b17
No related branches found
No related tags found
No related merge requests found
...@@ -92,6 +92,7 @@ void AttachGdbAdapter::handleAttach(const GdbResponse &response) ...@@ -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() ...@@ -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));
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment