summaryrefslogtreecommitdiff
path: root/tests/auto/debugger/tst_dumpers.cpp
diff options
context:
space:
mode:
authorhjk <hjk@theqtcompany.com>2015-01-30 12:36:04 +0100
committerhjk <hjk@theqtcompany.com>2015-01-30 15:35:20 +0000
commitaa39916c4101a3f98d81cd5c447c57b703e6dbcd (patch)
tree1084600d6522609cf3b004cd4378c50b17f7840c /tests/auto/debugger/tst_dumpers.cpp
parentb23182fca28878154e57df8366e2e2f829d5a948 (diff)
downloadqt-creator-aa39916c4101a3f98d81cd5c447c57b703e6dbcd.tar.gz
Debugger: Invert LLDB/Python startup order
Instead of starting LLDB through a Python script this now starts LLDB directly. This did not work a while ago but seems fine nowaday. Change-Id: I20e915070cd6addf260817c311f4160d010aa861 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com> Reviewed-by: hjk <hjk@theqtcompany.com>
Diffstat (limited to 'tests/auto/debugger/tst_dumpers.cpp')
-rw-r--r--tests/auto/debugger/tst_dumpers.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/tests/auto/debugger/tst_dumpers.cpp b/tests/auto/debugger/tst_dumpers.cpp
index 94d3ff32e2..ed0b92788f 100644
--- a/tests/auto/debugger/tst_dumpers.cpp
+++ b/tests/auto/debugger/tst_dumpers.cpp
@@ -1210,13 +1210,11 @@ void tst_Dumpers::dumper()
expanded += iname;
}
- QByteArray exe;
+ QByteArray exe = m_debuggerBinary;
QStringList args;
QByteArray cmds;
if (m_debuggerEngine == GdbEngine) {
- exe = m_debuggerBinary;
-
const QFileInfo gdbBinaryFile(QString::fromLatin1(exe));
const QByteArray uninstalledData = gdbBinaryFile.absolutePath().toLocal8Bit() + "/data-directory/python";
@@ -1245,7 +1243,6 @@ void tst_Dumpers::dumper()
cmds += "quit\n";
} else if (m_debuggerEngine == CdbEngine) {
- exe = m_debuggerBinary;
args << QLatin1String("-aqtcreatorcdbext.dll")
<< QLatin1String("-G")
<< QLatin1String("-xi")
@@ -1258,15 +1255,19 @@ void tst_Dumpers::dumper()
cmds += "!qtcreatorcdbext.locals -t -D -e " + expanded + " -v -c 0\n"
"q\n";
} else if (m_debuggerEngine == LldbEngine) {
- exe = "python";
- args << QLatin1String(dumperDir + "/lldbbridge.py")
- << QString::fromUtf8(m_debuggerBinary)
- << t->buildPath + QLatin1String("/doit")
- << QString::fromUtf8(expanded);
QFile fullLldb(t->buildPath + QLatin1String("/lldbcommand.txt"));
fullLldb.setPermissions(QFile::ReadOwner|QFile::WriteOwner|QFile::ExeOwner|QFile::ReadGroup|QFile::ReadOther);
fullLldb.open(QIODevice::WriteOnly);
- fullLldb.write(exe + ' ' + args.join(QLatin1String(" ")).toUtf8());
+ fullLldb.write(exe + ' ' + args.join(QLatin1String(" ")).toUtf8() + '\n');
+
+ cmds = "sc import sys\n"
+ "sc sys.path.insert(1, '" + dumperDir + "')\n"
+ "sc from lldbbridge import *\n"
+ "sc print(dir())\n"
+ "sc Tester('" + t->buildPath.toLatin1() + "/doit', '" + expanded + "')\n"
+ "quit\n";
+
+ fullLldb.write(cmds);
fullLldb.close();
}