forked from qt-creator/qt-creator
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:
@@ -1782,7 +1782,7 @@ void GdbEngine::setLinuxOsAbi()
|
|||||||
void GdbEngine::detachDebugger()
|
void GdbEngine::detachDebugger()
|
||||||
{
|
{
|
||||||
CHECK_STATE(InferiorStopOk);
|
CHECK_STATE(InferiorStopOk);
|
||||||
QTC_ASSERT(m_startMode != AttachCore, qDebug() << m_startMode);
|
QTC_CHECK(runParameters().startMode != AttachCore);
|
||||||
DebuggerCommand cmd("detach", ExitRequest);
|
DebuggerCommand cmd("detach", ExitRequest);
|
||||||
cmd.callback = [this](const DebuggerResponse &) {
|
cmd.callback = [this](const DebuggerResponse &) {
|
||||||
CHECK_STATE(InferiorStopOk);
|
CHECK_STATE(InferiorStopOk);
|
||||||
@@ -4242,17 +4242,18 @@ bool GdbEngine::isPlainEngine() const
|
|||||||
|
|
||||||
bool GdbEngine::isCoreEngine() const
|
bool GdbEngine::isCoreEngine() const
|
||||||
{
|
{
|
||||||
return m_startMode == AttachCore;
|
return runParameters().startMode == AttachCore;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GdbEngine::isRemoteEngine() const
|
bool GdbEngine::isRemoteEngine() const
|
||||||
{
|
{
|
||||||
return m_startMode == StartRemoteProcess || m_startMode == AttachToRemoteServer;
|
DebuggerStartMode startMode = runParameters().startMode;
|
||||||
|
return startMode == StartRemoteProcess || startMode == AttachToRemoteServer;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GdbEngine::isAttachEngine() const
|
bool GdbEngine::isAttachEngine() const
|
||||||
{
|
{
|
||||||
return m_startMode == AttachExternal;
|
return runParameters().startMode == AttachExternal;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GdbEngine::isTermEngine() const
|
bool GdbEngine::isTermEngine() const
|
||||||
|
|||||||
@@ -442,7 +442,6 @@ private: ////////// General Interface //////////
|
|||||||
Utils::QtcProcess m_gdbProc;
|
Utils::QtcProcess m_gdbProc;
|
||||||
OutputCollector m_outputCollector;
|
OutputCollector m_outputCollector;
|
||||||
QString m_errorString;
|
QString m_errorString;
|
||||||
DebuggerStartMode m_startMode = NoStartMode;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
|||||||
Reference in New Issue
Block a user