Commit 17728085 authored by David Schulz's avatar David Schulz Committed by hjk

Debugger: use inferior device when run tool device is null

Task-number: QTCREATORBUG-19442
Change-Id: I6c2419b30bf86af79bb2436dc6dc8196f6c65f06
Reviewed-by: David Schulz's avatarDavid Schulz <david.schulz@qt.io>
Reviewed-by: default avatarhjk <hjk@qt.io>
parent aaa65375
......@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment