kb 的结果
0:000> kb
# ChildEBP RetAddr Args to Child
00 000bf618 76fa0e00 7ffdf000 7ffda000 76ff714c ntdll!LdrpDoDebuggerBreak+0x2c
01 000bf778 76f860a7 000bf7ec 76f20000 76c245cb ntdll!LdrpInitializeProcess+0x11a9
02 000bf7c8 76f83659 000bf7ec 76f20000 00000000 ntdll!_LdrpInitialize+0x78
03 000bf7d8 00000000 000bf7ec 76f20000 00000000 ntdll!LdrInitializeThunk+0x10
当我点击 dml 链接 02 我得到
0:000> dx Debugger.Sessions[0].Processes[2684].Threads[3736].Stack.Frames[2].SwitchTo();dv /t /v
Debugger.Sessions[0].Processes[2684].Threads[3736].Stack.Frames[2].SwitchTo()
Unable to enumerate locals, Win32 error 0n87
Private symbols (symbols.pri) are required for locals.
Type ".hh dbgerr005" for details.
正如我在之前的回答中强调的那样,同样可以通过
dx @$curstack.Frames[2].SwitchTo();dv /v /t
输入这个完全等同于点击 02 链接
0:000> dx @$curstack.Frames[2].SwitchTo();dv /v /t
@$curstack.Frames[2].SwitchTo()
Unable to enumerate locals, Win32 error 0n87
Private symbols (symbols.pri) are required for locals.
Type ".hh dbgerr005" for details.
仅当您使用可用源进行调试时,这才有意义这里是堆栈和带有源的第 2 帧的示例
我正在使用 kbL 在堆栈跟踪上隐藏我的 src 行信息,然后单击第 2 帧 DML 链接,然后键入命令,因为您可以看到它打印与单击相同的信息
现在,如果您说我需要查看“RUN”字符串而不使用数字 2,您应该编写一个脚本来文本解析每一行,正如我在之前对您链接的线程的回答中向您展示的那样
0:000> kbL
# ChildEBP RetAddr Args to Child
00 (Inline) -------- -------- -------- -------- mfctest!CThreadLocal<_AFX_THREAD_STATE>::GetData
01 0025fe48 012fbc2f 015bf7a8 012fd4bd ffffffff mfctest!AfxGetThreadState
02 0025fe64 0151979e 00000000 015c6360 7ffdb000 mfctest!CWinThread::Run+0xf
03 0025fe7c 014c17d5 012e0000 00000000 00322d3e mfctest!AfxWinMain+0x93
04 (Inline) -------- -------- -------- -------- mfctest!invoke_main+0x1a
05 0025fec8 76e8ed6c 7ffdb000 0025ff14 76f837eb mfctest!__scrt_common_main_seh+0xf8
06 0025fed4 76f837eb 7ffdb000 76b22d01 00000000 kernel32!BaseThreadInitThunk+0xe
07 0025ff14 76f837be 014c1892 7ffdb000 00000000 ntdll!__RtlUserThreadStart+0x70
08 0025ff2c 00000000 014c1892 7ffdb000 00000000 ntdll!_RtlUserThreadStart+0x1b
clicking link with number 2
0:000> dx Debugger.Sessions[0].Processes[620].Threads[2228].Stack.Frames[2].SwitchTo();dv /t /v
Debugger.Sessions[0].Processes[620].Threads[2228].Stack.Frames[2].SwitchTo()
@ebx class CWinThread * this = 0x015bf7a8 {h=0xfffffffe proc={...}}
<unavailable> long lIdleCount = <value unavailable>
@eax class _AFX_THREAD_STATE * pState = 0x0153b820
<unavailable> int bIdle = <value unavailable>
using command (NOT CLICKING BUT TYPING THIS )
0:000> dx @$curstack.Frames[2].SwitchTo();dv /v /t
@$curstack.Frames[2].SwitchTo()
@ebx class CWinThread * this = 0x015bf7a8 {h=0xfffffffe proc={...}}
<unavailable> long lIdleCount = <value unavailable>
@eax class _AFX_THREAD_STATE * pState = 0x0153b820
<unavailable> int bIdle = <value unavailable>