forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -759,7 +759,11 @@ void GdbEngine::interruptInferior()
|
|||||||
showMessage("TRYING TO INTERRUPT INFERIOR");
|
showMessage("TRYING TO INTERRUPT INFERIOR");
|
||||||
if (HostOsInfo::isWindowsHost() && !m_isQnxGdb) {
|
if (HostOsInfo::isWindowsHost() && !m_isQnxGdb) {
|
||||||
QTC_ASSERT(state() == InferiorStopRequested, qDebug() << state(); notifyInferiorStopFailed());
|
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);
|
QTC_ASSERT(signalOperation, notifyInferiorStopFailed(); return);
|
||||||
connect(signalOperation.data(), &DeviceProcessSignalOperation::finished,
|
connect(signalOperation.data(), &DeviceProcessSignalOperation::finished,
|
||||||
this, [this, signalOperation](const QString &error) {
|
this, [this, signalOperation](const QString &error) {
|
||||||
|
Reference in New Issue
Block a user