Programmers use print statements as an easy way to examine data. They usually do this because the debugger doesn't have sophisticated ways of showing your data. In contrast, Examining and Changing Data and Examining Arrays explain how you can display data values with TotalView. In addition, Visualizing Programs and Data describes how to visualize your data in a graphical way.
Because data is difficult to see, the Stack Frame Pane (the pane in the upper right corner of the Process Window, which is show in the following figure) has a list of all variables that exist in your current routine. If the value is simple, you can see it in this pane.
If it isn't, just dive on the variable to get more information.
Note: "Diving" is something you can do almost everywhere in TotalView. What happens depends on where you are. To dive on something, position the cursor on the item and click your middle mouse button. If you have a two-button mouse, you can double-click your left mouse button.
Diving on a variable tells TotalView to display a window containing information about the variable. (As you read this manual, you'll come across many other kinds of diving.)
The following figure shows two Variable Windows. One was created by diving on a structure and the other by diving on an array.
Two Variable Windows 
|
Because the data displayed in a Variable Window may not be simple, you can also dive on data in the Variable Window. Normally, this information is displayed in the same window. However, you can use the View > Dive Anew command to display this information in a separate window.
If the data being displayed is a pointer, diving on the variable chases the pointer and then displays the data that is being pointed to. In this way, you can follow linked lists. Notice the forward- and backward-facing arrows in the upper right corner of the Variable Windows. Selecting them lets you "undive" and "redive." For example, if you're following a pointer chain, clicking the left-pointing arrow takes you back to where you just were. Clicking the right-pointing arrow takes you "forward" to the place you previously dove on.
Many arrays have copious amounts of data. Consequently, TotalView has a variety of ways to simplify how it should display this data.
Two More Variable Windows 
|
The window in the background of this figure shows a basic slice operation. This operation tells TotalView that it should only display array elements whose positions are named by the slice. The foreground window combines a filter with a slice. In this case, the filter says "of the array elements that could be displayed, only display the elements whose value is greater than 300."
While slicing and filtering let you reduce the amount of data that TotalView will display, there are many times when you want to see the shape of the data. If you select the Tools > Visualize command, TotalView shows a graphic representation of the information in the Variable Window. Here's an example:
Array Visualization 
|
There's yet another way to look at data. TotalView's watchpoints let you see when a variable's data changes. This works in a different way than other action points. A watchpoint stops execution whenever a data value changes no matter what instruction changed the data. That is, if you change data from 30 different statements, the watchpoint stops execution whenever any of the 30 make a change. In contrast, other action points do something right before a line in your source executes. To create a watchpoint, select the Tools > Watchpoint command from any Variable Window.