3.13. Controlling DWARF Debug Information¶
The following command-line options control what form of debug information, if any, is generated by the compiler and is propagated to a linked executable file.
cl2000 Option (and alias) |
c29clang Option |
---|---|
--symdebug:dwarf (-g) |
-g |
The -g option causes both the cl2000 and c29clang compilers generate debug information for a compilation unit in accordance with the DWARF standard. When the -g option is specified, the cl2000 compiler generates DWARF version 3 debug information by default. The c29clang compiler also generates DWARF version 3 debug information by default when the -g option is specified on the compiler command-line.
However, please note that in the c29clang 1.0.0+sts compiler tools, the use of -gdwarf-4 may introduce debug information discontinuities with the CCS debugger. It is recommended that until these issues are addressed that you should use -gdwarf-3 for debugging.
cl2000 Option |
c29clang Option |
---|---|
--symdebug:dwarf_version=<version> |
-gdwarf-<version> -gdwarf-3 |
The cl2000 compiler provides the --symdebug:dwarf_version option to allow you to select what version of DWARF debug information will be generated by the compiler. The c29clang compiler currently only generates DWARF version 3 debug information. Support for generating DWARF version 4 and version 5 will be added in a future release of the c29clang compiler tools.
The c29clang compiler provides the analogous -gdwarf-<version> option, allowing you to select between DWARF versions 2, 3 (the c29clang default), or 4.
cl2000 Option (and alias) |
c29clang Option |
---|---|
--symdebug:none |
(default) |
Even if the -g option is not specified on the command-line, the cl2000 compiler still generates DWARF version 3 debug information by default. The cl2000 compiler’s --symdebug:none option allows you to instruct the compiler to avoid generating any debug information for a compilation unit.
The default behavior for the c29clang compiler is to not generate any DWARF debug information unless the -g or the -gdwarf-<version> option is specified on the c29clang command-line.