有没有办法遍历windbg中的所有帧? [英] Is there a way to itereate through all frames in windbg?
问题描述
有没有办法遍历windbg中的所有帧?(或为每个堆栈帧运行 dv)
例如: ~*e !mk -cc
将遍历所有线程并调用 !mk -cc
Is there a way to iterate through all frames in windbg? (or to run dv for each stack frame)
For example: ~*e !mk -cc
will iterate through all threads and call !mk -cc
我想要的基本上是:
对于每个线程:切换到线程:
~0s
对于该线程中的每一帧:
.frame 00
dv
只是想知道是否有办法自动执行此操作?
目前我能够生成一个脚本来做:
Just wondering if there is a way to automate this?
Currently I am able to generate a script to do:
~0s
.frame 00
dv
.frame 01
dv
.frame 02
...
但这是一个多步骤的过程,我想将其全部自动化.
But this is a multistep process, and I want to automate it all.
推荐答案
您可以使用 ~e 命令按线程执行命令.然后您可以使用 !for_each_frame 为每个调用帧执行一个命令.例如:
You can use the ~e command to execute a command per-thread. Then you can use !for_each_frame to execute a command for each call frame. For example:
~*e .echo Thread Frames and Locals:; !for_each_frame dv
包含 .echo 命令只是为了标记一个线程的结束位置和下一个线程的开始位置.
The .echo command is included simply to mark where one thread ends and the next begins.
这篇关于有没有办法遍历windbg中的所有帧?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!