diff --git a/pykd/pymod.cpp b/pykd/pymod.cpp index 3821f72..ed3e03c 100644 --- a/pykd/pymod.cpp +++ b/pykd/pymod.cpp @@ -516,6 +516,8 @@ BOOST_PYTHON_MODULE( pykd ) "Return flag: type is constant" ) .def( "getCallingConvention", &kdlib::TypeInfo::getCallingConvention, "Returns an indicator of a methods calling convention: callingConvention" ) + .def( "getClassParent", &kdlib::TypeInfo::getClassParent, + "Return class parent" ) .def( "__str__", &kdlib::TypeInfo::str, "Return type as a printable string" ) .def( "__getattr__", TypeInfoAdapter::getElementByName ) diff --git a/test/scripts/typeinfo.py b/test/scripts/typeinfo.py index 1994d61..d9be331 100644 --- a/test/scripts/typeinfo.py +++ b/test/scripts/typeinfo.py @@ -263,6 +263,12 @@ class TypeInfoTest( unittest.TestCase ): functype = target.module.typedVar( "CdeclFuncPtr" ).type().deref() self.assertEqual(functype.name(), "Void(__cdecl)(Int4B, Float)") + functype = target.module.typedVar( "MethodPtr" ).type().deref() + self.assertEqual(functype.name(), "Void(__thiscall FuncTestClass::)()") + def testFunctionPtrName(self): funcptrtype = target.module.typedVar( "CdeclFuncPtr" ).type() self.assertEqual(funcptrtype.name(), "Void(__cdecl*)(Int4B, Float)") + + functype = target.module.typedVar( "MethodPtr" ).type().deref() + self.assertEqual(functype.name(), "Void(__thiscall FuncTestClass::*)()")