< prev index next >

agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteAddress.java

Print this page




 264     }
 265     return new RemoteAddress(debugger, value);
 266   }
 267 
 268   public Address    orWithMask(long mask) throws UnsupportedOperationException {
 269     long value = addr | mask;
 270     if (value == 0) {
 271       return null;
 272     }
 273     return new RemoteAddress(debugger, value);
 274   }
 275 
 276   public Address    xorWithMask(long mask) throws UnsupportedOperationException {
 277     long value = addr ^ mask;
 278     if (value == 0) {
 279       return null;
 280     }
 281     return new RemoteAddress(debugger, value);
 282   }
 283 
 284 
 285   //--------------------------------------------------------------------------------
 286   // Internals only below this point
 287   //
 288 
 289   long getValue() {
 290     return addr;
 291   }
 292 
 293 
 294   private static void check(boolean arg, String failMessage) {
 295     if (!arg) {
 296       System.err.println(failMessage + ": FAILED");
 297       System.exit(1);
 298     }
 299   }
 300 
 301   // Test harness
 302   public static void main(String[] args) {
 303     // p/n indicates whether the interior address is really positive
 304     // or negative. In unsigned terms, p1 < p2 < n1 < n2.




 264     }
 265     return new RemoteAddress(debugger, value);
 266   }
 267 
 268   public Address    orWithMask(long mask) throws UnsupportedOperationException {
 269     long value = addr | mask;
 270     if (value == 0) {
 271       return null;
 272     }
 273     return new RemoteAddress(debugger, value);
 274   }
 275 
 276   public Address    xorWithMask(long mask) throws UnsupportedOperationException {
 277     long value = addr ^ mask;
 278     if (value == 0) {
 279       return null;
 280     }
 281     return new RemoteAddress(debugger, value);
 282   }
 283 
 284   public long asLongValue() { return addr; }
 285   //--------------------------------------------------------------------------------
 286   // Internals only below this point
 287   //
 288 
 289   long getValue() {
 290     return addr;
 291   }
 292 
 293 
 294   private static void check(boolean arg, String failMessage) {
 295     if (!arg) {
 296       System.err.println(failMessage + ": FAILED");
 297       System.exit(1);
 298     }
 299   }
 300 
 301   // Test harness
 302   public static void main(String[] args) {
 303     // p/n indicates whether the interior address is really positive
 304     // or negative. In unsigned terms, p1 < p2 < n1 < n2.


< prev index next >