User`s manual

3-16 Suite56 DSP Tools User’s Manual Motorola
Source-Level Debugging in C
In the text-based interface, to define a watch list, use the watch command, as in Example
3-3.
Example 3 -3. Defining a Watch List
> watch r0 ; adds the register to the watch list
> watch x:0 ; adds memory location to the watch list
> watch {signal_lin[ind1]} ; adds item of array to the watch list
> watch ; displays the current watch list
To remove an item from a watch list, in the graphic user interface, from the Display menu,
choose Watch, and then select Off. A dialogue box appears for you to select items to
remove from the watch list.
To remove an item from a watch list in the text-based interface, use the
watch command
followed by the number of the watch item and the
off option, as in Example 3 -4
Example3-4. RemovingItemsfromaWatchList
> watch ; displays current watch list to show item numbers
> watch off ; removes all items from the watch list
> watch #1 off ; removes first item from the watch list
3.2.9 Evaluating C Expressions
As you are debugging, you can use any valid C expression as an argument to the break,
evaluate, type,andwatch commands. When you use C expressions as arguments, you
must enclose the expression in curly brackets,
{}.
In addition to the usual C operators, Suite56 tools offer two additional operators for use in
C expressions. The operator “
#” makes it easier to refer to elements of an array. The
operator “
$” enables you to refer to registers directly in expressions. (This use of the
operator “
$” in C expressions within curly brackets differs from its use to set a
hexadecimal radix in assembly code.)
To see how an expression will be evaluated (for example, before you actually use it in a
command), in the graphic user interface, from the Display menu, choose Evaluate.A
dialogue box opens for you to type the expression to evaluate. In the text-based interface,
type the
evaluate command followed by the expression you want to see.
To evaluate a C expression in the graphic user interface (i.e., to use it in a command), in
the Command window, type the expression enclosed in curly brackets on the command
line.