[0.3.x] added : typeInfo.getTypedVar method ( return typedVar instance )

git-svn-id: https://pykd.svn.codeplex.com/svn@91077 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
SND\ussrhero_cp 2016-12-04 08:17:44 +00:00 committed by Mikhail I. Izmestev
parent 7c9621b279
commit 0288cae4f8
2 changed files with 6 additions and 0 deletions

View File

@ -892,6 +892,8 @@ BOOST_PYTHON_MODULE( pykd )
"Returns an indicator of a methods calling convention: callingConvention" )
.def( "getClassParent", TypeInfoAdapter::getClassParent,
"Return class parent" )
.def( "getTypedVar", getTypedVarByTypeInfo,
"return typedVar instance" )
.def( "__str__", TypeInfoAdapter::str,
"Return type as a printable string" )
.def( "__getattr__", TypeInfoAdapter::getElementAttr )

View File

@ -407,4 +407,8 @@ class TypedVarTest( unittest.TestCase ):
g_stdString = target.module.typedVar("g_stdString")
self.assertEqual( "testString".find('S'), g_stdString.find_first_of(ord('S'), 0) )
def testGetTypedVar(self):
addr = pykd.getOffset("g_structTest")
self.assertTrue( None != target.module.type( "structTest" ).getTypedVar(addr) )