Dear Sirs,
We are implementing some of the event callbacks of JVMTI ( http://java.sun.com/j2se/1.5.0/docs/guide/jvmti/ ) in the Dalvik VM. However, we are having trouble in event Method_Entry and Method_Exit.
In our current implementation, we can only intercept the Method_Entry event of the some system initialization methods, including java.lang.reflection.Constructor.init(),java.lang.reflect.Method.init(),android.graphics.Button.init()... java.lang.ClassLoader.loadClass() android.os.Binder.execTransact() android.graphics.Canvas.finalize(),android.os.Parcel.finalize(),.... ... All the methods written in Java applications are missing.
Currently, we have inserted "fprintf()" in the following places: stack.c: dvmCallMethod() stack.c: dvmCallMethodV() stack.c: dvmCallMethodA() stack.c: dvmInvokeMethod() Interp.c: dvmInterpret() Mterp.c: dvmMterpStd() When these places of DVM are executed, we will print a message in our log file. However, only the system initialization functions has triggered our println() code. In other words, it looks like that the execution of application methods does not go through the above places of DVM. We don't know which part of DVM is responsible for method execution of applications. Can anyone give us a clue?
Thank you very much!
Regards, Spike, National Tsing Hua University, Taiwan