Valgrind-3.12.0

Introduction to Valgrind

Valgrind is an instrumentation framework for building dynamic analysis tools. There are Valgrind tools that can automatically detect many memory management and threading bugs, and profile programs in detail. Valgrind can also be used to build new tools.

This package is known to build and work properly using an LFS-8.0 platform.

Package Information

  • Download (HTTP): http://valgrind.org/downloads/valgrind-3.12.0.tar.bz2

  • Download MD5 sum: 6eb03c0c10ea917013a7622e483d61bb

  • Download size: 12 MB

  • Estimated disk space required: 344 MB (additional 228 MB for tests)

  • Estimated build time: 1.2 SBU (additional 5.1 SBU for tests)

Valgrind Dependencies

Optional

Boost-1.63.0, LLVM-3.9.1 (with Clang), GDB-7.12.1 (for tests), Which-2.21 (for tests), BIND-9.11.0-P3 or BIND Utilities-9.11.0-P3 (for tests), and OpenMP

Optional for regenerating the documentation

libxslt-1.1.29 and texlive-20160523b (or install-tl-unx)

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/valgrind

Installation of Valgrind

Install Valgrind by running the following commands:

sed -i 's|/doc/valgrind||' docs/Makefile.in &&

./configure --prefix=/usr \
            --datadir=/usr/share/doc/valgrind-3.12.0 &&
make
[Note]

Note

To run the tests for this package, valgrind requires a version of the /lib/ld-2.24.so (or later) library with debugging symbols present. Normally in LFS these debugging symbols are stripped at the end of Chapter 6. To get this library, glibc must be rebuilt with the current glibc version using the same compiler that was used to build LFS. The ld.so can then be renamed to ld-2.24.so.dbg and copied to /lib. Then a symlink needs to be changed:

ln -sfv ld-2.24.so.dbg /lib/ld-linux-x86-64.so.2

Adjust the above instruction as needed for a 32-bit system or for a different version of glibc.

In addition, other glibc libraries with debugging symbols present may be needed for some tests.

To test the results, issue: make regtest. The tests may hang forever if GDB-7.12.1 is not installed.

Now, as the root user:

make install

Command Explanations

sed -i ... docs/Makefile.in : This sed provides for installing the documentation in a versioned directory.

Contents

Installed Programs: callgrind_annotate, callgrind_control, cg_annotate, cg_diff, cg_merge, ms_print, valgrind, valgrind-di-server, valgrind-listener, and vgdb
Installed Library: libcoregrind-<Arch>-linux.a, libreplacemalloc_toolpreload-<Arch>-linux.a, libvex-<Arch>-linux.a, libvexmultiarch-amd64-linux.a, vgpreload_core-<Arch>-linux.so, vgpreload_drd-<Arch>-linux.so, vgpreload_exp-dhat-<Arch>-linux.so, vgpreload_exp-sgcheck-<Arch>-linux.so, vgpreload_helgrind-<Arch>-linux.so, vgpreload_massif-<Arch>-linux.so, and vgpreload_memcheck-<Arch>-linux.so, where <Arch> is x86 or amd64
Installed Directories: /usr/lib/valgrind, /usr/include/valgrind, and /usr/share/doc/valgrind-3.12.0

Short Descriptions

valgrind

is a program for debugging and profiling Linux executables.

callgrind_annotate

takes an output file produced by the Valgrind tool Callgrind and prints the information in an easy-to-read form.

callgrind_control

controls programs being run by the Valgrind tool Callgrind.

cg_annotate

is a post-processing tool for the Valgrind tool Cachegrind.

cg_diff

compares two Cachegrind output files.

cg_merge

merges multiple Cachegrind output files into one.

ms_print

takes an output file produced by the Valgrind tool Massif and prints the information in an easy-to-read form.

valgrind-di-server

is a server that reads debuginfo from objects stored on a different machine.

valgrind-listener

listens on a socket for Valgrind commentary.

vgdb

is an intermediary between Valgrind and GDB or a shell.

Last updated on 2017-02-14 22:04:32 -0800