4.1. Tracing from Program Entry

To observe how Auto Tracing works, load TRACE.AXF to your target. Place a breakpoint at the call to Init() from main(), as shown below.

Figure 14. 

Run to the breakpoint. When the breakpoint is reached, program execution is stopped and the contents of the trace buffer are sent to RVD for display.

A trace capture is viewed in the Trace Analysis window. The Trace Analysis window can be opened from the "View - Analysis Window" menu. This option is only available when trace is enabled.

Open the Trace Analysis and observe your Auto Tracing capture. You should see that tracing begins from your program entry point, 0x8000 if built with the supplied files.

Figure 15. 

The trace capture contains the application initialization performed by the C library. If you examine the program's assembly code from the "Dsm" source tab in RVD and scroll to the end of the trace buffer, you will see that tracing ends with the instruction immediately preceding the call to Init() in main(). This instruction is highlighted in red below.

Figure 16. 

Copyright © 2006. All rights reserved.DAI0168B