Debugging

D. Adams
27jul00 0840


D0 code is built on unix platforms using the KAI compiler. It may be debugged using totalview. To debug the program myexe, do the following:

> setup totalview
> totalview myexe

This is an X-window program so you may need to define your DISPLAY variable to pint to the machine running your display. For example:

> setenv DISPLAY mypc.fnal.gov:0
If you login with slogin this will likely be set up for you.

If you are debugging a program which crashed and produced a core file, you may pick up where the program crashed using this file:

totalview myexe core

Once you start totalview, you can get help with control-?. The middle button on your mouse brings up a menu of commands.

There are some useful keyboard shortcuts:

Click on the left-hand side of a line to set or remove a break. Click on the break in the lower right hand corner to disable or enable a break point.

Right click on a variable name to examine its contents. In the examine window click on any of the fields to get details. A button in the upper right can be used to back out of the detail. The value can be reset by selecting it with the mouse. The address of the value can also be reset--this is one way to see the elements of an array (increment by 8 to see the next double).

There are some bugs:


dladams@fnal.gov