
Execution Control and Instruction Trace
8 DS-5 Quick Start Guide
www.arm.com/ds5 9
Debugger System Views
Debug Control View
Breakpoints and Watchpoints
The DS-5 Debugger supports multi-thread applications and
multiple simultaneous target connections.
The debug control view has a toolbar for processor control
operations, which can be used to connect to a target, run, stop,
and single-step through code.
By clicking on the debug control view you can refocus the
debugger’s system views (source, disassembly, variables, registers,
outline) on a connection, application thread, kernel thread, or
stack frame.
Create new breakpoints by double clicking on the left column
of the source code or disassembly views.
Create new watchpoints (data breakpoints) by right-clicking
on a cell of the variable or memory views.
Edit the properties of a breakpoint to assign:
nCondition: the breakpoint only stops the execution if the
condition (a C expression) is evaluated true.
nIgnore count: number of times the breakpoint is hit until
the application stops.
nRun script: the debugger performs an action (e.g log a
message) automatically when the breakpoint is hit.
nThread-specific breakpoints stop the processor only
when hit from a certain thread.
Instruction Trace
Instruction trace enables the non-intrusive debug of random
time-related issues, which are difficult to replicate by stepping
through the code, and the analysis of performance-critical areas
of software.
When trace is enabled, the debugger records the last
instructions executed by the target. When the execution stops,
the debugger fills the trace view with a history of instructions
synchronized with the source view.
Trace requires a JTAG connection to devices featuring an
Embedded Trace Macrocell (ETM) or Program Trace
Macrocell (PTM).
The number of instructions recorded is limited by the size of
the on-chip Embedded Trace Buffer (ETB). If you need a
larger buffer, do off-chip trace with a DSTREAM unit, which
includes a 4GB buffer.
Simultaneous debug of gnometris and tfft Linux applications.
Select a connection.
Select a thread.
Select a call frame.
Connect and
disconnect.
Step in (F5)
over (F6) or out(F7).
Select source or
disassembly stepping.
Trace View in disassembly mode.
Timeline view.
Zoom 1 to 10,000
instructions per slot.
Click to synchronize
with instruction list.
Profiling report for
trace buffer contents.
Instruction sequence
over time.
Color-coded
instruction type.
Registers, Variables and Expressions
Using the System Views
Debugging Disassembly
The Variables view shows the value of all the application’s
variables under three groups: locals, file statics, and globals.
When debugging images with many global variables you can use
the Expressions view to display the variables of interest. This
often makes the debugger faster.
Both views show variable-related information such as type, size,
location (register or memory), and value.
You can drag & drop variables from the code and variables
view to the expressions view. You can also type expressions
directly in the expressions view.
When doing bare metal development, use the Register view
to view the processor, co-processor and peripheral registers
with the same format as in the target’s documentation.
The variables, registers, memory, and disassembly views display
the status of the system and use color-coding to show what
content has recently changed.
All the system views can be frozen or replicated for easy
comparison of the system status at two points in time. They
also provide configurable type and data size for display.
Most debugger views accept C/C++ expressions. For example,
you can set the value of a register or a memory address with
the expression (*my_ptr) & 0xffffff.
Open the screen view to display the contents of a frame
buffer if you are doing LCD driver or graphics development.
The way the debugger accesses the memory system (e.g., as
bytes, words, or multiple words) is configured via the memory
map. View the memory map with the info mem command,
and configure it with the mem command.
The debugger uses color-coding to match the contents of the
source code and disassembly views. The variables and
expressions views show variable-register allocation.
This enables you to easily track how the compiler generates
assembly code, even when configured at high levels of
optimization.
You can step through code for which debug symbols are not
available by manually selecting the disassembly type to ARM or
Thumb. This is useful, for example, for boot code debug.
Expressions view.
Screen view settings for a TI OMAP3530.
Peripheral registers on a .TI OMAP3530 device
Synchronized source code and disassembly views.
Comentarios a estos manuales