|
From: Mudric, D. (Dusan) <dm...@av...> - 2011-07-20 13:54:43
|
Hi Can Valgrind be compiled to run on ARM 1176? If yes, can you give me the compile instructions please? Regards, Dušan Mudrić |
|
From: Wan M. F. W. I. <wan...@mc...> - 2011-07-20 14:25:32
|
2011/7/20 Mudric, Dusan (Dusan) <dm...@av...> > Hi**** > > ** ** > > Can Valgrind be compiled to run on ARM 1176? If yes, can you give me the > compile instructions please?**** > > AFAIK, Valgrind only support armv7-A instruction set and ARM11 family use armv6 instruction set. Regards, -- Wan Mohd Fairuz WAN ISMAIL |
|
From: Mudric, D. (Dusan) <dm...@av...> - 2011-07-20 14:50:18
|
Hi, Does it mean Valgrind can not compile for ARM1176 (ARMv6)? >From the Valgrind site (http://www.valgrind.org/docs/manual/manual-core.html#manual-core.whatdoes ), it looks like Valgrind can be used on ARMv6 with some limitations. 2.11. Limitations "On ARM, essentially the entire ARMv7-A instruction set is supported, in both ARM and Thumb mode. ThumbEE and Jazelle are not supported. NEON and VFPv3 support is fairly complete. ARMv6 media instruction support is mostly done but not yet complete." >From this comment, I understood Vaglrind can be compiled for ARMv6. If yes, how? Thanks, Dusan. From: Wan Mohd Fairuz Wan Ismail [mailto:wan...@mc...] Sent: Wednesday, July 20, 2011 10:25 AM To: Mudric, Dusan (Dusan) Cc: val...@li... Subject: Re: [Valgrind-users] Valgrind for ARM 1176 for linux 2011/7/20 Mudric, Dusan (Dusan) <dm...@av...<mailto:dm...@av...>> Hi Can Valgrind be compiled to run on ARM 1176? If yes, can you give me the compile instructions please? AFAIK, Valgrind only support armv7-A instruction set and ARM11 family use armv6 instruction set. Regards, -- Wan Mohd Fairuz WAN ISMAIL |
|
From: John R. <jr...@bi...> - 2011-07-20 17:18:05
|
> From the Valgrind site (http://www.valgrind.org/docs/manual/manual-core.html#manual-core.whatdoes ), it looks like Valgrind can be used on ARMv6 with some limitations. > > *2.11. Limitations * > > “On ARM, essentially the entire ARMv7-A instruction set is supported, in both ARM and Thumb mode. ThumbEE and Jazelle are not supported. NEON and VFPv3 support is fairly complete. ARMv6 media instruction support is mostly done but not yet complete.” > From this comment, I understood Vaglrind can be compiled for ARMv6. If yes, how? Follow the directions in the top-level README file of the source tree: $ ./autogen.sh ## if using raw SVN sources; omit otherwise $ ./configure --prefix=/where/you/want/it/installed $ make $ make install Valgrind itself runs under Linux or Android on most ARM (except possibly ancient ARMv4), and can supervise the execution of many programs running on almost any ARM chip. The question is whether valgrind understands all the opcodes that are used by the particular program being supervised. In the case of ARMv6 architecture, then the "media instructions" are not yet complete, so a program which uses those instructions won't run [yet] under valgrind. It would help to produce an explicit list, and/or characterize, the "most important" instructions which valgrind should implement first. -- |
|
From: Mudric, D. (Dusan) <dm...@av...> - 2011-07-20 17:41:33
|
I did something similar. However, "valgrind ls -l" does nothing. It never completes this instruction. So I did not use any media instructions to test the valgrind build. I can not figure out why vagrind does not execute this simple instruction. My first thought was it can not run on ARM1176. Based on what you said, it should do basic instructions, like "valgrind -h". Did I do something wrong in the steps below? Here are the steps I did: 1. I fixed configure.in http://old.nabble.com/building-for-arm-td29791500.html#a29791500 2. I used: . ./mybuild.sh ./configure --host=armv7-unknown-linux-gnu --prefix=/exports/Valgrind make make install mybuild.sh file is: ----------------------- #!/bin/bash LIBRARY_BASE=/home/platform/lib export CROSS_COMPILE=arm-wrs-linux-gnueabi-armv6jel-glibc_small- export CC=${CROSS_COMPILE}gcc export CPP=${CROSS_COMPILE}cpp export CXX=${CROSS_COMPILE}g++ export LD=${CROSS_COMPILE}ld export AR=${CRPSS_COMPILE}ar #export OSTYPE=linux echo "LIBRARY_BASE = " $LIBRARY_BASE export LIBRARY_BASE unset _WIND_BASE PATH=/bin PATH=$PATH:/usr/local/sbin PATH=$PATH:/usr/local/bin PATH=$PATH:/usr/sbin PATH=$PATH:/usr/bin PATH=$PATH:/sbin PATH=$PATH:/bin PATH=$PATH:/opt/Klocwork8.2/bin PATH=$PATH:$LIBRARY_BASE/bcom/x86-linux2 PATH=$PATH:$LIBRARY_BASE/bcom/x86-linux2/bin -----Original Message----- From: John Reiser [mailto:jr...@bi...] Sent: Wednesday, July 20, 2011 1:19 PM To: val...@li... Subject: Re: [Valgrind-users] Valgrind for ARM 1176 for linux > From the Valgrind site (http://www.valgrind.org/docs/manual/manual-core.html#manual-core.whatdoes ), it looks like Valgrind can be used on ARMv6 with some limitations. > > *2.11. Limitations * > > "On ARM, essentially the entire ARMv7-A instruction set is supported, in both ARM and Thumb mode. ThumbEE and Jazelle are not supported. NEON and VFPv3 support is fairly complete. ARMv6 media instruction support is mostly done but not yet complete." > From this comment, I understood Vaglrind can be compiled for ARMv6. If yes, how? Follow the directions in the top-level README file of the source tree: $ ./autogen.sh ## if using raw SVN sources; omit otherwise $ ./configure --prefix=/where/you/want/it/installed $ make $ make install Valgrind itself runs under Linux or Android on most ARM (except possibly ancient ARMv4), and can supervise the execution of many programs running on almost any ARM chip. The question is whether valgrind understands all the opcodes that are used by the particular program being supervised. In the case of ARMv6 architecture, then the "media instructions" are not yet complete, so a program which uses those instructions won't run [yet] under valgrind. It would help to produce an explicit list, and/or characterize, the "most important" instructions which valgrind should implement first. -- ------------------------------------------------------------------------------ 10 Tips for Better Web Security Learn 10 ways to better secure your business today. Topics covered include: Web security, SSL, hacker attacks & Denial of Service (DoS), private keys, security Microsoft Exchange, secure Instant Messaging, and much more. http://www.accelacomm.com/jaw/sfnl/114/51426210/ _______________________________________________ Valgrind-users mailing list Val...@li... https://lists.sourceforge.net/lists/listinfo/valgrind-users |
|
From: John R. <jr...@bi...> - 2011-07-20 19:01:42
|
On 07/20/2011 10:41 AM, Mudric, Dusan (Dusan) wrote:
> I did something similar. However, "valgrind ls -l" does nothing. It never completes this instruction.
"valgrind ls -l" does _something_, if nothing other than "Cannot exec", or SIGSEGV,
or some other complaint. ("Normal exit" is a [silent] complaint.)
Please show the entire output from:
valgrind ls -l
echo $?
Then show the output from:
strace valgrind ls -l
The show the output from
$ gdb valgrind
(gdb) run ls -l
(gdb) bt
(gdb) info reg
(gdb) x/i $pc
(gdb) x/8i $pc-4*4
> 1. I fixed configure.in
>
> http://old.nabble.com/building-for-arm-td29791500.html#a29791500
>
> 2. I used:
>
> . ./mybuild.sh
> ./configure --host=armv7-unknown-linux-gnu --prefix=/exports/Valgrind
Cross-compiling and cross-linking is significantly different from
native compiling and native linking. You should have mentioned this
in your first message. You must insure that the cross-linking environment
matches the actual target environment; it is surprisingly easy and common
to make errors here.
--
|
|
From: Mudric, D. (Dusan) <dm...@av...> - 2011-07-20 20:00:00
|
I forgot to mention one more fact. I am using NFS mount.
/etc/fstab:
------------
47.135.159.188:/exports /exports nfs intr,noauto,nolock 0 0
Here is the "valgrind ls -l" output. If started as NFS mounted, nothing happens:
47.134.206.85 # pwd
/exports
47.134.206.85 # ls
Valgrind
47.134.206.85 # cd Valgrind/
47.134.206.85 # ls
bin include lib share valgrind
47.134.206.85 # ./valgrind ls -l
If I copy valgrind executable on the target, "valgrind ls -l" prints something:
47.134.206.85 # ./valgrind ls -l
valgrind: failed to start tool 'memcheck' for platform 'arm-linux': No such file
or directory
Problem is that I can not put the whole Valgrind on the target. It is 80MB big and I don't have that much RAM available.
Does it mean that valgrind can not run with NFS mount?
Thanks,
Dusan.
-----Original Message-----
From: John Reiser [mailto:jr...@bi...]
Sent: Wednesday, July 20, 2011 3:03 PM
To: val...@li...
Subject: Re: [Valgrind-users] Valgrind for ARM 1176 for linux
On 07/20/2011 10:41 AM, Mudric, Dusan (Dusan) wrote:
> I did something similar. However, "valgrind ls -l" does nothing. It never completes this instruction.
"valgrind ls -l" does _something_, if nothing other than "Cannot exec", or SIGSEGV,
or some other complaint. ("Normal exit" is a [silent] complaint.)
Please show the entire output from:
valgrind ls -l
echo $?
Then show the output from:
strace valgrind ls -l
The show the output from
$ gdb valgrind
(gdb) run ls -l
(gdb) bt
(gdb) info reg
(gdb) x/i $pc
(gdb) x/8i $pc-4*4
> 1. I fixed configure.in
>
> http://old.nabble.com/building-for-arm-td29791500.html#a29791500
>
> 2. I used:
>
> . ./mybuild.sh
> ./configure --host=armv7-unknown-linux-gnu --prefix=/exports/Valgrind
Cross-compiling and cross-linking is significantly different from
native compiling and native linking. You should have mentioned this
in your first message. You must insure that the cross-linking environment
matches the actual target environment; it is surprisingly easy and common
to make errors here.
--
------------------------------------------------------------------------------
10 Tips for Better Web Security
Learn 10 ways to better secure your business today. Topics covered include:
Web security, SSL, hacker attacks & Denial of Service (DoS), private keys,
security Microsoft Exchange, secure Instant Messaging, and much more.
http://www.accelacomm.com/jaw/sfnl/114/51426210/
_______________________________________________
Valgrind-users mailing list
Val...@li...
https://lists.sourceforge.net/lists/listinfo/valgrind-users
|
|
From: John R. <jr...@bi...> - 2011-07-20 20:08:11
|
On 07/20/2011 12:24 PM, Mudric, Dusan (Dusan) wrote:
> I forgot to mention one more fact. I am using NFS mount.
>
> /etc/fstab:
> ------------
> 47.135.159.188:/exports /exports nfs intr,noauto,nolock 0 0
>
> Here is the "valgrind ls -l" output. If started as NFS mounted, nothing happens:
>
> 47.134.206.85 # pwd
> /exports
> 47.134.206.85 # ls
> Valgrind
> 47.134.206.85 # cd Valgrind/
> 47.134.206.85 # ls
> bin include lib share valgrind
This does not match what "make install" produces, which is:
-----
$ cd $(configure_prefix) ## /where/you/want/it/installed
$ ls
bin include lib share
$ cd bin
$ ls
callgrind_annotate cg_diff no_op_client_for_valgrind vgdb
callgrind_control cg_merge valgrind
cg_annotate ms_print valgrind-listener
$
-----
So the correct invocation should be something like:
$ .../Valgrind/bin/valgrind ls -l
Please show the output from
strace .../Valgrind/bin/valgrind ls -l
[Adjust the pathname to valgrind before running strace, and show what
you changed it to.] It will tell the failure mechanism.
> 47.134.206.85 # ./valgrind ls -l
>
> If I copy valgrind executable on the target, "valgrind ls -l" prints something:
>
> 47.134.206.85 # ./valgrind ls -l
> valgrind: failed to start tool 'memcheck' for platform 'arm-linux': No such file
> or directory
This is a symptom of not having everything that "make install" wanted to put there,
which is lib/memcheck-arm-linux.
>
> Problem is that I can not put the whole Valgrind on the target. It is 80MB big and I don't have that much RAM available.
You don't need all 80 MB to run just memcheck. Look at lib/valgrind,
and omit the obvious stuff such as any file whose name contains any one of:
cachegrind
callgrind
drd
exp
helgrind
lackey
massif
You can even do this in your build. In the top-level Makefile,
remove what you don't want from these lists:
-----
TOOLS = memcheck \
cachegrind \
callgrind \
massif \
lackey \
none \
helgrind \
drd
EXP_TOOLS = exp-sgcheck \
exp-bbv \
exp-dhat
-----
>
> Does it mean that valgrind can not run with NFS mount?
Put a copy of /bin/date (from the target) right next to (in the same directory as)
the valgrind that you want to run, then try to run _that_ "date" program.
If you can run that "date" over NFS, then you can run valgrind over NFS;
and if that "date" won't run over NFS, then you cannot run valgrind over NFS.
--
|
|
From: Bart V. A. <bva...@ac...> - 2011-07-21 05:39:00
|
On Wed, Jul 20, 2011 at 9:24 PM, Mudric, Dusan (Dusan) <dm...@av...>wrote: > I forgot to mention one more fact. I am using NFS mount. > > /etc/fstab: > ------------ > 47.135.159.188:/exports /exports nfs intr,noauto,nolock 0 0 > > Here is the "valgrind ls -l" output. If started as NFS mounted, nothing > happens: > > 47.134.206.85 # pwd > /exports > 47.134.206.85 # ls > Valgrind > 47.134.206.85 # cd Valgrind/ > 47.134.206.85 # ls > bin include lib share valgrind > 47.134.206.85 # ./valgrind ls -l > > If I copy valgrind executable on the target, "valgrind ls -l" prints > something: > > 47.134.206.85 # ./valgrind ls -l > valgrind: failed to start tool 'memcheck' for platform 'arm-linux': > No such file > or directory > > Problem is that I can not put the whole Valgrind on the target. It is 80MB > big and I don't have that much RAM available. > > Does it mean that valgrind can not run with NFS mount? > It means that Valgrind has not been configured or installed correctly. Please have a look at README.android on the trunk for an example of how to configure and install Valgrind when cross-compiling. Bart. |
|
From: John R. <jr...@bi...> - 2011-07-20 20:20:07
|
> Does it mean that valgrind can not run with NFS mount? valgrind will run if the pieces are there, and if the pathnames are correct. Take a look at valgrind on i686 or x86_64. You must replicate that layout, from the viewpoint of the target. The output from strace -e trace=file the/path/to/valgrind ls -l will tell you what filenames valgrind is expecting. You can even run that on i686 or x86_64 and compare the pathnames with the ones that the target is expecting. Probably you must adjust ./configure --prefix=/where/you/want/it/installed to specify the proper directory. (This is part of getting the cross-linking correct, which I mentioned was easy to mistake.) -- |
|
From: Julian S. <js...@ac...> - 2011-07-20 20:44:14
|
On Wednesday, July 20, 2011, John Reiser wrote: > > Does it mean that valgrind can not run with NFS mount? Should work fine with NFS. I haven't heard that it doesn't. If you want to cross-compile for Android, check out the svn trunk and follow the instructions in README.android. If you want a native compile for arm-linux, check out the trunk and do ./autogen.sh ./configure --prefix=/where/you/want/it/installed make make install Without an ARMv7 capable CPU, though, you will have problems. Some stuff will work, but SWP/SWPB instructions will fail. You may find the patches at https://bugs.kde.org/show_bug.cgi?id=276897 helpful; they are aimed at giving ARMv6 support. J |
|
From: Mudric, D. (Dusan) <dm...@av...> - 2011-07-21 14:37:59
|
NFS mount was a problem for not being able to run valgrind. The following line in the /etc/fstab of the phone fixed the mount problem:
47.135.159.188:/exports /exports nfs intr,rsize=1024,wsize=1024,noauto,nolock 0 0
However, valgrind can not find a library. I ran this on the phone:
47.134.206.85 # /exports/Valgrind/bin/valgrind --log-file-exactly=/tmp/vg.log ls -l
valgrind: failed to start tool 'memcheck' for platform 'arm-linux': No such file
or directory
I checked the libraries on the NFS server and don't see anything wrong. Do you know why valgrind can not find the memcheck library?
[root@bcml9188 valgrind]# pwd
/exports/Valgrind/lib/valgrind
[root@bcml9188 valgrind]# ll
total 82224
-rwxrwxrwx 1 root root 6655866 Jul 19 15:26 cachegrind-arm-linux
-rwxrwxrwx 1 root root 6937576 Jul 19 15:26 callgrind-arm-linux
-rwxrwxrwx 1 root root 30959 Jul 19 15:25 default.supp
-rwxrwxrwx 1 root root 6917951 Jul 19 15:26 drd-arm-linux
-rwxrwxrwx 1 root root 6557176 Jul 19 15:26 exp-bbv-arm-linux
-rwxrwxrwx 1 root root 6579995 Jul 19 15:26 exp-dhat-arm-linux
-rwxrwxrwx 1 root root 6773373 Jul 19 15:26 exp-ptrcheck-arm-linux
-rwxrwxrwx 1 root root 6897703 Jul 19 15:26 helgrind-arm-linux
-rwxrwxrwx 1 root root 6567010 Jul 19 15:26 lackey-arm-linux
-rwxrwxrwx 1 root root 3640290 Jul 19 15:25 libcoregrind-arm-linux.a
-rwxrwxrwx 1 root root 45320 Jul 19 15:25 libreplacemalloc_toolpreload-arm-linux.a
-rwxrwxrwx 1 root root 5400368 Jul 19 15:25 libvex-arm-linux.a
-rwxrwxrwx 1 root root 6619843 Jul 19 15:26 massif-arm-linux
-rwxrwxrwx 1 root root 7149402 Jul 19 15:26 memcheck-arm-linux
-rwxrwxrwx 1 root root 6545436 Jul 19 15:26 none-arm-linux
-rwxrwxrwx 1 root root 7066 Jul 19 15:25 vgpreload_core-arm-linux.so
-rwxrwxrwx 1 root root 214938 Jul 19 15:26 vgpreload_drd-arm-linux.so
-rwxrwxrwx 1 root root 40516 Jul 19 15:26 vgpreload_exp-dhat-arm-linux.so
-rwxrwxrwx 1 root root 59998 Jul 19 15:26 vgpreload_exp-ptrcheck-arm-linux.so
-rwxrwxrwx 1 root root 122009 Jul 19 15:26 vgpreload_helgrind-arm-linux.so
-rwxrwxrwx 1 root root 40516 Jul 19 15:26 vgpreload_massif-arm-linux.so
-rwxrwxrwx 1 root root 96511 Jul 19 15:26 vgpreload_memcheck-arm-linux.so
[root@bcml9188 valgrind]#
-----Original Message-----
From: John Reiser [mailto:jr...@bi...]
Sent: Wednesday, July 20, 2011 4:21 PM
To: val...@li...
Subject: Re: [Valgrind-users] Valgrind for ARM 1176 for linux
> Does it mean that valgrind can not run with NFS mount?
valgrind will run if the pieces are there, and if the pathnames are correct.
Take a look at valgrind on i686 or x86_64. You must replicate that layout,
from the viewpoint of the target.
The output from
strace -e trace=file the/path/to/valgrind ls -l
will tell you what filenames valgrind is expecting.
You can even run that on i686 or x86_64 and compare the pathnames
with the ones that the target is expecting.
Probably you must adjust
./configure --prefix=/where/you/want/it/installed
to specify the proper directory. (This is part of getting the
cross-linking correct, which I mentioned was easy to mistake.)
--
------------------------------------------------------------------------------
10 Tips for Better Web Security
Learn 10 ways to better secure your business today. Topics covered include:
Web security, SSL, hacker attacks & Denial of Service (DoS), private keys,
security Microsoft Exchange, secure Instant Messaging, and much more.
http://www.accelacomm.com/jaw/sfnl/114/51426210/
_______________________________________________
Valgrind-users mailing list
Val...@li...
https://lists.sourceforge.net/lists/listinfo/valgrind-users
|
|
From: Wan M. F. W. I. <wan...@mc...> - 2011-07-21 15:00:00
|
Maybe your binary is not in the correct directory? This is my directories after compiling Valgrind. x0152532@unx0152532:~/remote-x0152532/valgrind.1$ ls bin include lib share x0152532@unx0152532:~/remote-x0152532/valgrind.1$ ls bin callgrind_annotate cg_diff no_op_client_for_valgrind callgrind_control cg_merge valgrind cg_annotate ms_print valgrind-listener x0152532@unx0152532:~/remote-x0152532/valgrind.1$ ls lib pkgconfig valgrind x0152532@unx0152532:~/remote-x0152532/valgrind.1$ ls lib/valgrind/ cachegrind-arm-linux libvex-arm-linux.a callgrind-arm-linux massif-arm-linux default.supp memcheck-arm-linux drd-arm-linux none-arm-linux exp-bbv-arm-linux vgpreload_core-arm-linux.so exp-dhat-arm-linux vgpreload_drd-arm-linux.so exp-ptrcheck-arm-linux vgpreload_exp-dhat-arm-linux.so helgrind-arm-linux vgpreload_exp-ptrcheck-arm-linux.so lackey-arm-linux vgpreload_helgrind-arm-linux.so libcoregrind-arm-linux.a vgpreload_massif-arm-linux.so libreplacemalloc_toolpreload-arm-linux.a vgpreload_memcheck-arm-linux.so x0152532@unx0152532:~/remote-x0152532/valgrind.1$ the value of --prefix is ~/remote-x0152532/valgrind.1 -- Wan Mohd Fairuz WAN ISMAIL |
|
From: Mudric, D. (Dusan) <dm...@av...> - 2011-07-21 15:15:16
|
I did the same and don't see why valgrind is complaining about not being able to find the 'memcheck' library: 47.134.206.85 # /exports/Valgrind/bin/valgrind --log-file-exactly=/tmp/vg.log ls - valgrind: failed to start tool 'memcheck' for platform 'arm-linux': No such file or directory Here is my setup: Compile instruction: ./configure --host=armv7-unknown-linux-gnu --prefix=/exports/Valgrind NFS directory: [root@bcml9188 Valgrind]# pwd /exports/Valgrind [root@bcml9188 Valgrind]# ll total 32 drwxrwxrwx 2 root root 4096 Jul 20 16:17 bin drwxrwxrwx 3 root root 4096 Jul 19 16:30 include drwxrwxrwx 4 root root 4096 Jul 19 16:30 lib drwxrwxrwx 4 root root 4096 Jul 19 16:30 share [root@bcml9188 Valgrind]# cd bin [root@bcml9188 bin]# ll total 332 -rwxrwxrwx 1 root root 40851 Jul 19 15:26 callgrind_annotate -rwxrwxrwx 1 root root 13662 Jul 19 15:26 callgrind_control -rwxrwxrwx 1 root root 32169 Jul 19 15:26 cg_annotate -rwxrwxrwx 1 root root 10039 Jul 19 15:26 cg_diff -rwxrwxrwx 1 root root 44258 Jul 19 15:26 cg_merge -rwxr-xr-x 1 root root 54680 Jul 20 16:21 date -rwxrwxrwx 1 root root 24211 Jul 19 15:26 ms_print -rwxrwxrwx 1 root root 7778 Jul 19 15:25 no_op_client_for_valgrind -rwxr-xr-x 1 root root 34934 Jul 19 15:25 valgrind -rwxrwxrwx 1 root root 18732 Jul 19 15:26 valgrind-listener [root@bcml9188 bin]# cd ../lib/ [root@bcml9188 lib]# ll total 16 drwxrwxrwx 2 root root 4096 Jul 19 16:30 pkgconfig drwxrwxrwx 2 root root 4096 Jul 19 16:31 valgrind [root@bcml9188 lib]# cd valgrind/ [root@bcml9188 valgrind]# ll total 82224 -rwxrwxrwx 1 root root 6655866 Jul 19 15:26 cachegrind-arm-linux -rwxrwxrwx 1 root root 6937576 Jul 19 15:26 callgrind-arm-linux -rwxrwxrwx 1 root root 30959 Jul 19 15:25 default.supp -rwxrwxrwx 1 root root 6917951 Jul 19 15:26 drd-arm-linux -rwxrwxrwx 1 root root 6557176 Jul 19 15:26 exp-bbv-arm-linux -rwxrwxrwx 1 root root 6579995 Jul 19 15:26 exp-dhat-arm-linux -rwxrwxrwx 1 root root 6773373 Jul 19 15:26 exp-ptrcheck-arm-linux -rwxrwxrwx 1 root root 6897703 Jul 19 15:26 helgrind-arm-linux -rwxrwxrwx 1 root root 6567010 Jul 19 15:26 lackey-arm-linux -rwxrwxrwx 1 root root 3640290 Jul 19 15:25 libcoregrind-arm-linux.a -rwxrwxrwx 1 root root 45320 Jul 19 15:25 libreplacemalloc_toolpreload-arm-linux.a -rwxrwxrwx 1 root root 5400368 Jul 19 15:25 libvex-arm-linux.a -rwxrwxrwx 1 root root 6619843 Jul 19 15:26 massif-arm-linux -rwxrwxrwx 1 root root 7149402 Jul 19 15:26 memcheck-arm-linux -rwxrwxrwx 1 root root 6545436 Jul 19 15:26 none-arm-linux -rwxrwxrwx 1 root root 7066 Jul 19 15:25 vgpreload_core-arm-linux.so -rwxrwxrwx 1 root root 214938 Jul 19 15:26 vgpreload_drd-arm-linux.so -rwxrwxrwx 1 root root 40516 Jul 19 15:26 vgpreload_exp-dhat-arm-linux.so -rwxrwxrwx 1 root root 59998 Jul 19 15:26 vgpreload_exp-ptrcheck-arm-linux.so -rwxrwxrwx 1 root root 122009 Jul 19 15:26 vgpreload_helgrind-arm-linux.so -rwxrwxrwx 1 root root 40516 Jul 19 15:26 vgpreload_massif-arm-linux.so -rwxrwxrwx 1 root root 96511 Jul 19 15:26 vgpreload_memcheck-arm-linux.so From: Wan Mohd Fairuz Wan Ismail [mailto:wan...@mc...] Sent: Thursday, July 21, 2011 11:00 AM To: Mudric, Dusan (Dusan) Cc: John Reiser; val...@li... Subject: Re: [Valgrind-users] Valgrind for ARM 1176 for linux Maybe your binary is not in the correct directory? This is my directories after compiling Valgrind. x0152532@unx0152532:~/remote-x0152532/valgrind.1$ ls bin include lib share x0152532@unx0152532:~/remote-x0152532/valgrind.1$ ls bin callgrind_annotate cg_diff no_op_client_for_valgrind callgrind_control cg_merge valgrind cg_annotate ms_print valgrind-listener x0152532@unx0152532:~/remote-x0152532/valgrind.1$ ls lib pkgconfig valgrind x0152532@unx0152532:~/remote-x0152532/valgrind.1$ ls lib/valgrind/ cachegrind-arm-linux libvex-arm-linux.a callgrind-arm-linux massif-arm-linux default.supp memcheck-arm-linux drd-arm-linux none-arm-linux exp-bbv-arm-linux vgpreload_core-arm-linux.so exp-dhat-arm-linux vgpreload_drd-arm-linux.so exp-ptrcheck-arm-linux vgpreload_exp-dhat-arm-linux.so helgrind-arm-linux vgpreload_exp-ptrcheck-arm-linux.so lackey-arm-linux vgpreload_helgrind-arm-linux.so libcoregrind-arm-linux.a vgpreload_massif-arm-linux.so libreplacemalloc_toolpreload-arm-linux.a vgpreload_memcheck-arm-linux.so x0152532@unx0152532:~/remote-x0152532/valgrind.1$ the value of --prefix is ~/remote-x0152532/valgrind.1 -- Wan Mohd Fairuz WAN ISMAIL |
|
From: Dan K. <da...@ke...> - 2011-07-21 16:34:38
|
On Thu, Jul 21, 2011 at 7:37 AM, Mudric, Dusan (Dusan)
<dm...@av...> wrote:
> However, valgrind can not find a library.
> valgrind: failed to start tool 'memcheck' for platform 'arm-linux': No such file or directory
strace might be able to tell you where it was looking for the library.
$ strace -e trace=file -o log -f valgrind /bin/ls
$ grep memcheck log
17724 execve("/usr/lib/valgrind/memcheck-x86-linux",
["/usr/bin/valgrind.bin", "/bin/ls"], [/* 46 vars */]) = 0
17724 access("/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so", R_OK) = 0
17724 stat64("/usr/lib/valgrind/memcheck-x86-linux",
{st_mode=S_IFREG|0755, st_size=6070610, ...}) = 0
17724 open("/usr/lib/valgrind/memcheck-x86-linux", O_RDONLY|O_LARGEFILE) = 3
17724 stat64("/usr/lib/valgrind/memcheck-x86-linux",
{st_mode=S_IFREG|0755, st_size=6070610, ...}) = 0
17724 open("/usr/lib/valgrind/memcheck-x86-linux", O_RDONLY|O_LARGEFILE) = 3
17724 open("/usr/lib/valgrind/memcheck-x86-linux", O_RDONLY) = 3
17724 readlink("/proc/self/fd/3",
"/usr/lib/valgrind/memcheck-x86-linux", 4096) = 36
17724 open("/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so", O_RDONLY) = 3
17724 readlink("/proc/self/fd/3",
"/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so", 4096) = 49
17724 stat64("/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so",
{st_mode=S_IFREG|0644, st_size=99339, ...}) = 0
17724 open("/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so",
O_RDONLY|O_LARGEFILE) = 4
17724 readlink("/proc/self/fd/3",
"/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so", 4096) = 49
17724 stat64("/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so",
{st_mode=S_IFREG|0644, st_size=99339, ...}) = 0
17724 open("/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so",
O_RDONLY|O_LARGEFILE) = 4
17724 open("/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so", O_RDONLY) = 4
17724 readlink("/proc/self/fd/4",
"/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so", 4096) = 49
|
|
From: Mudric, D. (Dusan) <dm...@av...> - 2011-07-21 17:40:52
|
Linux on my phone does not have strace tool. Is there strace binary that can be loaded on ARM1176 so I can check what valgrind is trying to use?
-----Original Message-----
From: dan...@gm... [mailto:dan...@gm...] On Behalf Of Dan Kegel
Sent: Thursday, July 21, 2011 12:35 PM
To: Mudric, Dusan (Dusan)
Cc: John Reiser; val...@li...
Subject: Re: [Valgrind-users] Valgrind for ARM 1176 for linux
On Thu, Jul 21, 2011 at 7:37 AM, Mudric, Dusan (Dusan)
<dm...@av...> wrote:
> However, valgrind can not find a library.
> valgrind: failed to start tool 'memcheck' for platform 'arm-linux': No such file or directory
strace might be able to tell you where it was looking for the library.
$ strace -e trace=file -o log -f valgrind /bin/ls
$ grep memcheck log
17724 execve("/usr/lib/valgrind/memcheck-x86-linux",
["/usr/bin/valgrind.bin", "/bin/ls"], [/* 46 vars */]) = 0
17724 access("/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so", R_OK) = 0
17724 stat64("/usr/lib/valgrind/memcheck-x86-linux",
{st_mode=S_IFREG|0755, st_size=6070610, ...}) = 0
17724 open("/usr/lib/valgrind/memcheck-x86-linux", O_RDONLY|O_LARGEFILE) = 3
17724 stat64("/usr/lib/valgrind/memcheck-x86-linux",
{st_mode=S_IFREG|0755, st_size=6070610, ...}) = 0
17724 open("/usr/lib/valgrind/memcheck-x86-linux", O_RDONLY|O_LARGEFILE) = 3
17724 open("/usr/lib/valgrind/memcheck-x86-linux", O_RDONLY) = 3
17724 readlink("/proc/self/fd/3",
"/usr/lib/valgrind/memcheck-x86-linux", 4096) = 36
17724 open("/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so", O_RDONLY) = 3
17724 readlink("/proc/self/fd/3",
"/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so", 4096) = 49
17724 stat64("/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so",
{st_mode=S_IFREG|0644, st_size=99339, ...}) = 0
17724 open("/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so",
O_RDONLY|O_LARGEFILE) = 4
17724 readlink("/proc/self/fd/3",
"/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so", 4096) = 49
17724 stat64("/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so",
{st_mode=S_IFREG|0644, st_size=99339, ...}) = 0
17724 open("/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so",
O_RDONLY|O_LARGEFILE) = 4
17724 open("/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so", O_RDONLY) = 4
17724 readlink("/proc/self/fd/4",
"/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so", 4096) = 49
|
|
From: Wan M. F. W. I. <wan...@mc...> - 2011-07-21 19:02:21
|
I think you can cross compile strace. Make sure to compile with -static flag. I have strace binary but it's at work, can give you tomorrow if you still need it. reference: http://sourceforge.net/projects/strace/ On Thu, Jul 21, 2011 at 7:40 PM, Mudric, Dusan (Dusan) <dm...@av...>wrote: > Linux on my phone does not have strace tool. Is there strace binary that > can be loaded on ARM1176 so I can check what valgrind is trying to use? > > -----Original Message----- > From: dan...@gm... [mailto:dan...@gm...] On Behalf > Of Dan Kegel > Sent: Thursday, July 21, 2011 12:35 PM > To: Mudric, Dusan (Dusan) > Cc: John Reiser; val...@li... > Subject: Re: [Valgrind-users] Valgrind for ARM 1176 for linux > > On Thu, Jul 21, 2011 at 7:37 AM, Mudric, Dusan (Dusan) > <dm...@av...> wrote: > > However, valgrind can not find a library. > > valgrind: failed to start tool 'memcheck' for platform 'arm-linux': No > such file or directory > > strace might be able to tell you where it was looking for the library. > > $ strace -e trace=file -o log -f valgrind /bin/ls > $ grep memcheck log > > 17724 execve("/usr/lib/valgrind/memcheck-x86-linux", > ["/usr/bin/valgrind.bin", "/bin/ls"], [/* 46 vars */]) = 0 > 17724 access("/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so", R_OK) = 0 > 17724 stat64("/usr/lib/valgrind/memcheck-x86-linux", > {st_mode=S_IFREG|0755, st_size=6070610, ...}) = 0 > 17724 open("/usr/lib/valgrind/memcheck-x86-linux", O_RDONLY|O_LARGEFILE) = > 3 > 17724 stat64("/usr/lib/valgrind/memcheck-x86-linux", > {st_mode=S_IFREG|0755, st_size=6070610, ...}) = 0 > 17724 open("/usr/lib/valgrind/memcheck-x86-linux", O_RDONLY|O_LARGEFILE) = > 3 > 17724 open("/usr/lib/valgrind/memcheck-x86-linux", O_RDONLY) = 3 > 17724 readlink("/proc/self/fd/3", > "/usr/lib/valgrind/memcheck-x86-linux", 4096) = 36 > 17724 open("/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so", O_RDONLY) = > 3 > 17724 readlink("/proc/self/fd/3", > "/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so", 4096) = 49 > 17724 stat64("/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so", > {st_mode=S_IFREG|0644, st_size=99339, ...}) = 0 > 17724 open("/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so", > O_RDONLY|O_LARGEFILE) = 4 > 17724 readlink("/proc/self/fd/3", > "/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so", 4096) = 49 > 17724 stat64("/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so", > {st_mode=S_IFREG|0644, st_size=99339, ...}) = 0 > 17724 open("/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so", > O_RDONLY|O_LARGEFILE) = 4 > 17724 open("/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so", O_RDONLY) = > 4 > 17724 readlink("/proc/self/fd/4", > "/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so", 4096) = 49 > > > ------------------------------------------------------------------------------ > 5 Ways to Improve & Secure Unified Communications > Unified Communications promises greater efficiencies for business. UC can > improve internal communications as well as offer faster, more efficient > ways > to interact with customers and streamline customer service. Learn more! > http://www.accelacomm.com/jaw/sfnl/114/51426253/ > _______________________________________________ > Valgrind-users mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-users > -- Wan Mohd Fairuz WAN ISMAIL OMAP System Multimedia Integration Team Texas Instrument France +33 (0)4 93 22 20 16 +33 (0)6 43 46 13 39 |
|
From: Mudric, D. (Dusan) <dm...@av...> - 2011-07-22 18:12:08
|
787 execve("./valgrind", ["./valgrind", "--log-file-exactly=/tmp/vg.log", "ls", "-l"], [/* 21 vars */]) = 0
787 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
787 open("/AvayaDir/lib/tls/v6l/fast-mult/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
787 stat64("/AvayaDir/lib/tls/v6l/fast-mult/half", 0xbeb99290) = -1 ENOENT (No such file or directory)
787 open("/AvayaDir/lib/tls/v6l/fast-mult/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
787 stat64("/AvayaDir/lib/tls/v6l/fast-mult", 0xbeb99290) = -1 ENOENT (No such file or directory)
787 open("/AvayaDir/lib/tls/v6l/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
787 stat64("/AvayaDir/lib/tls/v6l/half", 0xbeb99290) = -1 ENOENT (No such file or directory)
787 open("/AvayaDir/lib/tls/v6l/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
787 stat64("/AvayaDir/lib/tls/v6l", 0xbeb99290) = -1 ENOENT (No such file or directory)
787 open("/AvayaDir/lib/tls/fast-mult/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
787 stat64("/AvayaDir/lib/tls/fast-mult/half", 0xbeb99290) = -1 ENOENT (No such file or directory)
787 open("/AvayaDir/lib/tls/fast-mult/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
787 stat64("/AvayaDir/lib/tls/fast-mult", 0xbeb99290) = -1 ENOENT (No such file or directory)
787 open("/AvayaDir/lib/tls/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
787 stat64("/AvayaDir/lib/tls/half", 0xbeb99290) = -1 ENOENT (No such file or directory)
787 open("/AvayaDir/lib/tls/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
787 stat64("/AvayaDir/lib/tls", 0xbeb99290) = -1 ENOENT (No such file or directory)
787 open("/AvayaDir/lib/v6l/fast-mult/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
787 stat64("/AvayaDir/lib/v6l/fast-mult/half", 0xbeb99290) = -1 ENOENT (No such file or directory)
787 open("/AvayaDir/lib/v6l/fast-mult/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
787 stat64("/AvayaDir/lib/v6l/fast-mult", 0xbeb99290) = -1 ENOENT (No such file or directory)
787 open("/AvayaDir/lib/v6l/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
787 stat64("/AvayaDir/lib/v6l/half", 0xbeb99290) = -1 ENOENT (No such file or directory)
787 open("/AvayaDir/lib/v6l/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
787 stat64("/AvayaDir/lib/v6l", 0xbeb99290) = -1 ENOENT (No such file or directory)
787 open("/AvayaDir/lib/fast-mult/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
787 stat64("/AvayaDir/lib/fast-mult/half", 0xbeb99290) = -1 ENOENT (No such file or directory)
787 open("/AvayaDir/lib/fast-mult/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
787 stat64("/AvayaDir/lib/fast-mult", 0xbeb99290) = -1 ENOENT (No such file or directory)
787 open("/AvayaDir/lib/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
787 stat64("/AvayaDir/lib/half", 0xbeb99290) = -1 ENOENT (No such file or directory)
787 open("/AvayaDir/lib/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
787 stat64("/AvayaDir/lib", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
787 open("/etc/ld.so.cache", O_RDONLY) = -1 ENOENT (No such file or directory)
787 open("/lib/tls/v6l/fast-mult/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
787 stat64("/lib/tls/v6l/fast-mult/half", 0xbeb99290) = -1 ENOENT (No such file or directory)
787 open("/lib/tls/v6l/fast-mult/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
787 stat64("/lib/tls/v6l/fast-mult", 0xbeb99290) = -1 ENOENT (No such file or directory)
787 open("/lib/tls/v6l/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
787 stat64("/lib/tls/v6l/half", 0xbeb99290) = -1 ENOENT (No such file or directory)
787 open("/lib/tls/v6l/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
787 stat64("/lib/tls/v6l", 0xbeb99290) = -1 ENOENT (No such file or directory)
787 open("/lib/tls/fast-mult/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
787 stat64("/lib/tls/fast-mult/half", 0xbeb99290) = -1 ENOENT (No such file or directory)
787 open("/lib/tls/fast-mult/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
787 stat64("/lib/tls/fast-mult", 0xbeb99290) = -1 ENOENT (No such file or directory)
787 open("/lib/tls/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
787 stat64("/lib/tls/half", 0xbeb99290) = -1 ENOENT (No such file or directory)
787 open("/lib/tls/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
787 stat64("/lib/tls", 0xbeb99290) = -1 ENOENT (No such file or directory)
787 open("/lib/v6l/fast-mult/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
787 stat64("/lib/v6l/fast-mult/half", 0xbeb99290) = -1 ENOENT (No such file or directory)
787 open("/lib/v6l/fast-mult/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
787 stat64("/lib/v6l/fast-mult", 0xbeb99290) = -1 ENOENT (No such file or directory)
787 open("/lib/v6l/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
787 stat64("/lib/v6l/half", 0xbeb99290) = -1 ENOENT (No such file or directory)
787 open("/lib/v6l/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
787 stat64("/lib/v6l", 0xbeb99290) = -1 ENOENT (No such file or directory)
787 open("/lib/fast-mult/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
787 stat64("/lib/fast-mult/half", 0xbeb99290) = -1 ENOENT (No such file or directory)
787 open("/lib/fast-mult/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
787 stat64("/lib/fast-mult", 0xbeb99290) = -1 ENOENT (No such file or directory)
787 open("/lib/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
787 stat64("/lib/half", 0xbeb99290) = -1 ENOENT (No such file or directory)
787 open("/lib/libc.so.6", O_RDONLY) = 3
787 fstat64(3, {st_mode=S_IFREG|0755, st_size=1176496, ...}) = 0
787 syscall_983045(0x40001130, 0x40001800, 0x496bd674, 0x40001808, 0x496bd048, 0x496bd000, 0, 0xf0005, 0x48, 0x6474e552, 0xffff5170, 0xbeb999d4, 0, 0xbeb99860, 0x496a946c, 0x49699f68, 0x20000010, 0x40001130, 0, 0, 0, 0xeb48, 0xcdb18, 0xcdaf0, 0, 0, 0, 0, 0, 0, 0, 0) = 0
787 access("/sbin/ls", R_OK|X_OK) = -1 ENOENT (No such file or directory)
787 access("/usr/sbin/ls", R_OK|X_OK) = -1 ENOENT (No such file or directory)
787 access("/bin/ls", R_OK|X_OK) = 0
787 open("/bin/ls", O_RDONLY) = 3
787 readlink("/proc/self/exe", "/exports/Valgrind/bin/valgrind", 4096) = 30
787 execve("/exports/Valgrind/lib/valgrind/memcheck-arm-linux", ["./valgrind", "--log-file-exactly=/tmp/vg.log", "ls", "-l"], [/* 22 vars */]) = 0
|