When gij runs the main method in the attached test case, it does not use the
precompiled libtest.jar.so, even though test.db is mentioned in the
gnu.gcj.precompiled.db.path property.
Test case attached. Type ./run.sh to build and run it. You get something like:
Obtained 10 stack frames.
.libs/libbt.so.0(print_trace+0x21) [0x1e166d]
.libs/libbt.so.0(Java_BadBacktrace_libcBacktrace+0x18) [0x1e16f6]
/usr/lib/libgcj.so.6(ffi_call_SYSV+0x17) [0x2a9b127]
/usr/lib/libgcj.so.6(ffi_raw_call+0x63) [0x2a9b0e9]
/usr/lib/libgcj.so.6(_ZN13_Jv_JNIMethod4callEP7ffi_cifPvP7ffi_rawS2_+0xf3)
[0x2700033]
/usr/lib/libgcj.so.6 [0x2a9af9c]
/usr/lib/libgcj.so.6(ffi_call_SYSV+0x17) [0x2a9b127]
/usr/lib/libgcj.so.6(ffi_raw_call+0x63) [0x2a9b0e9]
/usr/lib/libgcj.so.6(_ZN16_Jv_InterpMethod3runEPvP7ffi_raw+0x13f2) [0x270b164]
/usr/lib/libgcj.so.6(_ZN16_Jv_InterpMethod9run_classEP7ffi_cifPvP7ffi_rawS2_+0x34)
[0x270e9a6]
showing that the main method is being interpreted.
Note: If you remove the native code from the test case - and replace the native
call with e.g. Object x = null; x.toString(); - the native version of main()
*does* get used (which can be verified in gdb).
This is with
gij (GNU libgcj) version 4.0.0 20050622 (Red Hat 4.0.0-13)
and matching gcj.
--
Summary: gnu.gcj.precompiled.db.path ignored for method which
calls JNI native method
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libgcj
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: greenrd at greenrd dot org
CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22186