使用gdb在MS VC ++ 2010 Express中编译调试程序 [英] Debug program complied in MS VC++ 2010 Express with gdb
问题描述
是否可以使用Microsoft Visual C ++ Express构建可执行文件,因此可以使用gdb进行调试?
Is it possible to build executable with Microsoft Visual C++ Express, so it could be debugged with gdb?
我试过C7兼容 / Z7
编译器选项与 / debug
连接器选项,但生成的 .pdb
文件无法识别gdb:
I tried C7 compatible /Z7
compiler option with /debug
linker option, but resulting .pdb
file is not recognized by gdb:
(gdb) symbol-file HelloWorldVC.pdb
`HelloWorldVC.pdb': can't read symbols: File format not recognized.
推荐答案
GDB具有与Microsoft编译器不同的调试格式。事实上,PDB格式没有记录。
所以你不能在GDB中使用微软编译器生成的调试信息。
GDB has a different debug format than Microsoft's compiler. Indeed the PDB format is not documented. So you can't use the debug information generated by a Microsoft compiler with GDB.
老实说,我找不到GDB的任何好处,它代替了Microsoft Visual Studio的调试器。
Honestly I can't find any benefit of GDB that I would use it instead of the debugger of Microsoft Visual Studio.
这篇关于使用gdb在MS VC ++ 2010 Express中编译调试程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!