Source-level Debugging for Multiple Languages With Modest Programming Effort

Sukyoung Ryu and Norman Ramsey

We present techniques that enable source-level debugging for multiple languages at the cost of only modest programming effort. The key idea is to avoid letting debugging requirements constrain the internal structure of the compiler. Constraints are minimized primarily by hiding the source-language type system and target-machine representations from the debugger. This approach enables us to support a new language and compiler while reusing existing elements: a multi-language, multi-platform debugger; the compiler's implementation of source-language types and expressions; information already present in the compiler's private data structures; and our compile-time support library, which helps the compiler meet its obligations to the debugger without exposing language-dependent details. We evaluate our approach using two case studies: the production compiler lcc and an instructional compiler for MiniJava.

Full paper

A short version of this paper (16 pages) appears in the 14th International Conference on Compiler Construction. We prefer this full, 21-page version, which is available as US Letter PostScript (178K), US Letter PDF (126K), and US Letter TeX DVI (91K).