Displaying an Element in an Array of Structures
You can display an element in an array of structures as if it were a simple array using the View > Dive In All command.
Consider our values struct defined like this:
struct wave_value_t
{
int x;
int y;
double current_time;
double value;
};
We can select an element within that structure and view it as an array, allowing us to easily see the values of any individual element as they change throughout program execution.
1. Dive in All on a variable
In the nested Variable Window, select the double
value.
Right-click and select
Dive In All. TotalView displays all of the
value elements of the
values array as if they were a single array.
2. Add the value to the Expression List
Remember that you can also view the scalar type value in an Expression List window.
In the window just launched, right-click again on
value and select
Add to Expression List. The Expression List window launches listing
value:
3. Click Go to run your program. You can now view your variable values changing in three windows: