[0.2.x] ~workaround: undecorate x86 public varibale name

git-svn-id: https://pykd.svn.codeplex.com/svn@79570 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
SND\EreTIk_cp 2012-09-14 08:42:46 +00:00 committed by Mikhail I. Izmestev
parent 5fc53c3310
commit 13b1676d6f

View File

@ -139,6 +139,8 @@ SymbolPtr DiaSymbol::fromGlobalScope( IDiaSymbol *_symbol )
HRESULT hres = _symbol->get_machineType(&machineType);
if (S_OK != hres)
throw DiaException("IDiaSymbol::get_machineType", hres);
if (!machineType)
machineType = IMAGE_FILE_MACHINE_I386;
return SymbolPtr( new DiaSymbol(DiaSymbolPtr(_symbol), machineType) );
}
@ -397,7 +399,16 @@ std::string DiaSymbol::getName()
std::string retStr = retValue.asStr();
if ( boost::regex_match( retStr.c_str(), matchResult, stdcallMatch ) )
{
retStr= std::string( matchResult[1].first, matchResult[1].second );
}
else if (IMAGE_FILE_MACHINE_I386 == m_machineType)
{
DWORD symTag;
HRESULT hres = m_symbol->get_symTag(&symTag);
if (S_OK == hres && SymTagPublicSymbol == symTag)
retStr.erase( retStr.begin() );
}
return retStr;
}