skip to main content
10.1145/1640089.1640105acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
research-article

Debug all your code: portable mixed-environment debugging

Published: 25 October 2009 Publication History

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.

References

[1]
C. Bailey. Java technology, IBM style: Introduction to the IBM developer kit. http://www.ibm.com/developerworks/java/library/j-ibmjava1.html, May 2006.
[2]
D. M. Beazley. SWIG: An easy to use tool for integrating scripting languages with C and C++. In USENIX Tcl/Tk Workshop (TCLTK), 1996.
[3]
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.
[4]
P. Bothner. Compiling Java with GCJ. http://www.linuxjournal.com/article/4860, Jan. 2003.
[5]
Free Standards Group. DWARF 3 debugging information format. http://www.dwarfstd.org/Dwarf3.pdf, Dec. 2005.
[6]
M. Furr and J. S. Foster. Checking type safety of foreign function calls. In Programming Language Design and Implementation (PLDI), 2005.
[7]
M. Furr and J. S. Foster. Polymorphic type inference for the JNI. In European Symposium on Programming (ESOP), 2006.
[8]
M. Furr and J. S. Foster. Checking type safety of foreign function calls. Transactions on Programming Languages and Systems (TOPLAS), 30(4), 2008.
[9]
R. Grimm. xtc -- eXTensible C. http://www.cs.nyu.edu/rgrimm/xtc/.
[10]
R. Grimm. Better extensibility through modular syntax. In Programming Language Design and Implementation (PLDI), 2006.
[11]
D. R. Hanson. A machine-independent debugger--revisited. Softw. Pract. Exper., 29(10):849--862, 1999.
[12]
M. Hirzel and R. Grimm. Jeannie: Granting Java native interface developers their wishes. In Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), 2007.
[13]
G. Kondoh and T. Onodera. Finding bugs in Java native interface programs. In International Symposium on Software Testing and Analysis (ISSTA), 2008.
[14]
S. Liang. The Java Native Interface: Programmer's Guide and Specification. Addison-Wesley, 1999.
[15]
J. Lind-Nielsen. BuDDy. http://buddy.sourceforge.net/.
[16]
M. A. Linton. The evolution of Dbx. In Usenix Technical Conference, 1990.
[17]
G. C. Necula, S. McPeak, and W. Weimer. CCured: Typesafe retrofitting of legacy code. In Principles of Programming Languages (POPL), 2002.
[18]
V. Providin and C. Elford. Debugging native methods in Java applications. In EclipseCon User Conference, Mar. 2007.
[19]
N. Ramsey and D. R. Hanson. A retargetable debugger. In Programming Language Design and Implementation (PLDI), 1992.
[20]
J. B. Rosenberg. How Debuggers Work: Algorithms, Data Structures, and Architecture. John Wiley&Sons, 1996.
[21]
S. Ryu and N. Ramsey. Source-level debugging for multiple languages with modest programming effort. In International Conference on Compiler Construction (CC), 2005.
[22]
M. Stall. Mike Stall's .NET debugging blog. http://blogs.msdn.com/jmstall/default.aspx.
[23]
Standard Performance Evaluation Corporation. SPECjvm98 Documentation, release 1.03 edition, March 1999.
[24]
Sun Microsystems, Inc. Bug database Bug 4207056 was opened 1999-01-29. http://bugs.sun.com.
[25]
Sun Microsystems, Inc. Java SE HotSpot at a glance. http://java.sun.com/javase/technologies/hotspot/.
[26]
Sun Microsystems, Inc. JVMTM tool interface, version 1.1. http://java.sun.com/javase/6/docs/platform/jvmti/jvmti.html, 2006.
[27]
Sun Microsystems, Inc. Debugging a Java application with dbx. http://docs.sun.com/app/docs/doc/819-5257/blamm?a=view, 2007.
[28]
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.
[29]
G. Tan and J. Croft. An empirical security study of the native code in the JDK. In Usenix Security Symposium (SS), 2008.
[30]
G. Tan and G. Morrisett. ILEA: Inter-language analysis across Java and C. In Object-Oriented Programming Systems and Applications (OOPSLA), 2007.
[31]
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.
[32]
A. P. Tolmach and A. W. Appel. Debugging standard ML without reverse engineering. In LISP and Functional Programming (LFP), 1990.
[33]
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.
[34]
Visual studio debugger extensibility. http://msdn.microsoft.com/en-us/library/bb161718(VS.80).aspx.
[35]
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.
[36]
M. White. Integrated Java technology and C debugging using the Eclipse platform. In JavaOne Conference, 2006.
[37]
A. Zeller. Why Programs Fail: A Guide to Systematic Debugging. Morgan Kaufmann, Oct. 2005.

Cited By

View all
  • (2018)Protecting chatbots from toxic contentProceedings of the 2018 ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software10.1145/3276954.3276958(99-110)Online publication date: 24-Oct-2018
  • (2016)LockPeeker: detecting latent locks in Java APIsProceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering10.1145/2970276.2970355(368-378)Online publication date: 25-Aug-2016
  • (2015)Mutation-based fault localization for real-world multilingual programsProceedings of the 30th IEEE/ACM International Conference on Automated Software Engineering10.1109/ASE.2015.14(464-475)Online publication date: 9-Nov-2015
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
OOPSLA '09: Proceedings of the 24th ACM SIGPLAN conference on Object oriented programming systems languages and applications
October 2009
590 pages
ISBN:9781605587660
DOI:10.1145/1640089
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 44, Issue 10
    OOPSLA '09
    October 2009
    554 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/1639949
    Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 25 October 2009

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. JNI
  2. composition
  3. foreign function interface

Qualifiers

  • Research-article

Conference

OOPSLA09
Sponsor:

Acceptance Rates

OOPSLA '09 Paper Acceptance Rate 25 of 144 submissions, 17%;
Overall Acceptance Rate 268 of 1,244 submissions, 22%

Upcoming Conference

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)19
  • Downloads (Last 6 weeks)1
Reflects downloads up to 17 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2018)Protecting chatbots from toxic contentProceedings of the 2018 ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software10.1145/3276954.3276958(99-110)Online publication date: 24-Oct-2018
  • (2016)LockPeeker: detecting latent locks in Java APIsProceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering10.1145/2970276.2970355(368-378)Online publication date: 25-Aug-2016
  • (2015)Mutation-based fault localization for real-world multilingual programsProceedings of the 30th IEEE/ACM International Conference on Automated Software Engineering10.1109/ASE.2015.14(464-475)Online publication date: 9-Nov-2015
  • (2015)Practical domain-specific debuggers using the Moldable Debugger frameworkComputer Languages, Systems and Structures10.1016/j.cl.2015.08.00544:PA(89-113)Online publication date: 1-Dec-2015
  • (2014)TardisACM SIGPLAN Notices10.1145/2714064.266020949:10(67-82)Online publication date: 15-Oct-2014
  • (2014)Composable multi-level debugging with StackdbACM SIGPLAN Notices10.1145/2674025.257621249:7(213-226)Online publication date: 1-Mar-2014
  • (2014)TardisProceedings of the 2014 ACM International Conference on Object Oriented Programming Systems Languages & Applications10.1145/2660193.2660209(67-82)Online publication date: 15-Oct-2014
  • (2014)Composable multi-level debugging with StackdbProceedings of the 10th ACM SIGPLAN/SIGOPS international conference on Virtual execution environments10.1145/2576195.2576212(213-226)Online publication date: 1-Mar-2014
  • (2013)GROPG: a graphical on-phone debuggerProceedings of the 2013 International Conference on Software Engineering10.5555/2486788.2486958(1189-1192)Online publication date: 18-May-2013
  • (2013)GROPG: A graphical on-phone debugger2013 35th International Conference on Software Engineering (ICSE)10.1109/ICSE.2013.6606675(1189-1192)Online publication date: May-2013
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media