[0.3.x] added : print for module class

git-svn-id: https://pykd.svn.codeplex.com/svn@84258 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
SND\kernelnet_cp 2013-07-10 13:37:03 +00:00 committed by Mikhail I. Izmestev
parent 49e4558428
commit 5e7a2b5fb4

View File

@ -22,8 +22,35 @@ struct ModuleAdapter : public kdlib::Module
return kdlib::loadModule( offset);
}
static std::wstring print( kdlib::Module& module ) {
return L"PYKD MODULE";
static std::wstring print( kdlib::Module& module )
{
std::wstringstream sstr;
//prepareSymbolFile();
sstr << L"Module: " << module.getName() << std::endl;
sstr << L"Start: " << std::hex << module.getBase() << L" End: " << module.getEnd() << L" Size: " << module.getSize() << std::endl;
//sstr << (m_unloaded ? ", UNLOADED!" : "") << std::endl;
sstr << L"Image: " << module.getImageName() << std::endl;
sstr << L"Symbols: " << module.getSymFile() << std::endl;
//if ( m_symSession )
//{
// sstr << "Symbols: " << m_symSession->getSymbolFileName() << std::endl;
// std::string buildDesc = m_symSession->getBuildDescription();
// if (!buildDesc.empty())
// sstr << "\t" << buildDesc << std::endl;
//}
//else
//{
// sstr << "Symbols: not found" << std::endl;
//}
sstr << L"Timestamp: " << module.getTimeDataStamp() << std::endl;
sstr << L"Check Sum: " << module.getCheckSum() << std::endl;
return sstr.str();
}
static python::list enumSymbols( kdlib::Module& module, const std::wstring &mask = L"*" )