[0.3.x] added : module flags "unloaded" and "user mode"

git-svn-id: https://pykd.svn.codeplex.com/svn@87161 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
SND\EreTIk_cp 2014-01-27 09:03:31 +00:00 committed by Mikhail I. Izmestev
parent 09a5426933
commit a58f7d18a0
2 changed files with 16 additions and 4 deletions

View File

@ -485,10 +485,10 @@ BOOST_PYTHON_MODULE( pykd )
"Return a image file checksum: IMAGE_OPTIONAL_HEADER.CheckSum" ) "Return a image file checksum: IMAGE_OPTIONAL_HEADER.CheckSum" )
.def("timestamp", ModuleAdapter::getTimeDataStamp, .def("timestamp", ModuleAdapter::getTimeDataStamp,
"Return a low 32 bits of the time stamp of the image: IMAGE_FILE_HEADER.TimeDateStamp" ) "Return a low 32 bits of the time stamp of the image: IMAGE_FILE_HEADER.TimeDateStamp" )
//.def("unloaded", &Module::isUnloaded, .def("unloaded", ModuleAdapter::isUnloaded,
// "Returns a flag that the module was unloaded") "Returns a flag that the module was unloaded" )
//.def("um", &Module::isUserMode, .def("um", ModuleAdapter::isUserMode,
// "Returns a flag that the module is a user-mode module") "Returns a flag that the module is a user-mode module" )
//.def("queryVersion", &Module::queryVersion, //.def("queryVersion", &Module::queryVersion,
// "Return string from the module's version resources" ) // "Return string from the module's version resources" )
//.def("getVersion", &Module::getVersion, //.def("getVersion", &Module::getVersion,

View File

@ -128,6 +128,18 @@ struct ModuleAdapter : public kdlib::Module
return module.getTimeDataStamp(); return module.getTimeDataStamp();
} }
static bool isUnloaded( kdlib::Module& module )
{
AutoRestorePyState pystate;
return module.isUnloaded();
}
static bool isUserMode( kdlib::Module& module )
{
AutoRestorePyState pystate;
return module.isUserMode();
}
static std::wstring print( kdlib::Module& module ); static std::wstring print( kdlib::Module& module );
static python::list enumSymbols( kdlib::Module& module, const std::wstring &mask = L"*" ); static python::list enumSymbols( kdlib::Module& module, const std::wstring &mask = L"*" );