Debugger: Load dumpers after possible user defined modules with CDB

As is done for GDB and LLDB.

Fixes: QTCREATORBUG-20481
Change-Id: I13e73789e175fdca675c25378a856a5482d9e8fa
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
hjk
2019-02-27 13:33:33 +01:00
parent 48d2fd6ded
commit 0523a7f38b

View File

@@ -2763,10 +2763,6 @@ void CdbEngine::setupScripting(const DebuggerResponse &response)
runCommand({"from cdbbridge import Dumper", ScriptCommand}); runCommand({"from cdbbridge import Dumper", ScriptCommand});
runCommand({"print(dir())", ScriptCommand}); runCommand({"print(dir())", ScriptCommand});
runCommand({"theDumper = Dumper()", ScriptCommand}); runCommand({"theDumper = Dumper()", ScriptCommand});
runCommand({"theDumper.loadDumpers(None)", ScriptCommand,
[this](const DebuggerResponse &response) {
watchHandler()->addDumpers(response.data["result"]["dumpers"]);
}});
const QString path = stringSetting(ExtraDumperFile); const QString path = stringSetting(ExtraDumperFile);
if (!path.isEmpty() && QFileInfo(path).isReadable()) { if (!path.isEmpty() && QFileInfo(path).isReadable()) {
@@ -2779,6 +2775,11 @@ void CdbEngine::setupScripting(const DebuggerResponse &response)
for (const auto &command : commands.split('\n', QString::SkipEmptyParts)) for (const auto &command : commands.split('\n', QString::SkipEmptyParts))
runCommand({command, ScriptCommand}); runCommand({command, ScriptCommand});
} }
runCommand({"theDumper.loadDumpers(None)", ScriptCommand,
[this](const DebuggerResponse &response) {
watchHandler()->addDumpers(response.data["result"]["dumpers"]);
}});
} }
void CdbEngine::mergeStartParametersSourcePathMap() void CdbEngine::mergeStartParametersSourcePathMap()