mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-21 12:53:23 +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 ):
|
if processFilter and not processFilter(process, process.UniqueProcessId, processName ):
|
||||||
return
|
return
|
||||||
|
|
||||||
|
dprintln( "" )
|
||||||
dprintln( "Process %x" % process )
|
dprintln( "Process %x" % process )
|
||||||
dprintln( "Name: %s Pid: %#x" % ( processName, process.UniqueProcessId ) )
|
dprintln( "Name: %s Pid: %#x" % ( processName, process.UniqueProcessId ) )
|
||||||
dprintln( "" )
|
dprintln( "" )
|
||||||
|
|
||||||
|
wow64reloaded = False
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
||||||
dbgCommand(".process /p /r %x" % process )
|
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 ):
|
if threadFilter and not threadFilter( thread.Tcb, thread.Cid.UniqueThread ):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
try:
|
||||||
|
|
||||||
setCurrentThread( thread )
|
setCurrentThread( thread )
|
||||||
|
|
||||||
stkNative = getStack()
|
stkNative = getStack()
|
||||||
@ -122,6 +127,9 @@ def printProcess(process,processFilter,threadFilter,moduleFilter,funcFilter,prin
|
|||||||
switchCPUMode();
|
switchCPUMode();
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
if not wow64reloaded:
|
||||||
|
dbgCommand( ".reload /user" )
|
||||||
|
wow64reloaded = True
|
||||||
stkWow64 = getStack()
|
stkWow64 = getStack()
|
||||||
|
|
||||||
except MemoryException:
|
except MemoryException:
|
||||||
@ -175,6 +183,12 @@ def printProcess(process,processFilter,threadFilter,moduleFilter,funcFilter,prin
|
|||||||
for frame in stk:
|
for frame in stk:
|
||||||
printFrame(frame, printopt)
|
printFrame(frame, printopt)
|
||||||
|
|
||||||
|
except DbgException:
|
||||||
|
|
||||||
|
printThread( thread, process )
|
||||||
|
dprintln( "Failed to get stack")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
except DbgException:
|
except DbgException:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user