简体   繁体   English

使用gdb在MS VC ++ 2010 Express中编译的调试程序

[英]Debug program compiled in MS VC++ 2010 Express with gdb

Is it possible to build executable with Microsoft Visual C++ Express, so it could be debugged with gdb? 是否可以使用Microsoft Visual C ++ Express构建可执行文件,因此可以使用gdb进行调试?

I tried C7 compatible /Z7 compiler option with /debug linker option, but resulting .pdb file is not recognized by gdb: 我尝试使用/debug链接器选项的C7兼容/Z7编译器选项,但gdb无法识别生成的.pdb文件:

(gdb) symbol-file HelloWorldVC.pdb
`HelloWorldVC.pdb': can't read symbols: File format not recognized.

GDB has a different debug format than Microsoft's compiler. GDB具有与Microsoft编译器不同的调试格式。 Indeed the PDB format is not documented. 实际上,没有记录PDB格式。 So you can't use the debug information generated by a Microsoft compiler with GDB. 因此,您无法使用Microsoft编译器使用GDB生成的调试信息。

Honestly I can't find any benefit of GDB that I would use it instead of the debugger of Microsoft Visual Studio. 老实说,我找不到GDB的任何好处,我会使用它而不是Microsoft Visual Studio的调试器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM