Multi-level Virtual Machine Debugging Using the Java Platform Debugger Architecture

  • Thomas Würthinger
  • Michael L. Van De Vanter
  • Doug Simon
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5947)


Debugging virtual machines (VMs) presents unique challenges, especially meta-circular VMs, which are written in the same language they implement. Making sense of runtime state for such VMs requires insight and interaction at multiple levels of abstraction simultaneously. For example, debugging a Java VM written in Java requires understanding execution state at the source code, bytecode and machine code levels. However, the standard debugging interface for Java, which has a platform-independent execution model, is itself platform-independent. By definition, such an interface provides no access to platform-specific details such as machine code state, stack and register values. Debuggers for low-level languages such as C and C++, on the other hand, have direct access only to low-level information from which they must synthesize higher-level views of execution state. An ideal debugger for a meta-circular VM would be a hybrid: one that uses standard platform-independent debugger interfaces but which also interacts with the execution environment in terms of low-level, platform-dependent state.

This paper presents such a hybrid architecture for the meta-circular Maxine VM. This architecture adopts unchanged a standard debugging interface, the Java Platform Debugger Architecture (JPDA), in combination with the highly extensible NetBeans Integrated Development Environment. Using an extension point within the interface, additional machine-level information can be exchanged between a specialized server associated with the VM and plug-in extensions within NetBeans.


Virtual Machine Execution State Machine Code Integrate Development Environment Java Object 
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.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Alpern, B., Attanasio, C.R., Cocchi, A., Hummel, S.F., Lieber, D., Mergen, M., Shepherd, J.C., Smith, S.: Implementing jalapeño in Java. In: OOPSLA 1999: Proceedings of the 14th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, pp. 314–324. ACM Press, New York (1999)CrossRefGoogle Scholar
  2. 2.
    Dmitriev, M.: Safe class and data evolution in large and long-lived JavaTM applications. Technical report, Sun Microsystems Laboratories (2001)Google Scholar
  3. 3.
    Dmitriev, M.: Towards flexible and safe technology for runtime evolution of Java language applications. In: Proceedings of the Workshop on Engineering Complex Object-Oriented Systems for Evolution, in association with OOPSLA 2001 International Conference (2001)Google Scholar
  4. 4.
    Gosling, J., Joy, B., Steele, G., Bracha, G.: JavaTM Language Specification, 3rd edn. Java Series. Addison-Wesley Professional, Reading (2005)Google Scholar
  5. 5.
    Liang, S.: The Java Native Interface: Programmers Guide and Specification. Addison-Wesley Publishing Co., Inc., Reading (1999)Google Scholar
  6. 6.
    Mathiske, B.: The maxine virtual machine and inspector. In: OOPSLA Companion 2008: Companion to the 23rd ACM SIGPLAN conference on Object oriented programming systems languages and applications, pp. 739–740. ACM, New York (2008)CrossRefGoogle Scholar
  7. 7.
    Ngo, T., Barton, J.: Debugging by remote reflection. In: Bode, A., Ludwig, T., Karl, W.C., Wismüller, R. (eds.) Euro-Par 2000. LNCS, vol. 1900, pp. 1031–1038. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  8. 8.
    Printezis, T., Jones, R.: Gcspy: an adaptable heap visualisation framework. In: OOPSLA 2002: Proceedings of the 17th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, pp. 343–358. ACM, New York (2002)CrossRefGoogle Scholar
  9. 9.
    Simon, D., Cifuentes, C., Cleal, D., Daniels, J., White, D.: JavaTM on the bare metal of wireless sensor devices: the squawk Java virtual machine. In: VEE 2006: Proceedings of the 2nd international conference on Virtual execution environments, pp. 78–88. ACM, New York (2006)CrossRefGoogle Scholar
  10. 10.
    Sun Microsystems, Inc.: Java Dynamic Proxy Classes (1999),
  11. 11.
    Sun Microsystems, Inc.: Java Debug Interface (2004),
  12. 12.
    Sun Microsystems, Inc.: Java Debug Wire Protocol (2004),
  13. 13.
    Sun Microsystems, Inc.: Java Platform Debugger Architecture (2004),
  14. 14.
    Sun Microsystems, Inc.: NetBeans (2009),
  15. 15.
    Ungar, D., Spitz, A., Ausch, A.: Constructing a metacircular virtual machine in an exploratory programming environment. In: OOPSLA 2005: Companion to the 20th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, pp. 11–20. ACM, New York (2005)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • Thomas Würthinger
    • 1
  • Michael L. Van De Vanter
    • 2
  • Doug Simon
    • 2
  1. 1.Institute for System SoftwareJohannes Kepler University LinzLinzAustria
  2. 2.Sun Microsystems LaboratoriesMenlo ParkUSA

Personalised recommendations