
Priorities and Exceptions
Rev. A
B-23
Copyright 2000 by LSI Logic Corporation. All rights reserved.
B.9 Priorities and Exceptions
When a breakpoint or a debug request occurs, the normal flow of the
program is interrupted. Debug therefore can be treated as another type
of exception. The interaction of the debugger with other exceptions is
described in
Section B.8, “Behavior of the Program Counter During
Debug.”
This section covers the priorities.
B.9.1 Breakpoint with Prefetch Abort
When a breakpointed instruction fetch causes a prefetch abort, the abort
is taken and the breakpoint is disregarded. Normally, prefetch aborts
occur when, for example, an access is made to a virtual address that
does not physically exist, and the returned data is therefore invalid. In
such a case, the normal action of the operating system is to swap in the
page of memory and to return to the previously invalid address. This
time, when the instruction is fetched and providing the breakpoint is
activated (it might be data-dependent), the ARM7TDMI-S core enters the
debug state.
Therefore the prefetch abort takes higher priority than the breakpoint.
B.9.2 Interrupts
When the ARM7TDMI-S core enters the debug state, interrupts are
automatically disabled. If an interrupt is pending during the instruction
prior to entering debug state, the ARM7TDMI-S core enters debug state
in the mode of the interrupt. On entry to debug state, the debugger
cannot assume that the ARM7TDMI-S core is in the mode expected by
the user’s program. The ARM7TDMI-S core must check the PC, the
CPSR, and the SPSR to determine accurately the reason for the
exception.
Therefore debug takes higher priority than the interrupt, but the
ARM7TDMI-S core does remember that an interrupt has occurred.