|
From: <kei...@te...> - 2006-02-08 01:47:38
|
Hi, Thanks for the rapid reply and sorry for not replying soon. Getting the application started by the shell wrapper partly does what=20 I wanted to do. Though, this way of tracing a target process is required = to modify or create the source code which calls the target executables. So, I wonder if we can trace the target process without having to = change any source code of the applications and their callers. One way that I = think=20 is possible (not sure if it's a correct way) is to implement a feature = which detects a target process and runs valgrind on it with the following options: --tool=3Dnone --quiet --num-callers=3D0 --smc-check=3Dnone=20 What do you think? Cheers, Keishi Sonoda -----Original Message----- From: Paul Pluzhnikov [mailto:ppl...@gm...]=20 Sent: Friday, February 03, 2006 12:46 PM To: TELST ECC SONODA KEISHI Cc: val...@li... Subject: Re: [Valgrind-users] tracing child processes On 2/2/06, kei...@te... <kei...@te...> wrote: > > So, I guess we would be happier if valgrind can trace one specific=20 > process that we are interested in. One way that I have dealt with this: # assume foo is the specific binary of interest, and is exec()ed # by = some other binary. mv foo foo.exe cat > foo <<"EOF" #!/bin/sh exec valgrind <VG-options, if any> foo.exe "$@" EOF chmod +x foo If the processes all run the same executable, the same shell wrapper = could be extended to trigger VG execution depending on command line = arguments, environment variables, etc. Cheers, |