Other Open Source Debuggers169
5.12Other Open Source Debuggers
In addition to
gdb
, there are many other debuggers available to the open source community.
Many of these debuggers are built on top of the GNU debugger or they use
gdb
concepts. Some
of these debuggers are introduced in this section. The most popular of these is the
ddd
debugger.
xxgdb
is a GUI interface to
gdb
and many people also use it. The
kdbg
comes with KDE on
Linux. All of these debuggers use the same concepts as used by the
gdb
debugger.
5.12.1The kdbg Debugger
KDE debugger comes with KDE desktop development utilities. It is a GUI based upon
GNU debugger. You can start it using the
kdbg
command or from a KDE menu. Using icons in
the tool bar or menus, you can open files to be debugged. Once a file is loaded in the debugger
window, you can click on a line to set or remove break points. To find out the purpose of an icon,
you can move your cursor over the icon on the toolbar to display a short description.
The
kdbg
is a simple debugger but keep in mind that you may not find it as powerful as a
native GNU debugger is. The window that appears when you start the debugger is shown in Figure
5-3. In this window the pointer is on the first
printf
statement where we have a break point set.
You can add a variable to the watch list using the watch window. This window can be
opened by selecting the “Watched Expressions” option from the View menu. The window is
shown in Figure 5-4 where two variables
num1
and
num2
are added to the watch list. You can
click on a variable and then press the “Del” button to remove a variable from the watch list.
The
kdbg
also has an output window that is used to display any output from the program.
This output window is actually an input window as well. You can enter input for the program in
this window. The output window is started when you start the
kdbg
debugger. The output win-
dow is shown Figure 5-5.