TotalView User Guide : Part II: Debugging Tools and Tasks : Examining and Editing Data and Program Elements : Viewing a List of Variables : Entering Variables and Expressions
Entering Variables and Expressions
To display an initial, empty window, select the Tools > Expression List command.
You can place information in the first column of the Expression List Window in the following ways:
*Enter it into a blank cell in the Expression column. When you do this, the context is the current PC in the process and thread indicated in the Threads box. If you type my_var in the window shown in the previous section, you would type the value of my_var in process 1, thread 1.
*Right-click on a line in the Process Window Source or Stack Frame Panes. From the displayed context menu, select Add to Expression List. Here is the context menu that TotalView displays in the Source Pane:
 
 
*Right-click on something in a Variable Window. Select Add to Expression List from the displayed context menu. You can also use the View > Add to Expression List command.
When you enter information in the Tools > Expression List Window, where you place the cursor and what you select make a difference. If you click on a variable or select a row in the Variable Window, TotalView adds that variable to the Expression List Window. If you instead select text, TotalView adds that text. What’s the difference? Figure 114 shows three variations of d1_array, each obtained in a different way, as follows:
*The first entry was added by selecting just part of what was displayed in the Source Pane.
*The second entry was added by selecting a row in the Variable Window.
*The third entry was added by clicking at a random point in the variable’s text in the Source Pane.
You can tell TotalView to look for a variable in the scope that exists when your program stops executing, rather than keeping it locked to the scope from which it was added to the Tools > Expression List Window. Do this by right-clicking an item, then selecting Compilation Scope > Floating from the context menu.
Figure 115: Expression List Window Context Menu
For more information, see Viewing Variables in Different Scopes as Program Executes”.