Skip to content
This repository has been archived by the owner on Aug 25, 2020. It is now read-only.

Valgrind

Marvin Frick edited this page May 28, 2013 · 1 revision

If an error occurs somewhere in your application, you typically use a debugger that supports you in finding the bug. However, sometimes your application may shows a hard to reproduce behavior and the stacktraces obtained using GDB don't help. This often happens when your program crosses array boundaries, uses deleted pointers, etc. For these situations, valgrind [http://valgrind.org/] is the perfect tool.

Install valgrind (only available on Linux) and prepare your application as described here. Please note that you must have a valid .conf file and can not use jshawn here (see GDB for how to convert a jshawn file to a conf file). Then run

  valgrind --tool=memcheck --leak-check=full NAME-OF-YOUR-SHAWN-EXECUTABLE -f file.conf

to start valgrind (replace NAME-OF-YOUR-SHAWN-EXECUTABLE with the name of your executable file). See the valgrind manual for how to interpret the output.