7.5.3. Managing watches

With a watch set, you might want to change the expression, change the display format used, or edit it directly to control how it is monitored. Using the Watch pane enables you to carry out these operations and gives access to context menus where editing options are available.

Figure 7.10 shows an example Watch pane, with several expressions already set.

Figure 7.10. Watches in the Watch pane

Watches in the Watch pane

One watched value is an array as shown by the plus sign appended to the variable name. Click on the plus sign to expand the view and display the array elements.

Note

If the chosen array is very large, RealView Debugger warns before expanding the view.

You can access context menus, inside the Watch pane, to control watch options and edit watches directly, see:

Using the Name menu

If you have set up expressions, right-click on a chosen entry Name to display the Name menu. This context menu provides options that operate on selected entries only:

Update

Updates the displayed value for the chosen expression. This is applied in combination with any update options you set from the Pane menu.

Format...

Displays a selection box to specify the format for the watched expression.

Highlight the required format from the list of available formats. You can also cast top level expressions, including casting to array, for example char* and char[12].

Click OK to confirm your choice. This closes the selection box and the new format is applied to the chosen expression.

Break at...

If enabled, select this option to set a breakpoint at this location.

BreakIf...

If enabled, select this option to set a conditional breakpoint.

Add from Favorites...

Displays the Favorites Chooser/Editor dialog box where data values saved in your personal favorites can be added to the Watch pane. See Saving watches as favorites for details.

View Memory At Value

Select this option to use the chosen value as the starting address for a memory display.

This displays the memory view in the last-used Memory pane if visible. If a suitable pane is not visible, the default pane in the Middle pane row is used.

View Memory At Address

Select this option to use the address of the chosen item as the starting address for a memory display.

This displays the memory view in the last-used Memory pane if visible. If a suitable pane is not visible, the default pane in the Middle pane row is used.

Properties...

Displays a text description of the item under the cursor.

Using the Value menu

With a watch set, you can right-click on a chosen entry Value to display the Value menu. This context menu provides options that operate on selected watches only:

Update

Updates the displayed value for the chosen expression. This is applied in combination with any update options you set from the Pane menu.

Format...

Displays a selection box where you can highlight the required format for the expression from the list of available formats.

Set to 0

Sets the value of the chosen expression to zero, where allowed. An error message is displayed if you try to set a value to zero when not permitted.

Increment

Adds 1 to the value of the chosen expression. An error message is displayed if you try to increment a value when not permitted.

Decrement

Subtracts 1 from the value of the chosen expression. An error message is displayed if you try to decrement a value when not permitted.

Set from Favorites...

Displays the Favorites Chooser/Editor dialog box where data values saved in your personal favorites list can be inserted into the specified location.

Recent expressions

The rest of this menu contains a list of recently-used variables and data values. You can re-use entries from this list as required.

Using the pane context menu

If you right-click anywhere inside an empty entry in the Watch pane, a short context menu is displayed. This provides the options:

Update All

Updates the details for all the expressions currently displayed in the Watch pane.

Add from Favorites...

Displays the Favorites Chooser/Editor dialog box where expressions saved in your personal favorites list can be added to the Watch pane.

Editing watches

You can use in-place editing to change expressions in the Watch pane, and to add new ones:

  1. Double-click in the name you want to change, or press Enter if the item is already selected. The name is enclosed in a box with the characters highlighted to show they are selected (pending deletion).

  2. Enter the new name, or move the cursor to change the existing expression, or add a cast.

  3. Press Enter to store the new name.

If you press Escape then any changes you made in the highlighted field are ignored.

Copyright © 2003, 2004 ARM Limited. All rights reserved.ARM DUI 0234B
Non-Confidential