5.3.8. Debug state entry, when Halting debug-mode is enabled

If Debug state entry occurs immediately after execution of a waypoint instruction, then the PTM:

  1. Traces the waypoint instruction normally, by generating one of:

    • An atom, that it outputs in an atom packet. This packet might include any atoms assembled before the exception occurred.

    • A branch address packet.

  2. Generates an exception branch address packet that identifies the Debug state entry exception and with a target address of zero.

If Debug state entry occurs when the processor has executed at least one nonwaypoint instruction since the last waypoint then the PTM:

  1. Upgrades the last instruction executed to a waypoint instruction, and generates a waypoint update packet that indicates the address of that instruction.

  2. Generates an exception branch address packet that identifies the Debug state entry exception and with a target address of zero.

When entering debug state, a branch packet might be generated which indicating a halting debug exception. The following information in the branch packet is not valid and must be ignored:

New values are always output on exit from debug state.

If the Context-ID or VMID changes on entry to debug state, it is implementation specific whether these are output. The current values are always output on exit from debug state.

If the processor also entered a prohibited region when entering debug state, the rules for entering a prohibited region take precedence over these rules.

Tracing exit from Debug state

On exit from Debug state, the PTM treats the instruction address at which the processor restarts as the target of a waypoint. If tracing is enabled at this point, it generates a nonperiodic I-sync packet that includes the address of this instruction. The reason code in the I-sync packet indicates exit from Debug state. If the first instruction executed on exit from Debug state is a waypoint instruction the PTM then traces this instruction normally, using an atom or a branch address packet.

If the processor takes an exception before executing the first instruction on return from Debug state, the PTM generates:

  1. An I-sync packet with a reason code of exit from Debug state, that indicates the address of the first instruction intended for execution out of Debug state.

  2. An exception branch address packet that identifies the exception and gives the address of the exception vector.

When decompressing the trace stream, an exception branch address packet that comes immediately after a debug return I-sync packet shows that, on return from Debug state, the processor took the exception before executing any instructions.

If, on exit from Debug state, the processor executes at least one nonwaypoint instruction before taking an exception then the PTM promotes the last instruction executed to a waypoint instruction, and generates a waypoint update packet before tracing the exception.

Copyright © 1999-2002, 2004-2008, 2011 ARM. All rights reserved.ARM IHI 0035B
Non-ConfidentialID060811