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.
— 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.)