CDB: Fix disassembler for 64 bit addresses.

This commit is contained in:
Friedemann Kleint
2009-11-26 08:51:43 +01:00
parent 2b23ea2a8a
commit dd651204c9
2 changed files with 9 additions and 3 deletions

View File

@@ -38,9 +38,14 @@
// Format a hex address with a given field width if possible. Convert
// to number to ensure it is not truncated should it be larger than the
// field width.
static inline void formatAddress(QTextStream &str, const QString &hexAddressS, int fieldWidth)
// field width. Check the 64 bit address format '00000001`40002c84'
static inline void formatAddress(QTextStream &str, QString hexAddressS, int fieldWidth)
{
if (hexAddressS.size() > 9) {
const int sepPos = hexAddressS.size() - 9;
if (hexAddressS.at(sepPos) == QLatin1Char('`'))
hexAddressS.remove(sepPos, 1);
}
const QChar oldPadChar = str.padChar();
const int oldFieldWidth = str.fieldWidth();
const int oldIntegerBase = str.integerBase();

View File

@@ -454,7 +454,8 @@ static inline QString removeInnerTemplateType(QString value)
// "0x4343 class list<>".
static inline QString fixValue(const QString &value, const QString &type)
{
if (value.endsWith(QLatin1Char('"'))) // Pass through strings
// Pass through strings, chars
if (value.endsWith(QLatin1Char('"')) || value.endsWith(QLatin1Char('\'')))
return value;
const int size = value.size();
// Unsigned hex numbers