The GNU Project Debugger, more popularly known as GDB is the standard debugger for the GNU operating system. It performs debugging operations for many programming languages including Ada, C, C++, Objective-C, Free Pascal, and Java. It consists of an executable file named as gdb which takes as an input a program to be debugged.
GDB was created by Richard Stallman and first released in 1986 for the GNU system. It is now developed by the GNU Project and maintained by the GDB Steering Committee appointed by FSF. Its latest stable version, at the time of this writing, is GDB 7.12 which was released in October of 2016. It is licensed under GNU GPL licensed.
GDB allows to “see” inside another program during its execution and what it was doing if and when it crashed. The user can monitor and modify the values of programs' internal variables being monitored, and even call functions independently of the program's normal behavior. To find a bug in a program it allows four main functionalities:
- Specify statements at the start of program that might affect behavior of program.
- To stop program on certain conditions.
- To see what happens when the program stops on the specified conditions.
- Alter the code to correct a bug(s) and verify the effect of correction.
GDB is written and C and works with most of the operating systems including Windows and other Unix-like systems. It maintains a Debugging Symbol Table that map instructions in the compiled binary program to their corresponding variable, function, or line in the source code. Other features of GDB include:
- Allows remote as well as reversible debugging
- Supports command-line as well as graphical user interfaces.
GDB cannot be used for programs that compile with errors and it certainly cannot fix errors by itself. GDB also cannot detect memory leakages directly even though it can be used to find out memory leakage related bugs.
More on Free and Open Source software, their fundamentals, philosophy, development models and business models in ...

To Order this book click here