Commit a28ac630 authored by hjk's avatar hjk
Browse files

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: default avatarChristian Stenger <christian.stenger@theqtcompany.com>
parent 68a70745
......@@ -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();
}
......
......@@ -211,6 +211,7 @@ private:
CommandsDoneCallback m_commandsDoneCallback;
QList<DebuggerCommand> m_commandsToRunOnTemporaryBreak;
bool m_rerunPending;
private: ////////// Gdb Output, State & Capability Handling //////////
protected:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment