Developer Guide and Reference

ID 767253
Date 10/31/2024
Public
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.

extended

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

[no]parallel

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 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 extended

Sets keyword 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

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

For shared data and reentrancy detection, 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

Visual Studio: None

Eclipse: Advanced Debugging > Enable Parallel Debug Checks (-debug parallel)

Debug > Enable Expanded Line Number Information (-debug expr-source-pos)

Alternate Options

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

Linux: -g

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

See Also