我已经在VirtualBox上引导的Linux Slitaz-2.6.37(32位)上安装了Valgrind-3.9.0,但是当我试图在C程序(任何A.out文件)上使用它时,我遇到了以下错误:

==29012== Memcheck, a memory error detector
==29012== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Sewrd
==29012== Using Valgrnd-3.9.0 and LibVEX; rerun with -h for copyright info
==29012== Command: a.out
==29012==

valgrind: Fatal error at startup: a function redirection
valgrind: which is mandatory for this platform-tool combination
valgrind: cannot be set up. Details of the redirection are:
valgrind:
valgrind: A must-be-redirected function
valgrind: whose name matches the pattern:    strlen
valgrind: in an object with soname matching:  ld-linux.so.2
valgrind: was not found whilst processing
valgrind: symbols from the object with soname: ld-linux.so.2
valgrind:
valgrind: Possible fixes: (1, short term): install glibc's debuginfo
valgrind: package on this machine. (2, long term): ask the packagers
valgrind: for your Linux distribution to please in future ship a non-
valgrind: stripped ld.so (or whatever the dynamic linker .so is called)
valgrind: that exports the above-named function using the standards
valgrind: calling conventions for this platform. The package you need
valgrind: to intall for fix (1) is called
valgrind:
valgrind:   On Debian, Ubuntu:         libc6-dbg
valgrind:   On SuSe, openSuSe, Fedora, RHEL:   glibc-debuginfo

我对linux和valgrind还不太熟悉,但似乎我需要一个特定的包。此错误不会报告在我的发行版(slitaz)上标记包的名称。
slitaz没有apt get命令,我也不打算安装它(如果可能的话)。
我试图以超级用户权限使用命令“tazpkg get install”,并使用libc6 dbg和glibc的任何可能组合…
我已经在网上找了一个没有结果的解决方案。谢谢你的时间和关注

最佳答案

我在ubuntu 12.04.上也有同样的问题
发现问题与调试符号有关,并且计算机上可用的依赖库已从调试符号中剥离。
当我在一个测试程序上运行valgrind时,我看到了类似的错误。所以我做了以下的工作。
找出程序运行(使用ldd)所需的所有库(so文件)。
运行file命令以查看调试符号是否被删除。
检查了那个库中的包(dpkg-s)。
搜索在步骤3中找到的所有具有其名称或部分名称的包。目的是找到调试符号包(从实际的库中剥离出来)。
安装包含相应调试符号的包。
例如:
libc6包已剥离库的版本。所以我不得不安装
libc6 dbg,它引入了调试符号。

10-08 05:11