[0.3.x] updated : snippet stkwalk.py

git-svn-id: https://pykd.svn.codeplex.com/svn@88448 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
SND\kernelnet_cp 2014-05-29 07:38:09 +00:00 committed by Mikhail I. Izmestev
parent d427d8192a
commit bd6ce0adaa

View File

@ -93,10 +93,13 @@ def printProcess(process,processFilter,threadFilter,moduleFilter,funcFilter,prin
if processFilter and not processFilter(process, process.UniqueProcessId, processName ):
return
dprintln( "" )
dprintln( "Process %x" % process )
dprintln( "Name: %s Pid: %#x" % ( processName, process.UniqueProcessId ) )
dprintln( "" )
wow64reloaded = False
try:
dbgCommand(".process /p /r %x" % process )
@ -111,6 +114,8 @@ def printProcess(process,processFilter,threadFilter,moduleFilter,funcFilter,prin
if threadFilter and not threadFilter( thread.Tcb, thread.Cid.UniqueThread ):
continue
try:
setCurrentThread( thread )
stkNative = getStack()
@ -122,6 +127,9 @@ def printProcess(process,processFilter,threadFilter,moduleFilter,funcFilter,prin
switchCPUMode();
try:
if not wow64reloaded:
dbgCommand( ".reload /user" )
wow64reloaded = True
stkWow64 = getStack()
except MemoryException:
@ -175,6 +183,12 @@ def printProcess(process,processFilter,threadFilter,moduleFilter,funcFilter,prin
for frame in stk:
printFrame(frame, printopt)
except DbgException:
printThread( thread, process )
dprintln( "Failed to get stack")
except DbgException: