1

I wrote exception handler agent using JVMTI. I am able to capture the StackFrame information at that point in time

jvmti_env -> GetLocalVariableTable(frames[i].method, &entry_count_ptr, &table_ptr_test);

And able to fetch value for primitive types but in the case of Objects as in the below case

jvmti_env -> GetLocalObject(thread, 0, table_ptr_test[j].slot, &value_ptr_object);
  1. How can I traverse the information, since the object type can be any (List, HashMap, or even custom class)?
  2. Any other way to send the captured object information to another JVM?
  • 1
    You can not simply transfer arbitrary objects to another JVM. For a starter, the other JVM would need to have the particular class. Then, the class in the other JVM must be a version similar enough that initializing an instance of it with the information found in the other JVM makes sense for it. Then, the information contained in the object itself may be an arbitrarily complex object graph whereas for each object, the same just mentioned restrictions apply. – Holger Jun 16 '21 at 07:25

0 Answers0