Commit aa3cc9f7 authored by hjk's avatar hjk
Browse files

debugger: code cosmetics

parent b66a6741
......@@ -389,7 +389,7 @@ void DisassemblerViewAgent::setContents(const DisassemblerLines &contents)
d->editor->setDisplayName(_("Disassembler (%1)").arg(d->frame.function));
d->cache.insert(frameKey(d->frame), contents);
int lineNumber = contents.m_rowCache[d->frame.address];
int lineNumber = contents.lineForAddress(d->frame.address);
if (lineNumber && d->setMarker)
d->editor->markableInterface()->addMark(d->locationMark, lineNumber);
......
......@@ -27,8 +27,8 @@
**
**************************************************************************/
#ifndef DEBUGGER_disassemblerlines_H
#define DEBUGGER_disassemblerlines_H
#ifndef DEBUGGER_DISASSEMBLERLINES_H
#define DEBUGGER_DISASSEMBLERLINES_H
#include <QtCore/QString>
#include <QtCore/QHash>
......@@ -43,6 +43,7 @@ public:
DisassemblerLine() : address(0) {}
DisassemblerLine(const QString &unparsed);
public:
quint64 address;
QString data;
};
......@@ -60,12 +61,11 @@ public:
int lineForAddress(quint64 address) const;
private:
friend class DisassemblerViewAgent;
QVector<DisassemblerLine> m_data;
QHash<quint64, int> m_rowCache;
};
}
}
} // namespace Internal
} // namespace Debugger
#endif
#endif // DEBUGGER_DISASSEMBLERLINES_H
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