Efficient Debugging of Large Algorithmic Modelica Applications
2012 (English)Conference paper (Refereed)
Modelica models often contain functions with algorithmic code. The fraction of algorithmiccode is increasing in Modelica models since Modelica, in addition to equation-based modeling, is also used for embedded system control code and symbolic model transformations in compilers using the MetaModelica language extension. For these reasons, debugging of algorithmic Modelica code is becoming increasingly relevant.
Our earlier work in debuggers for the algorithmic subset of Modelica used trace-based techniques. These have the advantages of being very portable, but turned out to have too much overhead for very large applications.
The new debugger is the first Modelica debugger that can operate without trace information. Instead it communicates with a low-level C-language symbolic debugger, the Gnu debugger GDB, to directly extract information from a running executable, set and remove breakpoints, etc. This is made possible by the new bootstrapped OpenModelica compiler which keeps track of a detailed mapping from the high level Modelica code down to the generated C code compiled to machine code.
The debugger is operational, supports browsing of both standard Modelica data structures and tree/list data structures, and operates efficiently on large applications such as the OpenModelica compiler with more than 100 000 lines of code.
Place, publisher, year, edition, pages
Modelica, Run-time Debugging, Modeling and Simulation, Algorithmic code, Eclipse
Electrical Engineering, Electronic Engineering, Information Engineering
IdentifiersURN: urn:nbn:se:liu:diva-110304OAI: oai:DiVA.org:liu-110304DiVA: diva2:744016
7th Vienna International Conference on Mathematical Modelling (MATHMOD 2012), Vienna, Austria, February 15-17, 2012