[0.3.x] added : typeInfo.isVtbl method ( returns true if type is virtual table )

git-svn-id: https://pykd.svn.codeplex.com/svn@90846 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
SND\kernelnet_cp 2015-10-15 10:20:03 +00:00 committed by Mikhail I. Izmestev
parent 465dc199b9
commit a39cd87830
3 changed files with 9 additions and 1 deletions

View File

@ -2,7 +2,7 @@
#define PYKD_VERSION_MAJOR 0 #define PYKD_VERSION_MAJOR 0
#define PYKD_VERSION_MINOR 3 #define PYKD_VERSION_MINOR 3
#define PYKD_VERSION_SUBVERSION 0 #define PYKD_VERSION_SUBVERSION 0
#define PYKD_VERSION_BUILDNO 32 #define PYKD_VERSION_BUILDNO 33
#define __VER_STR2__(x) #x #define __VER_STR2__(x) #x
#define __VER_STR1__(x) __VER_STR2__(x) #define __VER_STR1__(x) __VER_STR2__(x)

View File

@ -722,6 +722,8 @@ BOOST_PYTHON_MODULE( pykd )
"Return flag: type is function" ) "Return flag: type is function" )
.def( "isConstant", TypeInfoAdapter::isConstant, .def( "isConstant", TypeInfoAdapter::isConstant,
"Return flag: type is constant" ) "Return flag: type is constant" )
.def("isVtbl", TypeInfoAdapter::isVtbl,
"Return true if type is virtual table" )
.def( "getCallingConvention", TypeInfoAdapter::getCallingConvention, .def( "getCallingConvention", TypeInfoAdapter::getCallingConvention,
"Returns an indicator of a methods calling convention: callingConvention" ) "Returns an indicator of a methods calling convention: callingConvention" )
.def( "getClassParent", TypeInfoAdapter::getClassParent, .def( "getClassParent", TypeInfoAdapter::getClassParent,

View File

@ -182,6 +182,12 @@ struct TypeInfoAdapter : public kdlib::TypeInfo {
return typeInfo.isFunction(); return typeInfo.isFunction();
} }
static bool isVtbl(kdlib::TypeInfo &typeInfo)
{
AutoRestorePyState pystate;
return typeInfo.isVtbl();
}
static void appendField( kdlib::TypeInfo &typeInfo, const std::wstring &fieldName, kdlib::TypeInfoPtr &fieldType ) static void appendField( kdlib::TypeInfo &typeInfo, const std::wstring &fieldName, kdlib::TypeInfoPtr &fieldType )
{ {
AutoRestorePyState pystate; AutoRestorePyState pystate;