[RFA/JVMTI] Implement GetErrorName
Tom Tromey
tromey@redhat.com
Thu Sep 14 17:57:00 GMT 2006
>>>>> "Keith" == Keith Seitz <keiths@redhat.com> writes:
Keith> I've chosen to use a switch to do this because the set of JVMTI errors
Keith> in jvmtiError contains as many "holes" as there are defined errors.
FWIW I think you should make jvmti.cc changes without waiting for
approval. The only bits I'm really concerned about are things that
touch sensitive areas (performance critical or ones where other
hacking is happening) in the rest of libgcj.
Keith> Okay?
One oddity...
Keith> + jstring string = _Jv_NewStringUTF (name);
Keith> + jlong len = _Jv_GetStringUTFLength (string);
Keith> + *name_ptr = (char *) _Jv_Malloc (len + 1);
Keith> + _Jv_GetStringUTFRegion (string, 0, string->length (), *name_ptr);
Keith> + name_ptr[len] = '\0';
This is pretty roundabout. You can just use strcpy.
We already assume that the runtime charset for C string constants is
ASCII.
Tom
More information about the Java-patches
mailing list