diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2010-11-24 16:51:02 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2010-11-24 16:51:02 +0100 |
commit | c6193608609cdfc72849255fee9f1301f34f5642 (patch) | |
tree | 217355b8f671be5fc882edeeceb1389b741c8820 /src/plugins/debugger/cdb2 | |
parent | d0b7c12430f6b19a619d14b915d8c498620be4b8 (diff) | |
download | qt-creator-c6193608609cdfc72849255fee9f1301f34f5642.tar.gz |
Debugger: Fix CDB Disassembler
Diffstat (limited to 'src/plugins/debugger/cdb2')
-rw-r--r-- | src/plugins/debugger/cdb2/cdbengine2.cpp | 5 | ||||
-rw-r--r-- | src/plugins/debugger/cdb2/cdbparsehelpers.cpp | 16 | ||||
-rw-r--r-- | src/plugins/debugger/cdb2/cdbparsehelpers.h | 4 |
3 files changed, 4 insertions, 21 deletions
diff --git a/src/plugins/debugger/cdb2/cdbengine2.cpp b/src/plugins/debugger/cdb2/cdbengine2.cpp index 5452548d05..17df4e0027 100644 --- a/src/plugins/debugger/cdb2/cdbengine2.cpp +++ b/src/plugins/debugger/cdb2/cdbengine2.cpp @@ -1021,7 +1021,10 @@ void CdbEngine::handleDisassembler(const CdbBuiltinCommandPtr &command) { QTC_ASSERT(qVariantCanConvert<Debugger::Internal::DisassemblerViewAgent*>(command->cookie), return;) Debugger::Internal::DisassemblerViewAgent *agent = qvariant_cast<Debugger::Internal::DisassemblerViewAgent*>(command->cookie); - agent->setContents(formatCdbDisassembler(command->reply)); + DisassemblerLines disassemblerLines; + foreach(const QByteArray &line, command->reply) + disassemblerLines.appendLine(DisassemblerLine(QString::fromLatin1(line))); + agent->setContents(disassemblerLines); } void CdbEngine::fetchMemory(Debugger::Internal::MemoryViewAgent *agent, QObject *editor, quint64 addr, quint64 length) diff --git a/src/plugins/debugger/cdb2/cdbparsehelpers.cpp b/src/plugins/debugger/cdb2/cdbparsehelpers.cpp index 1a1ad80d62..b69b8994ab 100644 --- a/src/plugins/debugger/cdb2/cdbparsehelpers.cpp +++ b/src/plugins/debugger/cdb2/cdbparsehelpers.cpp @@ -33,7 +33,6 @@ #include "threadshandler.h" #include "registerhandler.h" #include "bytearrayinputstream.h" -#include "debuggeragents.h" #include "gdb/gdbmi.h" #ifdef Q_OS_WIN # include "shared/dbgwinutils.h" @@ -98,21 +97,6 @@ QByteArray cdbAddBreakpointCommand(const Debugger::Internal::BreakpointParameter return rc; } -// Remove the address separator. Format the address exactly as -// the agent does (0xhex, as taken from frame) for the location mark to trigger. -Internal::DisassemblerLines formatCdbDisassembler(const QList<QByteArray> &in) -{ - Internal::DisassemblerLines result; - foreach(QByteArray line, in) { - // Remove 64bit separator. - if (line.size() >= 9 && line.at(8) == '`') - line.remove(8, 1); - // Ensure address is as wide as agent's address. - result.appendLine(Internal::DisassemblerLine(line)); - } - return result; -} - // Fix a CDB integer value: '00000000`0012a290' -> '12a290', '0n10' ->'10' QByteArray fixCdbIntegerValue(QByteArray t, bool stripLeadingZeros, int *basePtr /* = 0 */) { diff --git a/src/plugins/debugger/cdb2/cdbparsehelpers.h b/src/plugins/debugger/cdb2/cdbparsehelpers.h index 5ada8612e7..4d85df14f7 100644 --- a/src/plugins/debugger/cdb2/cdbparsehelpers.h +++ b/src/plugins/debugger/cdb2/cdbparsehelpers.h @@ -44,7 +44,6 @@ namespace Debugger { namespace Internal { class BreakpointData; class BreakpointParameters; -class DisassemblerLines; class StackFrame; struct ThreadData; class Register; @@ -56,9 +55,6 @@ namespace Cdb { // Convert breakpoint in CDB syntax. QByteArray cdbAddBreakpointCommand(const Debugger::Internal::BreakpointParameters &d, bool oneshot = false, int id = -1); -// Format CDB Dissambler output. -Internal::DisassemblerLines formatCdbDisassembler(const QList<QByteArray> &in); - // Convert a CDB integer value: '00000000`0012a290' -> '12a290', '0n10' ->'10' QByteArray fixCdbIntegerValue(QByteArray t, bool stripLeadingZeros = false, int *basePtr = 0); // Convert a CDB integer value into quint64 or int64 |