Commit 5829b22b authored by hjk's avatar hjk

Debugger: Also show instruction bytes in LLDB disassembler

Change-Id: I9676e458153b745fc75a5da271524e73959fba03
Reviewed-by: default avatarChristian Stenger <christian.stenger@theqtcompany.com>
parent fbbb6ad8
......@@ -1747,12 +1747,14 @@ class Dumper(DumperBase):
result += '{line="%s"' % lineNumber
result += ',file="%s"' % fileName
if 0 < lineNumber and lineNumber <= len(source):
result += ',inst="%s"' % source[lineNumber - 1]
result += ',data="%s"' % source[lineNumber - 1]
result += ',hunk="%s"}' % hunk
result += '{address="%s"' % loadAddr
result += ',inst="%s %s"' % (insn.GetMnemonic(self.target),
result += ',data="%s %s"' % (insn.GetMnemonic(self.target),
insn.GetOperands(self.target))
result += ',func_name="%s"' % functionName
result += ',function="%s"' % functionName
rawData = insn.GetData(lldb.target).uint8s
result += ',rawdata="%s"' % ' '.join(["%02x" % x for x in rawData])
if comment:
result += ',comment="%s"' % comment
result += ',offset="%s"}' % (loadAddr - base)
......
......@@ -704,8 +704,12 @@ void LldbEngine::refreshDisassembly(const GdbMi &data)
foreach (const GdbMi &line, data["lines"].children()) {
DisassemblerLine dl;
dl.address = line["address"].toAddress();
dl.data = line["inst"].toUtf8();
dl.function = line["func-name"].toUtf8();
//dl.data = line["data"].toUtf8();
//dl.rawData = line["rawdata"].data();
dl.data = line["rawdata"].toUtf8();
if (!dl.data.isEmpty())
dl.data += QString(30 - dl.data.size(), QLatin1Char(' '));
dl.data += line["data"].toUtf8();
dl.offset = line["offset"].toInt();
dl.lineNumber = line["line"].toInt();
dl.fileName = line["file"].toUtf8();
......
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