I was reading this question and realized it might be helpful for entry- and pro-level developers alike (including myself) to have a common reference for best practices in using gdb
.
Many questions asked on Stack Overflow could easily be solved by taking some time to step some code in a debugger, and it would be good to have a community-approved resource to "teach them how to fish", so to speak. Even for those seasoned veterans who occasionally find themselves in gdb
when they are accustomed to a GUI-tastic debugger might benefit from those who are much more familiar with the command line tool.
For starters (both to gdb
and to prime this thread) I submit:
- Ninefinger's
gdb
primer - The
gdb
quick reference guide, which is useful for telling you what commands are available but not how best to use them.
My hope is this thread is a seed planted that is of continued value to the community. If by "continued value" the community decides to nix it altogether, well then the masses have spoken.