forked from qt-creator/qt-creator
Debugger: Clean up GdbEngine member data on finish
Restarting with cached outdated information is problematic. Change-Id: I396da2fef96a161c1ab150134b8e65a758a16d58 Task-number: QTCREATORBUG-16355 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -1280,6 +1280,7 @@ void DebuggerEngine::setState(DebuggerState state, bool forced)
|
||||
bp.notifyBreakpointReleased();
|
||||
DebuggerToolTipManager::deregisterEngine(this);
|
||||
d->m_memoryAgent.handleDebuggerFinished();
|
||||
prepareForRestart();
|
||||
}
|
||||
|
||||
showMessage(msg, LogDebug);
|
||||
|
||||
@@ -201,6 +201,7 @@ public:
|
||||
virtual void selectWatchData(const QByteArray &iname);
|
||||
|
||||
virtual void startDebugger(DebuggerRunControl *runControl);
|
||||
virtual void prepareForRestart() {}
|
||||
|
||||
virtual void watchPoint(const QPoint &);
|
||||
|
||||
|
||||
@@ -4300,6 +4300,14 @@ void GdbEngine::notifyInferiorSetupFailed()
|
||||
DebuggerEngine::notifyInferiorSetupFailed();
|
||||
}
|
||||
|
||||
void GdbEngine::prepareForRestart()
|
||||
{
|
||||
m_rerunPending = false;
|
||||
m_commandsDoneCallback = 0;
|
||||
m_commandForToken.clear();
|
||||
m_flagsForToken.clear();
|
||||
}
|
||||
|
||||
void GdbEngine::handleInferiorPrepared()
|
||||
{
|
||||
const DebuggerRunParameters &rp = runParameters();
|
||||
|
||||
@@ -72,6 +72,7 @@ private: ////////// General Interface //////////
|
||||
|
||||
virtual void handleGdbStartFailed();
|
||||
void notifyInferiorSetupFailed() override;
|
||||
void prepareForRestart() override;
|
||||
|
||||
bool hasCapability(unsigned) const override;
|
||||
void detachDebugger() override;
|
||||
|
||||
Reference in New Issue
Block a user