Is there a way to check the contents of the stack (both in terms of values ββand type of values, and from the current point of instructions) programmatically on the JVM (even if it depends on the provider)?
For example, I would like to check the current activation frame and extract the name of the method to which it belongs, as well as the stack variables. In addition, I would like to be able to iterate the activation frames in this way.
Is it possible? At first glance, the JVMTI seems to resolve this, but is intended to be used as an embedded interface. used to implement a Java library that can do these things, apparently - but it seems to be a bit outdated. I was wondering if there is a solution integrated into the JVM api or another cross-platform JVM library that allows this.
source share