OSDN Git Service

* classpath/lib/gnu/classpath/jdwp/event/filters/
authorkseitz <kseitz@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 28 Apr 2007 01:02:10 +0000 (01:02 +0000)
committerkseitz <kseitz@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 28 Apr 2007 01:02:10 +0000 (01:02 +0000)
        LocationOnlyFilter.class: Regenerated;
        * classpath/lib/gnu/classpath/jdwp/util/Location.class:
        Regenerated.
        * gnu/classpath/jdwp/VMMethod.java
        * classpath/lib/gnu/classpath/jdwp/VMMethod.class:
        Regenerated.
        * gnu/classpath/jdwp/VMMethod.h: Regenerated.
        * gnu/classpath/jdwp/util/Location.h: Regenerated.

        * gnu/classpath/jdwp/event/filters/LocationOnlyFilter.java
        (matches): Use Location.equals to determine equality.
        * gnu/classpath/jdwp/VMMethod.java (equals):
        New method.
        * gnu/classpath/jdwp/util/Location.java (equals):
        New method.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124249 138bc75d-0d04-0410-961f-82ee72b054a4

libjava/ChangeLog
libjava/classpath/ChangeLog
libjava/classpath/gnu/classpath/jdwp/event/filters/LocationOnlyFilter.java
libjava/classpath/gnu/classpath/jdwp/util/Location.java
libjava/classpath/lib/gnu/classpath/jdwp/VMMethod.class
libjava/classpath/lib/gnu/classpath/jdwp/event/filters/LocationOnlyFilter.class
libjava/classpath/lib/gnu/classpath/jdwp/util/Location.class
libjava/gnu/classpath/jdwp/VMMethod.h
libjava/gnu/classpath/jdwp/VMMethod.java
libjava/gnu/classpath/jdwp/util/Location.h

index 67c1389..eac885a 100644 (file)
@@ -1,3 +1,15 @@
+2007-04-27  Keith Seitz  <keiths@redhat.com>
+
+       * classpath/lib/gnu/classpath/jdwp/event/filters/
+       LocationOnlyFilter.class: Regenerated;
+       * classpath/lib/gnu/classpath/jdwp/util/Location.class:
+       Regenerated.
+       * gnu/classpath/jdwp/VMMethod.java
+       * classpath/lib/gnu/classpath/jdwp/VMMethod.class:
+       Regenerated.
+       * gnu/classpath/jdwp/VMMethod.h: Regenerated.
+       * gnu/classpath/jdwp/util/Location.h: Regenerated.
+
 2007-04-27  Thomas Fitzsimmons  <fitzsim@redhat.com>
 
        * gnu/java/awt/peer/gtk/CairoGraphics2D.h: Regenerate.
index 4877b1d..e9ad54b 100644 (file)
@@ -1,3 +1,12 @@
+2007-04-27  Keith Seitz  <keiths@redhat.com>
+
+       * gnu/classpath/jdwp/event/filters/LocationOnlyFilter.java
+       (matches): Use Location.equals to determine equality.
+       * gnu/classpath/jdwp/VMMethod.java (equals):
+       New method.
+       * gnu/classpath/jdwp/util/Location.java (equals):
+       New method.
+
 2007-03-16  Francis Kung  <fkung@redhat.com>
 
        * gnu/java/awt/peer/gtk/CairoGraphics2D.java
index 7190317..a312537 100644 (file)
@@ -1,5 +1,5 @@
 /* LocationOnlyFilter.java -- filter on location
-   Copyright (C) 2005, 2006 Free Software Foundation
+   Copyright (C) 2005, 2006, 2007 Free Software Foundation
 
 This file is part of GNU Classpath.
 
@@ -49,13 +49,6 @@ import gnu.classpath.jdwp.util.Location;
  * May be used with breakpoint, field access, field modification, step,
  * and exception event kinds.
  *
- * This "filter" is not really a filter. It is simply a way to communicate
- * location information for supported events in a generic way to ease 
- * the burden of special casing several things in
- * EventReqeustCommandSet.executeSet.
- * 
- * Consequently, this "filter" always matches any event.
- * 
  * @author Keith Seitz  (keiths@redhat.com)
  */
 public class LocationOnlyFilter
@@ -90,9 +83,12 @@ public class LocationOnlyFilter
    *
    * @param event  the <code>Event</code> to scrutinize
    */
-  public boolean matches (Event event)
+  public boolean matches(Event event)
   {
-    // This filter always matches. See comments in class javadoc.
-    return true;
+    Location loc = (Location) event.getParameter(Event.EVENT_LOCATION);
+    if (loc != null)
+      return (getLocation().equals(loc));
+
+    return false;
   }
 }
index 89e81e5..ff045a5 100644 (file)
@@ -1,5 +1,5 @@
 /* Location.java -- class to read/write JDWP locations
-   Copyright (C) 2005, 2006 Free Software Foundation
+   Copyright (C) 2005, 2006, 2007 Free Software Foundation
 
 This file is part of GNU Classpath.
 
@@ -153,4 +153,16 @@ public class Location
   {
     return method.toString () + "." + index;
   }
+
+  public boolean equals(Object obj)
+  {
+    if (obj instanceof Location)
+      {
+       Location l = (Location) obj;
+       return (getMethod().equals(l.getMethod())
+               && getIndex() == l.getIndex());
+      }
+
+    return false;
+  }
 }
index 25cc9e0..e19c61b 100644 (file)
Binary files a/libjava/classpath/lib/gnu/classpath/jdwp/VMMethod.class and b/libjava/classpath/lib/gnu/classpath/jdwp/VMMethod.class differ
index 1e8d19b..a76fdfd 100644 (file)
Binary files a/libjava/classpath/lib/gnu/classpath/jdwp/event/filters/LocationOnlyFilter.class and b/libjava/classpath/lib/gnu/classpath/jdwp/event/filters/LocationOnlyFilter.class differ
index 593418c..ed85dd0 100644 (file)
Binary files a/libjava/classpath/lib/gnu/classpath/jdwp/util/Location.class and b/libjava/classpath/lib/gnu/classpath/jdwp/util/Location.class differ
index f1bf3d7..00f4d87 100644 (file)
@@ -49,6 +49,7 @@ public:
   virtual ::java::lang::String * toString();
   virtual void writeId(::java::io::DataOutputStream *);
   static ::gnu::classpath::jdwp::VMMethod * readId(::java::lang::Class *, ::java::nio::ByteBuffer *);
+  virtual jboolean equals(::java::lang::Object *);
   static const jint SIZE = 8;
 private:
   ::java::lang::Class * __attribute__((aligned(__alignof__( ::java::lang::Object)))) _class;
index d345bc1..6a2b04e 100644 (file)
@@ -1,5 +1,5 @@
 /* VMMethod.java -- a method in a virtual machine
-   Copyright (C) 2006 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2007 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -175,4 +175,15 @@ public class VMMethod
   {
     return VMVirtualMachine.getClassMethod(klass, bb.getLong());
   }
+
+  public boolean equals(Object obj)
+  {
+    if (obj instanceof VMMethod)
+      {
+       VMMethod m = (VMMethod) obj;
+       return (getId() == m.getId());
+      }
+
+    return false;
+  }
 }
index 4b74274..2e87105 100644 (file)
@@ -43,6 +43,7 @@ public:
   virtual ::gnu::classpath::jdwp::VMMethod * getMethod();
   virtual jlong getIndex();
   virtual ::java::lang::String * toString();
+  virtual jboolean equals(::java::lang::Object *);
 private:
   ::gnu::classpath::jdwp::VMMethod * __attribute__((aligned(__alignof__( ::java::lang::Object)))) method;
   jlong index;