1、软件下载地址
https://valgrind.org/downloads/current.html
2、按照官方的README文档进行编译
./autogen.sh
./configure CC=
(
C
C
)
C
X
X
=
(CC) CXX=
(CC)CXX=(CXX) AR=$(AR)
–host=aarch64-unknown-linux
–enable-only64bit
–prefix=./output
3、常见错误:
3.1 valgrind: failed to start tool ‘memcheck’ for platform ‘arm64-linux’: No such file or directory
需要设置环境变量:export VALGRIND_LIB=/output/libexec/valgrind
3.2 缺少libc6-dbg,需要重新安装libc6-dbg或者是交叉编译glibc库进行替换