pykd/snippets/reload.py
SND\kernelnet_cp ca6c731376 [+] added : go, stepin, stepover routine for control execution
[+] added : dbgBreakpointClass class for control breakpoints

git-svn-id: https://pykd.svn.codeplex.com/svn@58740 9b283d60-5439-405e-af05-b73fd8c4d996
2010-12-14 16:14:14 +00:00

29 lines
700 B
Python

#
#
#
import sys
from pykd import *
def symreload():
reloadModule( "/f" )
PsLoadedModuleList = getOffset( "nt", "PsLoadedModuleList" )
loadedModulesInfo = typedVarList( PsLoadedModuleList, "nt", "_LDR_DATA_TABLE_ENTRY", "InLoadOrderLinks" )
for module in loadedModulesInfo:
if "" == getPdbFile( module.DllBase ):
baseName = loadUnicodeString( module.BaseDllName.getAddress() )
if baseName=="ntoskrnl.exe": baseName = "nt"
reloadModule( " /u " + str(baseName) )
if __name__ == "__main__":
if not isSessionStart():
dprintln( "script is launch out of windbg" )
quit( 0 )
symreload()