- Step 0 : the user sets its breakpoints in Java Code and in C code
- Step 1 : we launch app for remote java code debugging
- Step 2 : we attach gdb to the application's Java VM with process ID and resume ("release" the JVM) and set " C user breakpoints"
- Step 3 : we set "default breakpoints" in C/C++ code on each native method called by java code
- Step 4: we attach jdb
- Step 5: ready to go !
- Step 6 : Java breakpoint is hit first. The user steps over until the native call :
- he decides to step over : The default breakpoint is hit, but CDI sends a "continue" to the debugger
To proof that is a possible way, I currently a writing a prototype plugin, based on JDT and CDT plugins, which (at this time) uses the following extension :
- org.eclipse.debug.core.lauchConfigurationTypes
- org.eclipse.debug.ui.lauchConfigurationTabGroups
- org.eclipse.debug.ui.lauchConfigurationTypeImages
The main difficulty seems to be the retrieval of the JVM process ID, but I got (Thanks to Mattew) this useful link http://net3x.blogspot.com/2007
Feel free to comment this approach.