11.18.3. Breaking on the value of a watched variable

To set a memory access breakpoint on the value of a watched variable:

  1. Connect to the target.

  2. Load an executable image.

    This procedure uses the dhrystone image provided in the RVDS examples.

  3. Set a watch variable.

  4. Right-click on the watch variable name in the Watch view to display the context menu.

    Note

    If the watched variable is an array, first expand the array in the Watch view if you want to set a breakpoint for an element of the array.

  5. Select the required breakpoint option from the context menu.

    If you select Create Breakpoint At... the Create Breakpoint dialog box is opened, and the address of the chosen variable is entered into the Location field. Do the following:

    1. Choose the Breakpoint Type you require.

      The Value Match field is enabled.

    2. Enter the required value in the Value Match field.

    3. Click OK to set the breakpoint and close the Create Breakpoint dialog box. A breakpoint indicator is placed at the address of the watched variable.

    If you select Create Conditional Breakpoint At... to open the Create Condiitonal Breakpoint dialog box. Do the following:

    1. Select HW Break on Data Value match...

    2. Click OK. The HW Break on Data Value match dialog box is opened, and the address of the chosen variable is entered into the location field.

    3. Enter the required value in the field at the bottom of the dialog box.

    4. Click OK to set the breakpoint and close the HW Break on Data Value match dialog box. A breakpoint indicator is placed at the address of the watched variable.

    Note

    You cannot set a breakpoint for a variable if <@Rn> appears after the value.

See also

Copyright © 2002-2011 ARM. All rights reserved.ARM DUI 0153N
Non-ConfidentialID052111