I have a process x
that I want to check for leaks with valgrind
. The problem is that x
is run by y
, and y
in turn is run by z
. I can't run x
standalone because y
and z
setup the environment for x
, such as environment variables, command line switches, files needed by x
etc.
valgrind
to run on z
but to follow any forks it finds and report them too? valgrind
to follow any forks but only report on the process named x
? valgrind
to attach to already-running process, the way I can do with gdb?I don't know if this matters, but I'm running under SuSE64 linux and valgrind-2.4.0.
Thanks!
Therefore Memcheck does not support eager checking at this time. 5.4. Is it possible to attach Valgrind to a program that is already running? No.
Valgrind doesn't actually execute your code natively - instead it runs it inside a simulator. That's why it's so slow. So, there's no way to make it run faster, and still get the benefit of Valgrind. Your best bet is to set the ulimit so that your program generates a core file when it crashes.
Valgrind (/ˈvælɡrɪnd/) is a programming tool for memory debugging, memory leak detection, and profiling. Valgrind. Original author(s) Julian Seward. Developer(s)
--trace-children=yes
option. If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With