【问题标题】:Running valgrind 32bit binaries on 64 bit machine在 64 位机器上运行 valgrind 32 位二进制文​​件
【发布时间】:2015-12-31 14:59:05
【问题描述】:

我正在尝试在 64 位机器 (linux) 上运行 valgrind 32 位二进制文​​件,但出现此错误:

valgrind:无法为平台“x86-linux”启动工具“memcheck”:否 这样的文件或目录

我需要做什么才能让它工作?

【问题讨论】:

  • 如果您没有 memcheck-x86-linux 文件(例如在 /usr/lib/valgrind 中),那么您的 valgrind 构建时不支持 x86。
  • 一年后我在这里遇到了同样的问题。我尝试从源代码安装 valgrind,但仍然遇到同样的问题。

标签: linux valgrind


【解决方案1】:

你没有安装 Valgrind 来分析你的 Linux 发行版上的 32 位程序。

例如在 Ubuntu 15.04 上,通过安装 Valgrind

apt-get install valgrind

安装 32 位和 64 位版本的 Valgrind 分析工具:

$ ls -1 /usr/lib/valgrind/memcheck-*
/usr/lib/valgrind/memcheck-amd64-linux
/usr/lib/valgrind/memcheck-x86-linux

你的 Linux 发行版是什么?

【讨论】:

    【解决方案2】:

    我遇到了同样的问题,并通过在我的.bashrc 中将VALGRIND_LIB 设置为 Valgrind 的库路径(例如/usr/local/lib/valgrind)来修复它:

    export VALGRIND_LIB="/usr/local/lib/valgrind"
    

    我不知道为什么 Valgrind Installation Instructions 中没有提到这一点,或者为什么我必须按照这些说明添加它,但是我在源代码附带的 README_DEVELOPERS 中发现了这个提示。

    【讨论】:

      猜你喜欢
      • 2012-04-12
      • 2018-09-17
      • 2013-11-07
      • 2011-09-08
      • 2021-09-01
      • 1970-01-01
      • 2012-11-07
      • 2015-06-20
      • 1970-01-01
      相关资源
      最近更新 更多