11.16.2. Breaking on a named global variable in your source code

To set a memory access breakpoint on a named global variable:

  1. Connect to the target.

  2. Load an executable image.

    This procedure uses the dhrystone image provided in the RealView Development Suite (RVDS) examples to demonstrate memory access breakpoints.

  3. In the source view, locate the required global variable.

    For dhrystone, locate Int_Glob in dhry_1.c.

  4. Right-click on the global variable name to display the context menu.

  5. Select Create Breakpoint... from the context menu. The Create Breakpoint dialog box is displayed.

  6. On the Create Breakpoint dialog box, choose the Breakpoint Type you require.

    The Value Match field is enabled.

  7. Enter &Int_Glob in the Location field.

    The variable name must be prefixed with &. This indicates that the address of the global variable is to be used. For example, in the dhrystone image &Int_Glob corresponds to address 0xE1FC.

  8. Leave the Value Match field blank.

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

See also

Copyright © 2002-2009 ARM Limited. All rights reserved.ARM DUI 0153K
Non-Confidential