Step-by-Step Guide to your own Linux Application
•
117
Debugging of User Space Programs
WAGO-I/O-SYSTEM 750
Linux Fieldbus Coupler
5.12 Debugging of User Space Programs
5.12.1 Description of the GDB
The GNU Debugger (GDB) is the standard debugger for the GNU Project. It is
a portable debbuger that runs on many systems and works for many
programming languages, including C, C++ and Fortran. GDB is free software
released under the GNU General Public License (GPL).
GDB offers extensive facilities for tracing and altering the execution of
programs. Using GDB, the program's internal variables can be monitored and
modified and functions can be called independently of the program's normal
behavior.
The GDB is to be used in connection with the GDB server to allow cross
debugging between a PC and the Linux fieldbus coupler. Start both the GDB
server on the Linux fieldbus coupler and the GDB debugger on the PC. Both
programs are connected via the Ethernet interface providing a complete
debugger including all standard functions. Using this type of configuration, all
user space programs can be checked.
Debugging is done using the command lines of the GDB as no graphical user
interface is available at the moment. However, there are also graphical front
ends to GDB, such as DDD (Data Display Debugger). This graphical user
interface allows the use of GDB in the same way as in an integrated
development environment.