forked from qt-creator/qt-creator
debugger: remove EngineRunOk state again
This commit is contained in:
@@ -118,7 +118,6 @@ enum DebuggerState
|
||||
|
||||
EngineRunRequested,
|
||||
EngineRunFailed,
|
||||
EngineRunOk,
|
||||
|
||||
InferiorUnrunnable, // Used in the core dump adapter
|
||||
|
||||
|
@@ -331,7 +331,6 @@ const char *DebuggerEngine::stateName(int s)
|
||||
SN(EngineSetupOk)
|
||||
SN(EngineSetupFailed)
|
||||
SN(EngineRunFailed)
|
||||
SN(EngineRunOk)
|
||||
SN(InferiorSetupRequested)
|
||||
SN(InferiorSetupFailed)
|
||||
SN(InferiorSetupOk)
|
||||
@@ -704,12 +703,12 @@ static bool isAllowedTransition(DebuggerState from, DebuggerState to)
|
||||
return to == EngineRunRequested;
|
||||
|
||||
case EngineRunRequested:
|
||||
return to == EngineRunOk || EngineRunFailed;
|
||||
return to == EngineRunFailed
|
||||
|| to == InferiorRunOk
|
||||
|| to == InferiorStopOk
|
||||
|| to == InferiorUnrunnable;
|
||||
case EngineRunFailed:
|
||||
return to == EngineShutdownRequested;
|
||||
case EngineRunOk:
|
||||
return InferiorRunOk || to == InferiorStopOk
|
||||
|| to == InferiorUnrunnable;
|
||||
|
||||
case InferiorRunRequested:
|
||||
return to == InferiorRunOk || to == InferiorRunFailed;
|
||||
@@ -864,9 +863,7 @@ void DebuggerEngine::notifyEngineRunAndInferiorRunOk()
|
||||
d->m_progress.setProgressValue(1000);
|
||||
d->m_progress.reportFinished();
|
||||
QTC_ASSERT(state() == EngineRunRequested, qDebug() << this << state());
|
||||
setState(EngineRunOk);
|
||||
if (isMasterEngine())
|
||||
setState(InferiorRunOk);
|
||||
setState(InferiorRunOk);
|
||||
}
|
||||
|
||||
void DebuggerEngine::notifyEngineRunAndInferiorStopOk()
|
||||
@@ -875,9 +872,7 @@ void DebuggerEngine::notifyEngineRunAndInferiorStopOk()
|
||||
d->m_progress.setProgressValue(1000);
|
||||
d->m_progress.reportFinished();
|
||||
QTC_ASSERT(state() == EngineRunRequested, qDebug() << this << state());
|
||||
setState(EngineRunOk);
|
||||
if (isMasterEngine())
|
||||
setState(InferiorStopOk);
|
||||
setState(InferiorStopOk);
|
||||
}
|
||||
|
||||
void DebuggerEngine::notifyInferiorRunRequested()
|
||||
@@ -1193,7 +1188,6 @@ bool DebuggerEngine::debuggerActionsEnabled(DebuggerState state)
|
||||
case EngineSetupFailed:
|
||||
case EngineRunRequested:
|
||||
case EngineRunFailed:
|
||||
case EngineRunOk:
|
||||
case InferiorSetupFailed:
|
||||
case InferiorStopFailed:
|
||||
case InferiorStopSpontaneous:
|
||||
|
@@ -199,8 +199,6 @@
|
||||
// Inferior- Inferior- Inferior- EngineRun- +
|
||||
// Unrunnable} StopOk} RunOk} Failed} +
|
||||
// + + + + +
|
||||
// EngineRunOk EngineRunOk EngineRunOk + +
|
||||
// + + + + +
|
||||
// InferiorUnrunnable + InferiorRunOk + +
|
||||
// + + +
|
||||
// InferiorStopOk EngineRunFailed +
|
||||
|
@@ -144,7 +144,6 @@ static bool stateAcceptsGdbCommands(DebuggerState state)
|
||||
case InferiorStopSpontaneous:
|
||||
case InferiorSetupOk:
|
||||
case EngineRunFailed:
|
||||
case EngineRunOk:
|
||||
case InferiorExitOk:
|
||||
case InferiorRunFailed:
|
||||
case EngineShutdownOk:
|
||||
|
@@ -440,18 +440,6 @@ void QmlCppEngine::slaveEngineStateChanged
|
||||
notifyEngineRunFailed();
|
||||
break;
|
||||
|
||||
case EngineRunOk:
|
||||
if (otherEngine->state() == EngineRunOk) {
|
||||
// This is conditionalized on isMasterEngine() in the
|
||||
// base class, so do it here manually.
|
||||
slaveEngine->setSilentState(InferiorRunOk);
|
||||
otherEngine->setSilentState(InferiorRunOk);
|
||||
notifyEngineRunAndInferiorRunOk();
|
||||
} else {
|
||||
qDebug() << "... WAITING FOR OTHER ENGINE RUN...";
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case InferiorRunRequested:
|
||||
break;
|
||||
@@ -461,11 +449,21 @@ void QmlCppEngine::slaveEngineStateChanged
|
||||
break;
|
||||
|
||||
case InferiorRunOk:
|
||||
qDebug() << "PLANNED INFERIOR RUN";
|
||||
if (otherEngine->state() == InferiorRunOk)
|
||||
notifyInferiorRunOk();
|
||||
else
|
||||
qDebug() << " **** INFERIOR RUN NOT OK ****";
|
||||
if (state() == EngineRunRequested) {
|
||||
if (otherEngine->state() == InferiorRunOk)
|
||||
notifyEngineRunAndInferiorRunOk();
|
||||
else if (otherEngine->state() == InferiorRunOk)
|
||||
notifyEngineRunAndInferiorStopOk();
|
||||
else
|
||||
qDebug() << "... WAITING FOR OTHER INFERIOR RUN";
|
||||
} else {
|
||||
if (otherEngine->state() == InferiorRunOk) {
|
||||
qDebug() << "PLANNED INFERIOR RUN";
|
||||
notifyInferiorRunOk();
|
||||
} else {
|
||||
qDebug() << " **** INFERIOR RUN NOT OK ****";
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
|
@@ -676,7 +676,7 @@ void QmlEngine::messageReceived(const QByteArray &message)
|
||||
|
||||
if (command == "STOPPED") {
|
||||
qDebug() << command << this << state();
|
||||
if (state() == InferiorRunOk || state() == EngineRunOk)
|
||||
if (state() == InferiorRunOk)
|
||||
notifyInferiorSpontaneousStop();
|
||||
|
||||
QString logString = QString(command);
|
||||
|
Reference in New Issue
Block a user