Debug Interface
ARM7TDMI Data Sheet
ARM DDI 0029E
8-25
O
8.12.5 System speed access
If a system speed access is performed during debug state, the value of the PC is
increased by 3 addresses. Since system speed instructions access the memory
system, it is possible for aborts to take place. If an abort occurs during a system speed
memory access, ARM7TDMI enters abort mode before returning to debug state.
This is similar to an aborted watchpoint except that the problem is much harder to fix,
because the abort was not caused by an instruction in the main program, and the PC
does not point to the instruction which caused the abort. An abort handler usually looks
at the PC to determine the instruction which caused the abort, and hence the abort
address. In this case, the value of the PC is invalid, but the debugger should know
what location was being accessed. Thus the debugger can be written to help the abort
handler fix the memory system.
8.12.6 Summary of return address calculations
The calculation of the branch return address can be summarised as follows:
For normal breakpoint and watchpoint, the branch is:
- (4 + N + 3S)
For entry through debug request (
DBGRQ
), or watchpoint with exception, the
branch is:
- (3 + N + 3S)
where N is the number of debug speed instructions executed (including the final
branch), and S is the number of system speed instructions executed.
8.13 Priorities / Exceptions
Because the normal program flow is broken when a breakpoint or a debug request
occurs, debug can be thought of as being another type of exception. Some of the
interaction with other exceptions has been described above. This section summarises
the priorities.
8.13.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 which does not physically exist, and the returned
data is therefore invalid. In such a case the operating system’s normal action will be
to swap in the page of memory and return to the previously invalid address. This time,
when the instruction is fetched, and providing the breakpoint is activated (it may be
data dependent), ARM7TDMI will enter debug state.
Thus the prefetch abort takes higher priority than the breakpoint.