diff --git a/pykd/diawrapper.cpp b/pykd/diawrapper.cpp index 67acb85..c70110f 100644 --- a/pykd/diawrapper.cpp +++ b/pykd/diawrapper.cpp @@ -170,6 +170,13 @@ ULONG Symbol::getCount() return callSymbol(get_count); } +//////////////////////////////////////////////////////////////////////////////// + +int Symbol::getVirtualBasePointerOffset() +{ + return callSymbol( get_virtualBasePointerOffset); +} + //////////////////////////////////////////////////////////////////////////////// void Symbol::getValueImpl(IDiaSymbol *_symbol, VARIANT &vtValue) { @@ -241,6 +248,20 @@ bool Symbol::isBasicType() //////////////////////////////////////////////////////////////////////////////// +bool Symbol::isVirtualBaseClass() +{ + return !!callSymbol(get_virtualBaseClass); +} + +//////////////////////////////////////////////////////////////////////////////// + +bool Symbol::isIndirectVirtualBaseClass() +{ + return !!callSymbol(get_indirectVirtualBaseClass); +} + +//////////////////////////////////////////////////////////////////////////////// + ULONG Symbol::getBaseType() { return callSymbol(get_baseType); diff --git a/pykd/diawrapper.h b/pykd/diawrapper.h index d9a54f7..2646716 100644 --- a/pykd/diawrapper.h +++ b/pykd/diawrapper.h @@ -117,6 +117,10 @@ public: bool isBasicType(); + bool isVirtualBaseClass(); + + bool isIndirectVirtualBaseClass(); + ULONG getBaseType(); ULONG getBitPosition(); @@ -155,6 +159,8 @@ public: bool eq(Symbol &rhs); + int getVirtualBasePointerOffset(); + public: typedef std::pair<ULONG, const char *> ValueNameEntry; diff --git a/pykd/typeinfo.cpp b/pykd/typeinfo.cpp index 97935a9..1ae8024 100644 --- a/pykd/typeinfo.cpp +++ b/pykd/typeinfo.cpp @@ -534,7 +534,10 @@ void UdtTypeInfo::getFields( pyDia::SymbolPtr &rootSym, ULONG startOffset ) if ( symTag == SymTagBaseClass ) { - getFields( childSym, startOffset + childSym->getOffset() ); + if ( !childSym->isVirtualBaseClass() ) + { + getFields( childSym, startOffset + childSym->getOffset() ); + } } else if ( symTag == SymTagData )