forked from qt-creator/qt-creator
Debugger: Hex-Encode LLDB disassembler comment fields
They may contain quotes and possibly other data breaking the transport protocol. Change-Id: I53795bd1de54385e8d9c50088368fdc768db217b Task-number: QTCREATORBUG-15635 Reviewed-by: Alexandru Croitor <alexandru.croitor@theqtcompany.com> Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
@@ -1732,7 +1732,7 @@ class Dumper(DumperBase):
|
||||
rawData = insn.GetData(lldb.target).uint8s
|
||||
result += ',rawdata="%s"' % ' '.join(["%02x" % x for x in rawData])
|
||||
if comment:
|
||||
result += ',comment="%s"' % comment
|
||||
result += ',comment="%s"' % self.hexencode(comment)
|
||||
result += ',offset="%s"}' % (loadAddr - base)
|
||||
self.reportResult(result + ']', args)
|
||||
|
||||
|
@@ -1016,7 +1016,7 @@ void LldbEngine::fetchDisassembler(DisassemblerAgent *agent)
|
||||
dl.fileName = line["file"].toUtf8();
|
||||
dl.function = line["function"].toUtf8();
|
||||
dl.hunk = line["hunk"].toInt();
|
||||
QByteArray comment = line["comment"].data();
|
||||
QByteArray comment = QByteArray::fromHex(line["comment"].data());
|
||||
if (!comment.isEmpty())
|
||||
dl.data += QString::fromUtf8(" # " + comment);
|
||||
result.appendLine(dl);
|
||||
|
Reference in New Issue
Block a user