Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
article

Stack virtualization for source level debugging

Published: 01 June 2007 Publication History

Abstract

The compilation of high-level languages to general-purpose execution platforms poses some challenges when it comes to debugging. Typically, abstractions that are not natively supported by the execution platform must be emulated with intermediate data structures and function calls. Unfortunately, the details of the emulation are visible in the execution stack, and this unwanted information greatly reduces the effectiveness of debuggers. This paper presents a general method for constructing a virtual view of the stack, in order to mask intermediate function calls that were generated to emulate high-level abstractions, or even to recover logical frame information that was lost during the compilation process. In particular, virtual views enable the visualization of two disjoint code representations (e.g. native code and interpreted code) as a single unified stack. We illustrate this method by showing how to handle the compilation of Bigloo, a dialect of the Scheme programming language. Copyright © 2006 John Wiley & Sons, Ltd.

References

[1]
1. Lindholm T, Yellin F. The Java Virtual Machine Specification. Addison-Wesley: Reading, MA, 1997.
[2]
2. Gough JJ, Gough KJ. Compiling for the .NET Common Language Runtime. Prentice-Hall: Upper Saddle River, NJ, 2001.
[3]
3. Warkus M. The Official GNOME 2 Developer's Guide. No Starch Press: Reading, MA, 2004.
[4]
4. Baker HG. CONS should not CONS its arguments, part II: Cheney on the M.T.A. ACM SIGPLAN Notices 1995; 30(9):17-20.
[5]
5. Clinger WD. Proper tail recursion and space efficiency. Proceedings of the ACM SIGPLAN 1998 Conference on Programming Language Design and Implementation, Montreal, Quebec, Canada, 1998. ACM Press: New York, 1998; 174-185.
[6]
6. Schinz M, Odersky M. Tail call elimination on the Java Virtual Machine. Proceedings of the ACM SIGPLAN BABEL'01 Workshop on Multi-Language Infrastructure and Interoperability (Electronic Notes in Theoretical Computer Science, vol. 59). Elsevier: Amsterdam, 2001; 155-168.
[7]
7. Ciabrini D. Bugloo: A source level debugger for Scheme programs compiled into JVM bytecode. Proceedings of the 3rd International Lisp Conference, New York, 2003. Available at: http://www-sop.inria.fr/mimosa/fp/Bugloo/doc/cia03.pdf.
[8]
8. Serrano M, Weis P. Bigloo: A portable and optimizing compiler for strict functional languages. Proceedings of the 2nd Static Analysis Symposium (Lecture Notes in Computer Science, vol. 983). Springer: Berlin, 1995; 366-381.
[9]
9. Kelsey R, Clinger W, Rees J (eds). Revised5 report on the algorithmic language scheme. ACM SIGPLAN Notices 1998; 33(9):26-76.
[10]
10. IEEE. Information Technology-Portable Operating System Interface (POSIX®)--Part 2: Shell and Utilities, 9945-2, 1993 IEEE/ANSI Std 1003.2-1992 and IEEE/ANSI 1003.2a- 1992.
[11]
11. Serrano M, Serpette B. Compiling scheme to JVM bytecode: A performance study. Proceedings of the 7th ACM SIGPLAN International Conference on Functional Programming, Pittsburgh, PA, October 2002. ACM Press: New York, 2002; 259-270.
[12]
12. Bobrow DG, DeMichiel LG, Gabriel RP, Keene SE, Kiczales G, Moon DA. Common lisp object system specification. ACM SIGPLAN Notices 1988; 23.
[13]
13. Mozilla Foundation. Rhino: Javascript for Java, 2004. http://www.mozilla.org/rhino {7 December 2004}.
[14]
14. ECMA. ECMA-262: ECMAScript Language Specification (3rd edn). ECMA: Geneva, Switzerland, 1999.
[15]
15. Hugunin J. Python and Java: The best of both worlds. Proceedings of the 6th International Python Conference, San Jose. CA, October 1997. CNRI: Reston, VA, 1997; 11-20.
[16]
16. Rossum GV. Python Reference Manual: February 19, 1999, Release 1.5.2. iUniverse, Incorporated, 2000.
[17]
17. Stallman R, Pesch RH. Debugging with GDB: The GNU Source-level Debugger. Free Software Foundation, 4.09 for GDB version 4.9 edition, 1993.
[18]
18. Thompson K. Regular expression search algorithm. Communications of the ACM 1968; 11(6):419-422.
[19]
19. Serrano M, Gallesio E. Skribe: A functional authoring language. Journal of Functional Programming 2005; 15:751-770.
[20]
20. Serrano M. Bee: An integrated development environment for the scheme programming language. Journal of Functional Programming 2000; 10(4):353-395.
[21]
21. Howard TG. Smalltalk Developer's Guide to VisualWorks. Cambridge University Press: Cambridge, 1995.
[22]
22. Fiedler N. JSWAT, the Java debugger, 1999. http://www.bluemarsh.com/java/jswat/index.html {18 February 2006}.
[23]
23. Kiczales G, Hilsdale E, Hugunin J, Kersten M, Palm J, Griswold WG. An overview of AspectJ. Proceedings of the 15th European Conference on Object-oriented Programming, June 2001. Springer: Berlin, 2001; 327-353.
[24]
24. Field R. JSR 45: Debugging support for other languages. Technical Report, Sun Microsystems Inc., November 2003. Available at: http://www.jcp.org/en/jsr/detail?id=45 {24 November 2003}.
[25]
25. Lidin S. Inside Microsoft.NET IL Assembler. Microsoft Press: Redmond, WA, 2002.
[26]
26. Zellweger PT. An interactive high-level debugger for control-flow optimized programs. Proceedings of the Symposium on High-level Debugging (SIGSOFT'83). ACM Press: New York, 1983; 159-172.
[27]
27. Zellweger PT. Interactive Source-Level Debugging of Optimized Programs. PhD Thesis, University of California, Xerox Palo Alto Research Center, May 1984.
[28]
28. Coutant DS, Meloy S, Ruscetta M. DOC: A practical approach to source-level debugging of globally optimized code. ACM SIGPLAN Notices 1988; 23(7):125-134.
[29]
29. Ungar D, Smith RB. Self: The power of simplicity. Conference Proceedings on Object-Oriented Programming Systems, Languages and Applications (OOPSLA'87), Orlando, FL, 1987. ACM Press: New York, 1987; 227-242.
[30]
30. Hözle U, Chambers C, Ungar D. Debugging optimized code with dynamic deoptimization. Proceedings of the ACM SIGPLAN 1992 Conference on Programming Language Design and Implementation, San Francisco, CA, 1992. ACM Press: New York, 1992; 32-43.
[31]
31. Chambers C, Ungar D, Lee E. An efficient implementation of SELF, a dynamically-typed object-oriented language based on prototypes. Conference Proceedings on Object-Oriented Programming Systems, Languages and Applications (OOPSLA'89), New Orleans, LA, 1989. ACM Press: New York, 1989; 49-70.
[32]
32. Suganuma T, Ogasawara T, Takeuchi M, Yasue T, Kawahito M, Ishizaki K, Komatsu H, Nakatani T. Overview of the IBM Java Just-in-Time compiler. IBM System Journal 2000; 39(1):175-193.
[33]
33. Arnold M, Fink S, Grove D, Hind M, Sweeney PF. Adaptive optimization in the Jalapeño JVM. ACM SIGPLAN Notices 2000; 35(10):47-65.
[34]
34. http://www.sop.inria.fr/mimosa/fp/Bugloo {11 July 2006}.

Recommendations

Comments

Information & Contributors

Information

Published In

cover image Software
Software  Volume 37, Issue 7
June 2007
104 pages
ISSN:0038-0644
EISSN:1097-024X
Issue’s Table of Contents

Publisher

John Wiley & Sons, Inc.

United States

Publication History

Published: 01 June 2007

Author Tags

  1. compilation
  2. debugging
  3. high-level languages
  4. stack inspection

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 0
    Total Downloads
  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 27 Jan 2025

Other Metrics

Citations

View Options

View options

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media