12.7. Debug exception

The processor takes a debug exception when a software debug event occurs while in Monitor debug-mode. Prefetch Abort and Data Abort Vector catch debug events are ignored. The debug software must carefully program certain debug events to prevent the processor from entering an unrecoverable state. If the processor takes a debug exception because of a breakpoint, BKPT, or vector catch debug event, the processor performs the following actions:

Note

The Prefetch Abort handler is responsible for checking the IFSR to determine if a debug exception or other kind of Prefetch Abort exception caused the exception entry. If the cause is a debug exception, the Prefetch Abort handler must branch to the debug monitor. The R14_abt register holds the address of the instruction to restart.

If the processor takes a debug exception because of a watchpoint debug event, the processor performs the following actions:

Note

The Data Abort handler must check the DFSR to determine if the exception entry was caused by a Debug exception or other kind of Data Abort exception. If the cause is a Debug exception, the Data Abort handler must branch to the debug monitor. The R14_abt register holds the address of the instruction to restart.

Table 12.39 shows the values in the link register after exceptions.

Table 12.39. Values in link register after exceptions

Cause of faultARMThumbReturn address (RA[a]) meaning
BreakpointRA+4RA+4Breakpointed instruction address
WatchpointRA+8RA+8Watchpointed instruction address
BKPT instructionRA+4RA+4BKPT instruction address
Vector catchRA+4RA+4Vector address
Prefetch AbortRA+4RA+4Address of the instruction where the execution can resume
Data AbortRA+8RA+8Address of the instruction where the execution can resume

[a] This is the address of the instruction that the processor can execute first on debug exception return. The address of the access that hit the watchpoint is in the DBGWFAR.


The following sections describe:

Copyright © 2010-2011 ARM. All rights reserved.ARM DDI 0460C
Non-ConfidentialID021511