[0.2.x] fixed: added some workaroudns for getting pointer size for old pdb for WINXP64 ( they have wrong machine type )

git-svn-id: https://pykd.svn.codeplex.com/svn@82668 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
SND\kernelnet_cp 2013-02-15 15:36:48 +00:00 committed by Mikhail I. Izmestev
parent 9135fe36f5
commit 0b3bb3e6cb
2 changed files with 10 additions and 9 deletions

View File

@ -126,7 +126,11 @@ ULONG64 TypeInfo::getOffset( const std::string &fullName )
inline ULONG getTypePointerSize( SymbolPtr &typeSym )
{
return (typeSym->getMachineType() == IMAGE_FILE_MACHINE_AMD64) ? 8 : 4;
ULONG symTag = typeSym->getSymTag();
if ( symTag != SymTagPointerType )
return (typeSym->getMachineType() == IMAGE_FILE_MACHINE_AMD64) ? 8 : 4;
return (ULONG)typeSym->getSize();
}
/////////////////////////////////////////////////////////////////////////////////////
@ -155,12 +159,10 @@ TypeInfoPtr TypeInfo::getTypeInfo( SymbolPtr &typeSym )
break;
}
ptr = getTypeInfo( typeSym->getType() );
break;
return getTypeInfo( typeSym->getType() );
case SymTagBaseType:
ptr = getBaseTypeInfo( typeSym );
break;
return getBaseTypeInfo( typeSym );
case SymTagUDT:
case SymTagBaseClass:
@ -172,8 +174,7 @@ TypeInfoPtr TypeInfo::getTypeInfo( SymbolPtr &typeSym )
break;
case SymTagPointerType:
ptr = TypeInfoPtr( new PointerTypeInfo( typeSym ) );
break;
return TypeInfoPtr( new PointerTypeInfo( typeSym ) );
case SymTagVTable:
ptr = TypeInfoPtr( new PointerTypeInfo( typeSym->getType() ) );

View File

@ -153,7 +153,7 @@ def printProcess(process,processFilter,threadFilter,moduleFilter,funcFilter,prin
dbgCommand( ".reload /user" )
threadLst = nt.typedVarList(process.ThreadListHead, "_ETHREAD", "ThreadListEntry")
threadLst = nt.typedVarList(process.ThreadListHead, "_ETHREAD", "ThreadListEntry.Flink")
filteredThreadLst = []
stackHashes = set()
@ -226,7 +226,7 @@ def main():
currentProcess = getCurrentProcess()
currentThread = getImplicitThread()
processLst = nt.typedVarList( nt.PsActiveProcessHead, "_EPROCESS", "ActiveProcessLinks")
processLst = nt.typedVarList( nt.PsActiveProcessHead, "_EPROCESS", "ActiveProcessLinks.Flink")
for process in processLst:
printProcess( process, processFilter, threadFilter, moduleFilter, funcFilter, printopt )