[Libreoffice-qa] Using Valgrind

Stephan Bergmann sbergman at redhat.com
Thu Aug 27 00:30:37 PDT 2015

On 08/26/2015 07:25 PM, Aleksandr P wrote:
> Usually I use Valgrind with command:
> $ valgrind [parameters] program
> With LibreOffice another variant is possible
> (https://wiki.documentfoundation.org/QA/BugReport/Debug_Information):
> $ soffice --valgrind
> What is the difference between these variants? How to use valgrind
> parameters with the second one?

soffice is a shell script that ultimately runs soffice.bin.  With the 
first variant, you valgrind that shell script (plus, recursively any 
children, incl. soffice.bin, depending on valgrind's --trace-children 
setting).  With the second variant, the shell script takes care to just 
valgrind the soffice.bin child (plus setting some useful default 
valgrind options and some other useful env vars; see the shell script 
for details).

Valgrind itself reads options from a VALGRIND_OPTS env var, so you can 
use that to tunnel in further options in the second case.  See the 
valgrind documentation for further details.

More information about the Libreoffice-qa mailing list