Commit ed2a84c8 authored by hjk's avatar hjk
Browse files

Debugger: Prevent LLDB choking on extra dumper paths



Change-Id: I230a05274e95430162c3f2d05de5d93bf4985b4e
Reviewed-by: default avatarhjk <hjk@theqtcompany.com>
parent d7f364f9
......@@ -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(','))
......
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment