debugger: don't load registers if view is not shown

This commit is contained in:
hjk
2010-06-28 09:10:20 +02:00
parent 01a5953575
commit 200b18d44a
4 changed files with 14 additions and 0 deletions

View File

@@ -359,6 +359,10 @@ void DebuggerEngine::handleCommand(int role, const QVariant &value)
reloadModules();
break;
case RequestReloadRegistersRole:
reloadRegisters();
break;
case RequestExecContinueRole:
continueInferior();
break;

View File

@@ -2548,6 +2548,11 @@ DebuggerEngine *DebuggerPlugin::sessionTemplate()
return d->m_sessionEngine;
}
bool DebuggerPlugin::isRegisterViewVisible() const
{
return d->m_registerDock->toggleViewAction()->isChecked();
}
//////////////////////////////////////////////////////////////////////
//
// Testing

View File

@@ -103,6 +103,8 @@ public:
Internal::DebuggerEngine *sessionTemplate();
void updateState(Internal::DebuggerEngine *engine);
bool isRegisterViewVisible() const;
public slots:
void exitDebugger(); // FIXME: remove
void clearCppCodeModelSnapshot();

View File

@@ -3079,6 +3079,9 @@ void GdbEngine::activateSnapshot2()
void GdbEngine::reloadRegisters()
{
if (!plugin()->isRegisterViewVisible())
return;
if (state() != InferiorStopped && state() != InferiorUnrunnable)
return;
if (!m_registerNamesListed) {