Debugger: Fix CDB Disassembler

This commit is contained in:
Friedemann Kleint
2010-11-24 16:51:02 +01:00
parent d0b7c12430
commit c619360860
6 changed files with 14 additions and 24 deletions

View File

@@ -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 */)
{