4.9.3. Watchpoints, breakpoints, and the program counter

Watchpoints are taken when the data being watchpointed has changed. When this happens, the program counter is updated to point to the instruction following the one that caused the watchpoint to be taken. The value of the watchpointed data is therefore the new value, not the old value.

Breakpoints are taken when the instruction being breakpointed reaches the Execute stage of the pipeline, but before it is executed. So, when the breakpoint is taken, the program counter is not updated, and retains the address of the breakpointed instruction.


Inside the core of an ARM CPU, the program counter typically points to two instructions beyond the currently executing instruction. (Historically, this is the address of the instruction currently being loaded into the Fetch stage of the pipeline.) The ARM debuggers simplify this by reporting a modified value for the program counter so that when it is displayed within the debugger its contents are the address of the instruction being, or about to be, executed.

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