This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bootstrap failure caused by jvmti additions


Hi,

On Fri, 2006-08-04 at 10:57 +0200, Volker Reichelt wrote:
> your patch http://gcc.gnu.org/ml/java-patches/2006-q3/msg00264.html
> broke bootstrap (at least on x86_64-unknown-linux-gnu):
> 
> ranlib .libs/libgij.a
> creating libgij.la
> ./.libs/libgcj.so: undefined reference to `JvNumMethods(java::lang::Class*)'
> ./.libs/libgcj.so: undefined reference to `JvGetFirstMethod(java::lang::Class*)'
> collect2: ld returned 1 exit status
> make[5]: *** [jv-convert] Error 1

No idea if it is correct, but I am using the attached to get things to
compile again.

Cheers,

Mark
Index: jvmti.cc
===================================================================
--- jvmti.cc	(revision 115934)
+++ jvmti.cc	(working copy)
@@ -29,6 +29,8 @@
 #include <java/util/HashMap.h>
 #include <java/net/URL.h>
 
+#include <gcj/method.h>
+
 extern struct JNINativeInterface _Jv_JNIFunctions;
 
 struct _Jv_rawMonitorID
@@ -553,13 +555,10 @@
   if (klass->isArray())
     {
       jclass comp = klass->getComponentType();
-      jint base
-	= (jint) _Jv_GetArrayElementFromElementType(NULL,
-						    klass->getComponentType());
       // FIXME: correct for primitive types?
       jint compSize = comp->size();
       __JArray *array = (__JArray *) object;
-      *result = base + array->length * compSize;
+      *result = klass->size() + array->length * compSize;
     }
   else
     {

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]