Sun Studio 12: Debugging a Program With dbx

watch Command

The watch command evaluates and prints expressions at every stopping point in the scope current at that stop point. Because the expression is not parsed at entry time, the correctness of the expression cannot be immediately verified. The watch command is valid only in native mode.



Print the list of expressions being displayed.

watch expression, ...

Watch the value of expressions expression, ... at every stopping point.

watch [-r|+r|-d|+d|-p|+p|-L|-fformat|-Fformat|--] expression, ...

See print Command for the meaning of these flags.


expression is a valid expression.

format is the output format you want used to print the expression. For information on valid formats, see print Command.