User and Reference Guide

  • 2020
  • 07/29/2020
  • Public Content

Setting Watchpoints

Watchpoint is a special breakpoint type that suspends the program execution whenever the value of a specified expression (variable, register, memory address, and so on) changes.
Due to debugger limitations, watchpoints cannot be used on
variables as they exist only within a particular function. When the function returns, a non-static local variable is de-allocated from the stack and thus a watchpoint on it starts watching a bogus memory (stack) address. In the case of a static local variable, consider setting a watchpoint on its memory address.
To set a watchpoint on an expression:
  1. Halt the target by pressing the
    Suspend button.
  2. In the Breakpoints view, click
    view menu
    View Menu and select
    watchpoint rw enabled
    Add Watchpoint (C/C++).
  3. In the opened dialog box, specify the expression to watch: a register name, a memory address, or a global variable name.
  4. Set the condition:
    • To suspend program execution when the expression is read, check the Read box.
    • To suspend program execution when the expression is written to, check the Write box.
  5. If you need to keep the watchpoint disabled now, uncheck the
    box (checked by default).
    watchpoint dialog
  6. Click
    Apply and Close
    . The watchpoint is added to the Breakpoints view.
The basic icon image depends on the specified mode:
  • watchpoint read enabled
    Read-only mode.
  • watchpoint write enabled
    Write-only mode.
  • watchpoint rw enabled
    Read-write mode.

Product and Performance Information


Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804