[0.1.x] fixed : issue ( loadModule("xxxx") output insufficient information )

git-svn-id: https://pykd.svn.codeplex.com/svn@75377 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
SND\kernelnet_cp 2012-04-09 15:17:40 +00:00 committed by Mikhail I. Izmestev
parent 411735a5ee
commit d9d5cdfd8d
4 changed files with 31 additions and 10 deletions

View File

@ -37,7 +37,7 @@ Module::Module( IDebugClient4 *client, SynSymbolsPtr synSymbols, const std::stri
m_size = moduleParam.Size;
m_timeDataStamp = moduleParam.TimeDateStamp;
m_checkSumm = moduleParam.Checksum;
m_checkSum = moduleParam.Checksum;
char imageName[0x100];
@ -107,7 +107,7 @@ Module::Module( IDebugClient4 *client, SynSymbolsPtr synSymbols, ULONG64 offset
m_size = moduleParam.Size;
m_timeDataStamp = moduleParam.TimeDateStamp;
m_checkSumm = moduleParam.Checksum;
m_checkSum = moduleParam.Checksum;
}
///////////////////////////////////////////////////////////////////////////////////
@ -284,7 +284,7 @@ ULONG Module::getRvaByName(const std::string &symName)
if ( SUCCEEDED(hres) )
return (ULONG)(offset - m_base);
return (ULONG)m_synSymbols->getRvaByName(m_timeDataStamp, m_checkSumm, symName);
return (ULONG)m_synSymbols->getRvaByName(m_timeDataStamp, m_checkSum, symName);
//try {
// pyDia::SymbolPtr sym = getDia()->getChildByName( symName );
@ -380,5 +380,21 @@ python::list Module::getTypedVarArrayByType( ULONG64 address, const TypeInfoPtr
///////////////////////////////////////////////////////////////////////////////////
std::string Module::print()
{
std::stringstream sstr;
sstr << "Module: " << m_name << std::endl;
sstr << "Start: " << std::hex << m_base << " End: " << getEnd() << " Size: " << m_size << std::endl;
sstr << "Image: " << m_imageName << std::endl;
sstr << "Pdb: " << getPdbName() << std::endl;
sstr << "Timestamp: " << m_timeDataStamp << std::endl;
sstr << "Check Sum: " << m_checkSum << std::endl;
return sstr.str();
}
///////////////////////////////////////////////////////////////////////////////////
}; // end of namespace pykd

View File

@ -99,14 +99,16 @@ public:
return m_dia;
}
ULONG getCheckSumm() const {
return m_checkSumm;
ULONG getCheckSum() const {
return m_checkSum;
}
ULONG getTimeDataStamp() const {
return m_timeDataStamp;
}
std::string print();
private:
void
@ -128,7 +130,7 @@ private:
pyDia::GlobalScopePtr m_dia;
ULONG m_timeDataStamp;
ULONG m_checkSumm;
ULONG m_checkSum;
SynSymbolsPtr m_synSymbols;
};

View File

@ -603,12 +603,13 @@ BOOST_PYTHON_MODULE( pykd )
.def("containingRecord", &Module::containingRecordByType,
"Return instance of the typedVar class. It's value are loaded from the target memory."
"The start address is calculated by the same method as the standard macro CONTAINING_RECORD does" )
.def("checksum",&Module::getCheckSumm,
.def("checksum",&Module::getCheckSum,
"Return a image file checksum: IMAGE_OPTIONAL_HEADER.CheckSum" )
.def("timestamp",&Module::getTimeDataStamp,
"Return a low 32 bits of the time stamp of the image: IMAGE_FILE_HEADER.TimeDateStamp" )
.def("__getattr__", &Module::getSymbol,
"Return address of the symbol" );
"Return address of the symbol" )
.def( "__str__", &Module::print );
python::class_<DbgOut>( "dout", "dout", python::no_init )
.def( "write", &DbgOut::write );

View File

@ -66,13 +66,15 @@ def buildDoc( ioStream, formatter, apiInfo ):
for func in apiInfo.funcs:
ioStream.write( formatter.anchor( func.__name__ ) )
ioStream.write( formatter.header3( func.__name__ ) )
ioStream.write( formatter.escapeMarkup( func.__doc__) + formatter.endl() )
if func.__doc__ != None:
ioStream.write( formatter.escapeMarkup( func.__doc__) + formatter.endl() )
for cls in apiInfo.classes:
ioStream.write( formatter.anchor( cls.__name__ ) )
ioStream.write( formatter.header3( cls.__name__ ) )
ioStream.write( formatter.escapeMarkup( cls.__doc__) + formatter.endl() )
if cls.__doc__ != None:
ioStream.write( formatter.escapeMarkup( cls.__doc__) + formatter.endl() )
for m in cls.methods:
if m.__doc__ != None: