4.9.1. Watchpoints

All ARM debugger watchpoints are data-changed watchpoints. That is, they are not activated if the data point is read or written to with the same data value as the one currently in memory. See Accessing the EmbeddedICE logic directly for details of how to implement other forms of watchpoint.

Hardware versus software watchpoints

Hardware watchpoints are implemented using an EmbeddedICE logic point to detect data writes to addresses that fall inside a mask. This type of watchpoint is efficient because execution stops only when the relevant data is written. However, it completely ties up an EmbeddedICE logic point.

Note

If a structure or an array is being watchpointed, the mask is likely to include some addresses that are not part of the object being watchpointed. In this case, writes to these unwanted addresses are filtered out by the debugger. Execution performance is slightly degraded because the processor is stopped when the unwanted watchpoint is hit, and then restarted automatically by the debugger.

Software watchpoints use the EmbeddedICE logic differently. Instead, after each instruction is executed, the data locations concerned are examined to see whether their values have changed. If a value has changed, execution is halted. Otherwise, execution is restarted. This type of watchpoint significantly reduces execution performance. In addition, it cannot be used on write-only areas of memory, such as some types of memory-mapped device register.

Copyright © 1998-2002 ARM Limited. All rights reserved.ARM DUI 0048F
Non-Confidential