Abstract Modelica models often contain functions with algorithmic code. The fraction of algorithmic code is increasing 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. Thus, debugging of algorithmic Modelica code is becoming increasingly relevant. Our earlier work in debuggers for the algorithmic subset of Modelica used trace-based techniques which are 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.
[1]
Adrian Pop,et al.
OpenModelica Development Environment with Eclipse Integration for Browsing, Modeling, and Debugging
,
2006
.
[2]
Andreas Zeller,et al.
Why Programs Fail: A Guide to Systematic Debugging
,
2005
.
[3]
Martin Sjölund,et al.
Bootstrapping a Modelica Compiler aiming at Modelica 4
,
2011
.
[4]
Peter Fritzson,et al.
Semi-automatic fault localization and behavior verification for physical system simulation models
,
2003,
18th IEEE International Conference on Automated Software Engineering, 2003. Proceedings..
[5]
Peter Bunus,et al.
Debugging techniques for equation-based languages
,
2004
.
[6]
Peter A. Fritzson,et al.
Principles of object-oriented modeling and simulation with Modelica 2.1
,
2004
.
[7]
Martin Sjölund,et al.
Debugging Symbolic Transformations in Equation Systems
,
2011,
EOOLT.
[8]
Adrian Pop,et al.
Towards Run-time Debugging of Equation-based Object-oriented Languages
,
2007
.
[9]
Adrian Pop,et al.
The OpenModelica Modeling, Simulation, and Software Development Environment
,
2005
.
[10]
Adrian Pop,et al.
A Portable Debugger for Algorithmic Modelica Code
,
2005
.