HP WDB GUI 5.8 Reference Manual ( February 2008 )

Debugging with WDB GUI
Viewing Code
Chapter 3 61
Open Separate View
•Close
Viewing variables using Dwell
The dwell feature displays the value of the variable or expression on which the mouse pointer
is paused. Dwell works in both the Source view and the Disassembly view.
Dwell gives you quick information about a variable. For more detailed information, use Quick
Watch, Watch view, or Local Variables view.
To view the value of a variable or expression
1. Use the mouse to position the pointer over a variable. For an expression (such as a+b),
highlight the expression to select it, then point to the highlighted text.
2. Do not move the pointer. After a short time (about a half-second), a window appears that
displays the value of the variable or expression.
3. Move the mouse or press a key or button to close the dwell window.
4. You can view the decimal and hexadecimal value of a numeric variable or expression by
changing the preference in the Source View section of the Edit > Preferences dialog box.
See Setting Debugger Preferences. The displayed decimal and hexadecimal values are
separated by a semicolon(;)
Limitations of Dwell
Dwell does not display the value of certain types of variables and expressions. It will not
display the value of complex variables such as arrays and structs, but it will display the value
of elements in an array, fields in a struct, and pointers.
Expressions are not displayed if there may be a potential side effect on the program being
debugged (such as i++ or exit(1)). Expressions containing ), =, ++, and -- are not displayed
with dwell.
Examples of complex variables
Dwell displays the value of fields as well as variables. Dwelling on bar of foo->bar displays the
value of foo->bar, while dwelling on foo displays only the value of foo.
In the expression a[i] there are several places to use dwell:
If a is a pointer, dwelling on a displays the value of variable a.