Totalview® for HPC User Guide : PART II Debugging Tools and Tasks : Chapter 9 Examining and Editing Data and Program Elements : Viewing a List of Variables : Entering Expressions into the Expression Column
Entering Expressions into the Expression Column
The following Expression List Window shows four different types of expressions.
Figure 142 – The Tools > Expression List Window
The expressions in this window are:
i
A variable with one value. The Value column shows its value.
d1_array
An aggregate variable; that is, an array, a structure, a class, and so on. Its value cannot be displayed in one line. Consequently, TotalView just gives you some information about the variable. To see more information, dive on the variable. After diving, TotalView displays the variable in a Variable Window.
When you place an aggregate variable in the Expression column, you need to dive on it to get more information.
d1_array[1].d1_v
An element in an array of structures. If TotalView can resolve what you enter in the Expression column into a single value, it displays a value in the Value column. If TotalView can’t, it displays information in the same way that it displays information in the d1_array example.
d1_array[i-1].d1_v
An element in an array of structures. This expression differs from the previous example in that the array index is an expression. Whenever execution stops in the current thread, TotalView reevaluates the i-1 expression. This means that TotalView might display the value of a different array item every time execution stops.
The expressions you enter cannot include function calls.
You can also enter methods and functions within an Expression. Figure 143 shows two get methods and a get method used in an expression.
 
Figure 143 – Using Methods in the Tools > Expression List Window
In a similar fashion, you can even directly enter functions, Figure 144.
Figure 144 – Using Functions in the Tools > Expression List Window