forked from qt-creator/qt-creator
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 <alexandru.croitor@qt.io>
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user