0% found this document useful (0 votes)
12 views4 pages

Debugging

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views4 pages

Debugging

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

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.

You might also like