watchpoint

Sets, removes, disables, enables or list watchpoints. You can also set condition on watchpoint.

Syntax

watchpoint

watchpoint [-{r|w|rw}] {<var>|[<ms>:]<addr> <size>}

watchpoint all|#<id>|<var>|[<ms>:]<addr> off|enable|disable

watchpoint #<id> ignore <count>

watchpoint #<id> cond <c-expr>

watchpoint #<id> type -{r|w|rw}

watchpoint #<id> size <units>

Examples

The following table lists and defines examples of the watchpoint command.

Table 1. watchpoint Command-line debugger command - Examples
Command Description
watchpoint Displays all watchpoints.
watchpoint gData Sets read-write (the default) watchpoint on variable gData.
watchpoint -r gData Sets read-only watchpoint on variable gData.
watchpoint all off Removes all watchpoints.
watchpoint #4 disable Disables watchpoint number 4.
watchpoint 10343 4 Sets a watchpoint at memory address 10343 of length 4.
watchpoint #4 ignore 3 Sets ignore count to 3 for watchpoint number 4.
watchpoint #4 cond x == 3 Sets the condition for watchpoint number 4 to fire only if x == 3.
watchpoint #4 type -rw Sets the access type read/write for watchpoint number 4.
watchpoint #4 size 8 Sets the size to 8 units for watchpoint number 4.