[0.2.x] fixed : KM samples

git-svn-id: https://pykd.svn.codeplex.com/svn@81318 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
SND\kernelnet_cp 2012-11-22 09:11:55 +00:00 committed by Mikhail I. Izmestev
parent ed0831362b
commit f9276a7dd7
2 changed files with 14 additions and 10 deletions

View File

@ -90,14 +90,21 @@ def printDrvMajorTable( drvName ):
dprintln( "MajorFunction[%d] = %s" % ( i, findSymbol( drvObj.MajorFunction[i] ) ) ) dprintln( "MajorFunction[%d] = %s" % ( i, findSymbol( drvObj.MajorFunction[i] ) ) )
def run(): def run():
if not isWindbgExt():
if not loadDump( sys.argv[1] ):
dprintln( sys.argv[1] + " - load failed" )
return
if not isKernelDebugging():
dprintln( "not a kernel debugging" )
return
loadSymbols(); loadSymbols();
printDrvMajorTable( "afd" ) printDrvMajorTable( "afd" )
if __name__ == "__main__": if __name__ == "__main__":
if not isWindbgExt():
loadDump( sys.argv[1] )
run() run()

View File

@ -12,9 +12,6 @@ def processInfo():
print "".join( [chr(i) for i in process.ImageFileName if i != 0] ) print "".join( [chr(i) for i in process.ImageFileName if i != 0] )
def run(): def run():
processInfo()
def main():
if not isWindbgExt(): if not isWindbgExt():
if not loadDump( sys.argv[1] ): if not loadDump( sys.argv[1] ):
@ -28,6 +25,6 @@ def main():
processInfo() processInfo()
if __name__ == "__main__": if __name__ == "__main__":
main() run()