Downloaded the latest version, Valgrind 3.7.0, untarred it to create a folder
"Valgrind-3.7.0" Now, what I did was export gcc for compatibility with the
target machine and configured to disable tls and give the host. Also I made a C
Program "leak.c" and its object file "a.out" compiled with the following command
export CC=/usr/local/netd_tools_v1/powerpc/bin/powerpc-linux-gnu-gcc leak.c
so
a. export CC=/usr/local/netd_tools_v1/powerpc/bin/powerpc-linux-gnu-gcc
b. ./configure --prefix=/netd --host=powerpc-linux --disable-tls
c. make
d. make install
Link the library path and valgrind executable (go to /netd/lib and do ln –s
/u/netd/lib/valgrind THEN goto /netd/usr/sbin and do ln –s /u/netd/bin/valgrind)
Some files were made in "Valgrind-3.7.0" and a folder "netd" was formed. "netd"
contained "lib", "bin", "share" and "include"
(/netd/lib and /netd/usr/sbin are project specific directories)
Copied these files (files in "netd") into the Target Machine and ran Valgrind on
the file "a.out" by the following command :
valgrind --log-file=/u/july5.txt --leak-check=summary --tool=memcheck ./a.out
(/u is the mount point, july5 is the log file)
The output shows 0 leaks reported
int main()
{
printf("I am leaking.");
int *a =(int *) malloc(100);
return 0;
}
This ran on linux just fine and reported memory leaks. If this programme would
have worked on powerpc, then I would have run Valgrind on project specific
processes.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users