|
From: Eduardo M. <ea...@us...> - 2005-11-10 17:06:50
|
I did a something similar that Lev Iserovich did: I have cross-compiled valgrind-3.1-SVN (from the current development=20 trunk),=20 Also I had to modify VEX/Makefile and configure.in to disable TLS because=20 it tries to run a complied program during configure.=20 It built fine. I checked my log and it used the right compiler, building=20 in a x86 for a ppc host. Well, I am getting a similar error when I run valgrind. >:~ # valgrind ls -l =3D=3D1279=3D=3D Memcheck, a memory error detector. =3D=3D1279=3D=3D Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward e= t al. =3D=3D1279=3D=3D Using LibVEX rev 1447, a library for dynamic binary transl= ation. =3D=3D1279=3D=3D Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP. =3D=3D1279=3D=3D Using valgrind-3.1.SVN, a dynamic binary instrumentation=20 framework. =3D=3D1279=3D=3D Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward e= t al. =3D=3D1279=3D=3D For more details, rerun with: -v =3D=3D1279=3D=3D =3D=3D1279=3D=3D =3D=3D1279=3D=3D Process terminating with default action of signal 4 (SIGIL= L) =3D=3D1279=3D=3D Illegal opcode at address 0x700512C4 =3D=3D1279=3D=3D at 0x40103EC: =5Fstart (dl-start.S:33) =3D=3D1279=3D=3D =3D=3D1279=3D=3D ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 fro= m 0) =3D=3D1279=3D=3D malloc/free: in use at exit: 0 bytes in 0 blocks. =3D=3D1279=3D=3D malloc/free: 0 allocs, 0 frees, 0 bytes allocated. =3D=3D1279=3D=3D For counts of detected errors, rerun with: -v =3D=3D1279=3D=3D No malloc'd blocks -- no leaks are possible. Illegal instruction Any ideas?? Regards, Eduardo A. Mu=F1oz |
|
From: Tom H. <to...@co...> - 2005-11-10 17:36:33
|
In message <OF8...@us...>
Eduardo Munoz <ea...@us...> wrote:
> I did a something similar that Lev Iserovich did:
> I have cross-compiled valgrind-3.1-SVN (from the current development
> trunk),
> Also I had to modify VEX/Makefile and configure.in to disable TLS because
> it tries to run a complied program during configure.
> It built fine. I checked my log and it used the right compiler, building
> in a x86 for a ppc host.
As I said yesterday, what did configure say when it checked for
a supported CPU?
An addition question is what switches did you give to configure?
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|
|
From: Eduardo M. <ea...@us...> - 2005-11-10 17:52:38
|
configure:3956: checking for a supported CPU
configure:3984: result: ok (powerpc)
configure:4002: checking enable use as an inner Valgrind
configure:4015: result: no
configure:4028: checking for a supported OS
configure:4036: result: ok (linux)
configure:4041: checking for the kernel version
configure:4048: result: 2.6 family (2.6.8-2-686-smp)
configure:4093: checking for a supported CPU/OS combination
configure:4103: result: ok (powerpc-linux)
$ ./configure --build=3Di686-linux --host=3Dppc-linux --target=3Dppc-linux=
=20
--mandir=3D/usr/share/man --prefix=3D/u
sr --libdir=3D/usr/lib
Regards,
Eduardo A. Mu=F1oz
Tom Hughes <to...@co...>=20
Sent by: val...@li...
11/10/2005 11:36 AM
To
val...@li...
cc
Subject
Re: [Valgrind-users] illegal instruction in ppc (4xx board)
In message=20
<OF8...@us...>
Eduardo Munoz <ea...@us...> wrote:
> I did a something similar that Lev Iserovich did:
> I have cross-compiled valgrind-3.1-SVN (from the current development=20
> trunk),=20
> Also I had to modify VEX/Makefile and configure.in to disable TLS=20
because=20
> it tries to run a complied program during configure.=20
> It built fine. I checked my log and it used the right compiler,=20
building=20
> in a x86 for a ppc host.
As I said yesterday, what did configure say when it checked for
a supported CPU?
An addition question is what switches did you give to configure?
Tom
--=20
Tom Hughes (to...@co...)
http://www.compton.nu/
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.=20
Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F
Valgrind-users mailing list
Val...@li...
https://lists.sourceforge.net/lists/listinfo/valgrind-users
|
|
From: Tom H. <to...@co...> - 2005-11-10 18:05:33
|
In message <OF5...@us...>
Eduardo Munoz <ea...@us...> wrote:
> configure:3956: checking for a supported CPU
> configure:3984: result: ok (powerpc)
> configure:4002: checking enable use as an inner Valgrind
> configure:4015: result: no
> configure:4028: checking for a supported OS
> configure:4036: result: ok (linux)
> configure:4041: checking for the kernel version
> configure:4048: result: 2.6 family (2.6.8-2-686-smp)
> configure:4093: checking for a supported CPU/OS combination
> configure:4103: result: ok (powerpc-linux)
>
>
> $ ./configure --build=i686-linux --host=ppc-linux --target=ppc-linux
> --mandir=/usr/share/man --prefix=/u
> sr --libdir=/usr/lib
That looks fine - I was just concerned because I wasn't sure we
had the whole build/host/target thing right in the configure script.
It looks like Julian knows what the problem is anyway.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|
|
From: Julian S. <js...@ac...> - 2005-11-10 17:59:09
|
It turns out you are the fourth person we know of to try V on a ppc405 or similar. I believe the root problem is the 405 does not support floating point, and so the system SIGILLs when it=20 attempts to set the FPU control word before running instrumented code. I finally have access to such a system and so will look into whether there is an easy fix, in the next day or so. J On Thursday 10 November 2005 17:11, Eduardo Munoz wrote: > I did a something similar that Lev Iserovich did: > I have cross-compiled valgrind-3.1-SVN (from the current development > trunk), > Also I had to modify VEX/Makefile and configure.in to disable TLS because > it tries to run a complied program during configure. > It built fine. I checked my log and it used the right compiler, building > in a x86 for a ppc host. > > Well, I am getting a similar error when I run valgrind. > > >:~ # valgrind ls -l > > =3D=3D1279=3D=3D Memcheck, a memory error detector. > =3D=3D1279=3D=3D Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward= et al. > =3D=3D1279=3D=3D Using LibVEX rev 1447, a library for dynamic binary tran= slation. > =3D=3D1279=3D=3D Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP. > =3D=3D1279=3D=3D Using valgrind-3.1.SVN, a dynamic binary instrumentation > framework. > =3D=3D1279=3D=3D Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward= et al. > =3D=3D1279=3D=3D For more details, rerun with: -v > =3D=3D1279=3D=3D > =3D=3D1279=3D=3D > =3D=3D1279=3D=3D Process terminating with default action of signal 4 (SIG= ILL) > =3D=3D1279=3D=3D Illegal opcode at address 0x700512C4 > =3D=3D1279=3D=3D at 0x40103EC: _start (dl-start.S:33) > =3D=3D1279=3D=3D > =3D=3D1279=3D=3D ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 f= rom 0) > =3D=3D1279=3D=3D malloc/free: in use at exit: 0 bytes in 0 blocks. > =3D=3D1279=3D=3D malloc/free: 0 allocs, 0 frees, 0 bytes allocated. > =3D=3D1279=3D=3D For counts of detected errors, rerun with: -v > =3D=3D1279=3D=3D No malloc'd blocks -- no leaks are possible. > Illegal instruction > > Any ideas?? > Regards, > Eduardo A. Mu=C3=B1oz |
|
From: Lev I. <lis...@ci...> - 2005-11-11 15:41:00
|
Hi Julian, I found that place (in dispatch-ppc32.S) which sets the FPU and AltiVec to default modes, and commented out those instructions. Now I get a bit further in the process - but any program I run SEGV's. I did a gdb, and got the following disassembly at the SEGV point : 0x71401bd0: bctrl 0x71401bd4: stw r16,0(r17) <--- SEGV here (beginning of function?) 0x71401bd8: lwz r15,1852(r31) 0x71401bdc: lwz r16,900(r31) 0x71401be0: stw r15,952(r31) 0x71401be4: stw r16,0(r31) 0x71401be8: lis r18,4487 0x71401bec: ori r18,r18,52804 0x71401bf0: stw r18,896(r31) 0x71401bf4: addi r18,r17,144 0x71401bf8: lwz r21,112(r31) 0x71401bfc: mr r3,r18 0x71401c00: lwz r22,1064(r31) 0x71401c04: mr r4,r22 0x71401c08: lis r12,28976 0x71401c0c: ori r12,r12,52048 0x71401c10: mtctr r12 0x71401c14: bctrl Looks like some generated code, because the address is the same from any program I run. Any suggestions, or does this look to complicated to be easily fixable? --Lev Julian Seward wrote: >It turns out you are the fourth person we know of to try V on >a ppc405 or similar. I believe the root problem is the 405 does >not support floating point, and so the system SIGILLs when it >attempts to set the FPU control word before running instrumented >code. > >I finally have access to such a system and so will look into >whether there is an easy fix, in the next day or so. > >J > > > |
|
From: Julian S. <js...@ac...> - 2005-11-11 21:23:32
|
coregrind/m_signals.c line 1566: change
if (info->si_code == 1 /* SEGV_MAPERR */
to
if ((0xFFFF & info->si_code) == 1 /* SEGV_MAPERR */
rebuild and see if it helps.
J
On Friday 11 November 2005 15:42, Lev Iserovich wrote:
> Hi Julian,
>
> I found that place (in dispatch-ppc32.S) which sets the FPU and AltiVec
> to default modes,
> and commented out those instructions.
> Now I get a bit further in the process - but any program I run SEGV's.
> I did a gdb, and got the following disassembly at the SEGV point :
>
> 0x71401bd0: bctrl
> 0x71401bd4: stw r16,0(r17) <--- SEGV here (beginning
> of function?)
> 0x71401bd8: lwz r15,1852(r31)
> 0x71401bdc: lwz r16,900(r31)
> 0x71401be0: stw r15,952(r31)
> 0x71401be4: stw r16,0(r31)
> 0x71401be8: lis r18,4487
> 0x71401bec: ori r18,r18,52804
> 0x71401bf0: stw r18,896(r31)
> 0x71401bf4: addi r18,r17,144
> 0x71401bf8: lwz r21,112(r31)
> 0x71401bfc: mr r3,r18
> 0x71401c00: lwz r22,1064(r31)
> 0x71401c04: mr r4,r22
> 0x71401c08: lis r12,28976
> 0x71401c0c: ori r12,r12,52048
> 0x71401c10: mtctr r12
> 0x71401c14: bctrl
>
> Looks like some generated code, because the address is the same from any
> program I run.
>
> Any suggestions, or does this look to complicated to be easily fixable?
>
> --Lev
>
> Julian Seward wrote:
> >It turns out you are the fourth person we know of to try V on
> >a ppc405 or similar. I believe the root problem is the 405 does
> >not support floating point, and so the system SIGILLs when it
> >attempts to set the FPU control word before running instrumented
> >code.
> >
> >I finally have access to such a system and so will look into
> >whether there is an easy fix, in the next day or so.
> >
> >J
>
> -------------------------------------------------------
> SF.Net email is sponsored by:
> Tame your development challenges with Apache's Geronimo App Server.
> Download it for free - -and be entered to win a 42" plasma tv or your very
> own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
> _______________________________________________
> Valgrind-users mailing list
> Val...@li...
> https://lists.sourceforge.net/lists/listinfo/valgrind-users
|
|
From: Julian S. <js...@ac...> - 2005-11-13 02:49:13
|
> I found that place (in dispatch-ppc32.S) which sets the FPU and AltiVec > to default modes, Try updating to r5113. I have just been running successfully on a PPC440GX (no FPU). J |
|
From: Iserovich, L. <lis...@ci...> - 2005-11-14 21:04:32
|
Hi Julian, Thanks, I've gotten the latest SVN (5131 I believe) and it works! I do see one issue with running ls on my box - apparently syscall 107 = (sys_newlstat) is not handled by valgrind, so it complains. Is the syscall code cross-platform, or = machine specific? I guess I can see if I can add a handler according to the recommended = readme. Thanks for the help! --Lev -----Original Message----- From: Julian Seward [mailto:js...@ac...] Sent: Sat 11/12/2005 9:50 PM To: val...@li... Cc: Iserovich, Lev Subject: Re: [Valgrind-users] illegal instruction in ppc (4xx board) =20 > I found that place (in dispatch-ppc32.S) which sets the FPU and = AltiVec > to default modes, Try updating to r5113. I have just been running successfully on a PPC440GX (no FPU). J |
|
From: Julian S. <js...@ac...> - 2005-11-15 01:27:45
|
On Monday 14 November 2005 21:03, Iserovich, Lev wrote: > Hi Julian, > > Thanks, I've gotten the latest SVN (5131 I believe) and it works! Great. One thing is, I have only the vaguest idea about what kinds of embedded ppc dev systems exist. So - what kind of CPU/board/distro combination are you running on? Knowing that will help build a picture of what works and what doesn't. Do pthreaded programs work? I'm having trouble making LinuxThreads (glibc2.3.2) work on a PPC440 right now. > I do see one issue with running ls on my box - apparently syscall 107 > (sys_newlstat) is not handled by valgrind, so it complains. Is the syscall > code cross-platform, I think it's generic. Goto syswrap-ppc32-linux.c line 1566 and uncomment it: //.. GENXY(__NR_lstat, sys_newlstat), // 107 You may have to also uncomment the definition of __NR_lstat in vki_unistd-ppc32-linux.h. Rebuild and see what you get. J |