How To Install Valgrind

Active2 months ago

>> yum install valgrind kcachegrind Preparation ¶ To be most effective valgrind requires that debugging information be present in the binaries that are being instrumented, although a full debug build is not required. Running Valgrind Tools on External Applications Qt Creator integrates Valgrind code analysis tools for detecting memory leaks and profiling function execution. To run the Valgrind tools to analyze external applications for which you do not have a Qt Creator project.

I'm having problem using Valgrind on 'arm-linux' executable file.

I downloaded Valgrind from the main page here : http://valgrind.org/downloads/.Run the following command to install it:

On Ubuntu, I try with an executable HelloWorld file compiled 'HelloWorld.c' using Linux GCC. Valgrind runs without any problem.

Then I try it on an executable file compiled from using Cross-compiler for ARM-Linux (this executable file is compiled to run on an embedded device) and I got this error:

I have digged around on google and couldn't find much information, I tried:

It still show the same error, what am I doing wrong?

Valgrind
Toan Tran
Toan TranToan Tran

1 Answer

Valgrind is trying to launch a suitable executable for the 'memcheck' tool but can't find one. This is due to the fact that the './configure' script created a Makefile viable for the installation of a valgrind package specific for the host architecture (your PC), but you are feeding it an executable meant for another one (ARM in your case); this lead to a situation in which you lack the ARM specific tools to do the job. I had a similar problem with the 'callgrind' tool (also part of the valgrind package), and by doing an strace I came up with the following line:

How To Install Valgrind On Windows

which means that I miss the ARM specific callgrind binary.

elaborating on that, what you (and me not so long ago) are trying to do is not supported by valgrind, so you want to use an emulator to get the job done.

How To Install Valgrind On Ubuntu

Federico MarsigliaFederico Marsiglia

How To Install Valgrind On Linux Mint

Not the answer you're looking for? Browse other questions tagged linuxdebuggingcross-compilation or ask your own question.