Debug Options

Topic details the different options available for debugging.

-G debug_lvl, -g

Enable the generation of debugging information used by symbolic debuggers. Allow debugging with breakpoints. Better debugging information comes at the cost of inhibiting certain optimization techniques, so choose the debug_lvl that best fits the debugging needs of any particular source file in an application.

The -g option is equivalent to -G0. The -g option is included for compatibility with earlier versions of the compiler and many other UNIX systems; the -G option is the preferred specification.

These options recognize OpenMP directives and disable all optimizations. They imply -hthread1 -homp -hfp0. The debugging options take precedence over any conflicting options that appear on the command line. If more than one debugging option appears, the last one specified overrides the others.

The -g or -G options can be specified on a per-file basis, so that only part of an application pays the price for improved debugging.

debug_lvl OptimizationBreakpoints Allowed OnDebuggingExecution Speed
0NoneEvery executable statementBestLimited
1PartialBlock boundariesMediumMedium
2FullFunction entry and exitLimitedBest
fastFullEvery executable statementRequires fast-track debuggerBest

-h develop

Default: off

Reduce compile time at the expense of optimization. This option is intended to be used when a program is under development and compiled frequently. This option is different from and independent of the -O option. For example, -O0 disables all optimizations, but sometimes can increase compile time because certain optimizations reduce code size, which allow other phases of the compiler to deal with less code.

-h dir_check

Enables a run time check for the !dir$ collapse directive and checks the validity of the loop_info count information. Equivalent to the -Rd option and added to improve C/Fortran command line compatibility.

-h gasp[=opt[:opt]]

Default: disabled

Request GASP (Global Address Space Performance Analysis) instrumentation. Requests instrumentation of events generated by shared local accesses. Instrumenting these events can add runtime overhead to the application.

When opt is specified, the compiler provides additional instrumentation as follows:
local
Requests instrumentation of events generated by shared local accesses. Instrumenting these events can add runtime overhead to the application
functions
Enables function instrumentation. Sets -hipa0

-h nodwarf

Disables DWARF generation during compilation. By default, DWARF source line information is generated to support traceback analysis. -hdwarf is deprecated. This option has no affect if -g or -G is specified.

-h zero

Default: disabled

Cause stack-allocated memory to be initialized to all zeros.