mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-29 11:53:23 +08:00
[0.1.x] fixed : issue #10581 ( 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:
parent
411735a5ee
commit
d9d5cdfd8d
@ -37,7 +37,7 @@ Module::Module( IDebugClient4 *client, SynSymbolsPtr synSymbols, const std::stri
|
|||||||
|
|
||||||
m_size = moduleParam.Size;
|
m_size = moduleParam.Size;
|
||||||
m_timeDataStamp = moduleParam.TimeDateStamp;
|
m_timeDataStamp = moduleParam.TimeDateStamp;
|
||||||
m_checkSumm = moduleParam.Checksum;
|
m_checkSum = moduleParam.Checksum;
|
||||||
|
|
||||||
char imageName[0x100];
|
char imageName[0x100];
|
||||||
|
|
||||||
@ -107,7 +107,7 @@ Module::Module( IDebugClient4 *client, SynSymbolsPtr synSymbols, ULONG64 offset
|
|||||||
|
|
||||||
m_size = moduleParam.Size;
|
m_size = moduleParam.Size;
|
||||||
m_timeDataStamp = moduleParam.TimeDateStamp;
|
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) )
|
if ( SUCCEEDED(hres) )
|
||||||
return (ULONG)(offset - m_base);
|
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 {
|
//try {
|
||||||
// pyDia::SymbolPtr sym = getDia()->getChildByName( symName );
|
// 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
|
}; // end of namespace pykd
|
||||||
|
|
||||||
|
@ -99,14 +99,16 @@ public:
|
|||||||
return m_dia;
|
return m_dia;
|
||||||
}
|
}
|
||||||
|
|
||||||
ULONG getCheckSumm() const {
|
ULONG getCheckSum() const {
|
||||||
return m_checkSumm;
|
return m_checkSum;
|
||||||
}
|
}
|
||||||
|
|
||||||
ULONG getTimeDataStamp() const {
|
ULONG getTimeDataStamp() const {
|
||||||
return m_timeDataStamp;
|
return m_timeDataStamp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string print();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -128,7 +130,7 @@ private:
|
|||||||
pyDia::GlobalScopePtr m_dia;
|
pyDia::GlobalScopePtr m_dia;
|
||||||
|
|
||||||
ULONG m_timeDataStamp;
|
ULONG m_timeDataStamp;
|
||||||
ULONG m_checkSumm;
|
ULONG m_checkSum;
|
||||||
SynSymbolsPtr m_synSymbols;
|
SynSymbolsPtr m_synSymbols;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -603,12 +603,13 @@ BOOST_PYTHON_MODULE( pykd )
|
|||||||
.def("containingRecord", &Module::containingRecordByType,
|
.def("containingRecord", &Module::containingRecordByType,
|
||||||
"Return instance of the typedVar class. It's value are loaded from the target memory."
|
"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" )
|
"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" )
|
"Return a image file checksum: IMAGE_OPTIONAL_HEADER.CheckSum" )
|
||||||
.def("timestamp",&Module::getTimeDataStamp,
|
.def("timestamp",&Module::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("__getattr__", &Module::getSymbol,
|
.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 )
|
python::class_<DbgOut>( "dout", "dout", python::no_init )
|
||||||
.def( "write", &DbgOut::write );
|
.def( "write", &DbgOut::write );
|
||||||
|
@ -66,13 +66,15 @@ def buildDoc( ioStream, formatter, apiInfo ):
|
|||||||
for func in apiInfo.funcs:
|
for func in apiInfo.funcs:
|
||||||
ioStream.write( formatter.anchor( func.__name__ ) )
|
ioStream.write( formatter.anchor( func.__name__ ) )
|
||||||
ioStream.write( formatter.header3( 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:
|
for cls in apiInfo.classes:
|
||||||
ioStream.write( formatter.anchor( cls.__name__ ) )
|
ioStream.write( formatter.anchor( cls.__name__ ) )
|
||||||
ioStream.write( formatter.header3( 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:
|
for m in cls.methods:
|
||||||
if m.__doc__ != None:
|
if m.__doc__ != None:
|
||||||
|
Loading…
Reference in New Issue
Block a user