[kaffe] About ARM JIT's Exception Handling in Kaffe
Dalibor Topic
robilad at kaffe.org
Wed Oct 20 09:46:26 PDT 2004
Bytecode wrote:
> I'm porting Kaffe to an ARM-like processor. Now JIT works OK. I find an
> error in JIT for ARM in my porting work.
Hi,
thanks for your bug report & the endurance to find the problem.
> But if we use GCC's O2 option to compile Kaffe, GCC will optimize the
> prologue of the two functions (throwExternalException and buildStackTrace)
> and thus destroy the stack trace structure. You can use GCC -O2 -S to
> compile some programs and find that FP register disappears in the prologue
> of the function.
> (I trace the error for several days. I am cracy:). Finally I disassembled
> the libkaffe.so and read the assemble code of the two functions. I find the
> bug!)
>
> So we must not use O2 option to compile exception.c and stackTrace.c.
>
> Any suggestion is welcome.
ouch. Some kaffe ports ports explicitely pass -fno-omit-frame-pointer to
gcc in config.frag. I've created such a patch for arm-linux. Could you
give it a try to see if that fixes the problem of the missing fp for you?
cheers,
dalibor topic
-------------- next part --------------
Index: config/arm/linux/config.frag
===================================================================
RCS file: /cvs/kaffe/kaffe/config/arm/linux/config.frag,v
retrieving revision 1.7
diff -u -r1.7 config.frag
--- config/arm/linux/config.frag 4 Aug 2003 09:20:01 -0000 1.7
+++ config/arm/linux/config.frag 20 Oct 2004 16:44:23 -0000
@@ -4,7 +4,7 @@
#
# in ARM gcc characters are by default unsigned
#
-CFLAGS="$CFLAGS -fsigned-char"
+CFLAGS="$CFLAGS -fsigned-char -fno-omit-frame-pointer"
# if we use cross environment, following values may not be detected.
if [ "$cross_compiling" = yes ]; then
More information about the kaffe
mailing list