Commit e84b999a authored by hjk's avatar hjk

Debugger: Better location for hunk number in disassembly

Change-Id: If42d8d1f027df25225b87cbbb027efd41fe1658b
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent f1ea0fac
......@@ -31,8 +31,9 @@
#include "debuggerstringutils.h"
#include <QDebug>
#include <QRegExp>
#include <QFile>
#include <QRegExp>
#include <QTextStream>
namespace Debugger {
namespace Internal {
......@@ -211,9 +212,11 @@ void DisassemblerLines::appendUnparsed(const QString &unparsed)
m_rowCache[dl.address] = m_data.size() + 1;
m_data.append(dl);
} else {
// Comment line.
// Comment or code line.
QTextStream ts(&line);
DisassemblerLine dl;
dl.data = line;
ts >> dl.lineNumber;
dl.data = line.mid(ts.pos());
m_data.append(dl);
}
}
......@@ -233,9 +236,12 @@ QString DisassemblerLine::toString(int maxOp) const
str += QString(maxOp - bytes.size(), QLatin1Char(' '));
str += data;
} else if (isCode()) {
if (hunk)
str += _("[%1]").arg(hunk);
str += someSpace;
str += QString::number(lineNumber);
if (hunk)
str += _(" [%1]").arg(hunk);
else
str += _(" ").arg(hunk);
str += data;
} else {
str += someSpace;
......
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