Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Seamless debugging between JDT and CDT

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 between JDT and CDT. Since April I am working to improve the "user experience" for developers who work on java project using JNI and native code.

I post already some months ago on the mailing list to present my project : http://dev.eclipse.org/mhonarc/lists/cdt-dev/msg09599.html

Since few days ago, a first version in available to download (0.0.1). Concretely this version add an entry in the Debug dialog, which allow you to launch a JNI debug session. After creating a new configuration with the correct setting, 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.

To use it please refer to posts on  : http://eclipse-soc-mariot.blogspot.com
More documentation will be soon 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

As it is the first version, 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).

I am sure you have already missed this functionnality in Java-Jni-C project, so I will appreciate any feedback to improve this plug-in in order to provide a feature really great for CDT.

Regards,

Mariot
--
Mariot Chauvin

Back to the top