mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-21 04:13:22 +08:00
[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:
parent
d427d8192a
commit
bd6ce0adaa
@ -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:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user