Breakpoints and the program counter

The following events describe the value of the program counter when a breakpoint is taken:

Hardware data breakpoints

The address of the program counter after hitting a hardware data breakpoint depends on the processor being used.

For ARM processors, a skid of either one or two instructions occurs after a data breakpoint is hit. This means that the instruction that generated the breakpoint, and possibly the one after that, are both executed. The program counter shown in your debugger might not be the address of the instruction that generated the breakpoint.

Hardware instruction breakpoints

The address of the program counter after hitting a hardware instruction breakpoint depends on the processor being used.

For ARM processors, no skid occurs after hitting a hardware breakpoint. This means that the instruction that generated the breakpoint has not been executed, and the program counter is set to this address.

Software instruction breakpoints

The address of the program counter after hitting a software breakpoint is always the address of the breakpoint. Unless the instruction is a BKPT instruction, the instruction that generated the breakpoint is not yet executed.

Processor events

The address of the program counter after a processor event is hit depends on the processor being used. For ARM processors, vector catch hardware stops with the program counter on exception vector, before the instruction at that address is executed.

Show/hideSee also

Copyright © 2010-2011 ARM. All rights reserved.ARM DUI 0498D
Non-ConfidentialID071311