diff --git a/src/plugins/debugger/debuggerengine.cpp b/src/plugins/debugger/debuggerengine.cpp index 72915e4f6fa70858e4e4ab9b5b54f5947237be6e..0076792b2b8a07a9ad8cdda391ad8b49ff58ea96 100644 --- a/src/plugins/debugger/debuggerengine.cpp +++ b/src/plugins/debugger/debuggerengine.cpp @@ -1487,11 +1487,17 @@ void DebuggerEngine::setState(DebuggerState state, bool forced) threadsHandler()->notifyRunning(); showMessage(msg, LogDebug); - plugin()->updateState(this); + updateViews(); emit stateChanged(d->m_state); } +void DebuggerEngine::updateViews() +{ + // FIXME: This should not be done for slave engines. + plugin()->updateState(this); +} + void DebuggerEngine::setRunInWrapperEngine(bool value) { d->m_runInWrapperEngine = value; diff --git a/src/plugins/debugger/debuggerengine.h b/src/plugins/debugger/debuggerengine.h index fd7109d59313811000f7a6796aaa3a16f3c1d9b1..d2ced9da7fbfc3995aa8dd09964b704e8c69f85a 100644 --- a/src/plugins/debugger/debuggerengine.h +++ b/src/plugins/debugger/debuggerengine.h @@ -152,7 +152,7 @@ public: void initializeFromTemplate(DebuggerEngine *other); virtual void updateWatchData(const Internal::WatchData &data, - const Internal::WatchUpdateFlags & flags = Internal::WatchUpdateFlags()); + const Internal::WatchUpdateFlags & flags = Internal::WatchUpdateFlags()); void startDebugger(DebuggerRunControl *runControl); virtual bool isSessionEngine() const; @@ -286,8 +286,11 @@ public: virtual void gotoLocation(const Internal::StackFrame &frame, bool setMarker); virtual void quitDebugger(); // called by DebuggerRunControl + virtual void updateViews(); + signals: void stateChanged(const DebuggerState &state); + void updateViewsRequested(); protected: // The base notify*() function implementation should be sufficient diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 5ceaf13f3800f70a3fdf13b4cc16188198902601..9701f9d3206c605b5efc13fa85cd5a3a561551ef 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -2994,9 +2994,12 @@ void GdbEngine::handleThreadInfo(const GdbResponse &response) const int currentThreadId = response.data.findChild("current-thread-id").data().toInt(); threadsHandler()->setCurrentThreadId(currentThreadId); - plugin()->updateState(this); // Adjust Threads combobox. - if (m_hasInferiorThreadList) - postCommand("threadnames " + theDebuggerAction(MaximalStackDepth)->value().toByteArray(), CB(handleThreadNames), id); + updateViews(); // Adjust Threads combobox. + if (m_hasInferiorThreadList) { + postCommand("threadnames " + + theDebuggerAction(MaximalStackDepth)->value().toByteArray(), + CB(handleThreadNames), id); + } } else { // Fall back for older versions: Try to get at least a list // of running threads. @@ -3034,15 +3037,15 @@ void GdbEngine::handleThreadNames(const GdbResponse &response) for (int index = 0, n = threads.size(); index != n; ++index) { ThreadData & thread = threads[index]; if (thread.id == (quint64)id) { - thread.name = decodeData(name.findChild("value").data(), name.findChild("valueencoded").data().toInt()); + thread.name = decodeData(name.findChild("value").data(), + name.findChild("valueencoded").data().toInt()); break; } } } threadsHandler()->setThreads(threads); - plugin()->updateState(this); + updateViews(); } - }