| |||
| Home > Setting Unconditional Tracepoints > Setting a trace range | |||
A trace range enables you to capture trace within a specific region of your code. However, any functions that are called within the specified region are not traced.
When you set a trace range using the options described in
this section, the end address is automatically set to 0xFFFFFFFF.
To set a specific end address, you must use the corresponding end
range point option.
Trace ranges are available only for ETM-based hardware.
You can set trace ranges in conjunction with trace start and end points.
If you want to set an exclude trace range within a standard trace range, you must first set a specific end address for the standard trace range.
To set a trace range:
In the source or disassembly view, right-click on the gray margin to the left of the location where you want the trace range to end. A context menu is displayed.
Select Insert Tracepoint... from the context menu to display the New Tracepoint dialog box. Figure 6.3 shows an example.
The options that appear in this dialog box depend on the available resources and on the target that you are using. In some cases, you must clear an existing tracepoint or range to free up the resources you might require for a new tracepoint or range.
Select the required start-range point from the New Tracepoint dialog box:
Sets the start point for a range of addresses for which trace of program instructions only are captured.
Sets the start point for a range of addresses for which trace of program instructions and data accesses are captured.
Sets the start point for a range of addresses for which trace of program instructions and data accesses are not captured. This option is the inverse of the option Start of Trace Range (Instruction and Data), where the excluded range you set ensures that program instructions and data accesses are captured for all areas of your application except those within the range you specify.
If the excluded range you specify contains a branch to another area of your application, that branched area is included in the trace capture if it has itself been marked for capture, or if no other points are set.
Sets the start point for a range of addresses for which trace of data accesses only are not captured. That is, program instructions for the range you specify are captured, and program instructions and data accesses for all areas outside that range are also captured.
If the excluded range you specify contains a branch to another area of your application, the program instructions and data accesses of that branched area are also included in the trace capture if they have themselves been marked for capture, or if no other points are set.
Because the tracepoint type you select from this dialog box is set only at the chosen line of code or address, you must set the start-range and end-range points individually.
Click OK. An arrow
for
the start-range point is placed in the left margin next to the line
of code you have selected.
In the source or disassembly view, right-click on the gray margin to the left of the location where you want the trace range to end. The context menu is displayed.
Select Insert Tracepoint... from the context menu to display the New Tracepoint dialog box. Figure 6.3 shows an example.
An end-range point corresponding to the selected start-range point is available:
End of Trace Range (Instruction Only)
End of Trace Range (Instruction and Data)
End of Excluded Trace Range (Instruction and Data)
End of Excluded Trace Range (Data Only)
No start-range point options are available until after you have set an associated end-range point.
Select the available end-range point.
Click OK. An arrow
for
the end-range point is placed in the left margin next to the line
of code you have selected.
For hardware targets, you can set trace ranges in conjunction with trace start and end points.
See also: