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:
A sample of simple commands for the HP xdb debugger are: