| |||
| Home > Tracing Tutorial > Tracing data with trace ranges > Procedure | |||
To capture data trace with a trace range:
Reload the image:
Right-click
on the Load Image+Symbols entry in the Process
Control view to display the context menu.
Select Reload from the context
menu. The image is reloaded and the PC is reset to the image entry
point (0x8000).
Set a Start of Trace Range for instructions and data at line 210 in the source:
In the Code window, click the trace.c tab in the Code window.
Scroll down until line 210 is visible.
Right-click in the gray margin at line 210 to display the context menu.
Select Insert Tracepoint... from the context menu to display the New Tracepoint dialog box.
Select Start of Trace Range (Instruction and Data) from the list of tracepoint types.
Click OK. The dialog box
closes, and a Start of Trace Range tracepoint is set as indicated
by the green arrow
. Figure 10.53 shows an
example. The tracepoint is set at line 212, because this is where
the code for SendData() starts.
Set an End of Trace Range for instructions and data at line 222 in the source:
In the Code window, click the trace.c tab in the Code window.
Scroll down until line 222 is visible.
Right-click in the gray margin at line 222 to display the context menu.
Select Insert Tracepoint... from the context menu to display the New Tracepoint dialog box.
Select End of Trace Range (Instruction and Data) from the list of tracepoint types.
This is the only trace range option available, because you must complete the current trace range before another trace range can be set.
Click OK. The dialog box
closes, and the End of Trace Range tracepoint is set as indicated
by the green arrow
. Figure 10.54 shows an example:
Click Run on
the Debug toolbar to start execution.
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.
Select Inferred Registers from the Trace Data menu to hide the inferred register view. Figure 10.55 shows an example:
Setting trace ranges in conjunction with trace start and end points
the following in the RealView Debugger Command Line Reference Guide:
Chapter 2 RealView Debugger Commands for details of the TRACE and TRACEBUFFER commands.