mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-20 03:23:23 +08:00
[0.1.x] fixed : module.getSymbol failed with public symbols
git-svn-id: https://pykd.svn.codeplex.com/svn@73051 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
4398021988
commit
eb4f977ed9
@ -232,8 +232,6 @@ Module::getTypedVarByAddr( ULONG64 addr )
|
||||
|
||||
return getTypedVarByName( symbolName );
|
||||
|
||||
|
||||
|
||||
//LONG displacement;
|
||||
//pyDia::SymbolPtr diaSym =
|
||||
// getDia()->findByRvaImpl((ULONG)(addr - m_base), SymTagData, displacement);
|
||||
@ -247,13 +245,22 @@ Module::getTypedVarByAddr( ULONG64 addr )
|
||||
|
||||
ULONG Module::getRvaByName(const std::string &symName)
|
||||
{
|
||||
try {
|
||||
pyDia::SymbolPtr sym = getDia()->getChildByName( symName );
|
||||
return sym->getRva();
|
||||
}
|
||||
catch (const pyDia::Exception &) {
|
||||
}
|
||||
HRESULT hres;
|
||||
ULONG64 offset;
|
||||
|
||||
hres = m_symbols->GetOffsetByName( symName.c_str(), &offset );
|
||||
if ( SUCCEEDED(hres) )
|
||||
return (ULONG)(offset - m_base);
|
||||
|
||||
return (ULONG)m_synSymbols->getRvaByName(m_timeDataStamp, m_checkSumm, symName);
|
||||
|
||||
//try {
|
||||
// pyDia::SymbolPtr sym = getDia()->getChildByName( symName );
|
||||
// return sym->getRva();
|
||||
//}
|
||||
//catch (const pyDia::Exception &) {
|
||||
//}
|
||||
//return (ULONG)m_synSymbols->getRvaByName(m_timeDataStamp, m_checkSumm, symName);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user