[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:
SND\EreTIk_cp 2014-10-16 15:18:02 +00:00 committed by Mikhail I. Izmestev
parent 2a757d2727
commit a06ba48cce

View File

@ -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)