|
From: Nicholas N. <nj...@ca...> - 2004-01-05 16:34:53
|
Hi, A current problem with VALGRIND_OPTS is that you can't put tool-specific options in it, otherwise you'll get problems if you run a different tool. Eg. a Memcheck-specific option will cause Cachegrind to fall over. I have a patch that addresses this, whereby you can prefix an option with "--toolname:" and it will only be run where "toolname" matches the chosen tool. Eg, with this: --memcheck:--leak-check the --leak-check will only be applied for Memcheck, and ignored for other tools. The way I have coded it, this "--toolname:" prefix works in VALGRIND_OPTS or on the command line... the latter wasn't really necessary, but it doesn't seem to be a problem. I was originally thinking of using the syntax "toolname:--option", but it's easier to have "--" at the start, because stage2 considers any command line word that doesn't begin with '-' to be the start of the executable. It wouldn't be hard to allow ./.valgrindrc and ~/.valgrindrc files, too, which can contain (prefixed and non-prefixed) options, just like the VALGRIND_OPTS var. What do people think? N |