First of all, I find how to have the C/C++ file editor. I use org.eclipse.cdt.debug.core.sourcePathComputer instead of my JMLSourcePathComputer and it works fine ! (I can't explain why it does not work with my JMLSourcePathComputer, if someone knows I am interested)
Then I automated the resume on the JVM thread. You does need anymore to do it manually (the seventh step in the previous post).
Then I implemented the automatic breakpoints addition on C/C++ native functions. To do that I rely on the CDT possibilies and the JNICALL magic keyword. You does need anymore to do it manually (the fourth step in the previous post )
And finally I am working now on the debug events, in order that when the user choose to step over a Java native call, the C breakpoints are automatically resumed. It works well for the moment from Java to C/C++ native code, but I still have to work for the other direction (C/C++ code which calls Java methods).
The next step will be to provide some JUnit tests
I hope the eclipse community will found interest in this work, and help me to improve and test this plug-in.
I am sure this functionnality will be helpfull for some people, so if you have some free hours, test it, read/review the code, or comment this post.
Thanks !
other change since the last time
- java version min: 1.4
- bugzilla : there is org.eclipse.soc.jni component in eclipse bugzilla
problems known
- sometimes gdb does not success to attach to the pid. I don't know why. Not regular and seems to be a gdb bug or limitation.
- the automatic breakpoints addition does not check if previous breakpoints were added at the same line. Will be resolved soon.
4 comments:
Who are you working with over at the CDT camp?
Where do you think this project should live... within CDT?
Awesome! I'm very much looking forward to trying this. I hope this can be used to take some of the pain out of JNI.
Hi, just came across your project. I had a similar idea, with single-stack debugging of mixed-language programs. In my case, I thought it would be useful to do Java-PL/SQL calls. I did a proof of concept at http://db-db.sourceforge.net; just thought it may get somewhere...
Chris :
I am not working directly with someone from CDT camp, but I follow their work on CDT and I am attentive to any advice they can give me. I think this project should incorporate people from CDT and JDT. I don't think it should live directly within CDT.
Andrew :
Thanks ! I will provide very soon a zip version to test it more easilly. Nice if you can try it and test it :)
Debedb :
I saw your interesting work. I read very quickly some little piece of your code, but it would be nice if you can me give more technical infos how you made it. Feel free to contact me.
Post a Comment