Porting kaffe to LynxOS on Powerpc
Rainer Kloud
rainer.kloud at siemens.at
Tue Nov 23 21:54:39 PST 1999
Hi All,
I'm interested in useing the java technology in embedded
systems, so I have searched for a suitable java implementation
which is running on my operating system LynxOS on PowerPC.
I had read, that kaffe is very simple to port to all
operating systems which are useing the POSIX standard.
So I have tried to compile Kaffe 1.0.5 cross on a solaris
host useing cygnus gcc version 2.7-97r1 19990817.
I have configured kaffe as following:
./configure --prefix=/home/hiroshima/LynxOS3.0.1/kaffe --disable-shared
powerpc-unknown-linux --enable-ltdl-convenience
--with-threads=unix-pthreads --without-x --with-engine=intrp
At the compiling process I had only two minor problems:
1) The thread implementation was different (some
names of the pthread systemcalls are different)
2) I have no sysdepCallMethod implementation. So I have
inserted only a empty implementation, because I think
sysdepCallMethod should only be used when invoking
native methods, correct?
When running Kaffe everytime a SIGSEGV occures when the JVM
tries to load the class 'java/lang/StringBuffer.class'.
The SIGSEGV occures in 'runVirtualMachine' (file kaffe.def)
at:
define_insn(INVOKEVIRTUAL)
{
...
load_offset_ref(mtable, stack(idx), method_dtable_offset); <-- SIGSEGV
After that I have switched on some trace messages and I got
the following output:
Loading java/lang/StringBuffer.class
000: INVOKESTATIC
Call: java/lang/System.getProperties()Ljava/util/Properties;.
000: INVOKESTATIC
Call: java/lang/System.checkPropertyAccess()V.
000: INVOKESTATIC
Call: java/lang/System.getSecurityManager()Ljava/lang/SecurityManager;.
000: GETSTATIC
003: ARETURN
003: INVOKEVIRTUAL
Call: java/lang/NullSecurityManager.checkPropertiesAccess()V.
000: RETURN
006: RETURN
003: GETSTATIC
006: ARETURN
003: LDC1
005: INVOKEVIRTUAL
When I debug machine.c so I can see that the field in the sp
array, which is addressed with -idx, is not initialized,
so the access to (&sp[-( idx )]) )[0].v.taddr leeds to
the SIGSEGV. But why isn't that field initialized? I
have also compiled kaffe for linux on i386 and in my debug
session I have seen that there the field is correctly initialized!
Does anybody know why I get this problems or can anybody
tell me what I should try to catch this error?
Thanx in advance.
Rainer
--
.........................................
Rainer Kloud
Siemens AG Österreich, PSE EZE TR2
Rampengasse 3-5, A-1190 Vienna, Austria
mailto:rainer.kloud at siemens.at
.........................................
More information about the kaffe
mailing list