mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-20 03:23:23 +08:00
[0.1.x] fixed : issue #10628 ( typedef is not supported )
git-svn-id: https://pykd.svn.codeplex.com/svn@75424 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
f626309edb
commit
e66c64ea54
@ -36,6 +36,9 @@ TypeInfoPtr TypeInfo::getTypeInfo( pyDia::SymbolPtr &typeSym )
|
||||
|
||||
case SymTagEnum:
|
||||
return TypeInfoPtr( new EnumTypeInfo( typeSym ) );
|
||||
|
||||
case SymTagTypedef:
|
||||
return getTypeInfo( typeSym->getType() );
|
||||
}
|
||||
|
||||
throw TypeException( typeSym->getName(), "this type is not supported" );
|
||||
|
@ -175,3 +175,7 @@ class TypeInfoTest( unittest.TestCase ):
|
||||
self.assertTrue( str(target.module.type( "g_arrOfPtrToFunc" ) ) )
|
||||
self.assertTrue( str(target.module.type( "g_unTypedPtrToFunction" ) ) )
|
||||
|
||||
def testTypedef(self):
|
||||
self.assertEqual( "structTest", pykd.typeInfo( "g_structTypeDef" ).name() )
|
||||
self.assertEqual( "structTest", pykd.typeInfo( "structTestTypeDef" ).name() )
|
||||
|
||||
|
@ -240,6 +240,10 @@ WNDENUMPROC g_ptrToFunction;
|
||||
void *g_unTypedPtrToFunction = g_ptrToFunction;
|
||||
#pragma pack( pop )
|
||||
|
||||
typedef struct structTest structTestTypeDef;
|
||||
|
||||
structTestTypeDef g_structTypeDef = { 0 };
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define InitializeListHead(ListHead) (\
|
||||
@ -304,6 +308,8 @@ void FuncWithName0()
|
||||
std::cout << g_unNamedStruct.m_fieldNestedStruct;
|
||||
std::cout << g_structNested.m_nestedFiled;
|
||||
std::cout << g_unTypedPtrToFunction;
|
||||
|
||||
std::cout << g_structTypeDef.m_field0;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user