diff --git a/share/qtcreator/debugger/lldbbridge.py b/share/qtcreator/debugger/lldbbridge.py index eb7e32524982e615273cd67939f49a6f075294af..7d3e4dc180ab1c2efc8080e994fbf06acb598878 100644 --- a/share/qtcreator/debugger/lldbbridge.py +++ b/share/qtcreator/debugger/lldbbridge.py @@ -1579,6 +1579,13 @@ class Dumper(DumperBase): error = str(result.GetError()) self.report('success="%d",output="%s",error="%s"' % (success, output, error)) + def addExtraDumper(self, args): + path = args['path'] + (head, tail) = os.path.split(path) + sys.path.insert(1, head) + #dumpermodules.append(os.path.splitext(tail)[0]) + self.report('ok') + def updateData(self, args): if 'expanded' in args: self.expandedINames = set(args['expanded'].split(',')) diff --git a/src/plugins/debugger/lldb/lldbengine.cpp b/src/plugins/debugger/lldb/lldbengine.cpp index d5d1b6d5a12e7e7b2e1475665ca10c269442f383..f543122112a8d6433006aebe56c577d3408eac91 100644 --- a/src/plugins/debugger/lldb/lldbengine.cpp +++ b/src/plugins/debugger/lldb/lldbengine.cpp @@ -273,15 +273,9 @@ void LldbEngine::setupInferior() const QString path = stringSetting(ExtraDumperFile); if (!path.isEmpty()) { - QFileInfo fi(path); - - Command cmd1("executeDebuggerCommand"); - cmd1.arg("command", "python sys.path.insert(1, '" + fi.absolutePath().toUtf8() + "')"); - runCommand(cmd1); - - Command cmd2("executeDebuggerCommand"); - cmd2.arg("python from " + fi.baseName().toUtf8() + " import *"); - runCommand(cmd2); + Command cmd("addExtraDumper"); + cmd.arg("path", path.toUtf8()); + runCommand(cmd); } const QString commands = stringSetting(ExtraDumperCommands);