mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-29 20:03:33 +08:00
[!] typedVar routine fixed: loading array of complex type
git-svn-id: https://pykd.svn.codeplex.com/svn@57284 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
bea30af123
commit
d389e26054
@ -101,7 +101,7 @@ loadTypedVar( const std::string &moduleName, const std::string &typeName, ULONG6
|
|||||||
throw DbgException( "IDebugSymbol::GetTypeSize failed" );
|
throw DbgException( "IDebugSymbol::GetTypeSize failed" );
|
||||||
|
|
||||||
typedVarClass temp( address, typeSize );
|
typedVarClass temp( address, typeSize );
|
||||||
boost::python::object var( temp );
|
boost::python::object var( temp );
|
||||||
|
|
||||||
for ( ULONG i = 0; ; ++i )
|
for ( ULONG i = 0; ; ++i )
|
||||||
{
|
{
|
||||||
@ -137,6 +137,7 @@ loadTypedVar( const std::string &moduleName, const std::string &typeName, ULONG6
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
std::string fieldTypeNameStr( fieldTypeName );
|
std::string fieldTypeNameStr( fieldTypeName );
|
||||||
|
|
||||||
if ( fieldTypeNameStr.find("*") < fieldTypeNameStr.size() )
|
if ( fieldTypeNameStr.find("*") < fieldTypeNameStr.size() )
|
||||||
@ -144,6 +145,29 @@ loadTypedVar( const std::string &moduleName, const std::string &typeName, ULONG6
|
|||||||
var.attr( fieldName ) = valueLoader<void*>( address + fieldOffset, fieldSize );
|
var.attr( fieldName ) = valueLoader<void*>( address + fieldOffset, fieldSize );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
if ( fieldTypeNameStr.find("[]") < fieldTypeNameStr.size() )
|
||||||
|
{
|
||||||
|
std::string arrayElemType = std::string( fieldTypeNameStr, 0, fieldTypeNameStr.size() - 2 );
|
||||||
|
|
||||||
|
ULONG arrayElemTypeId;
|
||||||
|
hres = dbgExt->symbols->GetTypeId( moduleBase, arrayElemType.c_str(), &arrayElemTypeId );
|
||||||
|
if ( FAILED( hres ) )
|
||||||
|
throw DbgException( "IDebugSymbol::GetTypeId failed" );
|
||||||
|
|
||||||
|
ULONG arayElemTypeSize;
|
||||||
|
hres = dbgExt->symbols->GetTypeSize( moduleBase, arrayElemTypeId, &arayElemTypeSize );
|
||||||
|
if ( FAILED( hres ) )
|
||||||
|
throw DbgException( "IDebugSymbol::GetTypeSize failed" );
|
||||||
|
|
||||||
|
boost::python::dict arr;
|
||||||
|
|
||||||
|
for ( unsigned int i = 0; i < typeSize / sizeof(arayElemTypeSize); ++i )
|
||||||
|
arr[i] = loadTypedVar( moduleName, arrayElemType, address + fieldOffset + i * arayElemTypeSize );
|
||||||
|
|
||||||
|
var.attr( fieldName ) = arr;
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
var.attr( fieldName ) = loadTypedVar( moduleName, fieldTypeName, address + fieldOffset );
|
var.attr( fieldName ) = loadTypedVar( moduleName, fieldTypeName, address + fieldOffset );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user