gpt4 book ai didi

arm - 用于 ARM 的 Valgrind,带有 Linaro 工具链,需要带有 Buildroot 的 libc6-dbg

转载 作者:行者123 更新时间:2023-12-01 18:22:41 25 4
gpt4 key购买 nike

我在 Ubuntu 10.04 主机上使用以下命令与 Linaro 工具链交叉编译了适用于 ARM 的 Valgrind (http://valgrind.org/downloads/valgrind-3.8.1.tar.bz2)(我使用的是 Buildroot ):

export PATH=$PATH:/home/user/toolchain/linaro/bin
CC=arm-linux-gnueabi-gcc CFLAGS=-I/home/user/toolchain/linaro/arm-linux-gnueabi/libc/usr/include LDFLAGS=-L/home/user/toolchain/linaro/arm-linux-gnueabi/libc/usr/lib ./configure --prefix=/opt/valgrind --host=armv7-none-linux-gnueabi --target=arm-none-linux-gnueabi --build=i386-ubuntu-linux
make
sudo make install

当我将二进制文件复制到 ARM 目标板时,出现以下错误:

==413== Memcheck, a memory error detector
==413== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==413== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==413== Command: /home/user/testApp
==413==

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: memcpy
valgrind: in an object with soname matching: ld-linux.so.3
valgrind: was not found whilst processing
valgrind: symbols from the object with soname: ld-linux.so.3
valgrind:
valgrind: Possible fixes: (1, short term): install glibc's debuginfo
valgrind: package on this machine. (2, longer 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 standard
valgrind: calling conventions for this platform. The package you need
valgrind: to install for fix (1) is called
valgrind:
valgrind: On Debian, Ubuntu: libc6-dbg
valgrind: On SuSE, openSuSE, Fedora, RHEL: glibc-debuginfo
valgrind:
valgrind: Cannot continue -- exiting now. Sorry.

我的 Linaro 工具链版本是:

gcc version 4.7.1 20120402 (prerelease) (crosstool-NG linaro-1.13.1-2012.04-20120426 - Linaro GCC 2012.04) 

我在 Google 上进行了搜索,但找不到解决方案。如何让 Valgrind 在我的目标板上工作?我使用 Buildroot 来构建我的系统,但 libc6-dbg 不是我可以在构建系统中找到的包。我需要从工具链 sysroot 复制一些目录或文件吗?谢谢-

我用来运行 Valgrind 的命令如下所示:

# which valgrind
/usr/bin/valgrind
# valgrind /home/user/MyQtApp
==216== Memcheck, a memory error detector
...
...

最佳答案

那么您正在使用 Buildroot 或 OpenEmbedded 来构建您的 Libc?

如果是 OE,那么您应该在本地存储库 (TMPDIR/deploy/ipk) 中提供 libc6-dbg 软件包。或者将“dbg-pkgs”添加到 IMAGE_FEATURES 中并重建您的镜像。

Glibc 2.12 显示您正在使用旧版本的 OpenEmbedded。但即使这样也应该给你 libc6-dbg 包。

无法帮助使用 Buildroot,因为从未使用过它。

关于arm - 用于 ARM 的 Valgrind,带有 Linaro 工具链,需要带有 Buildroot 的 libc6-dbg,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13419020/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com