| |||
| Home > DS-5 Debugger commands > DS-5 Debugger commands listed in alphabetical order > watch | |||
This command sets a watchpoint for a data symbol. The debugger stops the target when the memory at the specified address is written.
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.
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.
watch [-d] [-p] { [filename:]symbol | *address} [vmid vmid]
Where:
dDisables the watchpoint immediately after creation.
pSpecifies whether or not the resolution of an unrecognized watchpoint location results in a pending watchpoint being created.
filenameSpecifies the file.
symbolSpecifies a global/static data symbol. For arrays or structs you must specify the element or member.
addressSpecifies the address. This can be either an address or an expression that evaluates to an address.
vmidSpecifies the Virtual Machine ID (VMID) to apply the breakpoint to. This can be either an integer or an expression that evaluates to an integer.