Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 6/24/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

debug (Linux*)

Enables or disables generation of debugging information.

Syntax

Linux:

-debug[=keyword]

Windows:

None

Arguments

keyword

Is the type of debugging information to be generated. Possible values are:

none

Disables generation of debugging information.

full or all

Generates complete debugging information. It is the same as specifying -debug with no keyword.

minimal

Generates line number information for debugging.

[no]emit-column

Determines whether the compiler generates column number information for debugging.

[no]inline-debug-info
(ifort only)

Determines whether the compiler generates enhanced debug information for inlined code.

[no]pubnames
(ifort only)

Determines whether the compiler generates a DWARF debug_pubnames section.

[no]semantic-stepping
(ifort only)

Determines whether the compiler generates enhanced debug information useful for breakpoints and stepping.

[no]variable-locations
(ifort only)

Determines whether the compiler generates enhanced debug information useful in finding scalar local variables.

extended
(ifort only)

Generates complete debugging information and also sets keyword values semantic-stepping and variable-locations.

[no]parallel
(ifort only)

Determines whether the compiler generates parallel debug code instrumentations useful for thread data sharing and reentrant call detection. This keyword can only be specified on Linux systems.

For information on the non-default settings for these keywords, see the Description section.

Default

-debug none

No debugging information is generated.

Description

This option enables or disables generation of debugging information.

By default, enabling debugging, will disable optimization. To enable both debugging and optimization use the -debug option together with one of the optimization level options (-O3, -O2 or -O3).

Keywords semantic-stepping, inline-debug-info, variable-locations, and extended can be used in combination with each other. If conflicting keywords are used in combination, the last one specified on the command line has precedence.

Option

Description

-debug none

Disables generation of debugging information.

-debug full or -debug all

Generates complete debugging information. It is the same as specifying -debug with no keyword.

-debug minimal

Generates line number information for debugging.

-debug emit-column

Generates column number information for debugging.

-debug inline-debug-info
(ifort only)

Generates enhanced debug information for inlined code.

On inlined functions, symbols are (by default) associated with the caller. This option causes symbols for inlined functions to be associated with the source of the called function.

-debug pubnames
(ifort only)

The compiler generates a DWARF debug_pubnames section. This provides a means to list the names of global objects and functions in a compilation unit.

-debug semantic-stepping
(ifort only)

Generates enhanced debug 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.

For example, in the case of an assignment statement, this might be a store instruction that assigns a value to a program variable; for a function call, it might be the machine instruction that executes the call. Other instructions generated for those source statements are not displayed during stepping.

This option has no impact unless optimizations have also been enabled.

-debug variable-locations
(ifort only)

Generates enhanced debug information useful in finding scalar local variables. It uses a feature of the DWARF object module known as "location lists".

This feature allows the runtime locations of local scalar variables to be specified more accurately; that is, whether, at a given position in the code, a variable value is found in memory or a machine register.

-debug extended
(ifort only)

Sets keyword values semantic-stepping and variable-locations. It also tells the compiler to include column numbers in the line information.

Generates complete debugging information. This is a more powerful setting than -debug full or -debug all.

-debug parallel
(ifort only)

Generates parallel debug code instrumentations needed for the thread data sharing and reentrant call detection.

For this setting to be effective, option -qopenmp must be set.

On Linux* systems, debuggers read debug information from executable images. As a result, information is written to object files and then added to the executable by the linker.

IDE Equivalent

None

Alternate Options

For -debug full, -debug all, or -debug

Linux: -g

Windows: /debug:full, /debug:all, or /debug

See Also