Go Back   maemo.org - Talk > OS / Platform > Development
 
Register FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
  #1  
Old 2010-11-09, 11:42
lma lma is offline
 
Join Date: Nov 2007
Posts: 2,802
Thanks!: 2,844
Thanked 4,491 Times in 1,616 Posts
Default Valgrind 3.6.0 supports ARMv7

Nearly 3-week old news, but i just noticed it:

Quote:
* ================== 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?
Reply With Quote
The Following 8 Users Say Thank You to lma For This Useful Post:
  #2  
Old 2010-11-09, 14:56
lma lma is offline
 
Join Date: Nov 2007
Posts: 2,802
Thanks!: 2,844
Thanked 4,491 Times in 1,616 Posts
Default Re: Valgrind 3.6.0 supports ARMv7

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, 240 views)

Last edited by lma; 2010-11-09 at 14:58.
Reply With Quote
The Following 3 Users Say Thank You to lma For This Useful Post:
  #3  
Old 2010-11-09, 15:26
pursueky's Avatar
pursueky pursueky is offline
 
Join Date: Jun 2010
Location: NanJing China
Posts: 191
Thanks!: 254
Thanked 46 Times in 19 Posts
Smile Re: Valgrind 3.6.0 supports ARMv7

Quote:
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
Reply With Quote
  #4  
Old 2010-11-09, 15:36
Optln Optln is offline
 
Join Date: Apr 2010
Location: İstanbul - Turkey
Posts: 96
Thanks!: 50
Thanked 55 Times in 24 Posts
Default Re: Valgrind 3.6.0 supports ARMv7

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?
Reply With Quote
  #5  
Old 2010-11-09, 15:51
Captwheeto's Avatar
Captwheeto Captwheeto is offline
 
Join Date: Oct 2008
Location: England
Posts: 302
Thanks!: 154
Thanked 193 Times in 89 Posts
Default Re: Valgrind 3.6.0 supports ARMv7

Quote:
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.
Reply With Quote
  #6  
Old 2010-11-09, 15:56
lma lma is offline
 
Join Date: Nov 2007
Posts: 2,802
Thanks!: 2,844
Thanked 4,491 Times in 1,616 Posts
Default Re: Valgrind 3.6.0 supports ARMv7

Quote:
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).

Quote:
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.
Reply With Quote
The Following User Says Thank You to lma For This Useful Post:
  #7  
Old 2010-11-09, 16:00
pelago's Avatar
pelago pelago is offline
 
Join Date: Mar 2008
Location: Oxford, UK
Posts: 2,121
Thanks!: 6,461
Thanked 1,540 Times in 755 Posts
Default Re: Valgrind 3.6.0 supports ARMv7

Quote:
Originally Posted by lma View Post
No idea, what's XT?
I'm guessing X Terminal...
Reply With Quote
  #8  
Old 2010-11-11, 20:34
vivainio vivainio is offline
 
Join Date: Jul 2009
Location: Finland
Posts: 222
Thanks!: 36
Thanked 205 Times in 88 Posts
Default Re: Valgrind 3.6.0 supports ARMv7

Now go forth and package; package like you've never packaged before.
__________________
'QtDone'. Getting things done (GTD) was never this cheap!

'QmlReddit' reads Reddit!
Reply With Quote
  #9  
Old 2010-11-12, 04:50
lma lma is offline
 
Join Date: Nov 2007
Posts: 2,802
Thanks!: 2,844
Thanked 4,491 Times in 1,616 Posts
Default Re: Valgrind 3.6.0 supports ARMv7

Quote:
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 :-(
Reply With Quote
The Following 2 Users Say Thank You to lma For This Useful Post:
  #10  
Old 2010-11-13, 21:05
AapoRantalainen AapoRantalainen is offline
 
Join Date: Mar 2009
Posts: 833
Thanks!: 1,209
Thanked 3,371 Times in 671 Posts
Default Re: Valgrind 3.6.0 supports ARMv7

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:
Quote:
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.
Reply With Quote
The Following User Says Thank You to AapoRantalainen For This Useful Post:
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 20:12.