Debug Support
ARM DDI0145B
Copyright © 1998, 1999 ARM Limited. All rights reserved.
5-7
This means that the instruction which was previously breakpointed is fetched again, and
if the breakpoint is still set, the processor enters debug state once it reaches the execute
stage of the pipeline.
Once the processor has entered debug state, it is important that further interrupts do not
affect the instructions executed. For this reason, as soon as the processor enters debug
state, interrupts are disabled, although the state of the I and F bits in the
Program Status
Register (PSR)
are not affected.
5.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.
After a watchpointed access, the next instruction in the processor pipeline is always
allowed to complete execution. Where this instruction is a single-cycle data-processing
instruction, entry into debug state is delayed for one cycle while the instruction
completes. The timing of debug entry following a watchpointed load in this case is
shown in Figure 5-3 on page 5-8.
Note
Although instruction 5 enters the execute state, it is not executed, and there is no state
update as a result of this instruction. Once the debugging session is complete, normal
continuation would involve a return to instruction 5, the next instruction in the code
sequence which has not yet been executed.
The instruction following the instruction which generated the watchpoint could have
modified the
Program Counter (PC)
. If this has happened, it will not be possible to
determine the instruction which caused the watchpoint. A timing diagram showing
debug entry after a watchpoint where the next instruction is a branch is shown in
Figure 5-4 on page 5-9. However, it is always possible to restart the processor.
Once the processor has entered debug state, the ARM9TDMI core may be interrogated
to determine its state. In the case of a watchpoint, the PC contains a value that is five
instructions on from the address of the next instruction to be executed. Therefore, if on
entry to debug state, in ARM state, the instruction
SUB PC, PC, #20
is scanned in and the
processor restarted, execution flow would return to the next instruction in the code
sequence.
Summary of Contents for ARM9TDMI
Page 6: ...Contents vi Copyright 1998 1999 ARM Limited All rights reserved ARM DDI0145B ...
Page 12: ...Preface xii Copyright 1998 1999 ARM Limited All rights reserved ARM DDI0145B ...
Page 16: ...Introduction 1 4 Copyright 1998 1999 ARM Limited All rights reserved ARM DDI0145B ...
Page 22: ...Programmer s Model 2 6 Copyright 1998 1999 ARM Limited All rights reserved ARM DDI0145B ...
Page 110: ...Test Issues 6 6 Copyright 1998 1999 ARM Limited All rights reserved ARM DDI0145B ...
Page 154: ...Index Index 4 Copyright 1998 1999 ARM Limited All rights reserved ARM DDI0145B ...