valgrind 不在 64 位机器上构建 32 位 rpm

RKu*_*Kum 5 valgrind

我有 32 位 C 应用程序(在 64 位系统上运行)泄漏内存。

调试它我已经从http://valgrind.org/downloads/下载了 valgrind 3.8.1 。做了 ./configure、make 和 make install 来安装 valgrind。

但是 valgrind 仅构建 64 位 memcheck-amd64-linux 二进制文件。32 位 memcheck 尚未构建。

结果我得到以下错误

# valgrind --tool=memcheck --time-stamp=yes -v --track-origins=yes --leak-check=yes /home/test_code32 --error-limit=no
valgrind: failed to start tool 'memcheck' for platform 'x86-linux': No such file or directory
Run Code Online (Sandbox Code Playgroud)

Stracing valgrind 给了我:

execve("/usr/local/lib/valgrind/memcheck-x86-linux", ["valgrind", "--tool=memcheck", "--time-stamp=yes", "-v", "--track-origins=yes", "--leak-check=yes", "/home/test_code32", "--error-limit=no"], [/* 60 vars */]) = -1 ENOENT (No such file or directory)
write(2, "valgrind: failed to start tool '"..., 94valgrind: failed to start tool 'memcheck' for platform 'x86-linux': No such file or directory
) = 94
Run Code Online (Sandbox Code Playgroud)

我检查了 ./configure 输出,它说:

checking for 32 bit build support... no
Run Code Online (Sandbox Code Playgroud)

我正在使用 gcc (SUSE Linux) 4.3.4。

知道如何让 valgrind 在 64 位机器上构建 32 位 memcheck 吗?

小智 0

configure尝试使用以下选项重新运行脚本--enable-only32bit

 ./configure --enable-only32bit
Run Code Online (Sandbox Code Playgroud)