- publishing free software manuals
Valgrind 3.3 - Advanced Debugging and Profiling for GNU/Linux applications
by J. Seward, N. Nethercote, J. Weidendorfer and the Valgrind Development Team
Paperback (6"x9"), 164 pages
ISBN 0954612051
RRP £12.95 ($19.95)

Get a printed copy>>>

3.6.7 Setting default Options

Note that Valgrind also reads options from three places:

  1. The file ‘~/.valgrindrc’
  2. The environment variable $VALGRIND_OPTS
  3. The file ‘./.valgrindrc’

These are processed in the given order, before the command-line options. Options processed later override those processed earlier; for example, options in ‘./.valgrindrc’ will take precedence over those in ‘~/.valgrindrc’. The first two are particularly useful for setting the default tool to use.

Any tool-specific options put in $VALGRIND_OPTS or the ‘.valgrindrc’ files should be prefixed with the tool name and a colon. For example, if you want Memcheck to always do leak checking, you can put the following entry in ‘~/.valgrindrc’:


This will be ignored if any tool other than Memcheck is run. Without the ‘memcheck:’ part, this will cause problems if you select other tools that don't understand ‘--leak-check=yes’.

ISBN 0954612051Valgrind 3.3 - Advanced Debugging and Profiling for GNU/Linux applicationsSee the print edition