| |||
| Home > Tracing Tutorial > Tracing data accesses to addresses in an address range > Procedure | |||
To trace data accesses to addresses in an address range:
Remove the tracepoints you set previously:
Right-click on the Load Image+Symbols entry
in the Process Control pane 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 pane 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 tracepoints are removed.
Locate the address of input[] in
the disassembly view:
Click the Disassembly tab in the Code window to display the disassembly view.
In the Cmd tab of the Output pane, enter the command:
printsym input
The details of the symbol input are displayed,
which includes the address range for the array:
@trace\\input : Global int[16]. Address = 0x0000A1F0 to 0x0000A22F
The addresses might be different depending on the target you are using.
Right-click on the white background of the Disassembly tab to display the context menu.
Select Locate Address... from the context menu to display the Prompt dialog box.
Enter the start address of the input[] array, 0xA1F0.
Click OK. The dialog box
closes, and the disassembly view changes to show the disassembly
from the address 0xA1F0. An example is shown
in Figure 10.61.
Set a trace range for the range of addresses occupied
by the input[] array in the disassembly view:
Select the data values between addresses 0xA1F0 and 0xA22F.
All the disassembly between the two addresses is highlighted.
Right-click on the margin of the selected area to display the context menu.
Select Set Trace Range from
the context menu. An instruction execution trace range is set between
addresses 0xA1F0 and 0xA22F.
An example is shown in Figure 10.62.
RealView Debugger generates a TRACE CLI command, which is also displayed in the Cmd tab of the Output pane:
trace,range 0x0000A1F0..0x0000A22C
Modify the instruction execution tracepoint to be a data read tracepoint:
Select Break/Tracepoints from the View menu of the Code window to display the Break/Tracepoints pane.
Right-click on the tracepoint in the Break/Tracepoints pane to display the context menu.
Select Edit... from the context menu to display the Set/Edit Tracepoint dialog box.
Select Trace Instr and Data from the tracepoint type drop-down list.
Select Data Read from the
tracepoint comparison type drop-down list (that is, the on field).
Change the end of range address to 0x0000a22f.
Click OK. The Set/Edit Tracepoint dialog box closes, and the tracepoint is modified. RealView Debugger generates a TRACEDATAREAD CLI command, which is also displayed in the Cmd tab of the Output pane:
trcdread,hw_out:"Tracepoint Type=Trace Instr and
Data",hw_in:"Size of Data Access=Byte",modify:1 0x0000a1f0..0x0000a22f
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. An example is shown in Figure 10.63.