Debugger: Fix "Restart debugging session" regression

Introduced with the support for fork-follows-child.
With 'Restart', we temporarily don't have a living
thread, so that can't be taken as indication for
ending the debugging session.

Task-number: QTCREATORBUG-14393
Change-Id: I0070b9ca7e6897dab48bdbcf493d03df4709be98
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
hjk
2015-07-07 15:13:10 +02:00
parent 68a707458b
commit a28ac6307f
2 changed files with 9 additions and 2 deletions

View File

@@ -240,6 +240,7 @@ GdbEngine::GdbEngine(const DebuggerRunParameters &startParameters)
m_terminalTrap = startParameters.useTerminal;
m_fullStartDone = false;
m_systemDumpersLoaded = false;
m_rerunPending = true;
m_debugInfoTaskHandler = new DebugInfoTaskHandler(this);
//ExtensionSystem::PluginManager::addObject(m_debugInfoTaskHandler);
@@ -1972,8 +1973,12 @@ void GdbEngine::handleThreadGroupCreated(const GdbMi &result)
void GdbEngine::handleThreadGroupExited(const GdbMi &result)
{
QByteArray groupId = result["id"].data();
if (threadsHandler()->notifyGroupExited(groupId))
notifyInferiorExited();
if (threadsHandler()->notifyGroupExited(groupId)) {
if (m_rerunPending)
m_rerunPending = false;
else
notifyInferiorExited();
}
}
int GdbEngine::currentFrame() const
@@ -4322,6 +4327,7 @@ void GdbEngine::resetInferior()
}
}
}
m_rerunPending = true;
requestInterruptInferior();
runEngine();
}

View File

@@ -211,6 +211,7 @@ private:
CommandsDoneCallback m_commandsDoneCallback;
QList<DebuggerCommand> m_commandsToRunOnTemporaryBreak;
bool m_rerunPending;
private: ////////// Gdb Output, State & Capability Handling //////////
protected: