6.5. 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.

Note

Trace ranges are available only for ETM-based hardware.

You can set trace ranges in conjunction with trace start and end points.

Note

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:

  1. 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.

  2. Select Insert Tracepoint... from the context menu to display the New Tracepoint dialog box. Figure 6.3 shows an example:

    Figure 6.3. New Tracepoint dialog box

    New Tracepoint dialog box

    Note

    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.

  3. Select the required start-range point from the New Tracepoint dialog box:

    Start of Trace Range (Instruction Only)

    Sets the start point for a range of addresses for which trace of program instructions only are captured.

    Start of Trace Range (Instruction and Data)

    Sets the start point for a range of addresses for which trace of program instructions and data accesses are captured.

    Start of Excluded Trace Range (Instruction and Data)

    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.

    Note

    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.

    Start of Excluded Trace Range (Data Only)

    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.

    Note

    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.

    Note

    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.

  4. Click OK. An arrow for the start-range point is placed in the left margin next to the line of code you have selected.

  5. 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.

  6. 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)

    Note

    No start-range point options are available until after you have set an associated end-range point.

  7. Select the available end-range point.

  8. Click OK. An arrow for the end-range point is placed in the left margin next to the line of code you have selected.

Note

For hardware targets, you can set trace ranges in conjunction with trace start and end points.

See also:

Copyright © 2006-2010 ARM Limited. All rights reserved.ARM DUI 0322F
Non-ConfidentialID102410