debugger: make stack reload engine-agnostic

This commit is contained in:
hjk
2009-05-06 10:21:50 +02:00
parent 4381b9d244
commit 67d327c7cc
6 changed files with 16 additions and 7 deletions

View File

@@ -94,6 +94,7 @@ public:
virtual void reloadRegisters();
virtual void reloadSourceFiles();
virtual void reloadFullStack() {}
protected:
void timerEvent(QTimerEvent*);

View File

@@ -206,6 +206,10 @@ void DebuggerManager::init()
stackView->setModel(m_stackHandler->stackModel());
connect(stackView, SIGNAL(frameActivated(int)),
this, SLOT(activateFrame(int)));
connect(theDebuggerAction(ExpandStack), SIGNAL(triggered()),
this, SLOT(reloadFullStack()));
connect(theDebuggerAction(MaximalStackDepth), SIGNAL(triggered()),
this, SLOT(reloadFullStack()));
// Threads
m_threadsHandler = new ThreadsHandler;
@@ -273,9 +277,8 @@ void DebuggerManager::init()
m_registerHandler = new RegisterHandler;
registerView->setModel(m_registerHandler->model());
m_watchHandler = new WatchHandler;
// Locals
m_watchHandler = new WatchHandler;
QTreeView *localsView = qobject_cast<QTreeView *>(m_localsWindow);
localsView->setModel(m_watchHandler->model());
@@ -1539,6 +1542,12 @@ DebuggerStartMode DebuggerManager::startMode() const
return m_runControl->startMode();
}
void DebuggerManager::reloadFullStack()
{
if (m_engine)
m_engine->reloadFullStack();
}
//////////////////////////////////////////////////////////////////////
//

View File

@@ -279,6 +279,7 @@ private slots:
void setStatus(int status);
void clearStatusMessage();
void attemptBreakpointSynchronization();
void reloadFullStack();
private:
//

View File

@@ -158,17 +158,13 @@ void GdbEngine::initializeConnections()
q, SLOT(showApplicationOutput(QString)),
Qt::QueuedConnection);
// FIXME: These trigger even if the engine is not active
connect(theDebuggerAction(UseDebuggingHelpers), SIGNAL(valueChanged(QVariant)),
this, SLOT(setUseDebuggingHelpers(QVariant)));
connect(theDebuggerAction(DebugDebuggingHelpers), SIGNAL(valueChanged(QVariant)),
this, SLOT(setDebugDebuggingHelpers(QVariant)));
connect(theDebuggerAction(RecheckDebuggingHelpers), SIGNAL(triggered()),
this, SLOT(recheckDebuggingHelperAvailability()));
connect(theDebuggerAction(ExpandStack), SIGNAL(triggered()),
this, SLOT(reloadFullStack()));
connect(theDebuggerAction(MaximalStackDepth), SIGNAL(triggered()),
this, SLOT(reloadFullStack()));
}
void GdbEngine::initializeVariables()

View File

@@ -84,6 +84,7 @@ public:
virtual void reloadRegisters() = 0;
virtual void reloadSourceFiles() = 0;
virtual void reloadFullStack() = 0;
};
} // namespace Internal

View File

@@ -104,6 +104,7 @@ private:
void reloadModules();
void reloadRegisters() {}
void reloadSourceFiles() {}
void reloadFullStack() {}
bool supportsThreads() const { return true; }
void maybeBreakNow(bool byFunction);