Debug
ARM DDI 0301H
Copyright © 2004-2009 ARM Limited. All rights reserved.
13-39
ID012310
Non-Confidential, Unrestricted Access
•
If the PC is read after the processor has entered Debug state, it returns a value as
Table 13-25 lists, depending on the previous state and the type of debug event.
•
If a sequence for writing a certain value to the PC is executed while in Debug state, and
then the processor is forced to restart, execution starts at the address corresponding to the
written value. However, the CPSR has to be set to the return ARM, Thumb, or Jazelle state
before the PC is written to, otherwise the processor behavior is Unpredictable.
•
If the processor is forced to restart without having performed a write to the PC, the restart
address is Unpredictable.
•
If the PC or CPSR are written to while in Debug state, subsequent reads to the PC return
an Unpredictable value.
•
The MSR instruction has an Unpredictable effect on the PC so the PC must be written
before leaving Debug state.
•
If a conditional branch is executed and it fails its condition code, an Unpredictable value
is written to the PC.
Table 13-25 lists the read PC value after Debug state entry for different debug events.
13.10.2 Interrupts
Interrupts are ignored regardless of the value of the I and F bits of the CPSR, although these bits
are not changed because of the Debug state entry.
13.10.3 Exceptions
Exceptions are handled as follows while in Debug state:
Reset
This exception is taken as in a normal processor state, ARM, Thumb, or Jazelle.
This means the processor leaves Debug state as a result of the system reset.
Prefetch Abort
This exception cannot occur because no instructions are prefetched while in
Debug state.
Table 13-25 Read PC value after Debug state entry
Debug event
ARM
Thumb
Jazelle
Return address (RA
a
) meaning
Breakpoint
RA+8
RA+4
RA
Breakpointed instruction address
Watchpoint
RA+8
RA+4
RA
Address of the instruction where the execution
resumes, several instructions after the one that hit the
watchpoint
BKPT instruction
RA+8
RA+4
RA
BKPT instruction address
Vector catch
RA+8
RA+4
RA
Vector address
External debug request signal
activation
RA+8
RA+4
RA
Address of the instruction where the execution
resumes
Debug state entry request
command
RA+8
RA+4
RA
Address of the instruction where the execution
resumes
a. This is the address of the instruction that the processor first executes on Debug state exit. Watchpoints can be imprecise. RA
is not the address of the instruction immediately after the one that hit the watchpoint, the processor might stop a number of
instructions later. The address of the instruction that hit the watchpoint is in the CP15 WFAR.