diff --git a/pykd/pymod.cpp b/pykd/pymod.cpp index 8b0fcd2..cfb0171 100644 --- a/pykd/pymod.cpp +++ b/pykd/pymod.cpp @@ -482,8 +482,8 @@ BOOST_PYTHON_MODULE( pykd ) "Return field of structure as an object attribute" ) //.def( "dataKind", &kdlib::TypedVar::getDataKind, // "Retrieves the variable classification of a data: DataIsXxx") - // .def("deref", &kdlib::TypedVar::deref, - // "Return value by pointer" ) + .def("deref", &kdlib::TypedVar::deref, + "Return value by pointer" ) .def("type", &kdlib::TypedVar::getType, "Return typeInfo instance" ) .def("__getattr__", TypedVarAdapter::getField, diff --git a/test/scripts/moduletest.py b/test/scripts/moduletest.py index 2882885..c556ecb 100644 --- a/test/scripts/moduletest.py +++ b/test/scripts/moduletest.py @@ -94,11 +94,11 @@ class ModuleTest( unittest.TestCase ): self.assertNotEqual( 0, len(lst) ) lst = target.module.enumSymbols("hello*Str") self.assertEqual( 2, len(lst) ) - lst = target.module.enumSymbols( "g_const*Value") - self.assertEqual( 2, len(lst) ) - lst = target.module.enumSymbols( "*FuncWithName?") + lst = target.module.enumSymbols( "*Const") self.assertEqual( 3, len(lst) ) - lst = target.module.enumSymbols( "*virtFunc*") + lst = target.module.enumSymbols( "*cal?Func") + self.assertEqual( 2, len(lst) ) + lst = target.module.enumSymbols( "*virtMethod*") self.assertNotEqual( 0, len(lst) ) lst = target.module.enumSymbols( "classChild" ) self.assertEqual( 0, len(lst) ) diff --git a/test/scripts/typedvar.py b/test/scripts/typedvar.py index 49d2f85..3cbae59 100644 --- a/test/scripts/typedvar.py +++ b/test/scripts/typedvar.py @@ -33,7 +33,7 @@ class TypedVarTest( unittest.TestCase ): def testPtrTo(self): tvBaseType = pykd.typedVar( pykd.typeInfo("UInt8B").ptrTo(), target.module.offset("pbigValue") ) - self.assertEqual( target.module.typedVar( "ulonglongVar" ), tvBaseType.deref() ) + self.assertEqual( target.module.typedVar( "bigValue" ), tvBaseType.deref() ) tvDiaStruct = pykd.typedVar( target.module.type("structTest").ptrTo(), target.module.offset("g_structTestPtr") ) self.assertEqual( 500, tvDiaStruct.deref().m_field1 ) diff --git a/test/scripts/typeinfo.py b/test/scripts/typeinfo.py index 00b1045..58c533f 100644 --- a/test/scripts/typeinfo.py +++ b/test/scripts/typeinfo.py @@ -139,7 +139,7 @@ class TypeInfoTest( unittest.TestCase ): self.assertEqual( "enumType", ti.m_enumField.name() ) def testPtr(self): - self.assertEqual( "ULongLong*", target.module.type( "pbigValue" ).name() ) + self.assertEqual( "UInt8B*", target.module.type( "pbigValue" ).name() ) self.assertEqual( "testStruct*", target.module.type( "testStruct*" ).name() ) self.assertEqual( "UShort*", target.module.type( "UShort*" ).name() ) self.assertEqual( "Void*", target.module.type( "voidPtr" ).name() ) @@ -219,7 +219,7 @@ class TypeInfoTest( unittest.TestCase ): def testUdtSubscribe(self): ti = pykd.typeInfo( "g_virtChild" ) - self.assertEqual( 5, len(ti) ) + self.assertEqual( 6, len(ti) ) for field in ti: str( field )