Debugging

From DISI
Revision as of 20:11, 8 October 2012 by Therese (talk | contribs) (4 revisions)
Jump to navigation Jump to search

ftnchek

this is a stub. please embellish.

Valgrind

I have installed valgrind 3.2.0, a memory checker, on hamlet. http://valgrind.org/

Use it like this:

  • cd dock6/src/dock
  • make clean
  • make DOCKBUILDFLAGS='-O0 -g'
  • cd dock6/install/test/amber_score_1lgu
  • /home/sbrozell/bin/valgrind/3.2.0/bin/valgrind --leak-check=yes ../../../src/dock/dock6 -v2 -i move_everything.dockin

Free advice: Valgrind is so great that it should be the 3rd or 4th tool that one turns to for debugging (the first being your eyes - read the code, the 2nd being the compiler - don't ignore its options and comments, and while a debugger is more powerful and versatile than valgrind - valgrind is sometimes much more effective.

Scott