debugger: introduce a new state InferiorUnrunnable to properly describe the

state when gdb is attached to a core.
This commit is contained in:
hjk
2009-09-29 11:40:40 +02:00
parent 573ca3ad85
commit 17c928f970
4 changed files with 32 additions and 35 deletions

View File

@@ -150,8 +150,7 @@ void CoreGdbAdapter::handleTargetCore(const GdbResponse &response)
{
QTC_ASSERT(state() == InferiorStarting, qDebug() << state());
if (response.resultClass == GdbResultDone) {
setState(InferiorStopped);
debugMessage(_("INFERIOR STARTED"));
setState(InferiorUnrunnable);
showStatusMessage(tr("Attached to core."));
m_engine->updateAll();
} else {
@@ -170,7 +169,7 @@ void CoreGdbAdapter::interruptInferior()
void CoreGdbAdapter::shutdown()
{
if (state() == InferiorStopped || state() == InferiorShutDown) {
if (state() == InferiorUnrunnable || state() == InferiorShutDown) {
setState(AdapterShuttingDown);
m_engine->postCommand(_("-gdb-exit"), CB(handleExit));
return;