-
I'm trying to create a JVMTI Agent that uses ASM library to modify a class bytecode. I managed to create a simple agent extending JvmtiAgentBase that receives the normal callbacks. I was also able to install a hook in ClassFileLoadHook that is working. My problem starts with the mapping of arguments. The native call is:
How is this mapped to Java types?. I saw a similar example with:
That is mapped to:
My problem in this case is, how do I interact with thread, I tried using JNIObjectHandles class but I always get invalid handle errors Any help is really appreciated |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I was able to receive the callback property with this signature: public static void onClassFileLoadHook(final JvmtiEnv jvmti, final JNIEnvironment jni, final JNIObjectHandle clazz,
final JNIObjectHandle loader,
final CCharPointer name, final Object protectionDomain, final int dataLen, final CCharPointer data,
final CIntPointer newDataLength, final CCharPointerPointer newData) |
Beta Was this translation helpful? Give feedback.
I was able to receive the callback property with this signature: