| |||
| Home > Tracing with RealView Debugger > Using the Analysis window > Viewing trace information | |||
To view the trace data, click on the Trace tab. This tab enables you to view:
Captured trace data, and shows:
the symbolic representation of instructions that have been traced
the symbolic representation of data that has been traced, interleaved between the traced instructions, if you have specified data capture in the trace configuration
the disassembly of traced instructions and data, with branches to functions showing the symbolic name of the function.
The display of this information is controlled using the options in the Columns section of the Trace Data menu (see Columns in the Trace tab).
Additional information that helps you to interpret the captured trace:
interleaved source
inferred registers
function boundaries
instruction boundaries.
The display of this information is controlled using the options in the Rows section of the Trace Data menu (see Rows in the Trace tab).
You can also hide and show the traced instructions and data as required.
The Trace tab also shows error and warning messages where appropriate (see Status lines in the Trace tab).
The columns displayed in the Trace tab depend on the items you have selected in the Columns section of the Trace Data menu (see Displaying columns in the Trace tab). The following columns are available:
Displays the position of each element within the trace buffer, where the value can represent either:
An index within the trace buffer.
A cycle number, if your trace capture device supports cycle-accurate tracing. To display cycle numbers in this column you must select Cycle accurate tracing in the Configure ETM dialog box (see Cycle accurate tracing).
This column is displayed by default.
unitDisplays the timestamp value. To change the format of the values, select View → Scale Time Units from the menu.
This column shows information only when either Enable Timestamps or Cycle accurate tracing is selected in the Configure ETM dialog box (see Enable Timestamping and Cycle accurate tracing). To scale between times and cycle numbers, select View → Define Processor Speed for Scaling... from the menu.
This column is displayed by default.
Displays a delta timestamp value, indicating the time taken between the previous instruction and the current instruction. To change the format of the values, select View → Scale Time Units from the menu.
This column shows information only when either Enable Timestamps or Cycle accurate tracing is selected in the Configure ETM dialog box (see Enable Timestamping and Cycle accurate tracing).
This column is not displayed by default.
Displays the access type of the current element, which can be any of:
Bus state change.
Code access (fetch).
Data access (read or write).
Direct Memory Access (DMA) transfer operation.
Instruction was executed.
Folded branch (folded by branch prediction unit and never issued).
Folded branch (folded by branch prediction unit and never issued) was not executed.
Interrupt vectoring.
Instructions on targets where the trace does not contain executed flags.
The instruction might or might not have been executed.
An instruction has not been executed.
Pin state change.
Prefetch (so not executed).
External probe state change.
If an access type is prefixed by R, this
indicates a read access. A W prefix indicates
a write access.
This column is displayed by default.
Displays the symbolic position information for the current element, and takes one of the following forms:
source_symbol_name+offset
For example, Arr_2_Glob+0x65 might be a
data access to the variable address Arr_2_Glob,
with an offset of 0x65.
source_symbol_name[\[~]#line_number[..#line_number]]
source_symbol_nameThis can be any symbolic information, including a function, module, variable, or low-level symbol
~This means that the corresponding instruction, and the instructions corresponding to the symbols with the same line number, implement the same line of code. For example, instructions that implement a branch or loop.
#line_number[..#line_number]This means that the corresponding instructions span the specified lines of source code.
For example, your trace output might have the following sequence of symbols:
Func_2\#159 Func_2\~#159 Func_2\#161..#164
The instructions corresponding to the symbols Func_2\#159 and Func_2\~#159 both
implement the source code at line 159 in the function Func_2().
The instruction corresponding to the symbol Func_2\#161..#164 spans
lines 161 to 164 of the source in the function Func_2().
This column is displayed by default.
Displays the address of the instruction or data accessed.
This column is displayed by default.
Displays data values in hexadecimal form.
This column is not displayed by default.
Displays data values in decimal form.
This column is not displayed by default.
Displays the opcode of the instruction accessed.
This column is displayed by default.
For instructions, the disassembled instruction is displayed. For data, the display has the following format:
<Data> ‘character’
| hexvalue [‘character’
| hexvalue ...]
characteris a printable character or a C-style escape code.
hexvalueis the hexadecimal value of the character if it is neither a printable character, nor an escape code.
For example:
<Data> ‘\f’ 0x03 ‘\0’ ‘\0’
This column is displayed by default.
Displays the number of times a particular address was accessed.
This column is not displayed by default.
The options that are selected in the Columns section of the Trace Data menu control what information is displayed in the Trace tab. Table 2.5 summarizes the relationship between items in the Trace Data menu and the columns that are displayed:
Table 2.5. Trace Data menu items and column names
| Trace Data Menu item | Column name |
|---|---|
| Position | Elem |
| Absolute Time | Time/unit |
| Relative Time | +Time |
| Access Type | Type |
| Address as Value | Address |
| Address as Symbol/Line | Symbolic |
| Data Value in Hex | Data/Hex |
| Data Value in Decimal | Data/Dec |
| Opcode | Opcode |
| Interpretation of Data/Opcode | Other |
| Count of Hits | Count |
You can control the type of trace information displayed by selecting the required option(s) from the Trace Data menu:
Displays all entries in the trace buffer, regardless of type.
Displays instruction boundaries, divided by ruler lines. This is useful if you want to see loaded and stored data associated with the instruction that loaded or stored the data. This also shows the traced instructions, even if the Instructions option is not selected.
Displays all instructions.
Displays all data.
Displays additional rows giving the function boundaries.
Function boundaries show where a function was called. Where the compiler inlines function calls, function boundaries are not shown.
If you display Inferred Registers and Function
Boundaries but no other instruction records, then this
view shows values passed into and returned from functions. Therefore,
you can track function behavior. When you are running AAPCS-compliant
code on an ARM processor registers r0-r3 contain
function parameters, and r0 contains a function’s return
value.
Displays the source lines associated with each trace buffer entry interleaved with the buffer entry. The corresponding code is displayed after each buffer entry. Where several successive buffer entries are associated with the same or overlapping sets of source lines, the source line is shown after the first buffer entry and then suppressed. Source code that is executed repeatedly is shown for each execution.
Displays inferred register values interleaved with the trace data, as shown in Figure 2.19. It also shows the instruction boundaries, even if the Instruction boundaries option is not selected.
Inferred register values are inferred from the traced instructions, and are not read from the registers. This means that not all register values are always known.
The Inferred Registers view is only available if you are using an ARM architecture-based processor. In addition, traced instructions must be shown in the Trace tab. That is, when any of the Instructions and Instruction boundaries options is selected.
The register data is shown following the instruction opcode, and shows the values in the registers after the instruction has executed. Register data is displayed in the following way:
Register names are gray.
Unchanged register values are black.
Changed register values are blue.
Unknown register values are represented by --------.
If a register value became unknown in the current cycle, this appears
in blue to indicate a changed register value.
The amount of information that can be inferred depends on the amount of information contained in the trace. If you have not traced data, few register values can be inferred. With full data trace, most register values can be inferred.
When any of the Instructions and Instruction Boundaries options is selected, the inferred register values show the values contained in the registers after the instruction was executed.
When no instruction rows are displayed but Function Boundaries are displayed, the inferred register values shown are the values contained in the registers before the instruction at the function boundary was executed.
You can use the menu items at the bottom of the Trace Data menu to instruct RealView Debugger to display:
only those registers where the value is known
only those register where the value has changed between instructions
a narrower view of the registers in the display.
Enables you to view only those registers whose values are known.
This option is only available when Inferred Registers is selected.
Enables you to view only those registers where the values have changed between instructions.
This option is only available when Inferred Registers is selected.
Enables you to view six registers on a line, instead of eight.
This option is only available when Inferred Registers is selected.
Some rows of the returned trace output in the Analysis window are for status-only purposes, and provide information about the processor cycle. These status lines are displayed in red, and can be any of the following messages:
The Error messages that might be displayed in the Trace tab are:
Error:
Synchronization LostIndicates that RealView Debugger has detected trace data that does not correspond to the image loaded into the debugger, and therefore cannot be decoded.
Error: ETM FIFO OverflowIndicates that tracing was temporarily suspended because the ETM FIFO buffer became full. When this occurs, there is a discontinuity of returned trace information.
Error: Coprocessor data
transfer of unknown sizeWhen tracing data, RealView Debugger executed an unrecognized coprocessor memory access instruction, and the decompressor could not deduce the amount of data transferred by the instruction. Decompression of data tracing, and data address tracing, stop until appropriate synchronization points are found in the trace data.
Error: Data synchronization
lost following FIFO overflowSome versions of the ARM ETM can cause corrupt data trace after a FIFO overflow has occurred. If the decompressor sees a case where this is likely to have happened, it outputs this message, and suppresses data and data address tracing until it can resynchronize.
Error: Unexpected exceptionThe instruction has marked an exception, but the exception address does not appear to be a valid exception address.
Error: Instruction not
knownThe decompressor was not in sync for this instruction, but later discovered that this instruction was an exception.
Error: Incorrect synchronization
addressAn address broadcast for synchronization did not match that being maintained by the decompressor.
Error: Instruction data
overflowed end of bufferThe data for the instruction is not in the buffer. This can occur when trace capture has stopped because it filled the buffer between the instruction being traced and its data being traced. All available data addresses and data are traced.
Error: The next instruction
was traced as a branchThe instruction on the next line is not a branch, but the ETM traced it as a branch. This usually indicates that the wrong image is loaded into the debugger, or the code is self-modifying.
Error: The next instruction
was not traced as an indirect branchThe instruction on the next line is an indirect branch, but the ETM did not trace it as an indirect branch. This usually indicates that the wrong image is loaded into the debugger, or the code is self-modifying.
Error: The next instruction
was traced as a memory access instructionThe trace from the ETM indicated that the instruction on the next line read some data from memory, or wrote some data to memory, but the instruction is not a memory access instruction. This usually indicates that the wrong image is loaded into the debugger, or the code is self-modifying. Decompression of data tracing and data address tracing stops until appropriate synchronization points are found in the trace data.
Error: The next instruction
should have been executed unconditionallyThe trace from the ETM indicated that the instruction on the next line failed its condition code test, so was not executed, but the instruction is one that must be executed unconditionally. This usually indicates that the wrong image is loaded into the debugger, or the code is self-modifying.
Error: Corrupt address
in trace dataThe trace data contains an impossible address. This only occurs as a result of a hardware problem (such as a faulty connector).
Error: The next instruction
was not traced as a branchThe current instruction is a branch but the trace does not indicate this. This usually indicates that the wrong image is loaded into the debugger, or the code is self-modifying. Decompression of data tracing and data address tracing stop until appropriate synchronization points are found in the trace data.
Error: The next instruction
could not be readThe memory containing the traced instruction could not be read. This might occur if the application image attempts to execute a region of unreadable memory, in which case the instruction aborts with a Prefetch Abort. It might also occur if trace is decoded while the image is still running, and the image attempts to execute code outside the loaded image.
The Warning messages that might be displayed in the Trace tab are:
Warning:
Debug StateIndicates that tracing was suspended for several processor cycles because the processor entered debug state.
Warning: Trace PauseIndicates that tracing was temporarily suspended
because of the trace conditions that have been set. Trace
Pause represents the period of execution between the areas
you have defined to be traced.
Warning: Instruction
address synchronization has been restoredThis message occurs after a problem in which instruction address synchronization has been lost. It indicates that the decompressor has found a point at which it can resume decompressing instruction addresses.
Warning: Unable to trace
Jazelle state, trace data ignoredThe ETM detected the processor entering Jazelle® (bytecode) state. The decompressor is unable to decompress Jazelle bytecode execution, so all trace output is suppressed until the processor leaves Jazelle state.
Warning: Data address
synchronization restoredThis message occurs after a problem in which data address synchronization has been lost. It indicates that the decompressor has found a point at which it can resume decompressing data addresses.
Warning: Data synchronization
restoredThis message occurs after a problem in which data synchronization has been lost. It indicates that the decompressor has found a point at which it can resume decompressing data.
Warning: Memory address
unknown, insufficient trace dataThis warning only occurs near the beginning of the decoded trace when the trace buffer (not the FIFO) of the trace capture hardware has overflowed. It means that there has not yet been a complete memory access address in the trace data, and therefore the trace decoder cannot calculate the address of a data access. The ETM outputs a complete address on the first data access traced, and repeats this every 1024 cycles after this, if there are data accesses to be traced. To reduce buffer usage, other memory addresses are output relative to the last full memory address. If the buffer overflows, and the complete address is lost, the decoder cannot calculate data addresses that occur before the next full data address is emitted.
Warning: Data suppression
protected ETM FIFO from overflowThis
warning occurs when you have enabled data suppression (see FIFO overflow protection), and the ETM
has to suppress the output of data in an attempt to prevent an ETM
FIFO overflow. This is usually followed by the Warning:
Data synchronization restored status line when data trace
is restored.