Message ID | 20210219170411.23232-1-mark@klomp.org |
---|---|
State | New |
Headers | show |
Series | Document the GCC11 change to DWARF5 default. | expand |
On Fri, 2021-02-19 at 18:04 +0100, Mark Wielaard wrote: > * gcc-11/changes.html (General Improvements): Add a section on > the DWARF version 5 default. Ping. OK to commit? > diff --git a/htdocs/gcc-11/changes.html b/htdocs/gcc-11/changes.html > index 6a47b0b8..9734eee8 100644 > --- a/htdocs/gcc-11/changes.html > +++ b/htdocs/gcc-11/changes.html > @@ -139,6 +139,37 @@ a work-in-progress.</p> > <li><code>-fsanitize=kernel-hwaddress</code> to instrument kernel code.</li> > </ul> > </li> > + <li> > + <p> > + For targets that produce DWARF debugging information GCC now > + defaults to <a href="http://dwarfstd.org/doc/DWARF5.pdf">DWARF > + version 5</a> (with the exception of VxWorks and Darwin/Mac OS X > + which default to version 2 and AIX which defaults to version 4). > + This can produce up to 25% more compact debug information > + compared to earlier versions. > + <p> > + To take full advantage of DWARF version 5 GCC needs to be build > + against binutils version 2.35.2 or higher. When GCC is build > + against earlier versions of binutils GCC will still emit DWARF > + version 5 for most debuginfo data, but will generate version 4 > + debug line tables (even when explicitly given <code>-gdwarf-5</code>). > + <p> > + The following debug information consumers can process DWARF version 5: > + <ul> > + <li>GDB 8.0, or higher > + <li>valgrind 3.17.0 > + <li>elfutils 0.172, or higher (for use with systemtap, > + dwarves/pahole, perf and libabigail) > + <li>dwz 0.14 > + </ul> > + <p> > + Programs embedding libbacktrace are urged to upgrade to the version > + shipping with GCC 11. > + <p> > + To make GCC 11 generate an older DWARF version > + use <code>-g</code> together with <code>-gdwarf-2</code>, > + <code>-gdwarf-3</code> or <code>-gdwarf-4</code>. > + </li> > </ul> > > <!-- .................................................................. --> >
On 3/2/21 5:56 AM, Mark Wielaard wrote: > On Fri, 2021-02-19 at 18:04 +0100, Mark Wielaard wrote: >> * gcc-11/changes.html (General Improvements): Add a section on >> the DWARF version 5 default. > Ping. OK to commit? OK. Sorry for the delay. jeff
diff --git a/htdocs/gcc-11/changes.html b/htdocs/gcc-11/changes.html index de75b8d6..04c3c449 100644 --- a/htdocs/gcc-11/changes.html +++ b/htdocs/gcc-11/changes.html @@ -139,6 +139,36 @@ a work-in-progress.</p> <li><code>-fsanitize=kernel-hwaddress</code> to instrument kernel code.</li> </ul> </li> + <li> + <p> + For targets that produce DWARF debugging information GCC now + defaults to <a href="http://dwarfstd.org/doc/DWARF5.pdf">DWARF + version 5</a> (with the exception of VxWorks and Darwin/Mac OS X + which default to version 2 and AIX which defaults to version 4). + This can produce up to 25% more compact debug information + compared to earlier versions. + <p> + To take full advantage of DWARF version 5 GCC needs to be build + against binutils version 2.35.2 or higher. When GCC is build + against earlier versions of binutils GCC will still emit DWARF + version 5 for most debuginfo data, but will generate version 4 + debug line tables (even when explicitly given <code>-gdwarf-5</code>). + <p> + The following debug information consumers can process DWARF version 5: + <ul> + <li>GDB 8.0, or higher + <li>valgrind 3.17.0 + <li>elfutils 0.172, or higher (for use with systemtap, + dwarves/pahole, perf and libabigail). + </ul> + <p> + Programs embedding libbacktrace are urged to upgrade to the version + shipping with GCC 11. + <p> + To make GCC 11 generate an older DWARF version + use <code>-g</code> together with <code>-gdwarf-2</code>, + <code>-gdwarf-3</code> or <code>-gdwarf-4</code>. + </li> </ul> <!-- .................................................................. -->