mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-21 04:13:22 +08:00
[0.3.x] fixed : pykd issue #13287 ( can not create typedVar by custom-struct or union )
git-svn-id: https://pykd.svn.codeplex.com/svn@89150 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
2a757d2727
commit
a06ba48cce
@ -38,11 +38,11 @@ class TypedVarTest( unittest.TestCase ):
|
|||||||
tvDiaStruct = pykd.typedVar( target.module.type("structTest").ptrTo(), target.module.offset("g_structTestPtr") )
|
tvDiaStruct = pykd.typedVar( target.module.type("structTest").ptrTo(), target.module.offset("g_structTestPtr") )
|
||||||
self.assertEqual( 500, tvDiaStruct.deref().m_field1 )
|
self.assertEqual( 500, tvDiaStruct.deref().m_field1 )
|
||||||
|
|
||||||
#customStructTest = pykd.typeBuilder().createStruct("customStructTest", 4)
|
customStructTest = pykd.createStruct(name="customStructTest", align=4)
|
||||||
#customStructTest.append("m_field0", pykd.typeInfo("UInt4B"))
|
customStructTest.append("m_field0", pykd.baseTypes.UInt4B)
|
||||||
#customStructTest.append("m_field1", pykd.typeInfo("UInt8B"))
|
customStructTest.append("m_field1", pykd.baseTypes.UInt8B)
|
||||||
#tvCustomStruct = pykd.typedVar( customStructTest.ptrTo(), target.module.offset("g_structTestPtr") )
|
tvCustomStruct = pykd.typedVar( customStructTest.ptrTo(), target.module.offset("g_structTestPtr") )
|
||||||
#self.assertEqual( 500, tvCustomStruct.deref().m_field1 )
|
self.assertEqual( 500, tvCustomStruct.deref().m_field1 )
|
||||||
|
|
||||||
def testArrayOf(self):
|
def testArrayOf(self):
|
||||||
arrayType = pykd.typeInfo("UInt8B").arrayOf(5)
|
arrayType = pykd.typeInfo("UInt8B").arrayOf(5)
|
||||||
|
Loading…
Reference in New Issue
Block a user