forked from qt-creator/qt-creator
Debugger: Prevent LLDB choking on extra dumper paths
Change-Id: I230a05274e95430162c3f2d05de5d93bf4985b4e Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user