Using Options for Debug Information

The IntelĀ® C++ Compiler provides basic debugging information and new features for enhanced debugging of code. The basic debugging options are listed in the following table.

Option

Description

-debug all
-debug full

These options are equivalent to -g. They turn on production of basic debug information. They are off by default.

-debug none

This option turns off production of debug information. This option is on by default.

The Intel C++ Compiler improves debuggability of optimized code through enhanced support for:

The options described in the following table control generation of enhanced debug information.

Option

Description

-debug [no]expr-source-pos

This option controls whether source position information at the statement level of granularity is generated.

-debug inline-debug-info

This option produces enhanced debug information for inlined code. It provides more information to debuggers for function call traceback.

-debug semantic-stepping

This option generates information useful for breakpoints and stepping. It tells the debugger to stop only at machine instructions that achieve the final effect of a source statement.

-debug variable-locations

This option produces additional debug information for scalar local variables using a feature of the DWARF object module format known as "location lists." The runtime locations of local scalar variables are specified more accurately using this feature, i.e. whether at a given position in the code, a variable value is found in memory or a machine register.

-debug extended

This option turns on the following -debug options:

  • -debug semantic-stepping

  • -debug variable-locations



It also specifies that column numbers should appear in the line information.

Note iconNote

When the compiler needs to choose between optimization and quality of debug information, optimization is given priority.