Commit 90de4bae authored by hjk's avatar hjk

Debugger: Hex-encode LLDB disassembler source lines for transport

Unescaped quotes break the protocol.

Task-number: QTCREATORBUG-18721
Change-Id: I235c4dc33e599769bc854423ef4a7dc6f46bf58e
Reviewed-by: Alexandru Croitor's avatarAlexandru Croitor <alexandru.croitor@qt.io>
parent 885f8b53
......@@ -1649,7 +1649,7 @@ class Dumper(DumperBase):
result += '{line="%s"' % lineNumber
result += ',file="%s"' % fileName
if 0 < lineNumber and lineNumber <= len(source):
result += ',data="%s"' % source[lineNumber - 1]
result += ',hexdata="%s"' % self.hexencode(source[lineNumber - 1])
result += ',hunk="%s"}' % hunk
result += '{address="%s"' % loadAddr
result += ',data="%s %s"' % (insn.GetMnemonic(self.target),
......
......@@ -1019,6 +1019,7 @@ void LldbEngine::fetchDisassembler(DisassemblerAgent *agent)
dl.data = line["rawdata"].data();
if (!dl.data.isEmpty())
dl.data += QString(30 - dl.data.size(), QLatin1Char(' '));
dl.data += fromHex(line["hexdata"].data());
dl.data += line["data"].data();
dl.offset = line["offset"].toInt();
dl.lineNumber = line["line"].toInt();
......
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