[Java-gnome-developer] Debugging Java/JNI applications
Brought to you by:
afcowie
From: Mariot C. <mar...@gm...> - 2007-08-22 13:55:25
|
Hi all, I am a student who takes part this year to the google summer of code for the Eclipse project (My mentors are Philippe Ombredanne and Francois Granade). The purpose of my project is to provide seamless debugging of Java/Jni applications in Eclipse. Since April I am working to improve the "user experience" for developers who work on java projects using JNI and native code. A version 0.0.2 is available to download. Concretely this version adds an entry in the Debug dialog, which allow you to launch a JNI debug session. After creating a new configuration with the correct settings, if you launch it, the JVM will be launched and gdb attached to its pid and the two targets will be displayed. Then you can follow the call of native functions into native code. For instance, regarding this Java line : new JNITest().native_doubleInt(42); If you choose to step into, then you will go into native code : JNIEXPORT jint JNICALL Java_JNITest_native_1doubleInt (JNIEnv *pEnv, jobject obj, jint value) { If you choose to step over, or step return, you will simply go on the next Java code line. The same behavior is available to follow java call from native code. For instance regarding this C line : (*pEnv)->CallVoidMethod(pEnv,obj,mid); If you choose to step into, then you will go into the java method. Otherwise if you choose to step over, or step return, you will simply go on the next native code line. More technical infos can be found on my blog : http://eclipse-soc-mariot.blogspot.com Some structured documentation is available on the following wiki page : http://wiki.eclipse.org/index.php/Support_seamless_debugging _between_JDT_and_CDT To install it an update site is available : http://eclipse-incub.svn.sourceforge.net/viewvc/*checkout*/eclipse-incub/jni_seamless_debugging/update-site/site.xml I that you use JNI, so I am think this functionnality could help us in your work. I will appreciate any feedback/comments that will help me to improve this plug-in. You will surely find a lot of bugs/problems, please report them on the eclipse bugzilla. There is a " org.eclipse.soc.jni" component in SOC which is in Technology category (please add me in CC). Regards, Mariot -- Mariot Chauvin |