mesonbuild / meson

The Meson Build System
http://mesonbuild.com
Apache License 2.0
5.64k stars 1.64k forks source link

Missing support for `gcc -g3` #8540

Open byron-hawkins opened 3 years ago

byron-hawkins commented 3 years ago

The debug builds in Meson use flag -g which does not include all debug symbols. For example, we cannot use macros in GDB on a Meson debug build. The workaround is to explicitly set -g3 as a cflag. Perhaps there are pros and cons to using -g3, but I don't know of any cons.

jpakkane commented 3 years ago

I don't know of any cons.

The debug data created by -g3 is massively bigger than plain -g and generating it takes longer (I think, have not measured).

tristan957 commented 3 years ago

@byron-hawkins I think the best way to support this is to have a debug_level option. GCC supports 0-3 for instance. I think clang does as well.