Chapter 5: Working with GNU Debugger

The debugger is one of the most important components of any development system. No programmer writes a code that works on the first attempt or that does not have any bugs in it. Most of the time you have to go through debugging processes of your programs time and again. Therefore no development system is complete without a debugger. The GNU compiler, Emacs editor and other utilities work very closely with GNU debugger, also known as gdb, which is the debugger of choice of all open source developers community as well as for many commercial products. Many commercial debuggers are also built on top of GNU debugger.

In addition to command line debugging features, you can find many GUI front ends to the GNU debugger. These front ends include the famous xxgdb.

There are many other debuggers available in the open source community. Some of these debuggers are also introduced at the end of this chapter. This chapter provides a comprehensive working knowledge of gdb and how to use it. The text is accompanied by many examples to elaborate concepts presented here. After going through this chapter you should be able to debug many types of programs.

...

Download PDF.