4

I asked this question on the gcc-help mailing list, but received no reply, so I'm trying here instead:

The GCC 7 release notes state that "Version 5 of the DWARF debugging information standard is supported": https://www.gnu.org/software/gcc/gcc-7/changes.html

However, the GCC 7 and GCC 8 documentation still states that "DWARF Version 5 is only experimental":

That "experimental" language goes back as far as GCC 5 though: https://gcc.gnu.org/onlinedocs/gcc-5.4.0/gcc/DebuggingOptions.html#DebuggingOptions

This leaves me unsure whether DWARF 5 is supported in GCC 7 and 8, or experimental (or, somehow, both?).

Is DWARF 5 really supported in GCC 8, in the sense that it is reasonable to enable it when building binaries for production or release? The debug info size savings I observe when enabling it for a large C++ project are significant enough that I'd really like to use it if possible.

acm
  • 12,183
  • 5
  • 39
  • 68
  • Why is "experimentally supporting" a feature so strange? Why do you store debugging information in release of your product? Gcc is free software released under GNU license, so you have no guarantee it will work no matter what the man page says. `Is DWARF 5 really supported in GCC 8,` - until an external entity will issue a certificate on the gcc code that it does, I don't think you will ever get an answer. If it works for you, use it. If you find a bug, post it. If you are not-satisfied with the software - it's free, don't complain, write compiler yourself. – KamilCuk Mar 03 '19 at 21:19
  • 1
    @KamilCuk - I do know what GCC is; I'm not storing debug info in release builds though do have other reasons to care about its size; and your point about the man page is disingenuous. Calling out a feature as experimental is a strong statement indicating that the feature is likely known to not work. Calling out a new feature in release notes is a weaker statement indicating that the feature is available to use. Wouldn't it be disappointing if DWARF 5 really was ready for prime time with modern GCC, but a stray note in the docs calling it experimental was scaring everyone off from using it? – acm Mar 03 '19 at 21:42
  • 1
    @KamilCuk - You altered and expanded your comment after I replied, and you are still taking an aggressively pedantic position despite my reply, for reasons that I'm sure you feel are good. But I still think you are missing the point. I'm not looking for a certificate. I want to use the feature and I'm aware of what is reasonable to expect of GCC. And I will steer clear of things marked experimental. But I *suspect* that the documentation stating that it is experimental is perhaps erroneous, and I would like a clarification from someone who knows. Nothing more! – acm Mar 03 '19 at 22:27
  • 1
    I've just tried -gdwarf-5 on windows. Both 32 & 64 bit produce executables that can't be started, unless I strip the debug information again, then they work again. So I guess that means it really is still experimental (at least on windows). – ssbssa May 30 '19 at 14:24
  • Note: This is binutils/ld bug [27268](https://sourceware.org/bugzilla/show_bug.cgi?id=27268). – ssbssa Feb 18 '21 at 11:14

0 Answers0