forked from qt-creator/qt-creator
Debugger: Do not interrupt twice
Fixes unwanted interrupt after setting a breakpoint to a running inferior. Change-Id: I8d24fd4beff53fa74f92d2134866d418745fa747 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -832,6 +832,7 @@ void CdbEngine::handleDoInterruptInferior(const QString &errorMessage)
|
|||||||
|
|
||||||
void CdbEngine::doInterruptInferior(const InterruptCallback &callback)
|
void CdbEngine::doInterruptInferior(const InterruptCallback &callback)
|
||||||
{
|
{
|
||||||
|
const bool requestInterrupt = m_stopMode == NoStopRequested;
|
||||||
if (callback) {
|
if (callback) {
|
||||||
m_interrupCallbacks.push_back(callback);
|
m_interrupCallbacks.push_back(callback);
|
||||||
if (!m_initialSessionIdleHandled)
|
if (!m_initialSessionIdleHandled)
|
||||||
@@ -842,6 +843,8 @@ void CdbEngine::doInterruptInferior(const InterruptCallback &callback)
|
|||||||
m_stopMode = Interrupt;
|
m_stopMode = Interrupt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!requestInterrupt)
|
||||||
|
return; // we already requested a stop no need to interrupt twice
|
||||||
showMessage(QString("Interrupting process %1...").arg(inferiorPid()), LogMisc);
|
showMessage(QString("Interrupting process %1...").arg(inferiorPid()), LogMisc);
|
||||||
QTC_ASSERT(!m_signalOperation, notifyInferiorStopFailed(); return);
|
QTC_ASSERT(!m_signalOperation, notifyInferiorStopFailed(); return);
|
||||||
QTC_ASSERT(device(), notifyInferiorRunFailed(); return);
|
QTC_ASSERT(device(), notifyInferiorRunFailed(); return);
|
||||||
|
Reference in New Issue
Block a user