On 06/04/16 13:09, PRASHANT PATEL wrote:

>                   I would like to use “valgrind –tool=callgrind
> <executive name>” in “execlp()” system call as below. Is it possible ?
>
> For me, valgrind is not invoking up.
>
> execlp("/usr/local/pmas/bin/pma", "valgrind --tool=callgrind pma", "-n",
> option_pma_name, NULL);
>
> Is it any other way to do it  ?

Well that's completely wrong is why... You are trying to exec the wrong 
executable and have merged several arguments into one. You want:

execlp("/path/to/valgrind", "valgrind", "--tool=callgrind", 
"/usr/local/pmas/bin/pma", "-n", option_pma_name, NULL);

So you are running valgrind, and providing the arguments that valgrind 
needs including the path to the program it needs to start.

Tom

-- 
Tom Hughes (t...@compton.nu)
http://compton.nu/

------------------------------------------------------------------------------
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to