gdb
gdb
https://sourceware.org/gdb/
What is GDB?
GDB, the GNU Project debugger, allows you to see what is going on `inside' another program while it executes -- or what another program was doing at the moment it crashed.
GDB can do four main kinds of things (plus other things in support of these) to help you catch bugs in the act:
- Start your program, specifying anything that might affect its behavior.
- Make your program stop on specified conditions.
- Examine what has happened, when your program has stopped.
- Change things in your program, so you can experiment with correcting the effects of one bug and go on to learn about another.
Those programs might be executing on the same machine as GDB (native), on another machine (remote), or on a simulator. GDB can run on most popular UNIX and Microsoft Windows variants, as well as on Mac OS X.
What Languages does GDB Support?
GDB supports the following languages (in alphabetical order):
- Ada
- Assembly
- C
- C++
- D
- Fortran
- Go
- Objective-C
- OpenCL
- Modula-2
- Pascal
- Rust
GNU Debugger Tutorial
https://www.tutorialspoint.com/gnu_debugger/index.htm
http://www.gdbtutorial.com/tutorial/how-use-gdb-example
中文教程
http://c.biancheng.net/gdb/
命令大全
https://shuziweiji.com/ref/docs/gdb.html
参考手册
https://www.eecs.umich.edu/courses/eecs373/readings/Debugger.pdf