JavaTM Platform Debugger Architecture

Enhancements

Following is a short summary of the enhancements to JPDA that have been added in Java SE 6. The documentation for these features is available in the JDI Specification.

Not shown here are the equivalent commands in JDWP. The documentation for these features is available in the JDWP Specification.

   - JVMDI has been deleted. See its replacement, JVM TI

   - heap walking
       5024119 Add ReferenceType.getAllInstances () method to JDI.
       5089849 Add support for backtracking reference graph.

       New methods:
         VirtualMachine:
           boolean canGetInstanceInfo();       
           long[] instanceCounts(List
 refTypes);

         ReferenceType:
           List<ObjectReference> instances(long maxInstances);

         ObjectReference:
           List<ObjectReference> referringObjects(long maxReferrers);


   - 5024104 Allow access to Constant Pool in ClassType
       New methods:
         VirtualMachine:
           boolean canGetClassFileVersion();
           boolean canGetConstantPool();

         ReferenceType:
           int majorVersion();
           int minorVersion();
           int constantPoolCount();
           byte[] constantPool();

   - 4836939 JDI add addSourceFileFilter to ClassPrepareRequestb
        New methods:
          VirtualMachine:
            boolean canUseSourceNameFilters();

          ClassPrepareRequest:
            void addSourceNameFilter(String sourceNamePattern);

   - 4490824 JDI: provide arguments when no debug attributes present
       New methods:

         StackFrame:
           List<Value> getArgumentValues();

   - 4195445 JDWP, JDI: Add return value to Method Exit Event
       New methods:
         VirtualMachine:
           boolean canGetMethodReturnValues();

         MethodExitEvent: 
           Value returnValue();

   - 6175634 Allow early return from method
       New methods:
         VirtualMachine:
           boolean canForceEarlyReturn();     

         ThreadReference:
           void forceEarlyReturn(Value value) throws InvalidTypeException, 
                                              ClassNotLoadedException,
                                              IncompatibleThreadStateException;

   - 4401399 Request for breakpoints for monitor acquisitions and releases
       New methods:
         VirtualMachine
           boolean canRequestMonitorEvents();

         EventRequestManager:
           List<MonitorContendedEnterRequest> monitorContendedEnterRequests();
           List<MonitorContendedEnteredRequest> monitorContendedEnteredRequests();
           List<MonitorWaitRequest> monitorWaitRequests();
           List<MonitorWaitedRequest> monitorWaitedRequests();

       New classes:
         public interface MonitorContendedEnterRequest extends EventRequest
         public interface MonitorContendedEnteredRequest extends EventRequest
         public interface MonitorWaitRequest extends EventRequest
         public interface MonitorWaitedRequest extends EventRequest

         public interface MonitorContendedEnterEvent extends LocatableEvent 
         public interface MonitorContendedEnteredEvent extends LocatableEvent 
         public interface MonitorWaitEvent extends LocatableEvent 
         public interface MonitorWaitedEvent extends LocatableEvent 


   - 6230699  Need to be able to get the location at which a monitor was acquired 
       New methods:
         VirtualMachine
           boolean canGetMonitorFrameInfo();
       
         ThreadReference
           List<MonitorInfo> ownedMonitorsAndFrames()
                           throws IncompatibleThreadStateException;

       New classes:
         public interface MonitorInfo extends Mirror

   - 4527279: Need a better way to find out the port number on which JPDA is listening

        New Connector:
            com.sun.tools.jdi.ProcessAttach, with arguments pid and timeout
            This allows a debugger to attach to a debuggee started in 
            debug mode via process id instead of transport address.





Oracle and/or its affiliates
Java Technology

Copyright © 1993, 2011, Oracle and/or its affiliates. All rights reserved.

Contact Us