Commit 7ec492f6 authored by hjk's avatar hjk

debugger: allow state transitions stopped->stopped unconditionally

This is triggered by the cross-qml-c++ stepping machinery (and was
already allowed there) and get also triggered by a 'continue' in
commands attached to a breakpoint as there there is no intermediate
^running to which the state engine reacts. So this is a band aid.
Better solution would be to have the state following the *running,
and per-thread run/stop state.

Change-Id: If0f1c00e8010aa099ec5da214db95e93aa37279e
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 12dd0587
......@@ -1477,7 +1477,7 @@ void GdbEngine::handleStopResponse(const GdbMi &data)
// *stopped arriving earlier than ^done response to an -exec-step
doNotifyInferiorRunOk();
notifyInferiorSpontaneousStop();
} else if (state() == InferiorStopOk && isQmlStepBreakpoint2(rid)) {
} else if (state() == InferiorStopOk) {
// That's expected.
} else {
QTC_ASSERT(state() == InferiorStopRequested, qDebug() << state());
......@@ -1485,6 +1485,8 @@ void GdbEngine::handleStopResponse(const GdbMi &data)
notifyInferiorStopOk();
}
QTC_ASSERT(state() == InferiorStopOk, qDebug() << state());
if (isQmlStepBreakpoint1(rid))
return;
......@@ -1504,6 +1506,8 @@ void GdbEngine::handleStop1(const GdbResponse &response)
void GdbEngine::handleStop1(const GdbMi &data)
{
QTC_ASSERT(state() == InferiorStopOk, qDebug() << state());
QTC_ASSERT(!isDying(), return);
const GdbMi frame = data.findChild("frame");
const QByteArray reason = data.findChild("reason").data();
......@@ -1593,11 +1597,8 @@ void GdbEngine::handleStop2(const GdbResponse &response)
void GdbEngine::handleStop2(const GdbMi &data)
{
if (isDying()) {
qDebug() << "HANDLING STOP WHILE DYING";
notifyInferiorStopOk();
return;
}
QTC_ASSERT(state() == InferiorStopOk, qDebug() << state());
QTC_ASSERT(!isDying(), return);
// A user initiated stop looks like the following. Note that there is
// this extra "stopper thread" created and "properly" reported by gdb.
......
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