|
From: <ml...@so...> - 2009-06-09 21:15:44
|
Hi,
I am trying to run valgrind on en embedded PowerPC (MPC5121) running
WindRiver distro.
I have succeded building valgrind for this target, but when I run
valgrind I get an error message stating that the program has used an
illegal instruction. The program I use is a simple helloworld:
*************
#include <iostream>
int main(void)
{
std::cout << "Helloworld" << std::endl;
retunr 0;
}
************
This program runs fine without valgrind.
I can see that similar problems has been reported:
[Valgrind-users] Facing problem with SIGILL signal! From: Gupta Richa
<Richa@fr...> - 2008-04-03 11:29
and:
http://www.mail-archive.com/deb...@li.../msg60820.htm
l
But I have not found any solution to this...
The error from valgrind is:
# /home/mln/TargetTools/valgrind/install_debug/bin/valgrind ./a.out
==874== Memcheck, a memory error detector.
==874== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==874== Using LibVEX rev 1854, a library for dynamic binary translation.
==874== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==874== Using valgrind-3.3.1, a dynamic binary instrumentation
framework.
==874== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==874== For more details, rerun with: -v
==874==
dis_proc_ctl(ppc)(mfspr,SPR)(0x11F)
disInstr(ppc): unhandled instruction: 0x7C1F42A6
primary 31(0x1F), secondary 678(0x2A6)
==874== valgrind: Unrecognised instruction at address 0xFFD439C.
==874== Your program just tried to execute an instruction that Valgrind
==874== did not recognise. There are two possible reasons for this.
==874== 1. Your program has a bug and erroneously jumped to a non-code
==874== location. If you are running Memcheck and you just saw a
==874== warning about a bad jump, it's probably your program's fault.
==874== 2. The instruction is legitimate but Valgrind doesn't handle it,
==874== i.e. it's Valgrind's fault. If you think this is the case or
==874== you are not sure, please let us know and we'll try to fix it.
==874== Either way, Valgrind will now raise a SIGILL signal which will
==874== probably kill your program.
==874==
==874== Process terminating with default action of signal 4 (SIGILL)
==874== Illegal opcode at address 0xFFD439C
==874== at 0xFFD439C: _dl_sysdep_start (dl-sysdep.c:177)
==874== by 0xFFC23E8: _dl_start_final (rtld.c:324)
==874== by 0xFFC2A24: _dl_start (rtld.c:551)
==874== by 0xFFD4EC8: _start (in /lib/ld-2.5.so)
==874==
==874== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
==874== malloc/free: in use at exit: 0 bytes in 0 blocks.
==874== malloc/free: 0 allocs, 0 frees, 0 bytes allocated.
==874== For counts of detected errors, rerun with: -v
==874== All heap blocks were freed -- no leaks are possible.
Illegal instruction
#
Is there any solution for this? (I have also tried version 3.4.1 and a
snapshot from source repository, with the same result).
Best regards,
Mogens
<P><p><font face="Arial, Helvetica, sans-serif" size="2" style="font-size:13.5px">_______________________________________________________________<BR>http://www.sol.dk/ - Debat mail biler job rejser og meget mere</font> |