【问题标题】:Cross-Compiling Valgirind for ARMv7 GNU/LINUX为 ARMv7 GNU/LINUX 交叉编译 Valgirind
【发布时间】:2017-11-07 04:58:28
【问题描述】:

我一直在努力在我的嵌入式系统上运行 valgrind /proc/cpuinfo

我们使用的是 bcm47081(broadcom 无线芯片组) 这是皮质a9

# cat /proc/cpuinfo
处理器:ARMv7 处理器版本 0 (v7l)
BogoMIPS : 1599.07
特点:swp 半拇指 fastmult edsp
CPU实现者:0x41
CPU架构:7
CPU 变体:0x3
CPU部分:0xc09
CPU 版本:0

硬件:Northstar 原型 修订: 0000 序列号:0000000000000000

和

 uname -a
Linux Air4920 2.6.36.4brcmarm+ #2 PREEMPT Mon May 29 23:20:54 +03 2017 armv7l GNU/Linux

即使我已经能够构建 valgrind,请参阅 valgrind --help 在我的嵌入式系统上工作,它给了我非法指令错误..

这是我的配置选项。

../../configure --host="arm-linux" \ --build="x86_64-pc-linux-gnu" \ --prefix="/" \ --exec-prefix="/"

这是我得到的错误。

# valgrind /usr/bin/hello_world ==3205== Memcheck,内存错误检测器 ==3205== 版权所有 (C) 2002-2015 和 GNU GPL,由 Julian Seward 等人提供。 ==3205== 使用 Valgrind-3.12.0 和 LibVEX;使用 -h 重新运行以获取版权信息 ==3205== 命令:/usr/bin/hello_world ==3205== ==3205== ==3205== 进程以信号 4 (SIGILL) 的默认操作终止 ==3205== 地址 0x3807E648 处的操作码非法 ==3205== 在 0x4000E00:_start(在 /lib/ld-uClibc.so.0 中) ==3205== ==3205== 堆摘要: ==3205== 在退出时使用:0 个块中的 0 个字节 ==3205== 总堆使用量:0 分配,0 释放,0 字节分配 ==3205== ==3205== 所有堆块都被释放——不可能有泄漏 ==3205== ==3205== 对于检测到和抑制的错误计数,重新运行:-v ==3205== 错误摘要:0 个上下文中的 0 个错误(抑制:0 个来自 0) 非法指令

我正在使用 Valgrind 3.12.0 为了官方网站他们支持手臂。

但是我还没有看到任何教程,任何提到他们可以为 armv7 运行 valgrind 的人。

任何想法,配置选项等。 将不胜感激

谢谢。 奥赞

【问题讨论】:

  • 我没有使用 ARM 的经验,但你能从代码库valgrind.org/downloads/repository.html 中尝试 Valgrind 吗?
  • 是的,我也尝试过来自 repo 的代码。
  • 嗨,奥赞。我面临同样的问题。你有解决这个问题的办法吗?

标签: cross-compiling valgrind armv7


【解决方案1】:

看起来您的配置可能有误,您可能正在为另一个版本的 arm 进行编译。

尝试用它来构建 valgrind:

--host=armv7-a

buildroot 版本是通过以下方式构建的

# On ARM, Valgrind only supports ARMv7, and uses the arch part of the
# host tuple to determine whether it's being built for ARMv7 or
# not. Therefore, we adjust the host tuple to specify we're on
# ARMv7. The valgrind package is guaranteed, through Config.in, to
# only be selected on ARMv7-A platforms.
ifeq ($(BR2_ARM_CPU_ARMV7A),y)
VALGRIND_CONF_OPTS += \
    --host=$(patsubst arm-%,armv7-%,$(GNU_TARGET_NAME))
endif

来自https://git.buildroot.net/buildroot/tree/package/valgrind/valgrind.mk

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-07-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-08-04
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多