| |||
| Home > Tracing Tutorial > Collecting trace on a running target > Displaying capturing trace with a trigger | |||
To display the captured trace on a running target using a trigger:
Unload and reload the image:
Right-click on the Load Image+Symbols entry
in the Process Control view to display the context menu.
Select Unload from the context menu. The image is unloaded.
Right-click on the Load Image+Symbols entry
in the Process Control view to display the context menu.
Select Load from the context
menu. The image is reloaded and the PC is reset to the image entry
point (0x8000). The previous tracepoint is removed.
If tracing is disabled, select Tracing Enabled from the Edit menu of the Analysis window.
Click Run on
the Debug toolbar to start execution.
Set a Trigger tracepoint at line 74:
Click the trace.c tab to display the source code.
Scroll down until line 74 is visible.
Right-click in the margin at line 74 to display the context menu.
Select Insert Tracepoint... from the context menu to display the New Tracepoint dialog box.
Select Set Trigger.
Click OK. The New Tracepoint dialog box closes and the Prompt dialog box, is displayed. Figure 10.67 shows an example. To set a tracepoint on a running target, tracing must be disabled.
Click Yes to disable tracing. The following actions occur:
The trigger tracepoint is set.
All trace captured up to the point where tracing is disabled is displayed.
Enable tracing again. When the trigger is activated, the captured trace is updated in the Trace tab of the Analysis window. Figure 10.68 shows an example.
The target continues running.