Idea on system-level debugging solution

Johannes Schlatow schlatow at ...238...
Fri Mar 18 16:10:14 CET 2016


Hi,

as I'm recently developing more sophisticated applications with Genode, I had an idea about how to augment the framework with some system-level debugging functionality that I'd like to share and discuss here:

First of all, the idea is motivated by the observation that most Genode components are of rather low complexity by themselves. Hence, debugging not only involves the code of a single component, but the operation of the component in context of its interaction with other components. I have therefore been thinking about a generic mechanism to instrument multiple Genode components in a way that allows halting the operation of a component on an incoming/outgoing signal or RPC, and printing the status of certain objects of that component.

The major concept I imagine is a hook-based approach that can be used to halt a particular component on demand. The demand would be indicated by a debug ROM that is provided for each component. Once the component is halted, it can react to changes of the debug ROM and be instructed to print debug information or continue the operation for instance. In addition, we would have a debug component as a central controller and user interface. Based on the user input, the debug controller populates the debug ROMs that are evaluated by the debug logic of the component(s) under test. With this mechanism, we could eventually set "breakpoints" at the hooks of the debugged components and interactively (or automatically) print the debug information of the components.

The debug logic can probably be implemented as a debug library that implements the hooks. A component is being instrumented by adding calls to the library functions and registering callback functions that print the debug information. Debugging is disabled by linking against a dummy library. Maybe this could also be implemented as a trace policy.

Disclaimer: I currently do not have the resources to implement such a feature, hence anyone keen on this idea is kindly invited to do so ;-)




More information about the users mailing list