|
From: Mike S. <ma...@gm...> - 2014-01-14 16:48:52
|
On Tue, Jan 14, 2014 at 11:37 AM, Philippe Waroquiers < phi...@sk...> wrote: > On Tue, 2014-01-14 at 11:29 -0500, Mike Shal wrote: > > O > > > > Maybe you can do it with a shell-script wrapper? Eg: > > > > > > run-me.sh: > > > > #! /bin/sh > > > > LD_PRELOAD=./libfakec.so ./myapp -e > > > > > > Then run: > > > > valgrind --trace-children=yes ./run-me.sh > > I do not think so, as the trace-children=yes will cause the valgrind > launcher to be relaunched to launch myapp. And this valgrind child > will then use the problematic LD_PRELOAD library. > > Oh, hmm. I had just tried a simple LD_PRELOAD test with wrapping fopen() and open(). I added a constructor function to the library to see where it gets initialized, and it does indeed get added to valgrind with --trace-children=yes. So, scratch that. We might maybe need to add a valgrind option > --client-ld-preload=...... > to avoid such problem ? > Or maybe a more general --client-environment? That way it's not specific to LD_PRELOAD. -Mike |