pykd/samples/proclist.py
SND\kernelnet_cp de82f9d737 [samples] updated: refactored samples
git-svn-id: https://pykd.svn.codeplex.com/svn@63978 9b283d60-5439-405e-af05-b73fd8c4d996
2011-04-14 16:01:29 +00:00

34 lines
690 B
Python

import sys
from pykd import *
def processInfo():
nt = loadModule( "nt" )
processList = typedVarList( nt.PsActiveProcessHead, "nt", "_EPROCESS", "ActiveProcessLinks" )
for process in processList:
print "".join( [chr(i) for i in process.ImageFileName if i != 0] )
if __name__ == "__main__":
while True:
if not isWindbgExt():
if not loadDump( sys.argv[1] ):
dprintln( sys.argv[1] + " - load failed" )
break
if not isKernelDebugging():
dprintln( "not a kernel debugging" )
break
processInfo()
break