Abstract
This paper addresses the problem of implementing portable debuggers for compiled or translator-based language implementations. We describe a general strategy based on viewing application execution as event generation, and debugging as event processing. The implementation approach relies on instrumentation of the compiler's intermediate code. We give examples of portable and efficient implementations of several common debugging primitives, and also show how profiling support can be added using similar ideas.
Visiting researcher, on leave from Linköping University, Sweden. This work was supported by a grant from the Swedish Research Council for Engineering Sciences, TFR.
Chapter PDF
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
ANSI X3.159-1989. Programming Language — C. American National Standards Institute, 1989.
Andrew W. Appel, Bruce F. Duba, and David B. MacQueen. Profiling in the presence of optimization and garbage collection. Technical Report CS-TR-197-88, Princeton University, November 1988.
Mireille Ducassé. Opium: An extendable trace analyser for Prolog. The Journal of Logic Programming, 1998. To appear in the special issue on Synthesis, Transformation and Analysis of Logic Programs, A. Bossi and Y. Deville (eds).
David Gudeman. Representing type information in dynamically typed languages. Technical Report TR 93-27, University of Arizona, Department of Computer Science, October 1993.
David R. Hanson and Mukund Raghavachari. A machine-independent debugger. Software — Practice and Experience, 26(11):1277–1299, November 1996.
Jurgen Heymann. A 100% portable inline-debugger. ACM SIGPLAN Notices, 28(9):39–46, September 1993.
Robert Hood. The p2d2 project: Building a portable distributed debugger. In SPDT '96: SIGMETRICS Symposium on Parallel and Distributed Tools. ACM, May 1996.
Richard W. M. Jones and Paul H. J. Kelly. Backwards-compatible bounds checking for arrays and pointers in C programs. In Third International Workshop on Automated Debugging, AADEBUG'97, Linköping, Sweden, May 26–27 1997. http://www-ala.doc.ic.ac.uk/phjk/.
Pertti Kellomdki. Psd — a portable Scheme debugger. Lisp Pointers, VI(1), 1993.
David Keppel. Fast data breakpoints. Technical Report UWCSE TR-93-04-06, University of Washington, Department of Computer Science and Engineering, 1993.
Mikael Pettersson. Compiling Natural Semantics. PhD thesis, Department of Computer and Information Science, Linköping University, December 1995.
Norman Ramsey and David R. Hanson. A retargetable debugger. In Proceedings of the ACM SIGPLAN '92 Conference on Programming Language Design and Implementation, PLDI'92, pages 22–31. ACM Press, 1992.
John C. Reynolds. Definitional interpreters for higher-order programming languages. In Proceedings of the ACM Annual Conference, pages 717–740, 1972.
Andrew Tolmach and Andrew W. Appel. A debugger for Standard ML. Journal of Functional Programming, 5(2):155–200, April 1995.
Andrew P. Tolmach. Debugging Standard ML. PhD thesis, Princeton University, October 1992. Technical Report CS-TR-378-92.
Robert Wahbe. Efficient data breakpoints. In Fifth International Conference on Architectural Support for Programming Languages and Operating Systems, ASPLOS'92, pages 200–212. ACM, 1992.
Robert Wahbe, Steven Lucco, and Susan L. Graham. Practical data breakpoints: Design and implementation. In Proceedings of the ACM SIGPLAN '93 Conference on Programming Language Design and Implementation, PLDI'93, pages 1–12. ACM Press, 1993.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1998 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Pettersson, M. (1998). Portable debugging and profiling. In: Koskimies, K. (eds) Compiler Construction. CC 1998. Lecture Notes in Computer Science, vol 1383. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0026438
Download citation
DOI: https://doi.org/10.1007/BFb0026438
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-64304-3
Online ISBN: 978-3-540-69724-4
eBook Packages: Springer Book Archive