我一直在努力在我的嵌入式系统上运行valgrind 的/ proc内/ cpuinfo
我们正在使用bcm47081(broadcom无线芯片组) 这是皮质a9
# cat /proc/cpuinfo Processor : ARMv7 Processor rev 0 (v7l) BogoMIPS : 1599.07 Features : swp half thumb fastmult edsp CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x3 CPU part : 0xc09 CPU revision : 0Hardware : Northstar Prototype Revision : 0000 Serial : 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, a memory error detector ==3205== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al. ==3205== Using Valgrind-3.12.0 and LibVEX; rerun with -h for copyright info ==3205== Command: /usr/bin/hello_world ==3205== ==3205== ==3205== Process terminating with default action of signal 4 (SIGILL) ==3205== Illegal opcode at address 0x3807E648 ==3205== at 0x4000E00: _start (in /lib/ld-uClibc.so.0) ==3205== ==3205== HEAP SUMMARY: ==3205== in use at exit: 0 bytes in 0 blocks ==3205== total heap usage: 0 allocs, 0 frees, 0 bytes allocated ==3205== ==3205== All heap blocks were freed -- no leaks are possible ==3205== ==3205== For counts of detected and suppressed errors, rerun with: -v ==3205== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Illegal instruction
我正在使用Valgrind 3.12.0 为了官方网站,他们支持手臂。
但我没有看到任何教程,任何提到他们可以为armv7运行valgrind的人。
任何想法,配置选项等 将不胜感激
谢谢。 Ozan
答案 0 :(得分:0)
看起来您的配置可能有误,您可能正在编译其他版本的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