mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-20 03:23:23 +08:00
[0.3.x] add: typeInfo.getClassParent, name of class methods
git-svn-id: https://pykd.svn.codeplex.com/svn@86408 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
93ad5090da
commit
260f9f8685
@ -516,6 +516,8 @@ BOOST_PYTHON_MODULE( pykd )
|
|||||||
"Return flag: type is constant" )
|
"Return flag: type is constant" )
|
||||||
.def( "getCallingConvention", &kdlib::TypeInfo::getCallingConvention,
|
.def( "getCallingConvention", &kdlib::TypeInfo::getCallingConvention,
|
||||||
"Returns an indicator of a methods calling convention: callingConvention" )
|
"Returns an indicator of a methods calling convention: callingConvention" )
|
||||||
|
.def( "getClassParent", &kdlib::TypeInfo::getClassParent,
|
||||||
|
"Return class parent" )
|
||||||
.def( "__str__", &kdlib::TypeInfo::str,
|
.def( "__str__", &kdlib::TypeInfo::str,
|
||||||
"Return type as a printable string" )
|
"Return type as a printable string" )
|
||||||
.def( "__getattr__", TypeInfoAdapter::getElementByName )
|
.def( "__getattr__", TypeInfoAdapter::getElementByName )
|
||||||
|
@ -263,6 +263,12 @@ class TypeInfoTest( unittest.TestCase ):
|
|||||||
functype = target.module.typedVar( "CdeclFuncPtr" ).type().deref()
|
functype = target.module.typedVar( "CdeclFuncPtr" ).type().deref()
|
||||||
self.assertEqual(functype.name(), "Void(__cdecl)(Int4B, Float)")
|
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):
|
def testFunctionPtrName(self):
|
||||||
funcptrtype = target.module.typedVar( "CdeclFuncPtr" ).type()
|
funcptrtype = target.module.typedVar( "CdeclFuncPtr" ).type()
|
||||||
self.assertEqual(funcptrtype.name(), "Void(__cdecl*)(Int4B, Float)")
|
self.assertEqual(funcptrtype.name(), "Void(__cdecl*)(Int4B, Float)")
|
||||||
|
|
||||||
|
functype = target.module.typedVar( "MethodPtr" ).type().deref()
|
||||||
|
self.assertEqual(functype.name(), "Void(__thiscall FuncTestClass::*)()")
|
||||||
|
Loading…
Reference in New Issue
Block a user