GDB can do four main kinds of things (plus other things in support of these) to help u catch bugs in the act: • Start your program, specifying anything that might affect its behavior. • Make your program stop on specified conditions. • Examine what ha
Linux 包含了一个叫 gdb 的 GNU 调试程序. gdb 是一个用来调试 C 和 C++ 程序的强力调试器. 它使你能在程序运行时观察程序的内部结构和内存的使用情况. 以下是 gdb 所提供的一些功能: 它使你能监视你程序中变量的值. 它使你能设置断点以使程序在指定的代码行上停止执行. 它使你能一行行的执行你的代码.