Debugging
Debugging
Debugging
Coding Efficiently
• While the goal is to write perfect, bug-free code, on the first try, this
sometimes does not happten.
• Test-driven development: Write tests first!
• https://github.com/google/googletest
• Start with the primer:
https://github.com/google/googletest/blob/master/googletest/docs/Primer.
md
• Debugging …
Two main debuggers
CS Linux boxes
• GDB: works with the gcc ecosystem
• http://sourceware.org/gdb/current/onlinedocs/gdb/ have gcc/g++
• Search for ”GDB cheat sheet” on the web. Several nice summaries.