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