4.5.5. Waypoint update packet

An exception causes a branch in program execution that cannot be determined statically from the program image. When this occurs and at least one nonwaypoint instruction has executed since the last waypoint, then the most recent nonwaypoint instruction is upgraded to a waypoint instruction. The PTM generates a waypoint update packet to trace this upgraded instruction, and a debugger can reconstruct the full program flow from this packet.

The PTM also generates a waypoint update packet if a waypoint occurs that is more than 4096 bytes from the target address of the previous waypoint. See Large blocks of instructions.

A waypoint update packet outputs an address that indicates the point program execution reached before the exception. The packet indicates that the processor has executed all the instructions from the last waypoint, up to and including the address given in the packet. This address is related to the R14 value the processor stores before taking the exception. A waypoint update packet consists of:

The exact format of the waypoint packet depends on the instruction set state of the processor when it executes the execution of the upgraded instruction:

Figure 4.35. Waypoint update packet, ARM state

To view this graphic, your browser must support the SVG format. Either install a browser with native support, or install an appropriate plugin such as Adobe SVG Viewer.


Figure 4.36. Waypoint update packet, Thumb state

To view this graphic, your browser must support the SVG format. Either install a browser with native support, or install an appropriate plugin such as Adobe SVG Viewer.


The PTM compresses the waypoint address in the same way that it compresses the address in a branch address packet. See Address and cycle count compression in branch address packets.

The waypoint address indicates the last instruction that was executed. It does not indicate whether that instruction passed its condition code test. A waypoint update packet indicates that the program executed from the last waypoint instruction up to and including the address output in the packet. It does not indicate the execution of any instructions beyond the output address.

The address output in a waypoint update packet must be both:

Applying this requirement, Table 4.9 shows the permitted waypoint address outputs.

Table 4.9. Permitted waypoint address outputs in waypoint update packets

Instruction type [a]Instruction addressWaypoint address [b]Permitted, with explanation of forbidden cases
ARM0x1000<0x1000No. This is less than the address of the instruction.
0x10000x1000Yes.
0x10000x1001No. Cannot be output, because the ARM state waypoint update packet does not output address bits A[1:0].
0x10000x1002
0x10000x1003
0x10000x1004No. This is not less than the next instruction address, 0x1004.

Thumb,

16-bit instruction

0x1000<0x1000No. This is less than the address of the instruction.
0x10000x1000Yes.
0x10000x1001No. Cannot be output, because the Thumb state waypoint update packet does not output address bit A[0].
0x10000x1002No. This is not less than the next instruction address, 0x1002.

Thumb,

32-bit instruction

0x1000<0x1000No. This is less than the address of the instruction.
0x10000x1000Yes.
0x10000x1001No. Cannot be output, because the Thumb state waypoint update packet does not output address bit A[0].
0x10000x1002Yes.
0x10000x1003No. Cannot be output, because the Thumb state waypoint update packet does not output address bit A[0].
0x10000x1004No. This is not less than the next instruction address, 0x1004.

[a] Instruction set state, and the instruction length for Thumb instructions. The Thumb entries also apply to the ThumbEE instruction set state.

[b] The address output in the waypoint update packet.


When a PTM upgrades a 32-bit Thumb instruction, it is implementation specific whether the address is output in the waypoint update packet.

Note

On an imprecise abort, the waypoint address might not indicate the exact address where execution stopped. This is because the ARM architecture does not define this point precisely.

For more information about how a PTM handles each exception, see Chapter 5 Tracing Exceptions.

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