10.7.4. Tracing with a trace range

To capture trace using a trace range:

  1. Remove the trace start and end points you set previously:

    1. Right-click on the Load Image+Symbols entry in the Process Control view to display the context menu.

    2. Select Unload from the context menu. The image is unloaded.

    3. Right-click on the Load Image+Symbols entry in the Process Control view to display the context menu.

    4. Select Load from the context menu. The image is reloaded and the PC is reset to the image entry point (0x8000). The tracepoints are removed.

  2. Set a Start of Trace Range for instructions only:

    1. In the Code window, click the trace.c tab.

    2. Right-click on line 71 in the trace.c tab to display the context menu.

    3. Select Locate Disassembly from the context menu to open the Prompt dialog box.

    4. The Disassembly tab is displayed, and the corresponding address is indicated by a hollow blue arrow. Figure 10.28 shows an example:

      Figure 10.28. Disassembly view

      Disassembly view

    5. Right-click in the margin at the address corresponding to while(1) to display the context menu.

    6. Select Insert Tracepoint... from the context menu to open the New Tracepoint dialog box.

    7. Select Start of Trace Range (Instruction Only) from the list of tracepoint types.

    8. Click OK. The dialog box closes, and a Start of Trace Range tracepoint is set as indicated by the green arrow . Figure 10.29 shows an example:

      Figure 10.29. Start of Trace Range set

      Start of Trace Range set

  3. Set an End of Trace Range for instructions only at the address of the next instance of while(1):

    1. Scroll down the Disassembly tab until the next instance of while(1) is visible. Figure 10.30 shows an example:

      Figure 10.30. Disassembly view

      Disassembly view

    2. Right-click in the margin at the address corresponding to while(1) to display the context menu.

    3. Select Insert Tracepoint... from the context menu to open the New Tracepoint dialog box.

    4. Select End of Trace Range (Instruction Only) from the list of tracepoint types.

      Note

      This is the only trace range option available, because you must complete the current trace range before another trace range can be set.

    5. Click OK. The dialog box closes, and the End of Trace Range tracepoint is set as indicated by the green arrow . Figure 10.31 shows an example:

      Figure 10.31. End of Trace Range set

      End of Trace Range set

  4. Click Run on the Debug toolbar to start execution.

  5. After a short time, click Stop on the Debug toolbar to stop execution. The captured trace is displayed in the Trace tab of the Analysis window. Figure 10.32 shows an example:

    Figure 10.32. Captured trace in Analysis window

    Captured trace in Analysis window

See also

Copyright © 2006-2011 ARM. All rights reserved.ARM DUI 0322G
Non-ConfidentialID052111