在 WinDbg 中开始调试的基本设置和任务是什么?

发布于 2024-10-14 14:22:36 字数 420 浏览 4 评论 0原文

引用我自己的问题是否有任何书籍“教授”WinDbg?

使用 Visual Studio 调试器,我 知道我在某个特定点的位置 是不是非常简单方便 设置它以便当前 断点(源码)+反汇编+调用 堆栈+局部变量+...全部make 一起感觉。就在此时 我需要一些 WinDbg 的进步 命令,但我觉得我永远无法做到 我确信的一点 关于我实际调试的位置 运行任何高级应用程序 命令。

考虑到这一点:给定二进制文件(或者可能是转储文件),在 WinDbg 中需要执行哪些第一步才能获得可以实际分析任何内容的调试会话?

哪些设置?哪些窗户?哪些持久环境变量? ETC。

To quote myself, from the question Are there any books that “teach” WinDbg?:

With the Visual Studio debugger, I
know where I am at a given point, that
is it is very easy and convenient to
set it up so that the current
breakpoint(sourcecode)+disassembly+call
stack+local variables+... all make
sense together. It's at this point
that I'd need some advances WinDbg
commands, but I feel I never get to
the point where I feel sure enough
about where I actually am in debugging
the application to run any advanced
commands.

With this in mind: Given binaries (or maybe a dump file), What are the first steps one needs to to in WinDbg to get a debugging session where you can actually analyze anything?

Which settings? Which windows? Which persistent environment variables? Etc.

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

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

发布评论

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

评论(2

唐婉 2024-10-21 14:22:36

我过去写过这个问题,在这里: 如何使用WinDbg分析VC++应用程序的故障转储?

余生一个溪 2024-10-21 14:22:36

在搞砸了更多(更多)之后,看来这确实是由于 WinDbg 糟糕的用户界面。我现在已经成功地获得了一个标准过程,这让我开始了一半:

我发现必须完成以下设置,并且常见的设置可以保存到 WinDbg 中的工作区文件中:

  • 1st - 设置符号文件路径。这非常重要,基本上每次启动时都必须完成。 (您可以预先设置 microsoft 符号,但如果您也不为私有符号使用符号服务器,则每次开始调试转储文件时都必须手动输入正确的 PDB 文件的路径。

    此类路径的示例:

    C:\Windows\symbols\dll;SRV*C:\temp\symbols*http://msdl.microsoft.com/download/symbols;C:\my_debbugger\Application_X\Symbols_for_Dump_7

    第一部分可以在WEW文件中设置,最后部分最好添加.symbols+

  • 2nd - 我发现以下窗口很有用:命令提示符,< em>进程和线程、调用堆栈本地监视命令提示符应该是最大的,因为您花费最多。

  • 第三 - 线程命令~ - 查找它 。在帮助文件中。它允许您在线程之间切换,并且通过在屏幕上显示调用堆栈和局部变量,您应该开始感受到“您在哪里”。

  • 4th - .ecxr 显示存储在转储中的异常上下文。

After messing around some more (and more) it seems it is really down to the horrible user interface of WinDbg. I have now managed to get a standard procedure together that gets me halfway started:

I find the following settings have to be done, and the common ones can be saved to a workspace file in WinDbg:

  • 1st - Set the symbol file path. This is very important and basically has to be done every time you start it. (You can pre-setup the microsoft symbols, but if you're nor using a symbol server for your private symbols, you have to manually put the path to the correct PDBs file every time you start debugging a dump file.

    Example of such a path:

    C:\Windows\symbols\dll;SRV*C:\temp\symbols*http://msdl.microsoft.com/download/symbols;C:\my_debbugger\Application_X\Symbols_for_Dump_7

    The first part can be set up in the WEW file, the last part is best added with .symbols+

  • 2nd - I find the following windows useful: Command Prompt, Processes and Threads, Call Stack, Locals, Watch. The Command Prompt should be the largest, as you spend most time there.

  • 3rd - The Thread command ~ - look it up in the help file. It allows you to switch between threads, and by having the call stack and locals visible on the screen you should then start to get a feeling for "where you are".

  • 4th - The .ecxr which shows the exception context stored in the dump.

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