Version: 3.2.3 (using KDE Devel) Installed from: Compiled sources OS: Linux I would like to propose a new option for valgrind. --trace-children-skip=prog1,prog2. I am using valgrind for testing cmake www.cmake.org. I use the --trace-children option, because the tests run ctest which runs cmake, but the tests also end up running make, /bin/sh, gcc, and a bunch of other tools I have no interest in doing memchecks for. I will attach the patch.
Created attachment 21422 [details] add --trace-children-skip option
To be more flexible, it might be better to search for the string after the last / in the program being run. Then use that in the search as well. So, you don't have to list the full path to the program you don't want traced. Something like this: Char* program = VG_(strrchr)((Char*)ARG1, '/'); if(program) program++; // move to first char past / VG_(message)(Vg_UserMsg, "program %s %s \n", ARG1, program); if(VG_(strstr)(VG_(clo_trace_children_skip), (Char*)ARG1)|| program && VG_(strstr)(VG_(clo_trace_children_skip), program)) {
I wrote a design proposal for this here, which drew some comments: http://blog.mozilla.com/nnethercote/2009/04/30/making-valgrind-easier-to-use-with-multi-process-programs/
*** Bug 143820 has been marked as a duplicate of this bug. ***
Created attachment 36928 [details] path, updated to curr trunk, & supporting darwin/aix5 execve too Would also like to change it so that the strings specified by --trace-children-skip are regexps, not complete paths.
Created attachment 36931 [details] patch, updated to allow use of ? and * wildcards
Committed as r10927. Thanks.