Difference between revisions of "Support seamless debugging between JDT and CDT"
|Line 106:||Line 106:|
* What is the current version of the
* What is the current version of the ?
Revision as of 07:33, 7 August 2007
Student: Mariot Chauvin (IRC: moksha_anderson)
Mentors: Philippe Ombredanne (IRC: pombreda), Francois Granade (IRC: farialima)
This project is part of the Google Summer of Code 2007
- 1 Introduction
- 2 Goals of the project
- 3 Work done
- 4 Roadmap
- 5 Documentation
- 6 FAQ
Eclipse is an extensible framework to build modular applications, which relies on OSGi component architecture. Originally developed to provide an IDE extensible in terms of functionalities and supported languages with plugins, Eclipse can now be used as a Rich Client Platform (RCP). The success of the Java Development Toolkit (JDT) plugin has lead to the development of numerous plugins. For instance the C/C++ Development Toolkit (CDT) plugin allows developers to use it as IDE for project in C or C++ language. The use of Eclipse as a generic IDE is possible due to the notion of perspective (a perspective corresponds to a certain disposition of the graphical elements) which adapts the user interface to the kind of project.
Java Native Interface (JNI) is a programming interface to call native methods or to embed java virtual machine in native applications. JNI is often used to interact with existing native application, to add platform-specific functions, or to improve time-performance (by supposing native methods faster than java code).
Currently, when users work on a java project using JNI and native code, they have to switch between perspective, which is not practical. Another point to improve is the debugging of this kind of project, by allowing developers to follow native method calls into native code and go back.
Goals of the project
- Create new or 'mixed' perspectives to manage project using C/C++ and Java
- Add the possibility to follow native methods calls into native code
First step : documentation of existing work
- Approaches for debugging Java and native code in Eclipse and new debug interface proposal (XDI)
- Debugging Java and C/C++ code
Second step : prototype
- work on a prototype which
- launch a Java Debugger
- attach a C debugger to the JVM
- allow you to debug C/C++ code and Java code debugging in the same view
- code is available on svn
- svn co https://eclipse-incub.svn.sourceforge.net/svnroot/eclipse-incub/jni_seamless_debugging jni_seamless_debugging
- until begin of July :
- deal with the error cases.
- work on synchronization between CDI and JDI
- until mid of August :
- proceed with the work on synchronization between CDI and JDI
- UI improvement (perspectives ?)
- until end :
- integration and tests
How install the plugin ?
The most simple is to use the update manager of Eclipse. Simply add this site as "new remote site" :
The sources are included in the Jar, but you can get them with subversion with the following command :
How use the plug-in ?
You should have some java code which uses JNI and the native code associated. The plug-in should be installed.
Set a breakpoint in the Java code after the code which loads the native library.
Open the debug dialog and create a new configuration of "Java JNI Application" kind.
Set the correct settings for each tab.
- JNI tab
- Nothing for the moment
- C/C++ project tab
- Set the C/C++ project and specify the javaw path as C/C++ application.
- Java project tab
- Set the Java project and the main class.
- Environment tab
- On linux machines you could have to add the current directory to the library path environment variable.
The debug perspective will be launched, with the 2 debuggers. Ready to debug !
How report a bug/ask for an enhancement ?
On the eclipse bugzilla there is a "org.eclipse.soc.jni" component for the "SOC" product in the "Technology" category. Please include the version of the plug-in and the max infos you can obtain.
- What is the current version of the plug-in ?
- What are the known bugs of the plug-in ?