Skip to content
Snippets Groups Projects
Commit aa3cc9f7 authored by hjk's avatar hjk
Browse files

debugger: code cosmetics

parent b66a6741
No related branches found
No related tags found
No related merge requests found
...@@ -389,7 +389,7 @@ void DisassemblerViewAgent::setContents(const DisassemblerLines &contents) ...@@ -389,7 +389,7 @@ void DisassemblerViewAgent::setContents(const DisassemblerLines &contents)
d->editor->setDisplayName(_("Disassembler (%1)").arg(d->frame.function)); d->editor->setDisplayName(_("Disassembler (%1)").arg(d->frame.function));
d->cache.insert(frameKey(d->frame), contents); 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) if (lineNumber && d->setMarker)
d->editor->markableInterface()->addMark(d->locationMark, lineNumber); d->editor->markableInterface()->addMark(d->locationMark, lineNumber);
......
...@@ -27,8 +27,8 @@ ...@@ -27,8 +27,8 @@
** **
**************************************************************************/ **************************************************************************/
#ifndef DEBUGGER_disassemblerlines_H #ifndef DEBUGGER_DISASSEMBLERLINES_H
#define DEBUGGER_disassemblerlines_H #define DEBUGGER_DISASSEMBLERLINES_H
#include <QtCore/QString> #include <QtCore/QString>
#include <QtCore/QHash> #include <QtCore/QHash>
...@@ -43,6 +43,7 @@ public: ...@@ -43,6 +43,7 @@ public:
DisassemblerLine() : address(0) {} DisassemblerLine() : address(0) {}
DisassemblerLine(const QString &unparsed); DisassemblerLine(const QString &unparsed);
public:
quint64 address; quint64 address;
QString data; QString data;
}; };
...@@ -60,12 +61,11 @@ public: ...@@ -60,12 +61,11 @@ public:
int lineForAddress(quint64 address) const; int lineForAddress(quint64 address) const;
private: private:
friend class DisassemblerViewAgent;
QVector<DisassemblerLine> m_data; QVector<DisassemblerLine> m_data;
QHash<quint64, int> m_rowCache; QHash<quint64, int> m_rowCache;
}; };
} } // namespace Internal
} } // namespace Debugger
#endif #endif // DEBUGGER_DISASSEMBLERLINES_H
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment