The Intel® Debugger (idb) is a source-level, symbolic debugger that lets you:
Control the execution of individual source lines in a program.
Set stops (breakpoints) at specific source lines or under various conditions.
Change the value of variables in your program.
Refer to program locations by their symbolic names, using the debugger's knowledge of the Intel Fortran language to determine the proper scoping rules and how the values should be evaluated and displayed.
Print the values of variables and set a tracepoint (trace) to notify you when the value of a variable changes. (Another term for a tracepoint is a watchpoint.)
Perform other functions, such as examining core files, examining the call stack, or displaying registers.
The idb debugger has two modes:
dbx (default mode)
gdb (optional mode)
All examples in this guide are shown in dbx mode.
For complete information about idb, see the idb man page or the online Intel® Debugger (IDB) Manual.
To use the debugger, you should specify the ifort command and the -g command-line option. Traceback information and symbol table information are both necessary for debugging. If you specify -g, the compiler provides the symbol table and traceback information needed for symbolic debugging. (The -notraceback option cancels the traceback information.)
Likely uses of these options at the various stages of program development are as follows:
During early stages of program development, use the -g option to create unoptimized code (optimization level -O0). This option also might be chosen later to debug reported problems from later stages.
Traceback and symbol table information result in a larger object file. During the later stages of program development, use -g0 or -g1 to minimize the object file size and, as a result, the memory needed for program execution, usually with optimized code. (The -g0 option eliminates the traceback information.)
When you have finished debugging your program, you can recompile and relink to create an optimized executable program or remove traceback and symbol table information with the strip command. (See strip(1).)
See the -debug keyword option to learn more about settings that enhance debugging.
Debugging of optimized code is not fully supported on Intel platforms.