Since my previous post (already tree weeks) I am working hard to have some results. The problem with the breakpoints automatically added is now resolved, and the support to step from C native code to Java code implemented. This support was not so easy to add as I first thinked. Before more explanation, to not lost courageous reader of this post, I think its necessary to remind the solution I choose to step from java code into C/C++ native code.
I decided to automaticaly add a breakpoint on the first line of each native method susceptible to be called by java code. When the user selects the debug action on a native method in Java code, the plug-in stores this action. Then the C/C++ debugger reaches the breakpoint. If the last action was stepping over or return, the plug-in does a step return otherwise it does nothing.
This approach was not a good option in my point of view to follow call of Java methods from C/C++ code due to the high number of java classes (and so methods) generally present in a project. More over breakpoints are not really required, the JDT debugger will stop itself when we reach java code. The problem was to know in which case we are : Did the current C/C++ function call a java method or is the C/C++ function already terminated ?
The solution I chose is to rely on the line number of the ending line of a native function. When it is reached , the plug-in supposes that we are no more stepping in native code. I don't know if it is the best solution. Another option is to rely on the line number of the java native call.