hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/Address.java

Print this page
rev 611 : Merge
   1 /*
   2  * Copyright 2000-2002 Sun Microsystems, Inc.  All Rights Reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  20  * CA 95054 USA or visit www.sun.com if you need additional information or
  21  * have any questions.
  22  *  


  70       absolutely, positively work properly -- i.e., two Address
  71       objects representing the same address are both equal (via
  72       equals()) and have the same hash code. */
  73   public boolean equals(Object arg);
  74 
  75   /** This is stated explicitly here because it is important for
  76       implementations to understand that equals() and hashCode() must
  77       absolutely, positively work properly -- i.e., two Address
  78       objects representing the same address are both equal (via
  79       equals()) and have the same hash code. */
  80   public int hashCode();
  81 
  82   //
  83   // C/C++-related routines
  84   //
  85 
  86   public long       getCIntegerAt      (long offset, long numBytes, boolean isUnsigned)
  87     throws UnmappedAddressException, UnalignedAddressException;
  88   /** This returns null if the address at the given offset is NULL. */
  89   public Address    getAddressAt       (long offset) throws UnmappedAddressException, UnalignedAddressException;


  90 
  91   //
  92   // Java-related routines
  93   //
  94 
  95   public boolean    getJBooleanAt      (long offset) throws UnmappedAddressException, UnalignedAddressException;
  96   public byte       getJByteAt         (long offset) throws UnmappedAddressException, UnalignedAddressException;
  97   public char       getJCharAt         (long offset) throws UnmappedAddressException, UnalignedAddressException;
  98   public double     getJDoubleAt       (long offset) throws UnmappedAddressException, UnalignedAddressException;
  99   public float      getJFloatAt        (long offset) throws UnmappedAddressException, UnalignedAddressException;
 100   public int        getJIntAt          (long offset) throws UnmappedAddressException, UnalignedAddressException;
 101   public long       getJLongAt         (long offset) throws UnmappedAddressException, UnalignedAddressException;
 102   public short      getJShortAt        (long offset) throws UnmappedAddressException, UnalignedAddressException;
 103   /** This returns null if the address at the given offset is NULL. */
 104   public OopHandle  getOopHandleAt     (long offset)
 105     throws UnmappedAddressException, UnalignedAddressException, NotInHeapException;


 106 
 107   //
 108   // C/C++-related mutators. These throw UnmappedAddressException if
 109   // the target is read-only (for example, a core file rather than an
 110   // active process), if the target address is unmapped, or if it is
 111   // read-only. The implementation may supply extra detail messages.
 112   //
 113 
 114   /** Sets a C integer numBytes in size at the specified offset. Note
 115       that there is no "unsigned" flag for the accessor since the
 116       value will not be sign-extended; the number of bytes are simply
 117       copied from the value into the target address space. */
 118   public void setCIntegerAt(long offset, long numBytes, long value);
 119 
 120   /** Sets an Address at the specified location. */
 121   public void setAddressAt(long offset, Address value);
 122 
 123   //
 124   // Java-related mutators -- see above.
 125   //


   1 /*
   2  * Copyright 2000-2008 Sun Microsystems, Inc.  All Rights Reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  20  * CA 95054 USA or visit www.sun.com if you need additional information or
  21  * have any questions.
  22  *  


  70       absolutely, positively work properly -- i.e., two Address
  71       objects representing the same address are both equal (via
  72       equals()) and have the same hash code. */
  73   public boolean equals(Object arg);
  74 
  75   /** This is stated explicitly here because it is important for
  76       implementations to understand that equals() and hashCode() must
  77       absolutely, positively work properly -- i.e., two Address
  78       objects representing the same address are both equal (via
  79       equals()) and have the same hash code. */
  80   public int hashCode();
  81 
  82   //
  83   // C/C++-related routines
  84   //
  85 
  86   public long       getCIntegerAt      (long offset, long numBytes, boolean isUnsigned)
  87     throws UnmappedAddressException, UnalignedAddressException;
  88   /** This returns null if the address at the given offset is NULL. */
  89   public Address    getAddressAt       (long offset) throws UnmappedAddressException, UnalignedAddressException;
  90   /** Returns the decoded address at the given offset */
  91   public Address    getCompOopAddressAt (long offset) throws UnmappedAddressException, UnalignedAddressException;
  92 
  93   //
  94   // Java-related routines
  95   //
  96 
  97   public boolean    getJBooleanAt      (long offset) throws UnmappedAddressException, UnalignedAddressException;
  98   public byte       getJByteAt         (long offset) throws UnmappedAddressException, UnalignedAddressException;
  99   public char       getJCharAt         (long offset) throws UnmappedAddressException, UnalignedAddressException;
 100   public double     getJDoubleAt       (long offset) throws UnmappedAddressException, UnalignedAddressException;
 101   public float      getJFloatAt        (long offset) throws UnmappedAddressException, UnalignedAddressException;
 102   public int        getJIntAt          (long offset) throws UnmappedAddressException, UnalignedAddressException;
 103   public long       getJLongAt         (long offset) throws UnmappedAddressException, UnalignedAddressException;
 104   public short      getJShortAt        (long offset) throws UnmappedAddressException, UnalignedAddressException;
 105   /** This returns null if the address at the given offset is NULL. */
 106   public OopHandle  getOopHandleAt     (long offset)
 107     throws UnmappedAddressException, UnalignedAddressException, NotInHeapException;
 108   public OopHandle  getCompOopHandleAt (long offset)
 109     throws UnmappedAddressException, UnalignedAddressException, NotInHeapException;
 110 
 111   //
 112   // C/C++-related mutators. These throw UnmappedAddressException if
 113   // the target is read-only (for example, a core file rather than an
 114   // active process), if the target address is unmapped, or if it is
 115   // read-only. The implementation may supply extra detail messages.
 116   //
 117 
 118   /** Sets a C integer numBytes in size at the specified offset. Note
 119       that there is no "unsigned" flag for the accessor since the
 120       value will not be sign-extended; the number of bytes are simply
 121       copied from the value into the target address space. */
 122   public void setCIntegerAt(long offset, long numBytes, long value);
 123 
 124   /** Sets an Address at the specified location. */
 125   public void setAddressAt(long offset, Address value);
 126 
 127   //
 128   // Java-related mutators -- see above.
 129   //