how to generate pdb files while building library u

2019-02-13 02:52发布

I am cross compiling from linux to windows using the mingw32 tools. I need to generate pdb files for debugging on windows. Is there a way to do this?

3条回答
趁早两清
2楼-- · 2019-02-13 03:20

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

查看更多
放我归山
3楼-- · 2019-02-13 03:39

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
查看更多
聊天终结者
4楼-- · 2019-02-13 03:44

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.

查看更多
登录 后发表回答