12

arm-hisiv交叉编译linux下valgrind,并使用valgrind 调试程序运行信息

 3 years ago
source link: https://blog.popkx.com/arm-hisiv-cross-compile-linux-valgrind-and-debug-program/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

arm-hisiv交叉编译linux下valgrind,并使用valgrind 调试程序运行信息

发表于 2018-06-11 15:06:35   |   已被 访问: 450 次   |   分类于:   Linux笔记   |   暂无评论

Valgrind是一款用于内存调试、内存泄漏检测以及性能分析的软件开发工具。

  1. wget http://valgrind.org/downloads/valgrind-3.9.0.tar.bz2

tar xvf valgrind-3.9.0.tar.bz2

cd valgrind-3.9.0

apt-get install automake

./autogen.sh

  1. 修改configure
    armv7) 改成 armv7|arm)

./configure --host=arm-linux CC=arm-none-linux-gnueabi-gcc CPP=arm-none-linux-gnueabi-cpp CXX=arm-none-linux-gnueabi-g++ --prefix=./valgrind

make install

注意:--prefix=/opt/Valgrind指定的目录要与开发板上放置的目录一致,不然运行valgrind时可能会出现“valgrind: failed to start tool 'memcheck' for platform 'arm-linux': No such file or directory”错误。

./configure --prefix=$PWD/../embed --host=arm-hisiv300-linux

阅读更多:   Linux笔记


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK