Commit 646ae570 authored by hjk's avatar hjk Committed by hjk
Browse files

debugger: better status messages on startup and interrupt



Change-Id: Id78f189bb55db618e5cbff233e4edebc2d6e886c
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 5585426e
......@@ -867,6 +867,7 @@ void DebuggerEngine::notifyInferiorSetupFailed()
{
showMessage(_("NOTE: INFERIOR SETUP FAILED"));
QTC_ASSERT(state() == InferiorSetupRequested, qDebug() << this << state());
showStatusMessage(tr("Setup failed."));
setState(InferiorSetupFailed);
if (isMasterEngine())
d->queueShutdownEngine();
......@@ -902,6 +903,7 @@ void DebuggerEngine::notifyInferiorUnrunnable()
d->m_progress.setProgressValue(1000);
d->m_progress.reportFinished();
QTC_ASSERT(state() == EngineRunRequested, qDebug() << this << state());
showStatusMessage(tr("Loading finished."));
setState(InferiorUnrunnable);
}
......@@ -912,6 +914,7 @@ void DebuggerEngine::notifyEngineRunFailed()
d->m_progress.setProgressValue(900);
d->m_progress.reportCanceled();
d->m_progress.reportFinished();
showStatusMessage(tr("Run failed."));
setState(EngineRunFailed);
if (isMasterEngine())
d->queueShutdownEngine();
......@@ -963,6 +966,7 @@ void DebuggerEngine::notifyEngineRunAndInferiorRunOk()
d->m_progress.setProgressValue(1000);
d->m_progress.reportFinished();
QTC_ASSERT(state() == EngineRunRequested, qDebug() << this << state());
showStatusMessage(tr("Running."));
setState(InferiorRunOk);
}
......@@ -972,6 +976,7 @@ void DebuggerEngine::notifyEngineRunAndInferiorStopOk()
d->m_progress.setProgressValue(1000);
d->m_progress.reportFinished();
QTC_ASSERT(state() == EngineRunRequested, qDebug() << this << state());
showStatusMessage(tr("Stopped."));
setState(InferiorStopOk);
}
......@@ -979,12 +984,14 @@ void DebuggerEngine::notifyInferiorRunRequested()
{
showMessage(_("NOTE: INFERIOR RUN REQUESTED"));
QTC_ASSERT(state() == InferiorStopOk, qDebug() << this << state());
showStatusMessage(tr("Run requested..."));
setState(InferiorRunRequested);
}
void DebuggerEngine::notifyInferiorRunOk()
{
showMessage(_("NOTE: INFERIOR RUN OK"));
showStatusMessage(tr("Running."));
// Transition from StopRequested can happen sin remotegdbadapter.
QTC_ASSERT(state() == InferiorRunRequested
|| state() == InferiorStopRequested, qDebug() << this << state());
......@@ -1021,6 +1028,7 @@ void DebuggerEngine::notifyInferiorStopOk()
return;
}
QTC_ASSERT(state() == InferiorStopRequested, qDebug() << this << state());
showStatusMessage(tr("Stopped."));
setState(InferiorStopOk);
}
......@@ -1028,6 +1036,7 @@ void DebuggerEngine::notifyInferiorSpontaneousStop()
{
showMessage(_("NOTE: INFERIOR SPONTANEOUS STOP"));
QTC_ASSERT(state() == InferiorRunOk, qDebug() << this << state());
showStatusMessage(tr("Stopped."));
setState(InferiorStopOk);
}
......@@ -1046,6 +1055,7 @@ void DebuggerEnginePrivate::doInterruptInferior()
QTC_ASSERT(state() == InferiorRunOk, qDebug() << m_engine << state());
m_engine->setState(InferiorStopRequested);
m_engine->showMessage(_("CALL: INTERRUPT INFERIOR"));
m_engine->showStatusMessage(tr("Attempting to interrupt."));
m_engine->interruptInferior();
}
......
......@@ -2721,10 +2721,10 @@ static QString formatStartParameters(DebuggerStartParameters &sp)
void DebuggerPluginPrivate::runControlStarted(DebuggerEngine *engine)
{
activateDebugMode();
const QString message = tr("Starting debugger '%1' for ABI '%2'...")
const QString message = tr("Starting debugger \"%1\" for ABI \"%2\"...")
.arg(engine->objectName())
.arg(engine->startParameters().toolChainAbi.toString());
showMessage(message, StatusBar);
showStatusMessage(message);
showMessage(formatStartParameters(engine->startParameters()), LogDebug);
showMessage(m_debuggerSettings->dump(), LogDebug);
m_snapshotHandler->appendSnapshot(engine);
......
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