mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-20 03:23:23 +08:00
[0.2.x] added : test testPtrToCustomType reproducing bug ( size of pointer to a custom defined type is equal zero )
git-svn-id: https://pykd.svn.codeplex.com/svn@82318 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
45cc9ea644
commit
7d6f67acd1
@ -121,4 +121,13 @@ class CustomTypesTest(unittest.TestCase):
|
|||||||
self.assertEqual( 4, pykd.typeBuilder(4).UInt1B.ptrTo().size() )
|
self.assertEqual( 4, pykd.typeBuilder(4).UInt1B.ptrTo().size() )
|
||||||
self.assertEqual( 8, pykd.typeBuilder(8).UInt1B.ptrTo().size() )
|
self.assertEqual( 8, pykd.typeBuilder(8).UInt1B.ptrTo().size() )
|
||||||
self.assertEqual( pykd.ptrSize(), pykd.typeBuilder().UInt1B.ptrTo().size() )
|
self.assertEqual( pykd.ptrSize(), pykd.typeBuilder().UInt1B.ptrTo().size() )
|
||||||
|
|
||||||
|
def testPtrToCustomType(self):
|
||||||
|
tb = pykd.typeBuilder()
|
||||||
|
mySubStruct =tb.createStruct("MySubCustomStruct")
|
||||||
|
mySubStruct.append( "m_uint1", tb.UInt1B )
|
||||||
|
mySubStruct.append( "m_uint2", tb.UInt2B )
|
||||||
|
mySubStructPtr = mySubStruct.ptrTo()
|
||||||
|
self.assertEqual( pykd.ptrSize(), mySubStructPtr.size() )
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user