| |||
| Home > RealView Debugger Commands > Alphabetical command reference > TRACEDATAREAD | |||
The TRACEDATAREAD command enables you to set a tracepoint on data reads.
This command is valid only for ETM-based hardware targets.
[,TRACEDATAREAD qualifier...] {address | address-range}
where:
qualifierIs an ordered list of zero or more qualifiers. The possible qualifiers are described in List of qualifiers.
addressSpecifies the address at which the tracepoint is placed.
address-rangeSpecifies the address range at which the tracepoint is placed.
This command sets a tracepoint at the address or address range you specify that triggers when an instruction access at the indicated address reads data from memory.
The tracepoint type is by default to trigger, that is, start
collecting trace information into the trace buffer. You can modify
the action using the hw_out: qualifier to, for
example, stop tracing.
The command qualifiers are as follows, but not all qualifiers are available for all of the supported trace targets:
hw_ahigh:(n)Specifies the high address for an address-range tracepoint. The low address is specified by the standard tracepoint address.
For example, to set a tracepoint that triggers when any data value is read from
an address in the range 0x1000-0x1200,
enter the command:
TRACEDATAREAD,hw_ahigh:0x1200 0x1000
This is equivalent to the command:
TRACEDATAREAD 0x1000..0x1200
hw_and:{id |
"then-id"}Perform
an and or an and-then conjunction
with an existing tracepoint identified by ,
which is one of:id
next for
the next breakpoint specified for this connection
prev for the last breakpoint
specified for this connection
the breakpoint list index of an existing breakpoint.
The parentheses are optional.
Tracepoints set in this way are called chained tracepoints. How RealView Debugger processes the tracepoints depends on the conjunction you have used:
In the and form, the conditions associated with both tracepoints are chained together, so that trace capture starts only when both conditions simultaneously match.
For example:
TRACEDATAREAD,hw_and:next \MODIFY\#582 TRACEDATAREAD,hw_and:prev \ACCESS\#379
In the and-then form, RealView Debugger examines the chained tracepoints starting with the last one you specified. When the condition for the last tracepoint is met, the previous tracepoint is enabled. However, trace capture starts only when this tracepoint condition is met. RealView Debugger continues processing all tracepoints in the chain, until the condition in first one you specified is met. At this point, trace capture starts.
You must include the quotes when using the and-then form.
For example, you might have three tracepoints in a chain:
TRACEDATAREAD,hw_and:"then-next" 0x10014
TRACEDATAREAD,hw_and:"then-prev" 0x10018
TRACEDATAREAD,hw_and:"then-prev" 0x1001B
In this case, RealView Debugger first checks for a data read at address 0x1001B,
then at address 0x10018, and finally at address 0x10014.
When all conditions are met, trace capture starts.
If you clear a tracepoint that has the ID next,
then all tracepoints in the chain are cleared.
If you clear a tracepoint that has the ID prev,
then that tracepoint and the following ones are cleared. The previous
breakpoints in the chain remain set.
hw_dhigh:(n)Specifies the high data value for a data-range tracepoint.
The low data value is specified by the hw_dvalue qualifier.
For example, to set a tracepoint that triggers when a data
value in the range 0x00-0x18 is
read from address 0x1000, enter the command:
TRACEDATAREAD,hw_dvalue:0x0,hw_dhigh:0x18 0x1000
hw_dmask:(n)Specifies the data value mask for a data-range tracepoint.
The data value to which the mask is applied is specified by the hw_dvalue qualifier.
The data value range is determined by masking lower order bits out
of the specified data value.
For example, to set a tracepoint that triggers when a data
value in the range 0x400-0x4FF is
read from address 0x1000, enter the command:
TRACEDATAREAD,hw_dvalue:0x400,hw_dmask:0xF00 0x1000
hw_dvalue:(n)Specifies a data value to be compared to values transmitted on the processor data bus.
For example, to set a tracepoint that triggers when the data
value 0x400 is read from the address 0x1FA00,
enter the command:
TRACEDATAREAD,hw_dvalue:0x400 0x1FA00
hw_in:{s}Input trigger tests. The string is
specific to the trace connection being used. For the ARM ETM, the
following case-sensitive forms are defined:s
Ignore Security Level=Yes|NoEnables Secure and Normal mode data comparisons for processors that implement the TrustZone architecture:
YesMatch when the processor is in any mode. This is the default.
NoMatch only when the processor is in the mode specified by the address suffix:
S: indicates
Secure mode.address
N: indicates
Normal mode.address
For example, to capture trace when a data value is read from
the Secure mode address 0x8100, enter the command:
TRACEDATAREAD,hw_in:{Ignore Security Level=No} S:0x8100.
"Size of Data Access=s"This determines the following:
for data accesses, the size of the data transfer
for instruction accesses, the size of the instruction accessed.
The size is
one of:s
AnyDepends on the implementation:
halfword for Thumb code
word for ARM code.
This is the default.
Halfword16-bit accesses (Thumb code).
Word32-bit accesses (ARM code).
For example, to set a tracepoint that triggers for any 32-bit
data read that occurs at an address in the range 0x1E000-0x1FF00,
enter the command:
TRACEDATAREAD,hw_in:"Size of Data Access=Word" 0x1E00..0x1FF00
hw_not:{s}Use this qualifier to invert the sense of an address,
data, or hw_and term specified in the same command.
The argument can
be set to:s
addrInvert the tracepoint address value.
dataInvert the tracepoint value.
thenInvert
an associated hw_and:{then} condition.
For example, to capture trace when a data value does not match a mask, enter the command:
TRACEDATAREAD,hw_not:data,hw_dmask:0x00FF ...
The trace commands require an address value, and the addr variant of hw_not uses
this address. For example, to trace execution at addresses other
than in the range 0x10040-0x10060,
that is, exclude this region from the trace, enter the command:
TRACEDATAREAD,hw_not:addr 0x10040..0x10060
The hw_not:then variant of the command
is used in conjunction with hw_and to form or and nand-then conditions.
hw_out:{s}Output trigger tests. The string is
specific to the trace connection being used. For the ARM ETM, the
following case-sensitive form is defined:s
"Tracepoint Type=s"Specify the trace action that occurs when data is
read by an instruction at the specified address, where is:s
TriggerOutput a trigger event to the TPA.
Start TracingStart trace capture.
Stop TracingStop trace capture.
Trace InstrTrace instructions only.
Trace Instr and DataTrace instructions and data.
An address range can be specified only for Trace
Instr and Trace Instr and Data.
For example, to trace only instructions when a data read occurs and
an instruction is executed at an address in the range 0x1E000-0x1FF00,
enter the command:
TRACEDATAREAD,hw_out:"Tracepoint Type=Trace Instr" 0x1E00..0x1FF00
hw_passcount:(n)Specifies the number of times that the specified condition has to occur to trigger the tracepoint.
You can use this option to set up and use the ARM ETM counter hardware, if the ETM has counters and there is one available for use. ETM counters are 32 bits.
modify:(n)Instead of creating a new tracepoint, modify the
tracepoint with tracepoint ID number by
replacing the address expression and the qualifiers of the existing
tracepoint to those specified in this command.n
You cannot use this qualifier with the hw_and qualifier
to change a non-chained tracepoint to a chained tracepoint. However,
you can modify a chained tracepoint with any other qualifier and
also change the address expression.
The following examples show how to use TRACEDATAREAD:
TRACEDATAREAD
&@trace\\num_runsTrigger
trace output when the variable num_runs is read
in the file trace.c.
TRACEDATAREAD,hw_out:"Tracepoint
Type=Trace Instr" 0x8100..0x8110Start tracing instructions when a data read occurs at an address
in the range 0x8100-0x8110.
TRACEDATAREAD,hw_pass:5,hw_out:"Tracepoint
Type=Start Tracing" 0x8100Start
tracing when a data read occurs at address 0x8100.
TRACEDATAREAD,hw_out:"Tracepoint
Type=Stop Tracing" 0x8100..0x8110Stop tracing when a data read occurs from an address in the
range 0x8100-0x8110.
the following in the RealView Debugger Trace User Guide:
Embedded Trace Macrocell Specification.