maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Valgrind 3.6.0 supports ARMv7 (https://talk.maemo.org/showthread.php?t=65335)

lma 2010-11-09 11:42

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?

lma 2010-11-09 14:56

Re: Valgrind 3.6.0 supports ARMv7
 
1 Attachment(s)
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).

pursueky 2010-11-09 15:26

Re: Valgrind 3.6.0 supports ARMv7
 
Quote:

Originally Posted by lma (Post 868149)
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

Optln 2010-11-09 15:36

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?

Captwheeto 2010-11-09 15:51

Re: Valgrind 3.6.0 supports ARMv7
 
Quote:

Originally Posted by pursueky (Post 868165)
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.

lma 2010-11-09 15:56

Re: Valgrind 3.6.0 supports ARMv7
 
Quote:

Originally Posted by pursueky (Post 868165)
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 (Post 868170)
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.

pelago 2010-11-09 16:00

Re: Valgrind 3.6.0 supports ARMv7
 
Quote:

Originally Posted by lma (Post 868188)
No idea, what's XT?

I'm guessing X Terminal...

vivainio 2010-11-11 20:34

Re: Valgrind 3.6.0 supports ARMv7
 
Now go forth and package; package like you've never packaged before.

lma 2010-11-12 04:50

Re: Valgrind 3.6.0 supports ARMv7
 
Quote:

Originally Posted by vivainio (Post 870751)
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 :-(

AapoRantalainen 2010-11-13 21:05

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 (Post 868188)

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.


All times are GMT. The time now is 10:44.

vBulletin® Version 3.8.8