
Debug Support
8-6
Copyright 1999, 2000 ARM Limited. All rights reserved.
ARM DDI 0144B
You can build external logic, such as additional breakpoint comparators, to extend the
functionality of the EmbeddedICE unit. You must apply the external logic output to the
IEBKPT
input. This signal is ORed with the internally generated breakpoint signal
before being applied to the ARM9TDMI core control logic.
A breakpointed instruction is allowed to enter the Execute stage of the pipeline, but any
state change as a result of the instruction is prevented. All writes from previous
instructions complete as normal.
The Decode cycle of the debug entry sequence occurs during the Execute cycle of the
breakpointed instruction. The latched breakpoint signal forces the processor to start the
debug sequence.
8.3.2
Breakpoints and exceptions
If a breakpointed instruction has a Prefetch Abort associated with it, the Prefetch Abort
takes priority and the breakpoint is ignored. (If there is a Prefetch Abort, instruction data
could be invalid, the breakpoint might have been data-dependent, and because the data
could be incorrect, the breakpoint might have been triggered incorrectly.)
SWI
and undefined instructions are treated in the same way as any other instruction that
might have a breakpoint set on it. Therefore, the breakpoint takes priority over the
SWI
or undefined instruction.
On an instruction boundary, if there is a breakpointed instruction and an interrupt (
IRQ
or
FIQ
), the interrupt is taken and the breakpointed instruction is discarded. When the
interrupt has been serviced, the execution flow is returned to the original program. This
means that the instruction that previously breakpointed is fetched again, and if the
breakpoint is still set, the processor enters the debug state when it reaches the Execute
stage of the pipeline.
When the processor has entered debug state, it is important that additional interrupts do
not affect the instructions executed. For this reason, as soon as the processor enters the
debug state, interrupts are disabled, although the state of the I and F bits in the
Program
Status Register
(PSR) are not affected.
8.3.3
Watchpoints
Entry into debug state following a watchpointed memory access is imprecise. This is
necessary because of the nature of the pipeline and the timing of the watchpoint signal.