[kaffe] Fail to enable JVMPI in cvs head.

jserv at linux2.cc.ntu.edu.tw jserv at linux2.cc.ntu.edu.tw
Fri Jan 14 05:33:17 PST 2005


Hello all,

  I just cvs update kaffe cvs repository, and I found that
it can't be built with JVMPI enabled. I attempted to apply
some minor patch, but I got some compilation errors due to
the changes of internal structures. Here are the messages:

nction declaration isn't a prototype
Object.c: In function `java_lang_VMObject_clone':
Object.c:84: warning: passing arg 3 of `memcpy' as unsigned due to
prototype
Object.c: In function `java_lang_VMObject_wait':
Object.c:112: error: structure has no member named `sleeper'
Object.c:131: error: structure has no member named `sleeper'
make[3]: *** [libnative_la-Object.lo] Error 1
make[3]: Leaving directory `/home/jserv/kaffe/libraries/clib/native'

  After consulting cvs commit log, I know the sleeper variable
was removed from Object.c, and I wonder there is a solution to
enable JVMPI again. I hope to get help for this, thanks!

Sincerely,
Jim Huang
-------------- next part --------------
Index: include/jvmpi.h
===================================================================
RCS file: /cvs/kaffe/kaffe/include/jvmpi.h,v
retrieving revision 1.5
diff -u -r1.5 jvmpi.h
--- include/jvmpi.h	5 Jul 2004 16:40:11 -0000	1.5
+++ include/jvmpi.h	14 Jan 2005 06:23:08 -0000
@@ -8,6 +8,10 @@
 
 #include <jni.h>
 
+/* JVMPI version numbers. */
+#define JVMPI_VERSION_1	0x10000001
+#define JVMPI_VERSION_1_1	0x10000002
+
 typedef void *jobjectID;
 
 enum {
Index: kaffe/kaffevm/jit3/machine.c
===================================================================
RCS file: /cvs/kaffe/kaffe/kaffe/kaffevm/jit3/machine.c,v
retrieving revision 1.70
diff -u -r1.70 machine.c
--- kaffe/kaffevm/jit3/machine.c	10 Jan 2005 10:30:19 -0000	1.70
+++ kaffe/kaffevm/jit3/machine.c	14 Jan 2005 06:23:10 -0000
@@ -440,7 +440,7 @@
 		ev.u.compiled_method_load.code_addr =
 			METHOD_NATIVECODE(xmeth);
 		ev.u.compiled_method_load.code_size =
-			xmeth->c.ncode.ncode_end - xmeth->c.ncode.ncode_start;
+			(uintp)xmeth->c.ncode.ncode_end - (uintp)xmeth->c.ncode.ncode_start;
 		if( xmeth->lines )
 		{
 			JVMPI_Lineno *jvmpi_lineno = NULL;
Index: kaffe/kaffevm/jni/jni-base.c
===================================================================
RCS file: /cvs/kaffe/kaffe/kaffe/kaffevm/jni/jni-base.c,v
retrieving revision 1.10
diff -u -r1.10 jni-base.c
--- kaffe/kaffevm/jni/jni-base.c	27 Dec 2004 16:09:48 -0000	1.10
+++ kaffe/kaffevm/jni/jni-base.c	14 Jan 2005 06:23:10 -0000
@@ -23,6 +23,7 @@
 #include "baseClasses.h"
 #include "kaffe_jni.h"
 #include "support.h"
+#include "jvmpi.h"
 
 /*
  * Keep track of how many VM's are active. Right now


More information about the kaffe mailing list