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 <christian.stenger@qt.io>
This commit is contained in:
hjk
2018-08-24 12:48:20 +02:00
parent 2d631c7a0b
commit cc198547e9
2 changed files with 2 additions and 2 deletions

View File

@@ -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();
}

View File

@@ -2326,6 +2326,7 @@ namespace plugin {
// Step
name = lib.errorString();
}
lib.unload();
dummyStatement(&name, &res);
}