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.
New methods:
VirtualMachine: boolean canGetInstanceInfo(); long[] instanceCounts(List<?extends ReferenceType?> refTypes); ReferenceType: List<ObjectReference> instances(long maxInstances); ObjectReference: List<ObjectReference> referringObjects(long maxReferrers);
New methods:
VirtualMachine: boolean canGetClassFileVersion(); boolean canGetConstantPool(); ReferenceType: int majorVersion(); int minorVersion(); int constantPoolCount(); byte[] constantPool();
New methods:
VirtualMachine: boolean canUseSourceNameFilters(); ClassPrepareRequest: void addSourceNameFilter(String sourceNamePattern);
New methods:
StackFrame: List<Value> getArgumentValues();
New methods:
VirtualMachine: boolean canGetMethodReturnValues(); MethodExitEvent: Value returnValue();
New methods:
VirtualMachine: boolean canForceEarlyReturn(); ThreadReference: void forceEarlyReturn(Value value) throws InvalidTypeException, ClassNotLoadedException, IncompatibleThreadStateException;
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
New methods:
VirtualMachine boolean canGetMonitorFrameInfo(); ThreadReference List<MonitorInfo> ownedMonitorsAndFrames() throws IncompatibleThreadStateException;
New classes:
public interface MonitorInfo extends Mirror
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.