GCC 11 Compiler Might Finally Enable DWARF 5 Debugging By Default
For a number of years the GNU Compiler Collection has shipped experimental support for the DWARF 5 debugging data format while finally for next year's GCC 11 release it might be deemed stable and used by default.
The DWARF 5 debug data format was published back in 2017 to succeed the now decade old DWARF Version 4. With DWARF 5 there is support for better data compression, various performance improvements, better debug handling around optimized code, and other enhancements over DWARF4. DWARF 5 itself was in development for a half-decade and is detailed at DWARFstd.org.
GCC has supported the -gdwarf-5 switch for producing DWARF5 compatible debug information but the default has remained DWARF4 with the newer version 5 being "only experimental."
But with patches proposed by developer Mark Wielaard and up for discussion during a "birds of a feather" session at the Linux Plumbers Conference, GCC would finally deem their DWARF 5 support stable and use it by default. Mark's PDF slide deck for the LPC 2020 BoF can be seen for those interested in more about the DWARF 5 support ecosystem.
We'll see what happens in the days/weeks ahead but at least there are good changes that with GCC 11 in 2021 that DWARF 5 will finally be used by default.