GDB (GNU Symbolic Debugger) is simply a debugging tool. It is a free software that is protected by the general Public License, the GPL.
GDB Features
Like all debuggers, GDB allows you to debug a program, including letting the program stop where you want it, at which point you can view variables, registers, memory, and stacks. Further you can modify the variable and the memory value. GDB is a powerful debugger that can debug multiple languages. Here we only involve debugging in C and C + +, not other languages. Another thing to note is that GDB is a debugger, not an integrated environment like VC. You can use some front-end tools such as XXGDB,DDD. They all have graphical interfaces, so they are more convenient to use, but they are just one layer of GDB's shell. Therefore, you should still be familiar with the GDB command. In fact, when you use these graphical interfaces for a long time, you will find the importance of being familiar with GDB commands. Here we will combine simple examples to introduce some of GDB's important common commands. Before you debug your program, when you compile your source program, do not forget the-G option or other appropriate options to add debugging information to the program you want to debug. For example: gcc-g-o hello hello.c.