Debugger: Protect reloadRegisters against early calls.

Check for correct state (InferiorStopped).
This commit is contained in:
Friedemann Kleint
2009-11-30 16:45:15 +01:00
parent f1d79229d3
commit e87bd302da
2 changed files with 4 additions and 0 deletions

View File

@@ -1588,6 +1588,8 @@ QList<Symbol> CdbDebugEngine::moduleSymbols(const QString &moduleName)
void CdbDebugEngine::reloadRegisters()
{
if (state() != InferiorStopped)
return;
const int intBase = 10;
if (debugCDB)
qDebug() << Q_FUNC_INFO << intBase;

View File

@@ -2555,6 +2555,8 @@ void GdbEngine::handleStackListThreads(const GdbResponse &response)
void GdbEngine::reloadRegisters()
{
if (state() != InferiorStopped)
return;
if (!m_registerNamesListed) {
postCommand(_("-data-list-register-names"), CB(handleRegisterListNames));
m_registerNamesListed = true;