使用gdb在MS VC ++ 2010 Express中编译的调试程序 [英] Debug program compiled 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?
我尝试了使用/debug
链接器选项与C7兼容的/Z7
编译器选项,但是gdb无法识别生成的.pdb
文件:
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格式. 因此,您不能将Microsoft编译器生成的调试信息与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屋!