< prev index next >

agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdAddress.java

Print this page




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




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


< prev index next >