hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/LinuxAddress.java

Print this page
rev 611 : Merge
   1 /*
   2  * Copyright 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  *  


  57     }
  58 
  59     public String toString() {
  60         return debugger.addressValueToString(addr);
  61     }
  62 
  63     //
  64     // C/C++-related routines
  65     //
  66 
  67     public long getCIntegerAt(long offset, long numBytes, boolean isUnsigned)
  68             throws UnalignedAddressException, UnmappedAddressException {
  69         return debugger.readCInteger(addr + offset, numBytes, isUnsigned);
  70     }
  71 
  72     public Address getAddressAt(long offset)
  73             throws UnalignedAddressException, UnmappedAddressException {
  74         return debugger.readAddress(addr + offset);
  75     }
  76 





  77     //
  78     // Java-related routines
  79     //
  80 
  81   public boolean getJBooleanAt(long offset) throws UnalignedAddressException, UnmappedAddressException {
  82     return debugger.readJBoolean(addr + offset);
  83   }
  84 
  85   public byte getJByteAt(long offset) throws UnalignedAddressException, UnmappedAddressException {
  86     return debugger.readJByte(addr + offset);
  87   }
  88 
  89   public char getJCharAt(long offset) throws UnalignedAddressException, UnmappedAddressException {
  90     return debugger.readJChar(addr + offset);
  91   }
  92 
  93   public double getJDoubleAt(long offset) throws UnalignedAddressException, UnmappedAddressException {
  94     return debugger.readJDouble(addr + offset);
  95   }
  96 


  98     return debugger.readJFloat(addr + offset);
  99   }
 100 
 101   public int getJIntAt(long offset) throws UnalignedAddressException, UnmappedAddressException {
 102     return debugger.readJInt(addr + offset);
 103   }
 104 
 105   public long getJLongAt(long offset) throws UnalignedAddressException, UnmappedAddressException {
 106     return debugger.readJLong(addr + offset);
 107   }
 108 
 109   public short getJShortAt(long offset) throws UnalignedAddressException, UnmappedAddressException {
 110     return debugger.readJShort(addr + offset);
 111   }
 112 
 113   public OopHandle getOopHandleAt(long offset)
 114     throws UnalignedAddressException, UnmappedAddressException, NotInHeapException {
 115     return debugger.readOopHandle(addr + offset);
 116   }
 117 





 118   // Mutators -- not implemented for now (FIXME)
 119   public void setCIntegerAt(long offset, long numBytes, long value) {
 120     throw new DebuggerException("Unimplemented");
 121   }
 122   public void setAddressAt(long offset, Address value) {
 123     throw new DebuggerException("Unimplemented");
 124   }
 125   public void       setJBooleanAt      (long offset, boolean value)
 126     throws UnmappedAddressException, UnalignedAddressException {
 127     throw new DebuggerException("Unimplemented");
 128   }
 129   public void       setJByteAt         (long offset, byte value)
 130     throws UnmappedAddressException, UnalignedAddressException {
 131     throw new DebuggerException("Unimplemented");
 132   }
 133   public void       setJCharAt         (long offset, char value)
 134     throws UnmappedAddressException, UnalignedAddressException {
 135     throw new DebuggerException("Unimplemented");
 136   }
 137   public void       setJDoubleAt       (long offset, double value)


   1 /*
   2  * Copyright 2002-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  *  


  57     }
  58 
  59     public String toString() {
  60         return debugger.addressValueToString(addr);
  61     }
  62 
  63     //
  64     // C/C++-related routines
  65     //
  66 
  67     public long getCIntegerAt(long offset, long numBytes, boolean isUnsigned)
  68             throws UnalignedAddressException, UnmappedAddressException {
  69         return debugger.readCInteger(addr + offset, numBytes, isUnsigned);
  70     }
  71 
  72     public Address getAddressAt(long offset)
  73             throws UnalignedAddressException, UnmappedAddressException {
  74         return debugger.readAddress(addr + offset);
  75     }
  76 
  77     public Address getCompOopAddressAt(long offset)
  78             throws UnalignedAddressException, UnmappedAddressException {
  79         return debugger.readCompOopAddress(addr + offset);
  80     }
  81 
  82     //
  83     // Java-related routines
  84     //
  85 
  86   public boolean getJBooleanAt(long offset) throws UnalignedAddressException, UnmappedAddressException {
  87     return debugger.readJBoolean(addr + offset);
  88   }
  89 
  90   public byte getJByteAt(long offset) throws UnalignedAddressException, UnmappedAddressException {
  91     return debugger.readJByte(addr + offset);
  92   }
  93 
  94   public char getJCharAt(long offset) throws UnalignedAddressException, UnmappedAddressException {
  95     return debugger.readJChar(addr + offset);
  96   }
  97 
  98   public double getJDoubleAt(long offset) throws UnalignedAddressException, UnmappedAddressException {
  99     return debugger.readJDouble(addr + offset);
 100   }
 101 


 103     return debugger.readJFloat(addr + offset);
 104   }
 105 
 106   public int getJIntAt(long offset) throws UnalignedAddressException, UnmappedAddressException {
 107     return debugger.readJInt(addr + offset);
 108   }
 109 
 110   public long getJLongAt(long offset) throws UnalignedAddressException, UnmappedAddressException {
 111     return debugger.readJLong(addr + offset);
 112   }
 113 
 114   public short getJShortAt(long offset) throws UnalignedAddressException, UnmappedAddressException {
 115     return debugger.readJShort(addr + offset);
 116   }
 117 
 118   public OopHandle getOopHandleAt(long offset)
 119     throws UnalignedAddressException, UnmappedAddressException, NotInHeapException {
 120     return debugger.readOopHandle(addr + offset);
 121   }
 122 
 123   public OopHandle getCompOopHandleAt(long offset)
 124     throws UnalignedAddressException, UnmappedAddressException, NotInHeapException {
 125     return debugger.readCompOopHandle(addr + offset);
 126   }
 127 
 128   // Mutators -- not implemented for now (FIXME)
 129   public void setCIntegerAt(long offset, long numBytes, long value) {
 130     throw new DebuggerException("Unimplemented");
 131   }
 132   public void setAddressAt(long offset, Address value) {
 133     throw new DebuggerException("Unimplemented");
 134   }
 135   public void       setJBooleanAt      (long offset, boolean value)
 136     throws UnmappedAddressException, UnalignedAddressException {
 137     throw new DebuggerException("Unimplemented");
 138   }
 139   public void       setJByteAt         (long offset, byte value)
 140     throws UnmappedAddressException, UnalignedAddressException {
 141     throw new DebuggerException("Unimplemented");
 142   }
 143   public void       setJCharAt         (long offset, char value)
 144     throws UnmappedAddressException, UnalignedAddressException {
 145     throw new DebuggerException("Unimplemented");
 146   }
 147   public void       setJDoubleAt       (long offset, double value)