This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[patch] jvmti test, compatibility fixes.
- From: Andreas Tobler <toa at pop dot agri dot ch>
- To: Java Patches <java-patches at gcc dot gnu dot org>
- Date: Sat, 21 Oct 2006 00:00:23 +0200
- Subject: [patch] jvmti test, compatibility fixes.
Hello all,
this one makes HPPA-HPUX happy again with jvmti tests.
Tested on darwin an hupx. Others are broken atm, bootstrap I mean.
Ok, for main?
Thanks,
Andreas
2006-10-20 Andreas Tobler <a.tobler@schweiz.org>
* testsuite/libjava.jvmti/natevents.cc (do_callback_arg_tests): Replace
formatting modifiers %p with %#x.
Index: testsuite/libjava.jvmti/natevents.cc
===================================================================
--- testsuite/libjava.jvmti/natevents.cc (revision 117913)
+++ testsuite/libjava.jvmti/natevents.cc (working copy)
@@ -56,25 +56,25 @@
static void
VMInitCB (jvmtiEnv *env, JNIEnv *jni_env, jthread thread)
{
- printf ("VMInitCB jni_env=%p thread=%p\n", jni_env, thread);
+ printf ("VMInitCB jni_env=%#x thread=%#x\n", jni_env, thread);
}
static void
VMDeathCB (jvmtiEnv *env, JNIEnv *jni_env)
{
- printf ("VMDeathCB jni_env=%p\n", jni_env);
+ printf ("VMDeathCB jni_env=%#x\n", jni_env);
}
static void
ThreadStartCB (jvmtiEnv *env, JNIEnv *jni_env, jthread thread)
{
- printf ("ThreadStartCB jni_env=%p thread=%p\n", jni_env, thread);
+ printf ("ThreadStartCB jni_env=%#x thread=%#x\n", jni_env, thread);
}
static void
ThreadEndCB (jvmtiEnv *env, JNIEnv *jni_env, jthread thread)
{
- printf ("ThreadEndCB jni_env=%p thread=%p\n", jni_env, thread);
+ printf ("ThreadEndCB jni_env=%#x thread=%#x\n", jni_env, thread);
}
static void
@@ -84,32 +84,32 @@
jint class_data_len, const unsigned char *class_data,
jint *new_class_data_len, unsigned char **new_class_data)
{
- printf ("ClassFileLoadHookCB jni_env=%p class_being_redefined=%p loader=%p",
- jni_env, class_being_redefined, loader);
- printf (" name=%s protection_domain=%p class_data_len=%d class_data=%p",
+ printf ("ClassFileLoadHookCB jni_env=%#x class_being_redefined=%#x"
+ " loader=%#x", jni_env, class_being_redefined, loader);
+ printf (" name=%s protection_domain=%#x class_data_len=%d class_data=%#x",
name, protection_domain, (int) class_data_len, class_data);
- printf (" new_class_data_len=%p new_class_data=%p\n", new_class_data_len,
+ printf (" new_class_data_len=%#x new_class_data=%#x\n", new_class_data_len,
new_class_data);
}
static void
ClassLoadCB (jvmtiEnv *env, JNIEnv *jni_env, jthread thread, jclass klass)
{
- printf ("ClassLoadCB jni_env=%p thread=%p klass=%p\n", jni_env, thread,
+ printf ("ClassLoadCB jni_env=%#x thread=%#x klass=%#x\n", jni_env, thread,
klass);
}
static void
ClassPrepareCB (jvmtiEnv *env, JNIEnv *jni_env, jthread thread, jclass klass)
{
- printf ("ClassPrepareCB jni_env=%p thread=%p klass=%p\n", jni_env,
+ printf ("ClassPrepareCB jni_env=%#x thread=%#x klass=%#x\n", jni_env,
thread, klass);
}
static void
VMStartCB (jvmtiEnv *env, JNIEnv *jni_env)
{
- printf ("VMStartCB jni_env=%p\n", jni_env);
+ printf ("VMStartCB jni_env=%#x\n", jni_env);
}
static void
@@ -117,9 +117,9 @@
jlocation location, jobject exception, jmethodID catch_method,
jlocation catch_location)
{
- printf ("ExceptionCB jni_env=%p thread=%p method=%p location=%#llx", jni_env,
- thread, method, (unsigned long long) location);
- printf (" exception=%p catch_method=%p catch_location=%#llx\n", exception,
+ printf ("ExceptionCB jni_env=%#x thread=%#x method=%#x location=%#llx",
+ jni_env, thread, method, (unsigned long long) location);
+ printf (" exception=%#x catch_method=%#x catch_location=%#llx\n", exception,
catch_method, (unsigned long long) catch_location);
}
@@ -127,16 +127,16 @@
ExceptionCatchCB (jvmtiEnv *env, JNIEnv *jni_env, jthread thread,
jmethodID method, jlocation location, jobject exception)
{
- printf ("ExceptionCatchCB jni_env=%p thread=%p method=%p location=%#llx",
+ printf ("ExceptionCatchCB jni_env=%#x thread=%#x method=%#x location=%#llx",
jni_env, thread, method, (unsigned long long) location);
- printf (" exception=%p\n", exception);
+ printf (" exception=%#x\n", exception);
}
static void
SingleStepCB (jvmtiEnv *env, JNIEnv *jni_env, jthread thread, jmethodID method,
jlocation location)
{
- printf ("SingleStepCB jni_env=%p thread=%p method=%p location=%#llx\n",
+ printf ("SingleStepCB jni_env=%#x thread=%#x method=%#x location=%#llx\n",
jni_env, thread, method, (unsigned long long) location);
}
@@ -144,7 +144,7 @@
FramePopCB (jvmtiEnv *env, JNIEnv *jni_env, jthread thread, jmethodID method,
jboolean was_popped_by_exception)
{
- printf ("FramePopCB jni_env=%p thread=%p method=%p", jni_env, thread,
+ printf ("FramePopCB jni_env=%#x thread=%#x method=%#x", jni_env, thread,
method);
printf (" was_pooped_by_exception=%d\n", (was_popped_by_exception ?
1 : 0));
@@ -154,7 +154,7 @@
BreakpointCB (jvmtiEnv *env, JNIEnv *jni_env, jthread thread, jmethodID method,
jlocation location)
{
- printf ("BreakpointCB jni_env=%p thread=%p method=%p location=%#llx\n",
+ printf ("BreakpointCB jni_env=%#x thread=%#x method=%#x location=%#llx\n",
jni_env, thread, method, (unsigned long long) location);
}
@@ -163,9 +163,10 @@
jmethodID method, jlocation location, jclass field_klass,
jobject object, jfieldID field)
{
- printf ("FieldAccessCB jni_env=%p thread=%p method=%p location=%#llx",
+ printf ("FieldAccessCB jni_env=%#x thread=%#x method=%#x location=%#llx",
jni_env, thread, method, (unsigned long long) location);
- printf (" field_klass=%p object=%p field=%p\n", field_klass, object, field);
+ printf (" field_klass=%#x object=%#x field=%#x\n", field_klass, object,
+ field);
}
static void
@@ -175,10 +176,11 @@
jvalue new_value)
{
- printf ("FieldModificationCB jni_env=%p thread=%p method=%p location=%#llx",
- jni_env, thread, method, (unsigned long long) location);
- printf (" field_klass=%p object=%p field=%p signature_type=%c", field_klass,
- object, field, signature_type);
+ printf ("FieldModificationCB jni_env=%#x thread=%#x method=%#x"
+ " location=%#llx", jni_env, thread, method,
+ (unsigned long long) location);
+ printf (" field_klass=%#x object=%#x field=%#x signature_type=%c",
+ field_klass, object, field, signature_type);
printf (" new_value=%d\n", (int) new_value.i);
}
@@ -186,7 +188,7 @@
MethodEntryCB (jvmtiEnv *env, JNIEnv *jni_env, jthread thread,
jmethodID method)
{
- printf ("MethodEntryCB jni_env=%p thread=%p method=%p\n", jni_env, thread,
+ printf ("MethodEntryCB jni_env=%#x thread=%#x method=%#x\n", jni_env, thread,
method);
}
@@ -195,7 +197,7 @@
jmethodID method, jboolean was_popped_by_exception,
jvalue return_value)
{
- printf ("MethodExitCB jni_env=%p thread=%p method=%p", jni_env, thread,
+ printf ("MethodExitCB jni_env=%#x thread=%#x method=%#x", jni_env, thread,
method);
printf (" was_popped_by_exception=%d return_value=%d\n",
(was_popped_by_exception) ? 1 : 0, (int) return_value.i);
@@ -205,9 +207,9 @@
NativeMethodBindCB (jvmtiEnv *env, JNIEnv *jni_env, jthread thread,
jmethodID method, void *address, void **new_address_ptr)
{
- printf ("NativeMethodBindCB jni_env=%p thread=%p method=%p", jni_env,
+ printf ("NativeMethodBindCB jni_env=%#x thread=%#x method=%#x", jni_env,
thread, method);
- printf (" address=%p new_address_ptr=%p\n", address, new_address_ptr);
+ printf (" address=%#x new_address_ptr=%#x\n", address, new_address_ptr);
}
static void
@@ -216,16 +218,16 @@
const jvmtiAddrLocationMap *map,
const void *compile_info)
{
- printf ("CompiledMethodLoadCB method=%p code_size=%#x code_addr=%p",
+ printf ("CompiledMethodLoadCB method=%#x code_size=%#x code_addr=%#x",
method, (unsigned) code_size, code_addr);
- printf (" map_length=%d map=%p compile_info=%p\n", (int) map_length, map,
+ printf (" map_length=%d map=%#x compile_info=%#x\n", (int) map_length, map,
compile_info);
}
static void
CompiledMethodUnloadCB (jvmtiEnv *env, jmethodID method, const void *code_addr)
{
- printf ("CompiledMethodUnloadCB method=%p code_addr=%p\n", method,
+ printf ("CompiledMethodUnloadCB method=%#x code_addr=%#x\n", method,
code_addr);
}
@@ -233,7 +235,7 @@
DynamicCodeGeneratedCB (jvmtiEnv *env, const char *name, const void *address,
jint length)
{
- printf ("DynamicCodeGeneratedCB name=%s address=%p length=%d\n", name,
+ printf ("DynamicCodeGeneratedCB name=%s address=%#x length=%d\n", name,
address, (int) length);
}
@@ -247,7 +249,7 @@
MonitorWaitCB (jvmtiEnv *env, JNIEnv *jni_env, jthread thread, jobject object,
jlong timeout)
{
- printf ("MonitorWaitCB jni_env=%p thread=%p object=%p timeout=%ld\n",
+ printf ("MonitorWaitCB jni_env=%#x thread=%#x object=%#x timeout=%ld\n",
jni_env, thread, object, (long) timeout);
}
@@ -255,7 +257,7 @@
MonitorWaitedCB (jvmtiEnv *env, JNIEnv *jni_env, jthread thread,
jobject object, jboolean timed_out)
{
- printf ("MonitorWaitedCB jni_env=%p thread=%p object=%p timed_out=%d\n",
+ printf ("MonitorWaitedCB jni_env=%#x thread=%#x object=%#x timed_out=%d\n",
jni_env, thread, object, (timed_out) ? 1 : 0);
}
@@ -263,7 +265,7 @@
MonitorContendedEnterCB (jvmtiEnv *env, JNIEnv *jni_env, jthread thread,
jobject object)
{
- printf ("MonitorContendedEnterCB jni_env=%p thread=%p object=%p\n",
+ printf ("MonitorContendedEnterCB jni_env=%#x thread=%#x object=%#x\n",
jni_env, thread, object);
}
@@ -271,7 +273,7 @@
MonitorContendedEnteredCB (jvmtiEnv *env, JNIEnv *jni_env, jthread thread,
jobject object)
{
- printf ("MonitorContendedEnteredCB jni_env=%p thread=%p object=%p\n",
+ printf ("MonitorContendedEnteredCB jni_env=%#x thread=%#x object=%#x\n",
jni_env, thread, object);
}
@@ -297,9 +299,9 @@
VMObjectAllocCB (jvmtiEnv *env, JNIEnv *jni_env, jthread thread,
jobject object, jclass object_klass, jlong size)
{
- printf ("VMObjectAllocCB jni_env=%p thread=%p object=%p", jni_env,
+ printf ("VMObjectAllocCB jni_env=%#x thread=%#x object=%#x", jni_env,
thread, object);
- printf (" object_klass=%p size=%ld\n", object_klass, (long) size);
+ printf (" object_klass=%#x size=%ld\n", object_klass, (long) size);
}
static void
@@ -504,6 +506,7 @@
(JNIEnv *) 0x1, (jmethodID) 0x3, (jlocation) 0x4,
(jclass) 0x5, (jobject) 0x6, (jfieldID) 0x7,
(int) '8', value);
+
_Jv_JVMTI_PostEvent (JVMTI_EVENT_METHOD_ENTRY, (jthread) 0x2,
(JNIEnv *) 0x1, (jmethodID) 0x3);
jvalue value2;