}
}
+ // Strip a vtable "0x13f37b7c8 module!Class::`vftable'" to a plain pointer.
+ if (SymbolGroupValue::isVTableType(type)) {
+ const std::wstring::size_type blankPos = value->find(L' ', 2);
+ if (blankPos != std::wstring::npos)
+ value->erase(blankPos, value->size() - blankPos);
+ return;
+ }
+
// Pointers: fix '0x00000000`00000AD class bla' ... to "0xAD", but leave
// 'const char *' values as is ('0x00000000`00000AD "hallo").
if (!type.empty() && type.at(type.size() - 1) == L'*') {
return 0;
}
+// Return number of characters to strip for pointer type
+bool SymbolGroupValue::isVTableType(const std::string &t)
+{
+ const char vtableTypeC[] = "__fptr() [";
+ return t.compare(0, sizeof(vtableTypeC) - 1, vtableTypeC) == 0;
+}
+
// add pointer type 'Foo' -> 'Foo *', 'Foo *' -> 'Foo **'
std::string SymbolGroupValue::pointerType(const std::string &type)
{
static std::string moduleOfType(const std::string &type);
// pointer type, return number of characters to strip
static unsigned isPointerType(const std::string &);
+ static bool isVTableType(const std::string &t);
// add pointer type 'Foo' -> 'Foo *', 'Foo *' -> 'Foo **'
static std::string pointerType(const std::string &type);
// Symbol Name/(Expression) of a pointed-to instance ('Foo' at 0x10') ==> '*(Foo *)0x10'
return type.endsWith('*') || type.endsWith("* const");
}
+bool isVTablePointer(const QByteArray &type)
+{
+ // FIXME: That is cdb only.
+ // But no user type can be named like this, so this is safe.
+ return type.startsWith("__fptr()");
+}
+
bool isCharPointerType(const QByteArray &type)
{
return type == "char *" || type == "const char *" || type == "char const *";
return reformatInteger(data.value.toLongLong(), format);
}
- if (!isPointerType(data.type)) {
+ if (!isPointerType(data.type) && !isVTablePointer(data.type)) {
bool ok = false;
qulonglong integer = data.value.toULongLong(&ok, 0);
if (ok)
bool hasSideEffects(const QString &exp);
bool isKeyWord(const QString &exp);
bool isPointerType(const QByteArray &type);
+bool isVTablePointer(const QByteArray &type);
bool isCharPointerType(const QByteArray &type);
bool startsWithDigit(const QString &str);
QByteArray stripPointerType(QByteArray type);