aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Schulz <david.schulz@qt.io>2017-12-12 09:03:45 +0100
committerhjk <hjk@qt.io>2017-12-12 09:23:06 +0000
commit1772808592bee4ba781f20915aacf4a859f02c25 (patch)
treefa46950341eb68b91ba99f9d9e7cd85490c39e64
parentaaa65375f948bc170f24aa431e3eeae0beeffb4e (diff)
Debugger: use inferior device when run tool device is null
Task-number: QTCREATORBUG-19442 Change-Id: I6c2419b30bf86af79bb2436dc6dc8196f6c65f06 Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: hjk <hjk@qt.io>
-rw-r--r--src/plugins/debugger/gdb/gdbengine.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp
index e48becbc71..d87c33a741 100644
--- a/src/plugins/debugger/gdb/gdbengine.cpp
+++ b/src/plugins/debugger/gdb/gdbengine.cpp
@@ -759,7 +759,11 @@ void GdbEngine::interruptInferior()
showMessage("TRYING TO INTERRUPT INFERIOR");
if (HostOsInfo::isWindowsHost() && !m_isQnxGdb) {
QTC_ASSERT(state() == InferiorStopRequested, qDebug() << state(); notifyInferiorStopFailed());
- DeviceProcessSignalOperation::Ptr signalOperation = runTool()->device()->signalOperation();
+ IDevice::ConstPtr device = runTool()->device();
+ if (!device)
+ device = runParameters().inferior.device;
+ QTC_ASSERT(device, notifyInferiorStopFailed(); return);
+ DeviceProcessSignalOperation::Ptr signalOperation = device->signalOperation();
QTC_ASSERT(signalOperation, notifyInferiorStopFailed(); return);
connect(signalOperation.data(), &DeviceProcessSignalOperation::finished,
this, [this, signalOperation](const QString &error) {