如何使用符号数据调试命令行文件

发布于 2024-08-26 15:43:08 字数 303 浏览 5 评论 0原文

我有一个已编译的 .exe 文件(使用 gfortran 和 -g 选项编译)崩溃了。我可以使用 WinDBG -I 命令将 WinDBG 程序附加到它。

有趣的是,它会生成堆栈溢出:

(38f0.2830): Stack overflow - code c00000fd (!!! second chance !!!)

但是,输出显示我的程序中没有调试信息。它尝试搜索 .dbg 或 .pdb 文件,但它们不存在。我假设调试信息包含在可执行文件中(来自 unix 背景)。

I have a compiled .exe file (compiled with gfortran and -g option) that crashes. I can attach the WinDBG program to it using the WinDBG -I command.

Funny enough it generates a stack overflow:

(38f0.2830): Stack overflow - code c00000fd (!!! second chance !!!)

However, the output says that there is no debugging information in my program. It tries to search for either .dbg or .pdb files but they are not there. I would assume debugging information is included in the executable (coming from a unix-background).

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

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

发布评论

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

评论(2

千仐 2024-09-02 15:43:08

调试格式是特定于编译器的,因此您需要使用能够理解编译器生成的格式的调试器。至于 gfortran,我假设您指的是 GNU fortran,这将是 GNU gdb 调试器。

Debug formats are compiler specific, so you need to use a debugger that understands the format produced by your compiler. As by gfortran I assume you mean GNU fortran, this would be the GNU gdb debugger.

年华零落成诗 2024-09-02 15:43:08

我通过 gdb 启动程序解决了这个问题。这样,gdb就会报错,你可以发出backtrace命令。

它并不完美,所以我愿意寻求更好的解决方案,但这目前有效。

I circumvented the problem by starting the program via gdb. In this way, gdb will give an error and you can issue the backtrace command.

It's not perfect, so I'm open for better solutions, but this works for now.

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