[0.2.x] fixed : issue #12776 ( typeInfo raises exception for templates with pointers )

git-svn-id: https://pykd.svn.codeplex.com/svn@87374 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
SND\kernelnet_cp 2014-02-26 12:03:05 +00:00 committed by Mikhail I. Izmestev
parent 5d16b1ca49
commit 8dd29afb06
2 changed files with 20 additions and 10 deletions

View File

@ -2,7 +2,7 @@
#define PYKD_VERSION_MAJOR 0 #define PYKD_VERSION_MAJOR 0
#define PYKD_VERSION_MINOR 2 #define PYKD_VERSION_MINOR 2
#define PYKD_VERSION_SUBVERSION 0 #define PYKD_VERSION_SUBVERSION 0
#define PYKD_VERSION_BUILDNO 28 #define PYKD_VERSION_BUILDNO 29
#define __VER_STR2__(x) #x #define __VER_STR2__(x) #x

View File

@ -215,16 +215,21 @@ BaseTypeVariant TypeInfo::getValue()
TypeInfoPtr TypeInfo::getTypeInfo( SymbolPtr &symScope, const std::string &symName ) TypeInfoPtr TypeInfo::getTypeInfo( SymbolPtr &symScope, const std::string &symName )
{ {
size_t pos = symName.find_first_of( "*[" );
if ( pos == std::string::npos )
{
TypeInfoPtr basePtr = getBaseTypeInfo( symName, getTypePointerSize(symScope) ); TypeInfoPtr basePtr = getBaseTypeInfo( symName, getTypePointerSize(symScope) );
if ( basePtr != 0 ) if ( basePtr != 0 )
return basePtr; return basePtr;
SymbolPtr symType = symScope->getChildByName( symName ); SymbolPtr symType;
try {
symType = symScope->getChildByName( symName );
}catch(SymbolException&)
{}
if ( symType )
{
if ( symType->getSymTag() == SymTagData ) if ( symType->getSymTag() == SymTagData )
{ {
if ( symType->getLocType() == LocIsBitField ) if ( symType->getLocType() == LocIsBitField )
@ -247,7 +252,12 @@ TypeInfoPtr TypeInfo::getTypeInfo( SymbolPtr &symScope, const std::string &symN
return getTypeInfo( symType ); return getTypeInfo( symType );
} }
size_t pos = symName.find_first_of( "*[" );
if ( pos != std::string::npos )
return getComplexType( symScope, symName ); return getComplexType( symScope, symName );
throw TypeException( symName, "symbol name is not found" );
} }
///////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////