10.7.2. Tracing with trace start and end points

To capture trace using trace start and end points:

  1. Remove the trace start and end points and the breakpoint 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 Not Loaded 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. Disable cycle accurate tracing for the ETM:

    1. Select Configure Analyzer Properties... from the Edit menu of the Analysis window to display the Configure ETM dialog box.

    2. Deselect the Cycle accurate tracing check box.

    3. Click OK to close the Configure ETM dialog box. RealView Debugger generates an ETM_CONFIG CLI command, which is also displayed in the Cmd tab of the Output view:

      etm_config,syncfreq:0,packauto

  3. Set a Trace Start Point at the address for line 74 in trace.c:

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

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

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

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

      Figure 10.20. Disassembly view

      Disassembly view

      RealView Debugger generates a DISASSEMBLE CLI command, which is also displayed in the Cmd tab of the Output view, for example:

      dis \TRACE\#74:12

    5. Right-click in the margin at indicated address to display the context menu.

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

    7. Select Trace Start Point from the list of tracepoint types.

    8. Click OK. The dialog box closes, and the Trace Start Point is set as indicated by the green arrow . Figure 10.21 shows an example:

      Figure 10.21. Trace Start Point set

      Trace Start Point set

      RealView Debugger generates a TRACE CLI command, which is also displayed in the Cmd tab of the Output view, for example:

      trace,prompt 0x0000824C

  4. Set a Trace End Point at the address of the first instance of while(1):

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

      Figure 10.22. 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 display the New Tracepoint dialog box.

    4. Select Trace End Point from the list of tracepoint types.

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

      Figure 10.23. Trace End Point set

      Trace End Point set

      RealView Debugger generates a TRACE CLI command, which is also displayed in the Cmd tab of the Output view, for example:

      trace,prompt 0x00008290

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

  6. 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.24 shows an example:

    Figure 10.24. Captured trace in Analysis window

    Captured trace in Analysis window

See also

Copyright © 2006-2010 ARM Limited. All rights reserved.ARM DUI 0322F
Non-ConfidentialID102410