forked from qt-creator/qt-creator
debugger: make attaching to running process work again
This commit is contained in:
@@ -31,10 +31,8 @@
|
||||
|
||||
#include "debuggeractions.h"
|
||||
#include "gdbengine.h"
|
||||
#include "procinterrupt.h"
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
#include <coreplugin/icore.h>
|
||||
|
||||
#include <QtCore/QFileInfo>
|
||||
#include <QtGui/QMessageBox>
|
||||
@@ -229,20 +227,7 @@ void RemoteGdbAdapter::handleExecRun(const GdbResultRecord &response, const QVar
|
||||
|
||||
void RemoteGdbAdapter::interruptInferior()
|
||||
{
|
||||
debugMessage(_("TRYING TO INTERUPT INFERIOR"));
|
||||
if (m_engine->startMode() == StartRemote) {
|
||||
m_engine->postCommand(_("-exec-interrupt"));
|
||||
return;
|
||||
}
|
||||
|
||||
const qint64 attachedPID = m_engine->inferiorPid();
|
||||
if (attachedPID <= 0) {
|
||||
debugMessage(_("TRYING TO INTERRUPT INFERIOR BEFORE PID WAS OBTAINED"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!interruptProcess(attachedPID))
|
||||
debugMessage(_("CANNOT INTERRUPT %1").arg(attachedPID));
|
||||
m_engine->postCommand(_("-exec-interrupt"));
|
||||
}
|
||||
|
||||
void RemoteGdbAdapter::shutdown()
|
||||
|
||||
Reference in New Issue
Block a user