mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-21 04:13:22 +08:00
#42 add output of a timestamp as a readable date for module print
This commit is contained in:
parent
56ca5c68e3
commit
850e986a03
@ -1,6 +1,8 @@
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "pymodule.h"
|
||||
#include <iomanip>
|
||||
#include <ctime>
|
||||
|
||||
namespace pykd {
|
||||
|
||||
@ -48,20 +50,8 @@ std::wstring ModuleAdapter::print( kdlib::Module& module )
|
||||
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;
|
||||
time_t timeStamp = module.getTimeDataStamp();
|
||||
sstr << L"Timestamp: " << timeStamp << " (" << std::put_time(std::gmtime(&timeStamp), L"%c") << L')' << std::endl;
|
||||
sstr << L"Check Sum: " << module.getCheckSum() << std::endl;
|
||||
|
||||
return sstr.str();
|
||||
|
@ -145,3 +145,7 @@ class ModuleTest( unittest.TestCase ):
|
||||
self.assertFalse("NotExist" in target.module)
|
||||
self.assertRaises(Exception, lambda md : 2 in md, target.module)
|
||||
|
||||
def testPrint(self):
|
||||
modAsStr = str(target.module)
|
||||
pass
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user