[pykd] added : method size() for dbgModuleClass

git-svn-id: https://pykd.svn.codeplex.com/svn@63442 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
SND\kernelnet_cp 2011-04-04 12:01:35 +00:00
parent 36db1b8769
commit 6089daf982
2 changed files with 6 additions and 0 deletions

View File

@ -169,6 +169,7 @@ BOOST_PYTHON_MODULE( pykd )
boost::python::class_<dbgModuleClass>( "dbgModuleClass" )
.def("begin", &dbgModuleClass::getBegin )
.def("end", &dbgModuleClass::getEnd )
.def("size", &dbgModuleClass::getSize )
.def("name", &dbgModuleClass::getName )
.def("contain", &dbgModuleClass::contain )
.def("image", &dbgModuleClass::getImageSymbolName )

View File

@ -78,6 +78,11 @@ public:
return m_end;
}
ULONG
getSize() const {
return (ULONG)( m_end - m_base );
}
bool
contain( ULONG64 addr ) const {
if ( *( (ULONG*)&addr + 1 ) == 0 )