Program Counter values of an executing Java Program [duplicate]
-
29-06-2021 - |
Domanda
Possible Duplicate:
Program Counter register values for a Java program
Is it possible to obtain the program counter (PC) register values of a running Java application?
Soluzione
It depends on how you want to go about it. For example, if via the JVM Tool Interface, there is an exposed function named GetFrameLocation
. This should be equivalent to the program counter.
jvmtiEnv *penv;
...
jmethodID cur_method;
jlocation cur_loc;
(*penv)->GetFrameLocation(0, 0, &cur_method, &cur_loc);
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow