|
From: Julian S. <js...@ac...> - 2005-10-15 19:24:00
|
> Basically it takes the argument to --tool and then just does an exec > of /usr/lib/valgrind/<tool> so if you install a statically linked callgrind > binary in the valgrind library directory it should all work. I agree. Except also it figures out the name of the launcher and sets VALGRIND_LAUNCHER to this value, so that when child process is exec'd and we want to trace it, the name of the launcher is known. > dunsmere [~] % /tmp/valgrind-debug/lib/valgrind/memcheck date > valgrind: You cannot run '/tmp/valgrind-debug/lib/valgrind/memcheck' > directly. valgrind: You should use $prefix/bin/valgrind. Yeh .. that just means really "VALGRIND_LAUNCHER is not set". Perhaps it would be better to reword the message. So as Josef says the following is probably OK: #!/bin/sh export VALGRIND_LAUNCHER=callgrind exec /usr/local/lib/valgrind/callgrind $* J |