Options for Debug Information

The Intel® C++ Compiler provides basic debugging information and new features for enhanced debugging of optimized 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 emission of enhanced debug information. They must be used in conjunction with the -g option.

Option Description
-debug inline_info This option produces enhanced source position information for inlined code. This leads to greater accuracy when reporting the source location of any instruction. It also provides more information to debuggers for function call traceback. The Intel debugger, idb, has been enhanced to use the richer debug information to show simulated call frames for inlined functions. This option is off by default.
-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. The Intel debugger is able to process location lists and display values of local variables at runtime with improved accuracy. This option is off by default.
-debug extended This option turns on the -debug options described previously:
  • -debug inline_info
  • -debug variable_locations

Note

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