Skip to content

Implementing a Debugger

florianf edited this page Sep 3, 2016 · 17 revisions

##Status and Plans Currently the debugger is in planning stage. We want to use the ShadowFrames implementation for debugging purposes.

C-Function: https://github.com/MobiDevelop/robovm/blob/master/compiler/vm/core/src/shadowframes.c Java Compiler Plugin: https://github.com/MobiDevelop/robovm/blob/master/compiler/compiler/src/main/java/org/robovm/compiler/plugin/shadowframe/ShadowFramePlugin.java

The plan is to extend the ShadowFramePlugin to pass information about stack variables to the runtime, and store it in the ShadowFrame struct.

RoboVM comes with a Soft-Debugger which is responsible for debugging and breaking the execution of an app. The Soft-Debugger is implemented in hooks.c https://github.com/MobiDevelop/robovm/blob/master/compiler/vm/core/src/hooks.c

hooks.c implements it's own debugging protocol, on top of which a JDWP debugger has to be implemented.

A simple server for the debugging protocol can be found at https://github.com/florianf/robovm/commit/1b23a00587aee1fe04a21e21296125dd9b5f15aa