2.3.139. TRACE

Provides a quick method of enabling or disabling tracing during program execution. The tracepoints you set with this command are unconditional.

Syntax

TRACE location

TRACE [{{,endpoint} | {,prompt} | {,trigger}}] location

TRACE ,range startlocation..endlocation

TRACE ,data startlocation..endlocation

where:

location

A program source location, specified symbolically or numerically.

startlocation

The start of a program source range, which must be at a lower address than that specified by endlocation.

endlocation

The end of a program source range, which must be at a higher address than that specified by startlocation.

Description

The TRACE command enables you to set trace trigger, start points, and end points in the program. This enables you to switch tracing on or off at specific addresses during program execution (see Trace control during program execution ). The tracepoints you set are unconditional tracepoints. To set more complex tracepoints, use the TRACEDATAACCESS, TRACEDATAREAD, TRACEDATAWRITE, TRACEEXTCOND, TRACEINSTREXEC, or TRACEINSTRFETCH command as appropriate.

Trace control during program execution

The endpoint, range, data, prompt, and trigger qualifiers are used to control tracing during program execution. With no qualifier, the TRACE command sets a trace start point.

To use these commands, you must specify a program source location, for example a memory address within the program image, or a source module and line number.

The commands are as follows:

TRACE location

Set a trace start point in the program at address location.

trace ,endpoint location

Set a trace end point in the program at address location.

trace ,trigger location

Set a trace trigger in the program at address location.

trace ,prompt location

Set an unconditional tracepoint in the program at address location, where the type of tracepoint is selected from a list of supported types presented in a dialog box.

Note

The prompt qualifier is not available when running in command line mode.

trace ,range startlocation..endlocation

Set a trace range in the program from address startlocation to endlocation, so that instructions at addresses between these points are traced.

trace ,data startlocation..endlocation

Set a trace range in the program from address startlocation to endlocation, so that data at addresses between these points are traced.

trace ,range ,data startlocation..endlocation

Set a trace range in the program from address startlocation to endlocation, so that instructions executed and data accessed at addresses between these points are traced.

Note

ARM program code often includes literal pools, constants required by the program that cannot be easily included in the instruction opcodes. Literal pool accesses shows up on data tracing, and might quickly fill up the ETM FIFO buffer quickly, depending on the program.

Examples

The following examples show how to use TRACE:

TRACE,prompt \DHRY_1\#78

Prompts you with a selection of tracepoints that you can set.

TRACE,range,data 0x80200..0x80400

Set tracepoints so that data and code accesses between 0x80200-0x80400 are traced, but not accesses at other addresses.

See also

Copyright © 2002-2011 ARM. All rights reserved.ARM DUI 0175N
Non-ConfidentialID052111