Hello people
During the last months I am constantly thinking about the lack of debugging support of avian.
I know it is a huge effort to implement it, so I was searching around to see what could be done.
Today I think I found a viable solution.
MobiVM/RoboVM has implemented a solution like this and I think it is something that could be reused.
After digging around I found that they had this idea:
First, they have created a java-based JDWP client/server. All the logic of the protocol is there. Just need to launch it as a regular application, and this will connect (a) to the native code and (b) listen to JDWP connections. Its job is to receive the JDWP commands, process them and forward to the native code.
And secondly, a thin native library which listens to the java client/server and copies to it "low level" memory dumps. The native methods are very basic and include hooks when a new thread starts/stop, to allocate/free memory and things like that.
To my eyes, this code is portable. The only non-portable part is how a "java" data structure is stored natively. I am talking about the native-coupled things like "String", "Class", "Field", "Method", "Proxy/BridgedMethod", "Thread" and so on.
I don't know how difficult porting would be, but I am really willing to do this. The problem is that I am not at all proficient with avian implementation (but willing to learn) and I am sure that I can't do it alone.
What are your thoughts on it?