|
From: PRASHANT P. <PRA...@ad...> - 2016-04-06 13:20:51
|
Thanks Tom... Your suggestion helped me :)
Thanks,
Prashant
-----Original Message-----
From: Tom Hughes [mailto:to...@co...]
Sent: 06 April 2016 18:00
To: PRASHANT PATEL; val...@li...
Subject: Re: Is is possible to use "valgrind --tool=callgrind" command in "excelp" call
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 (to...@co...)
http://compton.nu/
|