4 Debugging
This chapter describes different HP Fortran features for debugging programs. These features include
•Using the HP WDB debugger
•Stripping debugging information
•Handling runtime exceptions
•Using debugging lines
Using the HP WDB debugger
The HP WDB debuggeris the primary tool for debugging HP Fortran programs. The debugger provides such basic debugging functions as program control, process control, program and data monitoring, and expression evaluation. The debugger has both a graphical interface and a
The debugger software includes different managers that enable it to handle different source languages, target machines, object file formats, and user formats. The Fortran language manager allows you to use Fortran syntax when entering expressions on the debugger command line.
Before beginning a debugging session, you must compile the program with the
After compiling your program with the
$ f90
Here is the command to start debugging the executable program:
$ wdb db_prog
You can use the debugger to debug code that has been optimized at levels 0, 1, and 2. To debug optimized code, compile the program with both the
$ f90 +O2
Compiling with the
For complete information about HP WDB debugger, see http://www.hp.com/go/wdb. Printed and online documentation are available at this site.
Stripping debugging information
Programs compiled with HP Fortran include minimal debugging information in the executable program. This information consists of a symbol
However, the symbol table is not the same as the debugging information that is added to your program when you compile with the
76 Debugging