debug (Linux* OS and Mac OS* X)

Enables or disables generation of debugging information.

IDE Equivalent

Windows:

Linux: Debug > Enable Parallel Debug Checks (-debug parallel)

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

Mac OS X: None

Architectures

IA-32, Intel® 64 architectures

Syntax

Linux and Mac OS X:

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

minimal

Generates line number information for debugging.

[no]emit_column

Determines whether the compiler generates column number information for debugging.

[no]expr-source-pos

Determines whether the compiler generates source position information at the expression level of granularity.

[no]inline-debug-info

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

[no]semantic-stepping

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

[no]variable-locations

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

extended

Sets keyword values semantic-stepping and variable-locations.

[no]parallel
(Linux only)

Determines whether the compiler generates parallel debug code instrumentations useful for thread data sharing and reentrant call detection.

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.

Note that if you turn debugging on, optimization is turned off.

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 expr-source-pos

Generates source position information at the statement level of granularity.

-debug inline-debug-info

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 semantic-stepping

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

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 run-time 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

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

-debug parallel

Generates parallel debug code instrumentations needed for the thread data sharing and reentrant call detection of the Intel® Parallel Debugger Extension. For shared data and reentrancy detection, option -openmp 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.

On Mac OS* X systems, debuggers read debug information from object files. As a result, the executables don't contain any debug information. Therefore, if you want to be able to debug on these systems, you must retain the object files.

Alternate Options

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

Linux and Mac OS X: -g

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

For -debug inline-debug-info

Linux and Mac OS X: -inline-debug-info (this is a deprecated option)

Windows: None

For -debug variable-locations

Linux and Mac OS X: -fvar-tracking

Windows: None

For -debug semantic-stepping

Linux and Mac OS X: -fvar-tracking-assignments

Windows: None

See Also


Submit feedback on this help topic

Copyright © 1996-2011, Intel Corporation. All rights reserved.