This is an old revision of the document!
Installing Valgrind
Installing from ports
pkg install valgrind will install a patched version of Valgrind 3.10.1 from the bitbucket repo described below.
pkg install valgrind-devel will install a version of Valgrind that is close to the official Valgrind 3.16.1.
Prerequisites
Building valgrind requires the following ports to be installed:
- gmake
- autoconf
- automake
Obtaining the Valgrind source
The most recent version of Valgrind for is available on github.
To check out the source
git clone https://github.com/paulfloyd/freebsd_valgrind.git
The previous version of the Valgrind FreeBSD can be cloned from a mercurial repository on bitbucket.org: https://bitbucket.org/stass/valgrind-freebsd
To check out the source:
hg clone https://bitbucket.org/stass/valgrind-freebsd
Building
sh autogen.sh ./configure gmake gmake install
TODO
Below is an old list of jobs that needed doing. rfork is still not implemented. We're working on upstream integration. TLS does affect Helgrind and possibly DRD. There are still some signal issues, mainly on i386.
Valgrind src
- Test more syscalls which are disabled and implement the missing ones (rfork mainly, others to come).
- Push FreeBSD changes to upstream valgrind
- [PATCH : FreeBSD support for valgrind in the Valgrind bug tracker
- Fix support for FreeBSD TLS
- http://people.freebsd.org/~marcel/tls.html FreeBSD TLS notes
- http://lwn.net/Articles/5851/ Linux TLS notes
- http://www.pastebin.ca/1798637 Test application [dead link]
- Growable stack / SIGSEGV / kqueue signal delivery issue.
- ptrace handlers
Links
- Valgrind port on freshports