| |||
| Home > Trace Facilities > Viewing trace output with source code | |||
When you have captured your trace data, you can view it in the Trace window. Trace decompression occurs only for the sections of trace data that are required by the currently displayed page of the Trace window.
Show the Trace window by selecting View Trace from the Trace menu. Trace information is shown in the Trace window when all of the following are true:
there is an Enable Tracing rule in the trace capture rule set
you answer Yes to the Start Tracing now? dialog box or the Restart tracing now? dialog box, or select Start Tracing from the Trace window context menu
the debugger is connected to a target processor and the target has run code
the Enable Tracing rule is TRUE after Start Tracing is enabled
TDT receives and decompresses the trace information from the trace capture hardware.
You can choose to display:
This shows the sequence of ARM or Thumb instructions captured by the ETM, with the oldest executed instructions at the top of the view. See Displaying only traced instructions and data.
Do this by synchronizing the Trace window to the source file view. Activate a debugger window for the relevant source file, and select (checkmark) Sync view on the Trace window context menu. See Displaying trace information in one window, source lines in another.
Do this by clicking Interleave source in the Trace window context menu. See Displaying trace information mixed with corresponding source lines.
The Trace window context menu items relating to locating source and changing view options are disabled until trace information is available.
The Trace window shows a view of the decoded trace information. One of the lines in the Trace window is highlighted, and this is called the trace cursor. You can show different parts of the trace information in any of the following ways:
using the mouse and vertical scroll bar
use the up and down cursor keys to move by line
use the page up and page down keys to move by approximately the Trace window height
use the home key to go to the top of the buffer (the oldest instructions) and the end key to go to the bottom of the buffer (the youngest instructions)
using Goto index... on the Trace window context menu to select a specific line.
The information shown in the Trace window can also provide a location for the debugger memory, source, or disassembly windows:
Right click on the trace line to use as the location, and in the resulting Trace window context menu select one of the items on the Locate to menu. The debugger window used depends on the context:
If the line clicked is an instruction line, or a data line with an associated address, the requested window is opened and displayed.
If the Address column on the selected data line is blank, all Locate to menu items are disabled. If there is no source available for the selected address then the Source menu item is disabled.
If the line clicked is a source line (because you have interleaved source enabled), then you can either display the same source line in its own view, or use the address of the first instruction for that source line to locate a disassembly or memory view.
Double-click on a line in the Trace window to locate to a debugger window. The window used depends on the context:
If the line clicked is a data transfer (because you enabled data tracing), and the Address column is not blank, the memory window is opened and displayed.
If the Address column is blank then nothing happens.
If a source window is active and the line clicked is an instruction or an interleaved source line, then, if known, the source line corresponding to the selected line is displayed.
If no source line is available, then nothing happens.
If a disassembly window is active, then the instructions in that region of memory are disassembled and displayed.
To keep a debugger window in step with the Trace window, so that when the Trace window cursor moves the debugger window contents change as well, checkmark the Sync view item on the Trace context menu. You cannot synchronize a source and a disassembly view to the trace cursor at the same time.