From a06ba48cceb10ab3af2146f7320330073afb1811 Mon Sep 17 00:00:00 2001 From: "SND\\EreTIk_cp" Date: Thu, 16 Oct 2014 15:18:02 +0000 Subject: [PATCH] [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 --- test/scripts/typedvar.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/scripts/typedvar.py b/test/scripts/typedvar.py index 18f7d91..4e58a66 100644 --- a/test/scripts/typedvar.py +++ b/test/scripts/typedvar.py @@ -38,11 +38,11 @@ class TypedVarTest( unittest.TestCase ): tvDiaStruct = pykd.typedVar( target.module.type("structTest").ptrTo(), target.module.offset("g_structTestPtr") ) self.assertEqual( 500, tvDiaStruct.deref().m_field1 ) - #customStructTest = pykd.typeBuilder().createStruct("customStructTest", 4) - #customStructTest.append("m_field0", pykd.typeInfo("UInt4B")) - #customStructTest.append("m_field1", pykd.typeInfo("UInt8B")) - #tvCustomStruct = pykd.typedVar( customStructTest.ptrTo(), target.module.offset("g_structTestPtr") ) - #self.assertEqual( 500, tvCustomStruct.deref().m_field1 ) + customStructTest = pykd.createStruct(name="customStructTest", align=4) + customStructTest.append("m_field0", pykd.baseTypes.UInt4B) + customStructTest.append("m_field1", pykd.baseTypes.UInt8B) + tvCustomStruct = pykd.typedVar( customStructTest.ptrTo(), target.module.offset("g_structTestPtr") ) + self.assertEqual( 500, tvCustomStruct.deref().m_field1 ) def testArrayOf(self): arrayType = pykd.typeInfo("UInt8B").arrayOf(5)