October 9, 2003
TotalView is a product
of Etnus, LLC.
This documents the release of TotalView 6.3.0-1-LLNL
totalview and totalviewcli
on October 9, 2003, on OCF and SCF LC platforms.
TotalView Debugger Tutorial by Blaise Barney
TotalView Quick Reference Page
TotalView CLI Summary Sheet
For problems/questions, send e-mail to
Matt Wolfe, Dong Ahn, Karen Warren (LLNL)
or Laurie McGavran (LANL).
- Users of large codes with large libraries may decrease startup time by
specifying which dynamic libaries they wish to debug.
- Select Dynamic Libraries on the Files>Preferences page:
Suppose you were debugging a code that used Python and were interested in debugging only two of the dynamic Python libraries.
- List these two libraries
in the left upper pane of the dynamic library option window.
/usr/apps/python/opt/lib/python2.2/lib-dynload in the right upper pane
to filter out
the other libraries.
- When either of these libraries is loaded, TotalView will ask:
- In the lower part of the page:
- Load from these libraries list,
- the user may specify which symbols are read for the user specified libraries.
- all symbols, (default)
- loader symbols, or
- no symbols
If you find that you do need the symbol information that was excluded by the above options,
place the cursor in the
Stack Trace Pane and click the
Totalview will then display Load All Symbols in Stack. Selecting this
causes TotalView to read in the debugging symbols for all libraries
in the stack.
Select the Tools>Dynamic Libraries command:
- The user can cause the loading of an unlinked library and use a function in that library in:
- EVAL action points
- the expression window
- the CLI dprint command
Click on the Load button. A standard Motif file browser dialog box appears. Set the directory to the place where libraries are:
Select the library and click on OK. TotalView displays a dialog asking if you should stop the process to set breakpoints. Answer No.
The shared library should appear in the list. Click Close to dimiss this dialog box.
Now you can use the function from that library for an evaluation:
TotalView presents a meaningful display of C++ Standard Library Template (STL) collection classes. These classes include
vector, list, and map for integer, float, double, string, class. and pointers.
- (1) KAI KCC 4.0 on AIX/Power, IRIX/MIPS, and Tru64/ALPHA,
- (2) IBM xlC 5.0 on AIX/Power,
- (3) Compaq cxx 6.3 on Tru64/Alpha,
- (4) GNU g++ 3.2 on AIX/Power, Tru64/Alpha and Linux/Alpha,
- (5) SGI MPISpro CC7.3 on IRIX/MIPS.
Display of a list container that has not been transformed:
Display of a type transformed list contanier:
Display of transformed map container:
- TotalView detects problems that occur when you allocate and free
- free() not allocated -- The address to free() does not lie in an allocated block.
- realloc() not allocated -- The address to realloc() does not lie in an allocated block.
- Address not at start of block -- The address to free() or realloc() is not the start of a previously allocated block.
- Duplicate Allocation -- Address lies in an allocated block.
- Allocation request returns null -- No memory available.
- Heap Allocation Debugging must be activated at the start (or restart) of a run before any "go"s are issued:
- non-POE jobs -- Select Tools>Enable Memory Debugging
- POE jobs -- In the directory in which you're running totalview, create a file .tvdrc, containing one line:
- set enable_memory_debugging true
- If you are concerned about memory errors only in your own code, set
Stop on Memory Errors off
and wait until you get to a bkp at the beginning
of a problem area of code before you set it on.
- The following Command Line Interface (Tools> Command Line Window),
also provide valuable information:
- dheap -status
- dheap -info [-backtrace]
By using View->Spreadsheet (2-D arrays)->spreadsheet in the data window,
totalview creates a spreadsheet display of the data. (View->Spreadsheet->column will return to the original format.)
When scrolling vertically through the data, "holes" may appear;
just click on Window->Update to fix it.
It may be slow for very large 2-D arrays.
Slicing may be used, but not filtering:
Use dtrace to:
Cat /usr/local/tv/vsns/contrib/lib/dtrace.tcl for more info.
trace the order of execution via source line numbers
view a stream of changing variable values, prefixed by file and line
discover on which line a variable changed
discover the location of a SEGV which is wiping out the stack,
thus hiding itself.