mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-21 04:13:22 +08:00
[!] 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:
parent
c1db435c56
commit
347a43d194
@ -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;
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user