[!] fixed : loadTypedVar for unnamed union tag ::<unnamed-tag>

[!] fixed : loadMemory does not throw exception and return false



git-svn-id: https://pykd.svn.codeplex.com/svn@58044 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
SND\kernelnet_cp 2010-11-25 16:13:30 +00:00
parent c1db435c56
commit 347a43d194
2 changed files with 8 additions and 13 deletions

View File

@ -20,14 +20,14 @@ loadMemory( ULONG64 address, PVOID dest, ULONG length, BOOLEAN phyAddr )
{
HRESULT hres = dbgExt->dataSpaces->ReadVirtual( address, dest, length, NULL );
if ( FAILED( hres ) )
throw DbgException( "IDebugDataSpace::ReadVirtual failed" );
return false;
}
else
{
HRESULT hres = dbgExt->dataSpaces->ReadPhysical( address, dest, length, NULL );
if ( FAILED( hres ) )
throw DbgException( "IDebugDataSpace::ReadPhysical failed" );
return false;
}
return true;

View File

@ -122,7 +122,8 @@ loadTypedVar( const std::string &moduleName, const std::string &typeName, ULONG6
hres = dbgExt->symbols->GetTypeName( moduleBase, fieldTypeId, fieldTypeName, sizeof(fieldTypeName), NULL );
std::string fieldTypeNameStr( fieldTypeName );
if ( fieldTypeNameStr == "__unnamed" || fieldTypeNameStr == "<unnamed-tag>" )
if ( fieldTypeNameStr == "__unnamed"
|| fieldTypeNameStr.find("<unnamed-tag>") < fieldTypeNameStr.size() )
continue;
ULONG fieldSize;
@ -339,7 +340,7 @@ valueLoader( ULONG64 address, ULONG size )
{
if ( size == sizeof(valType) )
{
valType v;
valType v = 0;
if ( loadMemory( address, &v, sizeof(v) ) )
return boost::python::long_( (unsigned __int64)v );
}
@ -349,7 +350,7 @@ valueLoader( ULONG64 address, ULONG size )
for ( unsigned int i = 0; i < size / sizeof(valType); ++i )
{
valType v;
valType v = 0;
if ( !loadMemory( address + i * sizeof(valType), &v, sizeof(v) ) )
return boost::python::object();
@ -362,12 +363,6 @@ valueLoader( ULONG64 address, ULONG size )
return boost::python::object();
}
///////////////////////////////////////////////////////////////////////////////////
boost::python::object
loadComplexType( const std::string &typeName, ULONG64 address, ULONG size )
{
return boost::python::object();
}
///////////////////////////////////////////////////////////////////////////////////