5.4.2. Watch processor view

The Watch processor view enables you to examine the value of variables, or of expressions dependent on variables, in an image being executed by a specific processor.

Select the required processor in the Control system view before you display a Watch processor view. Each Watch processor view shows its processor name near the top left corner.

A Watch processor view is initially empty. You choose what is to be listed and have its value shown. One way to add lines to a Watch processor view is to select one or more items in a Variables processor view, then right-click and select Add to Processor Watch from the resulting pop-up menu.

Another way to add a line is to select Add Watch from the pop-up menu (see Figure 5.30). Your specification of what is to be watched is shown in the first column, and its value is evaluated and shown in the second column each time program execution in the relevant processor stops. (When using certain processors, execution does not have to stop. See RealMonitor support.)

To define what is to be watched, you enter an expression. An expression can be the name of a variable, and that is often all you require. More complex expressions are allowed, however, and might include logical and arithmetic operators, in addition to the names of variables and constants.

If the displayed data has a tree structure, click on the + or – boxes to expand or collapse each level of the structure, but see Viewing structured data.

A typical Watch processor view is shown in Figure 5.29. For more information about data display formats and data entry formats, see Data formatting.

Figure 5.29. Watch processor view

Watch processor view

The four tabbed pages enable you to define up to four lists of expressions to watch in any one processor. Click on the tab of the page you want to view.

Watch processor view pop-up menu

To display the Watch pop-up menu, shown in Figure 5.30, right-click within the Watch processor view.

Figure 5.30. Watch processor view pop-up menu

Watch processor view pop-up menu

If you have selected an item in the Watch processor view, you can click on Add to System Watch to add that item to those displayed in a Watch system view (see Watch system view).

One way of defining a new watch for the Watch processor view is to select Add Watch from the pop-up menu. The resulting dialog is shown in Figure 5.31.

Figure 5.31. Add Watch dialog

Add Watch dialog

Enter a new expression to watch. Specify the processor, whether the new watch must be added to the Watch processor view or system view (see Watch system view), and on which tabbed page it must appear. Figure 5.31 shows Tab 1 of the Watch processor view as the chosen destination. By default, the Tab radio button selected reflects the current tabbed page in the Watch processor view.

Click the Evaluate button to evaluate the expression. Either the result of the evaluation or an error message appears in the main pane of the dialog. You can build up a list of expressions and their values. Select any one of the displayed expressions and click the Add To View button to add that expression to the specified view (Watch processor view or Watch system view). To see the address of a variable in addition to its value, enter & in front of its name.

From the Watch processor view (as shown in Figure 5.29) you can select a data item and use the Watch processor view pop-up menu to examine it in more detail.

Locate Using Value

Select Locate Using Value or Locate Using Address if you want to examine an area of memory. Selecting this option means that only the 32 least significant bits of the value of the selected item are used as the required memory address. A Memory Locate view is displayed, very similar in appearance to the view described in Memory processor view, with the selected memory address in view. If an existing tabbed page in a Memory processor view already includes the required address (and is not the page from which the request originates), that page is displayed. If no existing tabbed page is suitable, the least recently selected tabbed page is used to display the required region of memory.

Locate Using Address

Selecting this option is similar to Locate Using Value and enables you to examine an area of memory in a Memory Locate view. Selecting this option, however, uses the address of the selected item as the required memory address.

Array Expansion...

Select Array Expansion... to display an Array Expansion dialog, either when you are about to expand an array or when you want to display a different range of elements in an array that is already expanded. This dialog enables you to choose either to display all elements or to specify the first and last element numbers to display. Array elements are numbered from zero. A 50-element array, for example, contains elements numbered 0 to 49. By default, elements 0 to 15 (the first 16 elements) only are displayed when you expand any array with more than 16 elements.

Refresh

Select Refresh to update and recalculate the displayed data values. This item is useful if the target supports RealMonitor. See also Refresh All.

Properties...

Select Properties... to display the Default Display Options dialog shown in Figure 5.28. With this dialog you control the default display format, and choose whether any change you make applies to all the displayed data items or to only those that currently use the default format. Click the Help button in the dialog to display more information.

If you hide a Watch processor view then later select it again, it reappears in the state it was in when you hid it.

If you close a Watch processor view then later select it again, it is displayed empty, as though you are selecting it for the first time.

Copyright © 1999-2006 ARM Limited. All rights reserved.ARM DUI 0066G
Non-Confidential