You copied the Doc URL to your clipboard.


Sets a watchpoint for a data symbol. The debugger stops the target when the memory at the specified address is read.

This command records the ID of the watchpoint in a new debugger variable, $n, where n is a number. You can use this variable, in a script, to delete or modify the watchpoint behavior. If $n is the last or second-to-last debugger variable, then you can also access the ID using $ or $$, respectively.

Watchpoints are only supported on scalar values.

Some targets do not support watchpoints. Currently you can only set a watchpoint on:

  • A hardware target using a debug hardware agent.

  • Linux applications using gdbserver or undodb-server.

The availability of watchpoints depends on the hardware target. In the case of Linux application debug, the availability of watchpoints also depends on the Linux kernel version and configuration.

The address of the instruction that triggers the watchpoint might not be the address shown in the PC register. This is because of pipelining effects.


rwatch [-d] [-p] {[filename:]symbol|*address} [vmid vmid]



Disables the watchpoint immediately after creation.


Specifies whether or not the resolution of an unrecognized watchpoint location results in a pending watchpoint being created.


Specifies the file.


Specifies a global/static data symbol. For arrays or structs you must specify the element or member.


Specifies the address. This can be either an address or an expression that evaluates to an address.


Specifies the Virtual Machine ID (VMID) to apply the breakpoint to. This can be either an integer or an expression that evaluates to an integer.

Example 1-126 Examples

rwatch myVar1                     # Set read watchpoint on myVar1
rwatch *0x80D4                    # Set read watchpoint on address 0x80D4