[0.2.x] fixed : DiaSymbol::getName

git-svn-id: https://pykd.svn.codeplex.com/svn@79630 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
SND\kernelnet_cp 2012-09-17 07:19:27 +00:00 committed by Mikhail I. Izmestev
parent eef5cf7596
commit 8b26c10a0f

View File

@ -432,7 +432,7 @@ ULONG DiaSymbol::getLocType()
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
static const boost::regex stdcallMatch("^_(\\w+)@.+$"); static const boost::regex stdcallMatch("^(\\w+)(@\\d+)?$");
std::string DiaSymbol::getName() std::string DiaSymbol::getName()
{ {
@ -440,8 +440,22 @@ std::string DiaSymbol::getName()
HRESULT hres = m_symbol->get_undecoratedName(&bstrName); HRESULT hres = m_symbol->get_undecoratedName(&bstrName);
if (S_OK != hres) if (S_OK != hres)
bstrName = callSymbol(get_name); bstrName = callSymbol(get_name);
autoBstr retValue( bstrName );
return retValue.asStr(); std::string retStr = autoBstr( bstrName ).asStr();
ULONG symTag;
hres = m_symbol->get_symTag( &symTag );
if ( S_OK == hres && symTag == SymTagPublicSymbol )
{
retStr.erase( 0, 1 );
}
boost::cmatch matchResult;
if ( boost::regex_match( retStr.c_str(), matchResult, stdcallMatch ) )
retStr= std::string( matchResult[1].first, matchResult[1].second );
return retStr;
} }
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////