Abstract
Programmers build large-scale systems with multiple languages to reuse legacy code and leverage languages best suited to their problems. For instance, the same program may use Java for ease-of-programming and C to interface with the operating system. These programs pose significant debugging challenges, because programmers need to understand and control code across languages, which may execute in different environments. Unfortunately, traditional multilingual debuggers require a single execution environment.
This paper presents a novel composition approach to building portable mixed-environment debuggers, in which an intermediate agent interposes on language transitions, controlling and reusing single-environment debuggers. We implement debugger composition in Blink, a debugger for Java, C, and the Jeannie programming language. We show that Blink is (1) relatively simple: it requires modest amounts of new code; (2) portable: it supports multiple Java Virtual Machines, C compilers, operating systems, and component debuggers; and (3) powerful: composition eases debugging, while supporting new mixed-language expression evaluation and Java Native Interface (JNI) bug diagnostics. In real-world case studies, we show that language-interface errors require single-environment debuggers to restart execution multiple times, whereas Blink directly diagnoses them with one execution. We also describe extensions for other mixed-environments to show debugger composition will generalize.
- C. Bailey. Java technology, IBM style: Introduction to the IBM developer kit. http://www.ibm.com/developerworks/java/library/j-ibmjava1.html, May 2006.Google Scholar
- D. M. Beazley. SWIG: An easy to use tool for integrating scripting languages with C and C++. In USENIX Tcl/Tk Workshop (TCLTK), 1996. Google Scholar
Digital Library
- S. M. Blackburn, R. Garner, C. Hoffmann, A. M. Khang, K. S. McKinley, R. Bentzur, A. Diwan, D. Feinberg, D. Frampton, S. Z. Guyer, M. Hirzel, A. Hosking, M. Jump, H. Lee, J. E. B. Moss, B. Moss, A. Phansalkar, D. Stefanović, T. VanDrunen, D. von Dincklage, and B. Wiedermann. The DaCapo benchmarks: Java benchmarking development and analysis. In Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), 2006. Google Scholar
Digital Library
- P. Bothner. Compiling Java with GCJ. http://www.linuxjournal.com/article/4860, Jan. 2003. Google Scholar
Digital Library
- Free Standards Group. DWARF 3 debugging information format. http://www.dwarfstd.org/Dwarf3.pdf, Dec. 2005.Google Scholar
- M. Furr and J. S. Foster. Checking type safety of foreign function calls. In Programming Language Design and Implementation (PLDI), 2005. Google Scholar
Digital Library
- M. Furr and J. S. Foster. Polymorphic type inference for the JNI. In European Symposium on Programming (ESOP), 2006.Google Scholar
Digital Library
- M. Furr and J. S. Foster. Checking type safety of foreign function calls. Transactions on Programming Languages and Systems (TOPLAS), 30(4), 2008. Google Scholar
Digital Library
- R. Grimm. xtc -- eXTensible C. http://www.cs.nyu.edu/rgrimm/xtc/.Google Scholar
- R. Grimm. Better extensibility through modular syntax. In Programming Language Design and Implementation (PLDI), 2006. Google Scholar
Digital Library
- D. R. Hanson. A machine-independent debugger--revisited. Softw. Pract. Exper., 29(10):849--862, 1999. Google Scholar
Digital Library
- M. Hirzel and R. Grimm. Jeannie: Granting Java native interface developers their wishes. In Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), 2007. Google Scholar
Digital Library
- G. Kondoh and T. Onodera. Finding bugs in Java native interface programs. In International Symposium on Software Testing and Analysis (ISSTA), 2008. Google Scholar
Digital Library
- S. Liang. The Java Native Interface: Programmer's Guide and Specification. Addison-Wesley, 1999. Google Scholar
Digital Library
- J. Lind-Nielsen. BuDDy. http://buddy.sourceforge.net/.Google Scholar
- M. A. Linton. The evolution of Dbx. In Usenix Technical Conference, 1990.Google Scholar
- G. C. Necula, S. McPeak, and W. Weimer. CCured: Typesafe retrofitting of legacy code. In Principles of Programming Languages (POPL), 2002. Google Scholar
Digital Library
- V. Providin and C. Elford. Debugging native methods in Java applications. In EclipseCon User Conference, Mar. 2007.Google Scholar
- N. Ramsey and D. R. Hanson. A retargetable debugger. In Programming Language Design and Implementation (PLDI), 1992. Google Scholar
Digital Library
- J. B. Rosenberg. How Debuggers Work: Algorithms, Data Structures, and Architecture. John Wiley&Sons, 1996. Google Scholar
Digital Library
- S. Ryu and N. Ramsey. Source-level debugging for multiple languages with modest programming effort. In International Conference on Compiler Construction (CC), 2005. Google Scholar
Digital Library
- M. Stall. Mike Stall's .NET debugging blog. http://blogs.msdn.com/jmstall/default.aspx.Google Scholar
- Standard Performance Evaluation Corporation. SPECjvm98 Documentation, release 1.03 edition, March 1999.Google Scholar
- Sun Microsystems, Inc. Bug database Bug 4207056 was opened 1999-01-29. http://bugs.sun.com.Google Scholar
- Sun Microsystems, Inc. Java SE HotSpot at a glance. http://java.sun.com/javase/technologies/hotspot/.Google Scholar
- Sun Microsystems, Inc. JVMTM tool interface, version 1.1. http://java.sun.com/javase/6/docs/platform/jvmti/jvmti.html, 2006.Google Scholar
- Sun Microsystems, Inc. Debugging a Java application with dbx. http://docs.sun.com/app/docs/doc/819-5257/blamm?a=view, 2007.Google Scholar
- G. Tan, A. W. Appel, S. Chakradhar, A. Raghunathan, S. Ravi, and D. Wang. Safe Java native interface. In International Symposium on Secure Software Engineering (ISSSE), 2006.Google Scholar
- G. Tan and J. Croft. An empirical security study of the native code in the JDK. In Usenix Security Symposium (SS), 2008. Google Scholar
Digital Library
- G. Tan and G. Morrisett. ILEA: Inter-language analysis across Java and C. In Object-Oriented Programming Systems and Applications (OOPSLA), 2007. Google Scholar
Digital Library
- Z. Tatlock, C. Tucker, D. Shuffelton, R. Jhala, and S. Lerner. Deep typechecking and refactoring. In Object-Oriented Programming Systems Languages and Applications (OOPSLA), 2008. Google Scholar
Digital Library
- A. P. Tolmach and A. W. Appel. Debugging standard ML without reverse engineering. In LISP and Functional Programming (LFP), 1990. Google Scholar
Digital Library
- M. van den Brand, B. Cornelissen, P. Olivier, and J. Vinju. TIDE: A generic debugging framework -- tool demonstration. Electronic Notes in Theoretical Computer Science, 141(4), 2005. Google Scholar
Digital Library
- Visual studio debugger extensibility. http://msdn.microsoft.com/en-us/library/bb161718(VS.80).aspx.Google Scholar
- M. White. Debugging integrated Java and C/C++ code. http://web.archive.org/web/20041205063318/www-106.ibm.com/developerworks/java/library/j-jnidebug/, Nov. 2001.Google Scholar
- M. White. Integrated Java technology and C debugging using the Eclipse platform. In JavaOne Conference, 2006.Google Scholar
- A. Zeller. Why Programs Fail: A Guide to Systematic Debugging. Morgan Kaufmann, Oct. 2005. Google Scholar
Digital Library
Index Terms
Debug all your code: portable mixed-environment debugging
Recommendations
Debug all your code: portable mixed-environment debugging
OOPSLA '09: Proceedings of the 24th ACM SIGPLAN conference on Object oriented programming systems languages and applicationsProgrammers build large-scale systems with multiple languages to reuse legacy code and leverage languages best suited to their problems. For instance, the same program may use Java for ease-of-programming and C to interface with the operating system. ...
Debugging mixed-environment programs with Blink
Programmers build large-scale systems with multiple languages to leverage legacy code and languages best suited to their problems. For instance, the same program may use Java for ease of programming and C to interface with the operating system. These ...
Jeannie: granting java native interface developers their wishes
Proceedings of the 2007 OOPSLA conferenceHigher-level languages interface with lower-level languages such as C to access platform functionality, reuse legacy libraries, or improve performance. This raises the issue of how to best integrate different languages while also reconciling ...







Comments