From 5bc95f634972b4b41404fd6df7fc627d722a0608 Mon Sep 17 00:00:00 2001 From: Keith Seitz Date: Thu, 1 Mar 2007 02:02:35 +0000 Subject: * gnu/classpath/jdwp/processor/EventRequestCommandSet.java (executeSet): Check if VM has capability for field access or modification events. * gnu/classpath/jdwp/processor/MethodCommandSet.java (executeByteCodes): Check if VM has capability and implement. * gnu/classpath/jdwp/processor/ObjectReferenceCommandSet.java (executeMonitorInfo): Likewise. * gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java (executeSourceDebugExtension): Likewise. * gnu/classpath/jdwp/processor/StackFrameCommandSet.java (executePopFrames): Likewise. * gnu/classpath/jdwp/processor/ThreadReferenceCommandSet.java (executeOwnedMonitors): Likewise. (executeCurrentContendedMonitor): Likewise. * gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java (executeCapabilities): Rewrite using new VMVirtualMachine capabilities. (executeRedefineClasses): Check if VM has capability and implement. (executeSetDefaultStratum): Likewise. * gnu/classpath/jdwp/util/MonitorInfo.java; New file. * vm/reference/gnu/classpath/jdwp/VMVirtualMachine.java (canWatchFieldModification): New class constant. (canWatchFieldAccess): Likewise. (canGetBytecodes): Likewise. (canGetSyntheticAttribute): Likewise. (canGetOwnedMonitorInfo): Likewise. (canGetCurrentContendedMonitor): Likewise. (canGetMonitorInfo): Likewise. (canRedefineClasses): Likewise. (canAddMethod): Likewise. (canUnrestrictedlyRedefineClasses): Likewise. (canPopFrames): Likewise. (canUseInstanceFilters): Likewise. (canGetSourceDebugExtension): Likewise. (canRequestVMDeathEvent): Likewise. (canSetDefaultStratum): Likewise. (redefineClasses): New method. (setDefaultStratum): Likewise. (getSourceDebugExtension): Likewise. (getBytecodes): Likewise. (getMonitorInfo): Likewise. (getOwnedMonitors): Likewise. (getCurrentContendedMonitor): Likewise. (popFrames): Likewise. --- .../jdwp/processor/EventRequestCommandSet.java | 25 +++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'gnu/classpath/jdwp/processor/EventRequestCommandSet.java') diff --git a/gnu/classpath/jdwp/processor/EventRequestCommandSet.java b/gnu/classpath/jdwp/processor/EventRequestCommandSet.java index 59cfb94d3..d7ebbc3a3 100644 --- a/gnu/classpath/jdwp/processor/EventRequestCommandSet.java +++ b/gnu/classpath/jdwp/processor/EventRequestCommandSet.java @@ -1,6 +1,6 @@ /* EventRequestCommandSet.java -- class to implement the EventRequest Command Set - Copyright (C) 2005 Free Software Foundation + Copyright (C) 2005, 2007 Free Software Foundation This file is part of GNU Classpath. @@ -40,6 +40,7 @@ exception statement from your version. */ package gnu.classpath.jdwp.processor; import gnu.classpath.jdwp.JdwpConstants; +import gnu.classpath.jdwp.VMVirtualMachine; import gnu.classpath.jdwp.event.EventManager; import gnu.classpath.jdwp.event.EventRequest; import gnu.classpath.jdwp.event.filters.ClassExcludeFilter; @@ -113,6 +114,28 @@ public class EventRequestCommandSet byte suspendPolicy = bb.get(); int modifiers = bb.getInt(); + switch (eventKind) + { + case JdwpConstants.EventKind.FIELD_ACCESS: + if (!VMVirtualMachine.canWatchFieldAccess) + { + String msg = "watching field accesses is not supported"; + throw new NotImplementedException(msg); + } + break; + + case JdwpConstants.EventKind.FIELD_MODIFICATION: + if (!VMVirtualMachine.canWatchFieldModification) + { + String msg = "watching field modifications is not supported"; + throw new NotImplementedException(msg); + } + break; + + default: + // okay + } + EventRequest eventReq = new EventRequest(eventKind, suspendPolicy); IEventFilter filter = null; ReferenceTypeId refId; -- cgit v1.2.1