CVSROOT: /sources/classpath Module name: classpath Changes by: Keith Seitz <keiths> 06/06/13 18:08:21
Modified files: . : ChangeLog gnu/classpath/jdwp/event: BreakpointEvent.java gnu/classpath/jdwp/event/filters: ExceptionOnlyFilter.java Log message: From Kyle Galloway <[EMAIL PROTECTED]>: * gnu/classpath/jdwp/event/filters/ExceptionOnlyFilter.java (ExceptionOnlyFilter): Allow null refId. * gnu/classpath/jdwp/event/BreakpointEvent.java: Added _instance for compatibility with filters. (getParameter): Modified to allow access to above. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpath&r1=1.7799&r2=1.7800 http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/classpath/jdwp/event/BreakpointEvent.java?cvsroot=classpath&r1=1.2&r2=1.3 http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/classpath/jdwp/event/filters/ExceptionOnlyFilter.java?cvsroot=classpath&r1=1.3&r2=1.4 Patches: Index: ChangeLog =================================================================== RCS file: /sources/classpath/classpath/ChangeLog,v retrieving revision 1.7799 retrieving revision 1.7800 diff -u -b -r1.7799 -r1.7800 --- ChangeLog 13 Jun 2006 15:59:35 -0000 1.7799 +++ ChangeLog 13 Jun 2006 18:08:20 -0000 1.7800 @@ -1,3 +1,13 @@ +2006-06-13 Keith Seitz <[EMAIL PROTECTED]> + + From Kyle Galloway <[EMAIL PROTECTED]>: + * gnu/classpath/jdwp/event/filters/ExceptionOnlyFilter.java + (ExceptionOnlyFilter): Allow null refId. + + * gnu/classpath/jdwp/event/BreakpointEvent.java: Added _instance for + compatibility with filters. + (getParameter): Modified to allow access to above. + 2006-06-13 Sven de Marothy <[EMAIL PROTECTED]> * gnu/java/awt/peer/gtk/CairoSurface.java Index: gnu/classpath/jdwp/event/BreakpointEvent.java =================================================================== RCS file: /sources/classpath/classpath/gnu/classpath/jdwp/event/BreakpointEvent.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -b -r1.2 -r1.3 --- gnu/classpath/jdwp/event/BreakpointEvent.java 12 Jun 2006 19:43:26 -0000 1.2 +++ gnu/classpath/jdwp/event/BreakpointEvent.java 13 Jun 2006 18:08:21 -0000 1.3 @@ -63,17 +63,22 @@ // Location where breakpoint occurred private Location _location; + //object instance + private Object _instance; + /** * Constructs a new BreakpointEvent * * @param thread thread in which event occurred * @param loc location where breakpoint occurred + * @param instance object instance */ - public BreakpointEvent(Thread thread, Location loc) + public BreakpointEvent(Thread thread, Location loc, Object instance) { super(JdwpConstants.EventKind.BREAKPOINT); _thread = thread; _location = loc; + _instance = instance; } /** @@ -89,6 +94,8 @@ return _thread; else if (type == EVENT_LOCATION) return _location; + else if (type == EVENT_INSTANCE) + return _instance; return null; } Index: gnu/classpath/jdwp/event/filters/ExceptionOnlyFilter.java =================================================================== RCS file: /sources/classpath/classpath/gnu/classpath/jdwp/event/filters/ExceptionOnlyFilter.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -b -r1.3 -r1.4 --- gnu/classpath/jdwp/event/filters/ExceptionOnlyFilter.java 12 Jun 2006 20:39:16 -0000 1.3 +++ gnu/classpath/jdwp/event/filters/ExceptionOnlyFilter.java 13 Jun 2006 18:08:21 -0000 1.4 @@ -61,7 +61,7 @@ /** * Constructs a new ExceptionOnlyFilter * - * @param refId ID of the exception to report + * @param refId ID of the exception to report(null for all exceptions) * @param caught Report caught exceptions * @param uncaught Report uncaught exceptions * @throws InvalidClassException if refid is invalid @@ -70,8 +70,8 @@ boolean uncaught) throws InvalidClassException { - if (refId == null || refId.getReference().get () == null) - throw new InvalidClassException (refId.getId ()); + if (refId != null && refId.getReference().get() == null) + throw new InvalidClassException(refId.getId()); _refId = refId; _caught = caught; @@ -96,21 +96,28 @@ */ public boolean matches(Event event) { - boolean classMatch; + boolean classMatch = true; + // if not allowing all exceptions check if the exception matches + if (_refId != null) + { try { - Class klass = (Class) event.getParameter(Event.EVENT_EXCEPTION_CLASS); + Class klass + = (Class) event.getParameter(Event.EVENT_EXCEPTION_CLASS); classMatch = klass == _refId.getType(); } catch (InvalidClassException ex) { classMatch = false; } + } + // check against the caught and uncaught options Boolean caught = (Boolean) event.getParameter(Event.EVENT_EXCEPTION_CAUGHT); return classMatch && (caught.booleanValue()) ? _caught : _uncaught; } + }