从内存地址到源代码行

发布于 2024-10-29 02:21:28 字数 946 浏览 2 评论 0原文

我正在使用 WinDBG 并具有以下堆栈跟踪:

ntdll!NtTerminateProcess+0xa
KERNELBASE!TerminateProcess+0x2f
MSVCR90!_invoke_watson+0x11c [f:\dd\vctools\crt_bld\self_64_amd64\crt\src\invarg.c @ 234]
MSVCR90!_invalid_parameter+0x70 [f:\dd\vctools\crt_bld\self_64_amd64\crt\src\invarg.c @ 115]
MSVCR90!fgetpos+0x33 [f:\dd\vctools\crt_bld\self_64_amd64\crt\src\fgetpos.c @ 45]
CleanPayload!DoSomething+0x22 [c:\users\brent.arias\documents\visual studio 2008\projects\samplecpplibrary\cleanpayload\cleanpayload.cpp @ 68]
CleanPayload!main+0x1c [c:\users\brent.arias\documents\visual studio 2008\projects\samplecpplibrary\cleanpayload\cleanpayload.cpp @ 115]
CleanPayload!__tmainCRTStartup+0x11a [f:\dd\vctools\crt_bld\self_64_amd64\crt\src\crtexe.c @ 586]
kernel32!BaseThreadInitThunk+0xd
ntdll!RtlUserThreadStart+0x1d

显然,调试器知道每个堆栈帧指向哪一行代码,因为它显示“@”后面的数字。我很高兴可以在源窗格中按 crtl-l 并输入行号,但为什么它不能为我执行此操作?有没有办法单击调试窗口并说“跳转到源代码中的这一点”,而无需我自己输入它?

I'm using WinDBG and have the following stack trace:

ntdll!NtTerminateProcess+0xa
KERNELBASE!TerminateProcess+0x2f
MSVCR90!_invoke_watson+0x11c [f:\dd\vctools\crt_bld\self_64_amd64\crt\src\invarg.c @ 234]
MSVCR90!_invalid_parameter+0x70 [f:\dd\vctools\crt_bld\self_64_amd64\crt\src\invarg.c @ 115]
MSVCR90!fgetpos+0x33 [f:\dd\vctools\crt_bld\self_64_amd64\crt\src\fgetpos.c @ 45]
CleanPayload!DoSomething+0x22 [c:\users\brent.arias\documents\visual studio 2008\projects\samplecpplibrary\cleanpayload\cleanpayload.cpp @ 68]
CleanPayload!main+0x1c [c:\users\brent.arias\documents\visual studio 2008\projects\samplecpplibrary\cleanpayload\cleanpayload.cpp @ 115]
CleanPayload!__tmainCRTStartup+0x11a [f:\dd\vctools\crt_bld\self_64_amd64\crt\src\crtexe.c @ 586]
kernel32!BaseThreadInitThunk+0xd
ntdll!RtlUserThreadStart+0x1d

Clearly the debugger knows what line of code each stack frame points to, as it shows that number after the '@'. I'm glad that I can hit crtl-l on the source pane and type in the line number, but why can't it do this for me? Is there a way to click on the debug window and say "jump to this point in source" without me having to type it in myself?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

孤凫 2024-11-05 02:21:28

它可以做到这一点,只是不是从任何窗口。它在“调用堆栈”窗口 (Alt+6) 中工作 - 双击已映射到代码行的框架,它将让您到达源文件中的行。如果当前未在 WinDbg 中打开该文件,它将打开该文件。

It can do this, just not from any window. It works from Call Stack window (Alt+6) -- double click on the frame that has mapped to the line of code and it will get you to the line in source file. It opens the file if it is not currently opened in WinDbg.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文