Debugger: Fix Symbian.

...which subclasses DebuggerRunner and does not call
DebuggerPlugin::startDebugger(), which connects the
engine, leading to strange malfunctions. Move functionality
to DebuggerRunner::start() to make it self-contained.
Add object names to engines for easier debugging.

Reviewed-by: hjk
This commit is contained in:
Friedemann Kleint
2010-08-24 15:35:46 +02:00
parent f1dea465ac
commit 54f9654bd3
12 changed files with 46 additions and 37 deletions

View File

@@ -1982,24 +1982,24 @@ void DebuggerPluginPrivate::displayDebugger(ProjectExplorer::RunControl *rc)
void DebuggerPluginPrivate::startDebugger(ProjectExplorer::RunControl *rc)
{
//qDebug() << "START DEBUGGER 1";
QTC_ASSERT(rc, return);
DebuggerRunControl *runControl = qobject_cast<DebuggerRunControl *>(rc);
QTC_ASSERT(runControl, return);
activateDebugMode();
connectEngine(runControl->engine());
ProjectExplorerPlugin::instance()->startRunControl(runControl, PE::DEBUGMODE);
//qDebug() << "START DEBUGGER 2";
ProjectExplorerPlugin::instance()->startRunControl(rc, PE::DEBUGMODE);
}
void DebuggerPluginPrivate::connectEngine(DebuggerEngine *engine, bool notify)
{
const QAbstractItemModel *oldCommandModel = m_commandWindow->model();
if (oldCommandModel == engine->commandModel()) {
// qDebug("RECONNECTING ENGINE %s", qPrintable(engine->objectName()));
return;
}
if (notify)
notifyCurrentEngine(RequestActivationRole, false);
//if (engine == m_sessionEngine)
// qDebug() << "CONNECTING DUMMY ENGINE" << engine;
//else
// qDebug() << "CONNECTING ENGINE " << engine;
// qDebug("CONNECTING ENGINE %s (OLD ENGINE: %s)", qPrintable(engine->objectName()),
// (oldCommandModel ? qPrintable(oldCommandModel->objectName()) : ""));
m_breakWindow->setModel(engine->breakModel());
m_commandWindow->setModel(engine->commandModel());
m_localsWindow->setModel(engine->localsModel());