Getting Started with TotalView Products : The Basics : Getting Around TotalView : Variable Window and Array Viewer
Variable Window and Array Viewer
TotalView provides multiple ways to see and edit your data, The primary window for working with data is the Variable Window. If your variable is an array, you can use the Array Viewer.
The Variable Window
The Variable Window displays details about your variables. To launch the Variable Window, Figure 7, just dive (by double-clicking) on a local variable (displayed in the Process Window’s Stack Frame Pane), or on a global variable (in the Source Pane).
 
Figure 7: Variable Window
The Variable Window is a powerful tool for analyzing your program’s data. You can control the display and cast your data in the Expression field, change the variable’s address in the Address field, or change the data type in the Type field. For parallel programs, you can view or update the value of a variable in all of the processes or threads at once or individually. For variables that contain substructures, use the “+” or “” icons to view them.
If the displayed variable is a pointer, structure, or array, you can dive on the value. This new dive, called a nested dive, replaces the information in the Variable Window with information about the selected variable.
Figure 8 shows a Variable Window before and after diving into a pointer variable sp with a type of simple*. The base window displays the value of sp while the nested dive window shows the structure referenced by the simple* pointer.
Figure 8: Nested Dives
Use the undive/redive buttons to move between nested windows and the base window:
*To undive from a nested dive, click the undive arrow button so that the base window’s contents appear. To undive from all dive operations, click the Undive All button.
*To redive after undiving, click the redive arrow button. To redive from all your undive operations, click on the Redive All arrow button.
*To retain access to a nested or base window so that both are visible, select the Window > Duplicate command to duplicate the current Variable Window.
Array Variables:
For an array, the Variable Window includes a Slice field that shows each of the array’s dimensions as a colon. You can display a section by editing the array specifier. Using the Slice field lets you focus on a subset of the data. For example, to display items 101 through 125 of a one-dimensional Fortran array, change the Slice field to (101:125).
You can also enter an expression in the Filter field to limit the display. For example, if you’re looking for values greater than 300, type “> 300”.
In Figure 9, the top window uses a slice to limit the amount of information displayed in a three-dimensional array, while the bottom window combines a filter with a slice.
Figure 9: Sliced and Filtered Arrays
The Array Viewer
TotalView provides another way to look at the data in a multi-dimensional array. The Variable Window’s Tools > Array Viewer command opens a window that presents a slice of array data in a table format, Figure 10.
Figure 10: Array Viewer
When the Array Viewer opens, the initial slice of displayed data depends on the values entered into the Variable Window. You can change the displayed data by modifying the Expression, Type, or Slice controls. For example, you can cast the array to another array expression, modify the type to cast the array to a different array type, or control how the slice is viewed.
See More
*On the Variable Window:
*Displaying Variables” in the TotalView User Guide
*Diving in Variable Windows” in the TotalView User Guide
*Changing How Data is Displayed” in the TotalView User Guide
*On arrays: Examining Arrays” in the TotalView User Guide