我已经在linux上安装了valgrind-3.9.0,在虚拟机上启动了Slitaz-2.6.37(32位),但是当我尝试在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的任何可能组合...... 我'我们已经在网上搜索了一个没有任何结果的解决方案。感谢您的时间和关注
答案 0 :(得分:0)
我在ubuntu 12.04.
上遇到了同样的问题
发现问题出在调试符号上,并且机器上可用的依赖库从调试符号中删除。
当我在测试程序上运行valgrind时,我看到了同样的错误。所以我做了以下几点。
安装包含相应调试符号的包。 例如:
libc6包已经剥离了库的版本。所以我不得不安装 libc6-dbg引入调试符号。