Valgrind relative paths in suppression file

64 Views Asked by At

Valgrind can generate suppression file, but it contains absolute paths to libraries by default. But I want to share this suppression file between multiple computers, my project may be stored on different paths.

How can I specify relative paths to libraries in .supp file?

1

There are 1 best solutions below

1
Ave Milia On BEST ANSWER

The documentation says:

Locations may be names of either shared objects, functions, or source lines. They begin with obj:, fun:, or src: respectively. Function, object, and file names to match against may use the wildcard characters * and ?. Source lines are specified using the form filename[:lineNumber].

Therefore, you can use wildcards and specify relative paths.

For an inspiration see the default suppression file shipped with valgrind (on my computer it is at /usr/lib/valgrind/default.supp), or various *.supp files on the git mirror.