[pykd] added : docstrings for dbgModuleClass

git-svn-id: https://pykd.svn.codeplex.com/svn@63899 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
SND\kernelnet_cp 2011-04-12 15:01:29 +00:00
parent 305ae5000e
commit 494b59b9ef

View File

@ -141,18 +141,30 @@ BOOST_PYTHON_MODULE( pykd )
"Load string from the target buffer containing 0-terminated ansi-string" ); "Load string from the target buffer containing 0-terminated ansi-string" );
boost::python::def( "loadWStr", &loadWStr, boost::python::def( "loadWStr", &loadWStr,
"Load string from the target buffer containing 0-terminated unicode-string" ); "Load string from the target buffer containing 0-terminated unicode-string" );
boost::python::def( "loadLinkedList", &loadLinkedList ); boost::python::def( "loadLinkedList", &loadLinkedList,
boost::python::def( "ptrByte", &loadByPtr<unsigned char> ); "Return list of instances of the typedVarClass loaded from linked list in the target memory" );
boost::python::def( "ptrSignByte", &loadByPtr<char> ); boost::python::def( "ptrByte", &loadByPtr<unsigned char>,
boost::python::def( "ptrWord", &loadByPtr<unsigned short> ); "Return 1-byte unsigned value loaded by pointer" );
boost::python::def( "ptrSignWord", &loadByPtr<short> ); boost::python::def( "ptrSignByte", &loadByPtr<char>,
boost::python::def( "ptrDWord", &loadByPtr<unsigned long> ); "Return 1-byte signed value loaded by pointer" );
boost::python::def( "ptrSignDWord", &loadByPtr<long> ); boost::python::def( "ptrWord", &loadByPtr<unsigned short>,
boost::python::def( "ptrQWord", &loadByPtr<unsigned __int64> ); "Return 2-byte unsigned value loaded by pointer" );
boost::python::def( "ptrSignQWord", &loadByPtr<__int64> ); boost::python::def( "ptrSignWord", &loadByPtr<short>,
boost::python::def( "ptrPtr", &loadPtrByPtr ); "Return 2-byte signed value loaded by pointer" );
boost::python::def( "ptrMWord", &loadMWord ); boost::python::def( "ptrDWord", &loadByPtr<unsigned long>,
boost::python::def( "ptrSignMWord", &loadSignMWord ); "Return 4-byte unsigned value loaded by pointer" );
boost::python::def( "ptrSignDWord", &loadByPtr<long>,
"Return 4-byte signed value loaded by pointer" );
boost::python::def( "ptrQWord", &loadByPtr<unsigned __int64>,
"Return 8-byte unsigned value loaded by pointer" );
boost::python::def( "ptrSignQWord", &loadByPtr<__int64>,
"Return 8-byte signed value loaded by pointer" );
boost::python::def( "ptrPtr", &loadPtrByPtr,
"Return pointer value loaded by pointer" );
boost::python::def( "ptrMWord", &loadMWord,
"Return unsigned machine word ( 4-bytes for x86 and 8-bytes for x64 ) loaded by pointer" );
boost::python::def( "ptrSignMWord", &loadSignMWord,
"Return signed machine word ( 4-bytes for x86 and 8-bytes for x64 ) loaded by pointer" );
boost::python::def( "compareMemory", &compareMemory, compareMemoryOver( boost::python::args( "addr1", "addr2", "length", "phyAddr" ), boost::python::def( "compareMemory", &compareMemory, compareMemoryOver( boost::python::args( "addr1", "addr2", "length", "phyAddr" ),
"Compare two memory buffers by virtual or physical addresses" ) ); "Compare two memory buffers by virtual or physical addresses" ) );
boost::python::def( "getCurrentStack", &getCurrentStack, boost::python::def( "getCurrentStack", &getCurrentStack,
@ -188,28 +200,50 @@ BOOST_PYTHON_MODULE( pykd )
boost::python::class_<typeClass, boost::shared_ptr<typeClass> >( "typeClass", boost::python::class_<typeClass, boost::shared_ptr<typeClass> >( "typeClass",
"Class representing non-primitive type info: structure, union, etc. attributes is a fields of non-primitive type" ) "Class representing non-primitive type info: structure, union, etc. attributes is a fields of non-primitive type" )
.def("sizeof", &typeClass::size, "Return full size of non-primitive type" ) .def("sizeof", &typeClass::size,
.def("offset", &typeClass::getOffset, "Return offset as field of parent" ) "Return full size of non-primitive type" )
.def("__str__", &typeClass::print, "Return a nice string represention: print names and offsets of fields"); .def("offset", &typeClass::getOffset,
"Return offset as field of parent" )
.def("__str__", &typeClass::print,
"Return a nice string represention: print names and offsets of fields");
boost::python::class_<typedVarClass, boost::python::bases<typeClass>, boost::shared_ptr<typedVarClass> >( "typedVarClass", boost::python::class_<typedVarClass, boost::python::bases<typeClass>, boost::shared_ptr<typedVarClass> >( "typedVarClass",
"Class of non-primitive type object, child class of typeClass. Data from target is copied into object instance" ) "Class of non-primitive type object, child class of typeClass. Data from target is copied into object instance" )
.def("getAddress", &typedVarClass::getAddress, "Return virtual address" ); .def("getAddress", &typedVarClass::getAddress,
boost::python::class_<dbgModuleClass>( "dbgModuleClass" ) "Return virtual address" );
.def("begin", &dbgModuleClass::getBegin )
.def("end", &dbgModuleClass::getEnd ) boost::python::class_<dbgModuleClass>( "dbgModuleClass",
.def("size", &dbgModuleClass::getSize ) "Class representing module in the target memory" )
.def("name", &dbgModuleClass::getName ) .def("begin", &dbgModuleClass::getBegin,
.def("contain", &dbgModuleClass::contain ) "Return start address of the module" )
.def("image", &dbgModuleClass::getImageSymbolName ) .def("end", &dbgModuleClass::getEnd,
.def("pdb", &dbgModuleClass::getPdbName ) "Return end address of the module" )
.def("checksum", &dbgModuleClass::getCheckSum ) .def("size", &dbgModuleClass::getSize,
.def("timestamp", &dbgModuleClass::getTimeStamp ) "Return size of the module" )
.def("addSynSymbol", &dbgModuleClass::addSyntheticSymbol ) .def("name", &dbgModuleClass::getName,
.def("delAllSynSymbols", &dbgModuleClass::delAllSyntheticSymbols ) "Return name of the module" )
.def("delSynSymbol", &dbgModuleClass::delSyntheticSymbol ) .def("contain", &dbgModuleClass::contain,
"Check if the address belongs to the module")
.def("image", &dbgModuleClass::getImageSymbolName,
"Return the full path to the module's image file" )
.def("pdb", &dbgModuleClass::getPdbName,
"Return the full path to the module's pdb file ( symbol information )" )
.def("checksum", &dbgModuleClass::getCheckSum,
"Return checksum of the module ( from PE header )" )
.def("timestamp", &dbgModuleClass::getTimeStamp,
"Return timestamp of the module ( from PE header )" )
.def("addSynSymbol", &dbgModuleClass::addSyntheticSymbol,
"Add synthetic symbol for the module" )
.def("delAllSynSymbols", &dbgModuleClass::delAllSyntheticSymbols,
"Remove all synthetic symbols for the module" )
.def("delSynSymbol", &dbgModuleClass::delSyntheticSymbol,
"Remove specified synthetic symbol for the module" )
.def("delSynSymbolsMask", &dbgModuleClass::delSyntheticSymbolsMask ) .def("delSynSymbolsMask", &dbgModuleClass::delSyntheticSymbolsMask )
.def("__getattr__", &dbgModuleClass::getOffset ) .def("__getattr__", &dbgModuleClass::getOffset,
.def("__str__", &dbgModuleClass::print ); "Return address of the symbol" )
.def("__str__", &dbgModuleClass::print,
"Return a nice string represention of the dbgModuleClass" );
boost::python::class_<dbgExtensionClass>( boost::python::class_<dbgExtensionClass>(
"ext", "ext",
"windbg extension", "windbg extension",