|
From: Apostolos M. <apo...@gm...> - 2006-06-09 15:05:44
|
I try to use valgrind for my embedded system. The target is a motorola
processor with montavista linux (ppc)
Linux 2.4.20_mvl31-8270ppu #8 Fri Feb 24 10:43:32 EET 2006 ppc unknown
I compiled valgrind with:
CC=3D/devkit/montavista/ppc/82xx/bin/ppc_82xx-gcc ./configure
--host=3Dppc-linux --disable-tls
gcc version 3.3.1 (MontaVista 3.3.1-3.0.10.0300532 2003-12-24)
I installed correctly valgrind, but when it tries to load I have the
following message in the log file
=3D=3D482=3D=3D Memcheck, a memory error detector.
=3D=3D482=3D=3D Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et=
al.
=3D=3D482=3D=3D Using LibVEX rev 1606, a library for dynamic binary transla=
tion.
=3D=3D482=3D=3D Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP.
=3D=3D482=3D=3D Using valgrind-3.2.0, a dynamic binary instrumentation fram=
ework.
=3D=3D482=3D=3D Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et=
al.
=3D=3D482=3D=3D For more details, rerun with: -v
=3D=3D482=3D=3D
=3D=3D482=3D=3D My PID =3D 482, parent PID =3D 481. Prog and args are:
=3D=3D482=3D=3D ./myfile.x
=3D=3D482=3D=3D -s9
=3D=3D482=3D=3D
=3D=3D482=3D=3D
=3D=3D482=3D=3D ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 4 from=
1)
=3D=3D482=3D=3D malloc/free: in use at exit: 0 bytes in 0 blocks.
=3D=3D482=3D=3D malloc/free: 0 allocs, 0 frees, 0 bytes allocated.
=3D=3D482=3D=3D For counts of detected errors, rerun with: -v
=3D=3D482=3D=3D All heap blocks were freed -- no leaks are possible
BUT the program is not executed with the following error:
valgrind --tool=3Dmemcheck --log-file=3D/mnt/ipu/tmp/grind.log ./myfile.=
x -s9
./nms.imgX =C5=14"t=C4=01_\=C6BX=10=10!0=03=03=03=03=03=03=03=03=03=03=03=
=03=03=03=03=03
L//lib/valgrind//ppc32-linux/vgpreload_core.so=B0=C4=01X=CC=01=C4=01Yt=C4=
=01Y=04=EC=C0=B4t8Droot@foo:#
but the vgpreload_core.so it is in the path, it is in the LD_LIBRARY_PATH
I tried the same with gdb and i 'm run into the same error.
I used strace and had:
open("/lib/valgrind//ppc32-linux/vgpreload_core.so", O_RDONLY) =3D -1
ENOENT (No such file or directory)
but #ll /lib/valgrind//ppc32-linux/vgpreload_core.so
-rwxr-xr-x 1 root root 71482 Jun 9 16:01
/lib/valgrind//ppc32-linux/vgpreload_core.so*
Any idea about this error ??
Best regards,
Apostolos
gdb output:
(gdb)run -v myfile.x -s9
Starting program: /lib/valgrind/ppc32-linux/memcheck -v nms.img -s9
=3D=3D527=3D=3D Memcheck, a memory error detector.
=3D=3D527=3D=3D Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et=
al.
=3D=3D527=3D=3D Using LibVEX rev 1606, a library for dynamic binary transla=
tion.
=3D=3D527=3D=3D Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP.
=3D=3D527=3D=3D Using valgrind-3.2.0, a dynamic binary instrumentation fram=
ework.
=3D=3D527=3D=3D Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et=
al.
=3D=3D527=3D=3D
--527-- Command line
--527-- myfile.x
--527-- -s9
--527-- Startup, with flags:
--527-- -v
--527-- Contents of /proc/version:
--527-- Linux version 2.4.20_mvl31-8270ppu (iple@pclinux) (gcc
version 3.3.1 (MontaVista 3.3.1-3.0.10.0300532 2003-12-24)) #8 Fri Feb
24 10:43:32 EET 2006
--527-- Arch and hwcaps: PPC32, ppc32-int-flt-GX
--527-- Valgrind library directory: /lib/valgrind/
--527-- Reading syms from /lib/ld-2.3.2.so (0x4000000)
--527-- Reading syms from /intracom/usr/DISK0/BOOT/myfile.x (0x10000000)
--527-- Reading syms from /lib/valgrind/ppc32-linux/memcheck (0x38000000)
--527-- object doesn't have a dynamic symbol table
--527-- Reading suppressions file: /mnt/ipu/lib/valgrind//default.supp
--527-- REDIR: 0x40129B0 (strlen) redirected to 0x3802EDD0
(vgPlain_ppc32_linux_REDIR_FOR_strlen)
--527-- REDIR: 0x40127E0 (strcmp) redirected to 0x3802EDF8
(vgPlain_ppc32_linux_REDIR_FOR_strcmp)
myfile.xX =C5=14"t=C4=01_\=C6BX=10=10!0=03=03=03=03=03=03=03=03=03=03=03=03=
=03=03=03=03
L//lib/valgrind//ppc32-linux/vgpreload_core.so=B0=C4=01X=CC=01=C4=01Yt=C4=
=01Y=04=EC=C0=B4t8D=3D=3D527=3D=3D
=3D=3D527=3D=3D ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 4 from=
1)
--527--
--527-- supp: 4 glibc-2.3.x-on-SuSE-10.0-(PPC)-1
=3D=3D527=3D=3D malloc/free: in use at exit: 0 bytes in 0 blocks.
=3D=3D527=3D=3D malloc/free: 0 allocs, 0 frees, 0 bytes allocated.
=3D=3D527=3D=3D
=3D=3D527=3D=3D All heap blocks were freed -- no leaks are possible.
--527-- memcheck: sanity checks: 0 cheap, 1 expensive
--527-- memcheck: auxmaps: 0 auxmap entries (0k, 0M) in use
--527-- memcheck: auxmaps: 0 searches, 0 comparisons
--527-- memcheck: SMs: n_issued =3D 6 (96k, 0M)
--527-- memcheck: SMs: n_deissued =3D 0 (0k, 0M)
--527-- memcheck: SMs: max_noaccess =3D 65535 (1048560k, 1023M)
--527-- memcheck: SMs: max_undefined =3D 0 (0k, 0M)
--527-- memcheck: SMs: max_defined =3D 41 (656k, 0M)
--527-- memcheck: SMs: max_non_DSM =3D 6 (96k, 0M)
--527-- memcheck: max sec V bit nodes: 0 (0k, 0M)
--527-- memcheck: set_sec_vbits8 calls: 0 (new: 0, updates: 0)
--527-- memcheck: max shadow mem size: 400k, 0M
--527-- translate: fast SP updates identified: 54 ( 61.3%)
--527-- translate: generic_known SP updates identified: 27 ( 30.6%)
--527-- translate: generic_unknown SP updates identified: 7 ( 7.9%)
--527-- tt/tc: 910 tt lookups requiring 909 probes
--527-- tt/tc: 910 fast-cache updates, 2 flushes
--527-- transtab: new 455 (12,356 -> 201,612; ratio 163:10) [0 scs]
--527-- transtab: dumped 0 (0 -> ??)
--527-- transtab: discarded 0 (0 -> ??)
--527-- scheduler: 2,532 jumps (bb entries).
--527-- scheduler: 0/469 major/minor sched events.
--527-- sanity: 1 cheap, 1 expensive checks.
--527-- exectx: 30,011 lists, 2 contexts (avg 0 per list)
--527-- exectx: 4 searches, 2 full compares (500 per 1000)
--527-- exectx: 0 cmp2, 5 cmp4, 0 cmpAll
Program exited with code 0177.
|