Sets a watchpoint for a data symbol. The debugger stops the target when the memory at the specified address is read or written.
This command records the ID of the watchpoint in a new debugger
number. You can use this variable, in a script, to delete or modify the watchpoint
is the last or second-to-last debugger variable, then you can also access the ID
Watchpoints are only supported on scalar values.
The availability of watchpoints depends on your target. In the case
of Linux application debug using
undodb-server, 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.
awatch [-d] [-p] [-w
Creates the watchpoint disabled.
Specifies whether or not the resolution of an unrecognized watchpoint location results in a pending watchpoint being created.
- Specifies the width to watch at the given address, in bits.
Accepted values are: 8, 16, 32, and 64 if supported by the target. This
parameter is optional.
The width defaults to:
- 32 bits for an address.
- The width corresponding to the type of the symbol or expression, if entered.
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 watchpoint to. This can be either an integer or an expression that evaluates to an integer. Applicable only on targets which support hypervisor / virtual machine debugging.
- Specifies the condition which must evaluate to true at the time the watchpoint is triggered for the target to stop. You can create several conditional watchpoints, but when a conditional watchpoint is enabled, no other watchpoints (regardless of whether they are conditional) can be enabled.
Example 1-8 Examples
awatch myVar1 # Set read/write watchpoint on myVar1 awatch *0x80D4 # Set read/write watchpoint on address 0x80D4 awatch myVar1 if myVar1 == 2 # Set read/write watchpoint on myVar1 which # will only be hit if myVar1 evaluates to 2 awatch myVar1 if $LR & 0xFF == 0x12 # Set read/write watchpoint on myVar1 which # will only be hit if ($LR & 0xFF) evaluates # to 0x12 when myVar1 is accessed