Debugger Services Framework (DSF) |
|
| The Debugger
Services Framework
is a new API for integrating debuggers into Eclipse. It is an
alternative to the Standard Debug Model API in Platform and it
leverages the new Flexible Hierarchy API that allows
extensive control over the debugger views' contents. It is also
designed to help achieve better performance when debugging applications
on slow or remote targets. From the user's perspective, debuggers based on DSF should appear, for the most part, identical to debuggers based on the standard API. This is one of the goals of DSF: to preserve the existing workflows and user paradigms. Most DSF features are targeted towards the developers of debugger integrations and are designed to help achieve better performance and maintainability, however there are some user-facing features which are described here. |
|
Smooth Stepping |
As stepping through
code is one of the key functions of a debugger, a
lot of energy in DSF development went into perfecting the user
experience of this feature. DSF stepping uses the following
optimizations:
|
Limited Stack Trace Length |
A program with a deep stack
trace can make the Debug view difficult to
use and can degrade performance. DSF offers a simple feature to
deal with this problem. When a program first suspends, only a
limited set of stack frames is shown to the user. A special last
element in the stack trace, labeled <...more
frames...> is shown if there are more stack frames
available. When the user double-clicks on this element, the next
chunk of the stack trace is shown. The initial stack frame limit
is set via a preference, and the size of the next chunk doubles with
each double-click.
|
Synchronizing stepping with view updates |
Stepping with a DSF-based debugger is optimized to achieve maximum speed while still giving user feedback about the location of the instruction pointer in the code. However, in certain scenarios the user also needs to monitor a particular variable or register until it reaches a certain value, while stepping. DSF offers a mode where the stepping speed is controlled so that the visible debugger views are also updated after every step. This mode is controlled by a preference setting. |
Update Policies |
When debugging a process running
on a slow target, it is often
desirable to restrict the amount of data that is retrieved by the
debugger. One way to achieve this is to close or hide some of the
the debug views, but this is not convenient because it forces the user
to constantly re-arrange his views. Instead, DSF allows
the user to disable automatic updating of debugger views and to update
them on request only.
There are three components of this feature:
![]() Debug Update Modes action set selection. |
Expressions View |
DSF takes advantage of new APIs in Debug Platform to enable additional features in the Expressions view. |
Column-Based Display |
Variables, registers, register groups, etc, are all displayed
in the Expressions view identically to how they are shown in their native
views. This also means that the user may use in-line editing
to change the values of those variables and registers.
The Expressions view is still based on text expressions, which are
parsed
to determine the element (variable, register, bit field, etc.) that
they represent.
|
Editing Expressions In-Line |
Just as values can be edited
in-line, the column based display also
allows the expressions to be edited without opening a new dialog.
Simply select the expression to change and type in the new name.
|
Creating New Expressions In-Line |
Finally, just as editing existing expressions can be done in-line, adding a new expression can be accomplished by selecting the Add new expression entry, and typing in the new expression name. |
Number Format |
Viewing variables, registers, and expressions in different formats is a typical debugging use case. DSF provides a couple of generic mechanisms for doing this. |
Selection Menu |
Each of Variables, Registers, and
Expressions views allows the user to
select the default format to use in displaying the elements in the given
view. Note: changing the number format for individual elements is not yet supported.
|
Detail Pane |
DSF also provides a detail pane
for viewing a given element using
different formats. Simply selecting a variable, register, etc.,
causes the selection to be shown in the detail pane in the different available formats.
|
GDB Debugger |
|
| The Device Debugging project is
using the GDB debugger integration as a
reference implementation of the DSF API. The goal of this effort
is to provide a debugger that has feature parity with the GDB debugger
which is already part of the CDT project, while taking advantage of the
unique features that DSF affords.
The following sections given an overview of the DSF-GDB debugger
features and its main differences with CDI-GDB. Note: This document will use the term CDI-GDB to refer to the curren t GDB debugger integration in the CDT project. For GDB users, the most important limitation of DSF-GDB implementation may be the fact that it only supports GDB versions 6.7 and newer, and is tested only on the Linux platform. Meanwhile, the CDI-GDB integration is known to work with GDB versions as old as 5.2.1. |
|
Launching |
There are three types of
launches that are supported:
In the launch configuration dialog, each of these launch types
(shown below) has a star overlay in the icon and the (Experimental -
DSF) postfix in the label, in order to distinguish them from the
CDI-GDB
debugger. The user can edit the launch configuration parameters
using the launch configuration tabs described below. ![]() Different C/C++ launch
configuration types in launch dialog.
|
Main Tab |
Allows the user to specify the executable used for
debugging. It is almost identical to the one used in CDI-GDB except:
|
Arguments Tab
|
Allows the user to specify
parameters for the new process being launched in the debugger. It
is used only for the "C/C++ Local Application" launch, and it is identical to
the tab used by CDI-GDB. |
Debugger Tab |
This tab follows the same format
as the corresponding tab in CDI-GDB but works a little differently:
|
Source Tab |
This is a standard debugger tab and it allows the user to configure how the sources locations in the executable file are mapped to the file system. The source lookup options are identical to CDI-GDB. |
Common Tab |
This tab is shared by all
Eclipse-based debuggers and it allows the user to configure additional
standard debugger features (e.g. console output and launch
configuration storage location). |
Debug View |
|
Layout
|
The layout in the Debug view follows the
standard conventions and there are only
minor differences with CDI-GDB with respect to features:
|
Commands |
The debugger supports the same run control actions and program control actions as CDI-GDB, with the exception of the Run to line action
), where the user can repeatedly attach to other
running processes using the multi-process support in GDB 7+ (still in development). See
also the Multi-Process Debugging section. |
Non-Stop Multi-Threaded Debugging |
The upcoming release of GDB (version 7.0) will support
a new
mode for debugging multi-threaded applications. In this mode,
called "non-stop", some threads can be suspended while other threads
remain running. DSF-GDB developers have been working closely with
the GDB community to support this feature even as the release is still
being finalized. ![]() Debug view showing Thread[3] running while the other two process threads are suspended. |
Multi-Process Debugging |
The upcoming release of GDB (version 7.0) will support
the debugging of multiple processes at once. This will allow
the same DSF-GDB launch to control and debug more than one process
at the same time. DSF-GDB developers are working closely with
the GDB community to support this feature even as it is
being added to GDB. ![]() Debug view showing three processes being debugged at the same time. |
Disassembly |
The disassembly view is somewhat
different from the disassembly
available in the CDI-GDB debugger. To open the disassembly view the
user must select the DSF Disassembly
from the Window->Show
View
menu. The main difference from CDI-GDB is that the disassembly
view has an infinite scrolling range. As the user scrolls up and
down, new section of memory is disassembled. Also the user can use
the Go to Address action to
disassemble any location in memory.
|
Variables |
This view is also similar to
CDI-GDB, but it has some differences and
is missing some key features:
|
Registers |
The Registers view is similar to
CDI-GDB with the following differences:
|
Memory |
The memory view supports the same features as CDI-GDB but also the Traditional Memory Rendering. See the Traditional Memory Rendering section. |
Breakpoints |
DSF-GDB uses the same breakpoint
objects as the CDI-GDB
integration. This means that the same breakpoint created in a CDT
editor will work with either debugger. However, there are a
couple of CDI-GDB features which are not supported:
|
Modules |
The Modules view allows the user to
see what executable images and shared
libraries are currently loaded in the debugger. The detail pane
shows additional information including the address and size of each
module.
![]() Executables view |
CLI Console |
The GDB debugger is a command line
debugger and supports a rich
interactive Command Line Interface (CLI). This feature is
available through
the console view and can be used in conjunction with the graphical
debugger views. The user needs to select the gdb process in the Debug view or on
the Console toolbar in order to access the CLI console. The option to
show MI commands and responses that the IDE
sends and receives from GDB is not yet supported.
|
Signals |
CDI-GDB supports a Signals view where the user can configure how signals are handled and to resume the process with a given signal. DSF-GDB does not yet support this feature. |
Traditional Memory Rendering |
|
| The Traditional Memory
rendering, available as an independent feature from the Device
Debugging project, is
an alternative representation of memory in Eclipse. It combines
the numerical representation of memory on the left side with the
text-decoding on the right side, which is the traditional layout of the
memory view in many other IDEs.
|
|
IP-XACT Editor |
|
| The IP-XACT Editor is a tool for
editing and validating IP-XACT
documents. This tool was contributed to Device Debugging project
by the ARM Corp. and as of 1.0 release supports the IP-XACT v1.4
specification.
|
|