Trace Stack View is populated with program trace information while the target is in a running or debugging state.
Trace Stack View contains a sequence number, source and destination address, and a repeat count. A new program trace record is shown when a branching instruction happens on the target, for example as a function call or a return from a function.
Sequence Number - Number that keeps track of the order of the record. This number is reset for every trace session. This number will be continued without a break when the trace is cleared using the clear button from the toolbar.
Source - Represents the instruction/source line from which the branch happened. For example, in a function call, Source is the source line from where the function is being called.
Destination - Represents the instruction/source line to which the branching happened. For example, in a function call, Destination is the source code of the starting line of the function.
Repeat Count - Represents the number of times the same source and destination combination occurred consecutively. For example, if there is a delay which is logging the same packets, it will be grouped together and number of times record occurrence is termed as repeat count.
The source and destination contain instruction address, function name, source file name, and line number. If the source line cannot be mapped only the instruction address is given. Double-clicking on the source or destination navigates the cursor in the editor to the appropriate line. Navigation keys Up, Down, Left, Right, and Tab can be used to locate the source/disassembly view for the trace records.
The program trace that is shown in the TraceStack view is cut down to the latest 20,000 records by default. The threshold value can be changed using the slider.
The program trace records are highlighted with a yellow color when the branching instruction was not an expected one. Unexpected branches usually happen due to some exception, and the entry and exit of the exception handler are highlighted with yellow color. The branching inside the exception is not highlighted.
The next and previous exception records can be easily navigated to by using the up and down arrow buttons in the trace view window toolbar.
There are some exceptional cases where some program traces could be missed. In that case, there will be a packet with red color which represents that there is some discontinuation of the program trace information in the sequence. Since the number of missed packets is unknown, the sequence number shown in the Trace Stack view will be continued without any break except adding a red colored packet with a sequence number for it.