Debugger: Rework thread data aquisition

Listen to gdb/MI notifications when possible. This is more
granular, gives access to the thread group id and takes
care of thread changes at any time.

Change-Id: I8c67f6f19b204059deefdf7e07fe3b4ce13ed963
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This commit is contained in:
hjk
2012-10-19 16:37:57 +02:00
parent 617f74aa19
commit 0d9a56ab3f
23 changed files with 294 additions and 162 deletions

View File

@@ -494,6 +494,7 @@ public:
bool hasCapability(unsigned cap) const;
bool acceptsBreakpoint(BreakpointModelId) const { return false; }
bool acceptsDebuggerCommands() const { return false; }
void selectThread(ThreadId) {}
};
bool DummyEngine::hasCapability(unsigned cap) const
@@ -781,7 +782,8 @@ public slots:
void selectThread(int index)
{
currentEngine()->selectThread(index);
ThreadId id = m_currentEngine->threadsHandler()->threadAt(index);
m_currentEngine->selectThread(id);
}
void breakpointSetMarginActionTriggered()
@@ -2205,7 +2207,7 @@ void DebuggerPluginPrivate::updateState(DebuggerEngine *engine)
QTC_ASSERT(m_returnWindow->model(), return);
QTC_ASSERT(!engine->isSlaveEngine(), return);
m_threadBox->setCurrentIndex(engine->threadsHandler()->currentThread());
m_threadBox->setCurrentIndex(engine->threadsHandler()->currentThreadIndex());
engine->watchHandler()->updateWatchersWindow();
const DebuggerState state = engine->state();