31 Oktober 2000 SEESCOASEESCOA STWW - Programma Work Package 5 – Debugging Task Generic Debug Interface K. De Bosschere e.a.
SEESCOASEESCOA Goals Define a debug-interface for components Trace behaviour of components Limit trace information Checkpointing and replay of components Must always be applicable to the system, not just during development
SEESCOASEESCOA Types of Debugging Many types of debugging are possible correctness debugging: where is the bug? performance debugging: why is it so slow? (or fast?) 'exploratory' debugging: what does it do? How does it do it? ... Many types of programs to debug own source or third party libraries? IO intensive or CPU bound? text interface or GUI? ... Many types of hardware to debug on/with large workstations or small embedded systems network access, GUI or text ...
SEESCOASEESCOA Requirements Many types of information are required: tracing of events: method calls accesses to objects I/O events from the component system timing: methods I/O resources: heap stack locks
SEESCOASEESCOA Problems: Conclusions So, the approach to debugging is linked to: the type of debugging the type of application being debugged the type of hardware available Requirements are varied and sometimes consume large amounts of resources We need a flexible debugging solution: all types of debugging must be possible it must be possible to select only the debugging mechanisms we need We need a flexible debugging solution: all types of debugging must be possible it must be possible to select only the debugging mechanisms we need
SEESCOASEESCOA Embedded System Standard embedded JVM configuration Normal operation of embedded system + JVM JVM Input/Output Class
SEESCOASEESCOA Debugging Configuration on Board Specialised instrumentation of class files On the embedded system Embedded System JVM Input/Output Class Debug JVM Debug JVM
SEESCOASEESCOA Instrumentor Debugging Configuration on Two Systems Specialised instrumentation of class files Debugger is different system: minimal interference while maintaining high flexibility i.e. a component Embedded System JVM Input/Output Class Debug JVM Debug JVM Cache
SEESCOASEESCOA Potential Applications Simple: Print out activation tree Time method calls ... More complex: Patch erroneous code Analyse memory allocation Trace arguments Execution replay of non-deterministic multi-threaded applications Tracing of some or all IO ...
SEESCOASEESCOA Developping Debugger module: Record/Replay Multiple threads Interleaving produces different results Non-deterministic A=9 A=5 +Record all non-deterministic behaviour to trace and replay with this trace
SEESCOASEESCOA Future Perfect the instrumentation layer Implement a number of modules on top of this layer with useful functionality Integrate with the component communication system Further development of record/replay module
SEESCOASEESCOA Conclusions Debugging is a very specific activity for which the requirements can vary greatly Embedded systems have only a limited amount of resources We propose to dynamically alter the bytecode to tailor the debugging facilities to the debug problem and the available hardware We are currently developing debug facilities on top of this module