Run valgrind in ARM Hardware

24 Dec 2021

[ performance  development  c++  ]

Cross compile valgrind for ARMv7

Debian stretch:

root@host:~# apt install libc6-armel-cross libc6-dev-armel-cross
root@host:~# apt install binutils-arm-linux-gnueabi
root@host:~# apt install libncurses5-dev
root@host:~# apt install gcc-arm-linux-gnueabihf
root@host:~# apt install g++-arm-linux-gnueabihf
user@host:~/Downloads/$ tar xvf valgrind-3.13.0.tar.bz2

Valgrind compilation:

user@host:~/Downloads/valgrind-3.13.0$ CC=arm-linux-gnueabihf-gcc-6 ./configure --host=armv7-unknown-linux-gnueabihf --target=arm-none-linux-gnueabihf --prefix=$HOME/valgrind CFLAGS='-Wl,-rpath=/lib/'
 user@host:~/Downloads/valgrind-3.13.0$ make
 user@host:~/Downloads/valgrind-3.13.0$ make install
user@host:~/$ tar cvf valgrind.tar valgrind/

Installation on device:

Example: