From cc198547e9f6d61c7fbcd634bbb809e90eefbb8b Mon Sep 17 00:00:00 2001 From: hjk Date: Fri, 24 Aug 2018 12:48:20 +0200 Subject: [PATCH] Debugger: Replace module polling in gdb by handling notifications Explicit polling is still available and accessible as fall back in the gui, but is at least in theory not necessary anymore. Change-Id: Ifd184fb88bdbf5de53f5776e2c94a03f8ad44a06 Reviewed-by: Christian Stenger --- src/plugins/debugger/gdb/gdbengine.cpp | 3 +-- tests/manual/debugger/simple/simple_test_app.cpp | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 42a218b4d2d..321e3a15a35 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -504,6 +504,7 @@ void GdbEngine::handleAsyncOutput(const QString &asyncClass, const GdbMi &result // target-name="/usr/lib/libdrm.so.2", // host-name="/usr/lib/libdrm.so.2" QString id = result["id"].data(); + modulesHandler()->removeModule(result["target-name"].data()); progressPing(); showStatusMessage(tr("Library %1 unloaded.").arg(id), 1000); } else if (asyncClass == "thread-group-added") { @@ -1044,7 +1045,6 @@ void GdbEngine::updateAll() { //PENDING_DEBUG("UPDATING ALL\n"); QTC_CHECK(state() == InferiorUnrunnable || state() == InferiorStopOk); - reloadModulesInternal(); DebuggerCommand cmd(stackCommand(action(MaximalStackDepth)->value().toInt())); cmd.callback = [this](const DebuggerResponse &r) { handleStackListFrames(r, false); }; runCommand(cmd); @@ -2626,7 +2626,6 @@ void GdbEngine::loadSymbolsForStack() } } if (needUpdate) { - //reloadModulesInternal(); reloadStack(); updateLocals(); } diff --git a/tests/manual/debugger/simple/simple_test_app.cpp b/tests/manual/debugger/simple/simple_test_app.cpp index c4fc3b705b8..2beaffaaae2 100644 --- a/tests/manual/debugger/simple/simple_test_app.cpp +++ b/tests/manual/debugger/simple/simple_test_app.cpp @@ -2326,6 +2326,7 @@ namespace plugin { // Step name = lib.errorString(); } + lib.unload(); dummyStatement(&name, &res); }