Sun Studio 12: Fortran Programming Guide

5.3 Debugging With dbx

Sun Studio provides a tightly integrated development environment for debugging applications written in Fortran, C, and C++.

The dbx program provides event management, process control, and data inspection. You can watch what is happening during program execution, and perform the following tasks:

To debug optimized programs, use the dbx fix command to recompile the routines you want to debug:

  1. Compile the program with the appropriate -On optimization level.

  2. Start the execution under dbx.

  3. Use fix -g any.f without optimization on the routine you want to debug.

  4. Use continue with that routine compiled.

Some optimizations will be inhibited by the presence of -g on the compilation command. See the dbx documentation for details.

For details, see the Sun Studio Debugging a Program With dbx manual, and the dbx(1) man pages.