Commit 13caaaba authored by hjk's avatar hjk
Browse files

debugger: remove InferiorStopSpontaneous state again

parent 8175f19f
......@@ -126,7 +126,6 @@ enum DebuggerState
InferiorRunFailed, // Debuggee running
InferiorStopRequested, // Debuggee running, stop requested
InferiorStopSpontaneous, // Debuggee stopped spontaneously
InferiorStopOk, // Debuggee stopped
InferiorStopFailed, // Debuggee not stopped, will kill debugger
......
......@@ -339,7 +339,6 @@ const char *DebuggerEngine::stateName(int s)
SN(InferiorRunOk)
SN(InferiorRunFailed)
SN(InferiorUnrunnable)
SN(InferiorStopSpontaneous)
SN(InferiorStopRequested)
SN(InferiorStopOk)
SN(InferiorStopFailed)
......@@ -715,14 +714,12 @@ static bool isAllowedTransition(DebuggerState from, DebuggerState to)
case InferiorRunFailed:
return to == InferiorStopOk;
case InferiorRunOk:
return to == InferiorStopRequested || to == InferiorStopSpontaneous
|| InferiorExitOk;
//|| to == InferiorStopOk;
return to == InferiorStopRequested
|| to == InferiorStopOk // A spontaneous stop.
|| to == InferiorExitOk;
case InferiorStopRequested:
return to == InferiorStopOk || to == InferiorStopFailed;
case InferiorStopSpontaneous:
return to == InferiorStopOk;
case InferiorStopOk:
return to == InferiorRunRequested || to == InferiorShutdownRequested
|| to == InferiorStopOk || InferiorExitOk;
......@@ -926,9 +923,7 @@ void DebuggerEngine::notifyInferiorSpontaneousStop()
{
showMessage(_("NOTE: INFERIOR SPONTANEOUES STOP"));
QTC_ASSERT(state() == InferiorRunOk, qDebug() << this << state());
setState(InferiorStopSpontaneous);
if (isMasterEngine())
setState(InferiorStopOk);
setState(InferiorStopOk);
}
void DebuggerEngine::notifyInferiorStopFailed()
......@@ -1190,7 +1185,6 @@ bool DebuggerEngine::debuggerActionsEnabled(DebuggerState state)
case EngineRunFailed:
case InferiorSetupFailed:
case InferiorStopFailed:
case InferiorStopSpontaneous:
case InferiorExitOk:
case InferiorShutdownRequested:
case InferiorShutdownOk:
......
......@@ -141,7 +141,6 @@ static bool stateAcceptsGdbCommands(DebuggerState state)
return true;
case DebuggerNotReady:
case InferiorStopFailed:
case InferiorStopSpontaneous:
case InferiorSetupOk:
case EngineRunFailed:
case InferiorExitOk:
......
......@@ -467,17 +467,6 @@ void QmlCppEngine::slaveEngineStateChanged
break;
case InferiorStopSpontaneous:
notifyInferiorSpontaneousStop();
slaveEngine->setSilentState(InferiorStopOk);
if (slaveEngine != d->m_activeEngine) {
QString engineName = slaveEngine == d->m_cppEngine
? QLatin1String("C++") : QLatin1String("QML");
showStatusMessage(tr("%1 debugger activated").arg(engineName));
d->m_activeEngine = slaveEngine;
}
break;
case InferiorStopRequested:
break;
......@@ -489,6 +478,12 @@ void QmlCppEngine::slaveEngineStateChanged
if (isDying()) {
qDebug() << "... AN INFERIOR STOPPED DURING SHUTDOWN ";
} else {
if (slaveEngine != d->m_activeEngine) {
QString engineName = slaveEngine == d->m_cppEngine
? QLatin1String("C++") : QLatin1String("QML");
showStatusMessage(tr("%1 debugger activated").arg(engineName));
d->m_activeEngine = slaveEngine;
}
if (otherEngine->state() == InferiorShutdownOk) {
qDebug() << "... STOPP ";
} else if (state() == InferiorStopRequested) {
......
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