Reply
Thread Tools
Posts: 2,802 | Thanked: 4,491 times | Joined on Nov 2007
#1
Nearly 3-week old news, but i just noticed it:

* ================== PLATFORM CHANGES =================

* Support for ARM/Linux. Valgrind now runs on ARMv7 capable CPUs
running Linux. It is known to work on Ubuntu 10.04, Ubuntu 10.10,
and Maemo 5, so you can run Valgrind on your Nokia N900 if you want.

This requires a CPU capable of running the ARMv7-A instruction set
(Cortex A5, A8 and A9). Valgrind provides fairly complete coverage
of the user space instruction set, including ARM and Thumb integer
code, VFPv3, NEON and V6 media instructions. The Memcheck,
Cachegrind and Massif tools work properly; other tools work to
varying degrees.
Anyone tried it yet?
 

The Following 8 Users Say Thank You to lma For This Useful Post:
Posts: 2,802 | Thanked: 4,491 times | Joined on Nov 2007
#2
Success on Diablo :-)

Code:
Nokia-N810-43-7:~# /usr/local/bin/valgrind date 
==20992== Memcheck, a memory error detector
==20992== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==20992== Using Valgrind-3.6.0 and LibVEX; rerun with -h for copyright info
==20992== Command: date
==20992== 
==20992== Conditional jump or move depends on uninitialised value(s)
==20992==    at 0x4100A5BC: _dl_relocate_object (in /lib/ld-2.5.so)
==20992==    by 0x4100362B: dl_main (in /lib/ld-2.5.so)
==20992==    by 0x41012ACB: _dl_sysdep_start (in /lib/ld-2.5.so)
==20992==    by 0x41000EBF: _dl_start_final (in /lib/ld-2.5.so)
==20992==    by 0x410013A7: _dl_start (in /lib/ld-2.5.so)
==20992==    by 0x410007DF: ??? (in /lib/ld-2.5.so)
==20992== 
==20992== Conditional jump or move depends on uninitialised value(s)
==20992==    at 0x4100AA3C: _dl_relocate_object (in /lib/ld-2.5.so)
==20992==    by 0x4100362B: dl_main (in /lib/ld-2.5.so)
==20992==    by 0x41012ACB: _dl_sysdep_start (in /lib/ld-2.5.so)
==20992==    by 0x41000EBF: _dl_start_final (in /lib/ld-2.5.so)
==20992==    by 0x410013A7: _dl_start (in /lib/ld-2.5.so)
==20992==    by 0x410007DF: ??? (in /lib/ld-2.5.so)
==20992== 
==20992== Conditional jump or move depends on uninitialised value(s)
==20992==    at 0x4100AABC: _dl_relocate_object (in /lib/ld-2.5.so)
==20992==    by 0x4100362B: dl_main (in /lib/ld-2.5.so)
==20992==    by 0x41012ACB: _dl_sysdep_start (in /lib/ld-2.5.so)
==20992==    by 0x41000EBF: _dl_start_final (in /lib/ld-2.5.so)
==20992==    by 0x410013A7: _dl_start (in /lib/ld-2.5.so)
==20992==    by 0x410007DF: ??? (in /lib/ld-2.5.so)
==20992== 
==20992== Conditional jump or move depends on uninitialised value(s)
==20992==    at 0x4100A460: _dl_relocate_object (in /lib/ld-2.5.so)
==20992==    by 0x410039A3: dl_main (in /lib/ld-2.5.so)
==20992==    by 0x41012ACB: _dl_sysdep_start (in /lib/ld-2.5.so)
==20992==    by 0x41000EBF: _dl_start_final (in /lib/ld-2.5.so)
==20992==    by 0x410013A7: _dl_start (in /lib/ld-2.5.so)
==20992==    by 0x410007DF: ??? (in /lib/ld-2.5.so)
==20992== 
==20992== Conditional jump or move depends on uninitialised value(s)
==20992==    at 0x4100A468: _dl_relocate_object (in /lib/ld-2.5.so)
==20992==    by 0x410039A3: dl_main (in /lib/ld-2.5.so)
==20992==    by 0x41012ACB: _dl_sysdep_start (in /lib/ld-2.5.so)
==20992==    by 0x41000EBF: _dl_start_final (in /lib/ld-2.5.so)
==20992==    by 0x410013A7: _dl_start (in /lib/ld-2.5.so)
==20992==    by 0x410007DF: ??? (in /lib/ld-2.5.so)
==20992== 
==20992== Conditional jump or move depends on uninitialised value(s)
==20992==    at 0x4100A5BC: _dl_relocate_object (in /lib/ld-2.5.so)
==20992==    by 0x410039A3: dl_main (in /lib/ld-2.5.so)
==20992==    by 0x41012ACB: _dl_sysdep_start (in /lib/ld-2.5.so)
==20992==    by 0x41000EBF: _dl_start_final (in /lib/ld-2.5.so)
==20992==    by 0x410013A7: _dl_start (in /lib/ld-2.5.so)
==20992==    by 0x410007DF: ??? (in /lib/ld-2.5.so)
==20992== 
Tue Nov  9 14:53:01 GMT 2010
==20992== 
==20992== HEAP SUMMARY:
==20992==     in use at exit: 32 bytes in 1 blocks
==20992==   total heap usage: 35 allocs, 34 frees, 3,603 bytes allocated
==20992== 
==20992== LEAK SUMMARY:
==20992==    definitely lost: 32 bytes in 1 blocks
==20992==    indirectly lost: 0 bytes in 0 blocks
==20992==      possibly lost: 0 bytes in 0 blocks
==20992==    still reachable: 0 bytes in 0 blocks
==20992==         suppressed: 0 bytes in 0 blocks
==20992== Rerun with --leak-check=full to see details of leaked memory
==20992== 
==20992== For counts of detected and suppressed errors, rerun with: -v
==20992== Use --track-origins=yes to see where uninitialised values come from
==20992== ERROR SUMMARY: 11 errors from 6 contexts (suppressed: 0 from 0)
Attaching patch (mostly from this upstream bug, plus a bunch of s/svc/swi/ to keep our older assembler happy).
Attached Files
File Type: gz valgrind.patch.gz (2.6 KB, 253 views)

Last edited by lma; 2010-11-09 at 14:58.
 

The Following 3 Users Say Thank You to lma For This Useful Post:
pursueky's Avatar
Posts: 191 | Thanked: 46 times | Joined on Jun 2010 @ NanJing China
#3
Originally Posted by lma View Post
Success on Diablo :-)

Code:
Nokia-N810-43-7:~# /usr/local/bin/valgrind date 
==20992== Memcheck, a memory error detector
==20992== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==20992== Using Valgrind-3.6.0 and LibVEX; rerun with -h for copyright info
==20992== Command: date
==20992== 
==20992== Conditional jump or move depends on uninitialised value(s)
==20992==    at 0x4100A5BC: _dl_relocate_object (in /lib/ld-2.5.so)
==20992==    by 0x4100362B: dl_main (in /lib/ld-2.5.so)
==20992==    by 0x41012ACB: _dl_sysdep_start (in /lib/ld-2.5.so)
==20992==    by 0x41000EBF: _dl_start_final (in /lib/ld-2.5.so)
==20992==    by 0x410013A7: _dl_start (in /lib/ld-2.5.so)
==20992==    by 0x410007DF: ??? (in /lib/ld-2.5.so)
==20992== 
==20992== Conditional jump or move depends on uninitialised value(s)
==20992==    at 0x4100AA3C: _dl_relocate_object (in /lib/ld-2.5.so)
==20992==    by 0x4100362B: dl_main (in /lib/ld-2.5.so)
==20992==    by 0x41012ACB: _dl_sysdep_start (in /lib/ld-2.5.so)
==20992==    by 0x41000EBF: _dl_start_final (in /lib/ld-2.5.so)
==20992==    by 0x410013A7: _dl_start (in /lib/ld-2.5.so)
==20992==    by 0x410007DF: ??? (in /lib/ld-2.5.so)
==20992== 
==20992== Conditional jump or move depends on uninitialised value(s)
==20992==    at 0x4100AABC: _dl_relocate_object (in /lib/ld-2.5.so)
==20992==    by 0x4100362B: dl_main (in /lib/ld-2.5.so)
==20992==    by 0x41012ACB: _dl_sysdep_start (in /lib/ld-2.5.so)
==20992==    by 0x41000EBF: _dl_start_final (in /lib/ld-2.5.so)
==20992==    by 0x410013A7: _dl_start (in /lib/ld-2.5.so)
==20992==    by 0x410007DF: ??? (in /lib/ld-2.5.so)
==20992== 
==20992== Conditional jump or move depends on uninitialised value(s)
==20992==    at 0x4100A460: _dl_relocate_object (in /lib/ld-2.5.so)
==20992==    by 0x410039A3: dl_main (in /lib/ld-2.5.so)
==20992==    by 0x41012ACB: _dl_sysdep_start (in /lib/ld-2.5.so)
==20992==    by 0x41000EBF: _dl_start_final (in /lib/ld-2.5.so)
==20992==    by 0x410013A7: _dl_start (in /lib/ld-2.5.so)
==20992==    by 0x410007DF: ??? (in /lib/ld-2.5.so)
==20992== 
==20992== Conditional jump or move depends on uninitialised value(s)
==20992==    at 0x4100A468: _dl_relocate_object (in /lib/ld-2.5.so)
==20992==    by 0x410039A3: dl_main (in /lib/ld-2.5.so)
==20992==    by 0x41012ACB: _dl_sysdep_start (in /lib/ld-2.5.so)
==20992==    by 0x41000EBF: _dl_start_final (in /lib/ld-2.5.so)
==20992==    by 0x410013A7: _dl_start (in /lib/ld-2.5.so)
==20992==    by 0x410007DF: ??? (in /lib/ld-2.5.so)
==20992== 
==20992== Conditional jump or move depends on uninitialised value(s)
==20992==    at 0x4100A5BC: _dl_relocate_object (in /lib/ld-2.5.so)
==20992==    by 0x410039A3: dl_main (in /lib/ld-2.5.so)
==20992==    by 0x41012ACB: _dl_sysdep_start (in /lib/ld-2.5.so)
==20992==    by 0x41000EBF: _dl_start_final (in /lib/ld-2.5.so)
==20992==    by 0x410013A7: _dl_start (in /lib/ld-2.5.so)
==20992==    by 0x410007DF: ??? (in /lib/ld-2.5.so)
==20992== 
Tue Nov  9 14:53:01 GMT 2010
==20992== 
==20992== HEAP SUMMARY:
==20992==     in use at exit: 32 bytes in 1 blocks
==20992==   total heap usage: 35 allocs, 34 frees, 3,603 bytes allocated
==20992== 
==20992== LEAK SUMMARY:
==20992==    definitely lost: 32 bytes in 1 blocks
==20992==    indirectly lost: 0 bytes in 0 blocks
==20992==      possibly lost: 0 bytes in 0 blocks
==20992==    still reachable: 0 bytes in 0 blocks
==20992==         suppressed: 0 bytes in 0 blocks
==20992== Rerun with --leak-check=full to see details of leaked memory
==20992== 
==20992== For counts of detected and suppressed errors, rerun with: -v
==20992== Use --track-origins=yes to see where uninitialised values come from
==20992== ERROR SUMMARY: 11 errors from 6 contexts (suppressed: 0 from 0)
Attaching patch (mostly from this upstream bug, plus a bunch of s/svc/swi/ to keep our older assembler happy).
I‘m poor in linux
And how it is possible to install via XT
 
Posts: 96 | Thanked: 55 times | Joined on Apr 2010 @ İstanbul - Turkey
#4
Thanks for the news. Is it running only on N900, or can we use it to analyze ARM binaries on x86 too? I mean, will it be able to run on Scratchbox or MADDE?
 
Captwheeto's Avatar
Posts: 302 | Thanked: 193 times | Joined on Oct 2008 @ England
#5
Originally Posted by pursueky View Post
I‘m poor in linux
And how it is possible to install via XT
I'm not sure what you mean and I haven't looked at the insides of the file but it should be something like extracting it and running

./configure
make
make install

as root in a terminal.
 
Posts: 2,802 | Thanked: 4,491 times | Joined on Nov 2007
#6
Originally Posted by pursueky View Post
And how it is possible to install via XT
No idea, what's XT? I didn't package it, just built it and selectively copied bits across (the entire thing is around 55MiB).

Originally Posted by Optln View Post
Is it running only on N900, or can we use it to analyze ARM binaries on x86 too? I mean, will it be able to run on Scratchbox or MADDE?
Probably on-device only. On (Diablo) scratchbox the same binary bails out with:

Code:
[sbox-DIABLO_ARMEL: ~] > /usr/local/bin/valgrind /bin/date
==21020== Memcheck, a memory error detector
==21020== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==21020== Using Valgrind-3.6.0 and LibVEX; rerun with -h for copyright info
==21020== Command: /bin/date
==21020== 

valgrind:  Fatal error at startup: a function redirection
valgrind:  which is mandatory for this platform-tool combination
valgrind:  cannot be set up.  Details of the redirection are:
valgrind:  
valgrind:  A must-be-redirected function
valgrind:  whose name matches the pattern:      memcpy
valgrind:  in an object with soname matching:   ld-linux.so.3
valgrind:  was not found whilst processing
valgrind:  symbols from the object with soname: ld-linux.so.3
valgrind:  
valgrind:  Possible fixes: (1, short term): install glibc's debuginfo
valgrind:  package on this machine.  (2, longer term): ask the packagers
valgrind:  for your Linux distribution to please in future ship a non-
valgrind:  stripped ld.so (or whatever the dynamic linker .so is called)
valgrind:  that exports the above-named function using the standard
valgrind:  calling conventions for this platform.
valgrind:  
valgrind:  Cannot continue -- exiting now.  Sorry.
I'm not sure if/how this can be worked around. FWIW libc6-dbg is already installed.
 

The Following User Says Thank You to lma For This Useful Post:
pelago's Avatar
Posts: 2,121 | Thanked: 1,540 times | Joined on Mar 2008 @ Oxford, UK
#7
Originally Posted by lma View Post
No idea, what's XT?
I'm guessing X Terminal...
 
Posts: 222 | Thanked: 205 times | Joined on Jul 2009 @ Finland
#8
Now go forth and package; package like you've never packaged before.
__________________
'QtDone'. Getting things done (GTD) was never this cheap!

'QmlReddit' reads Reddit!
 
Posts: 2,802 | Thanked: 4,491 times | Joined on Nov 2007
#9
Originally Posted by vivainio View Post
Now go forth and package
Oh, ok. Just uploaded valgrind_3.6.0-1 to Diablo extras-devel. Note that I haven't tested it because I don't have enough free rootfs space to install it at the moment :-(
 

The Following 2 Users Say Thank You to lma For This Useful Post:
Posts: 838 | Thanked: 3,384 times | Joined on Mar 2009
#10
I Compiled valgrind-3.6.0-SVN-r11479 for fremantle (inside scratchbox2). I didn't make any code changing, I only tuned configure script (cite: http://permalink.gmane.org/gmane.com...valgrind/10563)

Code:
Index: configure.in
===================================================================
--- configure.in	(revision 11479)
+++ configure.in	(working copy)
@@ -158,7 +158,7 @@
         esac
         ;;
 
-     armv7*)
+     arm*)
 	AC_MSG_RESULT([ok (${host_cpu})])
 	ARCH_MAX="arm"
 	;;
It compiles without warnings. I installed it to /opt/valgrind and dropped to N900-device.

Running on the device gives same error:
Originally Posted by lma View Post

Code:
....
valgrind:  Possible fixes: (1, short term): install glibc's debuginfo
valgrind:  package on this machine.
 ...
valgrind:  Cannot continue -- exiting now.  Sorry.
I think solution is installing package: libc6-dbg
At this moment I can't install that.
 

The Following User Says Thank You to AapoRantalainen For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 03:40.