forked from qt-creator/qt-creator
Debugger: Interrupt inferior via signal operation on Windows.
Task-number: QTCREATORBUG-10558 Change-Id: I5a27beca4601cae3b0de8f903a2cbc08ee801149 Reviewed-by: Robert Loehning <robert.loehning@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -65,8 +65,9 @@
|
||||
#include <debugger/shared/hostutils.h>
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
#include <projectexplorer/taskhub.h>
|
||||
#include <projectexplorer/devicesupport/deviceprocess.h>
|
||||
#include <projectexplorer/itaskhandler.h>
|
||||
#include <projectexplorer/taskhub.h>
|
||||
#include <texteditor/itexteditor.h>
|
||||
#include <utils/hostosinfo.h>
|
||||
#include <utils/qtcassert.h>
|
||||
@@ -840,10 +841,35 @@ void GdbEngine::interruptInferior()
|
||||
} else {
|
||||
showStatusMessage(tr("Stop requested..."), 5000);
|
||||
showMessage(_("TRYING TO INTERRUPT INFERIOR"));
|
||||
interruptInferior2();
|
||||
if (Utils::HostOsInfo::isWindowsHost() && !m_isQnxGdb) {
|
||||
QTC_ASSERT(state() == InferiorStopRequested, qDebug() << state(); notifyInferiorStopFailed());
|
||||
QTC_ASSERT(!m_signalOperation, notifyInferiorStopFailed());
|
||||
m_signalOperation = startParameters().device->signalOperation();
|
||||
QTC_ASSERT(m_signalOperation, notifyInferiorStopFailed());
|
||||
connect(m_signalOperation.data(), SIGNAL(finished(QString)),
|
||||
SLOT(handleInterruptDeviceInferior(QString)));
|
||||
|
||||
m_signalOperation->setDebuggerCommand(startParameters().debuggerCommand);
|
||||
m_signalOperation->interruptProcess(inferiorPid());
|
||||
} else {
|
||||
interruptInferior2();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void GdbEngine::handleInterruptDeviceInferior(const QString &error)
|
||||
{
|
||||
if (error.isEmpty()) {
|
||||
showMessage(QLatin1String("Interrupted ") + QString::number(inferiorPid()));
|
||||
notifyInferiorStopOk();
|
||||
} else {
|
||||
showMessage(error, LogError);
|
||||
notifyInferiorStopFailed();
|
||||
}
|
||||
m_signalOperation->disconnect(this);
|
||||
m_signalOperation.clear();
|
||||
}
|
||||
|
||||
void GdbEngine::interruptInferiorTemporarily()
|
||||
{
|
||||
foreach (const GdbCommand &cmd, m_commandsToRunOnTemporaryBreak) {
|
||||
|
||||
Reference in New Issue
Block a user