I'm us开发者_运维知识库ing valgrind for profiling/memchecking my application in Eclipse CDT (Indigo).
After profiling it with memcheck in Eclipse, I found two "possibly lost"s (both from libraries that are out of my control). So I want to add them to my suppressions list.
I then ran the same binary using valgrind in command line:
valgrind --leak-check=full --gen-suppressions=all myapp --arg1 --arg2
To my supprise, the two "possibly losts"s are not showing up. (if they show up, I could just add them to my suppressions list in Eclipse)
I'm wondering what options are passed to valgrind in Eclipse profiling. But I don't know how to show the command line of valgrind when profiling in Eclipse.
Please help me out. Thanks.
Peter
I figured it out myself. Actually, it's very simple, and I don't know why I could not think of this before:
On the command line:
plee@pleeUbuntu:~$ ps -ef | grep valgrind
plee 24548 17479 91 12:43 ? 00:00:14 /usr/bin/valgrind.bin --tool=memcheck -q --log-file=/home/plee/EclipseCDT-IndigoWorkspace/.metadata/.plugins/org.eclipse.linuxtools.valgrind.launch/valgrind_%p.txt --trace-children=no --child-silent-after-fork=yes --run-libc-freeres=yes --demangle=yes --num-callers=20 --error-limit=yes --show-below-main=no --max-stackframe=2000000 --dsymutil=yes --suppressions=/home/plee/valgrind_suppressions.supp --leak-check=yes --show-reachable=no --leak-resolution=low --freelist-vol=10000000 --workaround-gcc296-bugs=no --partial-loads-ok=no --undef-value-errors=yes --track-origins=no MyProgramBinary --arg1 --arg2
精彩评论