RFR: 8065656: Use DWARF debug symbols for Solaris
erik.helin at oracle.com
Fri Nov 21 15:30:12 UTC 2014
this patch changes the debug symbols format on Solaris from STABS
 to DWARF  for libjvm.so. Since the supported compiler on Solaris
has been updated to Oracle Solaris Studio 12.3 , the STABS debug format
is now deprecated in the supported compiler :
-xdebugformat=stabs generates debugging information
using the stabs standard format. The stabs format is no
Furthermore, in Oracle Solaris Studio 12.4, the release notes says :
The –xdebugformat=stabs for all compilers might be removed in a future
release. The only debugger format option will be –xdebugformat=dwarf,
which is currently the default.
So, it seems to be a good time to change the debug format to DWARF when
compiling with Oracle Solaris Studio. I also changed the debug format for
GCC on Solaris to be DWARF, since the STABS support in GCC is in
maintenance mode .
More reasons for using DWARF instead of STABS are:
- Better support by Oracle Studio Performance Analyzer (the performance
team have requested that we use DWARF v2 or later instead of STABS).
- DWARF provides a better debugging experience for C++ compared to STABS.
The one drawback of using DWARF compared to STABS is that the size of the
debuginfo increases. For a SPARC fastdebug build the size of
libjvm.debuginfo built with STABS is 782 MB and with DWARF 1002 MB.
To summarize, we need to change from STABS to DWARF because STABS is
deprecated in 12.3 (even "more" deprecated 12.4 given the wording in the
release notes). I would suggest to change sooner rather than later, given
that the change to DWARF also brings Oracle Studio Performance Analyzer
support as well as a better C++ debugging experience in dbx.
- Compiled with Oracle Solaris Studio 12.3 on both Solaris 11.1 on SPARC
and Solaris 11.1 on x86-64 using JPRT.
- Verified that DWARF v2 symbols are produced with objdump.
More information about the build-dev