Totalview® User Guide : PART I Introduction to Debugging with TotalView : Chapter 2 Basic Debugging : Examining Data : Viewing Compound Variables Using the Variable Window
Viewing Compound Variables Using the Variable Window
For nonscalar variables, such as structures, classes, arrays, common blocks, or data types, you can dive on the variable to get more detail. This launches the Variable Window.
(For an overview on diving, see "About Diving into Objects".)
This section includes:
"Basic Diving"
"Nested Dives"
"Rediving and Undiving"
"Diving in a New Window"
"Displaying an Element in an Array of Structures"
Basic Diving
First, delete any breakpoints you had entered previously except the eval point set in "Evaluation Points". (Retaining this eval point simply allows the program to run without user input.)
1. Set a breakpoint
Add a breakpoint at line 77, at the completion of the set_values() method.
 
Click Go. The program runs until the breakpoint.
2. Dive on a variable
Dive on the variable values in the Stack Frame pane (by double-clicking on values or by right-clicking and selecting Dive).
 
The values variable is a struct of type wave_value_t, created to hold a copy of the variables that create the wave, as well as other data.
The Variable Window launches.
 
Elements of a Variable Window
The basic elements of the Variable Window include:
A set of toolbar icons that provide navigation and customizations:
Thread ID () icon to identify the current thread (in a single-threaded program, this is always 1.1, meaning process 1, thread 1).
Collapse/expand () icons to expand or collapse the contents of a compound type in nested windows.
Up/down () icons to control the level of information about your data. If you select the up arrow, more information about your data is displayed.
 
Redive/Undive buttons, discussed in "Rediving and Undiving".
The editable fields Expression, Address, and Type. You can add an expression or change the address and type for your variable here. Then select Edit > Reset Defaults when you are finished. (This is beyond the scope of this chapter. See the Related Topics table for more information.)
 
RELATED TOPICS 
 
Diving on objects
The View > Dive command
View > Dive in the Process Window in the in-product Help
More on the Variable Window
Editing data in the Variable Window