CASEVision Debugger

CASEVision is an advanced debugging environment for SGI. It is currently available on both D0 challenges d0cha and d0chb and some other D0 SGI nodes, such as d0sgib, d0sgic, etc.

Starting and Exiting the Debugger

Before you start the debugger, make sure your environment variable $DISPLAY has been correctly set by doing echo $DISPLAY. If not, in csh/tcsh, do:
setenv DISPLAY your-graphical-terminal:0.0
To start the Debugger, you use the following syntax:
cvd [-pid pid] [executable | corefile] [&] 
The   -pid option lets you attach the Debugger to a running proce. You can use this to determine why a live process is in a loop.

The argument executable is the name of the executable file for the process you want to run. It is optional; you can invoke the Debugger first and specify the executable later.

You can also invoke the Debugger and specify a core file (with its executable) to try to determine why a program crashed.

After you invoke the debugger, there will be two windows poped up, one is Execution View, another one is the Main View with "WorkShop Debugger" caption. The Execuation View window is for the input/output of an executable, just like a shell.

To exit the Debugger, select "Exit" from the Admin menu in the Main View window. You have two other options: you can type quit at the Debugger command line or press   <ctrl-c> where you first entered cvd.

Using Main View

Starting the Debugger with an executable brings up the Main View window, loaded with the source code, and ready to run the process with any specified arguments. You perform most of your work in Main View , which provides:

Setting Traps

A major part of the debugging process is inspecting data at points during execution. A trap is a mechanism for gathering this data. A stop trap halts the process so that you can manually examine data. A sample trap collects specified performance data without stopping.

The Debugger lets you set traps:

Inspecting Debugger Data

When you stop the process, you then have a number of options for examining the data. You can inspect:

Changing Source Code

To change your source code and recompile, follow these steps:
  1. Switch to a text editor by clicking Fork Editor selection in Source menu or clicking Make Editable in Source menu) then edit directly in the source.
  2. Make any changes and save them by selecting Save... from the Source menu.
  3. Select Recompile from the Source menu.
The Build View window displays and lets you start the compile. Any compile errors are listed in the window, and you can access the related source code by clicking the errors.

When the code is rebuilt successfully, the new executable reattaches automatically to the Debugger and Static Analyzer. Previously set traps will be intact unless you have traps triggered at line numbers and have changed the line count.

Integration with Other WorkShop Tools

The WorkShop tools are designed so that you can move easily between them in a work session.

Last Updated May 30, 1997 by Dong Zhao