From: Suryansh K. <sur...@gm...> - 2015-06-04 10:38:24
|
I want to use Valgrind on a dynamically linked GCC plugin, and use massif to find the heap usage and Callgrind to view the callgraph showing each function used in the plugin. I am running the GCC plugin as follows: $ gcc -fplugin=./plugin.so myfile.c When I run the following command, valgrind reports the memory leaks for only gcc and not for plugin.so. I need a way to run valgrind exclusively on my plugin, which is a .so file. $ valgrind gcc -fplugin=./plugin.so myfile.c $ gcc -fplugin=./plugin.so myfile.c -wrapper valgrind I specifically introduced some memory leaks in the plugin and it they were not caught by valgrind. No memory allocations were shown in massif too. Preloading the plugin using LD_PRELOAD doesn't work. Is it even possible to use valgrind on the plugin? I've searched up on this a lot but haven't found any concrete answer on it. |