next up previous contents
Next: Batch Job Submission Up: LNF Programming Environment Previous: File Input/Output

Debugging Program

If your program does not execute properly, you may wish to use a debugger to locate and correct problems; xdb is the HP-UX symbolic debugger. Before invoking a symbolic debugger you should recompile your program with -g option and without any optimization -O flags. This ensure that the necessary debugging information is incorporated into the object code. The debugger has many commands for viewing and manipulating programs. You can:

Control execution with single step execution or use the breakpoints.
Look at data values.
Look at the content of your source files.
Look at the execution stack.

A sample of simple commands for the HP xdb debugger are:

Wed Feb 14 19:03:34 WET 1996