3.4.2. Simple watchpoints

In its simplest form, a watchpoint halts a program when a specified register or variable is changed. The watchpoint halts the program at the next statement or machine instruction after the one that triggered the watchpoint.

There are two types of watchpoints:

Note

If you set a watchpoint on a local variable, you lose the watchpoint as soon as you leave the function that uses the local variable.

Setting a simple watchpoint

Follow these steps to set a simple watchpoint:

  1. Select the variable, area of memory, or register you want to watch.

  2. Set the watchpoint in any of the following ways:

    • select Toggle Watchpoint from the Execute menu

    • select Toggle Watchpoint from the window-specific menu

    • click the Watchpoint button.

Select Watchpoints from the View menu to see all the watchpoints set in your executable image.

Removing a simple watchpoint

Remove a simple watchpoint by using either of the following methods:

Method 1

  1. Select Watchpoints from the View menu to display a list of watchpoints in the Watchpoint window.

  2. Select the watchpoint you want to remove.

  3. Remove the selected watchpoint in either of the following ways:

    • click the Toggle watchpoint button on the toolbar

    • press the Delete key.

Method 2

  1. Position the cursor on a variable or register containing a watchpoint and right click.

  2. Select Toggle Watchpoint from the pop-up menu.

Note

If you set a watchpoint on a local variable, you lose the watchpoint as soon as you leave the function that uses the local variable.

Copyright © 1997, 1998 ARM Limited. All rights reserved.ARM DUI 0040D
Non-Confidential