Debugger: Do not duplicate state

GdbEngine::m_startMode should be always the same as in the RunParameters.

Change-Id: Iceac9b28b8273847f7ee518572d93e796fffeb14
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
hjk
2017-10-16 14:56:35 +02:00
parent ca56ac1ac6
commit b76651bd72
2 changed files with 5 additions and 5 deletions

View File

@@ -1782,7 +1782,7 @@ void GdbEngine::setLinuxOsAbi()
void GdbEngine::detachDebugger()
{
CHECK_STATE(InferiorStopOk);
QTC_ASSERT(m_startMode != AttachCore, qDebug() << m_startMode);
QTC_CHECK(runParameters().startMode != AttachCore);
DebuggerCommand cmd("detach", ExitRequest);
cmd.callback = [this](const DebuggerResponse &) {
CHECK_STATE(InferiorStopOk);
@@ -4242,17 +4242,18 @@ bool GdbEngine::isPlainEngine() const
bool GdbEngine::isCoreEngine() const
{
return m_startMode == AttachCore;
return runParameters().startMode == AttachCore;
}
bool GdbEngine::isRemoteEngine() const
{
return m_startMode == StartRemoteProcess || m_startMode == AttachToRemoteServer;
DebuggerStartMode startMode = runParameters().startMode;
return startMode == StartRemoteProcess || startMode == AttachToRemoteServer;
}
bool GdbEngine::isAttachEngine() const
{
return m_startMode == AttachExternal;
return runParameters().startMode == AttachExternal;
}
bool GdbEngine::isTermEngine() const