Debugger[CDB]: Use new disassembler structures.

Parse CDB's ASM output, set it up with source line.
Move convenience to add source lines into DisassemblerLines
(cached).
This commit is contained in:
Friedemann Kleint
2011-04-13 13:52:03 +02:00
parent d34c81a2a6
commit 292119bb6a
6 changed files with 200 additions and 26 deletions

View File

@@ -34,7 +34,7 @@
#ifndef DEBUGGER_DISASSEMBLERLINES_H
#define DEBUGGER_DISASSEMBLERLINES_H
#include <QtCore/QString>
#include <QtCore/QStringList>
#include <QtCore/QHash>
#include <QtCore/QVector>
@@ -65,6 +65,7 @@ public:
QString function; // (ass) Function to which current instruction belongs.
uint offset; // (ass) Offset of instruction in relation to current function.
uint lineNumber; // (src) Line number in source.
QByteArray rawData; // (ass) Raw bytes of the instruction
QString data; // (ass) Instruction text, (src) source text, (cmt) arbitrary.
};
@@ -76,6 +77,9 @@ public:
bool coversAddress(quint64 address) const;
void appendUnparsed(const QString &line);
void appendLine(const DisassemblerLine &dl);
// Mixed source/assembly: Retrieve contents of source (cached)
void appendSourceLine(const QString &fileName, uint line);
int size() const { return m_data.size(); }
const DisassemblerLine &at(int i) const { return m_data.at(i); }
int lineForAddress(quint64 address) const;