Valgrind-3.16.1

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.

本パッケージは LFS-10.1 において正しくビルドでき動作することが確認されています。

パッケージ情報

Valgrind の依存パッケージ

任意

GDB-10.1 (テスト用), LLVM-11.1.0 (Clang 込み), Which-2.21 (テスト用)

ユーザー情報: http://wiki.linuxfromscratch.org/blfs/wiki/valgrind

Valgrind のインストール

First, adapt the tests to glibc-2.33:

sed -i 's/arm64/amd64/' gdbserver_tests/nlcontrolc.vgtest

以下のコマンドを実行して Valgrind をビルドします。

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

./configure --prefix=/usr \
            --datadir=/usr/share/doc/valgrind-3.16.1 &&
make

To test the results, issue: make regtest. The tests may hang forever if GDB-10.1 is not installed. Some tests are known to hang also, depending on the version of glibc. Some tests in the "drd" test suite are known to fail as well. Problematic tests can be disabled by changing the prereq: line in the corresponding .vgtest file to prereq: false. For example:

sed -e 's@prereq:.*@prereq: false@' \
    -i {helgrind,drd}/tests/pth_cond_destroy_busy.vgtest
[注記]

注記

The OpenMP tests are skipped if libgomp has been compiled with --enable-linux-futex (the default). If needed, just recompile the libgomp library from the gcc build tree, passing --disable-linux-futex to configure, storing the library to some place and changing the link from /usr/lib/libgomp.so.1 to point to the new library.

root ユーザーになって以下を実行します。

make install

コマンド説明

sed -i ... docs/Makefile.in : この sed コマンドはドキュメントのインストールディレクトリをバージョン番号付きとします。

--enable-lto=yes: This option allows building Valgrind with LTO (link time optimization). This produces a smaller/faster Valgrind (up to 10%), but build time increases to about 5.5 SBU.

パッケージ構成

インストールプログラム: callgrind_annotate, callgrind_control, cg_annotate, cg_diff, cg_merge, ms_print, valgrind, valgrind-di-server, valgrind-listener, vgdb
インストールライブラリ: libcoregrind-<Arch>-linux.a, libgcc-sup-<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_helgrind-<Arch>-linux.so, vgpreload_massif-<Arch>-linux.so, and vgpreload_memcheck-<Arch>-linux.so, where <Arch> is x86 or amd64
インストールディレクトリ: /usr/lib/valgrind, /usr/libexec/valgrind, /usr/include/valgrind, /usr/share/doc/valgrind-3.16.1

概略説明

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

最終更新日: 2021-02-21 03:43:29 +0900