This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [3.3] Patch ping
- From: Ranjit Mathew <rmathew at hotmail dot com>
- To: gcc at gcc dot gnu dot org
- Date: Fri, 24 Jan 2003 00:55:33 +0530
- Subject: Re: [3.3] Patch ping
- References: <BAY1-F60anlzmUR7BED000184d2@hotmail.com>
Ranjit Mathew wrote:
[ ] The patch either fixes an existing testcase, or adds a new testcase.
Got me there...the "libjava/testsuite/libjava.jni" testcases should have
JNIEXPORT and JNICALL in the function definitions as per the JNI ABI.
I have posted a patch for the "libjava.jni" testcases to fix the above
issue:
http://gcc.gnu.org/ml/java-patches/2003-q1/msg00165.html
Since I do a crossed-native build of GCC for MinGW from Linux, I run
the testcases manually on Windows. The following is the result with
the "libjava.jni/invoke" testcase which tests the basic ability of
Java methods to call C functions using JNI - this is against the
current GCC 3.3 on a Win98 box running MinGW/MSYS (target "mingw32").
First with GCJ (compiler and interpreter) without my patches:
------------------------------------- 8< -------------------------------------
/c/temp/libjava.jni > /j/wingcc/bin/gcj -fjni --main=invoke invoke.java
/c/temp/libjava.jni > a
trying...
Exception in thread "main" java.lang.ExceptionInInitializerError
<<No stacktrace available>>
Caused by: java.lang.ArrayIndexOutOfBoundsException
<<No stacktrace available>>
/c/temp/libjava.jni >
/c/temp/libjava.jni > /j/wingcc/bin/gij invoke
trying...
abnormal program termination
/c/temp/libjava.jni >
------------------------------------- 8< -------------------------------------
Now with GCJ (compiler and interpreter) with my JNI patches applied:
------------------------------------- 8< -------------------------------------
/c/temp/libjava.jni > gcj -fjni --main=invoke invoke.java
/c/temp/libjava.jni > a
trying...
loaded
23
/c/temp/libjava.jni > gij invoke
trying...
loaded
23
/c/temp/libjava.jni >
------------------------------------- 8< -------------------------------------
Sincerely Yours,
Ranjit.
--
Ranjit Mathew Email: rmathew AT hotmail DOT com
Bangalore,
INDIA. Web: http://ranjitmathew.tripod.com/