2.14. 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.

armcl Option (and alias)

tiarmclang Option

--symdebug:dwarf (-g)

-g

The -g option causes both the armcl and tiarmclang compilers generate debug information for a compilation unit in accordance with the DWARF standard. When the -g option is specified, the armcl compiler generates DWARF version 3 debug information by default. The tiarmclang 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 tiarmclang 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.

armcl Option

tiarmclang Option

--symdebug:dwarf_version=<version>

-gdwarf-<version> -gdwarf-3

The armcl 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 tiarmclang 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 tiarmclang compiler tools.

The tiarmclang compiler provides the analogous -gdwarf-<version> option, allowing you to select between DWARF versions 2, 3 (the tiarmclang default), or 4.

armcl Option (and alias)

tiarmclang Option

--symdebug:none

(default)

Even if the -g option is not specified on the command-line, the armcl compiler still generates DWARF version 3 debug information by default. The armcl 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 tiarmclang compiler is to not generate any DWARF debug information unless the -g or the -gdwarf-<version> option is specified on the tiarmclang command-line.