As mentioned in some bug reports it should be documented that DWARF4 is now the default for 4.8 when -g is used (and that one might need a newer version of debugger/profiling/tracing tools to use it). So I added the following:
Index: htdocs/gcc-4.8/changes.html =================================================================== RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-4.8/changes.html,v retrieving revision 1.61 diff -u -r1.61 changes.html --- htdocs/gcc-4.8/changes.html 20 Nov 2012 19:49:00 -0000 1.61 +++ htdocs/gcc-4.8/changes.html 21 Nov 2012 10:07:59 -0000 @@ -53,6 +53,15 @@ <h2>General Optimizer Improvements (and Changes)</h2> <ul> + <li>DWARF4 is now the default when generating DWARF debug information. + When -g is used on a platform that uses DWARF debugging information, + GCC will now default to -gdwarf-4 -fno-debug-types-section. + GDB 7.5, Valgrind 3.8.0 and elfutils 0.154 debug information consumers + support DWARF4 by default. Before GCC 4.8 the default version used + was DWARF2. To make GCC 4.8 generate an older DWARF version use -g + together with -gdwarf-2 or -gdwarf-3. The default for Darwin and + VxWorks is still -g-dwarf2 -gstrict-dwarf. + </li> <li>A new general optimization level, <code>-Og</code>, has been introduced. It addresses the need for fast compilation and a superior debugging experience while providing a reasonable level