I want to run gcc on Windows + MSYS2|UCRT64 with the -gcodeview flag, to generate pdb files. Those are required, to generate stacktraces including line numbers in source files.
But gcc/g++ always reports, that the debug level is unrecognized: g++: error: unrecognized debug output level ‘codeview’
Do I have to compile and configure gcc with a specific flag to support CodeView?
The version of the GCC documentation you linked to is for the development branch 14.0. The current release, 13.1.0, doesn't include -gcodeview in its debug options. So it's something new added for 14.
My MSYS2/mingw64 installation is using gcc 13.1.0; I assume the ucrt64 version is too.
So, basically, to generate codeview debug information, you either need to install a development version of gcc (Possibly having to build it from source) and hope it's in a usable state, or wait for 14.1 to be released and adopted.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With