Search code examples
debugginggccdebug-symbolsmsys2

Debug symbols for libgcc in MSYS2


I use the MSYS2 mingw-w64-x86_64-toolchain group to build my code and stack traces would be more useful if I had debug symbols for the standard library libgcc.

I have searched on the package manager and Google, but can't work out how to get debugging symbols for the standard library. I would expect a mingw-w64-x86_64-gcc-devel or mingw-w64-x86_64-gcc-dbgsym package.

Would I have to compile gcc from source?


Solution

  • Yes you need build GCC yourself with debug enabled. MSYS2 provide only release builds