how to generate pdb files while building library using mingw?

谁说胖子不能爱 提交于 2019-11-30 19:28:17

this project gives you the ability to generate the pdb, it works in most cases for debuging :

https://github.com/rainers/cv2pdb

more details can help in this post about post mortem debugging

http://blog.morlad.at/blah/mingw_postmortem

GCC/MinGW produces debug info in its own format used by GNU GDB Debugger, there is no support for Microsoft PDB format. So you can:

  1. build application on Windows with MSVC

  2. use Windows version of GNU GDB

  3. try to convert debug info to PDB and use Microsoft debuggers, but there is no mature solution

Another option is to cross-compile using llvm/clang instead of mingw, since llvm can now produce .pdb files. http://blog.llvm.org/2017/08/llvm-on-windows-now-supports-pdb-debug.html

That said, I just use cv2pdb. It doesn't translate everything correctly, but it's good enough.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!