mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-20 03:23:23 +08:00
[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:
parent
9135fe36f5
commit
0b3bb3e6cb
@ -126,7 +126,11 @@ ULONG64 TypeInfo::getOffset( const std::string &fullName )
|
|||||||
|
|
||||||
inline ULONG getTypePointerSize( SymbolPtr &typeSym )
|
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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
ptr = getTypeInfo( typeSym->getType() );
|
return getTypeInfo( typeSym->getType() );
|
||||||
break;
|
|
||||||
|
|
||||||
case SymTagBaseType:
|
case SymTagBaseType:
|
||||||
ptr = getBaseTypeInfo( typeSym );
|
return getBaseTypeInfo( typeSym );
|
||||||
break;
|
|
||||||
|
|
||||||
case SymTagUDT:
|
case SymTagUDT:
|
||||||
case SymTagBaseClass:
|
case SymTagBaseClass:
|
||||||
@ -172,8 +174,7 @@ TypeInfoPtr TypeInfo::getTypeInfo( SymbolPtr &typeSym )
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case SymTagPointerType:
|
case SymTagPointerType:
|
||||||
ptr = TypeInfoPtr( new PointerTypeInfo( typeSym ) );
|
return TypeInfoPtr( new PointerTypeInfo( typeSym ) );
|
||||||
break;
|
|
||||||
|
|
||||||
case SymTagVTable:
|
case SymTagVTable:
|
||||||
ptr = TypeInfoPtr( new PointerTypeInfo( typeSym->getType() ) );
|
ptr = TypeInfoPtr( new PointerTypeInfo( typeSym->getType() ) );
|
||||||
|
@ -153,7 +153,7 @@ def printProcess(process,processFilter,threadFilter,moduleFilter,funcFilter,prin
|
|||||||
|
|
||||||
dbgCommand( ".reload /user" )
|
dbgCommand( ".reload /user" )
|
||||||
|
|
||||||
threadLst = nt.typedVarList(process.ThreadListHead, "_ETHREAD", "ThreadListEntry")
|
threadLst = nt.typedVarList(process.ThreadListHead, "_ETHREAD", "ThreadListEntry.Flink")
|
||||||
filteredThreadLst = []
|
filteredThreadLst = []
|
||||||
stackHashes = set()
|
stackHashes = set()
|
||||||
|
|
||||||
@ -226,7 +226,7 @@ def main():
|
|||||||
currentProcess = getCurrentProcess()
|
currentProcess = getCurrentProcess()
|
||||||
currentThread = getImplicitThread()
|
currentThread = getImplicitThread()
|
||||||
|
|
||||||
processLst = nt.typedVarList( nt.PsActiveProcessHead, "_EPROCESS", "ActiveProcessLinks")
|
processLst = nt.typedVarList( nt.PsActiveProcessHead, "_EPROCESS", "ActiveProcessLinks.Flink")
|
||||||
for process in processLst:
|
for process in processLst:
|
||||||
printProcess( process, processFilter, threadFilter, moduleFilter, funcFilter, printopt )
|
printProcess( process, processFilter, threadFilter, moduleFilter, funcFilter, printopt )
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user