mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-20 03:23:23 +08:00
[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:
parent
7c9621b279
commit
0288cae4f8
@ -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 )
|
||||
|
@ -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) )
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user