Notes on C++ tools
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!
• [Link]
• Start with the primer:
[Link]
md
• Debugging …
Two main debuggers
CS Linux boxes
• GDB: works with the gcc ecosystem
• [Link] have gcc/g++
• LLDB: works with the clang ecosystem
• [Link]
• [Link]
Example used in class
• Used quicksort code from
[Link]
• Compile: g++ -g -o qksort [Link]
(note the use of –g to generate debug symbols)
• Run the debugger using: gdb qksort
• Search for ”GDB cheat sheet” on the web. Several nice summaries.