使用 rebase.exe 从 msys/mingw gcc 构建的 dll 中提取调试信息?
我正在尝试分析小型崩溃转储并需要符号文件才能获取有关崩溃的更多详细信息。我目前刚刚看到: “034eff74 0086eee9 00000000 0089d58d 034eff94 app_integrator!ZNK14ACE_Data_Block4baseEv + 0x6”
是否可以将调试信息从msys / mingw gcc构建的dll中提取为windbg可读格式?如果没有,是否有其他方法可以获取更详细的信息,例如以某种方式加载 MAP 文件?
该 dll 及其包含的所有 .o 文件都是使用 -g 标志构建的。
I'm trying to analyze a mini crash dump and need symbol files in order to get more details about the crash. Im currently just seeing:
"034eff74 0086eee9 00000000 0089d58d 034eff94 app_integrator!ZNK14ACE_Data_Block4baseEv+0x6"
Is it possible to extract debugging information from a msys/mingw gcc built dll into a windbg readable format? If not, is there any other way of getting more detailed information, like loading a MAP file in some way?
The dll and all it's contained .o files are built with the -g flag.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Windbg 无法处理 mingw 安装上的 -g 生成的调试信息。然而,据称它可以处理 COFF 符号。
如果 DLL 的源文件足够小,您可能可以获得 COFF 调试信息来构建(-gcoff 而不是 -g)。
因此,Windbg 可以(据称)处理 COFF 符号,而 GCC 可以生成它们。所以从那里开始应该很容易,对吧?我试图用 Visual Studio 2008 生成的 Win32 可执行文件来完成此操作,该可执行文件正在加载 gcc 编译的 DLL。不幸的是,对我来说,使用 -gcoff 编译不起作用。 Mingw 的 gcc 不会为代码超过 64k 行的项目生成 COFF 符号。我使用的 DLL 明显大于 64K 代码行。遗憾的是,我不得不承认,我放弃了,转而依靠可靠的 OutputDebugString。否则我就能给出更完整的指示。我不想研究让 gcc 对较大的源文件执行 COFF 符号的选项,或者编写调试扩展以将 DWARF 或 STABS 数据解析到 Windbg 的内部符号表中的替代选项。
顺便说一句,我解决了这个问题!
可以找到更多建议 在此论坛帖子中,网址为:windbg.info。
Windbg can't cope with the debugging information that will be generated by -g on a mingw installation. However, it can allegedly cope with COFF symbols.
If the source files for your DLL are small enough, you can probably get COFF debug information to build (-gcoff rather than -g).
So, Windbg can (allegedly) handle COFF symbols and GCC can generate them. So it should be easy from there, right? I was trying to do exactly this with a Win32 executable generated by Visual Studio 2008 that was loading a gcc-compiled DLL. Unfortunately for me, compiling with -gcoff didn't work. Mingw's gcc won't generate COFF symbols for projects with more than 64k lines of code. The DLL I was using was distincly larger then 64K code lines. Sadly I have to admit, I gave up and fell back on the trusty OutputDebugString. Otherwise I'd be able to give more complete instructions. I didn't fancy investigating the option of making gcc do COFF symbols for larger source files, or the alternative option of writing a debugging extension to parse DWARF or STABS data into windbg's internal symbol tables.
I fixed the issue, by the way!
Further suggestions can be found in this forum post at windbg.info.