Sun Studio 12: C++ User's Guide

A.2.118 -xdebugformat=[stabs|dwarf]

The compiler is migrating the format of debugger information from the stabs format to the dwarf format as specified in ’DWARF Debugging Information Format’. The default setting for this release is -xdebugformat=stabs.

If you maintain software which reads debugging information, you now have the option to transition your tools from the stabs format to the dwarf format.

Use this option as a way of accessing the new format for the purpose of porting tools. There is no need to use this option unless you maintain software which reads debugger information, or unless a specific tool tells you that it requires debugger information in one of these formats.

Table A–31 The -xdebugformat Flags




-xdebugformat=stabs generates debugging information using the stabs standard format.


-xdebugformat=dwarf generates debugging information using the dwarf standard format.

If you do not specify -xdebugformat, the compiler assumes -xdebugformat=stabs. This option requires an argument.

This option affects the format of the data that is recorded with the -g option. Some small amount of debugging information is recorded even without -g, and the format of that information is also controlled with this option. So -xdebugformat has an effect even when -g is not used.

The dbx and Performance Analyzer software understand both stabs and dwarf format so using this option does not have any effect on the functionality of either tool.

Note –

This is a transitional interface so expect it to change in incompatible ways from release to release, even in a minor release. The details of any specific fields or values in either stabs or dwarf are also evolving.

See also the dumpstabs(1) and dwarfdump(1) man pages for more information.