Go to main content
Oracle® Developer Studio 12.6: Debugging a Program with dbx

Exit Print View

Updated: June 2017
 
 

Compressed Debug Sections (Oracle Solaris Only)

In addition to Ancillary Files (Oracle Solaris Only), dbx also supports debugging of compressed debug sections. Compressed debug sections are useful in compacting debugging data that can sometimes be bigger than the code itself. This issue is sometimes referred to as the "DWARF bloat" problem.

Compressed debug sections are non-allocable sections that are reduced in size with the industry standard ZLIB compression library. Documentation for ZLIB can be found at http://www.zlib.net/. The debugger recognizes compressed debug sections within input objects and automatically decompresses these sections. This operation is transparent to the user of the debugger and requires no special action.

Use the –z compress-debug-sections option to enable the compression of debug sections in the output file.

$ cc -z compress-sections[=cmp-type] demo.cc

The following lists acceptable values for cmp-type:

zlib

Compress candidates using ZLIB compression. The resulting output sections have the SHF_COMPRESSED section flag set to identify the use of compression. This is the default cmd-type, if one is not specified. For more information on the SHF_COMPRESSED section flag, see Section Compression in Oracle Solaris 11.3 Linkers and Libraries Guide.

zlib-gnu

Compress all candidate sections using ZLIB compression, using the GNU section compression format. This format requires candidate sections to have a name that begins with .debug. The resulting output sections are renamed to start with .zdebug to identify the use of compression.

For more information on compressed debug sections and for an example of using compressed debug sections, see Compressed Debug Sections in Oracle Solaris 11.3 Linkers and Libraries Guide.