From 1772808592bee4ba781f20915aacf4a859f02c25 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Tue, 12 Dec 2017 09:03:45 +0100 Subject: Debugger: use inferior device when run tool device is null Task-number: QTCREATORBUG-19442 Change-Id: I6c2419b30bf86af79bb2436dc6dc8196f6c65f06 Reviewed-by: David Schulz Reviewed-by: hjk --- src/plugins/debugger/gdb/gdbengine.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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) { -- cgit v1.2.3