Totalview® for HPC User Guide : PART II Debugging Tools and Tasks : Chapter 9 Examining and Editing Data and Program Elements : Diving in Variable Windows : Displaying an Array of Structure’s Elements
Displaying an Array of Structure’s Elements
The View > Dive In All command, which is also available when you right-click on a field, lets you display an element in an array of structures as if it were a simple array. For example, suppose you have the following Fortran definition:
type i_c
integer r
complex c
end type i_C
type(i_c), target :: rc2(3,4)
After selecting an r element, select the View > Dive In All command. TotalView displays all of the r elements of the rc2 array as if they were a single array.
Figure 135 – Displaying a Fortran Structure
The View > Dive in All command can also display the elements of a C array of structures as arrays. Figure 136 shows a unified array of structures and a multidimensional array in a structure.
 
Figure 136 – Displaying C Structures and Arrays
NOTE >> As the array manipulation commands generally work on what’s displayed and not what is stored in memory, TotalView commands that refine and display array information work on this virtual array. For example, you can visualize the array, obtain statistics about it, filter elements in it, and so on.
Figure 137 is a high-level look at what a dive in all operation does.
Figure 137 – Dive in All
In this figure, the rounded rectangle represents a Variable Window. On the left is an array of five structures. After you select the Dive in All command with element a selected, TotalView replaces the contents of your Variable Window with an array that contains all of these a elements.
 
RELATED TOPICS 
 
Arrays
Structures